merge baseurl
This commit is contained in:
commit
4a831d4aa7
@ -56,7 +56,7 @@ export function checkLoginStatus(sessionId) {
|
||||
sessionId: sessionId
|
||||
}
|
||||
}).then(response => {
|
||||
if (response.data.status === '2') {
|
||||
if (response.data.status === 'SCAN') {
|
||||
resolve(response);
|
||||
} else {
|
||||
reject(response);
|
||||
|
@ -12,59 +12,71 @@ import { LoginParams } from '@/utils/login';
|
||||
export const loginInfo = { // 页面title & 退出登录跳转路径
|
||||
xty: {
|
||||
title: '西安铁路职业技术学院城市轨道交通实训平台',
|
||||
loginPath: '/xty/login'
|
||||
loginPath: '/xty/login',
|
||||
loginParam: 'XTY'
|
||||
},
|
||||
login: {
|
||||
title: LangStorage.getLang() == 'en' ? ' Urban Rail Transit Practical Training Platform' : '城市轨道交通实训平台',
|
||||
loginPath: '/login'
|
||||
loginPath: '/login',
|
||||
loginParam: 'DEFAULT'
|
||||
},
|
||||
design: {
|
||||
title: LangStorage.getLang() == 'en' ? ' Urban Rail Transit Design Platform' : '城市轨道交通设计平台',
|
||||
loginPath: '/design/login'
|
||||
loginPath: '/design/login',
|
||||
loginParam: 'DEFAULT'
|
||||
},
|
||||
designxty: {
|
||||
title: '西安铁路职业技术学院城市轨道交通设计平台',
|
||||
loginPath: '/designxty/login'
|
||||
loginPath: '/designxty/login',
|
||||
loginParam: 'XTY'
|
||||
},
|
||||
gzb: {
|
||||
title: '贵州装备制造职业学院城市轨道交通实训平台',
|
||||
loginPath: '/gzb/login'
|
||||
loginPath: '/gzb/login',
|
||||
loginParam: 'GZB'
|
||||
},
|
||||
designgzb: {
|
||||
title: '贵州装备制造职业学院城市轨道交通设计平台',
|
||||
loginPath: '/designgzb/login'
|
||||
loginPath: '/designgzb/login',
|
||||
loginParam: 'GZB'
|
||||
},
|
||||
hyd: {
|
||||
title: '城市轨道交通综合行车模拟仿真系统V1.0',
|
||||
loginPath: '/login',
|
||||
bottomColumn: '哈尔滨盈达科技有限公司 联系电话:0451-87001273'
|
||||
bottomColumn: '哈尔滨盈达科技有限公司 联系电话:0451-87001273',
|
||||
loginParam: 'DEFAULT'
|
||||
},
|
||||
designhyd: {
|
||||
title: '城市轨道交通设计平台V1.0',
|
||||
loginPath: '/design/login',
|
||||
bottomColumn: '哈尔滨盈达科技有限公司 联系电话:0451-87001273'
|
||||
bottomColumn: '哈尔滨盈达科技有限公司 联系电话:0451-87001273',
|
||||
loginParam: 'DEFAULT'
|
||||
},
|
||||
xadt: {
|
||||
title: '城市轨道交通实训平台',
|
||||
loginTitle: '调度一部',
|
||||
homeTitle: '调度一部',
|
||||
browserTitle: '西安地铁调度一部城市轨道交通实训平台',
|
||||
loginPath: '/xadt/login'
|
||||
loginPath: '/xadt/login',
|
||||
loginParam: 'DEFAULT'
|
||||
},
|
||||
designxadt: {
|
||||
title: '城市轨道交通设计平台',
|
||||
loginTitle: '调度一部',
|
||||
homeTitle: '调度一部',
|
||||
browserTitle: '西安地铁调度一部城市轨道交通设计平台',
|
||||
loginPath: '/designxadt/login'
|
||||
loginPath: '/designxadt/login',
|
||||
loginParam: 'DEFAULT'
|
||||
},
|
||||
jsxt:{
|
||||
title: '城市轨道交通竞赛平台',
|
||||
loginPath: '/jsxt/login'
|
||||
loginPath: '/jsxt/login',
|
||||
loginParam: 'DEFAULT'
|
||||
},
|
||||
refereeJsxt:{
|
||||
title: '城市轨道交通裁判平台',
|
||||
loginPath: '/refereeJsxt/login'
|
||||
loginPath: '/refereeJsxt/login',
|
||||
loginParam: 'DEFAULT'
|
||||
},
|
||||
jyd: {
|
||||
title: '城市轨道交通实训平台',
|
||||
@ -72,7 +84,8 @@ export const loginInfo = { // 页面title & 退出登录跳转路径
|
||||
loginTitle: 'jyd',
|
||||
bottomColumn: '',
|
||||
bottomIcon: Bottom_Jyd,
|
||||
linkIcon: Link_Jyd
|
||||
linkIcon: Link_Jyd,
|
||||
loginParam: 'DEFAULT'
|
||||
},
|
||||
designjyd: {
|
||||
title: '城市轨道交通设计平台',
|
||||
@ -80,7 +93,8 @@ export const loginInfo = { // 页面title & 退出登录跳转路径
|
||||
loginPath: '/designjyd/login',
|
||||
bottomColumn: '',
|
||||
bottomIcon: Bottom_Jyd,
|
||||
linkIcon: Link_Jyd
|
||||
linkIcon: Link_Jyd,
|
||||
loginParam: 'DEFAULT'
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -71,9 +71,10 @@ const user = {
|
||||
const username = userInfo.username.trim();
|
||||
const password = userInfo.password.trim();
|
||||
const type = userInfo.type;
|
||||
const project = userInfo.project;
|
||||
return new Promise((resolve, reject) => {
|
||||
// 登录系统
|
||||
const params = Object.assign({ account: username, password }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
|
||||
const params = Object.assign({ account: username, password, project:project }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
|
||||
login(params).then(resp => {
|
||||
const token = resp.data;
|
||||
const header = { group: '', 'X-Token': token };
|
||||
|
@ -206,12 +206,14 @@ export default {
|
||||
if (valid) {
|
||||
const model = Object.assign({}, this.loginForm);
|
||||
model.password = md5(model.password);
|
||||
model.project = loginInfo[this.project].loginParam;
|
||||
model.type = this.modelType;
|
||||
this.loading = true;
|
||||
if (this.isAutoLogin) {
|
||||
Cookies.set(this.cookiesName, model.username, { expires: 2});
|
||||
Cookies.set(this.cookiesToken, model.password, { expires: 2});
|
||||
}
|
||||
console.log(model, '111111111111');
|
||||
this.$store.dispatch('Login', model).then(() => {
|
||||
this.$store.dispatch('SetAccount', model.username);
|
||||
this.handleLoginSucessRoute();
|
||||
|
@ -187,7 +187,7 @@ export default {
|
||||
document.querySelector("link[rel*='icon']").href = loginInfo[this.project].linkIcon || ProjectIcon[this.project];
|
||||
this.computedAttribute();
|
||||
if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) {
|
||||
const model = {'username': Cookies.get(this.cookiesName), 'password': Cookies.get(this.cookiesToken)};
|
||||
const model = {'username': Cookies.get(this.cookiesName), 'password': Cookies.get(this.cookiesToken), 'project':loginInfo[this.project].loginParam};
|
||||
model.type = this.modelType;
|
||||
this.$store.dispatch('Login', model).then(() => {
|
||||
this.$store.dispatch('SetAccount', model.username);
|
||||
@ -245,7 +245,9 @@ export default {
|
||||
},
|
||||
loginRefresh() {
|
||||
this.loadingCode = true;
|
||||
getLoginWmurl(LoginParams[this.loginClient]).then(response => {
|
||||
const params = LoginParams[this.loginClient];
|
||||
params.project = loginInfo[this.project].loginParam;
|
||||
getLoginWmurl(params).then(response => {
|
||||
this.sessionId = response.data.sessionId;
|
||||
this.loginUrl = response.data.url;
|
||||
this.loadingCode = false;
|
||||
@ -255,8 +257,7 @@ export default {
|
||||
this.loginUrl = '';
|
||||
}, 3 * 60 * 1000);
|
||||
this.checkLoginStatus();
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
}).catch(() => {
|
||||
this.loadingCode = false;
|
||||
this.$messageBox(this.$t('login.getLoginQrCode'));
|
||||
});
|
||||
@ -280,7 +281,7 @@ export default {
|
||||
this.handleLoginSucessRoute();
|
||||
});
|
||||
}).catch(error => {
|
||||
if (error.data && error.data.status === '1') {
|
||||
if (error.data && error.data.status === 'WAIT') {
|
||||
self.scanSuccess = true;
|
||||
}
|
||||
self.checkLoginStatus();
|
||||
|
@ -105,6 +105,7 @@ export default {
|
||||
return lastData;
|
||||
},
|
||||
covertData(memberVOList, element) {
|
||||
debugger;
|
||||
const member = memberVOList.find(elem=>{ return elem.id == element.memberId; });
|
||||
const memberName = member.name;
|
||||
switch (element.type) {
|
||||
@ -127,9 +128,10 @@ export default {
|
||||
}
|
||||
case 'Command':
|
||||
{
|
||||
const command = CommandHandler.getScriptDefinition(element.operationType);
|
||||
let operateType = command.operate.split('_')[0];
|
||||
const data = command.operate.toUpperCase();
|
||||
// const command = CommandHandler.getScriptDefinition(element.operationType);
|
||||
const commandName = element.operationType;
|
||||
let operateType = commandName.split('_')[0];
|
||||
const data = commandName.toUpperCase();
|
||||
if (operateType == 'CM') {
|
||||
operateType = 'ControlConvertMenu';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user