소스 검색

文件收集删除限制

duy 1 년 전
부모
커밋
27a9caa178
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      src/views/file/collection.vue

+ 8 - 0
src/views/file/collection.vue

@@ -970,6 +970,14 @@ const sortingModalClose = () => {
 //删除
 const delModalClick = async () => {
     const rows = tableCheckedKeys.value
+    //待审批,已审批都不能删除
+    const result = rows.some(({ isApprovalValue }) => {
+        return isApprovalValue === '待审批' || isApprovalValue === '已审批'
+    })
+    if (result) {
+        window.$message.warning('待审批或者已审批的文件都不能删除')
+        return
+    }
     if (rows.length <= 0) {
         window.$message?.error('请选择需要删除的数据')
     } else {