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') {