Bladeren bron

任务反馈增加图片文件

Hwf 6 maanden geleden
bovenliggende
commit
7b48ebd43a
2 gewijzigde bestanden met toevoegingen van 63 en 2 verwijderingen
  1. 62 1
      src/views/mobileControl/TaskCommand.vue
  2. 1 1
      src/views/mobileControl/index.vue

+ 62 - 1
src/views/mobileControl/TaskCommand.vue

@@ -11,7 +11,7 @@
       <div class="task-list">
         <div class="task-item" v-for="item in taskList" :key="item.id">
           <div class="task-title-box">
-            <div class="task-title">{{ item.unit_name }}</div>
+            <div class="task-title">{{ item.unit_name ? item.unit_name : '茂名市应急局' }}</div>
           </div>
           <div class="task-header">{{ item.processing_status }}</div>
           <div class="task-item-content">
@@ -32,6 +32,39 @@
         </div>
         <div class="item-data">{{ updateData.task_description }}</div>
       </div>
+      <div class="box-item">
+        <div class="item-header">
+          <i class="icon" />
+          <div class="label">执行单位:</div>
+        </div>
+        <div class="item-data">{{ updateData.task_description }}</div>
+      </div>
+      <div class="box-item">
+        <div class="item-header">
+          <i class="icon" />
+          <div class="label">图片:</div>
+        </div>
+        <div class="item-data2">
+          <van-image
+              v-for="(item, index) in updateData.imgList"
+              :key="index"
+              class="img"
+              fit="fill"
+              :src="baseUrl + downLoadApi + item.url"
+          />
+        </div>
+      </div>
+      <div class="box-item">
+        <div class="item-header">
+          <i class="icon" />
+          <div class="label">文件:</div>
+        </div>
+        <div class="item-data2">
+          <div v-for="(item, index) in updateData.fileList" :key="index" class="file" @click="handleDownload(item)">
+            {{ item.name }}
+          </div>
+        </div>
+      </div>
       <div class="box-item" style="padding-bottom: 0">
         <div class="item-header" style="padding-bottom: 0">
           <i class="icon" />
@@ -56,11 +89,14 @@ import {ref, reactive, watch} from 'vue';
 import {selectTask, updateTaskRegistration} from "@/api/command/JointDuty";
 import {parseTime} from "@/utils/ruoyi";
 import {showSuccessToast} from "vant";
+import {download2} from "@/utils/request";
 
 const props = defineProps({
   eventId: String
 });
 
+const baseUrl = import.meta.env.VITE_BASE_API;
+const downLoadApi = import.meta.env.VITE_BASE_DOWNLOAD_API;
 const queryParams = reactive({
   page: 1,
   page_size: 10,
@@ -130,6 +166,10 @@ const handleUpdate = () => {
     getList();
   })
 }
+// 下载方法
+const handleDownload = (file: any) => {
+  download2(baseUrl + downLoadApi + file.url, file.name);
+};
 </script>
 
 <style lang="scss" scoped>
@@ -233,6 +273,10 @@ const handleUpdate = () => {
 .processing-bg {
   background-color: #ffaf00;
 }
+:deep(.van-dialog__content) {
+  height: 380px;
+  overflow-y: auto;
+}
 .box-item {
   padding: 8px 16px;
   .item-header {
@@ -261,5 +305,22 @@ const handleUpdate = () => {
     max-height: 200px;
     overflow-y: auto;
   }
+  .item-data2 {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    .img {
+      width: calc(50% - 5px);
+      height: 100px;
+      margin-top: 10px;
+      &:nth-child(1), &:nth-child(2) {
+        margin-top: 0;
+      }
+    }
+    .file {
+      width: 100%;
+      color: #1d92ff;
+    }
+  }
 }
 </style>

+ 1 - 1
src/views/mobileControl/index.vue

@@ -311,7 +311,7 @@ const closeOnlinePlotting = () => {
   onlinePlottingId.value = '';
 }
 const getOnlinePlotting = () => {
-  getPatternList2({ page: 1, pageSize: 1000 }).then((res) => {
+  getPatternList2().then((res) => {
     columns.value = res.data;
   })
 }