WXL
2024-02-01 79925204a4e1588d1031ca0429ae318a608a8928
src/views/repositoryai/templateku/configurat/index.vue
@@ -307,7 +307,7 @@
          </el-form-item>
          <el-row :gutter="20">
            <el-col :span="8">
              <el-form-item label="随访前处理" prop="name">
              <el-form-item label="随访前处理(是否需要)" prop="name">
                <el-select
                  v-model="ruleForm.prefollowup"
                  size="medium"
@@ -325,7 +325,7 @@
                </el-select> </el-form-item
            ></el-col>
            <el-col :span="9">
              <el-form-item label="随访后处理" prop="region">
              <el-form-item label="随访后处理(是否需要)" prop="region">
                <el-select
                  v-model="ruleForm.postfollowup"
                  size="medium"
@@ -348,7 +348,7 @@
              <el-form-item label="静默时间(秒)" prop="name">
                <div style="width: 40%">
                  <el-input
                    v-model="ruleForm.name"
                    v-model="ruleForm.silencetime"
                  ></el-input></div></el-form-item
            ></el-col>
            <el-col :span="10">
@@ -591,7 +591,7 @@
                    >
                    <el-col :span="8">
                      <div style="text-align: right; padding-right: 10px">
                        <el-button type="danger" round>删除</el-button>
                        <el-button type="danger" @click="" round>删除</el-button>
                      </div>
                    </el-col>
                  </el-row>
@@ -896,6 +896,7 @@
  delFollowupinfo,
  Followupinfo,
  getFollowuplist,
  deltargetillness,
  getillnesslist,
  illnesslistget,
  getillness,
@@ -958,6 +959,7 @@
        label: "indexAssortName",
      },
      tempDetpRelevanceslist: [],
      delScriptVOList: [],
      variablelist: [
        { variatename: "姓名", variate: "${name}", default: 1 },
        { variatename: "电话", variate: "${phone}", default: 1 },
@@ -1103,6 +1105,9 @@
    Departmenttreatment() {
      this.ruleForm.deptNames = JSON.stringify(this.tempDetpRelevanceslist);
      console.log(this.tempDetpRelevanceslist);
      console.log(this.delScriptVOList, "this.delScriptVOList");
      this.ruleForm.ivrLibaTemplateScriptVOList =
        this.ruleForm.ivrLibaTemplateScriptVOList.concat(this.delScriptVOList);
      const result = this.tempDetpRelevanceslist.map(
        (subArr) => subArr[subArr.length - 1]
      );
@@ -1161,20 +1166,6 @@
        });
    },
    /** 查询题目列表 */
    getList() {
      //   this.loading = true;
      listUser().then((response) => {
        console.log(response);
        // this.userList = response.data;
        // this.total = response.total;
        // this.loading = false;
        console.log(this.userList);
      });
      //   const { rows } = await listUser();
      //   console.log(rows);
      //   this.list = rows;
    },
    // 修改题目信息
    Submittopicobj() {},
@@ -1269,31 +1260,33 @@
    addtopic(row) {
      console.log(row);
      getverbaltrick({ id: row.id }).then((res) => {
        console.log(res);
        console.log(res, "详情");
        res.data.isoperation = 1;
        res.data.id = null;
        res.data.ivrLibaScriptTargetoptionList.forEach((item) => {
        item.isoperation = 1;
      });
      row.isoperation = 1;
      this.ruleForm.ivrLibaTemplateScriptVOList.push(row);
        this.ruleForm.ivrLibaTemplateScriptVOList.push(res.data);
      });
    },
    handleDelete(row) {
      let index = this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row);
      this.ruleForm.ivrLibaTemplateScriptVOList.splice(
        this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row),
        1
      );
      row.isoperation = 3;
      this.delScriptVOList.push(row);
    },
    handleUpdate(row) {
      console.log(row.id);
      getverbaltrick({ id: row.id }).then((res) => {
        this.topicobj = res.data;
        console.log(res.data);
      });
    },
    handleDelete(item) {
      const index = this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(item);
      if (index !== -1) {
        this.ruleForm.ivrLibaTemplateScriptVOList.splice(index, 1); // 从索引位置删除一个元素
        this.sortFn();
      console.log(row);
      if (row.ivrLibaScriptTargetoptionList.length) {
        this.topicobj = row;
      } else {
        console.log("未找到该对象");
        getverbaltrick({ id: row.id }).then((res) => {
          this.topicobj = res.data;
          console.log(res.data, "topicobj");
        });
      }
    },
    syioption(row) {
@@ -1323,12 +1316,7 @@
    sortFn() {
      this.ruleForm.ivrLibaTemplateScriptVOList =
        this.ruleForm.ivrLibaTemplateScriptVOList.map((item, index) => {
          return {
            guid: index + 1,
            id: item.id,
            questiontitle: item.questiontitle,
            questionText: item.questionText,
          };
          return Object.assign({}, item, { guid: (index + 1).toString() });
        });
      console.log(this.ruleForm.ivrLibaTemplateScriptVOList);
    },
@@ -1377,19 +1365,6 @@
      console.log(this.illnesslist);
      this.inputVisibleillness = false;
      this.inputValueillness = "";
    },
    // 保存
    confirmillness() {
      this.illnesslist.forEach((item, index) => {
        if (!item.id) {
          addtargetillness(item).then((res) => {});
        }
      });
      if (this.illnesslistapi.length) {
        deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
      }
      this.illnessVisible = false;
      this.$modal.msgSuccess("编辑成功");
    },
  },
};