优化角色选菜单的功能
This commit is contained in:
@@ -45,7 +45,7 @@
|
|||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<span slot="action" slot-scope="text, record">
|
<span slot="action" slot-scope="text, record">
|
||||||
<a @click="handleSetFunction(record.id)">分配功能</a>
|
<a @click="handleSetFunction(record)">分配功能</a>
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<!-- <a @click="handleSetPushBtn(record.id)">分配按钮</a>-->
|
<!-- <a @click="handleSetPushBtn(record.id)">分配按钮</a>-->
|
||||||
<!-- <a-divider type="vertical" />-->
|
<!-- <a-divider type="vertical" />-->
|
||||||
@@ -131,8 +131,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSetFunction(id) {
|
handleSetFunction(record) {
|
||||||
this.$refs.roleFunctionModal.edit(id);
|
this.$refs.roleFunctionModal.edit(record);
|
||||||
this.$refs.roleFunctionModal.title = "分配功能";
|
this.$refs.roleFunctionModal.title = "分配功能";
|
||||||
this.$refs.roleFunctionModal.disableSubmit = false;
|
this.$refs.roleFunctionModal.disableSubmit = false;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -76,16 +76,16 @@
|
|||||||
created () {
|
created () {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
edit (id) {
|
edit (record) {
|
||||||
this.form.resetFields();
|
this.form.resetFields();
|
||||||
this.model = Object.assign({}, {});
|
this.model = Object.assign({}, {});
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model,'name', 'type', 'description'))
|
this.form.setFieldsValue(pick(this.model,'name', 'type', 'description'))
|
||||||
});
|
});
|
||||||
this.roleId = id
|
this.roleId = record.id
|
||||||
this.checkedKeys = []
|
this.checkedKeys = []
|
||||||
this.loadTree(id)
|
this.loadTree(record.id)
|
||||||
},
|
},
|
||||||
close () {
|
close () {
|
||||||
this.$emit('close');
|
this.$emit('close');
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
that.confirmLoading = true;
|
that.confirmLoading = true;
|
||||||
let formData = Object.assign(this.model, values);
|
let formData = Object.assign(this.model, values);
|
||||||
formData.type = 'RoleFunctions'
|
formData.type = 'RoleFunctions'
|
||||||
formData.keyId = this.model.id
|
formData.keyId = this.roleId
|
||||||
formData.value = this.checkedKeys
|
formData.value = this.checkedKeys
|
||||||
let obj;
|
let obj;
|
||||||
checkUserBusiness({'type': 'RoleFunctions','keyId': this.roleId}).then((res)=>{
|
checkUserBusiness({'type': 'RoleFunctions','keyId': this.roleId}).then((res)=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user