diff --git a/components.d.ts b/components.d.ts index 4f59ece..0640c56 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,6 +9,41 @@ declare module 'vue' { export interface GlobalComponents { Application: typeof import('./src/components/Application/Application.vue')['default'] BasicModal: typeof import('./src/components/Modal/BasicModal.vue')['default'] + NAvatar: typeof import('naive-ui')['NAvatar'] + NButton: typeof import('naive-ui')['NButton'] + NCard: typeof import('naive-ui')['NCard'] + NCheckbox: typeof import('naive-ui')['NCheckbox'] + NCollapse: typeof import('naive-ui')['NCollapse'] + NCollapseItem: typeof import('naive-ui')['NCollapseItem'] + NConfigProvider: typeof import('naive-ui')['NConfigProvider'] + NDatePicker: typeof import('naive-ui')['NDatePicker'] + NDialogProvider: typeof import('naive-ui')['NDialogProvider'] + NDivider: typeof import('naive-ui')['NDivider'] + NDropdown: typeof import('naive-ui')['NDropdown'] + NForm: typeof import('naive-ui')['NForm'] + NFormItem: typeof import('naive-ui')['NFormItem'] + NGi: typeof import('naive-ui')['NGi'] + NGrid: typeof import('naive-ui')['NGrid'] + NGridItem: typeof import('naive-ui')['NGridItem'] + NImage: typeof import('naive-ui')['NImage'] + NInput: typeof import('naive-ui')['NInput'] + NMessageProvider: typeof import('naive-ui')['NMessageProvider'] + NModal: typeof import('naive-ui')['NModal'] + NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] + NPopover: typeof import('naive-ui')['NPopover'] + NPopselect: typeof import('naive-ui')['NPopselect'] + NScrollbar: typeof import('naive-ui')['NScrollbar'] + NSelect: typeof import('naive-ui')['NSelect'] + NSlider: typeof import('naive-ui')['NSlider'] + NSpace: typeof import('naive-ui')['NSpace'] + NSpin: typeof import('naive-ui')['NSpin'] + NSwitch: typeof import('naive-ui')['NSwitch'] + NTabPane: typeof import('naive-ui')['NTabPane'] + NTabs: typeof import('naive-ui')['NTabs'] + NTag: typeof import('naive-ui')['NTag'] + NTooltip: typeof import('naive-ui')['NTooltip'] + NUpload: typeof import('naive-ui')['NUpload'] + NUploadDragger: typeof import('naive-ui')['NUploadDragger'] Quill: typeof import('./src/components/RichEditor/Quill.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/src/api/work/work.ts b/src/api/work/work.ts index 5f97baf..206e926 100644 --- a/src/api/work/work.ts +++ b/src/api/work/work.ts @@ -1,16 +1,17 @@ import { http } from '@/utils/http/axios' import type { PageParam, PictureSortParam, SetTFParam } from '/#/api' + import { ContentTypeEnum } from '@/enums/httpEnum' /** * 获取任务包列表 * @returns */ -export async function getPackageList(params: PageParam) { +export async function getPackageList(params: PageParam, packagename: string) { const res = await http.request({ url: `/ocr/ocrPackagetask/list`, method: 'get', - params, + params: { ...params, packagename }, }) const { data: { records, pages } } = res diff --git a/src/store/modules/workOrder.ts b/src/store/modules/workOrder.ts index 6008791..d41c1a1 100644 --- a/src/store/modules/workOrder.ts +++ b/src/store/modules/workOrder.ts @@ -43,9 +43,9 @@ export const useWorkOrderStore = defineStore({ this.setActive(--this.currentIndex) }, - async fetchOrderList(pagination) { - const res = await getPackageList(pagination) - + async fetchOrderList(pagination, keyword) { + const res = await getPackageList(pagination, keyword) + if (res.data.length > 0) { this.setOrderList(res.data) this.setActive(0) diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index a09c218..f100264 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -1,4 +1,13 @@ @@ -93,7 +92,7 @@ const showFilterModal = ()=>{
- +
diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index 38312a7..bc550e5 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -22,33 +22,33 @@ const dialog = useDialog() const confrimModalRef = ref(null) const batchModalRef = ref(null) const totalCount = ref(0) -const CustomSettingModalRef = ref(null); - +const CustomSettingModalRef = ref(null) const sortBy: PictureSortParam = { - orderbyname: "asc", - orderbyvalue: "fromuptime", -}; + orderbyname: 'asc', + orderbyvalue: 'fromuptime', +} function setBatch(value: boolean) { - batch.value = value; + batch.value = value if (value === false) { - selectItems.value.forEach((item) => (item.checked = false)); - selectItems.value.length = 0; + selectItems.value.forEach(item => (item.checked = false)) + selectItems.value.length = 0 } } function onCheckChange(checked: any, item: any) { - const index = selectItems.value.indexOf(item); - item.checked = checked; + const index = selectItems.value.indexOf(item) + item.checked = checked - if (index === -1 && checked) selectItems.value.push(item); - else selectItems.value.splice(index, 1); + if (index === -1 && checked) + selectItems.value.push(item) + else selectItems.value.splice(index, 1) } const showActions = computed(() => { - return selectItems.value.length > 0 && batch; -}); + return selectItems.value.length > 0 && batch +}) const taskpagination = reactive({ pageNo: 1, @@ -180,16 +180,16 @@ function reject(idOrDesc: string, backId: string, isOther: boolean) { } function showModal(modalRef: any) { - const modal = unref(modalRef)! as any; - modal.showModal(); + const modal = unref(modalRef)! as any + modal.showModal() } function forwardHandler() { - taskStore.forward(); + taskStore.forward() } function backHandler() { - taskStore.back(); + taskStore.back() } watch(() => [taskStore.activeId, taskStore.refresh], async (newValue, oldValue) => { @@ -207,9 +207,9 @@ watch(() => [taskStore.activeId, taskStore.refresh], async (newValue, oldValue) }) const currentTaskId = computed(() => { - const index = taskStore.getCurrentIndex; - return taskStore.getApprovalList[index]?.formid || ""; -}); + const index = taskStore.getCurrentIndex + return taskStore.getApprovalList[index]?.formid || '' +}) function overTaskHandle() { const item = taskDetailInfo.value @@ -219,12 +219,12 @@ function overTaskHandle() { } function leaveTaskHandler() { - overTask.value = null; + overTask.value = null } -function showActionsModal(){ - const modal = unref(CustomSettingModalRef)! as any; - modal.showModal(); +function showActionsModal() { + const modal = unref(CustomSettingModalRef)! as any + modal.showModal() } onUnmounted(() => { @@ -359,7 +359,9 @@ function previewHandler(event: MouseEvent) { @update:checked="onCheckChange($event, item)" /> -
96%
+
+ 96% +
@@ -368,7 +370,9 @@ function previewHandler(event: MouseEvent) {
-
填报信息
+
+ 填报信息 +
@@ -444,13 +448,8 @@ function previewHandler(event: MouseEvent) { display: flex; align-items: center; justify-content: center; -<<<<<<< HEAD color: #FFF; - margin-right: 10px; -======= - color: #fff; margin-right: 6px; ->>>>>>> al cursor: pointer; } diff --git a/src/views/worksheet/aside/WorkSheetList.vue b/src/views/worksheet/aside/WorkSheetList.vue index d75942d..18efe52 100644 --- a/src/views/worksheet/aside/WorkSheetList.vue +++ b/src/views/worksheet/aside/WorkSheetList.vue @@ -2,7 +2,7 @@ import type { PackageListItem } from '/#/workorder' import ListItem from './ListItem.vue' import { useWorkOrder } from '@/store/modules/workOrder' -import { onUnmounted, reactive, ref, watch } from 'vue' +import { reactive, ref, watch } from 'vue' import { useInfiniteScroll } from '@vueuse/core' const workStore = useWorkOrder() @@ -27,7 +27,7 @@ const { isLoading } = useInfiniteScroll( loadMore() }, { distance: 10, interval: 300, canLoadMore: () => { - console.log('canloadmore excuted!') + // console.log('canloadmore excuted!') return canloadMore.value } }, ) @@ -44,12 +44,13 @@ async function loadMore() { async function fetchList() { try { pagination.pageNo += 1 - const result = await workStore.fetchOrderList(pagination) + const result = await workStore.fetchOrderList(pagination, keyword.value) const { data, pageCount } = result - canloadMore.value = pageCount >= pagination.pageNo - return data + canloadMore.value = pageCount >= pagination.pageNo && pageCount !== 0 + return data || [] } catch (error) { + canloadMore.value = false return [] } } diff --git a/src/views/worksheet/content/Content.vue b/src/views/worksheet/content/Content.vue index 5c87466..974582b 100644 --- a/src/views/worksheet/content/Content.vue +++ b/src/views/worksheet/content/Content.vue @@ -286,6 +286,8 @@ function previewHandler(event: MouseEvent) { if (imageRef.value) (imageRef.value as any).mergedOnClick() } + +const count = computed(() => taskDetailPictureList.value.length)