Commit cd2bd4b3 by yiyu.li

add

parent 8a665cad
......@@ -88,10 +88,12 @@
<span class="infoLabel">状态:</span>
<span class="info">{{
orderDetail.status == 1
? "待上料"
: orderDetail.status == 2
? "运行中"
: "待下料"
? "待上料"
: orderDetail.status == 2
? "运行中"
: orderDetail.status == 3
? "待下料"
: ""
}}</span>
</p>
<p class="flex">
......@@ -176,7 +178,9 @@
? "待上料"
: orderDetail.status == 2
? "运行中"
: "待下料"
: orderDetail.status == 3
? "待下料"
: ""
}}</span>
</p>
<p class="flex">
......
......@@ -10,6 +10,7 @@
class="searchSelect"
:data="datalevel"
:value="leveldata"
@on-change="getSectionId"
></Cascader>
</div>
<div class="searchBtn">
......@@ -20,7 +21,11 @@
@click="search()"
>{{ $t("1001") }}</Button
>
<Button type="primary" class="twoWord" icon="ios-search" @click="exportExcel()"
<Button
type="primary"
class="twoWord"
icon="ios-search"
@click="exportExcel()"
>导出</Button
>
</div>
......@@ -28,33 +33,33 @@
</div>
<div class="divborder">
<div class="stateTitle flex">
<p><span>4</span>生产中</p>
<p><span>4</span>待下料</p>
<p><span>4</span>待上料</p>
<p><span>4</span>不可用</p>
<p><span>{{summary.produceTotal}}</span>生产中</p>
<p><span>{{summary.complateTotal}}</span>待下料</p>
<p><span>{{summary.waittingTotal}}</span>待上料</p>
<p><span>{{summary.disableTotal}}</span>不可用</p>
</div>
<div class="stateWrap">
<template v-for="(item,index) in stateList">
<div class="stateItem" :key="index">
<template v-for="(item, index) in stateList">
<div class="stateItem" :key="index" :style="{background:item.bgc}">
<p class="flex">
<span class="infoLabel">工位:</span>
<span class="info">{{item}}</span>
<span class="info">{{ item.section }}</span>
</p>
<p class="flex">
<span class="infoLabel">产品:</span>
<span class="info"></span>
<span class="info">{{item.product}}</span>
</p>
<p class="flex">
<span class="infoLabel">工装:</span>
<span class="info"></span>
<span class="info">{{item.fixtureName}}</span>
</p>
<p class="flex">
<span class="infoLabel">储位:</span>
<span class="info"></span>
<span class="info">{{item.location}}</span>
</p>
<p class="flex">
<span class="infoLabel">工件:</span>
<span class="info"></span>
<span class="info">{{item.sn}}</span>
</p>
</div>
</template>
......@@ -63,14 +68,14 @@
class="tableClass"
:data="data1"
:columns="columns1"
:max-height="200"
></Table>
<div v-show="show1">
<Table
class="tableClass"
:data="data2"
:columns="columns2"
:max-height="200"
></Table>
</div>
<div v-show="show2">
......@@ -78,7 +83,7 @@
class="tableClass"
:data="data3"
:columns="columns3"
:max-height="200"
></Table>
</div>
</div>
......@@ -94,7 +99,7 @@ export default {
productionLine: [],
leveldata: [], // 产线层级插件所需数据
datalevel: [], // 产线层级选中数据
stateList:[0],
stateList: [0],
columns1: [
{
title: this.$t("1008"),
......@@ -102,22 +107,22 @@ export default {
render: (h, params) => {
return h(
"span",
params.index + (this.page - 1) * this.pagesize + 1
params.index+1
);
},
width: 70,
},
{
title: "产线层级",
key: "warehouse",
},
{
title: "设备",
key: "storage_sn",
key: "section",
},
// {
// title: "设备",
// key: "storage_sn",
// },
{
title: "工装编号",
key: "install_sn",
key: "fixtureName",
render: (h, params) => {
return h(
"a",
......@@ -134,11 +139,11 @@ export default {
},
{
title: "产品编号",
key: "workpiece_sn",
key: "product",
},
{
title: "工件编号",
key: "storage_sn",
key: "sn",
render: (h, params) => {
return h(
"a",
......@@ -155,7 +160,7 @@ export default {
},
{
title: "状态",
key: "install_sn",
key: "status",
},
{
title: "最后更新时间",
......@@ -297,13 +302,52 @@ export default {
data3: [],
show2: false,
show1: false,
sectionid:0,
summary:{}
};
},
created() {
this.initlevel();
this.search();
},
methods: {
search() {},
search() {
// 初始化产线层级
this.axios
.request({
url: "/acc/AutomationState/GetStationMonitor?section="+this.sectionid,
method: "get",
})
.then((res) => {
const arr = [];
if (res.data.ret == 1) {
console.log(res.data.data);
// this.stateList = res.data.data.dts;
let arr = [];
arr = res.data.data.dts;
arr.forEach(ele => {
let bgc = '';
if (ele.enable == 0) {
bgc = 'red'
}
if(ele.status ==1){
bgc = '#2db7f5'
}
if(ele.status ==2){
bgc = '#ff9900'
}
if(ele.status ==3){
bgc = '#19be6b'
}
ele.bgc = bgc
});
this.stateList = arr;
this.data1 = arr;
this.summary = res.data.data.sum;
console.log(this.summary);
}
});
},
initlevel() {
// 初始化产线层级
this.axios
......@@ -320,7 +364,11 @@ export default {
}
});
},
exportExcel(){
getSectionId(val){
this.leveldata = val;
this.sectionid = this.leveldata.length>0?this.leveldata[this.leveldata.length-1]:0;
},
exportExcel() {
let data = {};
this.axios
.request({
......@@ -336,7 +384,7 @@ export default {
this.$Message.error(this.$t(res.data.msg));
}
});
}
},
},
};
</script>
......@@ -347,12 +395,15 @@ export default {
}
.stateWrap {
margin: 20px 10px;
display: flex;
flex-wrap: wrap;
}
.stateItem {
border: 1px solid #000;
width: 200px;
height: 150px;
border: 1px solid #d3d3d3;
width: 300px;
// height: 150px;
padding-left: 10px;
margin: 10px;
p {
height: 30px;
line-height: 30px;
......
......@@ -587,8 +587,23 @@ export default {
});
}
},
loadExcel() {},
exportEecel() {},
loadExcel() {
// this.axios.request({
// url: "/config/Download/GetTemplate?name=StorageLocation",
// method: "get",
// })
// .then((res) => {
// if (res.data.ret === 1) {
// window.location.href =
// this.axios.publicPath + "" + res.data.data;
// } else {
// this.$Message.error(this.$t(res.data.msg));
// }
// });
},
exportEecel() {
},
//工装类型
initFrockType() {
this.axios
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment