Commit 86fbbfc8 by yiyu.li

add

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