|
@@ -102,17 +102,14 @@ export const fetchMembers: Fetcher<{ accounts: Member[] | null }, { url: string;
|
|
|
}
|
|
|
|
|
|
export const fetchTypes = ({ url, params }: any) => {
|
|
|
- console.log('查询类型列表')
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const fetchKnowledges = ({ url, params }: any) => {
|
|
|
- console.log('查询知识服务', params, url)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const fetchMoulds = ({ url, params }: any) => {
|
|
|
- console.log('查询知识库模板', params, url)
|
|
|
return get<{ accounts: Member[] | null }>(url, { params })
|
|
|
}
|
|
|
|
|
@@ -144,37 +141,30 @@ export const deleteMemberOrCancelInvitation: Fetcher<CommonResponse, { url: stri
|
|
|
}
|
|
|
|
|
|
export const addType = ({ url, body }: any) => {
|
|
|
- console.log('新增类型', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const editType = ({ url, body }: any) => {
|
|
|
- console.log('编辑类型', url, body)
|
|
|
return patch(url, { body })
|
|
|
}
|
|
|
|
|
|
export const delType = ({ url, body }: any) => {
|
|
|
- console.log('删除类型', url, body)
|
|
|
return del(url, { body })
|
|
|
}
|
|
|
|
|
|
export const addKnowledge = ({ url, body }: any) => {
|
|
|
- console.log('新增知识', body, url)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const editKnowledge = ({ url, body }: any) => {
|
|
|
- console.log('编辑知识', body, url)
|
|
|
return patch(url, { body })
|
|
|
}
|
|
|
|
|
|
export const delKnowledge = ({ url, body }: any) => {
|
|
|
- console.log('删除知识', url, body)
|
|
|
return del(url, { body })
|
|
|
}
|
|
|
|
|
|
export const addMouldFile = ({ url, body }: any) => {
|
|
|
- console.log('新增模板文件', body, url)
|
|
|
return upload({
|
|
|
xhr: new XMLHttpRequest(),
|
|
|
data: body,
|
|
@@ -182,39 +172,13 @@ export const addMouldFile = ({ url, body }: any) => {
|
|
|
}
|
|
|
|
|
|
export const delMouldFile = ({ url, body }: any) => {
|
|
|
- console.log('删除模板文件', url)
|
|
|
return del(url)
|
|
|
}
|
|
|
|
|
|
export const downloadMouldFile = ({ url, fileName }: any) => {
|
|
|
- console.log('下载模板文件', url, fileName)
|
|
|
return download(url, {}, { fileName })
|
|
|
}
|
|
|
|
|
|
-export const handleExamine = ({ url, body }: any) => {
|
|
|
- // return post<InvitationResponse>(url, { body })
|
|
|
- console.log('处理上下线审核', body)
|
|
|
- return new Promise((resolve) => {
|
|
|
- setTimeout(() => {
|
|
|
- resolve({
|
|
|
- result: 'success',
|
|
|
- })
|
|
|
- }, 1000)
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
-export const applyExamine = ({ url, body }: any) => {
|
|
|
- // return post<InvitationResponse>(url, { body })
|
|
|
- console.log('提交上下线审核', body)
|
|
|
- return new Promise((resolve) => {
|
|
|
- setTimeout(() => {
|
|
|
- resolve({
|
|
|
- result: 'success',
|
|
|
- })
|
|
|
- }, 1000)
|
|
|
- })
|
|
|
-}
|
|
|
-
|
|
|
export const fetchFilePreview: Fetcher<{ content: string }, { fileID: string }> = ({ fileID }) => {
|
|
|
return get<{ content: string }>(`/files/${fileID}/preview`)
|
|
|
}
|
|
@@ -436,191 +400,153 @@ export const getDocDownloadUrl = (doc_name: string) =>
|
|
|
get<{ url: string }>('/compliance/download', { params: { doc_name } }, { silent: true })
|
|
|
|
|
|
export const fetchStatistic = ({ url, params }: any) => {
|
|
|
- console.log('查询知识总览', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const fetchLog = ({ url, params }: any) => {
|
|
|
- console.log('查询训练日志列表', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const downloadLogFile = ({ url, fileName }: any) => {
|
|
|
- console.log('下载训练日志文件', url, fileName)
|
|
|
return download(url, {}, { fileName })
|
|
|
}
|
|
|
|
|
|
export const fetchIntentType = ({ url, params }: any) => {
|
|
|
- console.log('查询意图类型', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const addIntentType = ({ url, body }: any) => {
|
|
|
- console.log('新增意图类型', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const editIntentType = ({ url, body }: any) => {
|
|
|
- console.log('编辑意图类型', url, body)
|
|
|
return patch(url, { body })
|
|
|
}
|
|
|
|
|
|
export const delIntentType = ({ url, body }: any) => {
|
|
|
- console.log('删除意图类型', url, body)
|
|
|
return del(url, { body })
|
|
|
}
|
|
|
|
|
|
export const fetchIntent = ({ url, params }: any) => {
|
|
|
- console.log('查询意图', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const addIntent = ({ url, body }: any) => {
|
|
|
- console.log('新增意图', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const editIntent = ({ url, body }: any) => {
|
|
|
- console.log('编辑意图', url, body)
|
|
|
return patch(url, { body })
|
|
|
}
|
|
|
|
|
|
export const delIntent = ({ url, body }: any) => {
|
|
|
- console.log('删除意图', url, body)
|
|
|
return del(url, { body })
|
|
|
}
|
|
|
|
|
|
export const getIntent = ({ url, body }: any) => {
|
|
|
- console.log('详情意图', url, body)
|
|
|
return get(url, { body })
|
|
|
}
|
|
|
|
|
|
export const fetchIntentKeyword = ({ url, params }: any) => {
|
|
|
- console.log('查询意图关键词', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const addIntentKeyword = ({ url, body }: any) => {
|
|
|
- console.log('新增意图关键词', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const editIntentKeyword = ({ url, body }: any) => {
|
|
|
- console.log('编辑意图关键词', url, body)
|
|
|
return patch(url, { body })
|
|
|
}
|
|
|
|
|
|
export const delBatchIntentKeyword = ({ url, body }: any) => {
|
|
|
- console.log('批量删除意图关键词', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const fetchCorpus = ({ url, params }: any) => {
|
|
|
- console.log('查询训练语料列表', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const addCorpus = ({ url, body }: any) => {
|
|
|
- console.log('新增训练语料', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const editCorpus = ({ url, body }: any) => {
|
|
|
- console.log('编辑训练语料', url, body)
|
|
|
return patch(url, { body })
|
|
|
}
|
|
|
|
|
|
export const delCorpus = ({ url, body }: any) => {
|
|
|
- console.log('删除训练语料', url, body)
|
|
|
return del(url, { body })
|
|
|
}
|
|
|
|
|
|
export const getCorpus = ({ url, params }: any) => {
|
|
|
- console.log('查询训练语料', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const fetchCorpusQuestion = ({ url, params }: any) => {
|
|
|
- console.log('查询训练语料-相似问题', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const addCorpusQuestion = ({ url, body }: any) => {
|
|
|
- console.log('新增训练语料-相似问题', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const editCorpusQuestion = ({ url, body }: any) => {
|
|
|
- console.log('编辑训练语料-相似问题', url, body)
|
|
|
return patch(url, { body })
|
|
|
}
|
|
|
|
|
|
export const delBatchCorpusQuestion = ({ url, body }: any) => {
|
|
|
- console.log('批量删除训练语料-相似问题', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const fetchDepts = ({ url, params }: any) => {
|
|
|
- console.log('查询部门列表', params, url)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const addDept = ({ url, body }: any) => {
|
|
|
- console.log('新增部门', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const editDept = ({ url, body }: any) => {
|
|
|
- console.log('编辑部门', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const delDept = ({ url, body }: any) => {
|
|
|
- console.log('删除部门', url, body)
|
|
|
return del(url, { body })
|
|
|
}
|
|
|
|
|
|
export const fetchDeptUsers = ({ url, params }: any) => {
|
|
|
- console.log('查询部门用户列表', params, url)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const fetchNoDeptUsers = ({ url, params }: any) => {
|
|
|
- console.log('查询未绑定部门用户列表', params, url)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const deptAddUsers = ({ url, body }: any) => {
|
|
|
- console.log('部门关联用户', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const deptDelUsers = ({ url, body }: any) => {
|
|
|
- console.log('部门删除用户', url, body)
|
|
|
return del(url, { body })
|
|
|
}
|
|
|
|
|
|
export const fetchDeptUserTree = ({ url, params }: any) => {
|
|
|
- console.log('部门账号树', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const fetchDatasetsPermission = ({ url, params }: any) => {
|
|
|
- console.log('查询知识库权限', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const setDatasetsPermission = ({ url, body }: any) => {
|
|
|
- console.log('配置知识库权限', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|
|
|
|
|
|
export const fetchAppsPermission = ({ url, params }: any) => {
|
|
|
- console.log('查询机器人权限', url, params)
|
|
|
return get(url, { params })
|
|
|
}
|
|
|
|
|
|
export const setAppsPermission = ({ url, body }: any) => {
|
|
|
- console.log('配置机器人权限', url, body)
|
|
|
return post(url, { body })
|
|
|
}
|