修改看板刷新时间

yangwl
LAPTOP-R6EHHS26\86155 9 months ago
parent 2b8b7e8986
commit b191187fdf

@ -2,7 +2,7 @@ import request from '@/utils/request'
// 获取工厂下拉列表 // 获取工厂下拉列表
export function getBoardFactory(data) { export function getBoardFactory(data) {
return request({ return request({
url: 'http://192.168.202.34:30000/prod-api/mes/wcsInterface/getBoardFactory', url: '/mes/wcsInterface/getBoardFactory',
method: 'post', method: 'post',
data: data data: data
}); });

@ -184,6 +184,9 @@ import {
getMesBoardEquProductionToday, getMesBoardEquProductionToday,
getBoardShifts, getBoardShifts,
} from "@/api/kanban/dailyoutput"; } from "@/api/kanban/dailyoutput";
import {
getDeviceRefreshTime,
} from "@/api/kanban/equipment";
import * as echarts from "echarts"; import * as echarts from "echarts";
import moment from "moment"; import moment from "moment";
import Echarts3D from "./echarts3d.vue"; import Echarts3D from "./echarts3d.vue";
@ -262,11 +265,21 @@ export default {
_this.classesList = response.data; _this.classesList = response.data;
_this.selectxtclasses = _this.classesList[0].shiftId; _this.selectxtclasses = _this.classesList[0].shiftId;
_this.initChart1(); _this.initChart1();
_this.time1 = setInterval(() => { _this.getDeviceRefreshTime()
_this.initChart1(); }
}, 1000 * 60 * 1); });
} }
}); });
},
getDeviceRefreshTime() {
const _this = this;
getDeviceRefreshTime().then((response) => {
if (response.data) {
console.log(response.data)
this.RefreshTime = response.data
this.time1 = setInterval(() => {
_this.initChart1();
}, 1000*60*this.RefreshTime);
} }
}); });
}, },

