'update_coldboard'

Este commit está contenido en:
gtz 2024-01-02 09:20:55 +08:00
padre 3d198d83cb
commit bdf292654b
Se han modificado 3 ficheros con 58 adiciones y 62 borrados

Ver fichero

@ -83,10 +83,14 @@
<top-radio-group />
</div> -->
<!-- 像下面这样表格里的limit值也许可以用js动态计算出来 -->
<el-col :span="12">
<base-table1 :page="1" :limit="9" :show-index="false" :table-config="EqMonitoringProps"
<el-col :span="6">
<base-table1 :page="1" :limit="9" :show-index="false" :table-config="EqMonitoringPropsFun"
:table-data="funList" />
</el-col>
<el-col :span="6">
<base-table1 :page="1" :limit="9" :show-index="false" :table-config="EqMonitoringPropsFun"
:table-data="annealFunList" />
</el-col>
<el-col :span="12" style="float: right;">
<base-table1 :page="1" :limit="9" :show-index="false" :table-config="EqMonitoringProps"
:table-data="realEqList" />
@ -137,6 +141,10 @@ import { parseTime } from '../core/mixins/code-filter';
import LinearBarChart from './components/linearBarChart'
const qualityYearTableProps= []
const EqMonitoringPropsFun = [
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'status', label: '运行状态', width: 80}
]
const EqMonitoringProps = [
{ prop: 'productLine', label: '产线' },
{ prop: 'equipmentName', label: '设备名称' },
@ -154,15 +162,15 @@ const EqMonitoringProps = [
},
]
const cutProps = [
{ prop: 'lineName', label: '产线' },
{ prop: 'lineName', label: '产线', width: 50 },
{
prop: 'time', label: '时间',
filter: parseTime
},
{ prop: 'size', label: '规格' },
{ prop: 'productArea', label: '良品面积' },
{ prop: 'wasteArea', label: '废片面积' },
{ prop: 'product', label: '良品率' },
{ prop: 'productArea', label: '良品面积', width: 80 },
{ prop: 'wasteArea', label: '废片面积', width: 80 },
{ prop: 'product', label: '良品率', width: 80 },
]
const cxNameList = ['周一', '周二', '周三', '周四', '周五']
@ -246,6 +254,7 @@ export default {
beilv: 1,
value: 100,
EqMonitoringProps,
EqMonitoringPropsFun,
realEqList:[],
qualityYearTableProps,
ISRATableProps,
@ -263,9 +272,13 @@ export default {
clientWidth: 0,
containerWidth: 111111,
isFullScreen: false,
cutWsData: {},
funWsData: {},
SJGWsData: {},
// orderProcessList: [],
dateType: '0',
funList:[],
annealFunList: [],
queryParams: {
pageNo: 1,
pageSize: 10,
@ -334,7 +347,6 @@ export default {
// this.beilv2 = window.innerWidth / 1920
// })
// erd.listenTo(document, (element) => {
// console.log(element.offsetWidth)
// this.beilv2 = element.offsetWidth / 1920
// // var width = element.offsetWidth;
@ -352,7 +364,6 @@ export default {
//
// let data = '{ "data": { "FanFrequencyInfo": { "1#10": "0", "1#L": "0", "1#": "44.8", "1#": "40", "1#": "43", "1#": "48", "2#10": "50", "2#L": "49.7", "2#": "0", "2#": "0", "2#": "0", "2#": "48", "3#": "0", "3#": "0", "4#": "40", "4#": "43" } }, "type": "FanFrequencyInfo" }'
// let obj = JSON.parse(data)
// console.log('data', obj.data.FanFrequencyInfo)
// // for()
// let arr = []
// for (let i in obj.data.FanFrequencyInfo) {
@ -367,7 +378,6 @@ export default {
'get',
this.queryParams
).then((res) => {
console.log('222222222222222', res);
this.realEqList = res.data.list;
// this.total = response.data.total;
// this.loading = false;
@ -404,7 +414,6 @@ export default {
// const wsUrl = 'ws://192.168.1.74:48080/websocket/message?userId=EN111'
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
let date = new Date().valueOf()
console.log(date);
const SJGWsUrl = `ws://10.70.2.2:8080/websocket/message?userId=COLD${date}`
this.SJGWebsocket = new WebSocket(SJGWsUrl)
// WebSocket
@ -424,7 +433,6 @@ export default {
// const wsUrl = 'ws://192.168.1.74:48080/websocket/message?userId=EN111'
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
let date = new Date().valueOf()
console.log(date);
const cutWsUrl = `ws://10.70.2.2:8080/websocket/message?userId=CUTTING${date}`
this.cutWebsocket = new WebSocket(cutWsUrl)
@ -439,46 +447,52 @@ export default {
}
},
funInitWebSocket() {
// if (typeof (WebSocket) === 'undefined') {
// alert('WebSocket')
// } else {
// // const wsUrl = 'ws://192.168.1.74:48080/websocket/message?userId=EN111'
// // const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
// let date = new Date().valueOf()
// const funWsUrl = `ws://10.70.2.2:8080/xc-screen/websocket/${date}`
// this.funWebsocket = new WebSocket(funWsUrl)
// // WebSocket
// this.funWebsocket.onopen = this.funWebsocketOnOpen
// // WebSocket
// this.funWebsocket.onerror = this.funWebsocketOnError
// // WebSocket
// this.funWebsocket.onmessage = this.funWebsocketOnMessage
// // webSocket
// this.funWebsocket.onclose = this.funWebsocketClose
// }
if (typeof (WebSocket) === 'undefined') {
alert('您的浏览器不支持WebSocket')
} else {
// const wsUrl = 'ws://192.168.1.74:48080/websocket/message?userId=EN111'
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
let date = new Date().valueOf()
const funWsUrl = `ws://10.70.180.10:8081/xc-screen/websocket/${date}`
this.funWebsocket = new WebSocket(funWsUrl)
// WebSocket
this.funWebsocket.onopen = this.funWebsocketOnOpen
// WebSocket
this.funWebsocket.onerror = this.funWebsocketOnError
// WebSocket
this.funWebsocket.onmessage = this.funWebsocketOnMessage
// webSocket
this.funWebsocket.onclose = this.funWebsocketClose
}
},
funWebsocketOnOpen() {
console.log('socket连接成功')
// console.log(this.SJGWebsocket.onmessage);
this.SJGWebsocket.onmessage()
},
//
funWebsocketOnError(e) {
console.log('222222', e)
this.funInitWebSocket()
},
//
funWebsocketOnMessage(e) {
// console.log(1111, e)
// console.log(this.wsData)
// console.log('22222', this.wsData.data)
this.funWsData = JSON.parse(e.data)
if (this.funWsData.type === 'FanFrequencyInfo') {
this.funWsData = e?.data ? JSON.parse(e?.data) : {}
// FanInfo
if (this.funWsData.type === 'AnnealFanInfo') {
let arr = []
for (let i in this.funWsData.FanFrequencyInfo) {
for (let i in this.funWsData.data.annealFanInfo) {
arr.push({
equipmentName: i,
status: obj.data.FanFrequencyInfo[i]
status: this.funWsData.data.annealFanInfo[i]
})
}
this.annealFunList = arr
}
if (this.funWsData.type === 'FanInfo') {
let arr = []
for (let i in this.funWsData.data.fanInfo) {
arr.push({
equipmentName: i,
status: this.funWsData.data.fanInfo[i]
})
}
this.funList = arr
@ -486,20 +500,15 @@ export default {
},
cutWebsocketOnOpen() {
console.log('socket连接成功')
// console.log(this.SJGWebsocket.onmessage);
this.SJGWebsocket.onmessage()
},
//
cutWebsocketOnError(e) {
console.log('11111', e)
this.CutInitWebSocket()
},
//
cutWebsocketOnMessage(e) {
// console.log(1111, e)
this.cutWsData = JSON.parse(e.data)
// console.log('22222', this.wsData.data)
console.log('table', this.cutWsData)
this.cutWsData = e?.data ? JSON.parse(e?.data) : {}
if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'table') {
this.cutTableDataList = this.cutWsData.productHourData.map((ele, index) => {
// if (ele.progressRate != 1) {
@ -510,12 +519,11 @@ export default {
size: ele.size,
productArea: ele.productArea + '㎡',
wasteArea: ele.wasteArea + '㎡',
product: (ele.product *100).toFixed + '%'
product: (ele.product * 100).toFixed(2) + '%'
}
// }
});
// console.log(this.orderList)
} else if (this.cutWsData.type === 'cutting' && this.cutWsData.name === 'chart' && this.cutWsData.dateType === 'day') {
let nameList = []
let nameWasteList = []
@ -524,7 +532,8 @@ export default {
let wasteList = []
let sumAreaList = []
let yieldList = []
this.cutTableDataList = this.cutWsData.coldDetData.forEach((ele, index) => {
// this.cutTableDataList =
this.cutWsData.coldDetData.forEach((ele, index) => {
nameList.push(ele.lineName)
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea)
productList.push(ele.productArea)
@ -534,33 +543,22 @@ export default {
yieldList.push((ele.yield *100).toFixed(3))
})
this.$refs.pileChart.initChart(nameList, topNameList, nameWasteList, productList, wasteList)
// console.log(this.cutWsData)
// console.log('chart',nameList, topNameList, nameWasteList, productList, wasteList);
this.$refs.productChart.initChart(nameList, yieldList, sumAreaList)
// this.$refs.pileChart.initWebSocket
// console.log(this.orderList)
}
},
SJGWebsocketOnOpen() {
console.log('socket连接成功')
// console.log(this.SJGWebsocket.onmessage);
this.SJGWebsocket.onmessage()
},
//
SJGWebsocketOnError(e) {
console.log('11111', e)
this.SJGInitWebSocket()
},
//
SJGWebsocketOnMessage(e) {
console.log(e);
// console.log(1111, e)
// let data = { "data": { "FanFrequencyInfo": { "1#10": "0", "1#L": "0", "1#": "44.8", "1#": "40", "1#": "43", "1#": "48", "2#10": "50", "2#L": "49.7", "2#": "0", "2#": "0", "2#": "0", "2#": "48", "3#": "0", "3#": "0", "4#": "40", "4#": "43" } }, "type": "FanFrequencyInfo" }
// let obj = JSON.parse(data.data)
// console.log(obj);
this.SJGWsData = JSON.parse(e.data)
console.log(this.SJGWsData)
// console.log('22222', this.wsData.data)
this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
if (this.SJGWsData.type === 'isra') {
this.ISRAList = this.SJGWsData.detData.map((ele, index) => {
// if (ele.progressRate != 1) {
@ -574,7 +572,6 @@ export default {
}
// }
});
// console.log(this.orderList)
}
},
windowWidth(value) {

Ver fichero

@ -18,7 +18,7 @@
<el-table-column
prop="_pageIndex"
label="序号"
:width="70"
:width="50"
align="center"
/>
<el-table-column

Ver fichero

@ -60,7 +60,6 @@ export default {
data() {
return {
chart: null,
nameList: [],
series: [{
type: 'bar',
data: [],
@ -227,7 +226,7 @@ export default {
},
scale: true,
type: 'value',
name: '产量/', // y
name: '产量/', // y
nameTextStyle: {// y
color: '#fff'
},