设备监控

This commit is contained in:
zhangdingyu
2019-10-11 10:17:04 +08:00
parent 599e91a2d1
commit 652840b734

View File

@@ -677,7 +677,7 @@ export default {
if ($event.path[2].id === '机床总装') {
getZongzhuang().then(res2 => {
if (res2.data.length !== 0) {
this.returns1 = '<div slot="content">'
this.returns1 = '<div slot="content">总装机床:<br>'
for (let i = 0; i < res2.data.length; i++) {
this.returns1 = this.returns1 + res2.data[i].机床图号 + '<br>'
}
@@ -689,7 +689,7 @@ export default {
} else if ($event.path[2].id === '部件装配') {
getBuzhuang().then(res3 => {
if (res3.data.length !== 0) {
this.returns2 = '<div slot="content">'
this.returns2 = '<div slot="content">部件装配:<br>'
for (let i = 0; i < res3.data.length; i++) {
this.returns2 = this.returns2 + res3.data[i].机床图号 + '&nbsp;&nbsp;&nbsp;' + res3.data[i].任务名称 + '<br>'
}
@@ -704,14 +704,14 @@ export default {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
getDaijiagong($event.path[2].id).then(res1 => {
if (res1.data.length !== 0) {
this.tooltip3 = '热处理零件:' + res1.data[0].零件图号
this.tooltip3 = '热处理零件:' + res1.data[0].零件图号
} else {
this.tooltip3 = '无零件热处理'
this.tooltip3 = '无'
}
})
} else {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
this.tooltip3 = '正在热处理:' + response.data[0].零件图号_零件工艺计划
this.tooltip3 = '热处理零件' + response.data[0].零件图号_零件工艺计划
}
this.tooltip2 = ''
})
@@ -721,14 +721,14 @@ export default {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
getDaijiagong($event.path[2].id).then(res1 => {
if (res1.data.length !== 0) {
this.tooltip3 = '处理零件:' + res1.data[0].零件图号
this.tooltip3 = '处理零件:' + res1.data[0].零件图号
} else {
this.tooltip3 = '无零件待处理'
this.tooltip3 = '无'
}
})
} else {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
this.tooltip3 = '正在处理:' + response.data[0].零件图号_零件工艺计划
this.tooltip3 = '处理零件' + response.data[0].零件图号_零件工艺计划
}
this.tooltip2 = ''
})
@@ -738,14 +738,14 @@ export default {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
getDaijiagong($event.path[2].id).then(res1 => {
if (res1.data.length !== 0) {
this.tooltip3 = '处理零件:' + res1.data[0].零件图号
this.tooltip3 = '处理零件:' + res1.data[0].零件图号
} else {
this.tooltip3 = '无零件待处理'
this.tooltip3 = '无'
}
})
} else {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
this.tooltip3 = '正在处理:' + response.data[0].零件图号_零件工艺计划
this.tooltip3 = '处理零件' + response.data[0].零件图号_零件工艺计划
}
this.tooltip2 = ''
})
@@ -755,14 +755,14 @@ export default {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
getDaijiagong($event.path[2].id).then(res1 => {
if (res1.data.length !== 0) {
this.tooltip3 = '加工零件:' + res1.data[0].零件图号
this.tooltip3 = '加工零件:' + res1.data[0].零件图号
} else {
this.tooltip3 = '无加工零件'
this.tooltip3 = '无'
}
})
} else {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
this.tooltip3 = '正在加工零件:' + response.data[0].零件图号_零件工艺计划
this.tooltip3 = '加工零件:' + response.data[0].零件图号_零件工艺计划
}
getOP_state2($event.path[2].id).then(res => {
if (res.data[0].状态代码 === '1') { this.tooltip2 = '设备状态:关机' } else if (res.data[0].状态代码 === '2') { this.tooltip2 = '设备状态:等待' } else if (res.data[0].状态代码 === '3') { this.tooltip2 = '设备状态:运行' } else if (res.data[0].状态代码 === '4') { this.tooltip2 = '设备状态:报警' }