This commit is contained in:
parent
e6db3ca659
commit
5110cf0def
|
|
@ -5,6 +5,7 @@
|
|||
node-key="id"
|
||||
class="doc-tree"
|
||||
:data="treeData"
|
||||
default-expand-all
|
||||
:props="defaultProps"
|
||||
:highlight-current="true"
|
||||
:expand-on-click-node="false"
|
||||
|
|
|
|||
|
|
@ -3,16 +3,21 @@
|
|||
<!-- 顶部操作栏 -->
|
||||
<div class="action-bar">
|
||||
<div class="action-buttons">
|
||||
<el-button
|
||||
size="small"
|
||||
:key="item.label"
|
||||
:type="item.type"
|
||||
@click="item.click"
|
||||
v-for="item in buttonList"
|
||||
>
|
||||
<i :class="item.icon"></i>
|
||||
{{ item.label }}
|
||||
</el-button>
|
||||
<template v-for="item in buttonList">
|
||||
<el-button
|
||||
size="small"
|
||||
:key="item.label"
|
||||
:type="item.type"
|
||||
@click="item.click"
|
||||
v-if="
|
||||
item.acthType.includes(acthType) &&
|
||||
!item.authType.includes(authType)
|
||||
"
|
||||
>
|
||||
<i :class="item.icon"></i>
|
||||
{{ item.label }}
|
||||
</el-button>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="search-container">
|
||||
|
|
@ -86,16 +91,22 @@
|
|||
</i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item
|
||||
:key="item.label"
|
||||
:command="{
|
||||
row: scope.row,
|
||||
item,
|
||||
}"
|
||||
v-for="item in dropdownList"
|
||||
>
|
||||
{{ item.label }}
|
||||
</el-dropdown-item>
|
||||
<template v-for="item in dropdownList">
|
||||
<el-dropdown-item
|
||||
:key="item.label"
|
||||
:command="{
|
||||
row: scope.row,
|
||||
item,
|
||||
}"
|
||||
v-if="
|
||||
item.acthType.includes(
|
||||
scope.row.auth,
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ item.label }}
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
|
@ -272,6 +283,7 @@ export default {
|
|||
parentId: '',
|
||||
type: '',
|
||||
labelIds: '',
|
||||
auth: '',
|
||||
},
|
||||
tableData: [],
|
||||
|
||||
|
|
@ -282,6 +294,8 @@ export default {
|
|||
type: 'primary',
|
||||
click: this.handleNew,
|
||||
component: 'AddWord',
|
||||
acthType: [0],
|
||||
authType: ['share', 'myShare', 'otherShare'],
|
||||
},
|
||||
{
|
||||
label: '上传',
|
||||
|
|
@ -289,6 +303,8 @@ export default {
|
|||
type: 'success',
|
||||
click: this.handleUpload,
|
||||
component: 'Upload',
|
||||
acthType: [0],
|
||||
authType: ['share', 'myShare', 'otherShare'],
|
||||
},
|
||||
{
|
||||
label: '移动',
|
||||
|
|
@ -296,6 +312,8 @@ export default {
|
|||
type: 'warning',
|
||||
click: this.handleMove,
|
||||
component: 'Move',
|
||||
acthType: [0],
|
||||
authType: ['share', 'myShare', 'otherShare'],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
|
|
@ -303,12 +321,16 @@ export default {
|
|||
type: 'danger',
|
||||
click: this.handleDelete,
|
||||
component: 'Delete',
|
||||
acthType: [0],
|
||||
authType: ['share', 'myShare', 'otherShare'],
|
||||
},
|
||||
{
|
||||
label: '批量下载',
|
||||
icon: 'el-icon-download',
|
||||
type: 'info',
|
||||
click: this.handleBatchDownload,
|
||||
acthType: [0],
|
||||
authType: [],
|
||||
// component: 'DownloadTags',
|
||||
},
|
||||
{
|
||||
|
|
@ -317,6 +339,8 @@ export default {
|
|||
type: 'primary',
|
||||
click: this.handleShare,
|
||||
component: 'SharePermissionForm',
|
||||
acthType: [0],
|
||||
authType: ['share', 'myShare', 'otherShare'],
|
||||
},
|
||||
{
|
||||
label: '添加副本',
|
||||
|
|
@ -324,6 +348,8 @@ export default {
|
|||
type: 'success',
|
||||
click: this.handleAddCopy,
|
||||
component: 'AddCopy',
|
||||
acthType: [0],
|
||||
authType: ['share', 'myShare', 'otherShare'],
|
||||
},
|
||||
],
|
||||
|
||||
|
|
@ -331,26 +357,32 @@ export default {
|
|||
{
|
||||
label: '下载',
|
||||
click: this.handleBatchDownload_1,
|
||||
acthType: ['1', null],
|
||||
},
|
||||
{
|
||||
label: '移动',
|
||||
click: this.handleMove_1,
|
||||
acthType: [null],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
click: this.handleDelete_1,
|
||||
acthType: [null],
|
||||
},
|
||||
{
|
||||
label: '共享',
|
||||
click: this.handleShare_1,
|
||||
acthType: [null],
|
||||
},
|
||||
{
|
||||
label: '重命名',
|
||||
click: this.handleEdit_1,
|
||||
acthType: [null],
|
||||
},
|
||||
{
|
||||
label: '添加副本',
|
||||
click: this.handleAddCopy_1,
|
||||
acthType: [null],
|
||||
},
|
||||
],
|
||||
|
||||
|
|
@ -370,6 +402,8 @@ export default {
|
|||
type: '',
|
||||
id: '',
|
||||
name: '',
|
||||
acthType: '',
|
||||
authType: '',
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -383,11 +417,17 @@ export default {
|
|||
this.queryParams.type = newNode.type
|
||||
this.queryParams.keyWord = ''
|
||||
this.queryParams.labelIds = ''
|
||||
this.queryParams.auth = newNode.auth
|
||||
this.acthType = newNode.auth === null ? 0 : newNode.auth
|
||||
this.authType = newNode.id
|
||||
|
||||
console.log(newNode, 'newNode***')
|
||||
// 可以根据节点 ID 加载对应数据
|
||||
// 这里可以根据实际需求添加节点 ID 到查询参数
|
||||
this.getTableList()
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: false,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@
|
|||
<el-radio-group v-model="form.permission" size="small">
|
||||
<el-radio-button label="1">仅可查看</el-radio-button>
|
||||
<el-radio-button label="2">可查看/下载</el-radio-button>
|
||||
<el-radio-button label="3">可编辑</el-radio-button>
|
||||
<el-radio-button label="4">可管理</el-radio-button>
|
||||
<!-- <el-radio-button label="3">可编辑</el-radio-button>
|
||||
<el-radio-button label="4">可管理</el-radio-button> -->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
|
@ -225,7 +225,7 @@ export default {
|
|||
loading: false,
|
||||
form: {
|
||||
shareTargets: [],
|
||||
permission: '3',
|
||||
permission: '1',
|
||||
},
|
||||
rules: {
|
||||
shareTargets: [
|
||||
|
|
|
|||
Loading…
Reference in New Issue