fuliqi
2025-02-12 e788995330a3fd588d0d80f28ee7510e4b7c787f
src/components/flow/Dept/index.vue
@@ -4,9 +4,9 @@
      :title="`选择候选部门`"
      :visible.sync="show"
      width="65%"
      :destroy-on-close="true"
      :close-on-click-modal="false"
      :modal="false"
      :before-close="close">
      <el-tree
        ref="tree"
@@ -66,10 +66,17 @@
  methods: {
    setCheckList(value) {
      this.checkList = value
      this.$nextTick(() => {
        if (this.$refs.tree && this.checkeds) {
          this.$refs.tree.setCheckedKeys(this.checkeds);
        }
      });
    },
    handleCheckChange(data, checked, indeterminate) {
      if (checked) {
        this.checkList.push(data)
        if (this.checkList.indexOf(data) === -1) {
          this.checkList.push(data)
        }
      } else {
        this.checkList = this.checkList.filter(item => item !== data)
      }