|
@@ -2384,7 +2384,7 @@
|
|
<!-- <div>{{this.activeOperateEnd.endDeviceOption.length}}</div>-->
|
|
<!-- <div>{{this.activeOperateEnd.endDeviceOption.length}}</div>-->
|
|
<!-- <div>{{this.activeOperateEnd.endDeviceOption[0].cbAddrOffset}}</div>-->
|
|
<!-- <div>{{this.activeOperateEnd.endDeviceOption[0].cbAddrOffset}}</div>-->
|
|
|
|
|
|
- <el-col class="w-percent-20" v-if="this.activeOperateEnd.endDeviceOption != undefined && this.activeOperateEnd.endDeviceOption[0].cbAddrOffset>0">对应插件偏移量非0才显示
|
|
|
|
|
|
+ <el-col class="w-percent-20" v-if="Array.isArray(this.activeOperateEnd.endDeviceOption) && this.activeOperateEnd.endDeviceOption.length > 0 && this.activeOperateEnd.endDeviceOption[0].cbAddrOffset>0">对应插件偏移量非0才显示
|
|
<el-form-item label="二级地址">
|
|
<el-form-item label="二级地址">
|
|
<custom-input-number class="form-input-s" :watchObj="activeOperateEnd.cbSecondAddr" v-model="activeOperateEnd.cbSecondAddr" :precision="0"></custom-input-number>
|
|
<custom-input-number class="form-input-s" :watchObj="activeOperateEnd.cbSecondAddr" v-model="activeOperateEnd.cbSecondAddr" :precision="0"></custom-input-number>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -7343,16 +7343,20 @@ export default {
|
|
console.log('slave is:',slave);
|
|
console.log('slave is:',slave);
|
|
|
|
|
|
|
|
|
|
- // this.slaveForm.type = "modebusRtu";
|
|
|
|
|
|
+ // this.slaveForm.type = "modebusRtu";
|
|
|
|
+ if (slave && slave.modebusRtu) {
|
|
this.slaveForm.mainComChan = slave.modebusRtu.mainComChan;
|
|
this.slaveForm.mainComChan = slave.modebusRtu.mainComChan;
|
|
this.slaveForm.baud = slave.modebusRtu.baud;
|
|
this.slaveForm.baud = slave.modebusRtu.baud;
|
|
this.slaveForm.slaveid = slave.modebusRtu.slaveid;
|
|
this.slaveForm.slaveid = slave.modebusRtu.slaveid;
|
|
this.slaveForm.rtuUse = slave.modebusRtu.rtuUse;
|
|
this.slaveForm.rtuUse = slave.modebusRtu.rtuUse;
|
|
|
|
+ }
|
|
|
|
|
|
- // this.slaveForm.type = "modebusTcp";
|
|
|
|
|
|
+ // this.slaveForm.type = "modebusTcp";
|
|
|
|
+ if (slave && slave.modebusTcp) {
|
|
this.slaveForm.ipAddress = slave.modebusTcp.ipAddress;
|
|
this.slaveForm.ipAddress = slave.modebusTcp.ipAddress;
|
|
this.slaveForm.port = slave.modebusTcp.port;
|
|
this.slaveForm.port = slave.modebusTcp.port;
|
|
this.slaveForm.tcpUse = slave.modebusTcp.tcpUse;
|
|
this.slaveForm.tcpUse = slave.modebusTcp.tcpUse;
|
|
|
|
+ }
|
|
|
|
|
|
// if (slave && slave.modebusRtu && slave.modebusRtu.type === "modebusRtu") {
|
|
// if (slave && slave.modebusRtu && slave.modebusRtu.type === "modebusRtu") {
|
|
// this.slaveForm.type = "modebusRtu";
|
|
// this.slaveForm.type = "modebusRtu";
|
|
@@ -7380,7 +7384,7 @@ export default {
|
|
this.ammeterList = [];
|
|
this.ammeterList = [];
|
|
this.airProductList = [];
|
|
this.airProductList = [];
|
|
ammeter.map(item => {
|
|
ammeter.map(item => {
|
|
- if (item.universal && item.universal[0]) {
|
|
|
|
|
|
+ if (Array.isArray(item.universal) && item.universal.length > 0) {
|
|
this.ammeterList.push({
|
|
this.ammeterList.push({
|
|
name: item.name,
|
|
name: item.name,
|
|
order: item.order,
|
|
order: item.order,
|
|
@@ -7393,7 +7397,7 @@ export default {
|
|
});
|
|
});
|
|
|
|
|
|
airProducts.map(item => {
|
|
airProducts.map(item => {
|
|
- if (item.universal && item.universal[0]) {
|
|
|
|
|
|
+ if (Array.isArray(item.universal) && item.universal.length > 0) {
|
|
this.airProductList.push({
|
|
this.airProductList.push({
|
|
name: item.name,
|
|
name: item.name,
|
|
order: item.order,
|
|
order: item.order,
|
|
@@ -7406,6 +7410,7 @@ export default {
|
|
});
|
|
});
|
|
|
|
|
|
this.marshaList();
|
|
this.marshaList();
|
|
|
|
+
|
|
//系统可用模式数据读取
|
|
//系统可用模式数据读取
|
|
this.availableModelData = [
|
|
this.availableModelData = [
|
|
{
|
|
{
|