图形示例

组织架构

调用方式

  <yy-organization
    title="组织架构自定义标题"
    :visible="visible"
    :isSingleCheck="false"
    :departmentList="[]"
    :memberList="[]"
    :checkedIds="[]"
    @confirmCheck="confirmCheck"
    @cancelCheck="cancelCheck"
  ></yy-organization>
1
2
3
4
5
6
7
8
9
10

props和事件监听

export default {
  data() {
    return {
      visible:false,
    };
  },
  methods: {
    confirmCheck(members) {
      //已选成员集合
      console.log(members);
      this.visible = false;
    },
    cancelCheck() {
      this.visible = false;
    },
  },
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

参数说明

参数 说明 类型 默认值
visible 开启或关闭 Boolean false
title 组织架构标题 String 组织架构
isSingleCheck 是否单选模式 Boolean false
departmentList 部门数据集合 Array []
memberList 成员数据集合 Array []
checkedIds 已选成员id集合 Array []

事件

参数 说明
confirmCheck 点击确定按钮触发,返回选择成员数据集合
cancelCheck 点击返回按钮触发