From b191187fdf68cd3e37868865ee3c4ed83395296f Mon Sep 17 00:00:00 2001 From: "LAPTOP-R6EHHS26\\86155" <2217640373@qq.com> Date: Wed, 20 Dec 2023 13:58:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9C=8B=E6=9D=BF=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/kanban/equipment.js | 2 +- src/views/kanban/dailyoutput/index.vue | 19 +- src/views/kanban/equipment/index.vue | 276 ++++++------------------- src/views/kanban/quality/kanban1.vue | 17 ++ src/views/kanban/quality/kanban2.vue | 18 +- src/views/kanban/quality/kanban3.vue | 16 ++ 6 files changed, 129 insertions(+), 219 deletions(-) diff --git a/src/api/kanban/equipment.js b/src/api/kanban/equipment.js index aa36141..c8b69ce 100644 --- a/src/api/kanban/equipment.js +++ b/src/api/kanban/equipment.js @@ -2,7 +2,7 @@ import request from '@/utils/request' // 获取工厂下拉列表 export function getBoardFactory(data) { return request({ - url: 'http://192.168.202.34:30000/prod-api/mes/wcsInterface/getBoardFactory', + url: '/mes/wcsInterface/getBoardFactory', method: 'post', data: data }); diff --git a/src/views/kanban/dailyoutput/index.vue b/src/views/kanban/dailyoutput/index.vue index 935365e..90fdfdf 100644 --- a/src/views/kanban/dailyoutput/index.vue +++ b/src/views/kanban/dailyoutput/index.vue @@ -184,6 +184,9 @@ import { getMesBoardEquProductionToday, getBoardShifts, } from "@/api/kanban/dailyoutput"; +import { + getDeviceRefreshTime, +} from "@/api/kanban/equipment"; import * as echarts from "echarts"; import moment from "moment"; import Echarts3D from "./echarts3d.vue"; @@ -262,14 +265,24 @@ export default { _this.classesList = response.data; _this.selectxtclasses = _this.classesList[0].shiftId; _this.initChart1(); - _this.time1 = setInterval(() => { - _this.initChart1(); - }, 1000 * 60 * 1); + _this.getDeviceRefreshTime() } }); } }); }, + 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); + } + }); + }, initChart1() { const _this = this; var myChart1 = echarts.init(document.querySelector("#echart1")); diff --git a/src/views/kanban/equipment/index.vue b/src/views/kanban/equipment/index.vue index c102ab9..d892f78 100644 --- a/src/views/kanban/equipment/index.vue +++ b/src/views/kanban/equipment/index.vue @@ -58,12 +58,12 @@ - {{index+1}} - {{n.equipmentName}} - {{n.department}} - {{n.equipmentStatus}} - {{n.failureRate !=null ?n.failureRate.toFix(2)+'%':'--'}} - {{n.utilizationRatio !=null?n.utilizationRatio.toFix(2)+'%':'--'}} + {{ index + 1 }} + {{ n.equipmentName }} + {{ n.department }} + {{ n.equipmentStatus }} + {{ n.failureRate != null ? n.failureRate + '%' : '--' }} + {{ n.utilizationRatio != null ? n.utilizationRatio + '%' : '--' }} @@ -95,14 +95,14 @@ - {{index+1}} - {{n.equipmentName}} - {{n.equipmentCode}} - {{n.equipmentLocation}} - {{n.workFaultDesc}} - {{n.teamName}} - {{n.workHandle}} - {{n.workPlanTime}} + {{ index + 1 }} + {{ n.equipmentName }} + {{ n.equipmentCode }} + {{ n.equipmentLocation }} + {{ n.workFaultDesc }} + {{ n.teamName }} + {{ n.workHandle }} + {{ n.workPlanTime }} @@ -121,7 +121,7 @@
- {{equipmentinfo.totalEquipment}} + {{ equipmentinfo.totalEquipment }} 台 @@ -134,7 +134,7 @@
- {{equipmentinfo.faultEquipment}} + {{ equipmentinfo.faultEquipment }} 台 @@ -195,9 +195,9 @@ - {{index+1}} - {{n.equipmentCode}} - {{n.mtbf !=null ?n.mtbf+'%':'--'}} + {{ index + 1 }} + {{ n.equipmentCode }} + {{ n.mtbf != null ? n.mtbf + 'h' : '--' }} @@ -224,9 +224,9 @@ - {{index+1}} - {{n.equipmentName}} - {{n.rapairQuantity !=null ?n.rapairQuantity+'%':'--'}} + {{ index + 1 }} + {{ n.equipmentName }} + {{ n.rapairQuantity != null ? n.rapairQuantity + '%' : '--' }} @@ -251,6 +251,7 @@ import { getRepairQuantity, equipmentIntactRate, equipmentStability, + getDeviceRefreshTime, } from "@/api/kanban/equipment"; import * as echarts from "echarts"; import moment from "moment"; @@ -311,189 +312,11 @@ export default { equipmentrepairlist: [], equipmentstabilizelist: [], equipmentinfo: [], - // { - // "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": [] - // }, + RefreshTime:null, }; }, - created() { }, + created() { + }, destroyed() { clearInterval(this.time1); this.time1 = null; @@ -501,7 +324,7 @@ export default { mounted() { // this.datetime = moment().subtract(2, "day").format("yyyy-MM-DD"); //console.log('zhuanhuahou',this.dateRangeone) - // this.getdatalist(this.selectxt) + this.selectFactorylist(); this.gettime(); }, @@ -520,10 +343,24 @@ export default { getBoardFactory({ factory: null, }).then((response) => { - if (response.data) { + if (response) { _this.getLineList = response.data; _this.selectxt = _this.getLineList[0].parentName; _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({ poolName: poolName, }).then((response) => { - if(response.data){ + if (response.data) { response.data.forEach((item) => { item.workPlanTime = moment(item.workPlanTime).format('YYYY-MM-DD HH:mm:ss') }); @@ -543,21 +380,29 @@ export default { getEquipmentInfo({ poolName: poolName, }).then((response) => { - if(response.data){ + if (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({ poolName: poolName, }).then((response) => { - if(response.data){ + if (response.data) { _this.equipmentrepairlist = response.data } - }); + }); equipmentIntactRate({ poolName: poolName, }).then((response) => { - if(response.data){ + if (response.data) { _this.equipmentinfo = response.data _this.initChart1() } @@ -565,7 +410,7 @@ export default { equipmentStability({ poolName: poolName, }).then((response) => { - if(response.data){ + if (response.data) { _this.equipmentstabilizelist = response.data } }); @@ -574,10 +419,12 @@ export default { const _this = this let intactRate = 0 let numberAngle = 180 - if(_this.equipmentinfo.intactRate){ + console.log(_this.equipmentinfo.intactRate) + if (_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 option1 = { //提示框组件。开发实际中去掉了指针,提示框可以不用设置。 @@ -1375,4 +1222,5 @@ export default { border-radius: 8px; -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); background-color: #0091ff; -} +} + diff --git a/src/views/kanban/quality/kanban1.vue b/src/views/kanban/quality/kanban1.vue index cf41854..b6c56bd 100644 --- a/src/views/kanban/quality/kanban1.vue +++ b/src/views/kanban/quality/kanban1.vue @@ -177,6 +177,9 @@ import { getLineDayNoOk, getMonthOfYearContrast, } from "@/api/kanban/quality"; +import { + getDeviceRefreshTime, +} from "@/api/kanban/equipment"; import * as echarts from "echarts"; import moment from "moment"; // import Echarts3D from "./echarts3d.vue"; @@ -255,6 +258,20 @@ export default { _this.selectxt = _this.getLineList[0].parentName; this.getdatalist() 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); } }); }, diff --git a/src/views/kanban/quality/kanban2.vue b/src/views/kanban/quality/kanban2.vue index 0173b72..3903e14 100644 --- a/src/views/kanban/quality/kanban2.vue +++ b/src/views/kanban/quality/kanban2.vue @@ -162,7 +162,10 @@ import { getSupplierBadTOP5, getSupplierNoOkList, getSupplierTaskList, -} from "@/api/kanban/quality";; +} from "@/api/kanban/quality"; +import { + getDeviceRefreshTime, +} from "@/api/kanban/equipment"; import * as echarts from "echarts"; import moment from "moment"; // import Echarts3D from "./echarts3d.vue"; @@ -266,6 +269,19 @@ export default { _this.getLineList = response.data; _this.selectxt = _this.getLineList[0].parentName; _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); } }); }, diff --git a/src/views/kanban/quality/kanban3.vue b/src/views/kanban/quality/kanban3.vue index c62c379..a860075 100644 --- a/src/views/kanban/quality/kanban3.vue +++ b/src/views/kanban/quality/kanban3.vue @@ -122,6 +122,9 @@ import { getBoardFactory, getSupplierNoOkList, } from "@/api/kanban/quality";; +import { + getDeviceRefreshTime, +} from "@/api/kanban/equipment"; import * as echarts from "echarts"; import moment from "moment"; // import Echarts3D from "./echarts3d.vue"; @@ -200,6 +203,19 @@ export default { _this.getLineList = response.data; _this.selectxt = _this.getLineList[0].parentName; _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); } }); },