style(@vben/web-antd): lint 自动格式化修正
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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<{
|
||||
|
||||
@@ -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) {
|
||||
>
|
||||
<template #title>
|
||||
<div class="flex items-center gap-2">
|
||||
<IconifyIcon
|
||||
icon="solar:chart-2-bold-duotone"
|
||||
class="text-blue-500"
|
||||
/>
|
||||
<IconifyIcon icon="solar:chart-2-bold-duotone" class="text-blue-500" />
|
||||
<span>作业进度</span>
|
||||
</div>
|
||||
</template>
|
||||
@@ -209,9 +211,7 @@ function formatRelativeTime(time: string) {
|
||||
</div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-label">预计时长</div>
|
||||
<div class="stat-value">
|
||||
{{ extInfo.expectedDuration }} 分钟
|
||||
</div>
|
||||
<div class="stat-value">{{ extInfo.expectedDuration }} 分钟</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
@@ -230,10 +230,7 @@ function formatRelativeTime(time: string) {
|
||||
</div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-label">已用时长</div>
|
||||
<div
|
||||
class="stat-value"
|
||||
:class="{ 'text-red-500': isOvertime }"
|
||||
>
|
||||
<div class="stat-value" :class="{ 'text-red-500': isOvertime }">
|
||||
{{ workDuration }} 分钟
|
||||
<Tag v-if="isOvertime" color="error" size="small" class="ml-1">
|
||||
超时
|
||||
@@ -250,10 +247,7 @@ function formatRelativeTime(time: string) {
|
||||
</div>
|
||||
<div class="stat-content">
|
||||
<div class="stat-label">剩余时间</div>
|
||||
<div
|
||||
class="stat-value"
|
||||
:class="{ 'text-red-500': isOvertime }"
|
||||
>
|
||||
<div class="stat-value" :class="{ 'text-red-500': isOvertime }">
|
||||
{{
|
||||
isOvertime
|
||||
? `已超时 ${workDuration - (extInfo.expectedDuration || 0)} 分钟`
|
||||
@@ -301,7 +295,9 @@ function formatRelativeTime(time: string) {
|
||||
<div class="badge-stat-icon">
|
||||
<IconifyIcon
|
||||
icon="solar:map-point-wave-bold-duotone"
|
||||
:class="badgeStatus.isInArea ? 'text-green-500' : 'text-orange-500'"
|
||||
:class="
|
||||
badgeStatus.isInArea ? 'text-green-500' : 'text-orange-500'
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="badge-stat-content">
|
||||
|
||||
@@ -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 }}
|
||||
</span>
|
||||
<span v-if="log.content" class="log-simple-msg">{{ log.content }}</span>
|
||||
<span v-if="log.content" class="log-simple-msg">{{
|
||||
log.content
|
||||
}}</span>
|
||||
</span>
|
||||
<span class="log-simple-time">{{
|
||||
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 {
|
||||
|
||||
@@ -153,7 +153,9 @@ defineExpose({ refresh: loadStats });
|
||||
<div class="stats-content">
|
||||
<div
|
||||
class="stats-icon"
|
||||
style="--icon-color: #ff4d4f; --icon-bg: #fff1f0"
|
||||
style="
|
||||
|
||||
--icon-color: #ff4d4f; --icon-bg: #fff1f0"
|
||||
>
|
||||
<IconifyIcon icon="solar:clock-circle-bold-duotone" />
|
||||
</div>
|
||||
@@ -175,7 +177,9 @@ defineExpose({ refresh: loadStats });
|
||||
<div class="stats-content">
|
||||
<div
|
||||
class="stats-icon"
|
||||
style="--icon-color: #1677ff; --icon-bg: #e6f4ff"
|
||||
style="
|
||||
|
||||
--icon-color: #1677ff; --icon-bg: #e6f4ff"
|
||||
>
|
||||
<IconifyIcon icon="solar:play-circle-bold-duotone" />
|
||||
</div>
|
||||
@@ -197,7 +201,9 @@ defineExpose({ refresh: loadStats });
|
||||
<div class="stats-content">
|
||||
<div
|
||||
class="stats-icon"
|
||||
style="--icon-color: #52c41a; --icon-bg: #f6ffed"
|
||||
style="
|
||||
|
||||
--icon-color: #52c41a; --icon-bg: #f6ffed"
|
||||
>
|
||||
<IconifyIcon icon="solar:check-circle-bold-duotone" />
|
||||
</div>
|
||||
@@ -217,7 +223,9 @@ defineExpose({ refresh: loadStats });
|
||||
<div class="stats-content">
|
||||
<div
|
||||
class="stats-icon"
|
||||
style="--icon-color: #722ed1; --icon-bg: #f9f0ff"
|
||||
style="
|
||||
|
||||
--icon-color: #722ed1; --icon-bg: #f9f0ff"
|
||||
>
|
||||
<IconifyIcon
|
||||
icon="solar:users-group-two-rounded-bold-duotone"
|
||||
|
||||
Reference in New Issue
Block a user