-
+
{}
+ },
+ placeholder: {
+ type: String,
+ default: ''
}
},
data() {
@@ -89,7 +93,7 @@ export default {
this.loadData()
},
selectValue(value) {
- if (this.el && this.el.multiple && !(this.value instanceof Array)) {
+ if (this.el && this.el.multiple && value.length > 0) {
value = value.join(',')
}
this.$emit('update:value', value)
diff --git a/magic-boot-ui/src/components/MagicBoot/mb-table.vue b/magic-boot-ui/src/components/MagicBoot/mb-table.vue
index 56fe367..806f309 100644
--- a/magic-boot-ui/src/components/MagicBoot/mb-table.vue
+++ b/magic-boot-ui/src/components/MagicBoot/mb-table.vue
@@ -15,7 +15,7 @@
-
+
{{ row.$index+1 }}
diff --git a/magic-boot-ui/src/views/system/role/role-list.vue b/magic-boot-ui/src/views/system/role/role-list.vue
index 7fe3b40..e8f9046 100644
--- a/magic-boot-ui/src/views/system/role/role-list.vue
+++ b/magic-boot-ui/src/views/system/role/role-list.vue
@@ -74,16 +74,16 @@ export default {
return {
permissionData: [{
label: '全部',
- value: 0
+ value: '0'
}, {
label: '自定义',
- value: 1
+ value: '1'
}, {
label: '本级及子级',
- value: 2
+ value: '2'
}, {
label: '本级',
- value: 3
+ value: '3'
}],
tableOptions: {
url: 'role/list',
@@ -182,7 +182,7 @@ export default {
name: '',
menus: '',
offices: '',
- permission: 0,
+ permission: '0',
code: '',
descRibe: ''
}
@@ -201,7 +201,7 @@ export default {
save() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
- this.$post('role/save', this.temp).then((response) => {
+ this.$post('role/save', this.temp).then(() => {
this.reloadTable()
this.$refs.roleFormDialog.hide()
this.$notify({
diff --git a/magic-boot-ui/src/views/system/user/user-form.vue b/magic-boot-ui/src/views/system/user/user-form.vue
index b75eade..d1b19d6 100644
--- a/magic-boot-ui/src/views/system/user/user-form.vue
+++ b/magic-boot-ui/src/views/system/user/user-form.vue
@@ -32,7 +32,7 @@
-
+
@@ -84,7 +84,7 @@ export default {
password: '',
phone: '',
isLogin: 0,
- roles: '',
+ roles: null,
officeId: null
}
},
diff --git a/magic-boot-ui/src/views/system/user/user-list.vue b/magic-boot-ui/src/views/system/user/user-list.vue
index f8bd3b4..fea30d3 100644
--- a/magic-boot-ui/src/views/system/user/user-list.vue
+++ b/magic-boot-ui/src/views/system/user/user-list.vue
@@ -68,6 +68,17 @@ export default {
type: 'input',
label: '姓名/昵称',
value: ''
+ },
+ roleId: {
+ type: 'select',
+ label: '角色',
+ value: null,
+ properties: {
+ url: 'role/list?size=999999',
+ labelField: 'name',
+ valueField: 'id',
+ el: { multiple: true }
+ }
}
},
cols: [
@@ -85,6 +96,10 @@ export default {
field: 'officeName',
title: '所属机构'
},
+ {
+ field: 'roles',
+ title: '角色'
+ },
{
field: 'phone',
title: '手机号',