From f00a972f324c966ad20a9eba509b3b2ba8606740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’> Date: Thu, 28 Mar 2024 16:48:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/OperationalOverview/coldBoard.vue | 133 ++++----- .../components/LineChart.vue | 6 +- .../components/PieChart.vue | 3 +- .../components/doubleYChart .vue | 4 +- .../components/linearBarChart.vue | 2 +- .../components/pileBarChart.vue | 9 +- .../OperationalOverview/processingBoard.vue | 254 +++++------------- 7 files changed, 134 insertions(+), 277 deletions(-) diff --git a/src/views/OperationalOverview/coldBoard.vue b/src/views/OperationalOverview/coldBoard.vue index 67cf7840..50ef8f91 100644 --- a/src/views/OperationalOverview/coldBoard.vue +++ b/src/views/OperationalOverview/coldBoard.vue @@ -1,7 +1,7 @@ @@ -19,8 +19,8 @@

{{ times }}

- - + + @@ -272,7 +272,7 @@ export default { }, watch: { - isFullScreen: function (val) { + isFullScreen:function (val) { if (val) { const _this = this; _this.beilv2 = document.documentElement.clientWidth / 1920 @@ -301,6 +301,7 @@ export default { setTimeout(() => { window.location.reload() }, 86400000) + // this.getData() }, destroyed() { this.CutWebsocketClose() @@ -392,7 +393,6 @@ export default { this.$refs.thirdPileChart.initChart(nameList, [topNameList[2]], [nameWasteList[2]], [productList[2]], [wasteList[2]]) this.$refs.fourthPileChart.initChart(nameList, [topNameList[3]], [nameWasteList[3]], [productList[3]], [wasteList[3]]) this.$refs.fifthPileChart.initChart(nameList, [topNameList[4]], [nameWasteList[4]], [productList[4]], [wasteList[4]]) - // this.$refs.productChart.initChart(nameList, yieldList, sumAreaList) this.getTimes() // console.log(moment(this.logoutTime - 28800000).format('HH:mm:ss')); @@ -414,6 +414,39 @@ export default { } }, methods: { + // getData() { + // let detData = [ + // { + // name: '1', + // run: '运行', + // }, + // { + // name: '2', + // run: '未运行', + // }, + // { + // name: '3', + // run: '运行', + // }, + // { + // name: '4', + // run: '未运行', + // }, + // { + // name: '1', + // run: '运行', + // }, + // ] + // this.realEqList = detData.map((item, index) => [ + // // console.log(item) + // `${index + 1 || ''} + // `, + // `${item.name || ''}`, + // `
${item.run || ''}
`, + // ]) + // this.realEqConfig.data = this.realEqList + // this.$refs['realEqScrollBoard'].updateRows(this.realEqList) + // }, CutWebsocketClose(e) { this.Cutws.ws.onclose = (event) => { console.log(event );} }, @@ -488,11 +521,14 @@ export default { `${index + 1 || ''} `, `${item.name || ''}`, - `
${item.run || ''}
`, + `
${item.run || ''}
`, ]) } this.realEqConfig.data = this.realEqList - this.$refs['realEqScrollBoard'].updateRows(this.realEqList) + this.$nextTick(() => { + this.$refs['realEqScrollBoard'].updateRows(this.realEqList) + + }) }; // if (typeof (WebSocket) === 'undefined') { // alert('您的浏览器不支持WebSocket') @@ -601,8 +637,8 @@ export default { `, `${i || ''} `, - `
${this.funWsData.data.annealFanInfo[i] || ''}
`, - // ` ${this.funWsData.data.annealFanInfo[i] || ''}`, + `${item.name || ''}`, + `
${item.run || ''}
`, ]) } this.annealFunConfig.data = arr @@ -616,8 +652,8 @@ export default { arr.push([ `${index || ''}`, `${i || ''}`, - `
${this.funWsData.data.fanInfo[i] || ''}
`, - // `${this.funWsData.data.fanInfo[i] || ''}`, + `${item.name || ''}`, + `
${item.run || ''}
`, ]) } this.funConfig.data = arr @@ -702,79 +738,6 @@ export default { // console.log(size[0] + '*' + size[1] + '*' + size[2]); return size[0] + '*' + size[1] + '*' + size[2] }, - // 数据接收 - // cutWebsocketOnMessage(e) { - // this.cutWsData = e?.data ? JSON.parse(e?.data) : {} - // if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'table') { - // let cutArr = this.cutWsData.productHourData.map((item, index) => [ - // `${index + 1 || ''} - // `, - // `${item.lineName || ''} - // `, - // `${this.formatTime(item.time) || ''}`, - // `${this.getSize(item.size) || ''}`, - // `${item.productArea + '㎡' || ''}`, - // `${item.wasteArea + '㎡' || ''}`, - // `
${(item.product * 100).toFixed(2) + '%' || ''}
- //
${(item.product * 100).toFixed(2) + '%' || ''}
` - // ]) - // this.cutConfig.data = cutArr - // this.$refs['cutScrollBoard'].updateRows(cutArr) - // } else if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'chart' && this.cutWsData.dateType === 'day') { - // let nameList = [] - // let nameWasteList = [] - // let topNameList = [] - // let productList = [] - // let wasteList = [] - // let sumAreaList = [] - // let yieldList = [] - // // this.cutTableDataList = - // this.cutWsData.coldDetData.forEach((ele, index) => { - // nameList.push(ele.lineName) - // topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea) - // productList.push(ele.productArea) - // wasteList.push(ele.wastArea) - // nameWasteList.push('缺陷面积:' + ele.wastArea) - // sumAreaList.push(ele.sumArea) - // yieldList.push((ele.yield *100).toFixed(3)) - // }) - // this.$refs.pileChart.initChart(nameList, topNameList, nameWasteList, productList, wasteList) - // this.$refs.productChart.initChart(nameList, yieldList, sumAreaList) - // } - // }, - // SJGWebsocketOnOpen() { - // console.log('socket连接成功') - // this.SJGWebsocket.onmessage() - // }, - // 连接建立失败重连 - // SJGWebsocketOnError(e) { - // this.SJGInitWebSocket() - // }, - // 数据接收 - // SJGWebsocketOnMessage(e) { - // this.SJGWsData = e?.data ? JSON.parse(e?.data) : {} - // if (this.SJGWsData.type === 'isra') { - // console.log('222222', this.SJGWsData.detData) - // console.log(this.SJGWsData.detData); - // let chartData = this.SJGWsData.detData.map((item, index) => { - // return { - // name: item.type, - // num:item.num - // } - // }) - // this.$refs['ISRAChart'].updateChart(chartData) - // } else if (this.SJGWsData.type === 'equipment') { - // this.realEqList = this.SJGWsData.detData.map((ele, index) =>[ - // // console.log(item) - // `${index + 1 || ''} - // `, - // `${ele.name || ''}`, - // `${ele.run || ''}`, - // ]) - // } - // this.realEqConfig.data = this.realEqList - // this.$refs['realEqScrollBoard'].updateRows(this.realEqList) - // }, windowWidth(value) { this.clientWidth = value this.beilv2 = this.clientWidth / 1920 @@ -794,7 +757,7 @@ export default { } }, changeFullScreen() { - this.containerWidth = 223223223 + // this.containerWidth = 223223223 if (!screenfull.isEnabled) { this.$message({ message: 'you browser can not work', diff --git a/src/views/OperationalOverview/components/LineChart.vue b/src/views/OperationalOverview/components/LineChart.vue index 0b87c726..8ae721a0 100644 --- a/src/views/OperationalOverview/components/LineChart.vue +++ b/src/views/OperationalOverview/components/LineChart.vue @@ -1,8 +1,8 @@