WXL
2025-04-11 5f3691d51a27282dd737376ac8227bf371d7c811
src/views/knowledge/questionbank/index.vue
@@ -3,8 +3,8 @@
    <!-- 左侧栏 -->
    <div class="sidecolumn">
      <div class="sidecolumn-top">
        <div class="top-wj">问题类型</div>
        <div class="top-tj" @click="dialogFormVisible = true">+添加</div>
        <div class="top-wj">问题分类</div>
        <div class="top-tj" @click="Newcategory">+添加</div>
      </div>
      <div class="center-ss">
        <el-input
@@ -20,6 +20,7 @@
          :data="deptOptions"
          :props="defaultProps"
          :expand-on-click-node="false"
          :check-strictly="true"
          :filter-node-method="filterNode"
          ref="tree"
          node-key="id"
@@ -68,7 +69,7 @@
              v-show="showSearch"
              label-width="98px"
            >
              <el-form-item label="问题标题" prop="userName">
              <el-form-item label="问题主题" prop="userName">
                <el-input
                  v-model="queryParams.scriptTopic"
                  placeholder="请输入"
@@ -77,18 +78,16 @@
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="语言" prop="status">
                <el-select v-model="queryParams.language" 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-form-item label="指标名称" prop="targetname">
                <el-input
                  v-model="queryParams.targetname"
                  placeholder="请输入"
@@ -137,7 +136,6 @@
                  icon="el-icon-plus"
                  size="medium"
                  @click="compileUpdate"
                  v-hasPermi="['system:user:add']"
                  >新增</el-button
                >
              </el-col>
@@ -150,7 +148,6 @@
                  size="medium"
                  :disabled="multiple"
                  @click="handleDelete"
                  v-hasPermi="['system:user:remove']"
                  >删除</el-button
                >
              </el-col>
@@ -167,15 +164,15 @@
                width="50"
                align="center"
              />
              <el-table-column
              <!-- <el-table-column
                label="序号"
                fixed
                align="center"
                key="id"
                prop="id"
              />
              /> -->
              <el-table-column
                label="题目标题"
                label="问题主题"
                fixed
                align="center"
                key="scriptTopic"
@@ -184,10 +181,32 @@
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="题目内容"
                label="问题内容"
                align="center"
                key="scriptContent"
                prop="scriptContent"
                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="指标名称"
                align="center"
                key="targetname"
                prop="targetname"
                width="200"
                :show-overflow-tooltip="true"
              />
@@ -215,7 +234,6 @@
                    size="medium"
                    type="text"
                    @click="illnessUpdate(scope.row)"
                    v-hasPermi="['system:user:edit']"
                    ><span class="button-textxg"
                      ><i class="el-icon-date"></i>详情</span
                    ></el-button
@@ -271,16 +289,14 @@
                    size="medium"
                    type="text"
                    @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
                    size="medium"
                    type="text"
                    @click="handleDelete(scope.row)"
                    v-hasPermi="['system:user:remove']"
                    ><span class="button-textsc"
                      ><i class="el-icon-delete-solid"></i>删除</span
                    ></el-button
@@ -289,7 +305,6 @@
                    size="medium"
                    type="text"
                    @click="topicpreview(scope.row)"
                    v-hasPermi="['system:user:remove']"
                    ><span class="button-text"
                      ><i class="el-icon-view"></i>预览</span
                    ></el-button
@@ -387,7 +402,7 @@
        <el-button type="primary" @click="confirmillness">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog title="题目预览" :visible.sync="topicVisible" width="50%">
    <el-dialog title="问题预览" :visible.sync="topicVisible" width="50%">
      <div class="preview-left">
        <div class="dev-text">
          <span>{{ topicform.scriptContent }}</span>
@@ -460,6 +475,7 @@
      total: 0,
      namequestionnaire: "",
      haoquestionnaire: "",
      askvaluetype: "",
      idds: "",
      topicform: {
        scriptContent: "",
@@ -476,7 +492,7 @@
      userList: [],
      // 弹出层标题
      tag: "",
      title: "",
      title: "新增类别",
      // 是否显示弹出层
      open: false,
      // 日期范围
@@ -497,6 +513,8 @@
      indexid: null,
      inputValue: "",
      radio: "主分类",
      zufon: true,
      zifon: true,
      inputVisible: false,
      illnessVisible: false, //指标疾病弹框
      deptOptions: [],
@@ -504,7 +522,7 @@
      illnesslistapi: [],
      illnesslist: [],
      defaultProps: {
        children: "svyLibTopicCategoryList",
        children: "svyLibScriptCategoryList",
        label: "name",
      },
      mode: [],
@@ -527,6 +545,7 @@
    this.mode = store.getters.mode;
    this.languagelist = store.getters.languagelist;
    this.qyoptions = store.getters.usable;
    this.askvaluetype = store.getters.askvaluetype;
  },
  methods: {
@@ -544,7 +563,7 @@
    compileUpdate(row) {
      this.$router.push({
        path: "/knowledge/questionbank/particulars/",
        query: { id: row.id },
        query: { id: row.id, categoryid: this.queryParams.categoryid },
      });
    },
    // 疾病-----------------------
@@ -656,7 +675,7 @@
          (obj) => obj.id == this.classifyform.pid
        );
        calssvalue = this.deptOptions[index];
        console.log(calssvalue,'calssvalue');
        console.log(calssvalue, "calssvalue");
        calssvalue.svyLibScriptCategoryList.push(this.classifyform);
      } else if (this.radio == "主分类" && this.classifyform.name) {
        this.classifyform.pid = null;
@@ -702,11 +721,22 @@
      this.dialogFormVisible = true;
      if (!b.pid) {
        this.radio = "主分类";
        this.title = "修改主分类";
        this.zufon = false;
      } else {
        this.radio = "子分类";
        this.title = "修改子分类";
        this.zifon = false;
      }
      this.classifyform = b;
      this.dialogFormVisible = true;
    },
    Newcategory() {
      (this.classifyform = {}), //类别表单
        (this.radio = "主分类");
      this.dialogFormVisible = true;
      this.zifon = true;
      this.zufon = true;
    },
    // 筛选节点
@@ -715,6 +745,7 @@
      return data.name.indexOf(value) !== -1;
    },
    handleNodeClick(data) {
      if (data.svyLibScriptCategoryList) return;
      this.queryParams.categoryid = data.id;
      this.getList();
    },
@@ -756,13 +787,7 @@
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.$router.push({
        path: "/knowledge/verbaltrick/particulars/",
        query: { id: "" },
      });
    },
    // 修改分类弹框
    popoveramend(tagcategoryid) {
      this.idds = tagcategoryid;
@@ -798,7 +823,7 @@
  display: flex;
}
.sidecolumn {
  width: 300px;
  width: 400px;
  min-height: 100vh;
  text-align: center;
  //   display: flex;