WXL
2024-04-24 f3bf99618bc379a9fa91cefefc813f770dcddc53
src/views/knowledge/questionbank/particulars/index.vue
@@ -9,6 +9,10 @@
              ><el-button type="primary" @click="compileissue"
                >保存</el-button
              ></span
            ><span style="margin-left: 30px"
              ><el-button type="success" round @click="drawer = true"
                >+选择指标</el-button
              ></span
            >
          </div>
          <div style="margin-left: 8%">
@@ -101,14 +105,14 @@
              <el-col :span="6"
                ><el-form-item label="题目类型">
                  <el-select
                    v-model="topicobj.topictype"
                    v-model="topicobj.valueType"
                    size="medium"
                    filterable
                    placeholder="请选择分类"
                  >
                    <el-option
                      class="topicobjaa"
                      v-for="item in xjxsoptions"
                      v-for="item in valuetype"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
@@ -280,15 +284,11 @@
              </el-col></el-row
            > -->
          </div>
          <div v-if="topicobj.valueType == 1">
          <div class="headline">
            选项设置<span style="margin-left: 30px"
              ><el-button type="primary" round @click="addoption"
                >+新增</el-button
              ></span
            ><span style="margin-left: 30px"
              ><el-button type="success" round @click="drawer = true"
                >+选择指标</el-button
              ></span
            >
          </div>
@@ -340,6 +340,7 @@
                </el-input
              ></el-form-item>
            </el-row>
            </div>
          </div>
        </el-form>
      </el-card>
@@ -409,7 +410,7 @@
                type="text"
                @click="selectlabel(scope.row)"
                ><span class="button-textxg"
                  ><i class="el-icon-circle-plus-outline"></i>添加</span
                  ><i class="el-icon-circle-plus-outline"></i>选择</span
                ></el-button
              >
            </template>
@@ -492,7 +493,7 @@
      illnesslist: [],
      classifylist: [],
      optionstag: [],
      xjxsoptions: [],
      valuetype: [],
      usable: [],
      mode: [], //方式
    };
@@ -505,7 +506,7 @@
    this.mode = store.getters.mode;
    this.languagelist = store.getters.languagelist;
    this.usable = store.getters.usable;
    this.xjxsoptions = store.getters.xjxsoptions;
    this.valuetype = store.getters.valuetype;
    this.required = store.getters.required;
  },
@@ -533,6 +534,10 @@
    // 获取数据
    getissueinfo() {
      this.id = this.$route.query.id;
      // 分类
      getissueclassify({}).then((res) => {
        this.classifylist = res.rows;
      });
      if (!this.id) {
        return;
      }
@@ -552,10 +557,7 @@
      getillness({ outid: this.id, type: 4 }).then((res) => {
        this.illnesslist = res.rows;
      });
      // 分类
      getissueclassify({}).then((res) => {
        this.classifylist = res.rows;
      });
    },
    gettargetInfo() {
      gettargetInfo(this.queryParams).then((res) => {
@@ -635,6 +637,19 @@
    },
    // 选择指标
    selectlabel(row) {
      this.$modal
        .confirm(
          '是否选择标题为"' + row.targetname + '"的指标并替换填充问题信息?'
        )
        .then(() => {
          console.log(row);
          console.log(this.topicobj);
          this.topicobj.topic = row.targetname;
          this.topicobj.valueType = row.valueType;
          this.topicobj.topicContent = row.targetdesc;
          this.topicobj.isavailable = "0";
          this.topicobj.language = "普通话";
          this.topicobj.svyLibTopicoptions = [];
      const labellist = row.targetoptionList;
      labellist.forEach((item) => {
        this.topicobj.svyLibTopicoptions.push({
@@ -642,6 +657,9 @@
          isoperation: 1,
        });
      });
          this.drawer = false;
        })
        .catch(() => {});
    },
    // 标签-----------------