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://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.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'
@ -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_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 VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -15,11 +15,11 @@ VUE_APP_TITLE = MES系统
VUE_APP_BASE_API = '/prod-api' 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' # VUE_APP_APP_NAME ='yudao-admin'

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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