/*
 * @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: 获取热词（工单）
 * @param 
 * @return {*}
 */
export const getkeyword = () => {
	return request({
		url: '/api/v1/Knowledge/getkeyword',
		method: 'get',
	});
};
/**
 * @description: 知识检索（工单）
 * @param {object} params
 * @return {*}
 */
export const knowpopscreen = (params: object) => {
	return request({
		url: '/api/v1/Knowledge/knowpopscreen',
		method: 'get',
		params
	});
};
/**
 * @description: 知识查询 （所有知识列表）
 * @param {object} params
 * @return {*}
 */
export const KnowledgePaged = (params: object) => {
	return request({
		url: '/api/v1/Knowledge',
		method: 'get',
		params
	});
};
/**
 * @description: 知识库新增
 * @param {object} data
 * @return {*}
 */
export const KnowledgeAdd = (data: object) => {
	return request({
		url: '/api/v1/Knowledge/add',
		method: 'post',
		data,
	});
};
/**
 * @description: 知识库修改
 * @param {object} data
 * @return {*}
 */
export const KnowledgeUpdate = (data: object) => {
	return request({
		url: '/api/v1/Knowledge/update',
		method: 'put',
		data,
	});
};
/**
 * @description: 知识库删除
 * @param {object} data
 * @param {string} id
 * @return {*}
 */
export const KnowledgeDel = (data: object, id: string) => {
	return request({
		url: `/api/v1/Knowledge/remove?Id=${id}`,
		method: 'post',
		data
	});
};
/**
 * @description: 知识库详情
 * @param {string} Id
 * @return {*}
 */
export const KnowledgeDetail = (Id: string | string[]) => {
	return request({
		url: `/api/v1/Knowledge/updateinfo/${Id}`,
		method: 'get',
	});
};
/**
 * @description: 知识库详情 增加浏览量
 * @param {string} Id
 * @return {*}
 */
export const KnowledgeInfo = (Id: string | string[]) => {
	return request({
		url: `/api/v1/Knowledge/info/${Id}`,
		method: 'get',
	});
};
/**
 * @description: 知识库下架
 * @param {string} Id
 * @return {*}
 */
export const KnowledgeOffshelf = (Id: string) => {
	return request({
		url: `/api/v1/Knowledge/offshelf?Id=${Id}`,
		method: 'put',
	});
};
/**
 * @description: 知识库上架
 * @param {string} Id
 * @return {*}
 */
export const KnowledgeOntheshelf = (Id: string) => {
	return request({
		url: `/api/v1/Knowledge/ontheshelf?Id=${Id}`,
		method: 'put',
	});
};
/**
 * @description: 知识库撤销
 * @param {string} workFlowId
 * @return {*}
 */
export const KnowledgeRevoke = (workFlowId: string) => {
	return request({
		url: `/api/v1/Knowledge/revoke?workFlowId=${workFlowId}`,
		method: 'put',
	});
};
/**
 * @description: 根据workFlowId,查询审批明细
 * @param {string} workFlowId
 * @return {*}
 */
export const KnowledgeGetworkflow = (workFlowId: string) => {
	return request({
		url: `/api/v1/Knowledge/getworkflow?workFlowId=${workFlowId}`,
		method: 'get',
	});
};
/**
 * @description: 知识申请-关联知识-获取知识列表
 * @param {object} params
 * @return {*}
 */
export const KnowledgeGetknowledge = (params: object) => {
	return request({
		url: `/api/v1/Knowledge/getknowledge`,
		method: 'get',
		params
	});
};
/**
 * @description:  我的知识删除列表
 * @param {object} params
 * @return {*}
 */
export const KnowledgeDeletelist = (params: object) => {
	return request({
		url: `/api/v1/Knowledge/deletelist`,
		method: 'get',
		params
	});
};
/**
 * @description:  审核管理列表
 * @param {object} params
 * @return {*}
 */
export const KnowledgeApprovedlist = (params: object) => {
	return request({
		url: `/api/v1/Knowledge/approvedlist`,
		method: 'get',
		params
	});
};
/**
 * @description:  查询-新增知识申请
 * @param {object} params
 * @return {*}
 */
export const KnowledgeAddapply = (params: object) => {
	return request({
		url: `/api/v1/KnowledgeApply/addapply`,
		method: 'get',
		params
	});
};
/**
 * @description:  新增-开始流程
 * @param {string} id
 * @param {object} data
 * @return {*}
 */
export const KnowledgeAddStartflow = (id: object, data: object) => {
	return request({
		url: `/api/v1/Knowledge/${id}/add-startflow`,
		method: 'post',
		data
	});
};
/**
 * @description:  修改-开始流程
  * @param {string} id
 * @param {object} data
 * @return {*}
 */
export const KnowledgeUpdateStartflow = (id: object, data: object) => {
	return request({
		url: `/api/v1/Knowledge/${id}/update-startflow`,
		method: 'post',
		data
	});
};
/**
 * @description:  删除-开始流程
 * @param {string} id
 * @param {object} data
 * @return {*}
 */
export const KnowledgeDeleteStartflow = (id: object, data: object) => {
	return request({
		url: `/api/v1/Knowledge/${id}/remove-startflow`,
		method: 'post',
		data
	});
};
/**
 * @description:  查询知识库办理流程开启参数-新增
 * @param {object} params
 * @return {*}
 */
export const KnowledgeAddStartflowParams = () => {
	return request({
		url: `/api/v1/Knowledge/add-flow-start`,
		method: 'get'
	});
};
/**
 * @description:  查询知识库办理流程开启参数-修改
 * @param {object} params
 * @return {*}
 */
export const KnowledgeUpdateStartflowParams = () => {
	return request({
		url: `/api/v1/Knowledge/update-flow-start`,
		method: 'get'
	});
};
/**
 * @description:  查询知识库办理流程开启参数-删除
 * @param {object} params
 * @return {*}
 */
export const KnowledgeDeleteStartflowParams = () => {
	return request({
		url: `/api/v1/Knowledge/remove-flow-start`,
		method: 'get'
	});
};