This commit is contained in:
joylink_fanyuhong 2020-02-11 18:27:07 +08:00
commit a95e0176ac
4 changed files with 54 additions and 33 deletions

View File

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

@ -272,7 +272,7 @@ export default {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => {
@ -294,7 +294,7 @@ export default {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => {
@ -316,7 +316,7 @@ export default {
standCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => {

View File

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

@ -3,12 +3,12 @@ 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 = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://b29z135112.zicp.vip';
} else {
BASE_API = process.env.VUE_APP_BASE_API;
}