WXL
2024-12-03 294e513504423b4726c36046decc649f272851e0
src/views/followvisit/record/detailpage/index.vue
@@ -418,7 +418,7 @@
  getsearchrResults,
  getPersonVoices,
  getTaskservelist,
  getTaskparticty,
  getTaskFollowup,
  Editsingletaskson,
  serviceSubtaskDetailedit,
  serviceSubtaskDetailadd,
@@ -434,6 +434,7 @@
      taskname: "",
      activeName: "wj",
      voice: "",
      templateid:'',
      tableDatatop: [], //题目表
      voiceDatatop: [], //题目表
      Whetherall: false, //是否全部记录展示
@@ -513,13 +514,31 @@
              item.scriptResult = [];
            }
          });
          if (!this.tableDatatop.length) {
          this.puttaskid(this.templateid);
          }
        }
      });
    },
    // 获取问卷完整数据比对
    puttaskid(id) {
      getTaskparticty(id).then((res) => {
      getTaskFollowup(id).then((res) => {
        if (res.code == 200) {
          this.tableDatatop = res.data.ivrTaskTemplateScriptVOList;
          this.tableDatatop.forEach((item) => {
            // 类型判断赋值
            if (item.ivrTaskScriptTargetoptionList) {
              item.targetvalue=1;
              item.questiontext=item.scriptContent;
              item.targetvalue = item.ivrTaskScriptTargetoptionList.map(obj => obj.targetvalue).join('&');
            }
            if (item.targetvalue) {
              item.scriptResult = item.targetvalue.split("&");
            } else {
              item.scriptResult = [];
            }
          });
          console.log(this.tableDatatop,'this.tableDatatop');
        }
      });
@@ -593,7 +612,7 @@
      }).then((res) => {
        if (res.code == 200) {
          this.logsheetlist = res.rows[0].serviceSubtaskList;
          this.puttaskid(this.logsheetlist[0].templateid)
          this.templateid=this.logsheetlist[0].templateid
        }
      });
    },