jiangping
2024-01-31 95db36f778d5a6f4197cc2cde4390c84e57b26b6
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)
        })