From 1cdebc153a79067a9a797aad6133d51bceb40807 Mon Sep 17 00:00:00 2001 From: Dragon <> Date: Sat, 23 Mar 2024 00:56:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 1 + src/api/final/index.ts | 12 + src/components/NotPassed.vue | 213 ++++++++++++++++++ src/layout/components/Header/RecycleModal.vue | 89 ++++++-- src/views/final/comp/RepeatModal.vue | 47 +++- src/views/task/content/Content.vue | 3 +- src/views/worksheet/aside/WorkSheetList.vue | 12 +- src/views/worksheet/modal/ApprovalModal.vue | 4 +- 8 files changed, 349 insertions(+), 32 deletions(-) create mode 100644 src/components/NotPassed.vue diff --git a/components.d.ts b/components.d.ts index 1d346c9..896d6e9 100644 --- a/components.d.ts +++ b/components.d.ts @@ -33,6 +33,7 @@ declare module 'vue' { NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NModal: typeof import('naive-ui')['NModal'] NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] + NotPassed: typeof import('./src/components/NotPassed.vue')['default'] NPopover: typeof import('naive-ui')['NPopover'] NPopselect: typeof import('naive-ui')['NPopselect'] NScrollbar: typeof import('naive-ui')['NScrollbar'] diff --git a/src/api/final/index.ts b/src/api/final/index.ts index 3469e37..9db5041 100644 --- a/src/api/final/index.ts +++ b/src/api/final/index.ts @@ -49,3 +49,15 @@ export async function resetApproval(params: ResetParam) { params, }) } + +/** + * 小结查重 + * @param params + * @returns + */ +export async function repetitionTask() { + return http.request({ + url: `/flow/task/repetitionTask`, + method: 'get', + }) +} diff --git a/src/components/NotPassed.vue b/src/components/NotPassed.vue new file mode 100644 index 0000000..d88f94d --- /dev/null +++ b/src/components/NotPassed.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/layout/components/Header/RecycleModal.vue b/src/layout/components/Header/RecycleModal.vue index 3ed31e8..d2f7ae5 100644 --- a/src/layout/components/Header/RecycleModal.vue +++ b/src/layout/components/Header/RecycleModal.vue @@ -7,8 +7,7 @@ import { useInfiniteScroll } from '@vueuse/core' import { debounce, throttle } from 'lodash-es' import imagesloaded from 'imagesloaded' import { randomInt } from '@/utils/index' -import { timeOptions, viewOptions } from '@/config/home' -import { getPictureList } from '@/api/home/main' +import { viewOptions } from '@/config/home' import { dubiousfilelist, removeFiles } from '@/api/task/task' import { off, on } from '@/utils/domUtils' @@ -24,7 +23,15 @@ const cardStyle = { } const message = useMessage() -const timeRange = ref('all') +const timeRange = ref('') +const check = ref(false) +const timeOptions = [{ + label: '升序', + value: 'asc', +}, { + label: '降序', + value: 'desc', +}] const timeLabel = computed(() => { const item = timeOptions.find((option) => { return option.value === timeRange.value @@ -102,7 +109,7 @@ function randomUrl() { async function featchList() { loading = true try { - const result = await dubiousfilelist({ ...pagination, search_month: '', search_history: '0' }) + const result = await dubiousfilelist({ ...pagination, orderbyname: timeRange.value }) // TODO:测试数据 // result.data = Array.from({ length: 30 }) result.pageCount = 1 @@ -233,7 +240,6 @@ function afterLeave() { } onMounted(() => { - console.log(789) show.value && addListeners() }) @@ -244,6 +250,12 @@ async function showModal() { listData.value = list } +async function onChange() { + pagination.pageNo = 1 + const list = await featchList() + listData.value = list +} + function closeModal(event: MouseEvent) { show.value = false } @@ -258,8 +270,29 @@ async function remove() { return } - const ids = arr.map(item => item.pictureid).join(',') + const ids = arr.map(item => item.id).join(',') const res = await removeFiles({ pictureid: ids }) + if (res.code === 'OK') { + message.success('移除成功') + pagination.pageNo = 1 + const list = await featchList() + listData.value = list + } +} + +function getPercent(pictureid: string, item) { + console.log(item) + const { ocpictureid, pictureresult } = item + const splitId = ocpictureid || '' + const index = splitId.split(',').indexOf(String(pictureid)) + const results = (pictureresult || '').split(',') + const percent = results[index] || '0' + const val = Number.parseFloat(percent) + return `${val}%` +} + +function showCheck() { + check.value = true } defineExpose({ @@ -279,7 +312,7 @@ function onCheckChange(val: any, item: any) { @after-enter="afterEnter" @after-leave="afterLeave" >
@@ -294,9 +327,9 @@ function onCheckChange(val: any, item: any) {
- +
- {{ timeLabel || '时间模式' }} + {{ timeLabel || '时间排序' }}
@@ -311,7 +344,7 @@ function onCheckChange(val: any, item: any) {
移除可疑文件夹
-
+
批量审批
@@ -322,8 +355,8 @@ function onCheckChange(val: any, item: any) {
@@ -359,6 +396,9 @@ function onCheckChange(val: any, item: any) { width: 100vw; height: calc(100vh - 64px); user-select: none; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + /* Standard syntax */ } @@ -394,6 +434,10 @@ function onCheckChange(val: any, item: any) { } } +.img{ + border-radius: 8px; +} + .wrapper { display: flex; flex-direction: column; @@ -460,6 +504,21 @@ function onCheckChange(val: any, item: any) { .grid-item { width: 214px; padding: 16px; + position: relative; + } + + .percent { + position: absolute; + text-align: center; + width: 35px; + height: 18px; + opacity: 0.9; + background: #6f92fd; + border-radius: 6px 0px 6px 0px; + z-index: 5; + right: 22px; + top: 22px; + color: #fff; } .grid-item-selected { @@ -467,12 +526,16 @@ function onCheckChange(val: any, item: any) { } .scroll { - overflow-y: scroll; + overflow-y: auto; height: calc(100vh - 282px); } } } +.wrapper-content-form-button{ + cursor: pointer; +} + .img-fit { width: 100%; overflow: hidden; diff --git a/src/views/final/comp/RepeatModal.vue b/src/views/final/comp/RepeatModal.vue index 3633236..b1201a6 100644 --- a/src/views/final/comp/RepeatModal.vue +++ b/src/views/final/comp/RepeatModal.vue @@ -1,5 +1,7 @@