DESKTOP-6LTVLN7\Liumouren 2 лет назад
Родитель
Сommit
70c1f9ca89

+ 10 - 0
src/components/common/BottomForm/PutPhone.vue

@@ -62,6 +62,15 @@
           clearable
         ></el-cascader>
       </el-form-item>
+      <!-- <el-form-item label="我的标记">
+        <el-cascader
+          v-model="createTaskForm.myMarkers"
+          :options="legendTreeOptions"
+          :props="cascaderProps"
+          collapse-tags
+          clearable
+        ></el-cascader>
+      </el-form-item> -->
       <!-- <el-form-item label="截止时间" prop="c_end_time">
         <el-date-picker v-model="createTaskForm.c_end_time" type="date" placeholder="请选择截止日期"> </el-date-picker>
       </el-form-item> -->
@@ -120,6 +129,7 @@ export default {
         c_user_id: "", // 用户id
         c_area_code: "", // 所属街道行政区划编码
         c_doubtful_points: [], // 疑点信息
+        myMarkers: [],
         c_end_time: "", // 截止时间
         c_task_type: "" // 任务类型(所有图层中的某图层栏目名)
       },

+ 104 - 71
src/components/common/BottomForm/VerificationResult.vue

@@ -9,23 +9,6 @@
     </template>
     <!-- app-任务搜索条件 -->
     <el-form :inline="true" ref="myTaskForm" :model="formInline">
-      <el-form-item label="任务类型">
-        <el-select size="mini" v-model="formInline.taskType" filterable placeholder="请选择" width="100%" clearable>
-          <el-option v-for="item in selectSelectDataMap.projectType" :key="item.index" :label="item.name" :value="item.index">
-          </el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="关联项目">
-        <el-select size="mini" v-model="formInline.associatedItems" placeholder="关联项目" clearable filterable>
-          <el-option
-            v-for="item in selectSelectDataMap.associatedItemsOptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          >
-          </el-option>
-        </el-select>
-      </el-form-item>
       <el-form-item label="已读状态">
         <el-select size="mini" v-model="formInline.auditStatus" placeholder="已读状态" clearable>
           <el-option label="全部" value="-1"></el-option>
@@ -43,37 +26,21 @@
       <!-- item-tab -->
       <el-tab-pane
         v-for="item in tableData"
-        :key="item.id"
-        :label="item.c_app_title"
-        :name="item.id"
+        :key="item.title"
+        :label="item.title"
+        :name="item.title"
         v-loading="tableInitLoading"
         :lazy="true"
       >
         <!-- 描述列表 -->
         <el-descriptions class="margin-top" :column="3" size="small">
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-s-opportunity"></i>
-              任务类型
-            </template>
-            <el-tag size="small">
-              {{ getSelectByIndex("projectType", item.c_task_type) }}
-            </el-tag>
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-location-outline"></i>
-              所属街镇
-            </template>
-            {{ getSelectByIndex("associatedItems", item.c_area_code) }}
-          </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               <i class="el-icon-s-management"></i>
               已读状态
             </template>
