Compare commits

...

7 Commits

8 changed files with 71 additions and 75 deletions

View File

@ -13,7 +13,7 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://100.64.0.26:48082'
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# 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.1.49:48082'
@ -24,7 +24,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
VUE_APP_JIMU_API = 'http://10.70.2.22:8080'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -15,11 +15,11 @@ VUE_APP_TITLE = MES系统
VUE_APP_BASE_API = '/prod-api'
# 积木报表指向地址
VUE_APP_JIMU_API = 'http://10.70.2.22:8080'
VUE_APP_JIMU_API = 'http://10.70.2.2:8080'
# 根据服务器或域名修改
PUBLIC_PATH = 'http://10.70.2.32'
PUBLIC_PATH = ''
# 二级部署路径
# VUE_APP_APP_NAME ='yudao-admin'

View File

@ -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,8 +414,7 @@ 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://192.168.0.30:8888/websocket/message?userId=COLD${date}`
const SJGWsUrl = `ws://10.70.2.2:8080/websocket/message?userId=COLD${date}`
this.SJGWebsocket = new WebSocket(SJGWsUrl)
// WebSocket
this.SJGWebsocket.onopen = this.SJGWebsocketOnOpen
@ -424,8 +433,7 @@ 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://192.168.0.30:8888/websocket/message?userId=CUTTING${date}`
const cutWsUrl = `ws://10.70.2.2:8080/websocket/message?userId=CUTTING${date}`
this.cutWebsocket = new WebSocket(cutWsUrl)
// WebSocket
@ -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) {

View File

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

View File

@ -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'
},

View File

@ -637,10 +637,10 @@ export default {
if (typeof (WebSocket) === 'undefined') {
alert('您的浏览器不支持WebSocket')
} else {
const wsUrl = `ws://192.168.0.33:48082/websocket/message?userId=EN${date}`
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()
// const wsUrl = 'ws://192.168.0.33:48082/websocket/message?userId=EN111'
// const wsUrl = 'ws://10.70.2.2:8080/websocket/message?userId=EN111'
// WebSocket
this.websocket = new WebSocket(wsUrl)
// WebSocket
@ -657,11 +657,11 @@ export default {
if (typeof (WebSocket) === 'undefined') {
alert('您的浏览器不支持WebSocket')
} else {
// const wsUrl = `ws://192.168.0.33:48082/websocket/message?userId=EN${date}`
// 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()
// console.log(date);
const SJGWsUrl = `ws://192.168.0.33:48082/websocket/message?userId=SJG${date}`
const SJGWsUrl = `ws://10.70.2.2:8080/websocket/message?userId=SJG${date}`
this.SJGWebsocket = new WebSocket(SJGWsUrl)
// WebSocket
this.SJGWebsocket.onopen = this.SJGWebsocketOnOpen

View File

@ -82,7 +82,7 @@ export default {
// this.getMes()
// closeWebsocket()
getDcsMsg()
// getMesMsg()
getMesMsg()
console.log('mounted...........')
},
destroyed() {

View File

@ -47,7 +47,7 @@
向世界先进水平挑战为人类社会文明做贡献
</p>
</div>
<video
<!-- <video
src="/static/videos/login.webm"
muted
autoplay
@ -58,7 +58,7 @@
top: 28%;
width: 100%;
height: 70%;
"></video>
"></video> -->
</div>
<!-- 表单 -->
<div class="field">