diff --git a/src/views/login/normalLogin.vue b/src/views/login/normalLogin.vue index 813d56fe8..677e6fbbd 100644 --- a/src/views/login/normalLogin.vue +++ b/src/views/login/normalLogin.vue @@ -80,8 +80,10 @@ import QCode from '@/assets/erCode.jpg'; import md5 from 'js-md5'; import Cookies from 'js-cookie'; -// getLoginWmurl, checkLoginStatus, getLoginInfo, -import { getOrgList, selectOrgnization } from '@/api/login'; +import { getToken } from '@/utils/auth'; +// getLoginWmurl, checkLoginStatus, +import { getOrgList, selectOrgnization, getLoginInfo } from '@/api/login'; +import { createSimulation } from '@/api/simulation'; export default { name:'NormalLogin', props: { @@ -97,12 +99,6 @@ export default { return false; } } - // syncLogin:{ - // type: Boolean, - // default: () => { - // return false; - // } - // } }, data() { const validateName = (rule, value, callback) => { @@ -139,6 +135,14 @@ export default { } }; }, + computed:{ + type() { + return this.$route.query.type; + }, + projectDevice() { + return this.$route.query.projectDevice; + } + }, watch: { 'project': function(val) { if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) { @@ -217,10 +221,48 @@ export default { handleLoginSucessRoute() { this.loading = false; this.tipsMsg = ''; - // path: '/trainingPlatform', - const path = '/simulation/simulationIndex'; - // if() - this.$router.push({ path: path }); + let path = ''; + if (this.projectDevice) { + const params = { + projectDevice:this.$route.query.projectDevice, + type: this.$route.query.type + }; + this.judgeOtherPage(params); + } else { + path = '/simulation/simulationIndex'; + this.$router.push({ path: path }); + } + }, + judgeOtherPage(params) { + // itemMap: {DEFAULT_MEMBER: '1'}type: "METRO" + getLoginInfo(getToken()).then(res => { + debugger; + createSimulation().then(resp => { + let query = { + group: res.data.group, + mapId: resp.data.map.id, + lineCode: resp.data.map.lineCode, + project: this.project + }; + query = Object.assign(query, params); + this.$router.push({ path: `/display/demon`, query: query }); + }); + // lineCode: resp.data.map.lineCode, + // group: res.data.group, + // prdType: resp.data.prodType, + // mapId: resp.data.map.id, + // goodsId: '', + // try: '0', + // project: this.project + // const query = { + // group: resp.data.group, + // mapId: resp.data.map.id, + // lineCode: resp.data.map.lineCode, + // projectDevice: this.$route.query.projectDevice, + // type: this.$route.query.type + // }; + // path = ''; + }); }, // 登陆 handleLogin() { diff --git a/src/views/system/frontProjectConfigManage/frontConfig.vue b/src/views/system/frontProjectConfigManage/frontConfig.vue index 3ab581c7f..72d77c292 100644 --- a/src/views/system/frontProjectConfigManage/frontConfig.vue +++ b/src/views/system/frontProjectConfigManage/frontConfig.vue @@ -65,6 +65,20 @@ + + + + + + + + + + + + + + {{ $t('global.confirm') }} @@ -73,7 +87,9 @@