设备监控

This commit is contained in:
zhangdingyu
2019-10-09 18:32:32 +08:00
parent f1e03ad39b
commit fe63ee9d16

View File

@@ -463,48 +463,48 @@
</el-tooltip> </el-tooltip>
<el-tooltip :enterable="false" :id="OPNAME146" placement="top" @mouseover.native.prevent="changeActive($event)"> <el-tooltip :enterable="false" :id="OPNAME146" placement="top" @mouseover.native.prevent="changeActive($event)">
<div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}<br>单击查看MES系统</div> <div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}<br>单击查看MES系统</div>
<div :id="OPNAME146" :title="tooltip" style="position: relative;left:1450px;top:-1057px; width: 100px;height: 28px;" @click="opclickshowPanel($event)"> <div :id="OPNAME146" :title="tooltip" style="position: relative;left:1460px;top:-1057px; width: 100px;height: 28px;" @click="opclickshowPanel($event)">
<el-row> <el-row>
<!--<div :id="OPNAME135+fang" class="fang"/>--> <!--<div :id="OPNAME135+fang" class="fang"/>-->
<div :id="OPNAME146+circle" class="circle" style="margin-left: 13px"/> <!--<div :id="OPNAME146+circle" class="circle" style="margin-left: 13px"/>-->
<div style="float: left;text-align: center;width: 50px;line-height: 12px;font-size: 15px;font-weight: bold;margin-left: 3px">{{ OPNAME146 }}</div> <div style="float: left;text-align: center;width: 50px;line-height: 12px;font-size: 15px;font-weight: bold;margin-left: 3px">{{ OPNAME146 }}</div>
</el-row> </el-row>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip :enterable="false" :id="OPNAME148" placement="top" @mouseover.native.prevent="changeActive($event)"> <el-tooltip :enterable="false" :id="OPNAME148" placement="top" @mouseover.native.prevent="changeActive($event)">
<div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}<br>单击查看MES系统</div> <div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}<br>单击查看MES系统</div>
<div :id="OPNAME148" :title="tooltip" style="position: relative;left:1568px;top:-1085px; width: 100px;height: 28px;" @click="opclickshowPanel($event)"> <div :id="OPNAME148" :title="tooltip" style="position: relative;left:1578px;top:-1085px; width: 100px;height: 28px;" @click="opclickshowPanel($event)">
<el-row> <el-row>
<!--<div :id="OPNAME135+fang" class="fang"/>--> <!--<div :id="OPNAME135+fang" class="fang"/>-->
<div :id="OPNAME148+circle" class="circle" style="margin-left: 13px"/> <!--<div :id="OPNAME148+circle" class="circle" style="margin-left: 13px"/>-->
<div style="float: left;text-align: center;width: 50px;line-height: 12px;font-size: 15px;font-weight: bold;margin-left: 3px">{{ OPNAME148 }}</div> <div style="float: left;text-align: center;width: 50px;line-height: 12px;font-size: 15px;font-weight: bold;margin-left: 3px">{{ OPNAME148 }}</div>
</el-row> </el-row>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip :enterable="false" :id="OPNAME147" placement="top" @mouseover.native.prevent="changeActive($event)"> <el-tooltip :enterable="false" :id="OPNAME147" placement="top" @mouseover.native.prevent="changeActive($event)">
<div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}<br>单击查看MES系统</div> <div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}<br>单击查看MES系统</div>
<div :title="tooltip" style="position: relative;left:1336px;top:-548px; width: 100px;height: 28px;" @click="opclickshowPanel($event)"> <div :title="tooltip" style="position: relative;left:1346px;top:-548px; width: 100px;height: 28px;" @click="opclickshowPanel($event)">
<el-row> <el-row>
<div style="float: left;text-align: center;width: 60px;line-height: 12px;font-size: 15px;font-weight: bold">{{ OPNAME147 }}</div> <div style="float: left;text-align: center;width: 60px;line-height: 12px;font-size: 15px;font-weight: bold">{{ OPNAME147 }}</div>
<div :id="OPNAME147+circle" class="circle"/> <!--<div :id="OPNAME147+circle" class="circle"/>-->
<!--<div :id="OPNAME117+fang" class="fang" style="margin-left: 9px"/>--> <!--<div :id="OPNAME117+fang" class="fang" style="margin-left: 9px"/>-->
</el-row> </el-row>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip :enterable="false" :id="机床总装" placement="top" @mouseover.native.prevent="changeActive($event)"> <el-tooltip :enterable="false" :id="机床总装" placement="top" @mouseover.native.prevent="changeActive($event)">
<div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}</div> <div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}</div>
<div :title="tooltip" style="position: relative;left:510px;top:-1170px; width: 100px;height: 28px;"> <div :title="tooltip" style="position: relative;left:520px;top:-1170px; width: 100px;height: 28px;">
<el-row> <el-row>
<div :id="机床总装+circle" class="circle" style="margin-left: 13px"/> <!--<div :id="机床总装+circle" class="circle" style="margin-left: 13px"/>-->
<div style="float: left;text-align: center;width: 60px;line-height: 12px;font-size: 15px;font-weight: bold;margin-left: 3px">{{ 机床总装 }}</div> <div style="float: left;text-align: center;width: 60px;line-height: 12px;font-size: 15px;font-weight: bold;margin-left: 3px">{{ 机床总装 }}</div>
</el-row> </el-row>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip :enterable="false" :id="部件装配" placement="top" @mouseover.native.prevent="changeActive($event)"> <el-tooltip :enterable="false" :id="部件装配" placement="top" @mouseover.native.prevent="changeActive($event)">
<div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}</div> <div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}</div>
<div :title="tooltip" style="position: relative;left:650px;top:-1198px; width: 100px;height: 28px;"> <div :title="tooltip" style="position: relative;left:660px;top:-1198px; width: 100px;height: 28px;">
<el-row> <el-row>
<div :id="部件装配+circle" class="circle" style="margin-left: 13px"/> <!--<div :id="部件装配+circle" class="circle" style="margin-left: 13px"/>-->
<div style="float: left;text-align: center;width: 60px;line-height: 12px;font-size: 15px;font-weight: bold;margin-left: 3px">{{ 部件装配 }}</div> <div style="float: left;text-align: center;width: 60px;line-height: 12px;font-size: 15px;font-weight: bold;margin-left: 3px">{{ 部件装配 }}</div>
</el-row> </el-row>
</div> </div>
@@ -515,6 +515,7 @@
<script> <script>
import $ from 'jquery' import $ from 'jquery'
import { mapGetters } from 'vuex'
import { getwork_state, getOP_state, searchtooltip, getOP_state2, getDaijiagong } from '@/api/ManufacturingCenter/EquipmentMonitoring' import { getwork_state, getOP_state, searchtooltip, getOP_state2, getDaijiagong } from '@/api/ManufacturingCenter/EquipmentMonitoring'
import { wsuri, name3 } from '@/utils/request' import { wsuri, name3 } from '@/utils/request'
export default { export default {
@@ -582,6 +583,16 @@ export default {
opname: '' opname: ''
} }
}, },
computed: {
...mapGetters([
'sidebar'
])
},
watch: {
sidebar(val) {
console.log(val)
}
},
mounted() { mounted() {
this.connect() this.connect()
// this.getwork_state() // this.getwork_state()
@@ -680,9 +691,41 @@ export default {
this.tooltip1 = '设备名称:' + response.data[0].设备名称 this.tooltip1 = '设备名称:' + response.data[0].设备名称
this.tooltip3 = '正在热处理:' + response.data[0].零件图号_零件工艺计划 this.tooltip3 = '正在热处理:' + response.data[0].零件图号_零件工艺计划
} }
getOP_state2($event.path[2].id).then(res => { this.tooltip2 = ''
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 = '设备状态:报警' } })
}) } else if ($event.path[2].id === 'OP1460') {
searchtooltip($event.path[2].id).then(response => {
if (response.data[0].工艺计划流水号 === 0 || response.data[0].工艺计划流水号 === null) {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
getDaijiagong($event.path[2].id).then(res1 => {
if (res1.data.length !== 0) {
this.tooltip3 = '待处理零件:' + res1.data[0].零件图号
} else {
this.tooltip3 = '无零件待处理'
}
})
} else {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
this.tooltip3 = '正在处理:' + response.data[0].零件图号_零件工艺计划
}
this.tooltip2 = ''
})
} else if ($event.path[2].id === 'OP1480') {
searchtooltip($event.path[2].id).then(response => {
if (response.data[0].工艺计划流水号 === 0 || response.data[0].工艺计划流水号 === null) {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
getDaijiagong($event.path[2].id).then(res1 => {
if (res1.data.length !== 0) {
this.tooltip3 = '待处理零件:' + res1.data[0].零件图号
} else {
this.tooltip3 = '无零件待处理'
}
})
} else {
this.tooltip1 = '设备名称:' + response.data[0].设备名称
this.tooltip3 = '正在处理:' + response.data[0].零件图号_零件工艺计划
}
this.tooltip2 = ''
}) })
} else { } else {
searchtooltip($event.path[2].id).then(response => { searchtooltip($event.path[2].id).then(response => {