/* * @Author: zwq * @Date: 2020-12-29 16:00:14 * @LastEditors: gtz * @LastEditTime: 2021-04-17 16:04:51 * @Description: */ import request from '@/utils/request' /** * 获取员工列表 * @param {object} data * @param {number} data.current * @param {number} [data.status] * @param {string} [data.code] * @param {string} [data.name] * @param {number} data.size */ export function list(data) { return request({ url: '/basic/worker/page', method: 'post', data }) } /** * 获取员工单条数据 * @param {number} id */ export function detail(id) { return request({ url: '/basic/worker/get', method: 'post', data: { id } }) } /** * 更新员工单条数据 * @param {object} data * @param {string} [data.belong] * @param {string} data.code * @param {string} [data.departmentId] * @param {string} [data.description] * @param {string} [data.education] * @param {string} [data.email] * @param {string} [data.entryTime] * @param {number} data.id * @param {string} [data.identity] * @param {string} data.majorId * @param {string} data.name * @param {string} [data.fileUrl] 头像地址或头像文件id * @param {string} data.onDuty * @param {string} [data.outTime] * @param {string} [data.position] * @param {string} [data.roleId] * @param {string} data.sex * @param {string} [data.status] * @param {string} [data.telephone] * @param {string} [data.wechatCode] * @param {string} [data.workshop] */ export function update(data) { return request({ url: '/basic/worker/update', method: 'post', data }) } /** * 新增员工单条数据 * @param {object} data * @param {string} [data.belong] * @param {string} data.code * @param {string} [data.departmentId] * @param {string} [data.description] * @param {string} [data.education] * @param {string} [data.email] * @param {string} [data.entryTime] * @param {number} [data.id] * @param {string} [data.identity] * @param {string} data.majorId * @param {string} data.name * @param {string} [data.fileUrl] 头像地址或头像文件id * @param {string} data.onDuty * @param {string} [data.outTime] * @param {string} [data.position] * @param {string} [data.roleId] * @param {string} data.sex * @param {string} [data.status] * @param {string} [data.telephone] * @param {string} [data.wechatCode] * @param {string} [data.workshop] */ export function add(data) { return request({ url: '/basic/worker/add', method: 'post', data }) } /** * 获取员工code */ export function getCode() { return request({ url: '/basic/worker/get-code', method: 'post' }) } /** * 删除员工单条数据 * @param {number} id */ export function del(id) { return request({ url: '/basic/worker/delete', method: 'post', data: { id } }) } export function getWorkerList(data) { // 添加组员列表 return request({ url: '/basic/team-det/workerList', method: 'post', data }) } export function getRoleList() { return request({ url: '/basic/platform-dict/selectPlatformDictDataListByPage', method: 'post', data: { dictTypeId: '1383318968677273601', current: 1, size: 999 } }) } /** 文件上传 */ export function saveFile(data) { // application/x-www-form-urlencoded return request({ url: '/common/attachment/uploadFileFormData', method: 'post', data }) }