WXL
2024-06-27 76c30727c77065c808b1c0fb3146080e423e5fe6
src/views/repositoryai/templateku/configurat/index.vue
@@ -535,10 +535,11 @@
                  <!-- 无匹配类型 -->
                  <div class="topicxq">
                    <el-row :gutter="10">
                      <el-col :span="12"
                      <el-col :span="20"
                        ><el-form-item label="无匹配话术">
                          <el-input
                            type="text"
                            type="textarea"
                            style="width: 400px"
                            placeholder="请输入"
                            v-model="topicobj.noMatchText"
                            show-word-limit
@@ -546,7 +547,7 @@
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    <el-row :gutter="10">
                    <!-- <el-row :gutter="10">
                      <el-col :span="12"
                        ><el-form-item label="处理">
                          <el-input
@@ -558,7 +559,7 @@
                          >
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    </el-row> -->
                    <el-row :gutter="10">
                      <el-col :span="16">
@@ -582,10 +583,11 @@
                  </div>
                  <div class="topicxq">
                    <el-row :gutter="10">
                      <el-col :span="12"
                      <el-col :span="20"
                        ><el-form-item label="听不清话术">
                          <el-input
                            type="text"
                            style="width: 400px"
                            type="textarea"
                            placeholder="请输入"
                            v-model="topicobj.noClearlyText"
                            show-word-limit
@@ -593,7 +595,7 @@
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    <el-row :gutter="10">
                    <!-- <el-row :gutter="10">
                      <el-col :span="12"
                        ><el-form-item label="处理">
                          <el-input
@@ -605,7 +607,7 @@
                          >
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    </el-row> -->
                    <el-row :gutter="10">
                      <el-col :span="16">
@@ -629,10 +631,11 @@
                  </div>
                  <div class="topicxq">
                    <el-row :gutter="10">
                      <el-col :span="12"
                      <el-col :span="20"
                        ><el-form-item label="静默话术">
                          <el-input
                            type="text"
                            type="textarea"
                            style="width: 400px"
                            placeholder="请输入"
                            v-model="topicobj.slienceText"
                            show-word-limit
@@ -640,7 +643,7 @@
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    <el-row :gutter="10">
                    <!-- <el-row :gutter="10">
                      <el-col :span="12"
                        ><el-form-item label="处理">
                          <el-input
@@ -652,7 +655,7 @@
                          >
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    </el-row> -->
                    <el-row :gutter="10">
                      <el-col :span="16">
@@ -715,7 +718,7 @@
            </div>
          </div>
          <!-- 多选 -->
          <div
          <!-- <div
            class="topic-dev"
            v-for="(item, index) in valssu"
            :key="item.aaa"
@@ -734,7 +737,7 @@
                </el-checkbox>
              </el-checkbox-group>
            </div>
          </div>
          </div> -->
          <!-- 填空
          <div class="topic-dev" v-for="item in valssu" :key="item.aaa">
            <div class="dev-text">
@@ -756,7 +759,7 @@
      title="添加题目"
      :visible.sync="drawer"
      custom-class="demo-drawer"
      width="50%"
      size="50%"
    >
      <div class="preview-left">
        <el-form
@@ -820,6 +823,12 @@
            </template>
          </el-table-column>
        </el-table>
        <pagination
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getaddtopiclist"
        />
      </div>
    </el-drawer>
  </div>
@@ -867,10 +876,19 @@
      indexAssortlist: [],
      inputValue: "",
      inputValueillness: "",
      topicobj: {},
      topicobj: {
        noMatchText: "",
        noClearlyText: "",
        slienceText: "",
      },
      total: 1,
      id: "",
      ruleForm: {},
      ruleForm: {
        templateName: "",
        ivrLibaTemplateTagList: [],
        ivrLibaTemplateScriptVOList: [],
        tempDetpRelevances: [],
      },
      rules: {},
      optionstag: [],
      prefollowuplist: [],
