111
k94314517
2024-02-01 13ff112e45a64378cdc91aa2f05916721945f08a
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)
        })