projects/mesxc-zhp #170

Merged
gtz217 merged 3 commits from projects/mesxc-zhp into projects/mesxc-test 2024-01-05 08:46:41 +08:00
4 changed files with 26 additions and 24 deletions
Showing only changes of commit 8b1dbbeeea - Show all commits

View File

@ -1,7 +1,7 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2023-12-29 08:57:36 # @LastEditTime: 2024-01-02 14:42:10
# @LastEditors: zhp # @LastEditors: zhp
# @Description: # @Description:
### ###
@ -13,7 +13,8 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://100.64.0.26:48082' # VUE_APP_BASE_API = 'http://100.64.0.26:48082'
VUE_APP_BASE_API = 'http://10.70.2.2:8080' # VUE_APP_BASE_API = 'http://10.70.2.2:8080'
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.173:48080' # VUE_APP_BASE_API = 'http://192.168.4.173:48080'
# VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080'
# VUE_APP_BASE_API = 'http://192.168.1.49:48082' # VUE_APP_BASE_API = 'http://192.168.1.49:48082'
@ -22,7 +23,8 @@ VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082' # VUE_APP_BASE_API = 'http://192.168.1.104:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082' # VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082' # VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# socket地址
VUE_APP_Socket_API = 'ws://192.168.0.33:48082'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://10.70.2.22:8080' VUE_APP_JIMU_API = 'http://10.70.2.22:8080'

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-12-29 16:41:18 * @LastEditTime: 2024-01-02 10:07:03
* @Description: * @Description:
--> -->
<template> <template>
@ -532,7 +532,7 @@ export default {
let wasteList = [] let wasteList = []
let sumAreaList = [] let sumAreaList = []
let yieldList = [] let yieldList = []
// this.cutTableDataList = // this.cutTableDataList =
this.cutWsData.coldDetData.forEach((ele, index) => { this.cutWsData.coldDetData.forEach((ele, index) => {
nameList.push(ele.lineName) nameList.push(ele.lineName)
topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea) topNameList.push('产线: ' + ele.lineName + ' ' + '总面积:' + ele.sumArea)

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Date: 2020-12-14 09:07:03 * @Date: 2020-12-14 09:07:03
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-12-28 09:00:44 * @LastEditTime: 2024-01-02 16:37:14
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue * @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseTable.vue
* @Description: * @Description:
--> -->
@ -9,11 +9,11 @@
<div class="visual-base-table-container"> <div class="visual-base-table-container">
<el-table <el-table
v-loading="isLoading" v-loading="isLoading"
:header-cell-style="{background:'rgba(4, 74, 132, .19)',color:'#fff'}" :header-cell-style="{background:'rgba(4, 74, 132, .19)',color:'#fff',}"
:row-style="setRowStyle" :row-style="setRowStyle"
:data="renderData" :data="renderData"
border border
style="width: 100%; background: transparent" style="height: 100%; width: 100%; background: transparent"
> >
<el-table-column <el-table-column
prop="_pageIndex" prop="_pageIndex"

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-12-29 15:15:50 * @LastEditTime: 2024-01-02 16:43:05
* @Description: * @Description:
--> -->
<template> <template>
@ -28,22 +28,22 @@
</el-row> </el-row>
<el-row class="container-main flex-col" type="flex"> <el-row class="container-main flex-col" type="flex">
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1"> <el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1">
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
<base-container :title="'设备报警'" :title-icon="'eqAlarm'"> <base-container :title="'设备报警'" :title-icon="'eqAlarm'">
<base-table1 :page="1" :limit="9" :show-index="false" :table-config="qualityYearTableProps" <base-table1 :page="1" :limit="9" :show-index="false" :table-config="qualityYearTableProps"
:table-data="equipmentList" /> :table-data="equipmentList" />
</base-container> </base-container>
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
<base-container :title="'各工序缺陷汇总'" :title-icon="'scrap'"> <base-container :title="'各工序缺陷汇总'" :title-icon="'scrap'">
<base-table1 :page="1" :limit="9" :show-index="false" :table-config="qualityMonthTableProps" <base-table1 :page="1" :limit="9" :show-index="false" :table-config="qualityMonthTableProps"
:table-data="qualityMonthList" /> :table-data="qualityMonthList" />
</base-container> </base-container>
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%" >
<base-container :title="'工单监控'" :title-icon="'eqMonitoring'"> <base-container :height="318" :title="'工单监控'" :title-icon="'eqMonitoring'">
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;"> <!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
<top-radio-group /> <top-radio-group />
</div> --> </div> -->
@ -56,12 +56,12 @@
</el-row> --> </el-row> -->
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: 1em"> <el-row v-for="op in orderList" :key="op.id" style="margin-bottom: 1em">
<!-- <el-col :span="12"> --> <!-- <el-col :span="12"> -->
<el-progress :percentage="op.progressRate * 100" class="custom-progress-bar" /> <el-progress :percentage="op.progressRate * 100" class="custom-progress-bar" />
<!-- <p v-if="op.progressRate === 1" class="now-secondary-title" style="color:#4679FD"> <!-- <p v-if="op.progressRate === 1" class="now-secondary-title" style="color:#4679FD">
<i class="el-icon-check" /> <i class="el-icon-check" />
{{ op.name }} {{ op.name }}
</p> --> </p> -->
<p class="now-secondary-title">{{ op.name }}</p> <p class="now-secondary-title">{{ op.name }}</p>
<!-- </el-col> --> <!-- </el-col> -->
</el-row> </el-row>
<!-- <el-row> <!-- <el-row>
@ -637,9 +637,9 @@ export default {
if (typeof (WebSocket) === 'undefined') { if (typeof (WebSocket) === 'undefined') {
alert('您的浏览器不支持WebSocket') alert('您的浏览器不支持WebSocket')
} else { } else {
const wsUrl = `ws://10.70.2.2:8080/websocket/message?userId=EN${date}`
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
let date = new Date().valueOf() let date = new Date().valueOf()
const wsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=EN${date}`
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
// const wsUrl = 'ws://10.70.2.2:8080/websocket/message?userId=EN111' // const wsUrl = 'ws://10.70.2.2:8080/websocket/message?userId=EN111'
// WebSocket // WebSocket
this.websocket = new WebSocket(wsUrl) this.websocket = new WebSocket(wsUrl)
@ -661,7 +661,8 @@ export default {
// const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG' // const wsUrl = 'ws://192.168.1.104:48082/websocket/message?userId=SJG'
let date = new Date().valueOf() let date = new Date().valueOf()
// console.log(date); // console.log(date);
const SJGWsUrl = `ws://10.70.2.2:8080/websocket/message?userId=SJG${date}` console.log(process.env);
const SJGWsUrl = process.env.VUE_APP_Socket_API + `/websocket/message?userId=SJG${date}`
this.SJGWebsocket = new WebSocket(SJGWsUrl) this.SJGWebsocket = new WebSocket(SJGWsUrl)
// WebSocket // WebSocket
this.SJGWebsocket.onopen = this.SJGWebsocketOnOpen this.SJGWebsocket.onopen = this.SJGWebsocketOnOpen
@ -675,7 +676,7 @@ export default {
}, },
SJGWebsocketOnOpen() { SJGWebsocketOnOpen() {
console.log('socket连接成功') console.log('socket连接成功')
console.log(this.SJGWebsocket.onmessage); // console.log(this.SJGWebsocket.onmessage);
this.SJGWebsocket.onmessage() this.SJGWebsocket.onmessage()
}, },
// //
@ -686,7 +687,7 @@ export default {
// //
SJGWebsocketOnMessage(e) { SJGWebsocketOnMessage(e) {
// console.log(1111, e) // console.log(1111, e)
this.SJGWsData = JSON.parse(e.data) this.SJGWsData = e?.data ? JSON.parse(e?.data) : {}
// console.log(this.wsData.detData); // console.log(this.wsData.detData);
// console.log('22222', this.wsData.data) // console.log('22222', this.wsData.data)
if (this.SJGWsData.type === 'order') { if (this.SJGWsData.type === 'order') {
@ -727,7 +728,6 @@ export default {
} }
}) })
}) })
console.log(Array.from(new Set(nameList)))
// progressRateList = EnergyNameList // progressRateList = EnergyNameList
// let EnergyDataList = [] // let EnergyDataList = []
this.SJGWsData.detData.forEach((ele) => { this.SJGWsData.detData.forEach((ele) => {
@ -741,7 +741,7 @@ export default {
// console.log(this.EnergyMonitoringNameList) // console.log(this.EnergyMonitoringNameList)
// console.log(this.EnergyMonitoringList) // console.log(this.EnergyMonitoringList)
// this.$nextTick(() => { // this.$nextTick(() => {
this.$refs.productLineChart.initChart(nameList, passRateList, outputNumList) this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList)
} }
}, },
// //
@ -765,7 +765,7 @@ export default {
// //
websocketOnMessage(e) { websocketOnMessage(e) {
// console.log(1111, e) // console.log(1111, e)
this.wsData = JSON.parse(e.data) this.wsData = e?.data ? JSON.parse(e?.data) : {}
// console.log('22222', this.wsData.data) // console.log('22222', this.wsData.data)
if (this.wsData.type === 'EnergyMonitoring') { if (this.wsData.type === 'EnergyMonitoring') {
let EnergyNameList = [] let EnergyNameList = []