xiongzhu 4 years ago
parent
commit
47b0790310
2 changed files with 10 additions and 8 deletions
  1. 6 6
      src/main/vue/src/views/Admin.vue
  2. 4 2
      src/main/vue/src/views/UserEdit.vue

+ 6 - 6
src/main/vue/src/views/Admin.vue

@@ -225,12 +225,12 @@ export default {
         this.currentTab = this.$route.name;
         this.currentTab = this.$route.name;
         this.getMenus();
         this.getMenus();
 
 
-        let pwdUpdateAt = this.userInfo.pwdUpdateAt;
-        if (!pwdUpdateAt || isBefore(parse(pwdUpdateAt, 'yyyy-MM-dd HH:mm:ss', new Date()), addDays(new Date(), -30))) {
-            this.$alert('您已30天未修改密码,请尽快修改密码', '提示').then(() => {
-                this.onShowPwdDialog();
-            });
-        }
+        // let pwdUpdateAt = this.userInfo.pwdUpdateAt;
+        // if (!pwdUpdateAt || isBefore(parse(pwdUpdateAt, 'yyyy-MM-dd HH:mm:ss', new Date()), addDays(new Date(), -30))) {
+        //     this.$alert('您已30天未修改密码,请尽快修改密码', '提示').then(() => {
+        //         this.onShowPwdDialog();
+        //     });
+        // }
     },
     },
     data() {
     data() {
         return {
         return {

+ 4 - 2
src/main/vue/src/views/UserEdit.vue

@@ -30,7 +30,7 @@
                 <el-input v-model="formData.email"></el-input>
                 <el-input v-model="formData.email"></el-input>
             </el-form-item>
             </el-form-item>
             <el-form-item prop="authorities" label="角色">
             <el-form-item prop="authorities" label="角色">
-                <el-select v-model="formData.authorities" multiple placeholder="请选择" value-key="name">
+                <el-select v-model="formData.authorities[0]" placeholder="请选择" value-key="name">
                     <el-option v-for="item in authorities" :key="item.name" :label="item.nameDesc" :value="item">
                     <el-option v-for="item in authorities" :key="item.name" :label="item.nameDesc" :value="item">
                     </el-option>
                     </el-option>
                 </el-select>
                 </el-select>
@@ -52,6 +52,7 @@ export default {
             this.$http
             this.$http
                 .get(`/user/get/${this.$route.query.id}`)
                 .get(`/user/get/${this.$route.query.id}`)
                 .then(res => {
                 .then(res => {
+                    res.authorities = [(res.authorities || [])[0]];
                     this.formData = res;
                     this.formData = res;
                 })
                 })
                 .catch(e => {
                 .catch(e => {
@@ -72,7 +73,8 @@ export default {
         return {
         return {
             saving: false,
             saving: false,
             formData: {
             formData: {
-                avatar: 'https://zhumj.oss-cn-hangzhou.aliyuncs.com/image/user.jpg'
+                avatar: 'https://zhumj.oss-cn-hangzhou.aliyuncs.com/image/user.jpg',
+                authorities: []
             },
             },
             rules: {
             rules: {
                 avatar: [
                 avatar: [