# openSelectComponent

打开选择组件 

## API 调用

### QN.app.invoke({api:'openSelectComponent', query})

#### API 调用入参

参数名             | 类型       | 是否可选 | 默认值 | 含义
:-------------- | :------- | :--- | :-- | :-----------------------------------------------------------------------------------------------------------------------
`query`         | `Object` |      |     |
`query.multiSelection`  | `string` |  可选    |  true | 单选还是多选，单选传false，多选传true。默认单选。
`query.title`  | `string` |  可选    |  选择处理人 | 选择页面title文案
`query.types`  | `string` |  可选    |  1 | 基础类型：组织架构中的人（1）、最近联系人（1 << 1）、工作组和工作组成员（1 << 2）、群（1 << 3）。 如果要选择多种类型的话，则把基础类型取或。比如要选择组织架构中的人和最近联系人的话，则types传1 | 1 << 1，即3.


#### API 响应结果

参数名      | 类型  | 示例 | 含义
:------- | :-- | :----- | :---
`result` | `*` |        | 请求响应
`query.data`  | `string` |  <need>    |  <default> | 一个数组，每种选择类型及对应的选择结果。type为0时contents是选中的组织架构中的人的employee_id和人的显示名；type为1时contents对应选中的工作组中的人employee_id、显示名和工作组id；type为2时对应选中的工作组的id和工作组名；


#### 调用示例

```javascript
QN.app.invoke({
      api:'openSelectComponent',
      query:{
                multiSelection : 'true'  ,
                    title : '选择处理人'  ,
                    types : '1'  
            
      }
}).then(result => {
    console.log(result);
}, error => {
    console.log(error);
});
    
```
