add:临时通道移库
This commit is contained in:
@@ -1,5 +1,47 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row style="padding-top: 10px;padding-left: 10px;padding-bottom: 30px">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="100px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="发货区层数">
|
||||
<el-select
|
||||
v-model="stageParam"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="changeStage"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in layerList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="有货点位">
|
||||
<el-input
|
||||
v-model="numData.haveMoney"
|
||||
disabled
|
||||
style="width: 80px"
|
||||
size="mini"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="无货点位">
|
||||
<el-input
|
||||
v-model="numData.unMoney"
|
||||
disabled
|
||||
style="width: 80px"
|
||||
size="mini"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div id="container" className="container" />
|
||||
</el-row>
|
||||
@@ -56,7 +98,7 @@ import '@logicflow/extension/lib/style/index.css'
|
||||
|
||||
import { LogicFlow } from '@logicflow/core'
|
||||
import { registerCustomElement } from '@/views/system/logicflow/editor/components/node'
|
||||
import { getStructByCodesFs, unLockPoint } from '@/views/system/monitor/device/structStage'
|
||||
import { getStructByCodesFs, unLockPoint, queryNum } from '@/views/system/monitor/device/structStage'
|
||||
let data = {}
|
||||
let lf = ''
|
||||
export default {
|
||||
@@ -82,11 +124,21 @@ export default {
|
||||
},
|
||||
allStructMsg: [],
|
||||
msgTop: '200px',
|
||||
msgLeft: '200px'
|
||||
msgLeft: '200px',
|
||||
layerList: [
|
||||
{ 'label': '发货1层', 'value': 'FS_1' },
|
||||
{ 'label': '发货2层', 'value': 'FS_2' }
|
||||
],
|
||||
numData: {
|
||||
haveMoney: null,
|
||||
unMoney: null
|
||||
},
|
||||
layerNum: '1'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
this.queryNum()
|
||||
},
|
||||
beforeDestroy() {
|
||||
// js提供的clearInterval方法用来清除定时器
|
||||
@@ -176,10 +228,12 @@ export default {
|
||||
this.timer = setInterval(() => { // 定时刷新设备的状态信息
|
||||
console.log('定时器启动')
|
||||
this.initStatus()
|
||||
this.queryNum()
|
||||
}, 10000)
|
||||
},
|
||||
initStatus() { // 初始化数据
|
||||
let resion = {}
|
||||
debugger
|
||||
resion = lf.getGraphData().nodes.map(item => ({ id: item.id, struct_id: item.properties.struct_id }))
|
||||
getStructByCodesFs(resion).then(res => {
|
||||
this.allStructMsg = res
|
||||
@@ -231,6 +285,10 @@ export default {
|
||||
const obj = { name: '木箱总重', value: data1[val] }
|
||||
this.arr.push(obj)
|
||||
}
|
||||
if (val === 'container_weight' && data1.container_weight) {
|
||||
const obj = { name: '子卷净重', value: data1[val] }
|
||||
this.arr.push(obj)
|
||||
}
|
||||
}
|
||||
if (data.length > 1) { // 显示子卷
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
@@ -264,11 +322,27 @@ export default {
|
||||
unLockPoint(this.form).then(res => {
|
||||
this.dialogFormVisible1 = false
|
||||
this.initStageData()
|
||||
this.queryNum()
|
||||
this.$message({
|
||||
message: '解绑成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
},
|
||||
changeStage(value) {
|
||||
if (value === 'FS_1') {
|
||||
this.layerNum = '1'
|
||||
} else if (value === 'FS_2') {
|
||||
this.layerNum = '2'
|
||||
}
|
||||
this.initStageData()
|
||||
this.queryNum()
|
||||
},
|
||||
queryNum() {
|
||||
queryNum({ 'layer_num': this.layerNum }).then(res => {
|
||||
this.numData.haveMoney = res.haveMoney
|
||||
this.numData.unMoney = res.unMoney
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user