chauncey 10 miesięcy temu
rodzic
commit
ac82b2bac1

+ 0 - 72
src/views/disaster/WorkRecord.md

@@ -1,72 +0,0 @@
-### 25/5/13
-
-##### 灾害防范模块
-
-- [x] 准备通用模块-树结构选择
-
-##### 灾害预警-预警信息
-
-- [x] 不确定后端能否拿到数据 添加页面先不做
-
-##### 灾害预警-防御通知
-
-- [x] 创建灾害防御通知页面
-- [x] 提取公共 scss(新建页面)
-- [x] 文件上传组件(是否通用?提取公共组件)
-- [x] 文件在线预览组件、文件在线下载组件
-
-### 25/5/14
-
-#### 灾害防范模块
-
-- [x] 准备通用 hook-form 表单
-
-#### 灾害预警模块
-
-- [x] 完成所有静态页面开发
-
-### 25/5/15
-
-### 灾害预警模块
-
-- [x] search 引用配置项来开发
-- [x] form 引用配置来开发
-- [x] 预警信息做添加页面,将表单数据进行拆分(通用项和定制项)
-- [x] 完成灾害预警模块
-
-### 25/5/16
-
-### 预防检查模块
-
-- [x] 任务管理静态页面完成
-- [x] 任务模板页面完成
-- [ ] 任务执行页面完成
-
-### 25/5/20
-
-### 完成灾害预警 准备提测
-
-### 25/5/22
-
-### 预防检查模块
-
-- [x] 任务管理模块开发完成
-- [ ] 任务执行做到看模板情况
-- [ ] 任务模板的接口、数据结构重构,组件重构
-
-### 灾害防范模块
-
-- [x] 有许多公用逻辑可以抽成 hook 和 util(后续优化)
-- [x] 有很多字段和后端不一样,时间来不及修改(后续优化)
-- [x] 有很多公共组件可以在进行二次封装,后续完成后再进行优化
-
-### 25/5/26
-
-### 灾害处置模块
-
-- [x] 完成基础任务 CollapseItem 组件
-
-### 灾害处置模块-处置管理
-
-- [x] 完成处置管理 Table 页面,接口对完
-- [ ] 完成处置管理表单页面,接口对完

+ 0 - 7
src/views/disaster/disaster-control/PageDisposalManagement.vue

@@ -433,11 +433,4 @@
       max-height: $collapse-container-height-default;
       max-height: $collapse-container-height-default;
     }
     }
   }
   }
-  .collapse-item__icon {
-    width: 20px;
-    &--disabled {
-      cursor: not-allowed;
-      opacity: 0.5;
-    }
-  }
 </style>
 </style>

+ 17 - 10
src/views/disaster/disaster-control/PageDisposalRectification.vue

@@ -37,7 +37,21 @@
                 :name="item.taskName"
                 :name="item.taskName"
                 :defaultOpen="item.id === collapseList[0].id"
                 :defaultOpen="item.id === collapseList[0].id"
               >
               >
-                <template #viewOperation> <img :src="ViewDocument" class="collapse-item__icon" /> </template>
+                <template #viewOperation>
+                  <el-tooltip
+                    :content="item.tableData[0].disasterReportRecordDetailList.length ? '查看' : '任务无损失'"
+                    placement="top"
+                    effect="light"
+                  >
+                    <img
+                      :src="ViewDocument"
+                      :class="[
+                        'collapse-item__icon',
+                        { 'collapse-item__icon--disabled': !item.tableData[0].disasterReportRecordDetailList.length },
+                      ]"
+                    />
+                  </el-tooltip>
+                </template>
                 <template #main-table>
                 <template #main-table>
                   <BasicTable :tableData="item.tableData[0].disasterReportRecordDetailList" :tableConfig="tableConfig">
                   <BasicTable :tableData="item.tableData[0].disasterReportRecordDetailList" :tableConfig="tableConfig">
                     <template #affectedArea="scope">
                     <template #affectedArea="scope">
@@ -236,7 +250,7 @@
         },
         },
       ],
       ],
     }));
     }));
-    taskIds.value = collapseList.value.map((item) => item.id);
+    taskIds.value = collapseList.value.map((item) => item.handleTaskId);
     total.value = res.totalRow;
     total.value = res.totalRow;
     collapseLoading.value = false;
     collapseLoading.value = false;
     nextTick(() => {
     nextTick(() => {
@@ -252,7 +266,7 @@
       ...searchData,
       ...searchData,
     });
     });
     collapseList.value.forEach((item) => {
     collapseList.value.forEach((item) => {
-      item.tableData = res.filter((tableItem) => tableItem.handleTaskId === item.id);
+      item.tableData = res.filter((tableItem) => tableItem.handleTaskId === item.handleTaskId);
     });
     });
     tableConfig.loading = false;
     tableConfig.loading = false;
   };
   };
@@ -327,11 +341,4 @@
     height: $collapse-container-height-default;
     height: $collapse-container-height-default;
     max-height: $collapse-container-height-default;
     max-height: $collapse-container-height-default;
   }
   }
-  .collapse-item__icon {
-    width: 20px;
-    &--disabled {
-      cursor: not-allowed;
-      opacity: 0.5;
-    }
-  }
 </style>
 </style>

+ 16 - 0
src/views/disaster/disaster-control/src/components/LossRecord.vue

@@ -34,6 +34,21 @@
             :name="item.taskName"
             :name="item.taskName"
             :defaultOpen="item.id === collapseList[0].id"
             :defaultOpen="item.id === collapseList[0].id"
           >
           >
+            <template #viewOperation>
+              <el-tooltip
+                :content="item.tableData[0].disasterReportRecordDetailList.length ? '查看' : '任务无损失'"
+                placement="top"
+                effect="light"
+              >
+                <img
+                  :src="ViewDocument"
+                  :class="[
+                    'collapse-item__icon',
+                    { 'collapse-item__icon--disabled': !item.tableData[0].disasterReportRecordDetailList.length },
+                  ]"
+                />
+              </el-tooltip>
+            </template>
             <template #main-table>
             <template #main-table>
               <el-button
               <el-button
                 type="primary"
                 type="primary"
@@ -126,6 +141,7 @@
 </template>
 </template>
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
+  import ViewDocument from '../svg/view-document.svg';
   import { ref, reactive, onMounted, nextTick, onUnmounted } from 'vue';
   import { ref, reactive, onMounted, nextTick, onUnmounted } from 'vue';
   import { Plus } from '@element-plus/icons-vue';
   import { Plus } from '@element-plus/icons-vue';
   import Search from '@/views/disaster/components/Search.vue';
   import Search from '@/views/disaster/components/Search.vue';

+ 7 - 0
src/views/disaster/disaster-control/src/style/collapse.scss

@@ -33,3 +33,10 @@
   text-overflow: ellipsis;
   text-overflow: ellipsis;
   white-space: nowrap;
   white-space: nowrap;
 }
 }
+.collapse-item__icon {
+  width: 20px;
+  &--disabled {
+    cursor: not-allowed;
+    opacity: 0.5;
+  }
+}