From 088e5629bb4b76e434d322973e99f35b1517f626 Mon Sep 17 00:00:00 2001 From: lizijiee <562949697@qq.com> Date: Mon, 1 Apr 2024 21:49:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=E5=A2=9E=E5=8A=A0=E7=A1=AE=E8=AE=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/icons/exclamation-solid.svg | 3 + src/layout/components/Header/ConfrimModal.vue | 114 ++++++++++++++++ src/layout/components/Header/RecycleModal.vue | 122 ++++++++---------- src/views/worksheet/content/Content.vue | 5 - 4 files changed, 173 insertions(+), 71 deletions(-) create mode 100644 src/assets/icons/exclamation-solid.svg create mode 100644 src/layout/components/Header/ConfrimModal.vue diff --git a/src/assets/icons/exclamation-solid.svg b/src/assets/icons/exclamation-solid.svg new file mode 100644 index 0000000..26d03f5 --- /dev/null +++ b/src/assets/icons/exclamation-solid.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/layout/components/Header/ConfrimModal.vue b/src/layout/components/Header/ConfrimModal.vue new file mode 100644 index 0000000..6138e5d --- /dev/null +++ b/src/layout/components/Header/ConfrimModal.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/layout/components/Header/RecycleModal.vue b/src/layout/components/Header/RecycleModal.vue index 4afda80..c9d2d99 100644 --- a/src/layout/components/Header/RecycleModal.vue +++ b/src/layout/components/Header/RecycleModal.vue @@ -12,6 +12,7 @@ import { debounce } from 'lodash-es' import { audit } from '@/api/task/task' import NotPassed from '@/components/Approval/NotPassed.vue' import { off, on } from '@/utils/domUtils' +import ConfrimModal from "./ConfrimModal.vue" const cardStyle = { '--n-padding-bottom': '40px', @@ -59,6 +60,7 @@ const show = ref(false) const selectedApproveItems = ref([]); // 审核批量选中 const dialog = useDialog(); let processItems: any[] = []; +const confrimModalRef = ref(); const layout = debounce(() => { if (!show.value) @@ -252,14 +254,8 @@ function closeModal(event: MouseEvent) { selectedApproveItems.value = [] show.value = false } - -async function remove() { - if ( !selectIds.value|| selectIds.value.length === 0) { - message.error('至少选中一个') - return - } - - const ids = selectIds.value.join(',') +async function commit() { + const ids = selectIds.value.join(',') const res = await removeFiles({ pictureid: ids }) if (res.code === 'OK') { message.success('移除成功') @@ -269,6 +265,13 @@ async function remove() { layout() } } + function remove() { + if ( !selectIds.value|| selectIds.value.length === 0) { + message.error('至少选中一个') + return + } + confrimModalRef?.value?.showModal() +} function setBatch(value) { @@ -288,11 +291,9 @@ defineExpose({ showModal, }) -const checked = ref(false) - const notPassModalRef = ref(null) const showActions = computed(() => { - console.log('selectedApproveItems',selectedApproveItems) + console.log('selectedApproveItems', selectedApproveItems) return selectedApproveItems.value.length > 0 && batch; }); @@ -385,7 +386,7 @@ function doAudit(param: any) { function reloadList() { refreshHandler() } -function refreshHandler(){ +function refreshHandler() { reset() featchList() } @@ -394,14 +395,10 @@ function refreshHandler(){ @@ -502,11 +492,9 @@ function refreshHandler(){ user-select: none; border-top-left-radius: 10px; border-top-right-radius: 10px; - - /* Standard syntax */ } -.remove{ +.remove { cursor: pointer; } @@ -538,7 +526,7 @@ function refreshHandler(){ } } -.img{ +.img { border-radius: 8px; } @@ -553,7 +541,7 @@ function refreshHandler(){ padding: 24px 0px 12px 0px; } - &-m32{ + &-m32 { margin-left: 32px; } @@ -636,21 +624,23 @@ function refreshHandler(){ } } -.wrapper-content-form-button{ +.wrapper-content-form-button { cursor: pointer; } .img-fit { - width: 100%; - overflow: hidden; - } - .img-full { - width: 100%; - overflow: hidden; - ::v-deep(img) { - width: 100%; - height: 100%; - object-fit: cover; - } - } + width: 100%; + overflow: hidden; +} + +.img-full { + width: 100%; + overflow: hidden; + + ::v-deep(img) { + width: 100%; + height: 100%; + object-fit: cover; + } +} diff --git a/src/views/worksheet/content/Content.vue b/src/views/worksheet/content/Content.vue index 305ac53..8d7e2e7 100644 --- a/src/views/worksheet/content/Content.vue +++ b/src/views/worksheet/content/Content.vue @@ -607,11 +607,6 @@ function reloadList() {
-
-- 2.39.3