@ -58,12 +58,12 @@
<tbody> <tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index" <tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in equipmentlist"> v-for="(n, index) in equipmentlist">
<td style="width: 8%;">{{index+1}}</td> <td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 18%;">{{n.equipmentName}}</td> <td style="width: 18%;">{{ n.equipmentName }}</td>
<td style="width: 20%;">{{n.department}}</td> <td style="width: 20%;">{{ n.department }}</td>
<td style="width: 10%;">{{n.equipmentStatus}}</td> <td style="width: 10%;">{{ n.equipmentStatus }}</td>
<td style="width: 12%;">{{n.failureRate !=null ?n.failureRate.toFix(2)+'%':'--'}}</td> <td style="width: 12%;">{{ n.failureRate != null ? n.failureRate + '%' : '--' }}</td>
<td style="width: 12%;">{{n.utilizationRatio !=null?n.utilizationRatio.toFix(2)+'%':'--'}}</td> <td style="width: 12%;">{{ n.utilizationRatio != null ? n.utilizationRatio + '%' : '--' }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -95,14 +95,14 @@
<tbody> <tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index" <tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in repairlist"> v-for="(n, index) in repairlist">
<td style="width: 8%;">{{index+1}}</td> <td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 12%;">{{n.equipmentName}}</td> <td style="width: 12%;">{{ n.equipmentName }}</td>
<td style="width: 12%;">{{n.equipmentCode}}</td> <td style="width: 12%;">{{ n.equipmentCode }}</td>
<td style="width: 12%;">{{n.equipmentLocation}}</td> <td style="width: 12%;">{{ n.equipmentLocation }}</td>
<td style="width: 12%;">{{n.workFaultDesc}}</td> <td style="width: 12%;">{{ n.workFaultDesc }}</td>
<td style="width: 12%;">{{n.teamName}}</td> <td style="width: 12%;">{{ n.teamName }}</td>
<td style="width: 10%;">{{n.workHandle}}</td> <td style="width: 10%;">{{ n.workHandle }}</td>
<td style="width: 18%;">{{n.workPlanTime}}</td> <td style="width: 18%;">{{ n.workPlanTime }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -121,7 +121,7 @@
<div class="box"> <div class="box">
<div class="number"> <div class="number">
<span class="number1"> <span class="number1">
{{equipmentinfo.totalEquipment}} {{ equipmentinfo.totalEquipment }}
</span> </span>
<span class="name1"> <span class="name1">
@ -134,7 +134,7 @@
<div class="box"> <div class="box">
<div class="number"> <div class="number">
<span class="number1" style="color: #FF4D4F;"> <span class="number1" style="color: #FF4D4F;">
{{equipmentinfo.faultEquipment}} {{ equipmentinfo.faultEquipment }}
</span> </span>
<span class="name1"> <span class="name1">
@ -195,9 +195,9 @@
<tbody> <tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index" <tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in equipmentstabilizelist"> v-for="(n, index) in equipmentstabilizelist">
<td style="width: 8%;">{{index+1}}</td> <td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 12%;">{{n.equipmentCode}}</td> <td style="width: 12%;">{{ n.equipmentCode }}</td>
<td style="width: 12%;">{{n.mtbf !=null ?n.mtbf+'%':'--'}}</td> <td style="width: 12%;">{{ n.mtbf != null ? n.mtbf + 'h' : '--' }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -224,9 +224,9 @@
<tbody> <tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index" <tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in equipmentrepairlist"> v-for="(n, index) in equipmentrepairlist">
<td style="width: 8%;">{{index+1}}</td> <td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 12%;">{{n.equipmentName}}</td> <td style="width: 12%;">{{ n.equipmentName }}</td>
<td style="width: 12%;">{{n.rapairQuantity !=null ?n.rapairQuantity+'%':'--'}}</td> <td style="width: 12%;">{{ n.rapairQuantity != null ? n.rapairQuantity + '%' : '--' }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -251,6 +251,7 @@ import {
getRepairQuantity, getRepairQuantity,
equipmentIntactRate, equipmentIntactRate,
equipmentStability, equipmentStability,
getDeviceRefreshTime,
} from "@/api/kanban/equipment"; } from "@/api/kanban/equipment";
import * as echarts from "echarts"; import * as echarts from "echarts";
import moment from "moment"; import moment from "moment";
@ -311,189 +312,11 @@ export default {
equipmentrepairlist: [], equipmentrepairlist: [],
equipmentstabilizelist: [], equipmentstabilizelist: [],
equipmentinfo: [], equipmentinfo: [],
// { RefreshTime:null,
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "999",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1000",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1001",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1010",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "(OEM)",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1011",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1020",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "西",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1030",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1040",
// "children": []
// },
// {
// "createBy": null,
// "createTime": null,
// "updateBy": null,
// "updateTime": null,
// "remark": null,
// "poolName": null,
// "deptId": null,
// "parentId": null,
// "ancestors": null,
// "deptName": "(OEM)",
// "orderNum": null,
// "leader": null,
// "phone": null,
// "email": null,
// "status": null,
// "delFlag": null,
// "parentName": "1041",
// "children": []
// },
}; };
}, },
created() { }, created() {
},
destroyed() { destroyed() {
clearInterval(this.time1); clearInterval(this.time1);
this.time1 = null; this.time1 = null;
@ -501,7 +324,7 @@ export default {
mounted() { mounted() {
// this.datetime = moment().subtract(2, "day").format("yyyy-MM-DD"); // this.datetime = moment().subtract(2, "day").format("yyyy-MM-DD");
//console.log('zhuanhuahou',this.dateRangeone) //console.log('zhuanhuahou',this.dateRangeone)
// this.getdatalist(this.selectxt)
this.selectFactorylist(); this.selectFactorylist();
this.gettime(); this.gettime();
}, },
@ -520,10 +343,24 @@ export default {
getBoardFactory({ getBoardFactory({
factory: null, factory: null,
}).then((response) => { }).then((response) => {
if (response.data) { if (response) {
_this.getLineList = response.data; _this.getLineList = response.data;
_this.selectxt = _this.getLineList[0].parentName; _this.selectxt = _this.getLineList[0].parentName;
_this.getdatalist(_this.selectxt) _this.getdatalist(_this.selectxt)
_this.getDeviceRefreshTime()
}
});
},
getDeviceRefreshTime() {
const _this = this;
getDeviceRefreshTime().then((response) => {
if (response.data) {
console.log(response.data)
this.RefreshTime = response.data
this.RefreshTime = 1
this.time1 = setInterval(() => {
_this.getdatalist(_this.selectxt)
}, 1000*60*this.RefreshTime);
} }
}); });
}, },
@ -533,7 +370,7 @@ export default {
getRepairWorkOrder({ getRepairWorkOrder({
poolName: poolName, poolName: poolName,
}).then((response) => { }).then((response) => {
if(response.data){ if (response.data) {
response.data.forEach((item) => { response.data.forEach((item) => {
item.workPlanTime = moment(item.workPlanTime).format('YYYY-MM-DD HH:mm:ss') item.workPlanTime = moment(item.workPlanTime).format('YYYY-MM-DD HH:mm:ss')
}); });
@ -543,21 +380,29 @@ export default {
getEquipmentInfo({ getEquipmentInfo({
poolName: poolName, poolName: poolName,
}).then((response) => { }).then((response) => {
if(response.data){ if (response.data) {
_this.equipmentlist = response.data _this.equipmentlist = response.data
_this.equipmentlist.forEach((item) => {
if (item.failureRate) {
item.failureRate = item.failureRate.toFix(2)
}
if (item.utilizationRatio) {
item.utilizationRatio = item.utilizationRatio.toFix(2)
}
});
} }
}); });
getRepairQuantity({ getRepairQuantity({
poolName: poolName, poolName: poolName,
}).then((response) => { }).then((response) => {
if(response.data){ if (response.data) {
_this.equipmentrepairlist = response.data _this.equipmentrepairlist = response.data
} }
}); });
equipmentIntactRate({ equipmentIntactRate({
poolName: poolName, poolName: poolName,
}).then((response) => { }).then((response) => {
if(response.data){ if (response.data) {
_this.equipmentinfo = response.data _this.equipmentinfo = response.data
_this.initChart1() _this.initChart1()
} }
@ -565,7 +410,7 @@ export default {
equipmentStability({ equipmentStability({
poolName: poolName, poolName: poolName,
}).then((response) => { }).then((response) => {
if(response.data){ if (response.data) {
_this.equipmentstabilizelist = response.data _this.equipmentstabilizelist = response.data
} }
}); });
@ -574,10 +419,12 @@ export default {
const _this = this const _this = this
let intactRate = 0 let intactRate = 0
let numberAngle = 180 let numberAngle = 180
if(_this.equipmentinfo.intactRate){ console.log(_this.equipmentinfo.intactRate)
if (_this.equipmentinfo.intactRate) {
intactRate = _this.equipmentinfo.intactRate intactRate = _this.equipmentinfo.intactRate
numberAngle = parseInt(_this.equipmentinfo.intactRate)*1.8 - 180 numberAngle = parseInt(180 -_this.equipmentinfo.intactRate * 1.8)
} }
console.log(numberAngle)
var myChart1 = echarts.init(document.querySelector("#echart1")); var myChart1 = echarts.init(document.querySelector("#echart1"));
var option1 = { var option1 = {
// //
@ -1375,4 +1222,5 @@ export default {
border-radius: 8px; border-radius: 8px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #0091ff; background-color: #0091ff;
}</style> }
</style>

@ -177,6 +177,9 @@ import {
getLineDayNoOk, getLineDayNoOk,
getMonthOfYearContrast, getMonthOfYearContrast,
} from "@/api/kanban/quality"; } from "@/api/kanban/quality";
import {
getDeviceRefreshTime,
} from "@/api/kanban/equipment";
import * as echarts from "echarts"; import * as echarts from "echarts";
import moment from "moment"; import moment from "moment";
// import Echarts3D from "./echarts3d.vue"; // import Echarts3D from "./echarts3d.vue";
@ -255,6 +258,20 @@ export default {
_this.selectxt = _this.getLineList[0].parentName; _this.selectxt = _this.getLineList[0].parentName;
this.getdatalist() this.getdatalist()
this.initChart1() this.initChart1()
this.getDeviceRefreshTime()
}
});
},
getDeviceRefreshTime() {
const _this = this;
getDeviceRefreshTime().then((response) => {
if (response.data) {
console.log(response.data)
this.RefreshTime = response.data
this.time1 = setInterval(() => {
_this.getdatalist(_this.selectxt)
_this.initChart1()
}, 1000 * 60 * this.RefreshTime);
} }
}); });
}, },

@ -162,7 +162,10 @@ import {
getSupplierBadTOP5, getSupplierBadTOP5,
getSupplierNoOkList, getSupplierNoOkList,
getSupplierTaskList, getSupplierTaskList,
} from "@/api/kanban/quality";; } from "@/api/kanban/quality";
import {
getDeviceRefreshTime,
} from "@/api/kanban/equipment";
import * as echarts from "echarts"; import * as echarts from "echarts";
import moment from "moment"; import moment from "moment";
// import Echarts3D from "./echarts3d.vue"; // import Echarts3D from "./echarts3d.vue";
@ -266,6 +269,19 @@ export default {
_this.getLineList = response.data; _this.getLineList = response.data;
_this.selectxt = _this.getLineList[0].parentName; _this.selectxt = _this.getLineList[0].parentName;
_this.getdatalist() _this.getdatalist()
_this.getDeviceRefreshTime()
}
});
},
getDeviceRefreshTime() {
const _this = this;
getDeviceRefreshTime().then((response) => {
if (response.data) {
console.log(response.data)
this.RefreshTime = response.data
this.time1 = setInterval(() => {
_this.getdatalist(_this.selectxt)
}, 1000 * 60 * this.RefreshTime);
} }
}); });
}, },

@ -122,6 +122,9 @@ import {
getBoardFactory, getBoardFactory,
getSupplierNoOkList, getSupplierNoOkList,
} from "@/api/kanban/quality";; } from "@/api/kanban/quality";;
import {
getDeviceRefreshTime,
} from "@/api/kanban/equipment";
import * as echarts from "echarts"; import * as echarts from "echarts";
import moment from "moment"; import moment from "moment";
// import Echarts3D from "./echarts3d.vue"; // import Echarts3D from "./echarts3d.vue";
@ -200,6 +203,19 @@ export default {
_this.getLineList = response.data; _this.getLineList = response.data;
_this.selectxt = _this.getLineList[0].parentName; _this.selectxt = _this.getLineList[0].parentName;
_this.getSupplierNoOkList(_this.selectxt) _this.getSupplierNoOkList(_this.selectxt)
_this.getDeviceRefreshTime()
}
});
},
getDeviceRefreshTime() {
const _this = this;
getDeviceRefreshTime().then((response) => {
if (response.data) {
console.log(response.data)
this.RefreshTime = response.data
this.time1 = setInterval(() => {
_this.getSupplierNoOkList(_this.selectxt)
}, 1000 * 60 * this.RefreshTime);
} }
}); });
}, },

Loading…
Cancel
Save