From e693d15462371eef795a093e44e5f38fb0710565 Mon Sep 17 00:00:00 2001 From: raofuzi <2641346316@qq.com> Date: Wed, 17 Apr 2024 16:22:54 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 9 +++++++++ src/assets/images/not-pass.png | Bin 0 -> 3889 bytes src/assets/images/pass.png | Bin 0 -> 3571 bytes src/layout/components/Header/RecycleModal.vue | 2 +- src/views/home/content/Content.vue | 11 ++++++----- src/views/task/content/Content.vue | 10 +++++----- src/views/worksheet/components/pictureCard.vue | 6 +++--- src/views/worksheet/content/Content.vue | 2 +- 8 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 src/assets/images/not-pass.png create mode 100644 src/assets/images/pass.png diff --git a/components.d.ts b/components.d.ts index 298dbe9..6458938 100644 --- a/components.d.ts +++ b/components.d.ts @@ -11,6 +11,7 @@ declare module 'vue' { BasicModal: typeof import('./src/components/Modal/BasicModal.vue')['default'] DataHeader: typeof import('./src/components/DataHeader/index.vue')['default'] NAvatar: typeof import('naive-ui')['NAvatar'] + NBackTop: typeof import('naive-ui')['NBackTop'] NButton: typeof import('naive-ui')['NButton'] NCard: typeof import('naive-ui')['NCard'] NCheckbox: typeof import('naive-ui')['NCheckbox'] @@ -21,8 +22,11 @@ declare module 'vue' { NDialogProvider: typeof import('naive-ui')['NDialogProvider'] NDivider: typeof import('naive-ui')['NDivider'] NDropdown: typeof import('naive-ui')['NDropdown'] + NEllipsis: typeof import('naive-ui')['NEllipsis'] + NEmpty: typeof import('naive-ui')['NEmpty'] 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'] @@ -31,6 +35,7 @@ declare module 'vue' { NModal: typeof import('naive-ui')['NModal'] NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] NotPassed: typeof import('./src/components/NotPassed.vue')['default'] + NPopconfirm: typeof import('naive-ui')['NPopconfirm'] NPopover: typeof import('naive-ui')['NPopover'] NPopselect: typeof import('naive-ui')['NPopselect'] NProgress: typeof import('naive-ui')['NProgress'] @@ -40,7 +45,11 @@ declare module 'vue' { 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'] + NTimeline: typeof import('naive-ui')['NTimeline'] + NTimelineItem: typeof import('naive-ui')['NTimelineItem'] NTooltip: typeof import('naive-ui')['NTooltip'] NUpload: typeof import('naive-ui')['NUpload'] NUploadDragger: typeof import('naive-ui')['NUploadDragger'] diff --git a/src/assets/images/not-pass.png b/src/assets/images/not-pass.png new file mode 100644 index 0000000000000000000000000000000000000000..dc4d19c53beeabb885ab122dd0115ad3150ca80c GIT binary patch literal 3889 zcmV-156Px@>q$gGRCr$PTWO3HRT@3@UPFthxGSP!92FdtL_yrf6$C*@V~;QsQ9+C`iqL?~ zqRxZ=APgm0E ze)aCXRdv4eoo}hz9$Jr`f`I2<)vvAH1G(Jg@clCQeplrDeF5Kt?<4r(k;|Fi@|nN& zISvcHvvXu_FkO$epOfb2&E;A$->xn95X@KC)8~V0^RnumWvqVq;C=~*4|txL6MR(X zc|xDl=*c(_TLEl>?=_+%^C;%eU*LJ31unW^40yk`b|`YWdyvcR6M?KAk~i!E8W_R> zB5j;D0D;hkiy6_qjxtaPWXipS*U(0H=Ev^Yf-RtGLWv=GE-;40PyZc`u|~=X$;jauH9N> zA$CsI(y}FhS)+q=0{d}M08g$>gU@U^w4AeVbJ5Ac`~lwN9g)j=!v zz{0#j;95Bl10>FOyiI#io{S{~f38Vf33w=j7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7Lj~vCwHQEI8+`pW@Wd0Qnq>OPI^mgTfK{u2FE<+rU~0?OGntp$)`F%XC^f8- z`O~%(*rn9O1-Ulk1SNzZFIWH!9B8_ptPh@j)-=Dq`pUGGY209a)xhI5_`|nlT$|b1 z`VGLAUm^pC21v+iLa7-){UJC zq#sYPG4|-9DU_?cJ`L~4YCM78k$!xv zvh@upXZJP?qcpH-=C&WS>$*i7wRg=LlS%0Bv|PzUvNz7xfb?jQ7q=fy2_P%QNNnh_ zFrxPBe!Q?;&!?Qo+BAZ^q0%64*&4}AAnkhJrDeLD=kJWX>>f9+1^V$$u#L%zy?9b! z4vkhsKRz^8f^HVuPY+yZC(rjvyLk(_y+eTC(SH06&rf*+=6Xk1(5QxYUQ58@8xl?x zIXid0+R#McceEexN(Zzt*Ygk(BNd+xP7iA*%NKRtY#pVANCdGno3s}&W+ z_v76_>IO{-fJN_*cl1APevGv`QwYAW9k|r}=}~?y_nXwMEWV$f%=kj{JuiQowlBbM zPd{D*q`R8#4u!OFIz!RzhM1mP50bHNza>2H8p7GTxU=Vb-g0Cz`Tv;Uj~P?AA1^(L z-)nz-S{owFg_B+;TfKH=BbcMMUAOH1cAIcEvp?R;Y=xiW*11M_C68i3%D>|H<>jZM zsp%;I?PCR7He2r1*EeiW5!X7lcm&LUgp`-}K~vL`ZCj8^!>OJ(z+14uZnZ6b!Pb$* zAt1>x{Iaq^0O|plt+ts=Z?B<&yE$8r-vNOT_<;FkWq*O^Jp$k7X2esyg$rN%9j@8B zq^j>iF#Pk+zZALLY-F=Nz505)alI9*mPR1Pcv;*ZJa{zPw0VyIGSbo)Y+cVFkO;g< zeSI(KKayL4YZ(Mmfp3}RTUSX#pcVL?#Et(0bh#4p!E@W;00000NkvXXu0mjf8%={( literal 0 HcmV?d00001 diff --git a/src/assets/images/pass.png b/src/assets/images/pass.png new file mode 100644 index 0000000000000000000000000000000000000000..21c87eec24bd370d8d58770fab0e4bd8ccff18b8 GIT binary patch literal 3571 zcmVPx?tw}^dR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wX{UeG#+>e>Y|v;2LGK8}*dtMLt{&~A zD=fTB0CBHl+F?+e^K52ofl@S%nI zlo<~sjzWI=blL{FrDPrUw^Sp^;lkgu?#6h}fQy=6FH8D;^)fn$Kdk#1K%&m#?Nzm@ zZH;jHwHYz#SerHtublY?FVuc6Yp4j=aDU$slv&x43FzyHLX0hfwETgsX5>bRv?S9>m%sd(ZIvIuSbvUQ{4t5j$-MX!-&!tB!y$fj52y`LsJVjv5 zbe5&J`#Tlw65JM-g*|60(Guv8o2kM_TBX#@m6?+UJAICxoR|+E@#9<|Jo5tJ)m(>H z(mY5U)F}(JEDiCHeQIT^S_q&5EZZig%|hcv1aL zy3kT^X{>xYg<+b7k!%Fty}3X?suyGqXA1f9g1azZmKvsgZ0?6-uSjkjs;|Xx0fnGa z-tOM-QJVh3kQJuUfYIZv;c!Im`B>BIFRsG8;9^zCZEBLS2LwkrDW&qh4vS9Ae5|jS zs10|<9@EPYAp=Cug}bDYpG_%PXTiRAucGr)( zB!PQ&vlq~+plP9B!OL8>;H3b;bLw0gw65~SdCs2Ae|e9hR*wEBugdFKAXj}$1GhCEN6w-qd}T}KG!LDOm~7Uf-B zRd|^JX)0MJ?|I&F;=9@{AQ)M(I6w0;ll7v+vDS1L`pV;x0lz=Dd~x2Qi<R5J@Wcpfwlku002ovPDHLkV1noPxZVH& literal 0 HcmV?d00001 diff --git a/src/layout/components/Header/RecycleModal.vue b/src/layout/components/Header/RecycleModal.vue index cd0f085..83a3238 100644 --- a/src/layout/components/Header/RecycleModal.vue +++ b/src/layout/components/Header/RecycleModal.vue @@ -732,7 +732,7 @@ watch(() => pagination.pageNo, (newVal, oldVal) => { > { return { imgUrl: item.imgurl, - thumburl: item.serverThumbnailUrl || item.imgurl || '', + thumburl: item.serverThumbnailUrl || item.imgurl || bgLoadingImg, upname: item.upname, ocrPictureclass: item.ocrPictureclass, uphead: item.uphead, @@ -726,13 +726,13 @@ defineExpose({ @@ -926,7 +926,8 @@ defineExpose({ width: 182px; border-radius: 7px; margin-bottom: 10px; - overflow: hidden; + overflow-x: visible; + // overflow-y: hidden; position: relative; transition: 0.5s; @@ -934,7 +935,7 @@ defineExpose({ width: 46px; height: 22px; position: absolute; - left: -1px; + left: -3px; top: 10px; } diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index f507af0..62410a5 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -811,18 +811,18 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') { flex: 1, // flex: 0.75, // 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, - background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`, + background: `url(${taskDetailInfo?.ocrPicture?.imgurl ? taskDetailInfo?.ocrPicture?.imgurl : bgLoadingImg})`, } : { height: '92vh', flex: 1, // 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, - background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`, + background: `url(${taskDetailInfo?.ocrPicture?.imgurl ? taskDetailInfo?.ocrPicture?.imgurl : bgLoadingImg})`, } : { // 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, - background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`, + background: `url(${taskDetailInfo?.ocrPicture?.imgurl ? taskDetailInfo?.ocrPicture?.imgurl : bgLoadingImg})`, } " @mouseover="overTaskHandle" @@ -1000,7 +1000,7 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') { class="img-wrapper" :style="{ // 'background-image': `url(${item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl})`, - background: `url(${item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl}), url(${bgLoadingImg})`, + background: `url(${item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl ? item.imgUrl : bgLoadingImg})`, }" />
@@ -1226,7 +1226,7 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') { class="img-wrapper" :style="{ // 'background-image': `url(${item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl})`, - background: `url(${item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl}), url(${bgLoadingImg})`, + background: `url(${item.serverThumbnailUrl ? item.serverThumbnailUrl : item.imgUrl ? item.imgUrl : bgLoadingImg})`, }" @mouseover="overTaskHandelr(item)" @mouseleave="leaveTaskHandler" diff --git a/src/views/worksheet/components/pictureCard.vue b/src/views/worksheet/components/pictureCard.vue index f3b37a2..cb616fa 100644 --- a/src/views/worksheet/components/pictureCard.vue +++ b/src/views/worksheet/components/pictureCard.vue @@ -70,17 +70,17 @@ function previewHandler(event: MouseEvent) { position: 'relative', flex: 2, // 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, - background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`, + background: `url(${taskDetailInfo?.ocrPicture?.imgurl ? taskDetailInfo?.ocrPicture?.imgurl : bgLoadingImg})`, } : { height: '92vh', flex: 2, // 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, - background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`, + background: `url(${taskDetailInfo?.ocrPicture?.imgurl ? taskDetailInfo?.ocrPicture?.imgurl : bgLoadingImg})`, } : { // 'background-image': `url(${taskDetailInfo?.ocrPicture?.imgurl})`, - background: `url(${taskDetailInfo?.ocrPicture?.imgurl}), url(${bgLoadingImg})`, + background: `url(${taskDetailInfo?.ocrPicture?.imgurl ? taskDetailInfo?.ocrPicture?.imgurl : bgLoadingImg})`, } " @mouseover="overTaskHandle" diff --git a/src/views/worksheet/content/Content.vue b/src/views/worksheet/content/Content.vue index 9f98217..99a9ab2 100644 --- a/src/views/worksheet/content/Content.vue +++ b/src/views/worksheet/content/Content.vue @@ -800,7 +800,7 @@ defineExpose({ >
From f94169ec20a93d1ab4b87bcf8f5430b896485e3d Mon Sep 17 00:00:00 2001 From: raofuzi <2641346316@qq.com> Date: Wed, 17 Apr 2024 23:09:07 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pnpm-lock.yaml | 7 +++++++ src/main.ts | 9 +++++++++ src/views/home/content/Content.vue | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/package.json b/package.json index f2cd289..4ebe340 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "sortablejs": "^1.15.1", "vue": "^3.3.8", "vue-draggable-plus": "^0.3.5", + "vue-lazyload": "^3.0.0", "vue-mousetrap": "^1.0.5", "vue-router": "^4.1.6", "vue-types": "^4.2.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3dde4d4..e1125a6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,6 +71,9 @@ dependencies: vue-draggable-plus: specifier: ^0.3.5 version: 0.3.5(@types/sortablejs@1.15.7) + vue-lazyload: + specifier: ^3.0.0 + version: 3.0.0 vue-mousetrap: specifier: ^1.0.5 version: 1.0.5 @@ -7320,6 +7323,10 @@ packages: - supports-color dev: true + /vue-lazyload@3.0.0: + resolution: {integrity: sha512-h2keL/Rj550dLgesgOtXJS9qOiSMmuJNeVlfNAYV1/IYwOQYaWk5mFJlwRxmZDK9YC5gECcFLYYj7z1lKSf9ug==} + dev: false + /vue-mousetrap@1.0.5: resolution: {integrity: sha512-mDyPBBTnOrpUNDZ4vjd7X8emYwKFG2/Rsi5coZKDmF+dM5XpENrnvdmef4xHq2gcZ1HVmHqeI5jQP17p9fFpzA==} dependencies: diff --git a/src/main.ts b/src/main.ts index a146104..82bead9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,6 +5,9 @@ import router, { setupRouter } from './router' import { setupGlobalProperties, setupMousestrap, setupNaive, setupNaiveDiscreteApi, setupSvgIcon } from '@/plugins' import { setupStore } from '@/store' import 'virtual:svg-icons-register' +import VueLazyload from 'vue-lazyload' +import bgPng from '@/assets/images/bg-loading.png' +import closePng from '@/assets/images/close.png' async function bootstrap() { const app = createApp(App) @@ -19,6 +22,12 @@ async function bootstrap() { const meta = document.createElement('meta') meta.name = 'naive-ui-style' document.head.appendChild(meta) + app.use(VueLazyload, { + preLoad: 1.3, + error: closePng, + loading: bgPng, + attempt: 1 + }) app.mount('#app', true) } diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index 219eec4..7e6f6ea 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -719,7 +719,12 @@ defineExpose({ :preview-src="item.imgUrl" :src="item.thumburl" :fallback-src="bgLoadingImg" + style="display: none" /> + Date: Thu, 18 Apr 2024 08:14:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/content/Content.vue | 43 ++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index 1f2a046..c346723 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -115,20 +115,20 @@ const layout = debounce(() => { percentPosition: true, stagger: 10, }) + loading.value = false + // _imagesload = imagesloaded('.grid-item') - _imagesload = imagesloaded('.grid-item') - - _imagesload.on('done', (instance) => { - (_masonry as any).layout() - if (!el.value) - return - loading.value = false - }) + // _imagesload.on('done', (instance) => { + // (_masonry as any).layout() + // if (!el.value) + // return + // loading.value = false + // }) - _imagesload.on('fail', (instance) => { - message.error('图片错误') - loading.value = false - }) + // _imagesload.on('fail', (instance) => { + // message.error('图片错误') + // loading.value = false + // }) }, 300) useInfiniteScroll( @@ -295,6 +295,16 @@ const gridHeight = computed(() => { return height }) +const gridMinHeight = computed(() => { + let height = '' + if (viewMode.value === 'masonry' && loading.value) + height = '145px' + else + height = '' + + return height +}) + async function oneCheck() { const asideVal = cloneDeep(configStore.getAsideValue) asideVal.upUserName = searchValue.value @@ -699,7 +709,7 @@ defineExpose({
@@ -726,7 +736,12 @@ defineExpose({ :fallback-src="bgLoadingImg" style="display: none" /> - { + previewHandler(index, $event); + hideDownload($event); + } + " v-lazy="item.thumburl" class="img" :class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion', }" alt=""> From 7e2365a6aeb962a826ddcd443f90e71aa41dac8d Mon Sep 17 00:00:00 2001 From: raofuzi <2641346316@qq.com> Date: Thu, 18 Apr 2024 11:01:52 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/content/Content.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/home/content/Content.vue b/src/views/home/content/Content.vue index c346723..179c3fc 100644 --- a/src/views/home/content/Content.vue +++ b/src/views/home/content/Content.vue @@ -116,6 +116,7 @@ const layout = debounce(() => { stagger: 10, }) loading.value = false + // 暂时注释,请忽略 // _imagesload = imagesloaded('.grid-item') // _imagesload.on('done', (instance) => { @@ -962,7 +963,6 @@ defineExpose({ border-radius: 7px; margin-bottom: 10px; overflow-x: visible; - // overflow-y: hidden; position: relative; transition: 0.5s; margin: 0 6px 10px 6px;