代码调整

This commit is contained in:
dong 2022-09-14 11:09:25 +08:00
parent af30f5d08c
commit a33c796bbc
2 changed files with 30 additions and 0 deletions

View File

@ -92,6 +92,18 @@ export default {
{label:'蓝', value:10},
{label:'白', value:11},
{label:'红闪', value:12}
],
SwitchIndication: [// N- R- NO-() EX-
{ label: '定位', value: 'N' },
{ label: '反位', value: 'R' },
{ label: '失表', value: 'NO' },
{ label: '挤叉', value: 'EX' }
],
DriveMode: [
{ label: '自动驾驶模式', value: 'AM' },
{ label: '人工驾驶模式', value: 'CM' },
{ label: '限制人工驾驶模式', value: 'RM' },
{ label: '非限制人工驾驶模式', value: 'NRM' }
]
}
};

View File

@ -64,6 +64,17 @@
:value="option.value"
/>
</el-select>
<div v-else-if="valueType == 'SECTION'">
<el-select v-model="formModel.v" placeholder="请选择值" size="mini">
<el-option
v-for="option in getSectionList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
<el-button :type="field == 'v' ? 'danger' : 'primary'" size="mini" @click="hover('v')">激活</el-button>
</div>
<el-input-number v-else-if="valueType=='int'" v-model="formModel.v" size="mini" style="width: 180px" />
<el-input v-else v-model="formModel.v" size="mini" style="width: 180px" />
</el-form-item>
@ -137,6 +148,13 @@ export default {
}
return type;
},
getSectionList() { //
let list = [];
list = this.getDeviceList.filter(item => {
return item._type == 'Section';
});
return list;
},
valueType() {
let type = '';
const findObj = this.getAttributeList.find(item => {