This commit is contained in:
joylink_fanyuhong 2024-05-16 15:43:56 +08:00
parent ae74123f18
commit ef9165faa4

View File

@ -10,6 +10,8 @@ import { cgyThirdLogin } from '@/api/management/user';
import { setToken } from '@/utils/auth'; import { setToken } from '@/utils/auth';
import { createSimulation } from '@/api/simulation'; import { createSimulation } from '@/api/simulation';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
import { getMapFunctioById } from '@/api/trainingPlatform';
import { getPublishMapInfo } from '@/api/jmap/map';
export default { export default {
name:'CgyLogin', name:'CgyLogin',
@ -58,26 +60,16 @@ export default {
} }
}, },
methods:{ methods:{
enterSimulation() { async enterSimulation() {
const query = { const query = {
third: true third: true,
query: 'cgy'
}; };
if (this.$route.query.type === 'loc') { const resp = await getMapFunctioById(this.$route.query.systemId);
query.lineCode = '02'; query.mapId = resp.data.mapId;
query.mapId = '124'; query.simType = resp.data.simType;
query.simType = 'METRO'; const resp1 = await getPublishMapInfo(resp.data.mapId);
query.project = 'cgy'; query.lineCode = resp1.data.lineCode;
} else if (this.$route.query.type === 'datie') {
query.lineCode = '16';
query.mapId = '157';
query.simType = 'RAILWAY';
query.project = 'cgy';
} else if (this.$route.query.type === 'drts') {
query.lineCode = '13';
query.mapId = '78';
query.simType = 'METRO';
query.project = 'cgy';
}
createSimulation(this.$route.query.systemId).then(resp => { createSimulation(this.$route.query.systemId).then(resp => {
query.group = resp.data; query.group = resp.data;
this.$router.replace({ path: `/display/demon`, query: query }); this.$router.replace({ path: `/display/demon`, query: query });