WXL
2024-06-20 8d2e62da290ba8c40101f282a60efcdb29b22cd2
测试完成
已修改4个文件
162 ■■■■ 文件已修改
src/views/knowledge/questionbank/particulars/index.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/questionnaire/compilequer/index.vue 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/repositoryai/intention/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/repositoryai/templateku/configurat/index.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/questionbank/particulars/index.vue
@@ -6,9 +6,9 @@
          <div class="headline">
            题目设置详情
            <span style="margin-left: 30px"
              ><el-button type="primary" @click="compileissue"
              ><el-button type="primary" @click="Saveproblem"
                >保 存</el-button
              ></span
              > </span
            ><span style="margin-left: 30px"
              ><el-button type="success" round @click="drawer = true"
                >+选择指标</el-button
@@ -17,7 +17,7 @@
          </div>
          <div style="margin-left: 8%">
            <el-row :gutter="10">
              <el-col :span="10">
              <el-col :span="8">
                <el-form-item label="问题分类">
                  <el-select
                    v-model="topicobj.categoryid"
@@ -41,7 +41,7 @@
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="10">
              <el-col :span="8">
                <el-form-item label="评价类型">
                  <el-select
                    v-model="topicobj.scoretype"
@@ -55,6 +55,14 @@
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8" v-if="topicobj.scoretype == 1">
                <el-form-item label="题目得分">
                  <el-input
                    v-model="topicobj.score"
                    placeholder="请输入分数"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
