From 879719ed4b8d7e6c68bbc6cbe42bf94201c47922 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 23 Nov 2022 14:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=89=8D=E7=AB=AF=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20=E6=B7=BB=E5=8A=A0=20=E5=85=B3=E8=81=94=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=20=E8=AE=BE=E5=A4=87=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/login/normalLogin.vue | 66 +++++++++++++++---- .../frontProjectConfigManage/frontConfig.vue | 40 ++++++++++- 2 files changed, 93 insertions(+), 13 deletions(-) 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 @@