调整信号机字段调整
This commit is contained in:
parent
d1fdb7af5c
commit
179ad8fa1d
@ -80,30 +80,20 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestCentralControl.choose.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestStationControl.choose.domId;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestCentralControl.choose.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestStationControl.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
return '站遥控转换';
|
||||
@ -298,10 +288,10 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -66,6 +66,25 @@
|
||||
<div class="flex_box">
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setCiStationSignal">设置</el-button>
|
||||
</div>
|
||||
<el-form ref="signalCiStation1" label-width="130px" :model="ciModelForm" size="mini" :rules="ciModelFormRules" style="margin-top: 15px;">
|
||||
<el-form-item label="信号机选择:" prop="signalList">
|
||||
<el-select v-model="ciModelForm.signalList" multiple placeholder="请选择">
|
||||
<el-option v-for="item in signalList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field == 'signalCodes' ? 'danger' : 'primary'"
|
||||
@click="hover('signalCodes')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="归属连锁站:" prop="ciStation">
|
||||
<el-select v-model="ciModelForm.ciStation" placeholder="请选择">
|
||||
<el-option v-for="item in ciStationList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex_box">
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setCiStationSignalLists">设置</el-button>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="设置引导信号" name="4">
|
||||
<el-form ref="setGuideSignal" label-width="130px" :model="guideModel" size="mini">
|
||||
@ -211,6 +230,10 @@ export default {
|
||||
stationList: [],
|
||||
ciStation: []
|
||||
},
|
||||
ciModelForm: {
|
||||
signalList: [],
|
||||
ciStation: ''
|
||||
},
|
||||
ctcModel: {
|
||||
ctc: true
|
||||
},
|
||||
@ -229,6 +252,14 @@ export default {
|
||||
{ required: true, message: '请选择信号机', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
ciModelFormRules: {
|
||||
signalList: [
|
||||
{ required: true, message: '请选择信号机', trigger: 'change' }
|
||||
],
|
||||
ciStation: [
|
||||
{ required: true, message: '请选择连锁站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
guideModel: {
|
||||
scope: 'All',
|
||||
callOn: true
|
||||
@ -404,7 +435,7 @@ export default {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() == 'Signal'.toUpperCase() && (this.field != 'selectSingalCode' && this.field != 'signalCodesType' && this.field != 'signalIgnoreRouteEnd')) {
|
||||
if (selected && selected._type.toUpperCase() == 'Signal'.toUpperCase() && (this.field != 'selectSingalCode' && this.field != 'signalCodesType' && this.field != 'signalIgnoreRouteEnd' && this.field != 'signalCodes')) {
|
||||
this.editModel = getModel('Signal');
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
@ -438,6 +469,11 @@ export default {
|
||||
this.editModel.ignoreRouteEnd.push(selected.code);
|
||||
}
|
||||
this.activeName = 'first';
|
||||
} else if (selected && selected._type === 'Signal' && this.field == 'signalCodes') {
|
||||
if (!this.ciModelForm.signalList.includes(selected.code)) {
|
||||
this.ciModelForm.signalList.push(selected.code);
|
||||
}
|
||||
this.activeName = 'three';
|
||||
}
|
||||
},
|
||||
updateMapModel(data) {
|
||||
@ -516,6 +552,21 @@ export default {
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('数据构建成功!');
|
||||
},
|
||||
setCiStationSignalLists() {
|
||||
this.$refs['signalCiStation1'].validate(valid => {
|
||||
if (valid) {
|
||||
const models = [];
|
||||
this.ciModelForm.signalList.forEach(code => {
|
||||
const signalModel = deepAssign({}, this.$store.getters['map/getDeviceByCode'](code)); // 深拷贝
|
||||
signalModel.interlockStationCode = this.ciModelForm.ciStation;
|
||||
models.push(signalModel);
|
||||
});
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('数据构建成功!');
|
||||
this.ciModelForm.signalList = [];
|
||||
}
|
||||
});
|
||||
},
|
||||
setSignalCallOn() {
|
||||
const models = [];
|
||||
this.signalList.forEach(item => {
|
||||
|
Loading…
Reference in New Issue
Block a user