import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ComStaffVO } from './types';

/**
 * 查询人员信息列表
 * @param query
 */
export const listComStaff = (query?: any): AxiosPromise<any> => {
  return request({
    url: '/system/comStaff/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询人员下拉选项列表（只返回 staffId 和 staffName）
 */
export const selectStaffOptionList = (): AxiosPromise<ComStaffVO[]> => {
  return request({
    url: '/system/organization/comStaff/options',
    method: 'get'
  });
};

export default {
  listComStaff,
  selectStaffOptionList
};
