add:modbus
This commit is contained in:
@@ -49,6 +49,28 @@
|
||||
</div>
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-tooltip class="item" effect="dark" content="设备含有光电时,需配置Ip地址" placement="bottom-end">
|
||||
|
||||
<el-form-item label="IP地址" label-width="150px">
|
||||
<el-input v-model="form.ipAddress" />
|
||||
</el-form-item>
|
||||
</el-tooltip>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-tooltip class="item" effect="dark" content="设备含有光电时,需配置,一个IP对应8个PLC信号" placement="bottom-end">
|
||||
<el-form-item label="索引号" label-width="150px">
|
||||
<el-input
|
||||
v-model.number="form.index"
|
||||
:maxlength="1"
|
||||
type="number"
|
||||
@input="validateInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电气调度号" label-width="150px">
|
||||
<el-input v-model="form.OPCServer" />
|
||||
@@ -98,6 +120,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申请空托">
|
||||
<el-switch v-model="form.applyFlag" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
@@ -332,7 +361,10 @@ export default {
|
||||
manual_create_task: true,
|
||||
is_pickup: true,
|
||||
is_release: true,
|
||||
link_device_code: []
|
||||
link_device_code: [],
|
||||
ipAddress: '',
|
||||
index: '',
|
||||
applyFlag: ''
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
@@ -541,6 +573,14 @@ export default {
|
||||
item.code = this.opc_code + '.' + this.plc_code + '.' + this.device_code + '.' + item.code
|
||||
}
|
||||
})
|
||||
},
|
||||
validateInput(value) {
|
||||
const num = parseInt(value, 10)
|
||||
if (num < 1 || num > 8) {
|
||||
this.form.index = 1
|
||||
} else {
|
||||
this.form.index = num
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,31 @@
|
||||
</div>
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
|
||||
<el-tooltip class="item" effect="dark" content="设备含有光电时,需配置Ip地址" placement="bottom-end">
|
||||
|
||||
<el-form-item label="IP地址" label-width="150px">
|
||||
<el-input v-model="form.ipAddress" />
|
||||
</el-form-item>
|
||||
</el-tooltip>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-tooltip class="item" effect="dark" content="设备含有光电时,需配置,一个IP对应8个PLC信号" placement="bottom-end">
|
||||
<el-form-item label="索引号" label-width="150px">
|
||||
<el-input
|
||||
v-model.number="form.index"
|
||||
:maxlength="1"
|
||||
type="number"
|
||||
@input="validateInput"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-tooltip class="item" effect="dark" content="设备为输送机或者NDC系统时需为数字" placement="bottom-end">
|
||||
|
||||
<el-form-item label="电气调度号" label-width="150px">
|
||||
<el-input v-model="form.address" />
|
||||
</el-form-item>
|
||||
@@ -168,7 +191,9 @@ export default {
|
||||
is_release: true,
|
||||
station_manager: true,
|
||||
auto_clean_task: true,
|
||||
input_material: true
|
||||
input_material: true,
|
||||
ipAddress: '',
|
||||
index: ''
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
@@ -210,6 +235,14 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
validateInput(value) {
|
||||
const num = parseInt(value, 10)
|
||||
if (num < 1 || num > 8) {
|
||||
this.form.index = 1
|
||||
} else {
|
||||
this.form.index = num
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user