This commit is contained in:
joylink_cuiweidong 2020-12-09 17:03:39 +08:00
commit dab2a00313

View File

@ -69,8 +69,8 @@
</div> </div>
<el-form ref="signalCiStation1" label-width="130px" :model="ciModelForm" size="mini" :rules="ciModelFormRules" style="margin-top: 15px;"> <el-form ref="signalCiStation1" label-width="130px" :model="ciModelForm" size="mini" :rules="ciModelFormRules" style="margin-top: 15px;">
<el-form-item label="信号机选择:" prop="signalList"> <el-form-item label="信号机选择:" prop="signalList">
<el-select v-model="ciModelForm.signalList" multiple placeholder="请选择"> <el-select v-model="ciModelForm.signalList" multiple filterable placeholder="请选择">
<el-option v-for="item in signalList" :key="item.code" :label="item.name" :value="item.code" /> <el-option v-for="item in filterSignalList" :key="item.code" :label="item.name" :value="item.code" />
</el-select> </el-select>
<el-button <el-button
:type="field == 'signalCodes' ? 'danger' : 'primary'" :type="field == 'signalCodes' ? 'danger' : 'primary'"
@ -296,6 +296,17 @@ export default {
} }
return list; return list;
}, },
//
filterSignalList() {
let list = [];
if (this.signalList && this.signalList.length) {
list = this.signalList.filter(elem => {
return !elem.interlockStationCode;
});
}
console.log(list, '过滤信号机联锁');
return list;
},
form() { form() {
return { return {
labelWidth: '150px', labelWidth: '150px',
@ -348,7 +359,7 @@ export default {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList }, { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList },
{ prop: 'interlockStationCode', label: '所属联锁站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.ciStationList}, { prop: 'interlockStationCode', label: '所属联锁站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.ciStationList},
{ prop: 'uniqueName', label: this.$t('map.signalUniqueName'), type: 'input' }, { prop: 'uniqueName', label: this.$t('map.signalUniqueName'), type: 'input' },
{ prop: 'sectionCode', label: this.$t('map.belongsSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.signalSectionList, hover: this.hover, buttonType: 'signalSection', buttonShowType: this.signalSectionShow }, { prop: 'sectionCode', label: this.$t('map.belongsSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.signalSectionList, hover: this.hover, buttonType: 'signalSection', buttonShowType: this.signalSectionShow },
{ prop: 'sectionOffset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') } { prop: 'sectionOffset', label: this.$t('map.signalOffset'), type: 'number', min: 0, placeholder: this.$t('tip.meter') }