/*
 * @Author: zc
 * @Description: 组织架构配置
 * @version: 
 * @Date: 2022-10-21 09:01:22
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-11-12 10:20:57
 */
import request from '/@/utils/request';
/**
 * @description: 基础数据
 * @return {*}
 */
export const baseData = (): Promise<any> => {
	return request({
		url: `/api/v1/Org/base-data-add`,
		method: 'get',
	});
};
/**
 * @description: 获取组织架构列表
 * @param {object} params
 * @return {*}
 */
export const getOrgList = (params?: object): Promise<any> => {
	return request({
		url: '/api/v1/Org/getorgjson',
		method: 'get',
		params
	});
};
/**
 * @description: 新增组织
 * @param {object} params
 * @return {*}
 */
export const addOrg = (params: object): Promise<any> => {
	return request({
		url: '/api/v1/Org/add-org',
		method: 'post',
		data:params
	});
};
/**
 * @description: 更新组织修改
 * @param {object} params
 * @return {*}
 */
export const updateOrg = (params: object): Promise<any> => {
	return request({
		url: '/api/v1/Org/update-org',
		method: 'post',
		data:params
	});
};
/**
 * @description: 删除组织
 * @param {object} id
 * @return {*}
 */
export const removeOrg = (id: string): Promise<any> => {
	return request({
		url: `/api/v1/Sys/removemenu/${id}`,
		method: 'delete',
	});
};
/**
 * @description: 获取组织详情根据id
 * @param {object} id
 * @return {*}
 */
export const getOrgById = (id: string): Promise<any> => {
	return request({
		url: `/api/v1/Org/getorg/${id}`,
		method: 'get',
	});
};