PageProcedureReport.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <div class="safety-platform-container">
  3. <header class="safety-platform-container__header">
  4. <BreadcrumbBack />
  5. <span class="breadcrumb-title">{{ name }}</span>
  6. </header>
  7. <main class="safety-platform-container__main">
  8. <div class="report-container">
  9. <div class="report-title">{{ procedureReport?.eventName }}应急处置</div>
  10. <div class="duration-time">
  11. <div class="container-title">
  12. <span class="line"></span>
  13. <span>应急处置时间</span>
  14. </div>
  15. <TimeLine
  16. :startTime="procedureReport?.startTime"
  17. :completeTime="procedureReport?.completeTime"
  18. :duration="procedureReport?.duration"
  19. />
  20. </div>
  21. <div class="suggestion-info">
  22. <div class="container-title">
  23. <span class="line"></span>
  24. <span>事件总结与改进建议</span>
  25. </div>
  26. <div class="suggestion-content" v-if="procedureReport?.suggestion">{{ procedureReport?.suggestion }}</div>
  27. <div class="suggestion-content" v-else>暂无内容</div>
  28. </div>
  29. <div class="loss-charts">
  30. <div class="container-title">
  31. <span class="line"></span>
  32. <span>损失评估</span>
  33. </div>
  34. <div class="loss-num">
  35. <span class="loss-num-title">共计受损物品</span>
  36. <span class="loss-num-value">{{ procedureReport?.lossRecordCount || 0 }}</span>
  37. </div>
  38. <div v-if="!procedureReport?.lossRecordCount" class="no-loss-record">
  39. <img src="@/assets/images/empty@1X.png" alt="" />
  40. <span>本次事件没有损失</span>
  41. </div>
  42. <div class="charts-container" v-else>
  43. <ChartOfSafetyLevel class="chart" :data="procedureReport?.safetyLevelDistributionList || []" />
  44. <ChartOfDisasterLocation class="chart" :data="procedureReport?.disasterLocationDistributionList || []" />
  45. </div>
  46. </div>
  47. </div>
  48. </main>
  49. </div>
  50. </template>
  51. <script lang="ts" setup>
  52. import { onMounted, ref } from 'vue';
  53. import { useRoute } from 'vue-router';
  54. import TimeLine from './components/TimeLine.vue';
  55. import ChartOfSafetyLevel from './components/ChartOfSafetyLevel.vue';
  56. import ChartOfDisasterLocation from './components/ChartOfDisasterLocation.vue';
  57. import { QueryEmergencyHandleReportRes, getEmergencyProcedureReport } from '@/api/emergency-procedure';
  58. const route = useRoute();
  59. const id = Number(route.params.id);
  60. const name = ref('应急处置报表');
  61. const procedureReport = ref<QueryEmergencyHandleReportRes>();
  62. onMounted(async () => {
  63. procedureReport.value = await getEmergencyProcedureReport(id);
  64. });
  65. </script>
  66. <style lang="scss" scoped>
  67. @use '@/styles/page-details-layout.scss' as *;
  68. .safety-platform-container__header {
  69. flex-direction: row !important;
  70. justify-content: flex-start !important;
  71. gap: 8px !important;
  72. }
  73. .safety-platform-container__main {
  74. padding: 20px 0;
  75. display: flex;
  76. justify-content: center;
  77. }
  78. .report-container {
  79. width: 1000px;
  80. }
  81. .container-title {
  82. height: 24px;
  83. display: flex;
  84. align-items: center;
  85. font-weight: 500;
  86. font-size: 16px;
  87. color: #000000;
  88. .line {
  89. width: 3px;
  90. height: 16px;
  91. background: #1777ff;
  92. margin-right: 13px;
  93. }
  94. }
  95. .report-title {
  96. font-weight: 500;
  97. font-size: 20px;
  98. color: rgba(0, 0, 0, 0.85);
  99. display: flex;
  100. justify-content: center;
  101. margin-bottom: 30px;
  102. }
  103. .duration-time,
  104. .suggestion-info,
  105. .loss-charts {
  106. margin-bottom: 20px;
  107. }
  108. .suggestion-content {
  109. margin: 10px 16px;
  110. font-weight: 500;
  111. font-size: 14px;
  112. color: #333333;
  113. white-space: pre-line;
  114. }
  115. .loss-num {
  116. width: 352px;
  117. height: 42px;
  118. background: #e7f1ff;
  119. border-radius: 2px;
  120. margin: 10px 16px;
  121. font-weight: 400;
  122. font-size: 14px;
  123. color: #000000;
  124. display: flex;
  125. align-items: center;
  126. padding: 0 16px;
  127. .loss-num-title {
  128. margin-right: 8px;
  129. }
  130. .loss-num-value {
  131. color: #1777ff;
  132. }
  133. }
  134. .no-loss-record {
  135. display: flex;
  136. flex-direction: column;
  137. align-items: center;
  138. justify-content: center;
  139. gap: 10px;
  140. color: #bfbfbf;
  141. }
  142. .charts-container {
  143. display: flex;
  144. justify-content: space-between;
  145. align-items: center;
  146. margin: 40px 20px;
  147. .chart {
  148. width: 50%;
  149. height: 400px;
  150. min-width: 300px;
  151. min-height: 300px;
  152. }
  153. }
  154. </style>