From 3f3c98956ea6da68af9610fa2237dd9ec91e6757 Mon Sep 17 00:00:00 2001 From: liweilong <515897141@qq.com> Date: 星期一, 28 十二月 2020 18:33:44 +0800 Subject: [PATCH] 角色管理使用keepalive --- src/pages/system/admin.vue | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/pages/system/admin.vue b/src/pages/system/admin.vue index 0e8b5a3..9217881 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 :before-close="hideDialog"> + <el-dialog :title="adminDialogData.type==='add'?'鏂板绠$悊鍛�':'缂栬緫绠$悊鍛�'" width="500px" :visible.sync="adminDialogVisible" append-to-body> <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="璇疯緭鍏ュ悕绉�" /> @@ -93,10 +93,10 @@ <el-form-item label="璐﹀彿" prop="account"> <el-input v-model="adminDialogData.account" placeholder="璇疯緭鍏ュ笎鍙�" :disabled="adminDialogData.type!='add'" /> </el-form-item> - <el-form-item label="瀵嗙爜" :prop="adminDialogData.type=='add'?'password':''"> + <el-form-item label="瀵嗙爜" :prop="adminDialogData.type==='add'?'password':'none'"> <el-input v-model="adminDialogData.password" type="password" placeholder="璇疯緭鍏ュ瘑鐮�" /> </el-form-item> - <el-form-item label="纭瀵嗙爜" :prop="adminDialogData.type=='add'?'passwordSure':''"> + <el-form-item label="纭瀵嗙爜" :prop="adminDialogData.type==='add'?'passwordSure':'none'"> <el-input v-model="adminDialogData.passwordSure" type="password" placeholder="璇疯緭鍏ョ‘璁ゅ瘑鐮�" /> </el-form-item> <!-- 璐﹀彿绫诲瀷 --> @@ -194,6 +194,9 @@ ], accountType: [ { required: true, message: '璐﹀彿绫诲瀷涓嶈兘涓虹┖', trigger: 'change' } + ], + isUse: [ + { required: true, message: '鏄惁鍚敤涓嶈兘涓虹┖', trigger: 'change' } ] } } @@ -219,10 +222,12 @@ mockData: { code: 100, msg: '', - data: [{ - id: 'xxx', - name: '閲庨┈鍙�' - }] + data: { + list: [{ + id: 'xxx', + name: '閲庨┈鍙�' + }] + } } }, (inf) => { this.roleArr = inf.list || [] @@ -349,9 +354,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