WXL (wul)
13 小时以前 0bccc45dca0527bef40f5d9ed47c8e0d175cd40b
src/views/knowledge/questionnaire/compilequer/index.vue
@@ -249,7 +249,7 @@
          <el-row>
            <el-col :span="20"
              ><el-form-item label="适用科室" prop="region">
              ><el-form-item label="适用课题组" prop="region">
                <el-select
                  v-model="tempDetpRelevanceslist"
                  @remove-tag="removetag"
@@ -257,12 +257,12 @@
                  size="medium"
                  multiple
                  filterable
                  placeholder="请选择科室"
                  placeholder="请选择课题组"
                >
                  <el-option
                    class="ruleFormaa"
                    v-for="item in flatArray"
                    :key="item.deptCode"
                    :key="item.id"
                    :label="item.label"
                    :value="item.deptCode"
                  >
@@ -285,7 +285,7 @@
                  <el-option
                    class="ruleFormaa"
                    v-for="item in flatArray"
                    :key="item.deptCode"
                    :key="item.id"
                    :label="item.label"
                    :value="item.deptCode"
                  >
@@ -550,6 +550,26 @@
                        placeholder="请输入题号"
                      ></el-input>
                    </el-form-item>
                    <el-form-item prop="valueType">
                      <template #label>
                        结果类型
                        <el-tooltip
                          class="item"
                          effect="light"
                          content="本类型为结果收集类型;选项用于指向性题目如是否等;文本适用复杂情况;数值用于收集数值型数据"
                          placement="top-start"
                        >
                          <i class="el-icon-warning-outline"></i>
                        </el-tooltip>
                        <!-- 在标签后插入红色星号 -->
                      </template>
                      <el-radio-group v-model="topicobj.valueType">
                        <el-radio :label="1">选项</el-radio>
                        <el-radio :label="2">文本</el-radio>
                        <el-radio :label="3">数值</el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>
                </el-row>
@@ -566,10 +586,10 @@
                    </el-form-item></el-col
                  >
                  <el-col :span="12"
                    ><el-form-item label="是否可用">
                      <el-radio-group v-model="topicobj.isenable">
                    ><el-form-item label="是否隐藏">
                      <el-radio-group v-model="topicobj.ishide">
                        <el-radio
                          v-for="(item, index) in usable"
                          v-for="(item, index) in hides"
                          :label="item.value"
                          >{{ item.label }}</el-radio
                        >
@@ -582,8 +602,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">
@@ -658,6 +678,12 @@
                          <el-radio :label="0">否</el-radio>
                        </el-radio-group>
                      </el-form-item>
                      <el-form-item label="是否选中收集附加信息">
                        <el-radio-group v-model="item.appendflag">
                          <el-radio label="1">是</el-radio>
                          <el-radio label="0">否</el-radio>
                        </el-radio-group>
                      </el-form-item>
                    </el-row>
                    <el-row :gutter="10" v-if="topicobj.branchFlag == 1">
                      <el-col :span="20"
@@ -691,7 +717,9 @@
                            <el-image
                              style="width: 100px; height: 100px"
                              :src="item.picturePath"
                              :preview-src-list="[...item.picturePath]"
                              :preview-src-list="
                                item.picturePath ? [item.picturePath] : []
                              "
                            >
                            </el-image>
                          </div>
@@ -747,9 +775,7 @@
        >
        <el-button type="primary" @click="laststep()">上一步</el-button>
        <el-button type="info" @click="closeFm('ruleForm')">关闭</el-button>
        <el-button @click="toExamine('ruleForm')"
          >保存问题数据</el-button
        >
        <el-button @click="toExamine('ruleForm')">保存问题数据</el-button>
      </div>
      <!-- 问卷预览 -->
      <div v-if="Editprogress == 3">
@@ -1212,7 +1238,9 @@
                          <el-image
                            style="width: 100px; height: 100px"
                            :src="item.picturePath"
                            :preview-src-list="[...item.picturePath]"
                            :preview-src-list="
                              item.picturePath ? [item.picturePath] : []
                            "
                          >
                          </el-image>
                        </div>
