WXL
2025-01-21 1a090a490d8fc93224a0e3ad0fd7fe16c9fe63a8
src/views/repositoryai/templateku/configurat/index.vue
@@ -101,7 +101,7 @@
            <el-col :span="12">
              <el-form-item label="可用状态" prop="region">
                <el-select
                  v-model="ruleForm.usestate"
                  v-model="ruleForm.isenable"
                  size="medium"
                  placeholder="请选择"
                >
@@ -567,8 +567,8 @@
                  v-if="topicobj.scriptType == 1"
                >
                  <el-radio-group v-model="topicobj.branchFlag">
                    <el-radio :label="1">是</el-radio>
                    <el-radio :label="0">否</el-radio>
                    <el-radio :label="'1'">是</el-radio>
                    <el-radio :label="'0'">否</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="选中提示" v-if="topicobj.scriptType != 1">
@@ -989,6 +989,20 @@
                  :show-overflow-tooltip="true"
                />
                <el-table-column
                  label="问题类型"
                  align="center"
                  key="valueType"
                  prop="valueType"
                  width="120"
                >
                  <template slot-scope="scope">
                    <dict-tag
                      :options="valuetypes"
                      :value="scope.row.valueType"
                    />
                  </template>
                </el-table-column>
                <el-table-column
                  label="选项内容"
                  align="center"
                  key="targetoptions"
@@ -1294,64 +1308,7 @@
                      </el-col>
                    </el-row>
                  </div>
                  <div class="topicxq">
                    <el-row :gutter="10">
                      <el-col :span="20"
                        ><el-form-item label="听不清话术">
                          <el-input
                            style="width: 400px"
                            type="textarea"
                            placeholder="请输入"
                            v-model="indexform.noClearlyText"
                            show-word-limit
                          >
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    <el-row>
                      <el-col :span="6">
                        <el-form-item label="听不清语音" prop="verbaltrickyy">
                          <el-upload
                            class="upload-demo"
                            :action="uploadImgUrl"
                            :show-file-list="false"
                            :headers="headers"
                            :on-success="
                              (response, file) =>
                                handleChange(response, file, 4)
                            "
                            accept=".wav,.mp3"
                            :limit="1"
                          >
                            <el-button size="small" type="primary"
                              >点击上传</el-button
                            >
                          </el-upload>
                        </el-form-item>
                      </el-col>
                      <el-col :span="6">
                        <span
                          style="font-size: 12px"
                          v-if="indexform.noclearlyvoice"
                          >{{
                            indexform.noclearlyvoice.substring(
                              indexform.noclearlyvoice.lastIndexOf("/") + 1
                            )
                          }}</span
                        >
                      </el-col>
                      <el-col :span="6">
                        <mini-audio
                          :audio-source="
                            indexform.noclearlyvoice
                              ? indexform.noclearlyvoice
                              : 'https://example.com/example.mp3'
                          "
                        ></mini-audio>
                      </el-col>
                    </el-row>
                  </div>
                  <div class="topicxq">
                    <el-row :gutter="10">
                      <el-col :span="20"
@@ -1410,6 +1367,64 @@
                      </el-col>
                    </el-row>
                  </div>
                  <div class="topicxq">
                    <el-row :gutter="10">
                      <el-col :span="20"
                        ><el-form-item label="听不清话术">
                          <el-input
                            style="width: 400px"
                            type="textarea"
                            placeholder="请输入"
                            v-model="indexform.noClearlyText"
                            show-word-limit
                          >
                          </el-input> </el-form-item
                      ></el-col>
                    </el-row>
                    <el-row>
                      <el-col :span="6">
                        <el-form-item label="听不清语音" prop="verbaltrickyy">
                          <el-upload
                            class="upload-demo"
                            :action="uploadImgUrl"
                            :show-file-list="false"
                            :headers="headers"
                            :on-success="
                              (response, file) =>
                                handleChange(response, file, 4)
                            "
                            accept=".wav,.mp3"
                            :limit="1"
                          >
                            <el-button size="small" type="primary"
                              >点击上传</el-button
                            >
                          </el-upload>
                        </el-form-item>
                      </el-col>
                      <el-col :span="6">
                        <span
                          style="font-size: 12px"
                          v-if="indexform.noclearlyvoice"
                          >{{
                            indexform.noclearlyvoice.substring(
                              indexform.noclearlyvoice.lastIndexOf("/") + 1
                            )
                          }}</span
                        >
                      </el-col>
                      <el-col :span="6">
                        <mini-audio
                          :audio-source="
                            indexform.noclearlyvoice
                              ? indexform.noclearlyvoice
                              : 'https://example.com/example.mp3'
                          "
                        ></mini-audio>
                      </el-col>
                    </el-row>
                  </div>
                </div>
              </el-form>
            </div>
