代码调整

This commit is contained in:
joylink_cuiweidong 2022-10-13 17:50:57 +08:00
parent 9a5ba71218
commit 8ceca6ba90
3 changed files with 19 additions and 8 deletions

View File

@ -1,14 +1,17 @@
<template>
<div>
<!-- 设备登陆 -->
<div v-if="syncLogin">
{{}}
</div>
<div v-else v-show="loadedConfig" class="login-container" :style="{ 'background-image': showBackPic?'url(' + bgImg + ')':'none' }">
<!-- 中英文切换 -->
<div class="language_box">
<el-tooltip effect="dark" :content="this.$t('login.clickSwitchLanguage')" placement="bottom-end">
<el-button class="language_btn" type="text" @click="handleLanguage">{{ language }}</el-button>
</el-tooltip>
</div>
<!-- logo和名称 -->
<div class="left-logo-box">
<img class="logo" :src="loginProLogo" :style="{ width: loginProLogoWidth+'px'}">
<span>{{ loginOrgTitle }}</span>
@ -20,12 +23,16 @@
<!-- 默认登陆 -->
<normal-login ref="normalLogin" :project="backProject" :local-project="localProject" @forgetPassword="forgetPassword" @showOrgList="showOrgList" />
</div>
<!-- 基于系统开发 -->
<base-development v-if="baseDevelopment" ref="baseDevelopment" />
<!-- 关于系统 -->
<div class="bottomInfo">
<span>{{ aboutSystem }}</span>
</div>
</div>
<!-- 忘记密码 -->
<forget-password ref="forgetPassword" />
<!-- 选择组织 -->
<OrgSelect ref="orgSelect" @select="selectOrgnization" />
</div>
</template>
@ -41,6 +48,8 @@ import ForgetPassword from './forgetPassword';
import OrgSelect from './orgSelect';
export default {
name:'LoginNew',
// components: { Register },
// export const RegisterCodeList = ['cgy', 'designcgy'];
components: { WechatLogin, NormalLogin, BaseDevelopment, ForgetPassword, OrgSelect },
data() {
return {

View File

@ -77,7 +77,6 @@
</el-form>
</template>
<script>
// export const RegisterCodeList = ['cgy', 'designcgy'];
import QCode from '@/assets/erCode.jpg';
import md5 from 'js-md5';
import Cookies from 'js-cookie';
@ -85,8 +84,6 @@ import Cookies from 'js-cookie';
import { getOrgList, selectOrgnization } from '@/api/login';
export default {
name:'NormalLogin',
// Register,
// components: { ForgetPassword },
props: {
project: {
type: String,
@ -142,8 +139,6 @@ export default {
}
};
},
// created() {
// },
watch: {
'project': function(val) {
if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) {
@ -158,6 +153,7 @@ export default {
}
},
methods:{
//
showPwd() {
if (this.pwdType === 'password') {
this.pwdDisplay = false;
@ -167,12 +163,12 @@ export default {
this.pwdDisplay = true;
}
},
//
loginAction(model) {
this.$store
.dispatch('Login', model)
.then(() => {
this.$store.dispatch('SetAccount', model.username);
// this.handleLoginSucessRoute();
this.checkOrgnizationInfo();
})
.catch(error => {
@ -193,6 +189,7 @@ export default {
}, 5000);
});
},
//
checkOrgnizationInfo() {
getOrgList().then(resp => {
const orgList = resp.data;
@ -205,16 +202,17 @@ export default {
this.handleLoginSucessRoute();
} else {
this.$emit('showOrgList', orgList);
// this.showOrgSelect(orgList).then(this.handleLoginSucessRoute());
}
}).catch(()=>{
this.loading = false;
});
},
//
selectOrg(orgId) {
this.handleLoginSucessRoute();
selectOrgnization(orgId);
},
//
handleLoginSucessRoute() {
this.loading = false;
this.tipsMsg = '';
@ -243,6 +241,7 @@ export default {
}
});
},
//
forgetPassword() {
this.$emit('forgetPassword');
}

View File

@ -12,6 +12,7 @@
<dispatch-cmd v-if="datie" ref="dispatchCmd" @close="close" />
<dispatcher-loger v-if="datie" ref="dispatcherLoger" @close="close" />
<terminal-menu v-if="menuShow" ref="terminalMenu" @pictureChange="pictureChange" @popupTerminalShow="popupTerminalShow" @loadingChange="loadingChange" />
<iscs-system v-else-if="picture === 'iscs'" ref="IscsSystem" />
</div>
</template>
@ -32,6 +33,7 @@ import DigitalStand from '@/views/jlmap3d/simulation/jl3dsimulation';
import IbpPlate from '@/views/ibp/ibpsystem/index';
import TrafficTerminalWork from './trafficTerminalWork';
import BigTrainRunplanManage from '@/views/bigTrainRunplanManage/index';
import IscsSystem from '@/views/iscs/iscsSystem/index';
export default {
name: 'Index',
components: {
@ -46,7 +48,8 @@ export default {
IbpPlate,
TrafficTerminalWork,
DigitalStand,
BigTrainRunplanManage
BigTrainRunplanManage,
IscsSystem
},
data() {
return {