diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue
index 8f46b883..670bc469 100644
--- a/src/views/modules/sys/role-add-or-update.vue
+++ b/src/views/modules/sys/role-add-or-update.vue
@@ -13,10 +13,10 @@
-
-
-
+
+
@@ -71,14 +71,14 @@ export default {
visible: false,
menuList: [],
deptList: [],
- roleCodeList: [],
+ roleTypeList: [],
dataForm: {
id: '',
name: '',
menuIdList: [],
deptIdList: [],
remark: '',
- code: ''
+ typeKey: ''
}
}
},
@@ -92,7 +92,7 @@ export default {
}
},
created () {
- this.getRoleCodeList()
+ this.getRoleTypeList()
},
methods: {
init () {
@@ -170,12 +170,12 @@ export default {
}).catch(() => { })
})
}, 1000, { 'leading': true, 'trailing': false }),
- getRoleCodeList () {
- this.$http.get(`/sys/dict/listSimple/sysRoleCode`).then(({ data: res }) => {
+ getRoleTypeList () {
+ this.$http.get(`/sys/dict/listSimple/sysRoleType`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
- this.roleCodeList = res.data
+ this.roleTypeList = res.data
}).catch(() => { })
}
}
diff --git a/src/views/modules/sys/role.vue b/src/views/modules/sys/role.vue
index 9f7c017d..e62280e7 100644
--- a/src/views/modules/sys/role.vue
+++ b/src/views/modules/sys/role.vue
@@ -38,10 +38,11 @@
:label="$t('role.name')"
header-align="center"
align="center">
-
+ align="center"
+ :formatter="showRoleTypeFormatter">
{
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.sysRoleTypeList = res.data
+ }).catch(() => { })
+ },
+ showRoleTypeFormatter: function (row, column) {
+ if (row.typeKey) {
+ let dict = this.sysRoleTypeList.filter(item => item.dictValue === row.typeKey)[0]
+ if (dict) {
+ return dict.dictName
+ }
+ }
+ return ''
+ }
}
}