站台站台轨位置校验&站台属性是否显示不生效修改&站台中站台轨属性不可修改&tab页懒加载导致的数据未展示问题调整

This commit is contained in:
fan 2020-05-08 18:52:46 +08:00
parent 5eeac156db
commit 84e212c48b
27 changed files with 147 additions and 118 deletions

View File

@ -615,7 +615,7 @@ class StationStand extends Group {
} }
} }
setShowStation(stationCode) { setShowStation(stationCode) {
if (!stationCode || this.model.deviceStationCode === stationCode) { if ((!stationCode || this.model.deviceStationCode === stationCode) && this.model.visible) {
this.eachChild(item => { this.eachChild(item => {
item.show(); item.show();
}); });

View File

@ -362,6 +362,26 @@ export default {
} }
return flag; return flag;
}, },
verifyStationPosition(map) {
let flag = true;
const tipInfoList = [];
map.stationStandList.forEach(stationStand => {
const section = this.$store.getters['map/getDeviceByCode'](stationStand.standTrackCode);
const list = [];
section.points.forEach(point => {
list.push(point.x);
});
if (stationStand.position.x > Math.max(...list) || stationStand.position.x < Math.min(...list)) {
flag = false;
tipInfoList.push('站台' + stationStand.name + '(' + stationStand.code + ')' + '位置偏移出关联站台轨,请检查关联站台轨是否正确!');
}
});
if (!flag) {
this.$messageBox(this.$t('tip.dataValidationFailed'));
this.tableToExcel(tipInfoList);
}
return flag;
},
verifySignalPosition(map) { verifySignalPosition(map) {
let flag = true; let flag = true;
const tipInfoList = []; const tipInfoList = [];
@ -463,7 +483,7 @@ export default {
if (this.$refs.jlmapVisual) { if (this.$refs.jlmapVisual) {
const map = this.$store.state.map.map; const map = this.$store.state.map.map;
if (map && this.$route.params.mapId) { if (map && this.$route.params.mapId) {
if (this.verifySectionRelation(map) && this.verifySignalPosition(map) && this.verifyInterlockDevice(map)) { if (this.verifySectionRelation(map) && this.verifySignalPosition(map) && this.verifyInterlockDevice(map) && this.verifyStationPosition(map)) {
verifyMap(this.$route.params.mapId).then(res => { verifyMap(this.$route.params.mapId).then(res => {
if (res.data.length) { if (res.data.length) {
this.tableToExcel(res.data); this.tableToExcel(res.data);

View File

@ -200,14 +200,14 @@ export default {
return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'GuideLock' || this.addModel.type == 'AxleReset'; return this.addModel.type == 'AutoTurnBack' || this.addModel.type == 'GuideLock' || this.addModel.type == 'AxleReset';
} }
}, },
watch: { // watch: {
selected(val, oldVal) { // selected(val, oldVal) {
if (val && val._type) { // if (val && val._type) {
this.handleTypes(val._type); // this.handleTypes(val._type);
this.deviceSelect(val); // this.deviceSelect(val);
} // }
} // }
}, // },
mounted() { mounted() {
}, },
methods: { methods: {
@ -220,8 +220,8 @@ export default {
} }
}, },
typeChange(type) { // typeChange(type) { //
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
this.addModel.automaticRouteCode = ''; this.addModel.automaticRouteCode = '';
this.addModel.cycleCode = ''; this.addModel.cycleCode = '';
this.addModel.concentrateStationList = ''; this.addModel.concentrateStationList = '';
@ -271,8 +271,9 @@ export default {
this.getAutoMaticList(); this.getAutoMaticList();
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.dataform.resetFields(); this.handleTypes(selected._type);
this.$refs.make.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'AutoTurnBack'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase() || selected._type.toUpperCase() == 'GuideLock'.toUpperCase()) { if (selected && selected._type.toUpperCase() == 'AutomaticRoute'.toUpperCase() || selected._type.toUpperCase() == 'AutoTurnBack'.toUpperCase() || selected._type.toUpperCase() == 'AxleReset'.toUpperCase() || selected._type.toUpperCase() == 'LimitControl'.toUpperCase() || selected._type.toUpperCase() == 'GuideLock'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
@ -350,7 +351,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$emit('updateMapModel', {...selected, _dispose: true}); this.$emit('updateMapModel', {...selected, _dispose: true});
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
}).catch(() => { }).catch(() => {
this.$message.info(this.$t('tip.cancelledDelete')); this.$message.info(this.$t('tip.cancelledDelete'));
}); });

View File

@ -172,9 +172,9 @@ export default {
} }
}, },
watch: { watch: {
selected: function (val, oldVal) { // selected: function (val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
mounted() { mounted() {
}, },
@ -184,8 +184,8 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.form.resetFields(); this.$refs.form && this.$refs.form.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'Resource'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Resource'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);

View File

@ -140,9 +140,9 @@ export default {
} }
}, },
watch: { watch: {
selected(val, oldVal) { // selected(val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
methods: { methods: {
deviceChange(code) { deviceChange(code) {
@ -150,8 +150,8 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.form.resetFields(); this.$refs.form && this.$refs.form.resetFields();
this.$refs.createForm.resetFields(); this.$refs.createForm && this.$refs.createForm.resetFields();
if (selected && selected._type.toUpperCase() === 'Line'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Line'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);

View File

@ -79,9 +79,9 @@ export default {
} }
}, },
watch: { watch: {
selected: function (val, oldVal) { // selected: function (val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
mounted() { mounted() {
}, },

View File

@ -247,9 +247,9 @@ export default {
} }
}, },
watch: { watch: {
selected(val, oldVal) { // selected(val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
}, // },
indicatorLightList(val) { indicatorLightList(val) {
this.handleIndicatorLightList(val); this.handleIndicatorLightList(val);
}, },
@ -263,8 +263,8 @@ export default {
}, },
methods: { methods: {
typeChange(type) { typeChange(type) {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
this.addModel.type = type; this.addModel.type = type;
this.editModel.type = type; this.editModel.type = type;
}, },
@ -414,8 +414,8 @@ export default {
this.addModel.switchCode = selected.code; this.addModel.switchCode = selected.code;
} }
} else if (selected && this.controlLampTypeList.includes(selected._type)) { } else if (selected && this.controlLampTypeList.includes(selected._type)) {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
this.editModel.type = selected._type; this.editModel.type = selected._type;
@ -533,7 +533,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$emit('updateMapModel', {...selected, _dispose: true}); this.$emit('updateMapModel', {...selected, _dispose: true});
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
}).catch(() => { }).catch(() => {
this.$message.info(this.$t('tip.cancelledDelete')); this.$message.info(this.$t('tip.cancelledDelete'));
}); });

View File

@ -168,9 +168,9 @@ export default {
} }
}, },
watch: { watch: {
selected: function (val, oldVal) { // selected: function (val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
mounted() { mounted() {
}, },
@ -179,8 +179,8 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.form.resetFields(); this.$refs.form && this.$refs.form.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'Counter'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Counter'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);

View File

@ -150,9 +150,9 @@ export default {
} }
}, },
watch: { watch: {
selected: function (val, oldVal) { // selected: function (val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
mounted() { mounted() {
}, },
@ -162,8 +162,8 @@ export default {
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.form.resetFields(); this.$refs.form && this.$refs.form.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'DelayUnlock'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'DelayUnlock'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);

View File

@ -115,9 +115,9 @@ export default {
} }
}, },
watch: { watch: {
selected: function (val, oldVal) { // selected: function (val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
}, // },
'$store.state.map.deleteCount': function (val) { '$store.state.map.deleteCount': function (val) {
this.deleteObj(); this.deleteObj();
} }
@ -135,7 +135,7 @@ export default {
}, },
deviceSelect(selected) { deviceSelect(selected) {
if (selected && selected._type.toUpperCase() === 'Esp'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Esp'.toUpperCase()) {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
} }
@ -197,7 +197,7 @@ export default {
}).then(() => { }).then(() => {
this.$store.dispatch('map/delMapStandData', {models: [selected], type: 'espList'}); this.$store.dispatch('map/delMapStandData', {models: [selected], type: 'espList'});
this.deviceSelect(); this.deviceSelect();
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
}).catch(() => { }).catch(() => {
this.$message.info(this.$t('tip.cancelledDelete')); this.$message.info(this.$t('tip.cancelledDelete'));
}); });

View File

@ -61,7 +61,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('map.psd')" class="tab_pane_box" name="Psd" :lazy="lazy"> <el-tab-pane :label="$t('map.psd')" class="tab_pane_box" name="Psd" :lazy="lazy">
<psd-draft <psd-draft
ref="PsdDraft" ref="Psd"
:selected="selected" :selected="selected"
@updateMapModel="updateMapModel" @updateMapModel="updateMapModel"
@setCenter="setCenter" @setCenter="setCenter"
@ -70,7 +70,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('map.platformEmergencyStop')" class="tab_pane_box" name="Esp" :lazy="lazy"> <el-tab-pane :label="$t('map.platformEmergencyStop')" class="tab_pane_box" name="Esp" :lazy="lazy">
<esp-draft <esp-draft
ref="EspDraft" ref="Esp"
:selected="selected" :selected="selected"
@updateMapModel="updateMapModel" @updateMapModel="updateMapModel"
@setCenter="setCenter" @setCenter="setCenter"
@ -282,6 +282,14 @@ export default {
}, },
'$store.state.map.updateCount': function (val) { '$store.state.map.updateCount': function (val) {
this.$refs[this.enabledTab].edit(); this.$refs[this.enabledTab].edit();
},
selected(val, oldVal) {
if (this.selected) {
console.log(this.$refs[this.enabledTab], this.enabledTab);
this.$nextTick(() => {
this.$refs[this.enabledTab].deviceSelect(val);
});
}
} }
}, },
mounted() { mounted() {

View File

@ -157,9 +157,9 @@ export default {
} }
}, },
watch: { watch: {
selected: function (val, oldVal) { // selected: function (val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
mounted() { mounted() {
}, },
@ -169,8 +169,8 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.form.resetFields(); this.$refs.form && this.$refs.form.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'LcControl'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'LcControl'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);

View File

@ -198,9 +198,9 @@ export default {
} }
}, },
watch: { watch: {
selected(val, oldVal) { // selected(val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
mounted() { mounted() {
this.$Dictionary.lineType().then(list => { this.$Dictionary.lineType().then(list => {
@ -213,8 +213,8 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.form.resetFields(); this.$refs.form && this.$refs.form.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'Line'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Line'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);

View File

@ -201,9 +201,9 @@ export default {
} }
}, },
watch: { watch: {
selected(val, oldVal) { // selected(val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
mounted() { mounted() {
this.$Dictionary.lineType().then(list => { this.$Dictionary.lineType().then(list => {
@ -216,8 +216,8 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.form.resetFields(); this.$refs.form && this.$refs.form.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'OutFrame'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'OutFrame'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);

View File

@ -200,9 +200,9 @@ export default {
} }
}, },
watch: { watch: {
selected: function (val, oldVal) { // selected: function (val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
}, // },
'$store.state.map.deleteCount': function (val) { '$store.state.map.deleteCount': function (val) {
this.deleteObj(); this.deleteObj();
} }
@ -223,7 +223,7 @@ export default {
}, },
deviceSelect(selected) { deviceSelect(selected) {
if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
} }
@ -279,7 +279,7 @@ export default {
}).then(() => { }).then(() => {
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
}).catch(() => { }).catch(() => {
_that.$message.info(this.$t('tip.cancelledDelete')); _that.$message.info(this.$t('tip.cancelledDelete'));
}); });

View File

@ -192,7 +192,7 @@ export default {
models.push(model); models.push(model);
}); });
this.$emit('updateMapModel', models, 'five'); this.$emit('updateMapModel', models, 'five');
this.$refs.formModel.resetFields(); // this.$refs.formModel && this.$refs.formModel.resetFields(); //
} }
}); });
}, },
@ -252,7 +252,7 @@ export default {
} }
} }
this.$emit('updateMapModel', models, 'five'); this.$emit('updateMapModel', models, 'five');
this.$refs.roadModel.resetFields(); // this.$refs.roadModel && this.$refs.roadModel.resetFields(); //
}); });
}, },
setBelongStation() { setBelongStation() {

View File

@ -391,9 +391,9 @@ export default {
} }
}, },
watch: { watch: {
'$store.state.menuOperation.mapDrawSelectCount': function(val) { // '$store.state.menuOperation.mapDrawSelectCount': function(val) {
this.deviceSelect(this.selected); // this.deviceSelect(this.selected);
}, // },
activeName(val) { activeName(val) {
if (val === 'four') { if (val === 'four') {
this.$nextTick(() => { this.$nextTick(() => {
@ -670,7 +670,7 @@ export default {
} }
}, },
clear() { clear() {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
// 沿 // 沿
this.editModel.logicSectionCodeList = []; this.editModel.logicSectionCodeList = [];
this.editModel.rightSectionCode = ''; this.editModel.rightSectionCode = '';

View File

@ -293,9 +293,9 @@ export default {
} }
}, },
watch: { watch: {
selected(val, oldVal) { // selected(val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
mounted() { mounted() {
this.SignalLeftOrRightList = this.$ConstSelect.SignalLeftOrRightList; this.SignalLeftOrRightList = this.$ConstSelect.SignalLeftOrRightList;
@ -323,7 +323,7 @@ export default {
}, },
deviceSelect(selected) { deviceSelect(selected) {
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() != 'selectSingalCode'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() != 'selectSingalCode'.toUpperCase()) {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
this.editModel.rotate = selected.rotate || 0; // this.editModel.rotate = selected.rotate || 0; //
@ -371,7 +371,7 @@ export default {
}).then(() => { }).then(() => {
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
}).catch(() => { }).catch(() => {
_that.$message.info(this.$t('tip.cancelledDelete')); _that.$message.info(this.$t('tip.cancelledDelete'));
}); });

View File

@ -134,14 +134,14 @@ export default {
} }
}, },
watch: { watch: {
selected(val) { // selected(val) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
methods: { methods: {
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type === 'SplitStation') { if (selected && selected._type === 'SplitStation') {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
@ -190,7 +190,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$emit('updateMapModel', {...selected, _dispose: true}); this.$emit('updateMapModel', {...selected, _dispose: true});
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
}).catch(() => { }).catch(() => {
this.$message.info(this.$t('tip.cancelledDelete')); this.$message.info(this.$t('tip.cancelledDelete'));
}); });

View File

@ -282,9 +282,9 @@ export default {
} }
}, },
watch: { watch: {
selected: function (val) { // selected: function (val) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
methods: { methods: {
deviceChange(code) { deviceChange(code) {
@ -294,7 +294,7 @@ export default {
deviceSelect(selected) { deviceSelect(selected) {
// this.$refs.make.resetFields(); // this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
this.editModel.runPlanName = selected.runPlanName || ''; this.editModel.runPlanName = selected.runPlanName || '';

View File

@ -168,7 +168,7 @@ export default {
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' }, { prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
{ prop: 'width', label: this.$t('map.stationstandWidth'), type: 'number', min: 0, max: 2000, placeholder: 'px' }, { prop: 'width', label: this.$t('map.stationstandWidth'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' }, { prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
{ prop: 'standTrackCode', label: '站台轨:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, hover: this.hover, buttonType: 'editSectionSelectCode', buttonShowType: this.isButtonTypeES }, { prop: 'standTrackCode', label: '站台轨:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList, disabled: true},
{ prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList }, { prop: 'right', label: '行驶方向:', type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.isRightList },
{ prop: 'defaultReentryStrategy', label: '默认折返策略:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.reentryStrategyList }, { prop: 'defaultReentryStrategy', label: '默认折返策略:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.reentryStrategyList },
{ prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true }, { prop: 'small', label: '是否小型站台:', type: 'checkbox', disabled: true },
@ -367,7 +367,7 @@ export default {
}, },
deviceSelect(selected) { deviceSelect(selected) {
if (this.field.toUpperCase() != 'standSelectStationCode'.toUpperCase() && selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) { if (this.field.toUpperCase() != 'standSelectStationCode'.toUpperCase() && selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
} }
@ -513,7 +513,7 @@ export default {
}); });
_that.$emit('updateMapModel', models); _that.$emit('updateMapModel', models);
_that.deviceSelect(); _that.deviceSelect();
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
}).catch(() => { }).catch(() => {
_that.$message.info(this.$t('tip.cancelledDelete')); _that.$message.info(this.$t('tip.cancelledDelete'));
}); });

View File

@ -48,9 +48,9 @@ export default {
]) ])
}, },
watch: { watch: {
selected: function (val, oldVal) { // selected: function (val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
methods: { methods: {
filterSections(query, item) { filterSections(query, item) {

View File

@ -129,7 +129,7 @@ export default {
this.setModel(this.$store.getters['map/getDeviceByCode'](code)); this.setModel(this.$store.getters['map/getDeviceByCode'](code));
}, },
setModel(data) { setModel(data) {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.editModel = deepAssign(this.editModel, data); this.editModel = deepAssign(this.editModel, data);
}, },
// //

View File

@ -182,9 +182,9 @@ export default {
} }
}, },
watch: { watch: {
selected: function (val, oldVal) { // selected: function (val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
methods: { methods: {
deviceChange(code) { deviceChange(code) {
@ -192,8 +192,8 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.form.resetFields(); this.$refs.form && this.$refs.form.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'Text'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Text'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);

View File

@ -79,9 +79,9 @@ export default {
]) ])
}, },
watch: { watch: {
selected(val, oldVal) { // selected(val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
}, // },
$route() { $route() {
// this.activeName = 'first'; // this.activeName = 'first';
} }

View File

@ -188,9 +188,9 @@ export default {
} }
}, },
watch: { watch: {
selected: function (val, oldVal) { // selected: function (val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
} // }
}, },
methods: { methods: {
filterSections(query, item) { filterSections(query, item) {
@ -204,7 +204,7 @@ export default {
this.field = field == this.field ? '' : field; this.field = field == this.field ? '' : field;
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.form.resetFields(); this.$refs.form && this.$refs.form.resetFields();
if (selected && selected._type.toUpperCase() === 'TrainWindow'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'TrainWindow'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);

View File

@ -162,9 +162,9 @@ export default {
} }
}, },
watch: { watch: {
selected(val, oldVal) { // selected(val, oldVal) {
this.deviceSelect(val); // this.deviceSelect(val);
}, // },
stationList() { stationList() {
this.getConcertrateStation(); this.getConcertrateStation();
} }
@ -182,8 +182,8 @@ export default {
this.getConcertrateStation(); this.getConcertrateStation();
}, },
deviceSelect(selected) { deviceSelect(selected) {
this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.$refs.make.resetFields(); this.$refs.make && this.$refs.make.resetFields();
if (selected && selected._type.toUpperCase() === 'ZcControl'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'ZcControl'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);