Browse Source

feature_20260108_陈列奖励案任务合并

zhujindu 1 week ago
parent
commit
9228b498ca

+ 9 - 4
src/components/deleteUploadImgTaskPhoto.vue

@@ -15,6 +15,7 @@
             :photoIdentifyType="photoIdentifyType"
             :pictureSource="pictureSource"
             :continuousShoot="continuousShoot"
+            :objectType="objectType"
             @newimgarr="newimgarr"
             ref="uploadVNormal" />
         </div>
@@ -25,7 +26,7 @@
             v-if="(photoIdentifyType != 6 || photoIdentifyType != 7) && types != 'edit'"
             name="close"
             size="16"
-            v-on:click="deleteImg(index, urls.id)" />
+            v-on:click="deleteImg(index, urls.fileIdSplicing)" />
           <img
             v-if="urls.type == '2'"
             :src="urls.fileUrl"
@@ -104,6 +105,10 @@ export default {
       type: String,
       default: '0',
     },
+    objectType: {
+      type: String,
+      default: '',
+    },
   },
   watch: {
     imgs: {
@@ -118,11 +123,11 @@ export default {
     };
   },
   methods: {
-    deleteImg(index, collectionItemId) {
-      removePhotoBatch({ fileId: collectionItemId }).then((res) => {
+    deleteImg(index, fileIdList) {
+      removePhotoBatch({ fileIdList: fileIdList.split(',') }).then((res) => {
         if (res.code == 200) {
           this.$toast('删除成功!');
-          this.imgs.splice(index, 1);
+          this.$emit('upDataDetail');
         } else {
           this.$toast('删除失败!');
         }

+ 6 - 5
src/components/uploadVNormalTaskPhoto.vue

@@ -9,6 +9,7 @@
     <H5Camera
       @getImg="getImg"
       ref="H5Camera"
+      :objectType="objectType"
       :capture="pictureSource == '1' ? '' : 'camera'"
       v-else />
     <div id="allmap"></div>
@@ -84,8 +85,8 @@ export default {
       default: '0',
     },
     collectionItemId: {
-      type: String,
-      default: '0',
+      type: [String, Number],
+      default: '',
     },
     // uploadid: {
     //   type: String,
@@ -161,7 +162,7 @@ export default {
     };
   },
   created() {
-    console.log(this.taskList);
+    console.log(this.photoIdentifyType + 'ssss');
   },
   methods: {
     // 原生H5拍照图片
@@ -341,7 +342,7 @@ export default {
         secondCollectionId: '', //	否	Long	第二级采集项id,取当前采集项的字段就行
         putInCode: that.putInCode, //投放编号
         deviceCode: '', //	否	String	当前任务对应的设备编号
-        photoIdentifyType: '', //	否	String	图片识别类型:字典-photo_identify_type
+        photoIdentifyType: that.photoIdentifyType, //	否	String	图片识别类型:字典-photo_identify_type
         equipmentCode: '', //	否	String	当前任务对应的资产编号
         inStore: '否', //	否	String	机器是否在店:传选项中文内容,是、否
       };
@@ -461,7 +462,7 @@ export default {
           secondCollectionId: '', //	否	Long	第二级采集项id,取当前采集项的字段就行
           putInCode: that.putInCode, //投放编号
           deviceCode: '', //	否	String	当前任务对应的设备编号
-          photoIdentifyType: '', //	否	String	图片识别类型:字典-photo_identify_type
+          photoIdentifyType: that.photoIdentifyType, //	否	String	图片识别类型:字典-photo_identify_type
           equipmentCode: '', //	否	String	当前任务对应的资产编号
           inStore: '否', //	否	String	机器是否在店:传选项中文内容,是、否
         };

+ 2 - 0
src/views/deviceOutside/suishenbangOutstoreVisit.vue

@@ -632,6 +632,8 @@ export default {
             storeCode: this.urlParameter.storeCode,
             visitsId: this.visitId,
             taskIds: val.taskIds.join(','),
+            storeGroupId: this.storeGroupId,
+            photoType: val.photoType,
           },
         });
       } else {

+ 1 - 0
src/views/deviceWithin/addStoreVisit.vue

@@ -5294,6 +5294,7 @@ export default {
       this.childIndex7 = childIndex7;
       this.pType = type;
       this.collectionItemList;
+      debugger;
       this.filterInStore(this.collectionItemList[index]);
       this.show = true;
     },

+ 59 - 6
src/views/deviceWithin/taskPhotoTaking.vue

@@ -17,9 +17,7 @@
       </template>
     </van-nav-bar>
     <div class="content" v-if="formData">
-      <div
-        class="container"
-        style="width: 94%; margin: 0 auto; border-radius: 6px; padding: 10px 10px 10px 0">
+      <div class="container">
         <van-form ref="tabstoreVal">
           <div v-for="(item, index) in formData.collectionItemList" :key="index">
             <div v-if="item.answerType == 'zp'" class="formLabel z-cell">
@@ -38,7 +36,7 @@
               </van-cell>
               <delete-upload-img
                 :imgs="item.fileInfoList"
-                :storeGroupId="formData.storeGroupId"
+                :storeGroupId="storeGroupId"
                 :taskIds="taskIds"
                 :visitsId="visitsId"
                 :collectionItemId="item.collectionId"
@@ -46,11 +44,23 @@
                 :photoIdentifyType="formData.photoIdentifyType"
                 @upDataDetail="getDetaile"
                 :pictureSource="item.pictureSource"
-                :continuousShoot="item.continuousShoot"></delete-upload-img>
+                :continuousShoot="item.continuousShoot"
+                :objectType="objectType"></delete-upload-img>
             </div>
           </div>
         </van-form>
       </div>
+      <div class="dataList" v-if="dataList">
+        <div class="dataItem" v-for="(item, index) in dataList">
+          <div class="itemTop">
+            <div class="itemIndex">
+              <p>{{ index + 1 }}、</p>
+            </div>
+            <div v-html="item.displayInstructions"></div>
+          </div>
+          <div class="itemBottom"></div>
+        </div>
+      </div>
     </div>
   </div>
 </template>
@@ -65,13 +75,18 @@ export default {
     return {
       isEdit: true,
       formData: null,
+      dataList: null,
       taskIds: [],
       visitsId: null,
+      storeGroupId: '',
+      objectType: '',
     };
   },
   activated() {
     this.taskIds = this.$route.query.taskIds || [];
     this.visitsId = this.$route.query.visitsId || '';
+    this.storeGroupId = this.$route.query.storeGroupId || '';
+    this.objectType = this.$route.query.photoType || '';
     this.getDetaile();
   },
   methods: {
@@ -84,6 +99,7 @@ export default {
         taskIds: this.taskIds.split(','),
       }).then((res) => {
         if (res.data && res.data.length) {
+          this.dataList = res.data;
           this.formData = res.data[0];
         } else {
           this.formData = null;
@@ -101,8 +117,21 @@ export default {
 .taskPhotoTaking {
   display: flex;
   flex-direction: column;
-  background: #fff;
+  width: 100%;
+  height: 100%;
   .content {
+    padding: 10px;
+    flex: 1;
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    .container {
+      background: #fff;
+      width: 100%;
+      border-radius: 6px;
+      padding: 10px;
+    }
     .formLabel {
       margin-left: 20px;
       border-bottom: 1px solid #f1f1f1;
@@ -137,5 +166,29 @@ export default {
       line-height: 26px;
     }
   }
+  .dataList {
+    width: 100%;
+    margin-top: 10px;
+    .dataItem {
+      display: flex;
+      background: #fff;
+      border-radius: 6px;
+      flex-direction: column;
+      margin-bottom: 10px;
+      padding: 10px;
+      font-size: 16px;
+      padding-left: 20px;
+      .itemIndex {
+      }
+      .itemTop {
+        flex: 1;
+      }
+      .itemTop,
+      .itemBottom {
+        display: flex;
+        flex-direction: row;
+      }
+    }
+  }
 }
 </style>