@@ -626,7 +634,6 @@
    },
    // 新增或修改详情
    compileissue() {
      console.log(11223);
      this.topicobj.svyLibScriptOptions = this.topicobj.svyLibScriptOptions.map(
        (item) => {
          if (item.isoperation != 1 && item.isoperation != 3) {
@@ -680,6 +687,50 @@
        deltargetillness(this.illnesslistapi.join(",")).then((res) => {});
      }
    },
    // 判断分值
    Scorejudgment() {
      let scorearr = this.topicobj.svyLibScriptOptions;
      let isValid = scorearr.every((score) => {
        if (score.score) {
          console.log(Number(score.score), this.topicobj.score, "分值");
          if (
            Number(score.score) <= 0 ||
            Number(score.score) > Number(this.topicobj.score)
          ) {
            console.log(22);
            this.$message({
              message: "选项分值必须大于0小于等于" + this.topicobj.score + "分",
              type: "warning",
            });
            return false;
          }
          return true;
        } else {
          this.$message({
            message: "选项分值未设置",
            type: "warning",
          });
          return false;
        }
      });
      if (isValid) {
        this.compileissue();
        // console.log("到保存了");
      }
    },
    Saveproblem() {
      if (this.topicobj.scoretype == 1) {
        console.log(321);
        this.Scorejudgment();
      } else {
        this.compileissue();
      }
    },
    // 删除标签
    handleClose(tag) {
      this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
    },
    // 删除选项
    deletexuanx(row) {
      const index = this.getIndexInArray(
src/views/knowledge/questionnaire/compilequer/index.vue
@@ -39,28 +39,48 @@
          label-width="100px"
          class="demo-ruleForm"
        >
          <el-form-item label="问卷分类" prop="region">
            <el-select
              v-model="ruleForm.categoryid"
              size="medium"
              filterable
              placeholder="请选择分类"
            >
              <el-option-group
                v-for="group in optionsclass"
                :key="group.id"
                :label="group.name"
              >
                <el-option
                  v-for="item in group.svyLibTemplateCategoryList"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
          <el-row :gutter="10">
            <el-col :span="10">
              <el-form-item label="问卷分类" prop="region">
                <el-select
                  v-model="ruleForm.categoryid"
                  size="medium"
                  filterable
                  placeholder="请选择分类"
                >
                </el-option>
              </el-option-group>
            </el-select>
          </el-form-item>
                  <el-option-group
                    v-for="group in optionsclass"
                    :key="group.id"
                    :label="group.name"
                  >
                    <el-option
                      v-for="item in group.svyLibTemplateCategoryList"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id"
                    >
                    </el-option>
                  </el-option-group>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="评价类型">
                <el-select
                  v-model="ruleForm.scoreType"
                  placeholder="请选择分类"
                >
                  <el-option
                    v-for="group in appraiselist"
                    :key="group.value"
                    :label="group.label"
                    :value="group.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item label="问卷标题" prop="name">
            <div style="width: 30%">
              <el-input v-model="ruleForm.svyname"></el-input>
@@ -393,7 +413,7 @@
                <div class="headline">选项设置</div>
                <div
                  class="topicxq"
                  v-for="item in topicobj.svyLibTemplateTargetoptions"
                  v-for="item in topicobj.svyLibScriptOptions"
                >
                  <el-row :gutter="10">
                    <el-col :span="11"
@@ -657,6 +677,11 @@
        { value: "topic", table: "topic" },
        { value: "topic", table: "topic" },
      ],
      appraiselist: [
        { label: "分数", value: "1" },
        { label: "ABC等级", value: "2" },
        { label: "优良等级", value: "3" },
      ],
      fileList: [
        {
@@ -799,11 +824,9 @@
      this.ruleForm.svyLibScripts = this.ruleForm.svyLibScripts.concat(
        this.delScriptVOList
      );
      console.log(this.ruleForm.svyLibScripts, "this.ruleForm.svyLibScripts");
      const result = this.tempDetpRelevanceslist.map(
        (subArr) => subArr[subArr.length - 1]
      );
      console.log(result, "result");
      // id数组查数组对象
      result.forEach((item) => {
        const condition = this.ruleForm.tempDetpRelevances.some(
@@ -817,7 +840,6 @@
          });
        }
      });
      console.log(this.ruleForm.tempDetpRelevances);
      // 数组对象查id数组
      this.ruleForm.tempDetpRelevances.forEach((item) => {
        const condition = result.some((obj) => obj === item.deptId);
@@ -827,7 +849,6 @@
          this.ruleForm.tempDetpRelevances[index].delFlag = 1;
        }
      });
      console.log(this.ruleForm.tempDetpRelevances);
      setTimeout(() => {
        this.submitForm();
      }, 1000);
@@ -872,10 +893,11 @@
    // 新增题目
    addtopic(row) {
      row.isoperation = 1;
      row.svyLibTemplateTargetoptions.forEach((item) => {
      row.svyLibScriptOptions.forEach((item) => {
        item.isoperation = 1;
      });
      this.ruleForm.svyLibScripts.push(row);
      this.$modal.msgSuccess("新增成功");
    },
    handleDelete(row) {
      let index = this.ruleForm.svyLibScripts.indexOf(row);
@@ -917,9 +939,7 @@
    },
    // 修改题目信息
    Submittopicobj() {
    },
    Submittopicobj() {},
    // 新增变量
    addvariable() {
      this.variablelist.push({
src/views/repositoryai/intention/index.vue
@@ -333,6 +333,7 @@
        <el-dialog
          :title="title"
          :visible.sync="indexopen"
          :close-on-click-modal="false"
          width="900px"
          append-to-body
        >
@@ -981,7 +982,6 @@
      }
    },
    syioption(row) {
      const index = this.getIndexInArray(this.testuserList, row);
      const item = this.testuserList.splice(index, 1)[0]; // 移除指定索引处的元素,并保存到item变量中
      this.testuserList.splice(index - 1, 0, item); // 将item插入到索引位置的前一位
@@ -1111,6 +1111,7 @@
    // 取消按钮
    cancel() {
      this.indexform = null;
      this.indexopen = false;
      this.reset();
    },
@@ -1124,7 +1125,7 @@
        baseTagList: [],
        targetoptionList: [],
      };
      this.resetForm("indexform");
      // this.resetForm("indexform");
    },
    /** 搜索按钮操作 */
    handleQuery() {
@@ -1178,6 +1179,7 @@
      this.reset();
      console.log(row);
      this.title = "指标详情";
      this.indexform = {};
      this.indexform = row;
      if (!row.targetoptionList[0]) {
        row.targetoptionList = [
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
@@ -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
@@ -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