jiangping
2024-02-04 b5ff669f6a9c3199dc3f08b219770599d7c56d59
platform/src/components/common/DepartmentSelect.vue
@@ -36,6 +36,7 @@
    appendToBody: {
      default: false
    },
    // 需被排除的部门ID
    excludeId: {}
  },
@@ -45,16 +46,21 @@
    }
  },
  watch: {
    value () {
    excludeId () {
      console.log(this.type);
      this.fetchData()
    },
    type() {
      console.log(this.type);
      this.fetchData()
    }
  },
  methods: {
    // 获取所有部门
    fetchData () {
      console.log(this.type);
      fetchTree()
        .then(records => {
          // debugger
          this.data = []
          this.__fillData(this.data, records)
        })