add:三色灯
This commit is contained in:
@@ -75,11 +75,11 @@ import { get, selectDriverCodeList } from '@/api/acs/device/driverConfig'
|
||||
import { getDicts } from '@/api/system/dict'
|
||||
import standard_inspect_site from './driver/standard_inspect_site'
|
||||
import standard_ordinary_site from './driver/standard_ordinary_site'
|
||||
import lamp_three_color from './driver/lamp_three_color'
|
||||
import standard_storage from '@/views/acs/device/driver/standard_storage'
|
||||
import standard_scanner from '@/views/acs/device/driver/standard_scanner'
|
||||
import standard_conveyor_control_with_scanner from '@/views/acs/device/driver/standard_conveyor_control_with_scanner'
|
||||
import standard_conveyor_control from '@/views/acs/device/driver/standard_conveyor_control'
|
||||
import lamp_three_color from '@/views/acs/device/driver/lamp_three_color'
|
||||
import standard_conveyor_monitor from '@/views/acs/device/driver/standard_conveyor_monitor'
|
||||
import lnsh_mixing_mill from '@/views/acs/device/driver/lnsh/lnsh_mixing_mill'
|
||||
import lnsh_press from '@/views/acs/device/driver/lnsh/lnsh_press'
|
||||
|
||||
@@ -1,6 +1,50 @@
|
||||
<template>
|
||||
<!--三色灯-->
|
||||
<div>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span">扩展字段:</span>
|
||||
</div>
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否清除车号" label-width="150px">
|
||||
<el-select
|
||||
v-model="form.is_clean"
|
||||
placeholder="无"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.is_yes_not"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="颜色" label-width="150px">
|
||||
<el-select
|
||||
v-model="form.color"
|
||||
placeholder="无"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in colorList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span">设备协议:</span>
|
||||
@@ -13,6 +57,7 @@
|
||||
v-model="opc_id"
|
||||
placeholder="无"
|
||||
clearable
|
||||
filterable
|
||||
@change="changeOpc"
|
||||
>
|
||||
<el-option
|
||||
@@ -158,6 +203,7 @@ import deviceCrud from '@/api/acs/device/device'
|
||||
|
||||
export default {
|
||||
name: 'LampThreeColor',
|
||||
dicts: ['is_yes_not'],
|
||||
mixins: [crud],
|
||||
props: {
|
||||
parentForm: {
|
||||
@@ -175,6 +221,10 @@ export default {
|
||||
opc_code: '',
|
||||
configLoading: false,
|
||||
dataOpcservers: [],
|
||||
colorList: [
|
||||
{ 'label': '红色', 'value': '3' },
|
||||
{ 'label': '绿色', 'value': '4' }
|
||||
],
|
||||
dataOpcPlcs: [],
|
||||
deviceList: [],
|
||||
data1: [],
|
||||
@@ -220,7 +270,7 @@ export default {
|
||||
this.data2 = data.ws
|
||||
this.sliceItem()
|
||||
})
|
||||
selectPlcList().then(data => {
|
||||
selectPlcList().then(data => {updateConfig
|
||||
this.dataOpcPlcs = data
|
||||
this.plc_id = this.$props.parentForm.opc_plc_id
|
||||
})
|
||||
@@ -285,6 +335,15 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
test_read2() {
|
||||
testRead(this.data2, this.opc_id).then(data => {
|
||||
this.data2 = data
|
||||
console.log(this.data2)
|
||||
this.notify('操作成功!', 'success')
|
||||
}).catch(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
test_read1() {
|
||||
testRead(this.data1, this.opc_id).then(data => {
|
||||
this.data1 = data
|
||||
@@ -300,15 +359,6 @@ export default {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
test_read2() {
|
||||
testRead(this.data2, this.opc_id).then(data => {
|
||||
this.data2 = data
|
||||
console.log(this.data2)
|
||||
this.notify('操作成功!', 'success')
|
||||
}).catch(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
doSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
@@ -318,7 +368,7 @@ export default {
|
||||
parentForm.is_route = true
|
||||
parentForm.plc_id = this.plc_id
|
||||
parentForm.opc_id = this.opc_id
|
||||
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
|
||||
updateConfig(parentForm, this.form, {}, this.data1, this.data2).then(res => {
|
||||
this.notify('保存成功', 'success')
|
||||
this.configLoading = false
|
||||
}).catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user