From 1d1e445372055c64a730db63a7e88a18430101ea Mon Sep 17 00:00:00 2001 From: danshihao Date: Mon, 12 Aug 2024 13:36:58 +0800 Subject: [PATCH] =?UTF-8?q?[update=2088398]=20=E6=A0=87=E5=87=86=E6=AF=94?= =?UTF-8?q?=E5=AF=B9=EF=BC=8C=E5=8F=91=E5=B8=83=E6=97=B6=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/lang/en-us.js | 1 + src/common/lang/zh-cn.js | 1 + .../documentTool/documentComparison/DocumentComparison.vue | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/src/common/lang/en-us.js b/src/common/lang/en-us.js index 19773d0..1a2fa9d 100644 --- a/src/common/lang/en-us.js +++ b/src/common/lang/en-us.js @@ -125,6 +125,7 @@ module.exports = { confirmWithdraw: 'Confirm to Withdraw?', confirmWithdrawContent: 'Confirm the withdrawal of this data?', doNotHavePermissionDeleteData: 'Do not have permission to delete this data', + publishedAndCannotDeleted: 'Published and cannot be deleted', noData: 'No Data', dataLoading: 'Data loading...', confirmDelete: 'Confirm the listing title you want to delete?', diff --git a/src/common/lang/zh-cn.js b/src/common/lang/zh-cn.js index 579c39d..9e98c2c 100644 --- a/src/common/lang/zh-cn.js +++ b/src/common/lang/zh-cn.js @@ -125,6 +125,7 @@ module.exports = { confirmWithdraw: '确认撤回?', confirmWithdrawContent: '确认撤回该条数据?', doNotHavePermissionDeleteData: '没有权限删除此数据', + publishedAndCannotDeleted: '已发布不能删除', noData: '暂无数据', dataLoading: '数据加载中...', confirmDelete: '确定删除?', diff --git a/src/views/documentTool/documentComparison/DocumentComparison.vue b/src/views/documentTool/documentComparison/DocumentComparison.vue index 55289a5..ea70380 100644 --- a/src/views/documentTool/documentComparison/DocumentComparison.vue +++ b/src/views/documentTool/documentComparison/DocumentComparison.vue @@ -259,6 +259,11 @@ export default { onOk: () => { const idList = [] const selectionRows = JSON.parse(JSON.stringify(this.selectionRows)) + // 发布状态不能删除 + if (selectionRows.some(item => item.releaseState !== 'draft')) { + this.$message.warning(this.$t('publishedAndCannotDeleted')) + return + } for (let i = 0; i < selectionRows.length; i++) { if (selectionRows[i].createBy === this.userInfo.username && selectionRows[i].releaseState === 'draft') {