Files
aiot-platform-ui/apps/web-antd/dist/js/data-DcmDNjV_.js
lzh b651e9ae25
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 8s
chore: build and deploy web-antd
2026-04-07 13:03:22 +08:00

2 lines
1.7 KiB
JavaScript

const u={SIGNAL_LOSS:"信号丢失",AREA_SWITCH:"区域切换",DEVICE_OFFLINE:"设备离线"},b={SIGNAL_LOSS:{bg:"#FFF7E6",text:"#D46B08"},AREA_SWITCH:{bg:"#E6F4FF",text:"#1677FF"},DEVICE_OFFLINE:{bg:"#FFF1F0",text:"#CF1322"}},F={BUSY:{color:"#52c41a",label:"作业中"},IDLE:{color:"#1677ff",label:"空闲"},OFFLINE:{color:"#bfbfbf",label:"离线"},PAUSED:{color:"#fa8c16",label:"暂停"}};function s(o){return o==null?{label:"无信号",icon:"solar:wifi-router-minimalistic-bold-duotone",color:"#bfbfbf"}:o>=-60?{label:"强",icon:"solar:wifi-router-minimalistic-bold-duotone",color:"#52c41a"}:o>=-75?{label:"良",icon:"solar:wifi-router-minimalistic-bold-duotone",color:"#1677ff"}:o>=-85?{label:"弱",icon:"solar:wifi-router-minimalistic-bold-duotone",color:"#faad14"}:{label:"极弱",icon:"solar:wifi-router-minimalistic-bold-duotone",color:"#ff4d4f"}}function E(o){return o==null?{icon:"solar:battery-charge-minimalistic-bold-duotone",color:"#bfbfbf"}:o>=60?{icon:"solar:battery-full-minimalistic-bold-duotone",color:"#52c41a"}:o>=20?{icon:"solar:battery-low-minimalistic-bold-duotone",color:"#faad14"}:{icon:"solar:battery-low-minimalistic-bold-duotone",color:"#ff4d4f"}}const e=["#1677FF","#F5222D","#52C41A","#FA8C16","#722ED1","#13C2C2","#EB2F96","#A0D911","#2F54EB","#FA541C","#1890FF","#FAAD14"],f=new Map;function d(o){var a,c;const r=f.get(o);if(r)return r;let t=0;for(let l=0;l<o.length;l++)t=Math.trunc(t*31+((a=o.codePointAt(l))!=null?a:0));const i=Math.abs(t)%e.length,n=(c=e[i])!=null?c:"#1677FF";return f.set(o,n),n}function A(o){if(o==null||o<=0)return"-";const r=Math.floor(o/3600),t=Math.floor(o%3600/60),i=o%60;return r>0?`${r}h ${t}m`:t>0?`${t}m ${i}s`:`${i}s`}export{F as B,b as L,u as a,d as b,E as c,A as f,s as g};