-            <el-tag size="small" :type="item.c_app_state == 1 ? 'success' : 'info'" disable-transitions>{{
-              item.c_app_state == 1 ? "已读" : "未读"
+            <el-tag size="small" :type="item.state == 1 ? 'success' : 'info'" disable-transitions>{{
+              item.state == 1 ? "已读" : "未读"
             }}</el-tag>
           </el-descriptions-item>
           <el-descriptions-item>
@@ -81,20 +48,20 @@
               <i class="el-icon-time"></i>
               发布时间
             </template>
-            {{ $dayjs(item.c_create_time).format("YYYY-MM-DD HH:mm:ss") }}
+            {{ $dayjs(item.create_time).format("YYYY-MM-DD HH:mm:ss") }}
           </el-descriptions-item>
           <el-descriptions-item>
             <template slot="label">
               <i class="el-icon-tickets"></i>
               任务描述
             </template>
-            {{ item.c_app_content }}
+            {{ item.content }}
           </el-descriptions-item>
         </el-descriptions>
         <!-- tableBox -->
         <el-table
           v-if="testVIfState"
-          :data="tableDataList[item.id]"
+          :data="tableDataList[item.title]"
           height="30vh"
           stripe
           v-loading="tableInitInfoLoading"
@@ -117,19 +84,34 @@
               {{ scope.row.pointsJson.properties["图斑编号"] }}
             </template>
           </el-table-column>
-          <el-table-column prop="pointsJson.properties.state" label="核查图片">
+          <el-table-column prop="pointsJson.properties.state" label="核查图片" width="220px">
             <template slot-scope="scope">
-              <!-- <span v-for="fileName in scope.row.pointsJson.properties.fileList" :key="fileName">
-                {{ fileName }}
+              <!-- <span>{{ scope.row.pointsJson.fileUrlList ? scope.row.pointsJson.fileUrlList : "null" }}</span> -->
+              <!-- <span
+                v-for="(fileName, index) in scope.row.pointsJson.fileUrlList"
+                :key="scope.row.id + 'fileList' + index"
+                :index="index"
+              >
+                {{ index }}
               </span> -->
-              <el-image
-                v-for="fileUrl in scope.row.pointsJson.properties.fileList"
+              <!-- <el-image
+                v-for="fileUrl in scope.row.pointsJson.fileUrlList"
                 :key="fileUrl"
                 style="width: 100px; height: 100px"
                 :src="fileUrl"
-                :preview-src-list="srcList(scope.row.pointsJson.properties.fileList)"
+                fit="cover"
+                :preview-src-list="srcList(scope.row.pointsJson.fileUrlList)"
+              > -->
+              <el-image
+                v-if="scope.row.pointsJson.fileUrlList"
+                style="width: 100px; height: 100px"
+                fit="cover"
+                :src="srcList(scope.row.pointsJson.fileUrlList)[0]"
+                :preview-src-list="srcList(scope.row.pointsJson.fileUrlList)"
               >
+                <!-- :preview-src-list="srcList(scope.row.pointsJson.fileUrlList)" -->
               </el-image>
+              <span v-if="scope.row.pointsJson.fileUrlList && srcList(scope.row.pointsJson.fileUrlList).length > 1"> …… </span>
             </template>
           </el-table-column>
           <el-table-column prop="pointsJson.properties.state" label="核查状态">
@@ -149,8 +131,8 @@
           </el-table-column>
         </el-table>
         <Pagination
-          v-if="tableDataList[item.id] && tableDataList[item.id].paginationData"
-          :paginationData="tableDataList[item.id].paginationData"
+          v-if="tableDataList[item.title] && tableDataList[item.title].paginationData"
+          :paginationData="tableDataList[item.title].paginationData"
         />
       </el-tab-pane>
     </el-tabs>
@@ -240,6 +222,39 @@ export default {
   },
   props: [],
   methods: {
+    getAppTaskImage(title) {
+      return new Promise((resolve, reject) => {
+        let params = new FormData();
+        params.append("columnId", 1793);
+        params.append("states", "0,1,2");
+        params.append("pageSize", 10);
+        params.append("page", 0);
+        let searchParam = [];
+        let paramItem = {
+          field: "title",
+          searchType: "1",
+          content: {
+            value: title
+          }
+        };
+        searchParam.push(paramItem);
+        if (searchParam.length > 0) {
+          params.append("search", JSON.stringify(searchParam));
+        }
+        this.$Post(this.urlsCollection.selectContentList, params).then(
+          res => {
+            if (res.code === 200 && res.content.data.length > 0) {
+              resolve(res.content.data[0].c_file_base64);
+            } else {
+              reject("图片请求失败");
+            }
+          },
+          error => {
+            reject(error);
+          }
+        );
+      });
+    },
     ToView(val) {
       if (val.state == 1) {
         // 已核查
@@ -251,7 +266,7 @@ export default {
     srcList(fileList) {
       let fileSrcList = [];
       for (let fileName in fileList) {
-        Object.assign(fileSrcList, [fileList[fileName]]);
+        fileSrcList.push(fileList[fileName]);
       }
       return fileSrcList;
     },
@@ -329,7 +344,7 @@ export default {
       if (!this.tableInitLoading) {
         this.tableInitLoading = true;
         let params = new FormData();
-        params.append("columnId", "48");
+        params.append("columnId", "1794");
         params.append("pageSize", this.paginationData.pageSize);
         params.append("page", this.paginationData.currentPage - 1);
         let searchParam = [];
@@ -361,14 +376,6 @@ export default {
           };
           searchParam.push(param1);
         }
-        let param1 = {
-          field: "c_app_tag",
-          searchType: "1",
-          content: {
-            value: true
-          }
-        };
-        searchParam.push(param1);
         if (this.formInline.auditStatus && this.formInline.auditStatus >= 0) {
           let param2 = {
             field: "c_app_state",
@@ -381,7 +388,7 @@ export default {
         }
         params.append("states", "0,1,2,3");
         params.append("search", JSON.stringify(searchParam));
-        let sortparam = [{ field: "c_create_time", orderByType: 2 }];
+        let sortparam = [{ field: "create_time", orderByType: 2 }];
         params.append("orderBy", JSON.stringify(sortparam));
         this.$Post(this.urlsCollection.selectContentList, params).then(
           res => {
@@ -411,14 +418,14 @@ export default {
         this.testVIfState = false;
         let resDataNum = 0;
         this.tableData.forEach(item => {
-          let cTaskId = item.id;
+          let cTaskId = item.c_task_id;
           let paginationData = this.paginationDataInitValue;
           if (
             this.tableDataList &&
-            this.tableDataList[cTaskId] != undefined &&
-            this.tableDataList[cTaskId].paginationData != undefined
+            this.tableDataList[item.title] != undefined &&
+            this.tableDataList[item.title].paginationData != undefined
           ) {
-            paginationData = this.tableDataList[cTaskId].paginationData;
+            paginationData = this.tableDataList[item.title].paginationData;
           }
           let params = new FormData();
           params.append("columnId", "1537");
@@ -442,6 +449,14 @@ export default {
             }
           };
           searchParam.push(param1);
+          let param2 = {
+            field: "title",
+            searchType: "1",
+            content: {
+              value: item.title
+            }
+          };
+          searchParam.push(param2);
           params.append("states", "0,1,2,3");
           params.append("search", JSON.stringify(searchParam));
           let sortparam = [{ field: "c_create_time", orderByType: 2 }];
@@ -454,30 +469,48 @@ export default {
                   resData.forEach(resItem => {
                     if (resItem.c_doubtful_points) {
                       resItem.pointsJson = JSON.parse(resItem.c_doubtful_points);
+                      // 判断是否存在图片并保存到新的对象中;
+                      let fileItemList = resItem.pointsJson.properties.fileList;
+                      if (fileItemList != undefined) {
+                        let fileUrlList = {};
+                        for (let fileItem in fileItemList) {
+                          this.getAppTaskImage(fileItemList[fileItem]).then(
+                            fileUrl => {
+                              fileUrlList[fileItemList[fileItem]] = fileUrl;
+                            },
+                            error => {
+                              console.log(error);
+                            }
+                          );
+                        }
+                        resItem.pointsJson.fileUrlList = fileUrlList;
+                      }
+                      // 判断是否存在图片并保存到新的对象中;end
                     }
                   });
                 }
-                this.tableDataList[cTaskId] = resData;
-                if (!this.tableDataList[cTaskId].paginationData) {
-                  this.tableDataList[cTaskId].paginationData = Object.assign({}, this.paginationDataInitValue);
+                this.tableDataList[item.title] = resData;
+                if (!this.tableDataList[item.title].paginationData) {
+                  this.tableDataList[item.title].paginationData = Object.assign({}, this.paginationDataInitValue);
                 }
-                this.tableDataList[cTaskId].paginationData.total = res.content.count;
+                this.tableDataList[item.title].paginationData.total = res.content.count;
                 resDataNum++;
                 if (resDataNum == this.tableData.length) {
                   // 所有数据加载完成后直接显示
                   setTimeout(() => {
-                    this.tabsValue = this.tableData[0].id;
+                    console.log(this.tableDataList);
+                    this.tabsValue = this.tableData[0].title;
                     this.testVIfState = true;
                   }, 100);
                 }
                 this.tableInitInfoLoading = false;
               } else {
-                this.tableDataList[cTaskId] = [];
+                this.tableDataList[item.title] = [];
                 this.$message.error(res.message);
               }
             },
             error => {
-              this.tableDataList[cTaskId] = [];
+              this.tableDataList[item.title] = [];
               this.$message.error(error);
             }
           );