From 1ffab67986efa3cde5fb007fd80aad4c2e39f048 Mon Sep 17 00:00:00 2001 From: lzh Date: Fri, 13 Mar 2026 11:20:15 +0800 Subject: [PATCH] =?UTF-8?q?style(@vben/web-antd):=20lint=20=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- .../components/cleaning-actions.vue | 4 +- .../components/cleaning-detail-ext.vue | 38 +++++++++---------- .../ops/cleaning/work-order/detail/index.vue | 26 +++++++------ .../ops/work-order/modules/stats-bar.vue | 16 ++++++-- 4 files changed, 44 insertions(+), 40 deletions(-) diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-actions.vue b/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-actions.vue index 331166bf1..c95d33254 100644 --- a/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-actions.vue +++ b/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-actions.vue @@ -3,13 +3,11 @@ import type { OpsOrderCenterApi } from '#/api/ops/order-center'; import { IconifyIcon } from '@vben/icons'; -import { Button } from 'ant-design-vue'; +import { Button, message } from 'ant-design-vue'; import { sendDeviceMessage } from '#/api/iot/device/device'; import { manualCompleteOrder } from '#/api/ops/cleaning'; -import { message } from 'ant-design-vue'; - defineOptions({ name: 'CleaningActions' }); const props = defineProps<{ diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-detail-ext.vue b/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-detail-ext.vue index 3c51ceb8e..77856c66d 100644 --- a/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-detail-ext.vue +++ b/apps/web-antd/src/views/ops/cleaning/work-order/components/cleaning-detail-ext.vue @@ -85,16 +85,21 @@ function getBatteryColor(level: null | number) { function getBadgeStatusText(status: string) { const s = status?.toUpperCase(); switch (s) { - case 'BUSY': + case 'BUSY': { return '作业中'; - case 'IDLE': + } + case 'IDLE': { return '空闲'; - case 'OFFLINE': + } + case 'OFFLINE': { return '离线'; - case 'PAUSED': + } + case 'PAUSED': { return '暂停'; - default: + } + default: { return status || '未知'; + } } } @@ -141,10 +146,7 @@ function formatRelativeTime(time: string) { > @@ -209,9 +211,7 @@ function formatRelativeTime(time: string) {
预计时长
-
- {{ extInfo.expectedDuration }} 分钟 -
+
{{ extInfo.expectedDuration }} 分钟
@@ -230,10 +230,7 @@ function formatRelativeTime(time: string) {
已用时长
-
+
{{ workDuration }} 分钟 超时 @@ -250,10 +247,7 @@ function formatRelativeTime(time: string) {
剩余时间
-
+
{{ isOvertime ? `已超时 ${workDuration - (extInfo.expectedDuration || 0)} 分钟` @@ -301,7 +295,9 @@ function formatRelativeTime(time: string) {
diff --git a/apps/web-antd/src/views/ops/cleaning/work-order/detail/index.vue b/apps/web-antd/src/views/ops/cleaning/work-order/detail/index.vue index ff2fe17bf..a6ba37e72 100644 --- a/apps/web-antd/src/views/ops/cleaning/work-order/detail/index.vue +++ b/apps/web-antd/src/views/ops/cleaning/work-order/detail/index.vue @@ -751,7 +751,8 @@ onUnmounted(stopPolling); :class="{ 'node-completed': index < currentStepIndex, 'node-current': - index === currentStepIndex && !['CANCELLED', 'COMPLETED'].includes(order.status), + index === currentStepIndex && + !['CANCELLED', 'COMPLETED'].includes(order.status), 'node-completed-current': index === currentStepIndex && order.status === 'COMPLETED', 'node-pending': index > currentStepIndex, @@ -831,7 +832,9 @@ onUnmounted(stopPolling); > {{ log.title }} - {{ log.content }} + {{ + log.content + }} {{ formatRelativeTime(log.time) @@ -1815,8 +1818,7 @@ onUnmounted(stopPolling); .logs-simple-list { max-height: 280px; padding: 4px 4px 0; - overflow-x: hidden; - overflow-y: auto; + overflow: hidden auto; } .log-simple-item { @@ -1824,8 +1826,8 @@ onUnmounted(stopPolling); display: flex; gap: 12px; padding: 8px 10px; - border-radius: 6px; cursor: default; + border-radius: 6px; transition: background-color 0.15s; &:hover { @@ -1840,12 +1842,12 @@ onUnmounted(stopPolling); .log-simple-left { position: relative; display: flex; + flex-shrink: 0; flex-direction: column; align-items: center; - flex-shrink: 0; width: 12px; - margin: -8px 0; padding: 8px 0; + margin: -8px 0; } .log-simple-dot { @@ -1880,9 +1882,9 @@ onUnmounted(stopPolling); .log-simple-header { display: flex; + gap: 12px; align-items: center; justify-content: space-between; - gap: 12px; line-height: 20px; } @@ -1894,23 +1896,23 @@ onUnmounted(stopPolling); } .log-simple-title { + flex-shrink: 0; font-size: 13px; font-weight: 500; - flex-shrink: 0; } .log-simple-msg { - font-size: 12px; - color: #8c8c8c; overflow: hidden; text-overflow: ellipsis; + font-size: 12px; + color: #8c8c8c; white-space: nowrap; } .log-simple-time { + flex-shrink: 0; font-size: 12px; color: #bfbfbf; - flex-shrink: 0; } .logs-empty { diff --git a/apps/web-antd/src/views/ops/work-order/modules/stats-bar.vue b/apps/web-antd/src/views/ops/work-order/modules/stats-bar.vue index d93399478..ee8580ca2 100644 --- a/apps/web-antd/src/views/ops/work-order/modules/stats-bar.vue +++ b/apps/web-antd/src/views/ops/work-order/modules/stats-bar.vue @@ -153,7 +153,9 @@ defineExpose({ refresh: loadStats });
@@ -175,7 +177,9 @@ defineExpose({ refresh: loadStats });
@@ -197,7 +201,9 @@ defineExpose({ refresh: loadStats });
@@ -217,7 +223,9 @@ defineExpose({ refresh: loadStats });