@@ -1295,6 +1323,7 @@
        svyTemplateLibScripts: [],
        tempDetpRelevances: [],
        svyLibTemplateTagList: [],
        suitway: [],
        scoreType: "4",
        isenable: "0",
        longTemp: "0",
@@ -1388,8 +1417,8 @@
      delScriptVOList: [],
      illnesslistapi: [],
      illnesslist: [],
      tempDetpRelevanceslist: [], //科室数据
      tempDetpRelevanceslistform: [], //科室数据
      tempDetpRelevanceslist: [], //课题组数据
      tempDetpRelevanceslistform: [], //课题组数据
      tempbelongWards: [], //病区数据
      tempbelongWardsform: [], //病区数据
      optionstag: [],
@@ -1400,6 +1429,10 @@
      usable: [
        { value: "0", label: "可用" },
        { value: "1", label: "停用" },
      ],
      hides: [
        { value: 0, label: "正常" },
        { value: 1, label: "隐藏" },
      ],
      longtype: [
        { value: "0", label: "普通任务" },
@@ -1556,9 +1589,9 @@
        });
      }
    },
    // 获取科室树
    // 获取课题组树
    getDeptTree() {
      // 科室列表
      // 课题组列表
      deptTreeSelect().then((response) => {
        this.deptOptions = response.data;
        this.flatArray = this.flattenArray(response.data);
@@ -1618,8 +1651,8 @@
          this.confirmillness();
          this.putbelongDepts();
          this.$modal.closeLoading();
          // this.$router.go(-1);
          window.location.reload();
          this.$router.go(-1);
          // window.location.reload();
        });
      } else {
        this.ruleForm.isoperation = 1;
@@ -1639,8 +1672,8 @@
    // 题目校验
    toExamine() {
      // 遍历题目集合
      for (let i = 0; i <  this.ruleForm.svyTemplateLibScripts.length; i++) {
        const question =  this.ruleForm.svyTemplateLibScripts[i];
      for (let i = 0; i < this.ruleForm.svyTemplateLibScripts.length; i++) {
        const question = this.ruleForm.svyTemplateLibScripts[i];
        // 如果 scriptType 为 4,则跳过当前题目
        if (question.scriptType === 4) {
@@ -1671,10 +1704,10 @@
      // 如果所有题目都校验通过,返回 true
      console.log("所有题目校验通过,选项名称无重复");
       this.Departmenttreatment();
      this.Departmenttreatment();
    },
    // 科室/院区处理
    // 课题组/院区处理
    Departmenttreatment() {
      this.tempDetpRelevanceslist.forEach((item) => {
        console.log(item);
@@ -1709,7 +1742,7 @@
        this.submitForm();
      }, 500);
    },
    // 科室删除触发
    // 课题组删除触发
    removetag(row) {
      let result = this.deptlist
        .filter((item) => item.deptCode == row)
@@ -1951,7 +1984,7 @@
      this.illnessVisible = false;
      this.$modal.msgSuccess("编辑成功");
    },
    // 保存科室/病区
    // 保存课题组/病区
    putbelongDepts(id) {
      this.tempDetpRelevanceslistform.forEach((item) => {
        if (!item.tempid) item.tempid = id;
@@ -1962,7 +1995,7 @@
      if (this.tempDetpRelevanceslistform.length > 0) {
        depthospgetson(this.tempDetpRelevanceslistform).then((res) => {
          if (res.code == 200) {
            this.$modal.msgSuccess("科室新增成功");
            this.$modal.msgSuccess("课题组新增成功");
          }
        });
      }
@@ -2384,7 +2417,10 @@
  display: flex;
  .presentation-left {
    width: 45%;
    // height: 500px;
    max-height: 80vh;
    padding: 0 20px;
    font-size: 18px;
    overflow: auto;
    .button-textxg {
      color: #024df0;
    }
@@ -2404,7 +2440,7 @@
  }
  .presentation-right {
    width: 55%;
    max-height: 688px;
    max-height: 80vh;
    padding: 0 20px;
    font-size: 18px;
    overflow: auto;