添加宁波,北京线路进路获取

This commit is contained in:
zyy 2020-02-11 17:33:33 +08:00
parent 977fe574eb
commit d348c640f9
3 changed files with 51 additions and 30 deletions

View File

@ -169,7 +169,10 @@ export default {
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
]) ]),
...mapGetters('map', [
'routeList'
]),
}, },
methods: { methods: {
clickEvent() { clickEvent() {
@ -264,14 +267,16 @@ export default {
} }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
var tempData = null; const routes = [];
if (response) { this.routeList.forEach(elem => {
tempData = response.data; if (elem.startSignalCode === this.selected.code) {
} routes.push(elem);
this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData); }
});
this.$refs.routeSelection.doShow(operate.operation, this.selected, routes);
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
@ -377,14 +382,16 @@ export default {
signalCode: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
let tempData = null; const routes = [];
if (response) { this.routeList.forEach(elem => {
tempData = response.data; if (elem.startSignalCode === this.selected.code) {
} routes.push(elem);
}
});
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeHandControl.doShow(operate, this.selected, tempData); this.$refs.routeHandControl.doShow(operate, this.selected, routes);
} }
}); });
}, },
@ -401,14 +408,16 @@ export default {
signalCode: `${this.selected.code}` signalCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/next', operate).then(({ valid, response }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
let tempData = null;
if (response) {
tempData = response.data;
}
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeHandControl.doShow(operate, this.selected, tempData); const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeHandControl.doShow(operate, this.selected, routes);
} }
}); });
}, },

View File

@ -164,6 +164,9 @@ export default {
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
]), ]),
...mapGetters('map', [
'routeList'
]),
group() { group() {
return this.$route.query.group; return this.$route.query.group;
} }
@ -262,10 +265,13 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
this.$store.dispatch('map/getRouteDataListByCode', this.selected.code).then(list => { const routes = [];
const tempData = list; this.routeList.forEach(elem => {
this.$refs.routeSelection.doShow(step.operation, this.selected, tempData); if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
}); });
this.$refs.routeSelection.doShow(step.operation, this.selected, routes);
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(step); this.$refs.noticeInfo.doShow(step);
@ -372,10 +378,13 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('map/getRouteDataListByCode', this.selected.code).then(list => { const routes = [];
const tempData = []; this.routeList.forEach(elem => {
this.$refs.routeHandControl.doShow(operate, this.selected, tempData); if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
}); });
this.$refs.routeHandControl.doShow(operate, this.selected, routes);
} }
}); });
}, },
@ -392,10 +401,13 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('map/getRouteDataListByCode', this.selected.code).then(list => { const routes = [];
const tempData = []; this.routeList.forEach(elem => {
this.$refs.routeHandControl.doShow(operate, this.selected, tempData); if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
}); });
this.$refs.routeHandControl.doShow(operate, this.selected, routes);
} }
}); });
}, },

View File

@ -3,12 +3,12 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud'; BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://192.168.3.82:9000'; // 杜康
BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';
} else { } else {
BASE_API = process.env.VUE_APP_BASE_API; BASE_API = process.env.VUE_APP_BASE_API;
} }