WXL
2024-04-24 f3bf99618bc379a9fa91cefefc813f770dcddc53
src/views/knowledge/questionbank/index.vue
@@ -29,7 +29,7 @@
        >
          <span class="custom-tree-node" slot-scope="{ node, data }">
            <span>{{ node.label }}</span>
            <span>
            <span v-if="data.id > 0">
              <el-button
                type="text"
                icon="el-icon-delete"
@@ -37,6 +37,17 @@
                size="mini"
                @click="() => remove(node, data)"
              >
              </el-button>
            </span>
            <span v-if="data.id > 0">
              <el-button
                type="text"
                circle
                size="mini"
                @click="() => altertag(node, data)"
                ><span class="button-textxg"
                  ><i class="el-icon-edit-outline"></i
                ></span>
              </el-button>
            </span>
          </span>
@@ -326,7 +337,7 @@
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button @click="getDeptTree()">取 消</el-button>
        <el-button type="primary" @click="submitsidecolumn">确 定</el-button>
      </div>
    </el-dialog>
@@ -387,6 +398,7 @@
  getissueclassify,
  delissueclassify,
  addissueclassify,
  editissueclassify,
  getissuelist,
  issueinfo,
  compileissue,
@@ -588,12 +600,21 @@
    getDeptTree() {
      getissueclassify({}).then((res) => {
        this.deptOptions = res.rows;
        console.log(res);
        this.dialogFormVisible = false;
      });
    },
    // 添加类别树
    submitsidecolumn() {
      if (this.classifyform.id) {
        editissueclassify(this.classifyform).then((res) => {
          this.getDeptTree();
          this.$modal.msgSuccess("修改成功");
          this.classifyform = {};
          this.dialogFormVisible = false;
        });
        return;
      }
      let calssvalue = {};
      if (
        this.classifyform.pid &&
@@ -645,6 +666,16 @@
          .catch(() => {});
      }
    },
    altertag(a, b) {
      this.dialogFormVisible = true;
      if (!b.pid) {
        this.radio = "主分类";
      } else {
        this.radio = "子分类";
      }
      this.classifyform = b;
      this.dialogFormVisible = true;
    },
    // 筛选节点
    filterNode(value, data) {