田源
2024-07-16 386f7e24fb132deacb829a86aeb723dd1d1172eb
Source/plt-web/plt-web-ui/src/page/index/top/index.vue
@@ -27,14 +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"
@@ -51,13 +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&#45;&#45;show">-->
<!--          <top-notice></top-notice>-->
<!--        </div>-->
<!--      </el-tooltip>-->
      <el-tooltip :content="$t('navbar.language')"
                  effect="dark"
                  placement="bottom">
@@ -129,6 +131,7 @@
import topColor from "./top-color";
import topNotice from './top-notice'
import topLang from "./top-lang";
import {changePassword} from "@/api/user"
export default {
  components: {
@@ -151,9 +154,10 @@
        column: [
          {
            label: '登陆密码',
            prop: 'input',
            prop: 'oldPassword',
            span: 24,
            labelWidth:"15%",
            type:'password',
            rules: [
              {
                required: true,
@@ -164,9 +168,10 @@
          },
          {
            label: '新登陆密码',
            prop: 'input1',
            prop: 'password',
            span: 24,
            labelWidth:"15%",
            type:'password',
            rules: [
              {
                required: true,
@@ -177,9 +182,10 @@
          },
          {
            label: '新密码登陆确认',
            prop: 'input2',
            prop: 'confirmPassword',
            span: 24,
            labelWidth:"15%",
            type:'password',
            rules: [
              {
                required: true,
@@ -270,7 +276,6 @@
  methods: {
    // 修改密码
    changePasswordHandler() {
      console.log('123');
      this.passwordVisible = true;
    },
    handleScreen() {
@@ -293,10 +298,16 @@
      this.userBox = true;
    },
    submitSwitch(form, done) {
      this.$store.dispatch("refreshToken", form).then(() => {
        this.userBox = false;
        this.$router.push({path: "/"});
      let userInfo = JSON.parse(localStorage.getItem('saber-userInfo'));
      let params = {userOid:userInfo.content.userOid,...form}
      changePassword(params).then(res =>{
        console.log(res);
      })
      // this.$store.dispatch("refreshToken", form).then(() => {
      //   this.userBox = false;
      //   this.$router.push({path: "/"});
      // })
      done();
    },
    logout() {