rescueGatherResultList.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <div class="container">
  3. <div style="padding-top: 16px;display:flex;flex-direction: row;justify-content: space-between;">
  4. <div class="van-doc-block__title">{{get_task_title(type)}}</div>
  5. </div>
  6. <div
  7. v-for="(item, index) in resultData"
  8. :key="item.id"
  9. class="event-list-item"
  10. >
  11. <div class="item-content">
  12. <div class="item-data">
  13. <div class="item-left">
  14. <i class="icon4" />
  15. <div class="item-data-label">{{ get_point_label(index)}}:</div>
  16. </div>
  17. <div class="item-data-value">{{ item.point_name }}</div>
  18. </div>
  19. <div class="item-data">
  20. <div class="item-left">
  21. <i class="icon4" />
  22. <div class="item-data-label">采集结果:</div>
  23. </div>
  24. <div class="item-data-value">{{ item.result }}</div>
  25. </div>
  26. <div class="item-data">
  27. <div class="item-left">
  28. <i class="icon4" />
  29. <div class="item-data-label">备注信息:</div>
  30. </div>
  31. <div class="item-data-value">{{ item.remark }}</div>
  32. </div>
  33. <div class="item-data">
  34. <div class="item-left">
  35. <i class="icon4" />
  36. <div class="item-data-label">现场照片:</div>
  37. </div>
  38. <div class="item-data-image">
  39. <img
  40. v-for="(file, index2) in item.fileList"
  41. :key="file.id"
  42. class="image"
  43. :src="get_img_url(file.url)"
  44. ></img>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </template>
  51. <script lang="ts" setup>
  52. import {reactive, ref, toRefs, onMounted} from 'vue';
  53. import {useRoute, useRouter} from "vue-router";
  54. import {listTaskResult } from "@/api/rescueManagement";
  55. import { showToast } from 'vant';
  56. const route = useRoute();
  57. const router = useRouter();
  58. const id = ref('');
  59. const type = ref('');
  60. const resultData = ref([]);
  61. // 采集业务选项
  62. const businessOptions = [
  63. { text: "全部", value: "" },
  64. { text: "庇护场所采集任务", value: "0" },
  65. { text: "救援队伍采集任务", value: "1" },
  66. { text: "救援设备采集任务", value: "2" }
  67. ];
  68. const data = reactive({
  69. queryParams: {
  70. page: 1,
  71. pageSize: 100
  72. }
  73. });
  74. const { queryParams } = toRefs(data);
  75. const get_point_label = (index) => {
  76. return "采集点" + (index+1);
  77. }
  78. const get_task_title = (business: String) => {
  79. return businessOptions.find(item => item.value == business).text
  80. }
  81. const getList = () => {
  82. listTaskResult(id.value, queryParams.value)
  83. .then(res => {
  84. resultData.value = res.data || [];
  85. });
  86. };
  87. const baseUrl = import.meta.env.VITE_BASE_API;
  88. const downLoadApi = import.meta.env.VITE_BASE_DOWNLOAD_API;
  89. const get_img_url = (url) => {
  90. return baseUrl + downLoadApi + url;
  91. }
  92. onMounted(() => {
  93. id.value = route.query.id as string;
  94. type.value = route.query.type as string;
  95. getList();
  96. })
  97. </script>
  98. <style lang="scss" scoped>
  99. .van-doc-block__title {
  100. color: var(--van-doc-text-color-4);
  101. margin: 0px;
  102. padding: 0 6vmin;
  103. font-size: 4.6vmin;
  104. font-weight: 600;
  105. line-height: 6.0vmin;
  106. }
  107. .event-list-item {
  108. position: relative;
  109. margin: 16px 16px 0;
  110. background: #ffffff;
  111. border-radius: 4px;
  112. border: 0.5px solid #eaedf7;
  113. box-shadow: 0 0 4px 0 #4554661a;
  114. &:first-child {
  115. margin-top: 0px;
  116. }
  117. .item-title {
  118. display: flex;
  119. align-items: center;
  120. justify-content: space-between;
  121. min-height: 46px;
  122. background-image: linear-gradient(180deg, #f3f7fd 0%, #ffffff 100%);
  123. padding: 0 12px;
  124. .item-title-text {
  125. font-size: 16px;
  126. color: #414f64;
  127. font-weight: 600;
  128. }
  129. .item-title-control {
  130. display: inline-flex;
  131. justify-content: center;
  132. align-items: center;
  133. }
  134. .van-button {
  135. width: 73px;
  136. height: 24px;
  137. padding: 0;
  138. }
  139. }
  140. .item-content {
  141. padding: 0 12px 12px;
  142. }
  143. .item-data {
  144. font-size: 14px;
  145. display: flex;
  146. flex-direction: row;
  147. align-items: flex-start;
  148. justify-content: start;
  149. line-height: 26px;
  150. .item-left {
  151. display: flex;
  152. align-items: center;
  153. flex-shrink: 0;
  154. }
  155. .item-data-label {
  156. flex-shrink: 0;
  157. color: #414f64;
  158. }
  159. .item-data-value {
  160. color: #414f64;
  161. }
  162. .item-data-image {
  163. display:flex;
  164. flex-direction: row;
  165. .image {
  166. height:var(--van-uploader-size);;
  167. width:var(--van-uploader-size);;
  168. }
  169. }
  170. }
  171. }
  172. .icon1 {
  173. width: 17px;
  174. height: 16px;
  175. background: url("@/assets/images/event/icon1.png") no-repeat;
  176. background-size: 100% 100%;
  177. margin-right: 7px;
  178. }
  179. .icon2 {
  180. width: 17px;
  181. height: 16px;
  182. background: url("@/assets/images/event/icon2.png") no-repeat;
  183. background-size: 100% 100%;
  184. margin-right: 7px;
  185. }
  186. .icon3 {
  187. width: 17px;
  188. height: 16px;
  189. background: url("@/assets/images/event/icon3.png") no-repeat;
  190. background-size: 100% 100%;
  191. margin-right: 7px;
  192. }
  193. .icon4 {
  194. width: 17px;
  195. height: 16px;
  196. background: url("@/assets/images/event/icon4.png") no-repeat;
  197. background-size: 100% 100%;
  198. margin-right: 7px;
  199. }
  200. </style>