|
|
@@ -37,13 +37,15 @@
|
|
|
<a-menu-item key="6" @click="closeAll">合并所有</a-menu-item>
|
|
|
</a-menu>
|
|
|
<a-button>
|
|
|
- 树操作 <a-icon type="up" />
|
|
|
+ 树操作
|
|
|
+ <a-icon type="up" />
|
|
|
</a-button>
|
|
|
</a-dropdown>
|
|
|
<a-popconfirm title="确定放弃编辑?" ok-text="确定" cancel-text="取消" @confirm="close">
|
|
|
<a-button style="margin-right: .8rem">取消</a-button>
|
|
|
</a-popconfirm>
|
|
|
- <a-button type="primary" :loading="loading" ghost style="margin-right: 0.8rem" @click="handleSubmit(false)">仅保存</a-button>
|
|
|
+ <a-button type="primary" :loading="loading" ghost style="margin-right: 0.8rem" @click="handleSubmit(false)">仅保存
|
|
|
+ </a-button>
|
|
|
<a-button type="primary" :loading="loading" @click="handleSubmit(true)">保存并关闭</a-button>
|
|
|
</div>
|
|
|
|
|
|
@@ -55,8 +57,7 @@ import { getAction } from '@/api/request'
|
|
|
|
|
|
export default {
|
|
|
name: 'RoleModal',
|
|
|
- components: {
|
|
|
- },
|
|
|
+ components: {},
|
|
|
props: ['treeCheckList', 'treeList'],
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -68,7 +69,8 @@ export default {
|
|
|
allTreeKeys: [],
|
|
|
checkStrictly: true,
|
|
|
visible: false,
|
|
|
- loading: false
|
|
|
+ loading: false,
|
|
|
+ roleData: {}
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -86,8 +88,9 @@ export default {
|
|
|
this.checkedKeys = o
|
|
|
}
|
|
|
},
|
|
|
- show() {
|
|
|
+ show(data) {
|
|
|
this.visible = true
|
|
|
+ this.roleData = data
|
|
|
},
|
|
|
close() {
|
|
|
this.reset()
|
|
|
@@ -113,11 +116,10 @@ export default {
|
|
|
this.close()
|
|
|
},
|
|
|
handleSubmit(exit) {
|
|
|
- const that = this
|
|
|
- const params = {
|
|
|
- permissionIds: that.checkedKeys.join(','),
|
|
|
+ this.$emit('ok', this.checkedKeys, this.roleData)
|
|
|
+ if (exit) {
|
|
|
+ this.visible = false
|
|
|
}
|
|
|
- console.log(params)
|
|
|
},
|
|
|
setThisExpandedKeys(node) {
|
|
|
if (node.children && node.children.length > 0) {
|
|
|
@@ -145,6 +147,7 @@ export default {
|
|
|
this.getAllKeys(temp)
|
|
|
}
|
|
|
getAction(this.treeCheckList).then((res) => {
|
|
|
+ this.checkedKeys = res.checkedKeys
|
|
|
})
|
|
|
})
|
|
|
}
|