From f2555cbdf9741a66b5eafb833d030ad69e87e1ae Mon Sep 17 00:00:00 2001 From: lizijiee <562949697@qq.com> Date: Tue, 2 Apr 2024 22:56:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BB=E5=9B=BE=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E5=90=8E=E7=8A=B6=E6=80=81=E4=B8=8D=E5=88=B7=E6=96=B0bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../worksheet/components/PictureWall.vue | 46 ++++++------- src/views/worksheet/content/Content.vue | 68 +++++++++++-------- 2 files changed, 62 insertions(+), 52 deletions(-) diff --git a/src/views/worksheet/components/PictureWall.vue b/src/views/worksheet/components/PictureWall.vue index 2ed8321..564072d 100644 --- a/src/views/worksheet/components/PictureWall.vue +++ b/src/views/worksheet/components/PictureWall.vue @@ -334,10 +334,9 @@ onUnmounted(() => { -
- +
- {{ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0) }}% + {{ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0) }}%
@@ -417,29 +416,28 @@ onUnmounted(() => { .percent { position: absolute; - text-align: center; - z-index: 3; - right: 17px; - top: 2px; + display: flex; + align-items: center; + justify-content: center; + width: 35px; + height: 18px; + opacity: 0.9; + background: #6f92fd; + border-radius: 6px 0px 6px 0px; + z-index: 5; + right: 12px; + top: 15px; color: #fff; + font-size: 14px; + } - .val { - position: absolute; - left: 0; - top: 0; - display: block; - width: 100%; - height: 100%; - display: flex; - align-items: center; - justify-content: center; - font-size: 12px; - font-family: PingFang SC, PingFang SC-Semibold; - font-weight: Semibold; - text-align: left; - color: #ffffff; - line-height: 24px; - } + .percent-unit { + font-size: 8px; + margin-top: 4px; + } + + .percent-red { + background: #ff4e4f; } .pass-status { diff --git a/src/views/worksheet/content/Content.vue b/src/views/worksheet/content/Content.vue index 6072447..9de4d70 100644 --- a/src/views/worksheet/content/Content.vue +++ b/src/views/worksheet/content/Content.vue @@ -71,6 +71,7 @@ const el = ref(null); const selectedSortName = ref(''); const isFullScreen = ref(false); const notPassModalRef = ref(null) +const mainImageModalRef = ref(null) let canloadMore = true; @@ -272,7 +273,7 @@ function immersionHandler() { } function showAction() { - const item = taskDetailInfo.value; + const item = taskDetailInfo.value; if (item.historyStates === 2 || item.historyStates === 3) { return } @@ -294,12 +295,6 @@ function rejectHandler() { const modal = unref(notPassModalRef)! as any modal.showModal(selectItems.value) } -function detailRejectHandler() { - const modal = unref(notPassModalRef)! as any - const params = cloneDeep(taskDetailInfo.value) - params.id = params.taskchildpictureid - modal.showModal([params]) -} function singleRejectHandler(item) { const modal = unref(notPassModalRef)! as any @@ -320,22 +315,24 @@ function reject(idOrDesc: string, backId: string, isOther: boolean) { doAudit(param) } -function detailApprovalHandler(items?: any){ +function handleRejectMainImage() { + const modal = unref(mainImageModalRef)! as any + const params = cloneDeep(taskDetailInfo.value) + params.id = params.taskchildpictureid + modal.showModal([params]) +} +async function reloadDetailInfo(){ + const packageid = workStore.getActiveId; + taskDetailInfo.value = await getTaskDetailInfo(packageid); +} +function handleApproveMainImage(items?: any) { let cloneItem: any - if (batch.value) { - processItems = selectItems.value - } - else if (overTask.value) { + if (overTask.value) { cloneItem = clone(overTask.value) cloneItem.id = cloneItem.taskchildpictureid processItems = [cloneItem] } - // 任务包图片 => 点击 => 通过/不通过按钮 - if (items !== undefined && !(items instanceof PointerEvent)) - processItems = [items] - const msg = validate(processItems) - if (msg !== null) { message.error(msg) return @@ -366,7 +363,15 @@ function detailApprovalHandler(items?: any){ positiveText: '确定', negativeText: '取消', onPositiveClick: () => { - doAudit(param) + audit(param).then(async(res) => { + const { code } = res + if (code === 'OK') { + message.info(res.message) + const packageid = workStore.getActiveId; + taskDetailInfo.value = await getTaskDetailInfo(packageid); + } + else message.error(res.message) + }) }, onNegativeClick: () => { }, }) @@ -456,8 +461,8 @@ function reloadList() { 批量审批
- - + +
@@ -494,13 +499,15 @@ function reloadList() {
{{ - taskDetailInfo?.submitDateTimestamp ? format(taskDetailInfo?.submitDateTimestamp, 'yyyy-MM-dd HH:mm:ss') : + taskDetailInfo?.submitDateTimestamp ? format(taskDetailInfo?.submitDateTimestamp, 'yyyy-MM-dd HH:mm:ss') + : '-' }}
- +
@@ -539,8 +546,8 @@ function reloadList() {
- - + +
@@ -584,10 +591,10 @@ function reloadList() {
- +
-
+
{{ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0) }}%
@@ -609,6 +616,7 @@ function reloadList() { +
@@ -661,6 +669,7 @@ function reloadList() { margin-left: 6px; } } + .right { display: flex; align-items: center; @@ -919,6 +928,7 @@ function reloadList() { color: #507AFD; border: 1px solid #507AFD; } + .tag-submiting { color: #FFB800; border: 1px solid #FFB800; @@ -1034,11 +1044,13 @@ function reloadList() { color: #fff; font-size: 14px; } + .percent-unit { font-size: 8px; margin-top: 4px; } - .percent-red{ + + .percent-red { background: #ff4e4f; }