|
|
|
@ -4,17 +4,34 @@
|
|
|
|
|
<div class="title-text-style">
|
|
|
|
|
长春市<span style="font-size: 10px;vertical-align: top">●</span>学生体质健康信息化管理系统
|
|
|
|
|
</div>
|
|
|
|
|
<div class="logout-div-style">
|
|
|
|
|
<div class="logout-div-style" @click="logout">
|
|
|
|
|
<a-icon type="logout" style="margin-right: 10px;cursor: pointer"/>
|
|
|
|
|
<span style="cursor: pointer">退出登录</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="password-div-style">
|
|
|
|
|
<div class="password-div-style" @click="modifyPass">
|
|
|
|
|
<a-icon type="key" style="margin-right: 10px;cursor: pointer"/>
|
|
|
|
|
<span style="cursor: pointer">修改密码</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="logout-div-style" style="border-left: none">
|
|
|
|
|
{{org_name}}<span style="font-size: 8px;vertical-align: top">●</span>{{person_name}},欢迎您!
|
|
|
|
|
</div>
|
|
|
|
|
<a-spin :spinning="showSpin">
|
|
|
|
|
<a-modal title="修改密码" v-model="showModifyPass" :maskClosable="false" :keyboard="false" :centered="true"
|
|
|
|
|
@ok="onOk" @cancel="onCancel">
|
|
|
|
|
<div class="modify-pass-container-style clearfix">
|
|
|
|
|
<span class="pass-title-style">原密码:</span>
|
|
|
|
|
<a-input-password class="password-style" v-model="oldPass" :allowClear="true" placeholder="请输入原密码,最多50个字符" @change="passChange('oldPass')"/>
|
|
|
|
|
<div class="tips-style">{{oldPassTips}}</div>
|
|
|
|
|
<span class="pass-title-style">新密码:</span>
|
|
|
|
|
<a-input-password class="password-style" v-model="newPass" :allowClear="true" placeholder="请输入新密码,最多50个字符" @change="passChange('newPass')"/>
|
|
|
|
|
<div class="tips-style">{{newPassTips}}</div>
|
|
|
|
|
<span class="pass-title-style" style="margin-bottom: 0">确认密码:</span>
|
|
|
|
|
<a-input-password class="password-style" v-model="confirmPass" :allowClear="true" placeholder="请输入确认密码,最多50个字符"
|
|
|
|
|
style="margin-bottom: 0" @change="passChange('confirmPass')"/>
|
|
|
|
|
<div class="tips-style">{{confirmPassTips}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</a-spin>
|
|
|
|
|
</a-layout-header>
|
|
|
|
|
<a-layout-slider class="layout-slider-style" theme="light" :collapsible="true"
|
|
|
|
|
:collapsedWidth="0" v-model="collapsibled" :zeroWidthTriggerStyle="{backgroundColor:collapsibled?'#31a8fa':'rgba(0,0,0,0)',
|
|
|
|
@ -64,8 +81,11 @@
|
|
|
|
|
<script>
|
|
|
|
|
let selectedKey = "";
|
|
|
|
|
let openKey = [];
|
|
|
|
|
import {Layout,Icon,Menu,Breadcrumb} from 'ant-design-vue';
|
|
|
|
|
import {Layout,Icon,Menu,Breadcrumb,Input,Modal,Spin} from 'ant-design-vue';
|
|
|
|
|
import {mapState} from 'vuex';
|
|
|
|
|
import Cookie from '../../../global-llibs/cookie';
|
|
|
|
|
import Interface from '../../../global-llibs/axios-config';
|
|
|
|
|
import InterfaceConfig from './interfaceConfig';
|
|
|
|
|
export default {
|
|
|
|
|
name: "MainPage",
|
|
|
|
|
data:function(){
|
|
|
|
@ -91,6 +111,14 @@
|
|
|
|
|
selectedMenu:[selectedKey],
|
|
|
|
|
openKeys:openKey,
|
|
|
|
|
echartsUpldate:false,
|
|
|
|
|
showModifyPass:false,
|
|
|
|
|
oldPass:'',
|
|
|
|
|
newPass:'',
|
|
|
|
|
confirmPass:'',
|
|
|
|
|
oldPassTips:'',
|
|
|
|
|
newPassTips:'',
|
|
|
|
|
confirmPassTips:'',
|
|
|
|
|
showSpin:false,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
@ -113,8 +141,120 @@
|
|
|
|
|
AIcon:Icon,
|
|
|
|
|
AMenu:Menu,
|
|
|
|
|
AMenuItem:Menu.Item,
|
|
|
|
|
// AModal:Modal,
|
|
|
|
|
AInputPassword:Input.Password,
|
|
|
|
|
ASpin:Spin
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
passChange:function(type){
|
|
|
|
|
if (type === 'oldPass'){
|
|
|
|
|
if (this.oldPass.replace(/^(\s|\xA0)+|(\s|\xA0)+$/g, '') === ''){
|
|
|
|
|
this.oldPass = ''
|
|
|
|
|
}else if(this.oldPassTips !== ''){
|
|
|
|
|
this.oldPassTips = '';
|
|
|
|
|
}
|
|
|
|
|
}else if(type === 'newPass'){
|
|
|
|
|
if (this.newPass.replace(/^(\s|\xA0)+|(\s|\xA0)+$/g, '') === ''){
|
|
|
|
|
this.newPass = ''
|
|
|
|
|
}else if(this.newPassTips !== ''){
|
|
|
|
|
this.newPassTips = '';
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
if (this.confirmPass.replace(/^(\s|\xA0)+|(\s|\xA0)+$/g, '') === ''){
|
|
|
|
|
this.confirmPass = ''
|
|
|
|
|
}else if(this.confirmPassTips !== ''){
|
|
|
|
|
this.confirmPassTips = '';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onCancel:function(){
|
|
|
|
|
this.showModifyPass = false;
|
|
|
|
|
},
|
|
|
|
|
onOk:function(){
|
|
|
|
|
if (this.oldPass === ''){
|
|
|
|
|
this.oldPassTips = '请输入原密码';
|
|
|
|
|
return;
|
|
|
|
|
}else if (this.newPass === ''){
|
|
|
|
|
this.newPassTips = '请输入新密码';
|
|
|
|
|
return;
|
|
|
|
|
}else if (this.oldPass === this.newPass){
|
|
|
|
|
this.newPassTips = '新密码与原密码相同,请重新输入';
|
|
|
|
|
return;
|
|
|
|
|
}else if(this.confirmPass === ''){
|
|
|
|
|
this.confirmPassTips = '请输入确认密码';
|
|
|
|
|
return;
|
|
|
|
|
}else if(this.newPass !== this.confirmPass){
|
|
|
|
|
this.confirmPassTips = '确认密码与新密码不一致,请重新输入';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.showSpin = true;
|
|
|
|
|
Interface.callInterface([{
|
|
|
|
|
url:InterfaceConfig.saveUserPassword.url,
|
|
|
|
|
params:{
|
|
|
|
|
user_id:this.$store.state.person_id,
|
|
|
|
|
old_login_pwd:this.oldPass,
|
|
|
|
|
login_pwd:this.newPass,
|
|
|
|
|
last_update_person_id:this.$store.state.person_id,
|
|
|
|
|
last_update_person_name:this.$store.state.person_name
|
|
|
|
|
},
|
|
|
|
|
method:InterfaceConfig.saveUserPassword.method,
|
|
|
|
|
isTestLogin:InterfaceConfig.saveUserPassword.isTestLogin
|
|
|
|
|
}],(result)=>{
|
|
|
|
|
this.showSpin = false;
|
|
|
|
|
if (result[0].data.code === 2000){
|
|
|
|
|
this.$toast('密码已修改');
|
|
|
|
|
this.showModifyPass = false;
|
|
|
|
|
}else{
|
|
|
|
|
this.confirmPassTips = result[0].data.msg;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
clearPassData:function(){
|
|
|
|
|
this.oldPass = '';
|
|
|
|
|
this.newPass = '';
|
|
|
|
|
this.confirmPass = '';
|
|
|
|
|
this.confirmPassTips = '';
|
|
|
|
|
this.oldPassTips = '';
|
|
|
|
|
this.newPassTips = '';
|
|
|
|
|
},
|
|
|
|
|
modifyPass:function(){
|
|
|
|
|
this.clearPassData();
|
|
|
|
|
this.showModifyPass = true
|
|
|
|
|
},
|
|
|
|
|
logout:function(){
|
|
|
|
|
let _this = this;
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
title:'退出登录',
|
|
|
|
|
content:'您确定要退出登录吗?',
|
|
|
|
|
centered:true,
|
|
|
|
|
onOk:function () {
|
|
|
|
|
Interface.callInterface([{
|
|
|
|
|
url:InterfaceConfig.logout.url,
|
|
|
|
|
params:{
|
|
|
|
|
user_id:_this.$store.state.person_id,
|
|
|
|
|
token:_this.$store.state.token,
|
|
|
|
|
},
|
|
|
|
|
method:InterfaceConfig.logout.method,
|
|
|
|
|
isTestLogin:InterfaceConfig.logout.isTestLogin
|
|
|
|
|
}],(result)=>{
|
|
|
|
|
if (result[0].data.code === 2000){
|
|
|
|
|
Cookie.delete('person_id');
|
|
|
|
|
Cookie.delete('person_name');
|
|
|
|
|
Cookie.delete('token');
|
|
|
|
|
Cookie.delete('org_id');
|
|
|
|
|
Cookie.delete('org_name');
|
|
|
|
|
Cookie.delete('identity_id');
|
|
|
|
|
Cookie.delete('district_id');
|
|
|
|
|
Cookie.delete('district_name');
|
|
|
|
|
Cookie.delete('role');
|
|
|
|
|
_this.$store.commit("clearState");
|
|
|
|
|
_this.$router.replace({name:'login'});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
backBtnClick:function(){
|
|
|
|
|
this.$bus.emit("ANALYSISRETURN");
|
|
|
|
|
},
|
|
|
|
@ -223,5 +363,30 @@
|
|
|
|
|
margin: 0 16px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.modify-pass-container-style{
|
|
|
|
|
/*padding-top: 20px;*/
|
|
|
|
|
.pass-title-style{
|
|
|
|
|
float: left;
|
|
|
|
|
width: 100px;
|
|
|
|
|
line-height: 32px;
|
|
|
|
|
letter-spacing: 5px;
|
|
|
|
|
text-align: right;
|
|
|
|
|
}
|
|
|
|
|
.password-style{
|
|
|
|
|
float: left;
|
|
|
|
|
width: calc(100% - 120px);
|
|
|
|
|
/*margin-bottom: 20px;*/
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
}
|
|
|
|
|
.tips-style{
|
|
|
|
|
float: left;
|
|
|
|
|
width: calc(100% - 120px);
|
|
|
|
|
height: 20px;
|
|
|
|
|
margin-left: 120px;
|
|
|
|
|
text-align: right;
|
|
|
|
|
color: red;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|