@@ -959,6 +977,7 @@
    this.courtyardlist = store.getters.courtyardlist;
    this.precedencetype = store.getters.precedencetype;
  },
  mounted() {},
  methods: {
    //公共方法--------------------
@@ -972,40 +991,50 @@
    RoutingDataProcessing() {
      this.id = this.$route.query.id;
      this.task = this.$route.query.task;
      console.log(this.task,'task');
      if (this.task) {
        this.id = this.$route.query.id;
      }
      // console.log(this.task, "task");
      // if (this.task) {
      //   this.id = this.$route.query.id;
      // }
    },
    // 获取表单数据
    getvFollowup() {
      getvFollowup({ id: this.id }).then((res) => {
        this.ruleForm = res.data;
      if (this.id) {
        getvFollowup({ id: this.id }).then((res) => {
          if (res.code == 200) {
            console.log(2211);
            this.ruleForm = res.data;
            this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
            this.ruleForm.suitway = this.ruleForm.suitway.split(",");
            this.ruleForm.campus = this.ruleForm.campus.split(",");
            this.ruleForm.submoduleID = this.ruleForm.submoduleID.split(",");
            this.ruleForm.submoduleID = this.ruleForm.submoduleID.map((res) => {
              return Number(res);
            });
            console.log(
              this.ruleForm.submoduleID,
              "this.ruleForm.submoduleID取"
            );
            this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList;
        this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
        this.ruleForm.suitway = this.ruleForm.suitway.split(",");
        this.ruleForm.campus = this.ruleForm.campus.split(",");
        this.ruleForm.submoduleID = this.ruleForm.submoduleID.split(",");
        this.ruleForm.submoduleID = this.ruleForm.submoduleID.map((res) => {
          return Number(res);
            this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList.map(
              this.processElement
            );
            console.log(this.ruleForm.suitway);
          }
        });
        console.log(this.ruleForm.submoduleID, "this.ruleForm.submoduleID取");
        this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList;
        this.dynamicTags = this.ruleForm.ivrLibaTemplateTagList.map(
          this.processElement
        );
        console.log(this.ruleForm.suitway);
      });
      }
      getillnesslist({
        pageNum: 1,
        pageSize: 100,
      }).then((response) => {
        this.optionsillness = response.rows;
      });
      getillness({ outid: this.id, type: 3 }).then((res) => {
        this.illnesslist = res.rows;
      });
      if (this.id) {
        getillness({ outid: this.id, type: 3 }).then((res) => {
          this.illnesslist = res.rows;
        });
      }
      listDept(this.queryParams).then((response) => {
        this.deptList = this.handleTree(response.data, "deptId");
      });
@@ -1015,6 +1044,20 @@
      // 分类
      getFollowupclassify({}).then((res) => {
        this.indexAssortlist = res.rows;
        if (this.$route.query.assortid) {
          this.ruleForm.assortid = Number(this.$route.query.assortid);
        }
      });
      // 科室
      listDept(this.queryParams).then((response) => {
        this.deptList = this.handleTree(response.data, "deptId");
      });
      // 疾病
      getillnesslist({
        pageNum: 1,
        pageSize: 100,
      }).then((response) => {
        this.optionsillness = response.rows;
      });
      getgenerallist({
        pageNum: 1,
@@ -1050,8 +1093,17 @@
            return item;
          });
      });
      compileFollowup(this.ruleForm).then((res) => {
        this.$modal.msgSuccess("编辑成功");
        this.confirmillness(res.data);
        this.$router.go(-1);
      });
    },
    confirmillness(guid) {
      this.illnesslist.forEach((item, index) => {
        if (guid) {
          item.outid = guid;
        }
        if (!item.id) {
          addtargetillness(item).then((res) => {});
        }
@@ -1059,10 +1111,8 @@
      if (this.illnesslistapi.length) {
        deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
      }
      compileFollowup(this.ruleForm).then((res) => {
        this.$modal.msgSuccess("编辑成功");
        this.$router.go(-1);
      });
      this.illnessVisible = false;
      this.$modal.msgSuccess("编辑成功");
    },
    // 科室处理
    Departmenttreatment() {
@@ -1217,6 +1267,14 @@
    },
    addtopic(row) {
      console.log(row);
      if (
        this.ruleForm.ivrLibaTemplateScriptVOList.some(
          (obj) => obj.questiontitle == row.questiontitle
        )
      ) {
        this.$modal.msgError("该题目已存在");
        return;
      }
      getverbaltrick({ id: row.id }).then((res) => {
        console.log(res, "详情");
        res.data.isoperation = 1;
@@ -1226,6 +1284,7 @@
        });
        this.ruleForm.ivrLibaTemplateScriptVOList.push(res.data);
        this.sortFn();
        this.$modal.msgSuccess("添加成功");
      });
    },
    handleDelete(row) {