This commit is contained in:
BianLzhaoMin 2025-11-19 17:01:25 +08:00
parent e6db3ca659
commit 5110cf0def
3 changed files with 64 additions and 23 deletions

View File

@ -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"

View File

@ -3,16 +3,21 @@
<!-- 顶部操作栏 --> <!-- 顶部操作栏 -->
<div class="action-bar"> <div class="action-bar">
<div class="action-buttons"> <div class="action-buttons">
<el-button <template v-for="item in buttonList">
size="small" <el-button
:key="item.label" size="small"
:type="item.type" :key="item.label"
@click="item.click" :type="item.type"
v-for="item in buttonList" @click="item.click"
> v-if="
<i :class="item.icon"></i> item.acthType.includes(acthType) &&
{{ item.label }} !item.authType.includes(authType)
</el-button> "
>
<i :class="item.icon"></i>
{{ item.label }}
</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">
<el-dropdown-item <template v-for="item in dropdownList">
:key="item.label" <el-dropdown-item
:command="{ :key="item.label"
row: scope.row, :command="{
item, row: scope.row,
}" item,
v-for="item in dropdownList" }"
> v-if="
{{ item.label }} item.acthType.includes(
</el-dropdown-item> scope.row.auth,
)
"
>
{{ item.label }}
</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,
}, },
}, },

View File

@ -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: [