diff --git a/components.d.ts b/components.d.ts index 0640c56..ef2a1b7 100644 --- a/components.d.ts +++ b/components.d.ts @@ -20,6 +20,7 @@ declare module 'vue' { NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDivider: typeof import('naive-ui')['NDivider'] NDropdown: typeof import('naive-ui')['NDropdown'] + NEmpty: typeof import('naive-ui')['NEmpty'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] NGi: typeof import('naive-ui')['NGi'] diff --git a/package.json b/package.json index 2be2e59..8960260 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@vueup/vue-quill": "^1.2.0", - "@vueuse/core": "^10.7.0", + "@vueuse/core": "10.9.0", "axios": "^1.4.0", "date-fns": "^2.30.0", "esno": "^0.16.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 29f8e15..d92ef5c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ dependencies: specifier: ^1.2.0 version: 1.2.0(vue@3.3.10) '@vueuse/core': - specifier: ^10.7.0 - version: 10.7.0(vue@3.3.10) + specifier: 10.9.0 + version: 10.9.0(vue@3.3.10) axios: specifier: ^1.4.0 version: 1.6.2 @@ -1640,26 +1640,26 @@ packages: vue: 3.3.10(typescript@4.9.5) dev: false - /@vueuse/core@10.7.0(vue@3.3.10): - resolution: {integrity: sha512-4EUDESCHtwu44ZWK3Gc/hZUVhVo/ysvdtwocB5vcauSV4B7NiGY5972WnsojB3vRNdxvAt7kzJWE2h9h7C9d5w==} + /@vueuse/core@10.9.0(vue@3.3.10): + resolution: {integrity: sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==} dependencies: '@types/web-bluetooth': 0.0.20 - '@vueuse/metadata': 10.7.0 - '@vueuse/shared': 10.7.0(vue@3.3.10) - vue-demi: 0.14.6(vue@3.3.10) + '@vueuse/metadata': 10.9.0 + '@vueuse/shared': 10.9.0(vue@3.3.10) + vue-demi: 0.14.7(vue@3.3.10) transitivePeerDependencies: - '@vue/composition-api' - vue dev: false - /@vueuse/metadata@10.7.0: - resolution: {integrity: sha512-GlaH7tKP2iBCZ3bHNZ6b0cl9g0CJK8lttkBNUX156gWvNYhTKEtbweWLm9rxCPIiwzYcr/5xML6T8ZUEt+DkvA==} + /@vueuse/metadata@10.9.0: + resolution: {integrity: sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==} dev: false - /@vueuse/shared@10.7.0(vue@3.3.10): - resolution: {integrity: sha512-kc00uV6CiaTdc3i1CDC4a3lBxzaBE9AgYNtFN87B5OOscqeWElj/uza8qVDmk7/U8JbqoONLbtqiLJ5LGRuqlw==} + /@vueuse/shared@10.9.0(vue@3.3.10): + resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==} dependencies: - vue-demi: 0.14.6(vue@3.3.10) + vue-demi: 0.14.7(vue@3.3.10) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -7116,6 +7116,21 @@ packages: vue: 3.3.10(typescript@4.9.5) dev: false + /vue-demi@0.14.7(vue@3.3.10): + resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + peerDependencies: + '@vue/composition-api': ^1.0.0-rc.1 + vue: ^3.0.0-0 || ^2.6.0 + peerDependenciesMeta: + '@vue/composition-api': + optional: true + dependencies: + vue: 3.3.10(typescript@4.9.5) + dev: false + /vue-draggable-plus@0.3.5(@types/sortablejs@1.15.7): resolution: {integrity: sha512-HqIxV4Wr4U5LRPLRi2oV+EJ4g6ibyRKhuaiH4ZQo+LxK4zrk2XcBk9UyXC88OXp4SAq0XYH4Wco/T3LX5kJ79A==} peerDependencies: diff --git a/src/api/final/index.ts b/src/api/final/index.ts index 3b11d58..3469e37 100644 --- a/src/api/final/index.ts +++ b/src/api/final/index.ts @@ -1,15 +1,33 @@ import type { FinalParam, ResetParam } from '/#/api' import { http } from '@/utils/http/axios' +import { notEmpty } from '@/utils' +import { pickBy } from 'lodash-es' +import { formatToDate2 } from '@/utils/dateUtil' /** * 获取审核列表 * @returns */ export async function getFinalList(params: FinalParam) { + const notEmptyParams = pickBy(params, notEmpty) + + Object.keys(notEmptyParams).forEach((key) => { + const val = notEmptyParams[key] + + if (key === 'izuptime') { + 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: `/flow/task/listfinal`, method: 'get', - params, + params: notEmptyParams, }) const { data: { list, totalPage } } = res diff --git a/src/api/home/filter.ts b/src/api/home/filter.ts index 353a0b1..700f482 100644 --- a/src/api/home/filter.ts +++ b/src/api/home/filter.ts @@ -126,3 +126,52 @@ export async function sort(searchid: string, reorder: number): Promise { params: { searchid, reorder }, }) } + +/** + * + * 获取用户选择的筛选选项 + * @param reviewType 类型 + * @param userId 用户 + * @returns + */ + export async function getfieldList(reviewType: number, userId: number): Promise { + return http.request({ + url: `/ocr/user/field/queryFields`, + method: 'get', + params: { reviewType, userId }, + }) +} +/** + * + * 获取所有筛选选项列表 + * @param reviewType 类型 + * @returns + */ + export async function getAllfieldList(reviewType: number): Promise { + return http.request({ + url: `/ocr/field/list`, + method: 'get', + params: { reviewType}, + }) +} + +/** + * + * 新增或修改用户筛选信息 + * @param reviewType 类型 + * @param userId 用户 + * @param userField 用户动态字段列表(用逗号分隔的字符串) + * + * @returns + */ + export async function savefield(reviewType: number,userId:string,userFieldFixed:string,userFieldUnFixed:string=''): Promise { + return http.request({ + url: `/ocr/user/field/saveOrUpdate`, + method: 'POST', + params: { reviewType,userId,userFieldFixed,userFieldUnFixed}, + }) +} + + + + diff --git a/src/api/home/main.ts b/src/api/home/main.ts index 5ef20a6..60e6f24 100644 --- a/src/api/home/main.ts +++ b/src/api/home/main.ts @@ -117,9 +117,10 @@ export async function getPictureList(params: any): Promise { headers: { 'Content-Type': ContentTypeEnum.FORM_DATA }, }) - const { data: { records, pages } } = res + const { data: { records, pages, total } } = res return { pageCount: pages, data: records, + total, } } diff --git a/src/api/task/task.ts b/src/api/task/task.ts index 1be74e1..09a328d 100644 --- a/src/api/task/task.ts +++ b/src/api/task/task.ts @@ -7,16 +7,16 @@ import { ContentTypeEnum } from '@/enums/httpEnum' * 获取审核列表 * @returns */ -export async function getApprovalList(page: PageParam, assigneeId: string) { +export async function getApprovalList(page: PageParam) { const res = await http.request({ url: `/flow/task/listalldata`, method: 'get', - params: { pageSize: page.pageSize, currPage: page.pageNo, assigneeId }, + params: { pageSize: page.pageSize, currPage: page.pageNo }, }) - const { data: { list, totalPage } } = res + const { data: { list, totalCount } } = res return { - pageCount: totalPage, + pageCount: Math.ceil(totalCount / page.pageSize!), data: list, } } diff --git a/src/api/work/work.ts b/src/api/work/work.ts index 206e926..819c9db 100644 --- a/src/api/work/work.ts +++ b/src/api/work/work.ts @@ -28,8 +28,10 @@ export async function getPackageList(params: PageParam, packagename: string) { * @returns */ export async function getPackageTaskList(packageid: string, params: PageParam) { + const pid = packageid || 0 + const res = await http.request({ - url: `/backstage/jifen/ocrtaskchildpicture/listbypackageid/${packageid}`, + url: `/backstage/jifen/ocrtaskchildpicture/listbypackageid/${pid}`, method: 'get', params, }) @@ -48,8 +50,10 @@ export async function getPackageTaskList(packageid: string, params: PageParam) { * @returns */ export async function getTaskDetailInfo(taskId: string, packageid: string) { + const pid = packageid || 0 + const res = await http.request({ - url: `/backstage/jifen/ocrtaskchildpicture/getdata/${taskId}/${packageid}`, + url: `/backstage/jifen/ocrtaskchildpicture/getdata/${taskId}/${pid}`, method: 'get', }) @@ -64,8 +68,10 @@ export async function getTaskDetailInfo(taskId: string, packageid: string) { * @returns */ export async function getTaskDetailPictureList(packageid: string, taskchildpictureid: string, params: PageParam & PictureSortParam) { + const pid = packageid || 0 + const res = await http.request({ - url: `/backstage/jifen/ocrtaskchildpicture/listbypictureid/${packageid}/${taskchildpictureid}`, + url: `/backstage/jifen/ocrtaskchildpicture/listbypictureid/${pid}/${taskchildpictureid}`, method: 'get', params, }) @@ -81,6 +87,7 @@ export async function getTaskDetailPictureList(packageid: string, taskchildpictu assignee: item.assignee, pictureid: item.pictureid, imgurl: item.ocrPicture.imgurl, + thumburl: item.ocrPicture.serverThumbnailUrl || item.ocrPicture.imgurl, iztrueorfalse: item.iztrueorfalse, states: item.states, history: hasHistory(item.ocpictureid, item.picturecompare), diff --git a/src/assets/icons/p1.svg b/src/assets/icons/p1.svg new file mode 100644 index 0000000..f3d9207 --- /dev/null +++ b/src/assets/icons/p1.svg @@ -0,0 +1,34 @@ + + + 不通过 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/icons/p2.svg b/src/assets/icons/p2.svg new file mode 100644 index 0000000..64aa666 --- /dev/null +++ b/src/assets/icons/p2.svg @@ -0,0 +1,38 @@ + + + 通过 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/config/aside.ts b/src/config/aside.ts index 1a1b6fd..3d3aec4 100644 --- a/src/config/aside.ts +++ b/src/config/aside.ts @@ -5,7 +5,7 @@ export interface AsideEntity { label: string defaultValue?: any isDefaultFilter?: boolean// 是否为默认显示选项(不能隐藏) - inFilterList?: boolean// 是否出现在过滤配置选项中 + inFilterList?: boolean// 是否出现在过滤配置选项中(这个名字不好,为false代表只用于客户端的显示配置,不作为参数传递给服务器端) render?: boolean// 是否作为单独组件渲染 key: string component: Component diff --git a/src/config/workorder.ts b/src/config/workorder.ts index 9b62b62..1583c0f 100644 --- a/src/config/workorder.ts +++ b/src/config/workorder.ts @@ -157,16 +157,17 @@ export const fieldMap = { field2: '拜访客户类型', field3: '拜访客户名称', field4: '任务来源', - field5: '厂商1', + field5: '厂商', field6: '拜访客户级别', field7: '科室名称', field8: '拜访小结', field9: '产品名称', field10: '定位信息', - field11: 2002, + field11: '拜访日期', field12: '定位距离', field13: '病历号', field14: '是否重复', field15: '任务类型', field16: '任务状态', + field17: '项目类别', } diff --git a/src/store/modules/dictonary.ts b/src/store/modules/dictonary.ts index ac5b6af..e61e5d8 100644 --- a/src/store/modules/dictonary.ts +++ b/src/store/modules/dictonary.ts @@ -18,7 +18,7 @@ export interface DictionaryState { izCustomtypeList: any izcustomnameList: any izcustomlevelList: any - izizprojecttypeList: any + izprojecttypeList: any izvisitcityList: any rejectList: any backList: any @@ -44,7 +44,7 @@ export const useDictionaryStore = defineStore({ izcustomnameList: null, izCustomtypeList: null, izcustomlevelList: null, - izizprojecttypeList: null, + izprojecttypeList: null, izvisitcityList: null, rejectList: null, backList: null, @@ -94,8 +94,11 @@ export const useDictionaryStore = defineStore({ getizcustomlevel: (state) => { return state.izcustomlevelList }, - getizizprojecttype: (state) => { - return state.izizprojecttypeList + getizprojecttype: (state) => { + return state.izprojecttypeList + }, + getizstatus: (state) => { + return state.izstatusList }, }, actions: { @@ -195,8 +198,8 @@ export const useDictionaryStore = defineStore({ // 项目类别 async fetchizizprojecttypeList() { const list = await getBusinessList('izprojecttype') - this.izizprojecttypeList = list - return this.izizprojecttypeList + this.izprojecttypeList = list + return this.izprojecttypeList }, // 发布地区 async fetchizvisitcityList() { diff --git a/src/store/modules/task.ts b/src/store/modules/task.ts index 869f655..c9b1adb 100644 --- a/src/store/modules/task.ts +++ b/src/store/modules/task.ts @@ -10,7 +10,6 @@ export const useTaskStore = defineStore({ activeId: '', approvalList: [], packageid: '', - refresh: false, immersion: false, }), getters: { @@ -26,7 +25,7 @@ export const useTaskStore = defineStore({ setActive(index: number, taskId?: string) { this.currentIndex = index const task = this.approvalList[index] - this.activeId = taskId || task?.formid + this.activeId = taskId || task?.id this.packageid = task.packageid }, forward() { @@ -43,14 +42,12 @@ export const useTaskStore = defineStore({ this.setActive(--this.currentIndex) }, - async fetchApprovalList(pagination, id, refresh?: boolean) { - const res = await getApprovalList(pagination, id) - + async fetchApprovalList(pagination) { + const res = await getApprovalList(pagination) if (res.data.length > 0) { - this.setApprovalList(res.data) - this.setActive(0) - // 审批操作完成后,需要刷新,为防止activeId在刷新后值不变,通过此值刷新 - this.refresh = !this.refresh + this.approvalList.push(...res.data) + if (!this.activeId) + this.setActive(0) } return res diff --git a/src/store/modules/workOrder.ts b/src/store/modules/workOrder.ts index d41c1a1..07b58ef 100644 --- a/src/store/modules/workOrder.ts +++ b/src/store/modules/workOrder.ts @@ -45,10 +45,11 @@ export const useWorkOrderStore = defineStore({ }, async fetchOrderList(pagination, keyword) { const res = await getPackageList(pagination, keyword) - + if (res.data.length > 0) { - this.setOrderList(res.data) - this.setActive(0) + this.packageList.push(...res.data) + if (!this.activeId) + this.setActive(0) } return res diff --git a/src/utils/dateUtil.ts b/src/utils/dateUtil.ts index ad6a168..09b2c70 100644 --- a/src/utils/dateUtil.ts +++ b/src/utils/dateUtil.ts @@ -1,4 +1,4 @@ -import { format } from 'date-fns' +import { format, parse } from 'date-fns' const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm' const DATE_FORMAT = 'YYYY-MM-DD ' @@ -20,3 +20,9 @@ export function formatToDate2(date: Date | number, formatStr = DATA_FORMAT_2): s export function formatToDateHMS(date: Date | number, formatStr = DATE_FORMAT_HMS) { return format(date, formatStr) } + +// 将yyyy/mm/dd转换为时间戳 +export function formatToDate3(dateString: string) { + const dateObject = parse(dateString, 'yyyy/MM/dd', new Date()) + return dateObject.getTime() +} diff --git a/src/utils/index.ts b/src/utils/index.ts index a46e12f..26eb5d0 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -275,3 +275,12 @@ export function arrayEquals(a, b) { export function notEmpty(value: any) { return !(value === undefined || value === '' || value === null || (Array.isArray(value) && value.length === 0)) } + +/** + * 值是否为空 + * @param value + * @returns + */ +export function isEmpty(value: any) { + return (value === undefined || value === '' || value === null) +} diff --git a/src/views/final/aside/Aside.vue b/src/views/final/aside/Aside.vue index 70ae259..3d3778c 100644 --- a/src/views/final/aside/Aside.vue +++ b/src/views/final/aside/Aside.vue @@ -1,6 +1,6 @@ + + + + diff --git a/src/views/final/comp/NewFilterModal.vue b/src/views/final/comp/NewFilterModal.vue new file mode 100644 index 0000000..68ecf26 --- /dev/null +++ b/src/views/final/comp/NewFilterModal.vue @@ -0,0 +1,380 @@ + + + + + diff --git a/src/views/final/comp/index.ts b/src/views/final/comp/index.ts index 26f47eb..eb57edf 100644 --- a/src/views/final/comp/index.ts +++ b/src/views/final/comp/index.ts @@ -5,5 +5,7 @@ import RepeatTaskTableModal from './RepeatTaskTableModal.vue' import Action from './Action.vue' import RejectModal from './RejectModal.vue' import CustomFilterModalVue from './CustomFilterModalVue.vue' +import FilterModal from './FilterModal.vue' +import NewFilterModal from './NewFilterModal.vue' -export { CustomTabelModal, ImportExcelModal, RepeatModal, RepeatTaskTableModal, Action, RejectModal, CustomFilterModalVue } +export { CustomTabelModal, ImportExcelModal, RepeatModal, RepeatTaskTableModal, Action, RejectModal, CustomFilterModalVue, FilterModal, NewFilterModal } diff --git a/src/views/final/content/Content.vue b/src/views/final/content/Content.vue index 4cf33b9..77efc19 100644 --- a/src/views/final/content/Content.vue +++ b/src/views/final/content/Content.vue @@ -1,19 +1,21 @@