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 @@
@@ -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 @@
@@ -61,7 +61,7 @@ export default {
},
mounted() {
this.$nextTick(() => {
- this.initChart()
+ // this.initChart()
})
},
beforeDestroy() {
diff --git a/src/views/OperationalOverview/components/PieChart.vue b/src/views/OperationalOverview/components/PieChart.vue
index e8def780..90f80625 100644
--- a/src/views/OperationalOverview/components/PieChart.vue
+++ b/src/views/OperationalOverview/components/PieChart.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-01-21 14:43:06
* @LastEditors: zhp
- * @LastEditTime: 2024-01-25 17:41:44
+ * @LastEditTime: 2024-03-28 16:45:24
* @Description:
-->
@@ -90,6 +90,7 @@ export default {
bottom: 0,
itemHeight: 10,
itemWidth: 10,
+ icon:'roundRect',
formatter: function(name) {
let pieLegendVale = {}
lData.filter((item, index) => {
diff --git a/src/views/OperationalOverview/components/doubleYChart .vue b/src/views/OperationalOverview/components/doubleYChart .vue
index d95119ec..f935f590 100644
--- a/src/views/OperationalOverview/components/doubleYChart .vue
+++ b/src/views/OperationalOverview/components/doubleYChart .vue
@@ -1,7 +1,7 @@
@@ -78,7 +78,7 @@ export default {
this.$el.addEventListener('resize', () => {
console.log('resziing.....');
});
- this.initChart()
+ // this.initChart()
},
beforeDestroy() {
if (!this.chart) {
diff --git a/src/views/OperationalOverview/components/linearBarChart.vue b/src/views/OperationalOverview/components/linearBarChart.vue
index e7070a9f..b1ce1be2 100644
--- a/src/views/OperationalOverview/components/linearBarChart.vue
+++ b/src/views/OperationalOverview/components/linearBarChart.vue
@@ -70,7 +70,7 @@ export default {
// this.dataList.forEach(ele => {
// console.log(ele);
// this.series = []
- this.initChart()
+ // this.initChart()
// this.$nextTick(() => {
// // this.initChart()
// })
diff --git a/src/views/OperationalOverview/components/pileBarChart.vue b/src/views/OperationalOverview/components/pileBarChart.vue
index 9f5f57fa..947ee7b9 100644
--- a/src/views/OperationalOverview/components/pileBarChart.vue
+++ b/src/views/OperationalOverview/components/pileBarChart.vue
@@ -1,7 +1,7 @@
@@ -15,6 +15,7 @@
import * as echarts from 'echarts';
import 'echarts/theme/macarons' // echarts theme
import resize from './mixins/resize'
+import { raw } from 'body-parser';
export default {
name: 'OverviewBar',
@@ -77,7 +78,7 @@ export default {
// this.dataList.forEach(ele => {
// console.log(ele);
// this.series = []
- this.initChart()
+ // this.initChart()
// this.$nextTick(() => {
// // this.initChart()
// })
@@ -94,7 +95,8 @@ export default {
let rawData = []
let colors = ['#0fdedb', '#2359ec']
rawData.push(passRateList, wasteList)
- const totalData = [];
+ const totalData = [];
+ // if (rawData.length != 0 && raw,Data,length != 0) {
for (let i = 0; i < rawData[0].length; ++i) {
let sum = 0;
for (let j = 0; j < rawData.length; ++j) {
@@ -102,6 +104,7 @@ export default {
}
totalData.push(sum);
}
+ // }
console.log('total', totalData)
this.chart = echarts.init(document.getElementById(this.id))
const series = [
diff --git a/src/views/OperationalOverview/processingBoard.vue b/src/views/OperationalOverview/processingBoard.vue
index 5f1dd7c6..b76c4511 100644
--- a/src/views/OperationalOverview/processingBoard.vue
+++ b/src/views/OperationalOverview/processingBoard.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
- * @LastEditTime: 2024-03-28 15:31:07
+ * @LastEditTime: 2024-03-28 16:10:47
* @Description:
-->
@@ -16,10 +16,10 @@
许昌安彩深加工看板
单位:河南汇融数字科技有限公司
{{ times }}
-
-
-
+
+