diff --git a/src/jmapNew/theme/components/menus/dialog/loadSpareTrain.vue b/src/jmapNew/theme/components/menus/dialog/loadSpareTrain.vue index 159cb192b..305bfdfd6 100644 --- a/src/jmapNew/theme/components/menus/dialog/loadSpareTrain.vue +++ b/src/jmapNew/theme/components/menus/dialog/loadSpareTrain.vue @@ -20,6 +20,7 @@ @@ -103,7 +104,7 @@ export default { watch:{}, methods: { doShow(operate, selected) { - this.$root.$emit('dialogOpen', selected); + this.$root.$emit('dialogOpen', selected); this.selected = selected; // 如果不是断点激活,则需要对初始值进行初始化 // if (!this.dialogShow) { @@ -154,6 +155,9 @@ export default { this.doClose(); } }).catch(() => { this.doClose(); }); + }, + disabledTrain(code) { + return this.$store.state.map.activeTrainList.includes(code); } } }; diff --git a/src/store/modules/map.js b/src/store/modules/map.js index b12842a85..928f231ae 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -1030,6 +1030,12 @@ const map = { } } }); + const train = state.mapDevice[data.code]; + if (train.physicalCode) { + const section = state.mapDevice[train.physicalCode]; + const station = section ? state.mapDevice[section.stationCode] : {}; + isExist = isExist || station.depot; + } if (!isExist) { state.activeTrainList.push(data.code); state.activeTrainListChange += 1; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 208ce6f86..782ec0b1c 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,8 +2,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; - // BASE_API = 'http://192.168.8.152:9000'; // 袁琪 + // BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'http://114.116.51.125/jlcloud'; + BASE_API = 'http://192.168.8.152:9000'; // 袁琪 // BASE_API = 'http://192.168.8.172:9200'; // 旭强 // BASE_API = 'http://192.168.8.109:9000'; // 张赛 // BASE_API = 'http://192.168.8.140:9000'; // 杜康 diff --git a/src/views/newMap/newMapdraft/mapoperate/train/create.vue b/src/views/newMap/newMapdraft/mapoperate/train/create.vue index eeae0b876..2d9062115 100644 --- a/src/views/newMap/newMapdraft/mapoperate/train/create.vue +++ b/src/views/newMap/newMapdraft/mapoperate/train/create.vue @@ -133,7 +133,6 @@ export default { this.addModel.modelCode = ''; this.$emit('dispatch', { callback: 'delTrainMode', params: code}); }, - // 14 handleConfirm() { this.$refs['form'].validate((valid) => { if (valid) {