|
@@ -5,14 +5,15 @@
|
|
|
key: 'menuId',
|
|
key: 'menuId',
|
|
|
title: 'menuName',
|
|
title: 'menuName',
|
|
|
children: 'children',
|
|
children: 'children',
|
|
|
- }" @nodeClick="onNodeClick" @addBtnClick="onAddBtnClick" @deleteBtnClick="onDeleteBtnClick" />
|
|
|
|
|
|
|
+ }" :permission="tree_permission_list" @nodeClick="onNodeClick" @addBtnClick="onAddBtnClick"
|
|
|
|
|
+ @deleteBtnClick="onDeleteBtnClick" />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="right">
|
|
<div class="right">
|
|
|
<a-card title="详情" style="height: 100%;">
|
|
<a-card title="详情" style="height: 100%;">
|
|
|
<ResourceForm :resource_form="resource_form" @save="orgFromSave" @reset="orgFromReset">
|
|
<ResourceForm :resource_form="resource_form" @save="orgFromSave" @reset="orgFromReset">
|
|
|
<template #actions>
|
|
<template #actions>
|
|
|
- <a-button @click="orgFromSave">保存</a-button>
|
|
|
|
|
|
|
+ <a-button v-hasPerm="'system:resource:edit'" @click="orgFromSave">保存</a-button>
|
|
|
<a-button @click="orgFromReset">重置</a-button>
|
|
<a-button @click="orgFromReset">重置</a-button>
|
|
|
</template>
|
|
</template>
|
|
|
</ResourceForm>
|
|
</ResourceForm>
|
|
@@ -31,7 +32,7 @@ import { Message } from '@arco-design/web-vue';
|
|
|
import TreeParts from '../TreeParts.vue';
|
|
import TreeParts from '../TreeParts.vue';
|
|
|
import ResourceForm from './ResourceForm.vue';
|
|
import ResourceForm from './ResourceForm.vue';
|
|
|
import Modal from '../Modal.vue';
|
|
import Modal from '../Modal.vue';
|
|
|
-
|
|
|
|
|
|
|
+import { hasPermission } from '../../../utils/permission';
|
|
|
import {
|
|
import {
|
|
|
QueryResourceTree, QueryResourceDetail, UpdateResource, CreateResource, DeleteResource
|
|
QueryResourceTree, QueryResourceDetail, UpdateResource, CreateResource, DeleteResource
|
|
|
} from '../../../apis/permission/resource';
|
|
} from '../../../apis/permission/resource';
|
|
@@ -39,6 +40,11 @@ import {
|
|
|
const resourcevisible = ref(false);
|
|
const resourcevisible = ref(false);
|
|
|
const is_edit_mode = ref(true);
|
|
const is_edit_mode = ref(true);
|
|
|
const resourcetree_data = ref([]);
|
|
const resourcetree_data = ref([]);
|
|
|
|
|
+const tree_permission_list = {
|
|
|
|
|
+ add_permission: 'system:resource:add',
|
|
|
|
|
+ delete_permission: 'system:resource:delete',
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
|
|
|
const resource_form = reactive({
|
|
const resource_form = reactive({
|
|
|
parentName: '',
|
|
parentName: '',
|
|
@@ -149,7 +155,9 @@ const orgFromCancel = () => {
|
|
|
resourcevisible.value = false;
|
|
resourcevisible.value = false;
|
|
|
}
|
|
}
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- getResourceTree();
|
|
|
|
|
|
|
+ if (hasPermission('system:resource:list')) {
|
|
|
|
|
+ getResourceTree();
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|