2F监控界面修改

master
Yangwl 3 months ago
parent daa12a5dab
commit 70058457b8

@ -150,7 +150,8 @@
<!-- </div>--> <!-- </div>-->
<div v-for="i in infoData " class="info" <div v-for="i in infoData " class="info"
:style="`width: ${i.width}%; height: ${i.height}%;top: ${i.top}%;left: ${i.left}%;transform: rotate(${i.rotate}deg); background: #CB4C4C${i.alpha};border-radius: ${i.radius}%;`"> :style="`width: ${i.width}%; height: ${i.height}%;top: ${i.top}%;left: ${i.left}%;transform: rotate(${i.rotate}deg);
background: ${i.alpha};border-radius: ${i.radius}%; `">
<div :class="i.isRight?'infoModel':'infoModel'" :style="`transform: rotate(${360 -i.rotate}deg);`"> <div :class="i.isRight?'infoModel':'infoModel'" :style="`transform: rotate(${360 -i.rotate}deg);`">
<div class="title">{{ i.equipmentName }}</div> <div class="title">{{ i.equipmentName }}</div>
<div style="color: #fff; <div style="color: #fff;
@ -213,28 +214,6 @@ export default {
workCenter: null, workCenter: null,
factoryCode: null factoryCode: null
}, },
tableData: [
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
{ time: '08:30', device: '设备A', status: '运行中', output: '1200' },
{ time: '09:15', device: '设备B', status: '待机', output: '800' },
// ...
],
scrollInterval: null, scrollInterval: null,
isRun: [1, 2, 3, 4, 5, 6, 7, 8,9], isRun: [1, 2, 3, 4, 5, 6, 7, 8,9],
infoData: [ infoData: [
@ -244,7 +223,6 @@ export default {
rotate: 14, rotate: 14,
width: 2, width: 2,
height:40, height:40,
alpha: '80',
radius:20, radius:20,
isRight: false, isRight: false,
equipmentName: "包装线11" equipmentName: "包装线11"
@ -255,7 +233,6 @@ export default {
rotate: 14, rotate: 14,
width: 2, width: 2,
height:40, height:40,
alpha: '80',
radius:20, radius:20,
isRight: false, isRight: false,
equipmentName: "包装线10" equipmentName: "包装线10"
@ -266,7 +243,6 @@ export default {
rotate: 10, rotate: 10,
width: 2, width: 2,
height:40, height:40,
alpha: '80',
radius:20, radius:20,
isRight: false, isRight: false,
equipmentName: "包装线09" equipmentName: "包装线09"
@ -277,7 +253,6 @@ export default {
rotate: 7, rotate: 7,
width: 2, width: 2,
height:40, height:40,
alpha: '80',
radius:20, radius:20,
isRight: false, isRight: false,
equipmentName: "包装线08" equipmentName: "包装线08"
@ -351,47 +326,47 @@ export default {
outputData: [ outputData: [
{ {
left: 13.6, left: 13.6,
no:"11" no:"XL11"
}, },
{ {
left: 20.3, left: 20.3,
no:"10" no:"XL10"
}, },
{ {
left: 25.3, left: 25.3,
no:"09" no:"XL09"
}, },
{ {
left: 33.3, left: 33.3,
no:"08" no:"XL08"
}, },
{ {
left: 37.7, left: 37.7,
no:"07" no:"XL07"
}, },
{ {
left: 43.9, left: 43.9,
no:"06" no:"XL06"
}, },
{ {
left: 48.5, left: 48.5,
no:"05" no:"XL05"
}, },
{ {
left: 54.5, left: 54.5,
no:"04" no:"XL04"
}, },
{ {
left: 59, left: 59,
no:"03" no:"XL03"
}, },
{ {
left: 65, left: 65,
no:"02" no:"XL02"
}, },
{ {
left: 69.5, left: 69.5,
no:"01" no:"XL01"
}, },
], ],
arrowData: [ arrowData: [
@ -512,6 +487,31 @@ export default {
this.repairOrders = receivedData.map(item => ({ this.repairOrders = receivedData.map(item => ({
...item, ...item,
})) }))
const descList = receivedData.map(item =>
`${item.params?.equipmentName || '未知'} ${item.orderDesc || '无故障描述'} 维修人:${item.orderRepairmanName}`
);
this.scrollText = descList.join('★★★★★★★★'); //
//
const activeEquipmentNames = new Set(
receivedData
.map(item => item.params?.equipmentName)
.filter(name => name)
);
// infoData
this.infoData.forEach((item, index) => {
if (activeEquipmentNames.has(item.equipmentName)) {
// alpha
this.$set(this.infoData[index], 'alpha', '#CB4C4C80');
} else {
// alpha
if (this.infoData[index].hasOwnProperty('alpha')) {
this.$delete(this.infoData[index], 'alpha');
}
}
});
} else { } else {
console.warn('收到非数组格式数据:', receivedData) console.warn('收到非数组格式数据:', receivedData)
} }
@ -519,7 +519,7 @@ export default {
console.error("JSON parsing failed:", error) console.error("JSON parsing failed:", error)
this.$notify.error({ title: '数据错误', message: '接收数据格式异常' }) this.$notify.error({ title: '数据错误', message: '接收数据格式异常' })
} }
}; }.bind(this);;
this.ws.onclose = function (event) { this.ws.onclose = function (event) {
self.text_content = self.text_content + "已经关闭连接!" + "\n"; self.text_content = self.text_content + "已经关闭连接!" + "\n";
}; };

Loading…
Cancel
Save