WXL
2024-07-31 8ec6407cf76c1f8d7e08e5456018aaafc93f0556
src/views/knowledge/questionbank/index.vue
@@ -68,36 +68,32 @@
              v-show="showSearch"
              label-width="98px"
            >
              <el-form-item label="可用院区" prop="status">
                <el-select v-model="queryParams.courtyard" placeholder="请选择">
                  <el-option
                    v-for="item in languagelist"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="问题主题" prop="userName">
              <el-form-item label="问题标题" prop="userName">
                <el-input
                  v-model="queryParams.userName"
                  v-model="queryParams.scriptTopic"
                  placeholder="请输入"
                  clearable
                  style="width: 200px"
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="文字" prop="status">
                <el-select v-model="queryParams.status" placeholder="请选择">
                  <el-option
                    v-for="item in languagelist"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              <el-form-item label="问题内容" prop="userName">
                <el-input
                  v-model="queryParams.scriptContent"
                  placeholder="请输入"
                  clearable
                  style="width: 200px"
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="指标名称" prop="targetname">
                <el-input
                  v-model="queryParams.targetname"
                  placeholder="请输入"
                  clearable
                  style="width: 200px"
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="是否可用" prop="isavailable">
                <el-select
@@ -169,27 +165,50 @@
                width="50"
                align="center"
              />
              <el-table-column
              <!-- <el-table-column
                label="序号"
                fixed
                align="center"
                key="topicid"
                prop="topicid"
              />
                key="id"
                prop="id"
              /> -->
              <el-table-column
                label="题目标题"
                fixed
                align="center"
                key="topic"
                prop="topic"
                key="scriptTopic"
                prop="scriptTopic"
                width="200"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="题型"
                align="center"
                key="scriptType"
                prop="scriptType"
                width="120"
              >
                <template slot-scope="scope">
                  <dict-tag
                    :options="askvaluetype"
                    :value="scope.row.scriptType"
                  />
                </template>
              </el-table-column>
              <el-table-column
                label="指标名称"
                fixed
                align="center"
                key="targetname"
                prop="targetname"
                width="200"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="题目内容"
                align="center"
                key="topicContent"
                prop="topicContent"
                key="scriptContent"
                prop="scriptContent"
                width="200"
                :show-overflow-tooltip="true"
              />
@@ -233,8 +252,8 @@
                :show-overflow-tooltip="true"
              >
                <template slot-scope="scope">
                  <span v-for="item in scope.row.tag.split(',')"
                    >{{ item }}、
                  <span v-for="item in scope.row.svyLibScriptTagList"
                    >{{ item.tagname }}、
                  </span>
                </template>
              </el-table-column>
@@ -275,7 +294,7 @@
                    @click="compileUpdate(scope.row)"
                    v-hasPermi="['system:user:edit']"
                    ><span class="button-bji"
                      ><i class="el-icon-edit"></i>编辑问题</span
                      ><i class="el-icon-edit"></i>编辑</span
                    ></el-button
                  >
                  <el-button
@@ -392,13 +411,16 @@
    <el-dialog title="题目预览" :visible.sync="topicVisible" width="50%">
      <div class="preview-left">
        <div class="dev-text">
          <span>{{ topicform.topicContent }}</span>
          <span>{{ topicform.scriptContent }}</span>
        </div>
        <div class="dev-xx" v-if="topicform.valueType == 1">
        <div
          class="dev-xx"
          v-if="topicform.scriptType != 3 && topicform.scriptType != 4"
        >
          <el-radio-group v-model="topicform.asrtext">
            <el-radio
              v-for="(topicforms, index) in topicform.svyLibTopicoptions"
              v-for="(topicforms, index) in topicform.svyLibScriptOptions"
              :key="topicforms.optioncontent"
              :label="topicforms.optioncontent"
              >{{ topicforms.optioncontent }}</el-radio
@@ -459,9 +481,10 @@
      total: 0,
      namequestionnaire: "",
      haoquestionnaire: "",
      askvaluetype: "",
      idds: "",
      topicform: {
        questionText: "",
        scriptContent: "",
      },
      amendtag: false, //是否修改类别
      dialogFormVisible: false, //修改添加类别弹框
@@ -469,7 +492,7 @@
      topicVisible: false, //预览弹框
      deletefenl: "高血压", //删除项
      classifyform: {
        categoryname: "",
        name: "",
      }, //类别表单
      // 表格数据
      userList: [],
@@ -503,7 +526,7 @@
      illnesslistapi: [],
      illnesslist: [],
      defaultProps: {
        children: "svyLibTopicCategoryList",
        children: "svyLibScriptCategoryList",
        label: "name",
      },
      mode: [],
@@ -526,6 +549,7 @@
    this.mode = store.getters.mode;
    this.languagelist = store.getters.languagelist;
    this.qyoptions = store.getters.usable;
    this.askvaluetype = store.getters.askvaluetype;
  },
  methods: {
@@ -543,13 +567,13 @@
    compileUpdate(row) {
      this.$router.push({
        path: "/knowledge/questionbank/particulars/",
        query: { id: row.topicid },
        query: { id: row.id },
      });
    },
    // 疾病-----------------------
    illnessUpdate(row) {
      this.illnessVisible = true;
      this.indexid = row.topicid;
      this.indexid = row.id;
      this.illnesslistapi = [];
      const illnessqueryParams = {
        pageNum: 1,
@@ -559,7 +583,7 @@
        console.log(response);
        this.optionsillness = response.rows;
      });
      getillness({ outid: row.topicid, type: 4 }).then((res) => {
      getillness({ outid: row.id, type: 4 }).then((res) => {
        this.illnesslist = res.rows;
        console.log(res);
      });
@@ -655,10 +679,11 @@
          (obj) => obj.id == this.classifyform.pid
        );
        calssvalue = this.deptOptions[index];
        calssvalue.svyLibTopicCategoryList.push(this.classifyform);
        console.log(calssvalue, "calssvalue");
        calssvalue.svyLibScriptCategoryList.push(this.classifyform);
      } else if (this.radio == "主分类" && this.classifyform.name) {
        this.classifyform.pid = null;
        this.classifyform.svyLibTopicCategoryList = [];
        this.classifyform.svyLibScriptCategoryList = [];
      } else {
        return this.$modal.msgError("请填写完整信息");
      }
@@ -720,7 +745,7 @@
    // 表单重置
    reset() {
      this.form = {
        topicid: undefined,
        id: undefined,
        deptId: undefined,
        userName: undefined,
        nickName: undefined,
@@ -750,7 +775,7 @@
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.topicid);
      this.ids = selection.map((item) => item.id);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
@@ -770,7 +795,8 @@
    /** 删除按钮操作 */
    handleDelete(row) {
      const topicids = row.topicid || this.ids;
      console.log(this.ids);
      const topicids = row.id || this.ids;
      this.$modal
        .confirm('是否确认删除用户编号为"' + topicids + '"的数据项?')
        .then(function () {