增加取消共享

This commit is contained in:
BianLzhaoMin 2025-11-19 18:03:34 +08:00
parent 5110cf0def
commit 98adf4e7c6
3 changed files with 36 additions and 1 deletions

View File

@ -124,6 +124,15 @@ export function saveSharePermissionAPI(data = {}) {
})
}
// 取消共享
export function cancelSharePermissionAPI(data = {}) {
return request({
url: '/screen/document/cancelShare',
method: 'POST',
data,
})
}
// 移动和添加副本时获取的树结构
export function getMoveAndAddCopyTreeAPI(data = {}) {
return request({

View File

@ -34,7 +34,7 @@
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in labelTypeList"
v-for="item in dict.type.tags_type"
/>
</el-select>
</el-form-item>
@ -64,6 +64,7 @@ import {
export default {
name: 'AddAndEditForm',
components: { TitleTip },
dicts: ['tags_type'],
props: {
editRow: {
type: Object,

View File

@ -244,6 +244,7 @@ import EditWord from './tableCom/editWord.vue'
import {
getDocCenterRightListAPI,
deleteDocCenterAPI,
cancelSharePermissionAPI,
} from '@/api/publicService/docCenter'
export default {
name: 'RightTable',
@ -384,6 +385,11 @@ export default {
click: this.handleAddCopy_1,
acthType: [null],
},
{
label: '取消共享',
click: this.handleCancelShare_1,
acthType: ['1', '2'],
},
],
dialogConfig: {
@ -756,6 +762,25 @@ export default {
}
},
//
handleCancelShare_1(row) {
this.$confirm('确定取消共享吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
const res = await cancelSharePermissionAPI({
id: row.id,
})
if (res.code === 200) {
this.$modal.msgSuccess('取消共享成功')
this.getTableList()
}
})
.catch(() => {})
},
//
handleCloseShareDialog() {
this.shareDialogConfig.outerVisible = false