|
|
@@ -1,54 +1,57 @@
|
|
|
<template>
|
|
|
- <div class="info-container">
|
|
|
- <template v-for="reportTask in disasterLossDetailList?.reportTaskList" :key="reportTask.reportDeptId">
|
|
|
- <CollapseItem
|
|
|
- v-if="reportTask.lossRecordList.length"
|
|
|
- :name="`上报单位:${reportTask.reportDeptName}`"
|
|
|
- :isActive="activeId === reportTask.reportDeptId"
|
|
|
- @toggle="handleCollapseToggle(reportTask.reportDeptId)"
|
|
|
- >
|
|
|
- <template #view-operation>
|
|
|
- <div class="rectification-info">
|
|
|
- <span class="num">{{ reportTask.lossRecordCount }}</span>
|
|
|
- <span>条,整改完成{{ reportTask.fixFinishCount }}条</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template #right-header>
|
|
|
- <span class="collapse-item__header--right">
|
|
|
- {{ activeId === reportTask.reportDeptId ? '收起' : '展开' }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- <template #main-table>
|
|
|
- <div class="rectification-table">
|
|
|
- <section class="damaged-list-container">
|
|
|
- <DamagedList
|
|
|
- :damagedList="reportTask.lossRecordList"
|
|
|
- :active-id="activeTaskId || reportTask.lossRecordList[0].fixTaskId"
|
|
|
- @update:activeId="handleActiveTask"
|
|
|
- />
|
|
|
- </section>
|
|
|
- <section class="disaster-info-container">
|
|
|
- <DisasterInfo :LossReportItemFormData="lossRecordListInfo" rectification v-if="lossRecordListInfo" />
|
|
|
- <Rectification
|
|
|
- v-if="lossRecordListInfo?.fixRecordList"
|
|
|
- :rectification-list="lossRecordListInfo?.fixRecordList"
|
|
|
- :rectification-dept-name="lossRecordListInfo?.responsibleDeptName"
|
|
|
- :rectification-responsible-user-list="rectificationResponsibleUserList"
|
|
|
- :rectification-priority="lossRecordListInfo?.priority"
|
|
|
- />
|
|
|
- </section>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </CollapseItem>
|
|
|
- <NoCollapseItem v-else :name="`上报单位:${reportTask.reportDeptName}`">
|
|
|
- <template #view-operation>
|
|
|
- <div class="rectification-info">
|
|
|
- <span class="num">{{ reportTask.lossRecordCount }}</span>
|
|
|
- <span class="info-text">条,上报时间:{{ reportTask.reportTime }}</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </NoCollapseItem>
|
|
|
- </template>
|
|
|
+ <div class="empty-container" v-if="!reportTaskListInfo">
|
|
|
+ <img :src="Empty" alt="暂无数据" />
|
|
|
+ <span>暂无上报数据</span>
|
|
|
+ </div>
|
|
|
+ <div class="info-container" v-else>
|
|
|
+ <CollapseItem
|
|
|
+ v-if="reportTaskListInfo.lossRecordList.length"
|
|
|
+ :name="`上报单位:${reportTaskListInfo.reportDeptName}`"
|
|
|
+ :isActive="activeId === reportTaskListInfo.reportDeptId"
|
|
|
+ opacityIcon
|
|
|
+ @toggle="handleCollapseToggle(reportTaskListInfo.reportDeptId)"
|
|
|
+ >
|
|
|
+ <template #view-operation>
|
|
|
+ <div class="rectification-info">
|
|
|
+ <span class="num">{{ reportTaskListInfo.lossRecordCount }}</span>
|
|
|
+ <span>条,整改完成{{ reportTaskListInfo.fixFinishCount }}条</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #right-header>
|
|
|
+ <span class="collapse-item__header--right">
|
|
|
+ {{ activeId === reportTaskListInfo.reportDeptId ? '收起' : '展开' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template #main-table>
|
|
|
+ <div class="rectification-table">
|
|
|
+ <section class="damaged-list-container">
|
|
|
+ <DamagedList
|
|
|
+ :damagedList="reportTaskListInfo.lossRecordList"
|
|
|
+ :active-id="activeTaskId || reportTaskListInfo.lossRecordList[0].fixTaskId"
|
|
|
+ @update:activeId="handleActiveTask"
|
|
|
+ />
|
|
|
+ </section>
|
|
|
+ <section class="disaster-info-container">
|
|
|
+ <DisasterInfo :LossReportItemFormData="lossRecordListInfo" rectification v-if="lossRecordListInfo" />
|
|
|
+ <Rectification
|
|
|
+ v-if="lossRecordListInfo?.fixRecordList"
|
|
|
+ :rectification-list="lossRecordListInfo?.fixRecordList"
|
|
|
+ :rectification-dept-name="lossRecordListInfo?.responsibleDeptName"
|
|
|
+ :rectification-responsible-user-list="rectificationResponsibleUserList"
|
|
|
+ :rectification-priority="lossRecordListInfo?.priority"
|
|
|
+ />
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </CollapseItem>
|
|
|
+ <NoCollapseItem v-else :name="`上报单位:${reportTaskListInfo.reportDeptName}`">
|
|
|
+ <template #view-operation>
|
|
|
+ <div class="rectification-info">
|
|
|
+ <span class="num">{{ reportTaskListInfo.lossRecordCount }}</span>
|
|
|
+ <span class="info-text">条,上报时间:{{ reportTaskListInfo.reportTime }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </NoCollapseItem>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -64,6 +67,7 @@
|
|
|
import type { PersonGroupItem } from '@/types/person-group/type';
|
|
|
import type { ReportTaskListDetail, LossRecordListDetail } from '@/types/disaster-control';
|
|
|
import { queryUserInfoByIds } from '@/api/system/person-group';
|
|
|
+ import Empty from '@/assets/images/empty@1X.png';
|
|
|
|
|
|
const route = useRoute();
|
|
|
const handleTaskId = Number(route.params.id);
|
|
|
@@ -76,13 +80,6 @@
|
|
|
activeId.value = null;
|
|
|
} else {
|
|
|
activeId.value = itemId;
|
|
|
- reportTaskListInfo.value = reportTaskList.value.find((item) => item.reportDeptId === activeId.value);
|
|
|
- if (!reportTaskListInfo.value) return;
|
|
|
- lossRecordList.value = reportTaskListInfo.value?.lossRecordList;
|
|
|
- activeTaskId.value = lossRecordList.value[0].fixTaskId;
|
|
|
- lossRecordListInfo.value = lossRecordList.value.find((item) => item.fixTaskId === activeTaskId.value);
|
|
|
- getFixUserList(lossRecordListInfo.value?.fixPrincipals);
|
|
|
- getFixRecordUser();
|
|
|
}
|
|
|
};
|
|
|
const handleActiveTask = (fixTaskId: number) => {
|
|
|
@@ -132,7 +129,13 @@
|
|
|
if (!reportTaskListInfo.value) return;
|
|
|
lossRecordList.value = reportTaskListInfo.value?.lossRecordList;
|
|
|
if (!lossRecordList.value.length) return;
|
|
|
- activeTaskId.value = lossRecordList.value[0].fixTaskId;
|
|
|
+ let index = 0;
|
|
|
+ while (index < lossRecordList.value.length && !activeTaskId.value) {
|
|
|
+ if (lossRecordList.value[index].fixTaskId) {
|
|
|
+ activeTaskId.value = lossRecordList.value[index].fixTaskId;
|
|
|
+ }
|
|
|
+ index++;
|
|
|
+ }
|
|
|
lossRecordListInfo.value = lossRecordList.value.find((item) => item.fixTaskId === activeTaskId.value);
|
|
|
getFixUserList(lossRecordListInfo.value?.fixPrincipals);
|
|
|
getFixRecordUser();
|
|
|
@@ -142,4 +145,11 @@
|
|
|
<style lang="scss" scoped>
|
|
|
@use '@/views/disaster/style/info-container.scss' as *;
|
|
|
@use '../style/common.scss' as *;
|
|
|
+ .empty-container {
|
|
|
+ @include flex-center;
|
|
|
+ flex-direction: column;
|
|
|
+ gap: 8px;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
</style>
|