From 5041a24a198686f8c93e0adf497f0f638b6c49c4 Mon Sep 17 00:00:00 2001
From: children117cl <278950112@qq.com>
Date: 星期五, 25 六月 2021 12:46:45 +0800
Subject: [PATCH] 不能删除超管;不能冻结超管

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

diff --git a/src/pages/system/admin.vue b/src/pages/system/admin.vue
index af4f3b4..a37b148 100644
--- a/src/pages/system/admin.vue
+++ b/src/pages/system/admin.vue
@@ -41,7 +41,7 @@
       <el-table-column label="璐﹀彿" prop="account" align="center" min-width="120" />
       <el-table-column label="璐﹀彿绫诲瀷" prop="account" align="center" min-width="120">
         <template slot-scope="scope">
-          <span v-if="accountTypeOptions[scope.row.type]">{{ accountTypeOptions[scope.row.type].name }}</span>
+          {{ accountTypeOptions.find(item=>item.id == scope.row.type) ? accountTypeOptions.find(item=>item.id == scope.row.type).name : '' }}
         </template>
       </el-table-column>
       <el-table-column label="瑙掕壊" prop="roleName" align="center" min-width="120" />
@@ -49,6 +49,7 @@
       <el-table-column label="鐘舵��" align="center" min-width="100">
         <template slot-scope="scope">
           <el-switch
+            v-if="scope.row.type!=0"
             v-model="scope.row.isUse"
             :active-value="1"
             :inactive-value="0"
@@ -67,7 +68,7 @@
             @click="showEditAdminDialog(scope.row)"
           >缂栬緫</el-button>
           <el-button
-            v-if="getAuthValueFN('sys_admin_del')"
+            v-if="getAuthValueFN('sys_admin_del') && scope.row.type!=0"
             size="mini"
             type="text warn"
             icon="el-icon-delete"
@@ -94,10 +95,10 @@
         <el-form-item label="璐﹀彿" prop="account">
           <el-input v-model="adminDialogData.account" placeholder="璇疯緭鍏ュ笎鍙�" maxlength="20" :disabled="adminDialogData.type!='add'" />
         </el-form-item>
-        <el-form-item label="瀵嗙爜" :prop="adminDialogData.type==='add'?'password':'none'">
+        <el-form-item label="瀵嗙爜" :prop="adminDialogData.type==='add'||adminDialogData.password||adminDialogData.passwordSure?'password':'none'">
           <el-input v-model="adminDialogData.password" type="password" placeholder="璇疯緭鍏ュ瘑鐮�" maxlength="20" />
         </el-form-item>
-        <el-form-item label="纭瀵嗙爜" :prop="adminDialogData.type==='add'?'passwordSure':'none'">
+        <el-form-item label="纭瀵嗙爜" :prop="adminDialogData.type==='add'||adminDialogData.password||adminDialogData.passwordSure?'passwordSure':'none'">
           <el-input v-model="adminDialogData.passwordSure" type="password" placeholder="璇疯緭鍏ョ‘璁ゅ瘑鐮�" maxlength="20" />
         </el-form-item>
         <!-- 璐﹀彿绫诲瀷 -->
@@ -183,7 +184,8 @@
           { required: true, message: '璐﹀彿涓嶈兘涓虹┖', trigger: 'change' }
         ],
         password: [
-          { required: true, message: '瀵嗙爜涓嶈兘涓虹┖', trigger: 'change' }
+          { required: true, message: '瀵嗙爜涓嶈兘涓虹┖', trigger: 'change' },
+          { min: 5, max: 20, message: '瀵嗙爜鍦�5~20涓瓧涔嬮棿'}
         ],
         passwordSure: [
           { required: true, message: '纭瀵嗙爜涓嶈兘涓虹┖', trigger: 'change' },

--
Gitblit v1.8.0