设备监控、采购件入库

This commit is contained in:
zhangdingyu
2019-10-10 11:29:43 +08:00
parent 12fa29bc00
commit aa27408b54
3 changed files with 582 additions and 12 deletions

View File

@@ -491,20 +491,18 @@
</el-row>
</div>
</el-tooltip>
<el-tooltip :enterable="false" :id="机床总装" placement="top" @mouseover.native.prevent="changeActive($event)">
<div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}</div>
<el-tooltip :id="机床总装" placement="bottom" @mouseover.native.prevent="changeActive($event)">
<div slot="content" style="max-height: 200px;overflow: auto" v-html="returns1"/>
<div :title="tooltip" style="position: relative;left:520px;top:-1170px; width: 100px;height: 28px;">
<el-row>
<!--<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>
</el-row>
</div>
</el-tooltip>
<el-tooltip :enterable="false" :id="部件装配" placement="top" @mouseover.native.prevent="changeActive($event)">
<div slot="content">{{ tooltip1 }}<br>{{ tooltip2 }}<br>{{ tooltip3 }}</div>
<el-tooltip :id="部件装配" placement="bottom" @mouseover.native.prevent="changeActive($event)">
<div slot="content" style="max-height: 200px;overflow: auto" v-html="returns2"/>
<div :title="tooltip" style="position: relative;left:660px;top:-1198px; width: 100px;height: 28px;">
<el-row>
<!--<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>
</el-row>
</div>
@@ -515,12 +513,14 @@
<script>
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, getZongzhuang, getBuzhuang } from '@/api/ManufacturingCenter/EquipmentMonitoring'
import { wsuri, name3 } from '@/utils/request'
import { mapGetters } from 'vuex' // 暂无用
export default {
data() {
return {
returns1: '',
returns2: '',
fang: '_fang',
circle: '_circle',
tooltip: '',
@@ -583,12 +583,12 @@ export default {
opname: ''
}
},
computed: {
computed: { // 暂无用
...mapGetters([
'sidebar'
])
},
watch: {
watch: { // 暂无用
sidebar(val) {
console.log(val)
}
@@ -672,10 +672,32 @@ export default {
this.tooltip1 = ''
this.tooltip2 = ''
this.tooltip3 = ''
this.returns1 = ''
this.returns2 = ''
if ($event.path[2].id === '机床总装') {
this.tooltip1 = '无装配机床'
getZongzhuang().then(res2 => {
if (res2.data.length !== 0) {
this.returns1 = '<div slot="content">'
for (let i = 0; i < res2.data.length; i++) {
this.returns1 = this.returns1 + res2.data[i].机床图号 + '<br>'
}
this.returns1 = this.returns1 + '</div>'
} else {
this.returns1 = '<div slot="content">无总装机床</div>'
}
})
} else if ($event.path[2].id === '部件装配') {
this.tooltip1 = '无装配部件'
getBuzhuang().then(res3 => {
if (res3.data.length !== 0) {
this.returns2 = '<div slot="content">'
for (let i = 0; i < res3.data.length; i++) {
this.returns2 = this.returns2 + res3.data[i].机床图号 + '&nbsp;&nbsp;&nbsp;' + res3.data[i].任务名称 + '<br>'
}
this.returns2 = this.returns2 + '</div>'
} else {
this.returns2 = '<div slot="content">无装配部件</div>'
}
})
} else if ($event.path[2].id === 'OP1470') {
searchtooltip($event.path[2].id).then(response => {
if (response.data[0].工艺计划流水号 === 0 || response.data[0].工艺计划流水号 === null) {