diff --git a/components.d.ts b/components.d.ts index 615d417..06ebe68 100644 --- a/components.d.ts +++ b/components.d.ts @@ -17,7 +17,6 @@ declare module 'vue' { NCollapse: typeof import('naive-ui')['NCollapse'] NCollapseItem: typeof import('naive-ui')['NCollapseItem'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] - NDataTable: typeof import('naive-ui')['NDataTable'] NDatePicker: typeof import('naive-ui')['NDatePicker'] NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDivider: typeof import('naive-ui')['NDivider'] @@ -28,7 +27,6 @@ declare module 'vue' { NGi: typeof import('naive-ui')['NGi'] NGrid: typeof import('naive-ui')['NGrid'] NGridItem: typeof import('naive-ui')['NGridItem'] - NIcon: typeof import('naive-ui')['NIcon'] NImage: typeof import('naive-ui')['NImage'] NInput: typeof import('naive-ui')['NInput'] NMessageProvider: typeof import('naive-ui')['NMessageProvider'] diff --git a/src/api/home/main.ts b/src/api/home/main.ts index ea24139..8072c2c 100644 --- a/src/api/home/main.ts +++ b/src/api/home/main.ts @@ -1,9 +1,9 @@ -import { pickBy } from 'lodash-es' -import { http } from '@/utils/http/axios' -import type { CheckParam, PageParam, QueryPictureParam, UploadParam } from '/#/api' import { ContentTypeEnum } from '@/enums/httpEnum' import { notEmpty } from '@/utils' import { formatToDate2 } from '@/utils/dateUtil' +import { http } from '@/utils/http/axios' +import { pickBy } from 'lodash-es' +import type { CheckParam, PageParam, QueryPictureParam, UploadParam } from '/#/api' /** * 获取查重列表 @@ -103,6 +103,104 @@ export async function oneClickCheck(params: Partial = { search_histo }) } +/** + * 增加生成任务包逻辑—一键查重 + * @param note + * @returns + */ + export async function oneClickCheckTaskPackage(params: Partial = { search_history: '0' }) { + const notEmptyParams = pickBy(params, notEmpty) + + Object.keys(notEmptyParams).forEach((key) => { + const val = notEmptyParams[key] + + if (Array.isArray(val)) + notEmptyParams[key] = val.join(',') + }) + + return http.request({ + url: `/ocr/checkDuplicate/openCheckDuplicate`, + method: 'get', + params: notEmptyParams, + headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, + }) +} + +/** + * 获取任务编号 + * @param note + * @returns + */ + export async function getLastCheckNo() { + + return http.request({ + url: `/ocr/checkDuplicate/getLastCheckNo`, + method: 'get', + headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, + }) +} +/** + * 获取查重任务状态 + * @param note + * @returns + */ + export async function getCheckDuplicateStatus(checkDuplicateNo) { + + return http.request({ + url: `/ocr/checkDuplicate/getCheckDuplicateStatus`, + method: 'get', + params: { checkDuplicateNo }, + headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, + }) +} +/** + * 创建任务包 + * @param + * @returns + */ + export async function createPackage(params) { + + return http.request({ + url: `/ocr/ocrTaskPackage/createPackage`, + method: 'post', + params + }) +} +/** + * 任务完成——创建任务包前——获取图片列表 + * @param + * @returns + */ +export async function queryPageListByCheckNo(params: any): Promise { + const notEmptyParams = pickBy(params, notEmpty) + + Object.keys(notEmptyParams).forEach((key) => { + const val = notEmptyParams[key] + + if (key === 'izyear') { + const start = formatToDate2(val[0]) + const end = formatToDate2(val[1]) + notEmptyParams[key] = `${start}-${end}` + } + + if (Array.isArray(notEmptyParams[key])) + notEmptyParams[key] = val.join(',') + }) + + const res = await http.request({ + url: `/ocr/checkDuplicate/queryPageListByCheckNo`, + method: 'get', + params: notEmptyParams, + headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, + }) + + const { data: { records, pages, total } } = res + return { + pageCount: pages, + data: records, + total, + } +} /** * 获取图片列表 * @param params diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index 46e5ce1..3ebc5d2 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -1,5 +1,5 @@ + + + + diff --git a/src/views/home/content/modal/PackageSettingsModal.vue b/src/views/home/content/modal/PackageSettingsModal.vue index 31e6c15..75859a9 100644 --- a/src/views/home/content/modal/PackageSettingsModal.vue +++ b/src/views/home/content/modal/PackageSettingsModal.vue @@ -1,7 +1,7 @@ @@ -85,11 +84,6 @@ function afterLeave() { - - - 是否对比历史数据 - - 是否给重复图片添加重复标识 diff --git a/src/views/home/content/modal/QueryRepeatedTasksModal.vue b/src/views/home/content/modal/QueryRepeatedTasksModal.vue new file mode 100644 index 0000000..f0f2a4a --- /dev/null +++ b/src/views/home/content/modal/QueryRepeatedTasksModal.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index b445f99..5733124 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -582,6 +582,15 @@ function getPercent(pictureid: string) {