From faeb372259f5d47cd3ba304bf383361d18da2714 Mon Sep 17 00:00:00 2001
From: liweilong <515897141@qq.com>
Date: 星期五, 25 十二月 2020 11:15:21 +0800
Subject: [PATCH] 修复管理员管理

---
 src/pages/system/admin.vue |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/pages/system/admin.vue b/src/pages/system/admin.vue
index bdf6a28..1c98754 100644
--- a/src/pages/system/admin.vue
+++ b/src/pages/system/admin.vue
@@ -85,7 +85,7 @@
     />
 
     <!-- 鏂板&缂栬緫 -->
-    <el-dialog :title="adminDialogData.type=='add'?'鏂板绠$悊鍛�':'缂栬緫绠$悊鍛�'" width="500px" :visible.sync="adminDialogVisible" append-to-body>
+    <el-dialog :title="adminDialogData.type=='add'?'鏂板绠$悊鍛�':'缂栬緫绠$悊鍛�'" width="500px" :visible.sync="adminDialogVisible" append-to-body :before-close="hideDialog">
       <el-form ref="adminDialog" :model="adminDialogData" label-width="80px" :rules="rules" size="small">
         <el-form-item label="鍚嶇О" prop="name">
           <el-input v-model="adminDialogData.name" placeholder="璇疯緭鍏ュ悕绉�" />
@@ -122,7 +122,7 @@
           </el-select>
         </el-form-item>
 
-        <el-form-item label="鏄惁鍚敤" prop="sysRoleId">
+        <el-form-item label="鏄惁鍚敤" prop="isUse">
           <el-switch
             v-model="adminDialogData.isUse"
             :active-value="1"
@@ -194,6 +194,9 @@
         ],
         accountType: [
           { required: true, message: '璐﹀彿绫诲瀷涓嶈兘涓虹┖', trigger: 'change' }
+        ],
+        isUse: [
+          { required: true, message: '鏄惁鍚敤涓嶈兘涓虹┖', trigger: 'change' }
         ]
       }
     }
@@ -349,9 +352,9 @@
         passwordSure: '',
         sysRoleId: item.roId,
         id: item.id,
-        isUse: item.isUse
+        isUse: item.isUse,
+        accountType: item.type
       }
-      if (!item.type + '') adminDialogData.accountType = item.type
       this.adminDialogVisible = true
       this.$nextTick(() => {
         this.adminDialogData = adminDialogData

--
Gitblit v1.8.0