Bläddra i källkod

修改任务执行操作按钮判断条件

chauncey 10 månader sedan
förälder
incheckning
3a2de502a3

+ 1 - 1
src/hooks/useFormConfigHook.ts

@@ -45,7 +45,7 @@ export const useFormConfigHook = <T extends Record<string, any> = Record<string,
         msgConfirm('当前页面存在修改,是否确认离开当前页面?', '提示', {
           confirmButtonText: '确认',
           cancelButtonText: '取消',
-          customClass: 'customMessageBox--warn',
+          customClass: 'customMessageBox--warning',
         })
           .then(() => {
             next();

+ 1 - 1
src/views/disaster/disaster-control/src/components/UploadImages.vue

@@ -179,7 +179,7 @@
     ElMessageBox.confirm('确定删除该图片吗?', '提示', {
       confirmButtonText: '确定',
       cancelButtonText: '取消',
-      customClass: 'customMessageBox--warn',
+      customClass: 'customMessageBox--warning',
     }).then(() => {
       // 释放对象URL以避免内存泄漏
       URL.revokeObjectURL(uploadedImages[index].url);

+ 6 - 4
src/views/disaster/disaster-precaution/PageTaskExecution.vue

@@ -54,7 +54,11 @@
               />
               <!-- 检查责任人、检查执行人员可以看到 -->
               <ActionButton
-                v-else
+                v-if="
+                  [USER_TYPE.CHECK_RESPONSIBLE, USER_TYPE.CHECK_PERSON].some((type) =>
+                    scope.row.userTypeList.includes(type),
+                  )
+                "
                 text="撤回"
                 :popconfirm="{
                   title: '确定撤回吗?',
@@ -67,9 +71,7 @@
               <ActionButton text="查看" @click="handleCheckItem(scope.row.id, 'view')" />
               <!-- 仅审批人员可以看到 -->
               <ActionButton
-                v-if="
-                  scope.row.userTypeList.includes(USER_TYPE.APPROVER) && !isOverdue24Hours(scope.row.updatedAt)
-                "
+                v-if="scope.row.userTypeList.includes(USER_TYPE.APPROVER) && !isOverdue24Hours(scope.row.updatedAt)"
                 text="撤回"
                 :popconfirm="{
                   title: '确定撤回吗?',