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