Merge remote-tracking branch 'origin/develop' into local-test
local-test分支构建发布到本地服务器 / Build-Publish (push) Successful in 8m20s Details

This commit is contained in:
joylink_fanyuhong 2024-05-21 16:48:35 +08:00
commit 7d774db362
7 changed files with 125 additions and 3 deletions

View File

@ -323,3 +323,11 @@ export function isExistEmail(params) {
});
}
// 成工院第三方登录
export function cgyThirdLogin(data) {
return request({
url: '/api/login/cgy/third',
method: 'post',
data
});
}

View File

@ -189,6 +189,13 @@ class SkinCode extends defaultStyle {
},
lowButton:{
display: false // 现地 信号机按钮
},
transmission: { // 传输信号机
fillColor: '#f00',
fillColorVirtual: '#f00',
sideLength: 20,
textColor: '#fff',
strokeColor: '#00FFFF'
}
};

View File

@ -233,6 +233,13 @@ class SkinCode extends defaultStyle {
fontSize: 12,
distance: 20,
defaultText: 'E'
},
transmission: { // 传输信号机
fillColor: '#f00',
fillColorVirtual: '#f00',
sideLength: 20,
textColor: '#fff',
strokeColor: '#00FFFF'
}
};

View File

@ -931,8 +931,8 @@ class Signal extends Group {
// 隐藏自动信号和自动进路
setAutoClose() {
if (this.style.Signal.auto.autoRouteType != 'text') {
this.sigAuto.hide();
this.sigAuto.setColor(this.style.backgroundColor);
this.sigAuto && this.sigAuto.hide();
this.sigAuto && this.sigAuto.setColor(this.style.backgroundColor);
} else {
this.sigName.setColor(this.style.Signal.text.defaultColor);
}

View File

@ -8,7 +8,7 @@ import { getFrontProjectConfigByLogin} from '@/api/projectConfig';
import localStore from 'storejs';
import { handlerUrl } from '@/utils/baseUrl';
const whiteList = ['/login', '/design/login', '/loginNew', '/gzzbxy/relay', '/authorization', '/AUSline', '/AUStool', '/demo', '/thirdLogin']; // 不重定向白名单
const whiteList = ['/login', '/design/login', '/loginNew', '/gzzbxy/relay', '/authorization', '/AUSline', '/AUStool', '/demo', '/thirdLogin', '/cgyLogin']; // 不重定向白名单
// 登录路径判断获取
function getRouteInfo(to) {

View File

@ -220,6 +220,7 @@ const UserRulesManage = () => import('@/views/userRulesManage/index');
const AuthorityTransfer = () => import('@/views/authorityTransfer/index');
const CreateDistribute = () => import('@/views/authorityTransfer/create/index');
const ThirdJumpSim = () => import('@/views/newMap/display/thirdJump');
const CgyLogin = () => import('@/views/thirdLogin/cgyLogin');
const TmsPage = () => import('@/views/jlmap3d/drive/sceneview/tmsPage');
const ContestSubjectManage = () => import('@/views/contestDataManage/contestSubjectManage/ContestSubjectManage');
@ -430,6 +431,11 @@ export const constantRoutes = [
component: ThirdJumpSim,
hidden: true
},
{
path: '/cgyLogin',
component: CgyLogin,
hidden: true
},
{
path: '/404',
component: Errpr404,

View File

@ -0,0 +1,94 @@
<template>
<div class="thirdLoginContainer">
<div class="thirdLoginMessage">
{{ message }}
</div>
</div>
</template>
<script>
import { cgyThirdLogin } from '@/api/management/user';
import { setToken } from '@/utils/auth';
import { createSimulation } from '@/api/simulation';
import { launchFullscreen } from '@/utils/screen';
import { getMapFunctioById } from '@/api/trainingPlatform';
import { getPublishMapInfo } from '@/api/jmap/map';
export default {
name:'CgyLogin',
data() {
return {
message:''
};
},
computed: {
project() {
const project = this.$route.query.project;
return project || 'login';
}
},
mounted() {
const appId = this.$route.query.appId;
const sessionId = this.$route.query.sessionId;
const timeStamp = this.$route.query.timeStamp;
const account = this.$route.query.account;
const name = this.$route.query.name;
const parentAccount = this.$route.query.parentAccount;
const functionId = this.$route.query.functionId;
if (appId && account && name) {
const data = {
appId,
sessionId,
timeStamp,
account,
name,
parentAccount,
functionId
};
this.message = '正在登陆中......';
cgyThirdLogin(data).then(resp=> {
const token = resp.data;
const header = { group: '', 'X-Token': token };
setToken(token);
this.$store.dispatch('setToken', token);
this.$store.dispatch('subscribe', {header, type:'class'});
this.enterSimulation();
}).catch(() => {
this.message = '参数有误,请检查';
});
} else {
this.message = '参数有误,请检查';
}
},
methods:{
async enterSimulation() {
const query = {
third: true,
query: 'cgy'
};
const resp = await getMapFunctioById(this.$route.query.systemId);
query.mapId = resp.data.mapId;
query.simType = resp.data.simType;
const resp1 = await getPublishMapInfo(resp.data.mapId);
query.lineCode = resp1.data.lineCode;
createSimulation(this.$route.query.systemId).then(resp => {
query.group = resp.data;
this.$router.replace({ path: `/display/demon`, query: query });
launchFullscreen();
}).catch(error=>{
if (error.code == 10003) {
this.$messageBox(this.$t('error.createSimulationFailed') + ':您的仿真权限不足!');
} else {
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
}
this.disabled = false;
});
}
}
};
</script>
<style lang="scss" scoped>
.thirdLoginMessage{
padding: 20px;
font-size: 20px;
}
</style>