增加取消共享

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 = {}) { export function getMoveAndAddCopyTreeAPI(data = {}) {
return request({ return request({

View File

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

View File

@ -244,6 +244,7 @@ import EditWord from './tableCom/editWord.vue'
import { import {
getDocCenterRightListAPI, getDocCenterRightListAPI,
deleteDocCenterAPI, deleteDocCenterAPI,
cancelSharePermissionAPI,
} from '@/api/publicService/docCenter' } from '@/api/publicService/docCenter'
export default { export default {
name: 'RightTable', name: 'RightTable',
@ -384,6 +385,11 @@ export default {
click: this.handleAddCopy_1, click: this.handleAddCopy_1,
acthType: [null], acthType: [null],
}, },
{
label: '取消共享',
click: this.handleCancelShare_1,
acthType: ['1', '2'],
},
], ],
dialogConfig: { 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() { handleCloseShareDialog() {
this.shareDialogConfig.outerVisible = false this.shareDialogConfig.outerVisible = false