WXL
2024-04-24 f3bf99618bc379a9fa91cefefc813f770dcddc53
src/views/knowledge/education/index.vue
@@ -39,6 +39,17 @@
              >
              </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>
        </el-tree>
      </div>
@@ -390,7 +401,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>
@@ -459,6 +470,7 @@
  getheLibraryAssort,
  delheLibraryAssort,
  addheLibraryAssort,
  editheLibraryAssort,
  addtargetillness,
  getlibrarylist,
  dellibraryinfo,
@@ -672,12 +684,21 @@
    getDeptTree() {
      getheLibraryAssort({}).then((res) => {
        this.deptOptions = res.rows;
        console.log(res);
        this.dialogFormVisible = false;
      });
    },
    // 添加类别树
    submitsidecolumn() {
      if (this.classifyform.id) {
        editheLibraryAssort(this.classifyform).then((res) => {
          this.getDeptTree();
          this.$modal.msgSuccess("修改成功");
          this.classifyform = {};
          this.dialogFormVisible = false;
        });
        return;
      }
      let calssvalue = {};
      if (
        this.classifyform.pid &&
@@ -731,6 +752,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) {