import{ad as n,V as s,bk as u}from"./index-9PRMimni.js";import{r as c}from"./dictUtils-D8jA3mBt.js";function m(t){return n.Get("/maintenance-counter/page",{params:t})}function p(t){return n.Get("/maintenance-counter/readingHistoryPage",{params:t})}function y(t){return n.Post("/maintenance-counter/reset",t)}function g(t){return n.Post("/maintenance-counter/reading",t)}function h(t){return n.Get("/maintenance-counter/subPage",{params:t})}function w(t){return n.Post("/maintenance-counter/syncReading",t)}function b(t){return n.Get("/maintenance-counter/expiredCount",{params:t})}const a=[{label:"读数",labelEn:"Reading",value:0},{label:"重置",labelEn:"Reset",value:1},{label:"吊缸",labelEn:"Overhaul",value:2},{label:"换新",labelEn:"Renewal",value:3},{label:"维保读数",labelEn:"PMS",value:4}],i=u(),{t:e}=s(),f=()=>({historyColumns:[{title:e("common.messagedefine.Num"),key:"num",width:60,render:(o,r)=>r+1},{title:e("counter.counterReading"),key:"counterReading",width:140},{title:e("counter.additional"),key:"additional",width:140},{title:e("counter.readingDate"),key:"readingDate",width:140},{title:e("counter.recordBy"),key:"recordBy",width:140},{title:e("counter.type"),key:"countType",width:140,render:o=>c(a,o.countType)}]}),R=()=>({historySchemas:[{field:"countType",component:"NSelect",label:e("counter.type"),componentProps:{options:a,"label-field":i.getLocale==="en"?"labelEn":"label"}}]}),k=()=>({schemas:[{field:"newReading",component:"NInputNumber",label:e("counter.newRead"),componentProps:{placeholder:e("counter.newReadPlaceholder"),min:0,precision:2,keyboard:{ArrowUp:!1,ArrowDown:!1},showButton:!1},rules:[{required:!0,type:"number",message:e("common.inputText")+i.getLocale==="en"?" ":""+e("counter.newRead"),trigger:"blur"}]}]});function C(){return{resetHistoryColumns:[{title:e("common.messagedefine.Num"),key:"num",width:60,render:(o,r)=>r+1},{title:e("counter.counteReadingBeforReset"),key:"counterReading",width:160},{title:e("counter.resetDate"),key:"resetDate",width:140},{title:e("counter.recordBy"),key:"recordBy",width:140}]}}const S=()=>({subEquipmentColumns:[{title:e("common.messagedefine.Num"),key:"num",width:60,render:(o,r)=>r+1},{title:e("counter.equipmentCode"),key:"equipmentCode",width:140},{title:e("counter.equipmentName"),key:"equipmentName",width:140},{title:e("counter.presentReading"),key:"presentReading",width:140},{title:e("counter.previousReading"),key:"previousReading",width:140},{title:e("counter.rHrsLastOverhaul"),key:"previousOverhaulRHrs",width:190},{title:e("counter.additional"),key:"additional",width:100},{title:e("counter.readingDate"),key:"readingDate",width:120}]}),v=()=>({resetSchemas:[{field:"newReading",component:"NInputNumber",label:e("counter.presentReading"),componentProps:{min:0,precision:2,keyboard:{ArrowUp:!1,ArrowDown:!1},showButton:!1},rules:[{required:!0,type:"number",message:e("counter.presentReading"),trigger:"blur"}]}]});export{C as a,R as b,f as c,k as d,v as e,y as f,p as g,S as h,h as i,b as j,m as k,g as r,w as s};
