Commit 86fbbfc8 by yiyu.li

add

parent e76452b5
......@@ -33,49 +33,59 @@
</div>
<div class="divborder">
<div class="stateTitle flex">
<p><span>{{summary.produceTotal}}</span>生产中</p>
<p><span>{{summary.complateTotal}}</span>待下料</p>
<p><span>{{summary.waittingTotal}}</span>待上料</p>
<p><span>{{summary.disableTotal}}</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" :style="{background:item.bgc}">
<div
class="stateItem"
:key="index"
:style="{ background: item.bgc }"
>
<p class="flex">
<span class="infoLabel">工位:</span>
<span class="info">{{ item.section }}</span>
</p>
<p class="flex">
<span class="infoLabel">产品:</span>
<span class="info">{{item.product}}</span>
<span class="info">{{ item.product }}</span>
</p>
<p class="flex">
<span class="infoLabel">工装:</span>
<span class="info">{{item.fixtureName}}</span>
<span class="info">{{ item.fixtureName }}</span>
</p>
<p class="flex">
<span class="infoLabel">储位:</span>
<span class="info">{{item.location}}</span>
<span class="info">{{ item.location }}</span>
</p>
<p class="flex">
<span class="infoLabel">工件:</span>
<span class="info">{{item.sn}}</span>
<span class="info">{{ item.sn }}</span>
</p>
</div>
</template>
</div>
<Table
class="tableClass"
:data="data1"
:columns="columns1"
></Table>
<Table class="tableClass" :data="data1" :columns="columns1"></Table>
<div v-show="show1">
<Table
class="tableClass"
:data="data2"
:columns="columns2"
></Table>
</div>
<div v-show="show2">
......@@ -83,7 +93,6 @@
class="tableClass"
:data="data3"
:columns="columns3"
></Table>
</div>
</div>
......@@ -105,10 +114,7 @@ export default {
title: this.$t("1008"),
key: "xuhao",
render: (h, params) => {
return h(
"span",
params.index+1
);
return h("span", params.index + 1);
},
width: 70,
},
......@@ -302,8 +308,13 @@ export default {
data3: [],
show2: false,
show1: false,
sectionid:0,
summary:{}
sectionid: 0,
summary: {
complateTotal: 0,
disableTotal: 0,
produceTotal: 0,
waittingTotal: 0,
},
};
},
created() {
......@@ -315,7 +326,9 @@ export default {
// 初始化产线层级
this.axios
.request({
url: "/acc/AutomationState/GetStationMonitor?section="+this.sectionid,
url:
"/acc/AutomationState/GetStationMonitor?section=" +
this.sectionid,
method: "get",
})
.then((res) => {
......@@ -324,22 +337,25 @@ export default {
console.log(res.data.data);
// this.stateList = res.data.data.dts;
let arr = [];
arr = res.data.data.dts;
arr.forEach(ele => {
let bgc = '';
arr =
res.data.data.dts.length > 0
? res.data.data.dts
: [];
arr.forEach((ele) => {
let bgc = "";
if (ele.enable == 0) {
bgc = 'red'
bgc = "red";
}
if(ele.status ==1){
bgc = '#2db7f5'
if (ele.status == 1) {
bgc = "#2db7f5";
}
if(ele.status ==2){
bgc = '#ff9900'
if (ele.status == 2) {
bgc = "#ff9900";
}
if(ele.status ==3){
bgc = '#19be6b'
if (ele.status == 3) {
bgc = "#19be6b";
}
ele.bgc = bgc
ele.bgc = bgc;
});
this.stateList = arr;
this.data1 = arr;
......@@ -364,9 +380,12 @@ export default {
}
});
},
getSectionId(val){
getSectionId(val) {
this.leveldata = val;
this.sectionid = this.leveldata.length>0?this.leveldata[this.leveldata.length-1]:0;
this.sectionid =
this.leveldata.length > 0
? this.leveldata[this.leveldata.length - 1]
: 0;
},
exportExcel() {
let data = {};
......
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