From 1776f02645a6615106a2ca1b0838ef14962f64e2 Mon Sep 17 00:00:00 2001
From: liweilong <515897141@qq.com>
Date: 星期六, 12 十二月 2020 22:57:27 +0800
Subject: [PATCH] 守卫路由

---
 src/pages/system/admin.vue |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/src/pages/system/admin.vue b/src/pages/system/admin.vue
index 2106553..0fb8a68 100644
--- a/src/pages/system/admin.vue
+++ b/src/pages/system/admin.vue
@@ -36,7 +36,7 @@
 
     <el-table :data="list">
       <el-table-column type="index" label="搴忓彿" align="center" width="60" />
-      <el-table-column label="濮撳悕" prop="name" align="center" min-width="120" />
+      <el-table-column label="鍚嶇О" prop="name" align="center" min-width="120" />
       <el-table-column label="璐﹀彿" prop="account" align="center" min-width="120" />
       <el-table-column label="瑙掕壊" prop="roleName" align="center" min-width="120" />
       <!-- <el-table-column label="鏈�杩戠櫥褰曟椂闂�" prop="loginTime" align="center" min-width="180" /> -->
@@ -101,10 +101,18 @@
             v-model="adminDialogData.sysRoleId"
             clearable
             placeholder="瑙掕壊"
-            class="com-edit-input"
+            style="width: 100%"
           >
             <el-option v-for="item in roleArr" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
+        </el-form-item>
+
+        <el-form-item label="鏄惁鍚敤" prop="sysRoleId">
+          <el-switch
+            v-model="adminDialogData.isUse"
+            :active-value="1"
+            :inactive-value="0"
+          />
         </el-form-item>
 
       </el-form>
@@ -201,7 +209,7 @@
         url: 'admin/list',
         params: {
           pageNum: pageNum,
-          rowCount: pageSize,
+          pageSize: pageSize,
           keyWord: keyWord
         },
         mockData: {
@@ -294,7 +302,8 @@
         account: '',
         password: '',
         passwordSure: '',
-        sysRoleId: ''
+        sysRoleId: '',
+        isUse: 1
       }
       this.adminDialogData = adminDialogData
       this.isShowadminDialog = true
@@ -308,7 +317,8 @@
         password: '',
         passwordSure: '',
         sysRoleId: item.roId,
-        id: item.id
+        id: item.id,
+        isUse: item.isUse
       }
       this.adminDialogData = adminDialogData
       this.isShowadminDialog = true
@@ -327,7 +337,8 @@
             name: adminDialogData.name,
             account: adminDialogData.account,
             password: adminDialogData.password,
-            sysAdRoleId: adminDialogData.sysRoleId
+            sysAdRoleId: adminDialogData.sysRoleId,
+            isUse: adminDialogData.isUse
           }
           var isAdd = adminDialogData.type === 'add'
           var url = isAdd ? 'admin/add' : 'admin/update'

--
Gitblit v1.8.0