Jelajahi Sumber

洗车调试

skyline 7 jam lalu
induk
melakukan
97bf915fd6

+ 12 - 10
admin-mp/src/pages/device/list.vue

@@ -36,10 +36,7 @@
       >
         <view class="device-header">
           <view class="device-info">
-            <text class="device-name">
-              {{ device.name }}
-              <text v-if="device.hasPa" class="pa-badge-list">PA</text>
-            </text>
+            <text class="device-name">{{ device.name }}</text>
             <view class="device-meta">
               <text class="device-id">ID: {{ device.shortId }}</text>
               <view class="device-status" :style="getDeviceStatusStyle(getDeviceStatusValue(device))">
@@ -445,24 +442,29 @@ const getStatusValue = (filterIndex) => {
   min-width: 0;
 }
 
-.device-name {
+.device-name-wrap {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10rpx;
+}
+
+.device-name-text {
   font-size: 30rpx;
   font-weight: 600;
   color: #1A1A1A;
-  display: block;
-  margin-bottom: 10rpx;
+  flex-shrink: 0;
 }
 
 .pa-badge-list {
-  display: inline-block;
-  margin-left: 10rpx;
+  margin-left: 8rpx;
   padding: 2rpx 10rpx;
   background: #C6171E;
   color: #FFFFFF;
   border-radius: 6rpx;
   font-size: 20rpx;
   font-weight: 700;
-  vertical-align: middle;
+  line-height: 1.4;
+  flex-shrink: 0;
 }
 
 .device-meta {

+ 5 - 3
car-wash-mp/src/pages-wash/device/index.vue

@@ -7,7 +7,7 @@
         <view class="device-number">
           <uv-icon name="car" size="24" color="#C6171E"></uv-icon>
           <text class="number-text">洗车机 No.{{ state.device?.shortId }}</text>
-          <view v-if="state.device?.hasPa" class="pa-badge">PA</view>
+          <text v-if="state.device?.hasPa" class="pa-badge">PA</text>
         </view>
 
         <view class="device-status" :class="'status-' + (state.device?.state || 'idle')">
@@ -360,14 +360,16 @@ const handleGotoRechage = () => {
     }
 
     .pa-badge {
+      display: inline-block;
       margin-left: 12rpx;
-      padding: 2rpx 12rpx;
+      padding: 4rpx 12rpx;
       background: #C6171E;
       color: #FFFFFF;
       border-radius: 6rpx;
       font-size: 22rpx;
       font-weight: 700;
-      line-height: 1.4;
+      line-height: 1;
+      vertical-align: middle;
     }
   }
 

+ 12 - 0
car-wash-mp/src/pages-wash/station/index.vue

@@ -54,6 +54,7 @@
             <view class="device-header">
               <view class="device-name">
                 <text>{{ device.seqName }}</text>
+                <text v-if="device.hasPa" class="pa-badge">PA</text>
               </view>
               <view class="device-status" :class="'status-' + getDeviceStatusClass(device.state)">
                 {{ fmtDictName('WashDevice.state', device.state) }}
@@ -306,6 +307,17 @@ const getDeviceStatusClass = (stateVal: string) => {
         font-size: 28rpx;
         font-weight: $uni-font-weight-semibold;
         color: $uni-text-color-dark;
+
+        .pa-badge {
+          display: inline-block;
+          padding: 2rpx 10rpx;
+          background: #C6171E;
+          color: #FFFFFF;
+          border-radius: 6rpx;
+          font-size: 20rpx;
+          font-weight: 700;
+          line-height: 1.4;
+        }
       }
 
       .device-status {

+ 1 - 1
car-wash-mp/src/utils/https.ts

@@ -136,7 +136,7 @@ const request = (options: any) => {
         }).catch(error => {
             uni.hideLoading();
             uni.showToast({
-                title: error,
+                title: '网络异常,请稍后重试',
                 icon: 'none'
             });
             console.error("error=>", error);