/*
 * @Author: zc
 * @description 知识管理 申请管理
 * @version:
 * @Date: 2022-08-09 16:19:55
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-11-15 10:21:44
 */
import request from '/@/utils/request';
/**
 * @description 知识申请列表 基础数据
 * @return {*}
 */
export const baseData = () => {
	return request({
		url: '/api/v1/KnowledgeApply/apply-base-data',
		method: 'get'
	});
};
/**
 * @description 知识申请处理列表
 * @param {object} params
 * @return {*}
 */
export const handleList = (params:object) => {
	return request({
		url: '/api/v1/KnowledgeApply/handlelist',
		method: 'get',
        params
	});
};
/**
 * @description 我的知识申请列表
 * @param {object} params
 * @return {*}
 */
export const KnowledgeApply = (params:object) => {
	return request({
		url: '/api/v1/KnowledgeApply',
		method: 'get',
        params
	});
};
/**
 * @description 发起申请
 * @param {object} data
 * @return {*}
 */
export const KnowledgeApplyAdd = (data:object) => {
	return request({
		url: '/api/v1/KnowledgeApply/add',
		method: 'post',
        data
	});
};
/**
 * @description 修改申请
 * @param {object} data
 * @return {*}
 */
export const KnowledgeApplyUpdate = (data:object) => {
	return request({
		url: '/api/v1/KnowledgeApply/update',
		method: 'put',
        data
	});
};
/**
 * @description 查询申请详情
 * @param {string} Id
 * @return {*}
 */
export const KnowledgeApplyDetail = (Id:string) => {
	return request({
		url: `/api/v1/KnowledgeApply/info/${Id}`,
		method: 'get',
	});
};
/**
 * @description 知识申请-信息办理
 * @param {object} data
 * @return {*}
 */
export const KnowledgeHandle = (data:object) => {
	return request({
		url: `/api/v1/KnowledgeApply/handle`,
		method: 'put',
		data
	});
};
/**
 * @description 我的知识申请- 撤销操作 撤销申请
 * @param {string} Id
 * @return {*}
 */
export const KnowledgeCancel= (Id:string) => {
	return request({
		url: `/api/v1/KnowledgeApply/apply-handle/${Id}`,
		method: 'put'
	});
};
/**
 * @description 知识申请- 退回操作
 * @return {*}
 * @param data
 */
export const KnowledgeReturn= (data:object) => {
	return request({
		url: `/api/v1/KnowledgeApply/return`,
		method: 'put',
		data
	});
};
/**
 * @description 删除申请
 * @return {*}
 * @param {string} id
 */
export const KnowledgeRemove= (id:string) => {
	return request({
		url: `/api/v1/KnowledgeApply/remove?Id=${id}`,
		method: 'Delete'
	});
};