Selaa lähdekoodia

fix: 设备远程控制面板硬编码标签改为字典查询,移除站点账户页死代码

- remote.vue: statusLabel和PA壶显示改用dict查询,与设备清单页保持一致
- station/account/index.vue: 移除无效的type列ext-d-label模板

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline 1 päivä sitten
vanhempi
säilyke
40576b1b7e

+ 0 - 3
admin-web/src/views/admin/station/account/index.vue

@@ -91,9 +91,6 @@
                 <el-button link type="primary" >{{ row.stationName }}</el-button>
               </div>
             </template>
-            <template v-else-if="field.prop==='type'">
-              <ext-d-label type="Object.type" :model-value="row[field.prop]"></ext-d-label>
-            </template>
             <template v-else-if="['availableBalance','withdrawnAmount','withdrawnFrozenAmount'].includes(field.prop)">
               {{ u.fmt.fmtMoney(row[field.prop]) }}
             </template>

+ 3 - 3
admin-web/src/views/admin/station/device/remote.vue

@@ -201,7 +201,7 @@
             </span>
             <span><span class="status-label">运行时长</span> <span class="status-value">{{ uptimeDisplay }}</span></span>
             <span><span class="status-label">温度</span> <span class="status-value">{{ temperatureDisplay }}</span></span>
-            <span><span class="status-label">PA壶</span> <span class="status-value" :style="{color: state.hasPa ? '#00ff88' : '#888'}">{{ state.hasPa ? '支持' : '不支持' }}</span></span>
+            <span><span class="status-label">PA壶</span> <span class="status-value" :style="{color: state.hasPa ? '#00ff88' : '#888'}">{{ u.fmt.fmtDict(state.hasPa ? '1' : '0', 'yes_no') }}</span></span>
           </div>
           <div>
             <el-button size="small" text type="primary" @click="refreshState" :loading="state.loading">
@@ -345,6 +345,7 @@
 import {reactive, computed, watch} from 'vue';
 import {Msg} from "/@/utils/message";
 import {$body} from "/@/utils/request";
+import u from '/@/utils/u';
 import {ElMessage} from 'element-plus';
 import {Refresh, Reading, ChatDotSquare, CloseBold, SwitchButton, Loading} from '@element-plus/icons-vue';
 
@@ -402,8 +403,7 @@ const statusClass = computed(() => {
 });
 
 const statusLabel = computed(() => {
-  const map: Record<string, string> = {busy: '忙碌', idle: '空闲', init: '初始化', fault: '故障', maintenance: '维护', sleep: '休眠'};
-  return map[state.deviceState] || state.deviceState || '未知';
+  return u.fmt.fmtDict(state.deviceState, 'WashDevice.status') || state.deviceState || '未知';
 });
 
 const uptimeDisplay = computed(() => {