@@ -1452,6 +1467,7 @@
  illnesslistget,
  getillness,
  getgenerallist,
  depthospgetsondel
} from "@/api/AiCentre/index";
import OptionalForm from "@/components/OptionalForm"; //正则组件
import { getToken } from "@/utils/auth";
@@ -1494,7 +1510,7 @@
      ruleForm: {
        templateName: "",
        revisitBefore:
          "亲爱的患者/家属,您好!我们是浙中医大二院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访随访。",
          "亲爱的患者/家属,您好!我们是浙中医大二院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访。",
        revisitAfter:
          "请您注意休息和营养,生活上要劳逸结合,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次回访就到这里,祝您身体健康!",
        ivrLibaTemplateTagList: [],
@@ -1532,6 +1548,7 @@
      usable: [],
      required: [],
      valuetype: [],
      valuetypes: [],
      askvaluetype: [],
      mode: [],
      inputVisible: false,
@@ -1610,9 +1627,11 @@
    this.auxiliary();
    this.getDeptTree();
    this.mode = store.getters.mode;
    console.log(this.mode,'this.mode');
    this.usable = store.getters.usable;
    this.required = store.getters.required;
    this.valuetype = store.getters.valuetype;
    this.valuetypes = store.getters.valuetypelb;
    this.askvaluetype = store.getters.askvaluetype;
    this.languagelist = store.getters.languagelist;
    this.courtyardlist = store.getters.courtyardlist;
@@ -1685,8 +1704,9 @@
            console.log(2211);
            this.ruleForm = res.data;
            if (this.ruleForm.deptNames)
              this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames);
            console.log(this.ruleForm.suitway,'suitway');
            this.ruleForm.suitway = this.ruleForm.suitway.split(",");
            console.log(this.ruleForm.suitway,'suitway');
            if (this.ruleForm.campus)
              this.ruleForm.campus = this.ruleForm.campus.split(",");
            this.ruleForm.submoduleID = this.ruleForm.submoduleID.split(",");
@@ -1786,7 +1806,7 @@
      if (!this.ruleForm.assortid) {
        this.ruleForm.assortid = -1;
      }
      this.ruleForm.labelInfo = JSON.stringify(this.dynamicTags);
      // this.ruleForm.labelInfo = JSON.stringify(this.dynamicTags);
      if (Array.isArray(this.ruleForm.suitway))
        this.ruleForm.suitway = this.ruleForm.suitway.join(",");
      if (Array.isArray(this.ruleForm.campus))
@@ -1828,12 +1848,16 @@
        this.ruleForm.isoperation = 2;
        this.ruleForm.tempDetpRelevances = [];
        compileFollowup(this.ruleForm).then((res) => {
          this.$modal.msgSuccess("修改成功");
          this.confirmillness();
          this.putbelongDepts(this.id);
          this.$modal.closeLoading();
          // this.$router.go(-1);
          window.location.reload();
          if (res.code == 200) {
            this.$modal.msgSuccess("修改成功");
            this.confirmillness();
            this.putbelongDepts(this.id);
            // this.$modal.closeLoading();
            // this.$router.go(-1);
            window.location.reload();
          } else {
            this.$modal.closeLoading();
          }
        });
      } else {
        this.ruleForm.isoperation = 1;
@@ -1842,11 +1866,15 @@
          : "1.0";
        this.ruleForm.tempDetpRelevances = [];
        compileFollowup(this.ruleForm).then((res) => {
          this.$modal.msgSuccess("新增成功");
          this.confirmillness(res.data);
          this.putbelongDepts(res.data);
          this.$modal.closeLoading();
          this.$router.go(-1);
          if (res.code == 200) {
            this.$modal.msgSuccess("新增成功");
            this.confirmillness(res.data);
            this.putbelongDepts(res.data);
            this.$modal.closeLoading();
            this.$router.go(-1);
          } else {
            this.$modal.closeLoading();
          }
        });
      }
    },
@@ -2095,7 +2123,7 @@
    },
    handleDelete(row) {
      this.$modal
        .confirm('是否确认删除问题:"' + row.scriptTopic + '"?')
        .confirm('是否确认删除问题:"' + row.scriptTopic + '?')
        .then(() => {
          this.ruleForm.ivrLibaTemplateScriptVOList.splice(
            this.ruleForm.ivrLibaTemplateScriptVOList.indexOf(row),
@@ -2155,6 +2183,8 @@
    },
    // 问题排序
    sortFn() {
      console.log(this.ruleForm.ivrLibaTemplateScriptVOList);
      this.ruleForm.ivrLibaTemplateScriptVOList.forEach((item, index) => {
        item.sort = Number(index) + 1;
        console.log(this.ruleForm.ivrLibaTemplateScriptVOList.length);
@@ -2165,7 +2195,7 @@
        } else {
          item.nextScriptno = item.sort + 1;
        }
        if (item.ivrLibaScriptTargetoptionList) {
        if (item.ivrLibaScriptTargetoptionList&&!item.branchFlag) {
          item.ivrLibaScriptTargetoptionList.forEach((items) => {
            items.nextQuestion = Number(item.sort) + 1;
          });
@@ -2176,7 +2206,22 @@
      console.log(this.ruleForm.ivrLibaTemplateScriptVOList);
    },
    // -----------------------话术选项
    deloption() {},
    deloption(item) {
      const index = this.topicobj.ivrLibaScriptTargetoptionList.indexOf(item);
      if (index != -1) {
        if (item.id) {
          console.log(item, "chunz");
          item.isoperation = 3;
          console.log(this.topicobj.ivrLibaScriptTargetoptionList);
          this.$forceUpdate();
        } else {
          this.topicobj.ivrLibaScriptTargetoptionList.splice(index, 1); // 从索引位置删除一个元素
        }
        // this.sortFn();
      } else {
        console.log("未找到该对象");
      }
    },
    // 修改题目信息
    Submittopicobj() {
      this.$modal
@@ -2196,7 +2241,7 @@
          this.drawer = false;
          this.sortFn();
          this.$modal.msgSuccess("题目新增成功,保存模板失效");
          this.$modal.msgSuccess("题目新增成功,保存模板生效");
        });
    },