Browse Source

feature_20260423_完美门店接口优化bug

zhujindu 6 hours ago
parent
commit
08fda82b01

+ 3 - 1
src/views/historicalVisit/perfectStore.vue

@@ -443,9 +443,11 @@ export default {
       });
     },
     openPerfectStoreTSJ(val) {
+      let tiaoSJArr = this.list.sfaTaskList.filter((val) => val.photoIdentifyType == '3');
+      let taskIds = tiaoSJArr.map((item) => item.taskId).join(',');
       this.$router.push({
         path: '/perfectStoreTSJ',
-        query: { visitId: this.visitsId, taskId: val.taskId },
+        query: { visitId: this.visitsId, taskId: taskIds },
       });
     },
   },

+ 3 - 3
src/views/historicalVisit/perfectStoreSign.vue

@@ -74,12 +74,12 @@ export default {
       this.shopSignDetail = null;
       getVisitsDetailPerfectStoreByTaskId({
         visitsId: this.visitsId,
-        taskId: this.$route.query.taskId,
+        taskIdList: this.$route.query.taskId.split(','),
       })
         .then((res) => {
           this.toastLoading().clear();
-          if (res.code == 200) {
-            this.detail = res.data;
+          if (res.code == 200 && res.data && res.data.length > 0) {
+            this.detail = res.data[0];
             let shopSignArr = this.detail;
             this.shopSignDetail = shopSignArr;
           } else {

+ 2 - 2
src/views/historicalVisit/perfectStoreTSJ.vue

@@ -289,11 +289,11 @@ export default {
       //   this.collectionItemList = [];
       getVisitsDetailPerfectStoreByTaskId({
         visitsId: this.visitsId,
-        taskId: this.$route.query.taskId,
+        taskIdList: this.$route.query.taskId.split(','),
       })
         .then((res) => {
           this.toastLoading().clear();
-          if (res.code == 200) {
+          if (res.code == 200 && res.data && res.data.length > 0) {
             this.detail = res.data;
             this.tiaoSJArr = this.detail;
             console.log(this.tiaoSJArr);

+ 3 - 3
src/views/historicalVisit/perfectStoreTask.vue

@@ -242,11 +242,11 @@ export default {
       this.toastLoading(0, '加载中...', true);
       getVisitsDetailPerfectStoreByTaskId({
         visitsId: this.visitsId,
-        taskId: this.$route.query.taskId,
+        taskIdList: this.$route.query.taskId,
       }).then((res) => {
         this.toastLoading().clear();
-        if (res.code == 200 && res.data) {
-          this.formData = res.data;
+        if (res.code == 200 && res.data && res.data.length > 0) {
+          this.formData = res.data[0];
           console.log(this.formData.taskPhotoRecognitionResult);
           this.getSpanArr(this.formData.taskPhotoRecognitionResult);
           console.log(this.formData);