diff --git a/src/api/dictionary/index.ts b/src/api/dictionary/index.ts index 01cdae7..247cf59 100644 --- a/src/api/dictionary/index.ts +++ b/src/api/dictionary/index.ts @@ -1,6 +1,5 @@ import { http } from '@/utils/http/axios' import type { PageParam } from '/#/api' -import { ContentTypeEnum } from '@/enums/httpEnum' /** * 获取地区列表 @@ -26,7 +25,6 @@ export async function getPictureTypeList(): Promise { const res = await http.request({ url: `/ocr/ocrPicturetype/rootList`, method: 'get', - headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) const { data } = res @@ -87,7 +85,6 @@ export async function getIzShowList(): Promise { const res = await http.request({ url: `/ocr/ocrPictureclass/rootList`, method: 'get', - headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) const { data } = res @@ -123,26 +120,12 @@ export async function getIzsSearchManager(): Promise { } /** - * 获取izproject列表 + * 获取项目列表 * @returns */ export async function getIzProjectList(): Promise { const res = await http.request({ - url: `/ocr/ocrPictureclass/todo`, - method: 'get', - }) - - const { data } = res - return data -} - -/** - * 获取izcustomtype列表 - * @returns - */ -export async function getIzCustomtypeList(): Promise { - const res = await http.request({ - url: `/ocr/ocrPictureclass/todo`, + url: `/backstage/oa/category/listall`, method: 'get', }) @@ -188,7 +171,7 @@ export async function getIztaskstatusList(enabled: string) { */ export async function getIzvisitproList(): Promise { const res = await http.request({ - url: `/ocr/ocrPictureclass/todo`, + url: `/backstage/ocrnewtest/ocrprovince/listall`, method: 'get', }) @@ -229,34 +212,29 @@ export async function getIzproductnameList(enabled: string) { } /** - * 获取客户类型 + * 获取客户名称 * @param enabled * @returns */ -export async function getIzfiled2List(enabled: string) { +export async function getizcustomnameList(enabled: string) { const res = await http.request({ - url: `/static/admin/web/distionary/bytypecode/IZCUSTOMTYPE`, + url: `/static/admin/web/distionary/bytypecode/IZCUSTOMNAME`, method: 'get', params: { enabled }, - headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) - debugger const list = res.data[0].distionaryList return list } /** - * 获取客户名称 - * @param enabled + * 获取izcustomtype列表 * @returns */ -export async function getIzfiled3List(enabled: string) { +export async function getIzCustomtypeList(): Promise { const res = await http.request({ - url: `/static/admin/web/distionary/bytypecode/IZCUSTOMNAME`, + url: `/static/admin/web/distionary/bytypecode/IZCUSTOMTYPE`, method: 'get', - params: { enabled }, - headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) const list = res.data[0].distionaryList @@ -268,12 +246,11 @@ export async function getIzfiled3List(enabled: string) { * @param enabled * @returns */ -export async function getIzfiled6List(enabled: string) { +export async function getIzcustomlevel(enabled: string) { const res = await http.request({ url: `/static/admin/web/distionary/bytypecode/IZCUSTOMLEVEL`, method: 'get', params: { enabled }, - headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) const list = res.data[0].distionaryList @@ -285,14 +262,28 @@ export async function getIzfiled6List(enabled: string) { * @param enabled * @returns */ -export async function getIzfiled17List(enabled: string) { +export async function getIzprojecttypeList(enabled: string) { const res = await http.request({ url: `/static/admin/web/distionary/bytypecode/IZPROJECTTYPE`, method: 'get', params: { enabled }, - headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) const list = res.data[0].distionaryList return list } + +/** + * 获取发布地区 + * @param enabled + * @returns + */ +export async function getIzvisitcityList() { + const res = await http.request({ + url: `/ocr/ocrarea/listall`, + method: 'get', + }) + + const { data } = res + return data +} diff --git a/src/api/home/main.ts b/src/api/home/main.ts index 98245b8..bf9b85e 100644 --- a/src/api/home/main.ts +++ b/src/api/home/main.ts @@ -1,6 +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' /** * 获取查重列表 @@ -69,10 +72,19 @@ export async function saveNote(note: string) { * @returns */ export async function oneClickCheck(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/ocrPicture/createorder`, method: 'get', - params, + params: notEmptyParams, headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) } @@ -83,10 +95,25 @@ export async function oneClickCheck(params: Partial = { search_histo * @returns */ export async function getPictureList(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(val)) + notEmptyParams[key] = val.join(',') + }) + const res = await http.request({ url: `/ocr/ocrPicture/list`, method: 'get', - params, + params: notEmptyParams, headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) diff --git a/src/api/work/work.ts b/src/api/work/work.ts index 815f52a..20accd0 100644 --- a/src/api/work/work.ts +++ b/src/api/work/work.ts @@ -1,5 +1,6 @@ import { http } from '@/utils/http/axios' import type { PageParam, PictureSortParam, SetTFParam } from '/#/api' +import { ContentTypeEnum } from '@/enums/httpEnum' /** * 获取任务包列表 @@ -69,12 +70,31 @@ export async function getTaskDetailPictureList(packageid: string, taskchildpictu }) const { data: { records, pages } } = res + + // 精简一下数据 + const list = records.map((item) => { + return { + id: item.id, + pictureid: item.pictureid, + imgurl: item.ocrPicture.imgurl, + iztrueorfalse: item.iztrueorfalse, + states: item.states, + history: hasHistory(item.ocpictureid, item.picturecompare), + } + }) return { pageCount: pages, - data: records, + data: list, } } +// ocpictureid 比 picturecompare数据多,说明有历史数据 +function hasHistory(ocpictureid: string, picturecompare: string) { + const ids = ocpictureid.split(',') + const compares = picturecompare.split(',') + return ids.length > compares.length +} + /** * 设置真假 * @param params @@ -82,9 +102,10 @@ export async function getTaskDetailPictureList(packageid: string, taskchildpictu */ export async function setTF(params: SetTFParam) { return await http.request({ - url: `/ocr/ocrPackagetask/ordertrueorfalse`, + url: `/backstage/jifen/ocrtaskchildpicture/ordertrueorfalse`, method: 'post', params, + headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) } @@ -93,11 +114,12 @@ export async function setTF(params: SetTFParam) { * @param id * @returns */ -export async function clearTF(id: string): Promise { +export async function clearTF(id: string, childId: string): Promise { return await http.request({ - url: `/ocr/ocrPackagetask/listorderbytask`, - method: 'get', - params: { packageid: id }, + url: `/backstage/jifen/ocrtaskchildpicture/clearmark`, + method: 'post', + params: { packageid: id, taskchildpictureid: childId }, + headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) } diff --git a/src/assets/icons/jia.svg b/src/assets/icons/jia.svg new file mode 100644 index 0000000..6aa9c57 --- /dev/null +++ b/src/assets/icons/jia.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/m1.svg b/src/assets/icons/m1.svg new file mode 100644 index 0000000..af85b5b --- /dev/null +++ b/src/assets/icons/m1.svg @@ -0,0 +1,70 @@ + + + 图片标记 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/m2.svg b/src/assets/icons/m2.svg new file mode 100644 index 0000000..067f81e --- /dev/null +++ b/src/assets/icons/m2.svg @@ -0,0 +1,71 @@ + + + 相似匹配 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/zhen.svg b/src/assets/icons/zhen.svg index b406b25..c551d98 100644 --- a/src/assets/icons/zhen.svg +++ b/src/assets/icons/zhen.svg @@ -5,8 +5,8 @@ - - + + diff --git a/src/config/aside.ts b/src/config/aside.ts index 60a7d85..8c92e44 100644 --- a/src/config/aside.ts +++ b/src/config/aside.ts @@ -1,5 +1,5 @@ import type { Component } from 'vue' -import { IzCustomtypesVue, IzProductVue, IzProjectVue, IzSearchManagerVue, IzSearchVue, IzShowVue, Izfiled17Vue, Izfiled2Vue, Izfiled3Vue, Izfiled6Vue, IzfirmVue, IztaskrromVue, IztaskstatusVue, IzvisitproVue, PictureDownloadVue, PictureTypeVue, PictureUploadVue, PlaceHolderVue, PlanVue, RegionVue, ReportUserVue, SimilarityVue, TimeVue } from '@/views/home/aside/comp/items' +import { IzCustomlevel, IzCustomname, IzCustomtype, IzProductVue, IzProjectVue, IzProjecttype, IzShowVue, IzfirmVue, IztaskrromVue, IztaskstatusVue, IzvisitproVue, PictureDownloadVue, PictureTypeVue, PictureUploadVue, PlaceHolderVue, PlanVue, ReportUserVue, SimilarityVue, TimeVue } from '@/views/home/aside/comp/items' export interface AsideEntity { label: string @@ -50,14 +50,14 @@ export const asideMap: Recordable = { }, izyear: { label: '年份', - defaultValue: [1183135260000, Date.now()], + defaultValue: [1704038400000, Date.now()], isDefaultFilter: false, key: 'izyear', component: TimeVue, }, izpicturetype: { label: '图片类型', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izpicturetype', component: PictureTypeVue, @@ -68,132 +68,106 @@ export const asideMap: Recordable = { isDefaultFilter: false, key: 'izupload', component: PictureUploadVue, - inFilterList: false, }, izcustomtype: { label: '客户类型', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izcustomtype', - component: IzCustomtypesVue, + component: IzCustomtype, }, izcustomlevel: { label: '客户级别', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izcustomlevel', - component: PlaceHolderVue, + component: IzCustomlevel, }, izcustomname: { label: '客户名称', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izcustomname', - component: PlaceHolderVue, + component: IzCustomname, }, izprojecttype: { label: '项目类型', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izprojecttype', - component: PlaceHolderVue, + component: IzProjecttype, }, iztaskrrom: { label: '任务来源', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'iztaskrrom', component: IztaskrromVue, }, iztaskstatus: { label: '任务状态', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'iztaskstatus', component: IztaskstatusVue, }, izvisitpro: { label: '拜访省份', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izvisitpro', component: IzvisitproVue, }, izvisitcity: { - label: '拜访城市', - defaultValue: [], + label: '发布地区', + defaultValue: null, isDefaultFilter: false, - key: 'izvisitpro', + key: 'izvisitcity', component: PlaceHolderVue, }, izfirm: { label: '厂商', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izfirm', component: IzfirmVue, }, izproductname: { label: '产品名称', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izproductname', component: IzProductVue, }, izdesc: { label: 'izdesc', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izdesc', component: PlaceHolderVue, + inFilterList: false, }, izsearchmanager: { label: 'izsearchmanager', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izsearchmanager', - component: IzSearchManagerVue, + component: PlaceHolderVue, + inFilterList: false, }, izshow: { label: '分类', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izshow', component: IzShowVue, }, izsearch: { label: 'izsearch', - defaultValue: [], + defaultValue: null, isDefaultFilter: false, key: 'izsearch', - component: IzSearchVue, - }, - izfiled2: { - label: 'izfiled2', - defaultValue: [], - isDefaultFilter: false, - key: 'izfiled2', - component: Izfiled2Vue, - }, - izfiled6: { - label: 'izfiled6', - defaultValue: [], - isDefaultFilter: false, - key: 'izfiled6', - component: Izfiled6Vue, - }, - izfiled3: { - label: 'izfiled3', - defaultValue: [], - isDefaultFilter: false, - key: 'izfiled3', - component: Izfiled3Vue, - }, - izfiled17: { - label: 'izfiled17', - defaultValue: [], - isDefaultFilter: false, - key: 'izfiled17', - component: Izfiled17Vue, + component: PlaceHolderVue, + inFilterList: false, }, } diff --git a/src/config/workorder.ts b/src/config/workorder.ts index 7ecb00e..4a292ab 100644 --- a/src/config/workorder.ts +++ b/src/config/workorder.ts @@ -87,3 +87,22 @@ export const workPackageMap: Recordable = { key: 'upuser', }, } + +export const fieldMap = { + field1: '提报人', + field2: '拜访客户类型', + field3: '拜访客户名称', + field4: '任务来源', + field5: '厂商1', + field6: '拜访客户级别', + field7: '科室名称', + field8: '拜访小结', + field9: '产品名称', + field10: '定位信息', + field11: 2002, + field12: '定位距离', + field13: '病历号', + field14: '是否重复', + field15: '任务类型', + field16: '任务状态', +} diff --git a/src/layout/components/Header/UserSettings.vue b/src/layout/components/Header/UserSettings.vue index c7acae3..02e362e 100644 --- a/src/layout/components/Header/UserSettings.vue +++ b/src/layout/components/Header/UserSettings.vue @@ -1,30 +1,22 @@