jiangping
2024-02-01 f6b0e262db2af5ca2e5ed76f95e746c1dd3c58e3
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)
        })