You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
144 lines
2.8 KiB
144 lines
2.8 KiB
import qs from 'qs'
|
|
import { http } from '@/utils/http/axios'
|
|
import type { ApprovalParam, PageParam } from '/#/api'
|
|
import { ContentTypeEnum } from '@/enums/httpEnum'
|
|
|
|
/**
|
|
* 获取审核列表
|
|
* @returns
|
|
*/
|
|
export async function getApprovalList(page: any) {
|
|
const res = await http.request({
|
|
url: `/flow/task/listalldata`,
|
|
method: 'get',
|
|
params: {
|
|
pageSize: page.pageSize,
|
|
currPage: page.pageNo,
|
|
keyword: page.keyword,
|
|
userSearchId: page.userSearchId,
|
|
},
|
|
})
|
|
|
|
const { data: { list, totalCount } } = res
|
|
return {
|
|
pageCount: Math.ceil(totalCount / page.pageSize!),
|
|
data: list,
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 审核
|
|
* @param params
|
|
*/
|
|
export async function audit(params) {
|
|
return http.request({
|
|
url: `/flow/task/completeBatchFlow?`,
|
|
method: 'post',
|
|
params,
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 移动到可疑文件夹
|
|
* @returns
|
|
*/
|
|
export async function dubiousfileyd(params) {
|
|
const res = await http.request({
|
|
url: `/ocr/dubiousfile/dubiousfileyd`,
|
|
method: 'get',
|
|
params,
|
|
})
|
|
|
|
return res
|
|
}
|
|
|
|
/**
|
|
* 显示可疑文件夹列表
|
|
* @returns
|
|
*/
|
|
export async function dubiousfilelist(params) {
|
|
const res = await http.request({
|
|
url: `/ocr/dubiousfile/dubiousfilelist`,
|
|
method: 'get',
|
|
params,
|
|
})
|
|
|
|
return res
|
|
}
|
|
|
|
/**
|
|
* 显示可疑文件夹列表
|
|
* @returns
|
|
*/
|
|
export async function removeFiles(params) {
|
|
const res = await http.request({
|
|
url: `/ocr/dubiousfile/dubiousfileyc`,
|
|
method: 'get',
|
|
params,
|
|
})
|
|
|
|
return res
|
|
}
|
|
|
|
/**
|
|
* 获取某个任务详情(相似图片列表)
|
|
* @param params
|
|
* @returns
|
|
*/
|
|
export async function getSimilarityList(params: any) {
|
|
const res = await http.request({
|
|
url: `/backstage/jifen/ocrtaskchildpicture/getSimilarityList`,
|
|
method: 'get',
|
|
params,
|
|
})
|
|
|
|
const { data } = res
|
|
if (data) {
|
|
const { records, pages, total } = data
|
|
// 精简一下数据
|
|
const list = records.map((item) => {
|
|
return {
|
|
id: item.id,
|
|
taskId: item.taskId,
|
|
taskname: item.fromtaskname,
|
|
assignee: item.assignee,
|
|
pictureid: item.pictureid,
|
|
imgurl: item.imgUrl,
|
|
thumburl: item.imgUrl,
|
|
iztrueorfalse: item.iztrueorfalse,
|
|
states: item.states,
|
|
}
|
|
})
|
|
|
|
return {
|
|
pageCount: pages,
|
|
data: records,
|
|
total,
|
|
}
|
|
}
|
|
else {
|
|
return {
|
|
pageCount: 0,
|
|
data: [],
|
|
total: 0,
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 获取某个任务详情(字段信息)
|
|
* @param id 任务id
|
|
* @param packageid 任务包id
|
|
* @returns
|
|
*/
|
|
|
|
export async function getTaskDetailInfo(taskId: string, packageid: string, taskNode: string) {
|
|
const pid = packageid || 0
|
|
const res = await http.request({
|
|
url: `/backstage/jifen/ocrtaskchildpicture/getdata/${taskId}/${pid}/${taskNode}`,
|
|
method: 'get',
|
|
})
|
|
|
|
return res.data
|
|
}
|