From 2c3d200d754574f03d84f9b8a062bb36b4d44afb Mon Sep 17 00:00:00 2001 From: raofuzi <2641346316@qq.com> Date: Tue, 16 Apr 2024 22:41:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=9B=B8=E5=85=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 7 +- components.d.ts | 2 +- src/assets/images/bg-loading.png | Bin 0 -> 11190 bytes src/layout/components/Header/RecycleModal.vue | 3 + src/views/home/content/Content.vue | 769 ++++++++--------- src/views/task/content/Content.vue | 780 +++++++++--------- src/views/task/modal/BatchModal.vue | 73 +- .../worksheet/components/pictureCard.vue | 28 +- src/views/worksheet/content/Content.vue | 28 +- 9 files changed, 877 insertions(+), 813 deletions(-) create mode 100644 src/assets/images/bg-loading.png diff --git a/.vscode/settings.json b/.vscode/settings.json index 947c6ee..29677da 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -39,5 +39,10 @@ "jsonc", "yaml" ], - "vue3snippets.enable-compile-vue-file-on-did-save-code": true + "vue3snippets.enable-compile-vue-file-on-did-save-code": true, + "editor.defaultFormatter": "rvest.vs-code-prettier-eslint", + "[vue]": { + "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" + }, + "editor.formatOnSaveMode": "modifications" } diff --git a/components.d.ts b/components.d.ts index bf396cc..298dbe9 100644 --- a/components.d.ts +++ b/components.d.ts @@ -23,7 +23,6 @@ declare module 'vue' { 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'] @@ -34,6 +33,7 @@ declare module 'vue' { NotPassed: typeof import('./src/components/NotPassed.vue')['default'] NPopover: typeof import('naive-ui')['NPopover'] NPopselect: typeof import('naive-ui')['NPopselect'] + NProgress: typeof import('naive-ui')['NProgress'] NScrollbar: typeof import('naive-ui')['NScrollbar'] NSelect: typeof import('naive-ui')['NSelect'] NSlider: typeof import('naive-ui')['NSlider'] diff --git a/src/assets/images/bg-loading.png b/src/assets/images/bg-loading.png new file mode 100644 index 0000000000000000000000000000000000000000..839713fdc6d887384216770ffef4afc22424ca27 GIT binary patch literal 11190 zcmaia3pkVS|GyDMIw^%Pl|zWBln_&q%7;0&KE$X*4o%A8W0<4^VI`%U7Aixmut{M$ z844+9F^uFeOl>whJimK=uJ8Z+(jrTO`EL-Eu8{-Il`sh79!*<)x}7NmY&82M&s%S}ICkBK5?>y6R9?@fdZ z6GdWnXP3eGM#YD)y$g4);@7-iSn^X5?^k?}1w%g`NXKt4Y|4Iju}08tqKMSIG5YIV zV0vuL;2P$EwG;D;mO>m~uv?hQU`L5@Li99a<$IG@ygHreU3xRXZ~|O53ocW=F=|L( z;~jST&tKh0P{W8&WTME}N@tUcuL};n9cD#h;5SAm!NoBw53=4W)cSm_gNF`&l^=tH zb2xQ6L%nzO_}h4|=Xi6)_xCP;jG2*j=a4D!^YY|DY%`L1bSpjQ*GrYCcBKT;qsZm$KTY4AFt5EOk7yrWays+aPYq-(z)*A1w zz$JrNF-zIz$-a9KchoiD*nLF>l7X36U#8P=4;|z6)&klm*Tt@n6oEkMed?P<--e93 z=#V6rd$i-d)w5Y?dzco!h~*(@B6^J!v2RnOgfogHFU{#BjWkSk+zby|nxfM(6Ga`h zh;UbVf|3o(qt;VP->+GdUo7|Ve00V=S}F2e2ajSE*=m-8Xwmmc$Im5w(}JLV4e_Fw zsAztM=N>{cifHujB=%=68K29$kg*r%qi{Oy;;Xh38a z9IvqWi(43e;y{GdJ!BJkw@vKPiFADZ$N^{uZDWA+G&hH0eoE>4EG_oZ`^V6q$G^{R%6Y5#CoPjLyRuwA7AbTf@^ z=?!_i^+$rPUO4PLvD&-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@}sD%rH>Ebqp0Uuf0^VbwFc;ky-7)vu0-+>?X%t!ci)(;9&r(<&s`?|I% zYegK@lLCJAR>$U9L&XSbo%mGReA1|}_hdD2!uXU)XlQ7N4DNCB&CuM+%PD&|?58)q zbn5b{j>F=sHa78Q3~fQeCbmU^Q&yvG?Y$v5!W!s6I?@2whxyKm#GkHwr~B^Mu!UdX z$Fhoqt|ZXTl32Pp#p{J%2^R;0f`S0OdGiLrLjH)x+j*DKc(9$q&{>?lM5_b&88H>bXaTMrToG=N@ z3c0)fQ2hiT1ES&RF0q6VPNT3AQpNy1EJTSmE1D{o#5QhJmCj!3$hQ&%P0f2t+98Q? zVj&+6y6}p#ERXH@g=n<=&B0Om2l>?cDQ^#8dy_gd-y<}ppOy|3TYi){O-678z;u%+go4E_C zrbp7;XTV6OH6^rSgGGU20+TleCd!da)b_ULjWTx>pIImZaYVE~IiS||i{gD92- zk=bDt5w76^5wp@EW-@qI(5p9Z1l&t6<6pe9e$q6^x=Wmmd_z9%=4x30M;)$tC0+OI zw3+y(;`de_0@s5gT8oDLwvMYzT~p@1TmY+Q2^v#*-|y0bQ5OYR2}SNxl9~89j9 pagination.pageNo, (newVal, oldVal) => { ref="imageRef" :src="item.imgUrl" :preview-src="item.imgUrl" + :fallback-src="bgLoadingImg" class="img " :class="{ 'img-fit': viewMode === 'horizontalVersion', diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index 387d47d..7ec3a35 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -1,31 +1,14 @@ @@ -915,6 +930,14 @@ defineExpose({ position: relative; transition: 0.5s; + .tag-status { + width: 46px; + height: 22px; + position: absolute; + left: -1px; + top: 10px; + } + .glass { position: absolute; display: none !important; diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index 3644816..503fcb1 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -8,207 +8,216 @@ import { ref, unref, watch, -} from "vue"; -import { chunk, clone } from "lodash-es"; -import { useDialog, useMessage } from "naive-ui"; -import { useRoute, useRouter } from "vue-router"; -import { useInfiniteScroll } from "@vueuse/core"; -import BatchModal from "../modal/BatchModal.vue"; -import CustomSettingModal from "../modal/CustomSettingModal.vue"; -import PictureTable from "./PictureTable.vue"; -import TaskTable from "./TaskTable.vue"; -import History from "./History.vue"; -import NotPassed from "@/components/Approval/NotPassed.vue"; -import { getAllfieldList, getfieldList } from "@/api/home/filter"; -import { TASK_STATUS_OBJ } from "@/enums/index"; -import { useFinal } from "@/store/modules/final"; +} from 'vue' +import { chunk, clone } from 'lodash-es' +import { useDialog, useMessage } from 'naive-ui' +import { useRoute, useRouter } from 'vue-router' +import { useInfiniteScroll } from '@vueuse/core' +import BatchModal from '../modal/BatchModal.vue' +import CustomSettingModal from '../modal/CustomSettingModal.vue' +import PictureTable from './PictureTable.vue' +import TaskTable from './TaskTable.vue' +import History from './History.vue' +import NotPassed from '@/components/Approval/NotPassed.vue' +import { getAllfieldList, getfieldList } from '@/api/home/filter' +import { TASK_STATUS_OBJ } from '@/enums/index' +import { useFinal } from '@/store/modules/final' import { audit, dubiousfileyd, getSimilarityList, getTaskDetailInfo, -} from "@/api/task/task"; -import { useTask } from "@/store/modules/task"; -import { useUser } from "@/store/modules/user"; -import { isEmpty } from "@/utils"; -import { formatToDateHMS } from "@/utils/dateUtil"; -import { hideDownload } from "@/utils/image"; - -const emit = defineEmits(["setAsideItemName"]); - -const router = useRouter(); -const loading = ref(false); -const batch = ref(false); -const batchtwo = ref(false); -const selectItems = ref([]); -const message = useMessage(); -const dialog = useDialog(); -const notPassModalRef = ref(null); -const batchModalRef: any = ref(null); -const totalCount = ref(0); -const taskId: any = ref(""); // 任务id -const packageId: any = ref(""); // 包id -const CustomSettingModalRef = ref(null); -const taskTableData = ref([]); -const route = useRoute(); -const isDetail = ref(false); // 是否是详情 -const finalStore = useFinal(); -const imgbigshow = ref(true); +} from '@/api/task/task' +import { useTask } from '@/store/modules/task' +import { useUser } from '@/store/modules/user' +import { isEmpty } from '@/utils' +import { formatToDateHMS } from '@/utils/dateUtil' +import { hideDownload } from '@/utils/image' +import bgLoading from '@/assets/images/bg-loading.png' + +const emit = defineEmits(['setAsideItemName']) + +const router = useRouter() +const loading = ref(false) +const batch = ref(false) +const batchtwo = ref(false) +const selectItems = ref([]) +const message = useMessage() +const dialog = useDialog() +const notPassModalRef = ref(null) +const batchModalRef: any = ref(null) +const totalCount = ref(0) +const taskId: any = ref('') // 任务id +const packageId: any = ref('') // 包id +const CustomSettingModalRef = ref(null) +const taskTableData = ref([]) +const route = useRoute() +const isDetail = ref(false) // 是否是详情 +const finalStore = useFinal() +const imgbigshow = ref(true) const sortBy: any = { - orderType: "desc", - orderName: "similarityScore", -}; -const el = ref(null); + orderType: 'desc', + orderName: 'similarityScore', +} +const el = ref(null) +const bgLoadingImg = ref(bgLoading) + const pagination = reactive({ pageNo: 0, pageSize: 30, -}); +}) 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, pageSize: 30, -}); -const taskStore = useTask(); -const overTask = ref(null); -const overTasktwo = ref(null); -const taskDetailInfo = ref({}); -const taskDetailPictureList = ref([]); -const userStore = useUser(); -const imageRef = ref(); -let processItems: any[] = []; -const isFullScreen = ref(false); +}) +const taskStore = useTask() +const overTask = ref(null) +const overTasktwo = ref(null) +const taskDetailInfo = ref({}) +const taskDetailPictureList = ref([]) +const userStore = useUser() +const imageRef = ref() +let processItems: any[] = [] +const isFullScreen = ref(false) const fullscreenStyles = computed(() => ({ - width: isFullScreen.value ? "100vw" : "", - height: isFullScreen.value ? "100vh" : "", - position: isFullScreen.value ? "fixed" : "", - top: isFullScreen.value ? "0" : "", - left: isFullScreen.value ? "0" : "", - zIndex: isFullScreen.value ? "100" : "", -})); + width: isFullScreen.value ? '100vw' : '', + height: isFullScreen.value ? '100vh' : '', + position: isFullScreen.value ? 'fixed' : '', + top: isFullScreen.value ? '0' : '', + left: isFullScreen.value ? '0' : '', + zIndex: isFullScreen.value ? '100' : '', +})) const fullscreenStylestwo = computed(() => ({ - width: isFullScreen.value ? "100vw" : "", - height: isFullScreen.value ? "100vh" : "", - position: isFullScreen.value ? "fixed" : "", - top: isFullScreen.value ? "0" : "", - left: isFullScreen.value ? "0" : "", - zIndex: isFullScreen.value ? "160" : "", -})); + width: isFullScreen.value ? '100vw' : '', + height: isFullScreen.value ? '100vh' : '', + position: isFullScreen.value ? 'fixed' : '', + top: isFullScreen.value ? '0' : '', + left: isFullScreen.value ? '0' : '', + zIndex: isFullScreen.value ? '160' : '', +})) onMounted(() => { - window.addEventListener("keydown", handleKeydown); + window.addEventListener('keydown', handleKeydown) if (route.query.id) { - taskId.value = route.query.id; - packageId.value = route.query.packageid; - isDetail.value = true; - getDetail(); + taskId.value = route.query.id + packageId.value = route.query.packageid + isDetail.value = true + getDetail() } -}); +}) -let lastKeyPressTime = 0; -let keyPressTimer = null; +let lastKeyPressTime = 0 +let keyPressTimer = null function changeimgbigshow() { - imgbigshow.value = !imgbigshow.value; + imgbigshow.value = !imgbigshow.value } -const doubleClickInterval = 300; // 可以自定义间隔时间,单位是毫秒 +const doubleClickInterval = 300 // 可以自定义间隔时间,单位是毫秒 // 键盘左右箭头快捷切换 function handleKeydown(event) { - if (event.key === "ArrowLeft") { - backHandler(); + if (event.key === 'ArrowLeft') { + backHandler() } // 在这里执行左箭头的逻辑 - else if (event.key === "ArrowRight") { - forwardHandler(); + else if (event.key === 'ArrowRight') { + forwardHandler() } // 在这里执行右箭头的逻辑 else if (event.keyCode === 67) { - isFullScreen.value = false; + isFullScreen.value = false // batchModalRef.value.closeModal() - } else if (event.keyCode === 27) { - overTask.value = null; - overTasktwo.value = null; - } else if (event.key === "p" || event.key === "P") { + } + else if (event.keyCode === 27) { + overTask.value = null + overTasktwo.value = null + } + else if (event.key === 'p' || event.key === 'P') { // 获取当前时间 - const now = Date.now(); + const now = Date.now() // 如果两次按键时间间隔小于我们设定的双击间隔,则认为是双击 if (now - lastKeyPressTime < doubleClickInterval) { // 清除已经设置的定时器(如果有的话) - clearTimeout(keyPressTimer); - const item = taskDetailInfo.value; + clearTimeout(keyPressTimer) + const item = taskDetailInfo.value if ( - item?.userapprove?.statshis === 2 || - item?.userapprove?.statshis == 3 + item?.userapprove?.statshis === 2 + || item?.userapprove?.statshis == 3 ) { - overTask.value = null; - return; + overTask.value = null + return } if (validate([item]) == null && batch.value === false) - overTask.value = item; + overTask.value = item // 执行想要的操作 - approvalHandler(); + approvalHandler() // 重置上次按键时间 - lastKeyPressTime = 0; - } else { + lastKeyPressTime = 0 + } + else { // 如果不是双击,则更新上次按键时间,并开始一个新的计时器 - lastKeyPressTime = now; + lastKeyPressTime = now // 通过定时器重置上次按键时间 // 这可以防止如果用户只按了一次键,也会触发双击的情况 - clearTimeout(keyPressTimer); + clearTimeout(keyPressTimer) keyPressTimer = setTimeout(() => { - lastKeyPressTime = 0; - }, doubleClickInterval); + lastKeyPressTime = 0 + }, doubleClickInterval) } - } else if (event.key === "x" || event.key === "X") { + } + else if (event.key === 'x' || event.key === 'X') { // 获取当前时间 - const now = Date.now(); + const now = Date.now() // 如果两次按键时间间隔小于我们设定的双击间隔,则认为是双击 if (now - lastKeyPressTime < doubleClickInterval) { // 清除已经设置的定时器(如果有的话) - clearTimeout(keyPressTimer); - const item = taskDetailInfo.value; + clearTimeout(keyPressTimer) + const item = taskDetailInfo.value if ( - item?.userapprove?.statshis === 2 || - item?.userapprove?.statshis == 3 + item?.userapprove?.statshis === 2 + || item?.userapprove?.statshis == 3 ) { - overTask.value = null; - return; + overTask.value = null + return } if (validate([item]) == null && batch.value === false) - overTask.value = item; + overTask.value = item // 执行想要的操作 - const modal = unref(notPassModalRef)! as any; - modal.showModal([taskDetailInfo.value]); + const modal = unref(notPassModalRef)! as any + modal.showModal([taskDetailInfo.value]) // 重置上次按键时间 - lastKeyPressTime = 0; - } else { + lastKeyPressTime = 0 + } + else { // 如果不是双击,则更新上次按键时间,并开始一个新的计时器 - lastKeyPressTime = now; + lastKeyPressTime = now // 通过定时器重置上次按键时间 // 这可以防止如果用户只按了一次键,也会触发双击的情况 - clearTimeout(keyPressTimer); + clearTimeout(keyPressTimer) keyPressTimer = setTimeout(() => { - lastKeyPressTime = 0; - }, doubleClickInterval); + lastKeyPressTime = 0 + }, doubleClickInterval) } } } @@ -217,26 +226,27 @@ function setBatch(value: boolean) { // if (totalCount.value === 0) // return - batch.value = value; + batch.value = value if (value === false) { - taskDetailInfo.value.checked = false; - selectItems.value = []; + taskDetailInfo.value.checked = false + selectItems.value = [] taskDetailPictureList.value.forEach((item) => { - item.checked = false; - }); + item.checked = false + }) } } // 从store里面获取任务id function currentTaskId() { - const index = taskStore.getCurrentIndex; - return taskStore.getApprovalList[index]?.id || ""; + const index = taskStore.getCurrentIndex + return taskStore.getApprovalList[index]?.id || '' } // states:1未提交,2待审批,3通过,4不通过 function validate(items: any[]) { - if (items.length === 0) return "至少选中一个任务"; + if (items.length === 0) + return '至少选中一个任务' // const useInfo = userStore.getUserInfo // const username = useInfo.loginname @@ -253,180 +263,181 @@ function validate(items: any[]) { // return '审批人不一致' // } - return null; + return null } function approvalHandler(items?: any) { - let cloneItem: any; + let cloneItem: any if (batch.value) { - processItems = selectItems.value; - } else if (overTask.value) { - cloneItem = clone(overTask.value); - processItems = [cloneItem]; + processItems = selectItems.value + } + else if (overTask.value) { + cloneItem = clone(overTask.value) + processItems = [cloneItem] } if (items !== undefined && !(items instanceof PointerEvent)) - processItems = items; + processItems = items - const msg = validate(processItems); + const msg = validate(processItems) if (msg !== null) { - message.error(msg); - return; + message.error(msg) + return } - console.log(processItems); + console.log(processItems) - const list: any = []; + const list: any = [] processItems.forEach((item) => { list.push({ formId: item.id, taskId: item.taskId, taskName: item.fromTaskName, - }); - }); + }) + }) const param = { result: true, - comment: "", - disposeType: "", - disposeTypeId: "", - failCauseId: "", - failCauseName: "", + comment: '', + disposeType: '', + disposeTypeId: '', + failCauseId: '', + failCauseName: '', flowTaskInfoList: list, - }; + } dialog.info({ - title: "确认提示", - content: "确认给该任务审批为【通过】吗?", - positiveText: "确定", - negativeText: "取消", + title: '确认提示', + content: '确认给该任务审批为【通过】吗?', + positiveText: '确定', + negativeText: '取消', onPositiveClick: () => { - doAudit(param); - overTask.value = null; + doAudit(param) + overTask.value = null }, onNegativeClick: () => { - overTask.value = null; + overTask.value = null }, - }); + }) } function approvalHandlerx(item?: any) { - console.log(item); - alert(1); + console.log(item) } function singleRejectHandlex(item?: any) { - console.log(item); - const modal = unref(notPassModalRef)! as any; + console.log(item) + const modal = unref(notPassModalRef)! as any - modal.showModal([item]); + modal.showModal([item]) } function rejectHandler(items?: any) { - console.log(items); - const modal = unref(notPassModalRef)! as any; - modal.showModal(items); + console.log(items) + const modal = unref(notPassModalRef)! as any + modal.showModal(items) } function singleRejectHandler() { - const modal = unref(notPassModalRef)! as any; - modal.showModal([taskDetailInfo.value]); + const modal = unref(notPassModalRef)! as any + modal.showModal([taskDetailInfo.value]) } function doAudit(param: any) { audit(param).then((res) => { - const { code } = res; - if (code === "OK") { - message.success(res.message); - setBatch(false); - reloadList(param, "通过"); - batchModalRef.value.reload(); + const { code } = res + if (code === 'OK') { + message.success(res.message) + setBatch(false) + reloadList(param, '通过') + batchModalRef.value.reload() } - }); + }) } function showModal(modalRef: any) { - const modal = unref(modalRef)! as any; - modal.showModal(taskId.value); + const modal = unref(modalRef)! as any + modal.showModal(taskId.value) } function forwardHandler() { - taskStore.forward(); + taskStore.forward() } function backHandler() { - taskStore.back(); + taskStore.back() } async function handleDragEnd(event, item) { - console.log(event, item); + console.log(event, item) // 可以在这里添加拖拽结束后的逻辑 - const flag = taskStore.getInFile; + const flag = taskStore.getInFile if (flag) { - const res = await dubiousfileyd({ pictureid: item.pictureId }); - if (res.code === "OK") { - message.success("加入成功"); - setBatch(false); - getTableData(); - getImgList(); + const res = await dubiousfileyd({ pictureid: item.pictureId }) + if (res.code === 'OK') { + message.success('加入成功') + setBatch(false) + getTableData() + getImgList() } - taskStore.setInFile(false); - taskStore.setInFile(item.pictureId); + taskStore.setInFile(false) + taskStore.setInFile(item.pictureId) } } async function addSuspicious() { - taskStore.setInFileId(taskDetailInfo.value.ocrPicture); - console.log(taskDetailInfo.value.ocrPicture); + taskStore.setInFileId(taskDetailInfo.value.ocrPicture) + console.log(taskDetailInfo.value.ocrPicture) if (taskDetailInfo.value.ocrPicture.pictureid) { const res = await dubiousfileyd({ pictureid: taskDetailInfo.value.ocrPicture.id, - }); - - if (res.code === "OK") { - message.success("加入成功"); - setBatch(false); - getTableData(); - getImgList(); - } else { - message.error(res.message); + }) + + if (res.code === 'OK') { + message.success('加入成功') + setBatch(false) + getTableData() + getImgList() } - taskStore.setInFile(false); + else { + message.error(res.message) + } + taskStore.setInFile(false) } } async function getTableData() { - const useInfo = userStore.getUserInfo; - const listData = []; - const reviewType = 3; // 类型 - let res = await getAllfieldList(reviewType); - const fieldList = (res as any)?.data; - res = await getfieldList(reviewType, useInfo.id); - const userFieldList = (res as any)?.data.userFieldFixed; + const useInfo = userStore.getUserInfo + const listData = [] + const reviewType = 3 // 类型 + let res = await getAllfieldList(reviewType) + const fieldList = (res as any)?.data + res = await getfieldList(reviewType, useInfo.id) + const userFieldList = (res as any)?.data.userFieldFixed const blueList = [ - "拜访终端名称", - "定位信息", - "拜访日期", - "定位距离", - "拜访小结", - "拜访项目类别", - ]; - - fieldList.map((v) => { + '拜访终端名称', + '定位信息', + '拜访日期', + '定位距离', + '拜访小结', + '拜访项目类别', + ] + + fieldList.forEach((v) => { if (userFieldList.includes(v.name)) { - let locationobj = { address: "" }; - if (v.name == "location") - locationobj = JSON.parse(taskDetailInfo.value.ocrPicture[v.name]); + let locationobj = { address: '' } + if (v.name == 'location') + locationobj = JSON.parse(taskDetailInfo.value.ocrPicture[v.name]) const item = { label: v.fieldDesc, value: - v.name == "location" + v.name == 'location' ? locationobj.address : taskDetailInfo.value.ocrPicture[v.name], key: v.name, blue: blueList.includes(v.fieldDesc), - }; - listData.push(item); + } + listData.push(item) } - }); - taskTableData.value = chunk(listData, 2); + }) + taskTableData.value = chunk(listData, 2) } async function getImgList() { @@ -435,218 +446,226 @@ async function getImgList() { ...taskpagination, ...sortBy, pictureId: taskDetailInfo.value.ocrPicture.id, - }); - taskDetailPictureList.value = data; - totalCount.value = total; - } else { - taskDetailPictureList.value.length = 0; - totalCount.value = 0; + }) + taskDetailPictureList.value = data + totalCount.value = total + } + else { + taskDetailPictureList.value.length = 0 + totalCount.value = 0 } } function overTaskHandle() { - const item = taskDetailInfo.value; + const item = taskDetailInfo.value if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) { - overTask.value = null; - return; + overTask.value = null + return } - if (validate([item]) == null && batch.value === false) overTask.value = item; + if (validate([item]) == null && batch.value === false) + overTask.value = item } function leaveTaskHandler() { - overTask.value = null; - overTasktwo.value = null; + overTask.value = null + overTasktwo.value = null } function showActionsModal() { - const modal = unref(CustomSettingModalRef)! as any; - modal.showModal(); + const modal = unref(CustomSettingModalRef)! as any + modal.showModal() } onUnmounted(() => { - taskStore.reset(); - window.removeEventListener("keydown", handleKeydown); -}); + taskStore.reset() + window.removeEventListener('keydown', handleKeydown) +}) function immersionHandler() { - imgbigshow.value = true; + imgbigshow.value = true // taskStore.updateImmersion() - toggleFullScreen(); + toggleFullScreen() } // 切换全屏状态 function toggleFullScreen() { - isFullScreen.value = !isFullScreen.value; + isFullScreen.value = !isFullScreen.value if (isFullScreen.value) { - fetchData(); - window.addEventListener("scroll", checkBottom); - } else { - window.removeEventListener("scroll", checkBottom); + fetchData() + window.addEventListener('scroll', checkBottom) + } + else { + window.removeEventListener('scroll', checkBottom) } } function previewHandler(event: MouseEvent) { - event.stopImmediatePropagation(); - event.stopPropagation(); + event.stopImmediatePropagation() + event.stopPropagation() if (imageRef.value && (imageRef.value as any).src) - (imageRef.value as any).mergedOnClick(); + (imageRef.value as any).mergedOnClick() } watch( () => [taskStore.activeId], () => { if (!isEmpty(taskStore.getActiveId)) { - packageId.value = taskStore.getPackageid; - taskId.value = taskStore.getActiveId; - getDetail(); + packageId.value = taskStore.getPackageid + taskId.value = taskStore.getActiveId + getDetail() } - } -); + }, +) // 获取数据 async function getDetail() { - taskDetailInfo.value = await getTaskDetailInfo(taskId.value, packageId.value); - setBatch(false); - getTableData(); - getImgList(); + taskDetailInfo.value = await getTaskDetailInfo(taskId.value, packageId.value) + setBatch(false) + getTableData() + getImgList() } function notPassSuccess(param) { - batchModalRef.value.reload(); - reloadList(param, "不通过"); - overTask.value = null; + batchModalRef.value.reload() + reloadList(param, '不通过') + overTask.value = null } function reloadList(param, text) { // 修改左侧状态 - const id = currentTaskId(); + const id = currentTaskId() const hasCurrentId = param.flowTaskInfoList.find( - (item) => item.formId === id - ); - finalStore.setListKey(); - if (hasCurrentId) emit("setAsideItemName", text); + item => item.formId === id, + ) + finalStore.setListKey() + if (hasCurrentId) + emit('setAsideItemName', text) - getDetail(); + getDetail() } function goBack() { - router.back(); + router.back() } function switchBatch() { - setBatch(!batch.value); + setBatch(!batch.value) } function getrowValue(e) { - if (e.key == "location") { - const locationobj = JSON.parse(taskDetailInfo.value.ocrPicture.location); - const lat = locationobj.lat.$numberDecimal; - const lng = locationobj.lng.$numberDecimal; - const name = e.value; - const protocol = window.location.protocol; - const hostname = window.location.hostname; - const port = window.location.port; - const hostWithPort = `${protocol}//${hostname}:${port}/`; - window.open(`${hostWithPort}map` + `?name=${name}&lat=${lat}&lng=${lng}`); + if (e.key == 'location') { + const locationobj = JSON.parse(taskDetailInfo.value.ocrPicture.location) + const lat = locationobj.lat.$numberDecimal + const lng = locationobj.lng.$numberDecimal + const name = e.value + const protocol = window.location.protocol + const hostname = window.location.hostname + const port = window.location.port + const hostWithPort = `${protocol}//${hostname}:${port}/` + window.open(`${hostWithPort}map` + `?name=${name}&lat=${lat}&lng=${lng}`) } } function overTaskHandelr(item: any) { if (item?.historyStates === 2 || item?.historyStates == 3) { - overTasktwo.value = null; - return; + overTasktwo.value = null + return } if (validate([item]) == null && batchtwo.value === false) - overTasktwo.value = item; + overTasktwo.value = item } function closePassno() { - console.log(notPassModalRef.value); - overTask.value = null; + console.log(notPassModalRef.value) + overTask.value = null } // const loadingx = ref(false); -const items = ref([]); -const scrollContainer = ref(null); -let debounceTimer; +const items = ref([]) +const scrollContainer = ref(null) +let debounceTimer async function fetchData() { - if (loading.value) return; // 如果已经在加载中,则不重复加载 + if (loading.value) + return // 如果已经在加载中,则不重复加载 - loading.value = true; + loading.value = true try { - loadMore(); - } finally { - loading.value = false; + loadMore() + } + finally { + loading.value = false } } // const throttledCheckScroll = throttle(checkBottom, 200); -let num = 1; +let num = 1 // 检查是否滚动到底部 function checkBottom() { - const container = scrollContainer.value; + const container = scrollContainer.value // console.log(1) - if (!container) return; + if (!container) + return // const { scrollTop, clientHeight, scrollHeight } = container; - const scrollTop = window.pageYOffset || document.documentElement.scrollTop; + const scrollTop = window.pageYOffset || document.documentElement.scrollTop // 获取视口的内部高度 - const clientHeight = - window.innerHeight || document.documentElement.clientHeight; + const clientHeight + = window.innerHeight || document.documentElement.clientHeight // 获取整个文档的高度 - const scrollHeight = document.documentElement.scrollHeight; + const scrollHeight = document.documentElement.scrollHeight - clearTimeout(debounceTimer); + clearTimeout(debounceTimer) debounceTimer = setTimeout(() => { if (scrollTop + clientHeight >= scrollHeight - 10) { - num = num + 1; - console.log(num); - fetchData(); // 接近底部时加载更多数据 + num = num + 1 + console.log(num) + fetchData() // 接近底部时加载更多数据 } - }, 500); + }, 500) } async function loadMore() { - console.log(loading.value); + console.log(loading.value) if (loading.value) { - const more = await fetchList(); - taskDetailPictureList.value.push(...more); - console.log(taskDetailPictureList); + const more = await fetchList() + taskDetailPictureList.value.push(...more) + console.log(taskDetailPictureList) } } -let canloadMore = true; +let canloadMore = true async function fetchList() { try { - pagination.pageNo += 1; + pagination.pageNo += 1 const { data, pageCount, total } = await getSimilarityList({ ...pagination, ...sortBy, pictureId: taskDetailInfo.value.ocrPicture.id, - }); - canloadMore = pageCount >= pagination.pageNo && pageCount > 0; - totalCount.value = total; - return data; - } catch (error) { - canloadMore = false; - return []; + }) + canloadMore = pageCount >= pagination.pageNo && pageCount > 0 + totalCount.value = total + return data + } + catch (error) { + canloadMore = false + return [] } } async function reset() { - pagination.pageNo = 0; - pagination.pageSize = 30; - taskDetailPictureList.value.length = 0; - loading.value = false; - canloadMore = true; + pagination.pageNo = 0 + pagination.pageSize = 30 + taskDetailPictureList.value.length = 0 + loading.value = false + canloadMore = true // layout() } async function refreshHandler() { - getImgList(); + getImgList() } -function sortHandler(orderby: "similarityScore" | "createdate") { - sortBy.orderName = orderby; - sortBy.orderType = sortBy.orderType === "asc" ? "desc" : "asc"; - refreshHandler(); +function sortHandler(orderby: 'similarityScore' | 'createdate') { + sortBy.orderName = orderby + sortBy.orderType = sortBy.orderType === 'asc' ? 'desc' : 'asc' + refreshHandler() } @@ -735,14 +754,14 @@ function sortHandler(orderby: "similarityScore" | "createdate") { src="@/assets/images/task/btn-not-pass.png" alt="" @click.stop="rejectHandler(selectItems)" - /> + > + >
@@ -759,8 +778,8 @@ function sortHandler(orderby: "similarityScore" | "createdate") { :style=" isFullScreen ? { - height: '596px', - } + height: '596px', + } : {} " > @@ -800,21 +819,24 @@ function sortHandler(orderby: "similarityScore" | "createdate") { isFullScreen ? imgbigshow ? { - position: 'relative', - //width: '70vw', - flex: 1, - // flex: 0.75, - 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, - } + position: 'relative', + //width: '70vw', + flex: 1, + // flex: 0.75, + // 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, + background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`, + } : { - height: '92vh', - flex: 1, + height: '92vh', + flex: 1, - 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, - } - : { - 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, + // 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, + background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`, } + : { + // 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, + background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`, + } " @mouseover="overTaskHandle" @mouseleave="leaveTaskHandler" @@ -855,14 +877,14 @@ function sortHandler(orderby: "similarityScore" | "createdate") { class="img-status" src="@/assets/images/task/pass.png" alt="" - /> + > + >
+ > @@ -912,12 +934,11 @@ function sortHandler(orderby: "similarityScore" | "createdate") { class="icon-status" src="@/assets/images/task/similarity.png" alt="" - /> + > - {{ totalCount }} + {{ totalCount }} 相似匹配 @@ -947,8 +968,8 @@ function sortHandler(orderby: "similarityScore" | "createdate") { {{ taskDetailInfo?.ocrPicture?.submitDateTimestamp ? formatToDateHMS( - Number(taskDetailInfo.ocrPicture.submitDateTimestamp) - ) + Number(taskDetailInfo.ocrPicture.submitDateTimestamp), + ) : "-" }}
@@ -968,14 +989,14 @@ function sortHandler(orderby: "similarityScore" | "createdate") { :style=" isFullScreen ? { - flex: 0.3, - // flex: 0, - //width: '30vw', - borderLeft: '2px solid #507AFD', - position: 'relative', - borderRadius: 0, - height: '596px', - } + flex: 0.3, + // flex: 0, + //width: '30vw', + borderLeft: '2px solid #507AFD', + position: 'relative', + borderRadius: 0, + height: '596px', + } : { flex: 0.5 } " > @@ -1022,7 +1043,8 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
@@ -1040,13 +1062,13 @@ function sortHandler(orderby: "similarityScore" | "createdate") { class="tag-status" src="@/assets/images/task/tag-pass.png" alt="" - /> + > + >
- {{ taskDetailInfo.fromtaskname }} + + {{ taskDetailInfo.fromtaskname }} +
@@ -1223,8 +1247,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") { color: #333333; font-family: PingFang SC, PingFang SC-Medium; " - >相似图片({{ totalCount }}) + >相似图片({{ totalCount }})
+ > + >
{ show.value && addListeners() - window.addEventListener("keydown", handleKeydown); + window.addEventListener('keydown', handleKeydown) }) - // 键盘左右箭头快捷切换 function handleKeydown(event) { - // 在这里执行右箭头的逻辑 - if (event.keyCode === 67) { -show.value=false - // batchModalRef.value.closeModal() - } + if (event.keyCode === 67) + show.value = false + // batchModalRef.value.closeModal() } function showModal(value) { taskId.value = value @@ -408,7 +405,8 @@ const gridHeight = computed(() => { defineExpose({ showModal, - reload,closeModal + reload, + closeModal, }) @@ -544,40 +542,39 @@ defineExpose({ :style="{ height: gridHeight }" class="grid-item" > - -
-
-
- - {{ formatToDateHMS(Number(item.photoDateTimestamp) || 0) }} -
-
- - {{ formatToDateHMS(Number(item.submitDateTimestamp) || 0) }} -
+ :src="item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl" + /> +
+
+
+ + {{ formatToDateHMS(Number(item.photoDateTimestamp) || 0) }}
- - -
- +
+ + {{ formatToDateHMS(Number(item.submitDateTimestamp) || 0) }}
-
- {{ item.similarityScore }}% -
+
+ + +
+ +
+
+ {{ item.similarityScore }}% +
diff --git a/src/views/worksheet/components/pictureCard.vue b/src/views/worksheet/components/pictureCard.vue index 310c6b2..f3b37a2 100644 --- a/src/views/worksheet/components/pictureCard.vue +++ b/src/views/worksheet/components/pictureCard.vue @@ -1,5 +1,6 @@