From 703455ff2bcb62b762e818c20986f178fe79bc24 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期四, 31 十月 2024 17:26:58 +0800 Subject: [PATCH] 整合代码&&完善业务类型查询模板bug&&添加菜单动态选择icon图标&&添加font图标库 --- Source/plt-web/plt-web-ui/src/page/index/top/index.vue | 83 +++++++++++++++++++++++++---------------- 1 files changed, 51 insertions(+), 32 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/page/index/top/index.vue b/Source/plt-web/plt-web-ui/src/page/index/top/index.vue index 9969734..4f38b79 100644 --- a/Source/plt-web/plt-web-ui/src/page/index/top/index.vue +++ b/Source/plt-web/plt-web-ui/src/page/index/top/index.vue @@ -27,15 +27,15 @@ <top-color></top-color> </div> </el-tooltip> -<!-- 閿欒鏃ュ織--> -<!-- <el-tooltip v-if="showDebug"--> -<!-- :content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')"--> -<!-- effect="dark"--> -<!-- placement="bottom">--> -<!-- <div class="top-bar__item">--> -<!-- <top-logs></top-logs>--> -<!-- </div>--> -<!-- </el-tooltip>--> + <!-- 閿欒鏃ュ織--> + <!-- <el-tooltip v-if="showDebug"--> + <!-- :content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')"--> + <!-- effect="dark"--> + <!-- placement="bottom">--> + <!-- <div class="top-bar__item">--> + <!-- <top-logs></top-logs>--> + <!-- </div>--> + <!-- </el-tooltip>--> <el-tooltip v-if="showLock" :content="$t('navbar.lock')" effect="dark" @@ -52,14 +52,14 @@ <top-theme></top-theme> </div> </el-tooltip> -<!-- 娑堟伅閫氱煡--> -<!-- <el-tooltip :content="$t('navbar.notice')"--> -<!-- effect="dark"--> -<!-- placement="bottom">--> -<!-- <div class="top-bar__item top-bar__item--show">--> -<!-- <top-notice></top-notice>--> -<!-- </div>--> -<!-- </el-tooltip>--> + <!-- 娑堟伅閫氱煡--> + <!-- <el-tooltip :content="$t('navbar.notice')"--> + <!-- effect="dark"--> + <!-- placement="bottom">--> + <!-- <div class="top-bar__item top-bar__item--show">--> + <!-- <top-notice></top-notice>--> + <!-- </div>--> + <!-- </el-tooltip>--> <el-tooltip :content="$t('navbar.language')" effect="dark" placement="bottom"> @@ -112,8 +112,10 @@ :visible.sync="passwordVisible" append-to-body="true" class="avue-dialog" + style="margin-top: -15vh" title="淇敼瀵嗙爜" - width="50%"> + width="50%" + @close="passwordClose"> <avue-form ref="form" v-model="passwordForm" :option="passwordOption" @submit="submitSwitch"/> </el-dialog> </div> @@ -132,6 +134,7 @@ import topNotice from './top-notice' import topLang from "./top-lang"; import {changePassword} from "@/api/user" +import func from "@/util/func"; export default { components: { @@ -150,14 +153,14 @@ passwordVisible: false, passwordForm: {}, passwordOption: { - submitText:'淇濆瓨', + submitText: '淇濆瓨', column: [ { label: '鐧婚檰瀵嗙爜', prop: 'oldPassword', span: 24, - labelWidth:"15%", - type:'password', + labelWidth: "15%", + type: 'password', rules: [ { required: true, @@ -170,8 +173,8 @@ label: '鏂扮櫥闄嗗瘑鐮�', prop: 'password', span: 24, - labelWidth:"15%", - type:'password', + labelWidth: "15%", + type: 'password', rules: [ { required: true, @@ -184,8 +187,8 @@ label: '鏂板瘑鐮佺櫥闄嗙‘璁�', prop: 'confirmPassword', span: 24, - labelWidth:"15%", - type:'password', + labelWidth: "15%", + type: 'password', rules: [ { required: true, @@ -299,17 +302,33 @@ }, submitSwitch(form, done) { let userInfo = JSON.parse(localStorage.getItem('saber-userInfo')); + let params = { + userName: userInfo.content.userId, + oldPassword: func.encryptData(form.oldPassword, 'daliantan0v0vcip'), + password: func.encryptData(form.password, 'daliantan0v0vcip'), + confirmPassword: func.encryptData(form.confirmPassword, 'daliantan0v0vcip'), - let params = {userOid:userInfo.content.userOid,...form} - changePassword(params).then(res =>{ - console.log(res); + } + changePassword(params).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.passwordVisible = false; + this.$store.dispatch("LogOut").then(() => { + resetRouter(); + this.$router.push({path: "/login"}); + }); + } + }).catch(err => { + console.log(err); }) - // this.$store.dispatch("refreshToken", form).then(() => { - // this.userBox = false; - // this.$router.push({path: "/"}); - // }) done(); }, + + // 鍏抽棴淇敼瀵嗙爜瀵硅瘽妗� + passwordClose() { + this.$refs.form.resetFields(); + }, + logout() { this.$confirm(this.$t("logoutTip"), this.$t("tip"), { confirmButtonText: this.$t("submitText"), -- Gitblit v1.9.3