fix:舞台监控

This commit is contained in:
2024-04-01 15:13:56 +08:00
parent 47c4895b66
commit cab9306336
9 changed files with 62 additions and 17 deletions

Binary file not shown.

BIN
acs2/nladmin-ui/dist.zip Normal file

Binary file not shown.

View File

@@ -220,6 +220,29 @@
<el-button type="primary" @click="dialogSave">{{ $t('auto.common.Confirm') }}</el-button>
</div>
</el-dialog>
<el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible10" width="35%">
<el-form :model="form" size="small">
<el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true" />
</el-form-item>
<el-form-item :label="$t('monitor.click.bar_code')" label-width="120px">
<el-input v-model="form.hand_barcode" :disabled="false" />
</el-form-item>
<el-form-item :label="$t('monitor.click.material_code')" label-width="120px">
<el-input v-model="form.hand_material_barcode" :disabled="false" />
</el-form-item>
<el-form-item :label="$t('monitor.click.request_flag')" prop="requireSucess" label-width="120px">
<el-radio-group v-model="form.requireSucess">
<el-radio-button :label="0"> {{ $t('auto.common.false') }}</el-radio-button>
<el-radio-button :label="1">{{ $t('auto.common.true') }}</el-radio-button>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible10 = false">{{ $t('auto.common.Cancel') }}</el-button>
<el-button type="primary" @click="dialogSave">{{ $t('auto.common.Confirm') }}</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -229,6 +252,7 @@ import deviceCrud from '@/api/acs/device/device'
import { getDeviceByCodes } from '@/api/acs/device/deviceStageMonitor'
import '@logicflow/core/dist/style/index.css'
import '@logicflow/extension/lib/style/index.css'
import paramCrud from '@/api/system/param'
import { LogicFlow } from '@logicflow/core'
import { registerCustomElement } from '@/views/system/logicflow/editor/components/node'
@@ -265,6 +289,7 @@ export default {
hasGoodStatus: null,
barcode: '',
hand_barcode: '',
hand_material_barcode: '',
suspended: null,
material_type: '',
requireSucess: '',
@@ -416,6 +441,8 @@ export default {
this.dialogFormVisible8 = true
} else if (clickObj.data.driver_type === 'pull_head_manipulator') {
this.dialogFormVisible9 = true
} else if (clickObj.data.driver_type === 'conveyor_with_scanner_weight') {
this.dialogFormVisible10 = true
} else {
this.dialogFormVisible = true
}
@@ -446,7 +473,7 @@ export default {
}
this.arr = [] // 清空
if (item.device_code && item.data) {
// console.log('item', item)
console.log('item', item)
this.arr = [
{ name: i18n.t('monitor.click.equipment_number'), value: item.device_code },
{ name: i18n.t('monitor.click.device_name'), value: item.device_name }
@@ -626,7 +653,7 @@ export default {
const obj = { name: i18n.t('monitor.click.inventory_quantity'), value: data[val] }
this.arr.push(obj)
} else if (val === 'hand_barcode') {
const obj = { name: 'barcode', value: data[val] }
const obj = { name: 'hand_barcode', value: data[val] }
this.arr.push(obj)
} else if (val === 'x') {
const obj = { name: 'X', value: data[val] }
@@ -715,6 +742,7 @@ export default {
this.dialogFormVisible7 = false
this.dialogFormVisible8 = false
this.dialogFormVisible9 = false
this.dialogFormVisible10 = false
this.initStageData()
}).catch(err => {
this.dialogFormVisible = false
@@ -724,6 +752,7 @@ export default {
this.dialogFormVisible7 = false
this.dialogFormVisible8 = false
this.dialogFormVisible9 = false
this.dialogFormVisible10 = false
console.log(err.response.data.message)
})
},
@@ -736,6 +765,20 @@ export default {
this.dialogFormVisible1 = false
console.log(err.response.data.message)
})
},
initStageData() {
// 获取舞台编码
if (this.stage_code !== '') {
crudStage.getNewStageDataByCode(this.stage_code).then(res => { // 通过舞台编码获取舞台数据并且赋值到lf对象
data = JSON.parse(res.stage_data)
lf.render(data)
this.initStatus() // 初始化状态
})
}
// this.timer = setInterval(() => { // 定时刷新设备的状态信息
// console.log('定时器启动')
// this.initStatus()
// }, 2000)
}
}
}
@@ -780,22 +823,24 @@ body {
background: #e5e5e5;
}
::v-deep.el-radio-button{
::v-deep.el-radio-button {
margin-right: 15px;
border-radius:4px;
border-radius: 4px;
}
.el-radio-button__inner {
width: 90px;
height: 30px;
background: #F7F8FA;
color: #333;
border: 0 !important;
}
.el-radio-button__orig-radio:checked + .el-radio-button__inner {
color: #fff;
background-color: blue;
border-color: blue;
box-shadow: -1px 0 0 0 blue;
}
.el-radio-button__inner {
width: 90px;
height: 30px;
background: #F7F8FA;
color:#333;
border: 0 !important;
}
.el-radio-button__orig-radio:checked + .el-radio-button__inner {
color: #fff;
background-color: blue;
border-color: blue;
box-shadow: -1px 0 0 0 blue;
}
</style>