MrShi
2024-01-29 bb0474b0368c0520f0ac12674eb8a5c2ca942170
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)
        })