WXL
2024-07-29 6b6cc07fb81f05153fc07995e0a5be5596b5ca4f
src/views/repositoryai/templateku/configurat/index.vue
@@ -188,6 +188,7 @@
                @change="handleInputConfirm"
                filterable
                remote
                allow-create
                reserve-keyword
                default-first-option
                :remote-method="remoteMethodtag"
@@ -388,15 +389,15 @@
                <el-table-column
                  label="标题"
                  align="center"
                  key="questiontitle"
                  prop="questiontitle"
                  key="scriptTopic"
                  prop="scriptTopic"
                  :show-overflow-tooltip="true"
                />
                <el-table-column
                  label="问题话术"
                  align="center"
                  key="questionText"
                  prop="questionText"
                  key="scriptContent"
                  prop="scriptContent"
                  :show-overflow-tooltip="true"
                />
@@ -453,7 +454,7 @@
                </div>
                <el-form-item label="题目标题">
                  <el-input
                    v-model="topicobj.questiontitle"
                    v-model="topicobj.scriptTopic"
                    placeholder="请从左侧列表选择"
                  ></el-input>
                </el-form-item>
@@ -535,10 +536,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 +548,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 +560,7 @@
                          >
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    </el-row> -->
                    <el-row :gutter="10">
                      <el-col :span="16">
@@ -582,10 +584,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 +596,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 +608,7 @@
                          >
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    </el-row> -->
                    <el-row :gutter="10">
                      <el-col :span="16">
@@ -629,10 +632,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 +644,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 +656,7 @@
                          >
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    </el-row> -->
                    <el-row :gutter="10">
                      <el-col :span="16">
@@ -693,18 +697,20 @@
      <div v-if="Editprogress == 3">
        <div class="leftvlue-jbxx">随访模版问题预览</div>
        <el-divider></el-divider>
        <div class="preview-left">
          <!-- 单选 -->
          <div
            class="topic-dev"
            v-for="(item, index) in valssu"
            :key="item.aaa"
            class="scriptTopic-dev"
            v-for="item in valssu"
            :key="item.targetid"
            v-if="item.valueType == 1"
          >
            <div class="dev-text">
              {{ index + 1 }}、[单选]<span>{{ item.questionText }}</span>
              {{ item.targetid }}、[单选]<span>{{ item.scriptContent }}</span>
            </div>
            <div class="dev-xx">
              <el-radio-group v-model="radio">
              <el-radio-group v-model="item.remark">
                <el-radio
                  v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
                  :key="index"
@@ -716,35 +722,41 @@
          </div>
          <!-- 多选 -->
          <div
            class="topic-dev"
            v-for="(item, index) in valssu"
            :key="item.aaa"
            class="scriptTopic-dev"
            v-for="item in valssu"
            :key="item.targetid"
            v-if="item.valueType == 2"
          >
            <div class="dev-text">
              {{ index + 1 }}、[多选]<span>{{ item.questionText }}</span>
              {{ item.targetid }}、[多选]<span>{{ item.scriptContent }}</span>
            </div>
            <div class="dev-xx">
              <el-checkbox-group v-model="radios">
              <el-checkbox-group v-model="item.remark">
                <el-checkbox
                  v-for="(items, indexs) in item.ivrLibaScriptTargetoptionList"
                  :key="indexs"
                  :label="indexs"
                  v-for="(items, index) in item.ivrLibaScriptTargetoptionList"
                  :key="index"
                  :label="index"
                >
                  {{ items.targetvalue }}
                </el-checkbox>
              </el-checkbox-group>
            </div>
          </div>
          <!-- 填空
          <div class="topic-dev" v-for="item in valssu" :key="item.aaa">
          <!-- 填空 -->
          <div
            class="scriptTopic-dev"
            v-for="item in valssu"
            :key="item.targetid"
            v-if="item.valueType == 3"
          >
            <div class="dev-text">
              {{ item.idd }}、[填空]<span>{{ item.wssd }}</span>
              {{ item.targetid }}、[填空]<span>{{ item.scriptContent }}</span>
            </div>
            <div class="dev-xx">
              <el-input placeholder="请输入答案" v-model="radioas" clearable>
              </el-input>
            </div>
          </div> -->
          </div>
        </div>
        <el-button type="primary" plain @click="laststep()">上一步</el-button>
        <el-button type="warning" @click="measurement()">前往测试</el-button>
@@ -756,7 +768,7 @@
      title="添加题目"
      :visible.sync="drawer"
      custom-class="demo-drawer"
      width="50%"
      size="50%"
    >
      <div class="preview-left">
        <el-form
@@ -768,7 +780,7 @@
        >
          <el-form-item label="标题" prop="userName">
            <el-input
              v-model="queryParams.questiontitle"
              v-model="queryParams.scriptTopic"
              placeholder="请输入"
              clearable
              style="width: 200px"
@@ -793,15 +805,23 @@
          <el-table-column
            label="标题"
            align="center"
            key="questiontitle"
            prop="questiontitle"
            key="scriptTopic"
            prop="scriptTopic"
            width="100"
          />
          <el-table-column
            label="问题话术"
            align="center"
            key="questionText"
            prop="questionText"
            key="scriptContent"
            prop="scriptContent"
            width="200"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="选项内容"
            align="center"
            key="targetoptions"
            prop="targetoptions"
            width="200"
            :show-overflow-tooltip="true"
          />
@@ -820,6 +840,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 +893,19 @@
      indexAssortlist: [],
      inputValue: "",
      inputValueillness: "",
      topicobj: {},
      topicobj: {
        noMatchText: "",
        noClearlyText: "",
        slienceText: "",
      },
      total: 1,
      id: "",
      ruleForm: {},
      ruleForm: {
        templateName: "",
        ivrLibaTemplateTagList: [],
        ivrLibaTemplateScriptVOList: [],
        tempDetpRelevances: [],
      },
      rules: {},
      optionstag: [],
      prefollowuplist: [],
@@ -959,6 +994,7 @@
    this.courtyardlist = store.getters.courtyardlist;
    this.precedencetype = store.getters.precedencetype;
  },
  mounted() {},
  methods: {
    //公共方法--------------------
@@ -972,40 +1008,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 +1061,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 +1110,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 +1128,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 +1284,14 @@
    },
    addtopic(row) {
      console.log(row);
      if (
        this.ruleForm.ivrLibaTemplateScriptVOList.some(
          (obj) => obj.scriptTopic == row.scriptTopic
        )
      ) {
        this.$modal.msgError("该题目已存在");
        return;
      }
      getverbaltrick({ id: row.id }).then((res) => {
        console.log(res, "详情");
        res.data.isoperation = 1;
@@ -1226,11 +1301,12 @@
        });
        this.ruleForm.ivrLibaTemplateScriptVOList.push(res.data);
        this.sortFn();
        this.$modal.msgSuccess("添加成功");
      });
    },
    handleDelete(row) {
      this.$modal
        .confirm('是否确认删除问题:"' + row.questiontitle + '"?')
        .confirm('是否确认删除问题:"' + row.scriptTopic + '"?')
        .then(() => {
          this.ruleForm.ivrLibaTemplateScriptVOList.splice(
            this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row),
@@ -1427,7 +1503,7 @@
  border: 1px solid #dcdfe6;
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
  .topic-dev {
  .scriptTopic-dev {
    margin-bottom: 25px;
    font-size: 20px !important;
    .dev-text {