yz_08
2021-02-01 bae2940392a53b84524967565a12f9d66962a44a
src/views/user/selectdept.vue
@@ -1,9 +1,18 @@
<template>
  <div>
    <el-input placeholder="输入关键字进行过滤" v-model="filterText">
    </el-input>
    <el-tree ref="tree" :data="deptTree" :check-strictly="true" show-checkbox accordion node-key="id" highlight-current
      default-expand-all :filter-node-method="filterNode" @node-click="nodeClick" />
    <el-input v-model="filterText" placeholder="输入关键字进行过滤" />
    <el-tree
      ref="tree"
      :data="deptTree"
      :check-strictly="true"
      show-checkbox
      accordion
      node-key="id"
      highlight-current
      default-expand-all
      :filter-node-method="filterNode"
      @node-click="nodeClick"
    />
    <el-button type="primary" @click="sureChoose">确定</el-button>
    <el-button type="danger" @click="cancleChoose">取消</el-button>
  </div>
@@ -16,12 +25,12 @@
        headerHeight: '70px',
        advancedQueryShow: false,
        deptTree: [],
        dept: this.initDept(),
      dept: this.initDept()
      }
    },
    watch: {
      filterText(val) {
        this.$refs.tree.filter(val);
      this.$refs.tree.filter(val)
      }
    },
    mounted() {