commit
build / build (push) Successful in 9m55s

This commit is contained in:
wanghu
2026-10-10 15:58:02 +08:00
parent 6faa332d2b
commit 2e36d7a9c8
1842 changed files with 70537 additions and 0 deletions
@@ -0,0 +1 @@
import{l as F,j as l,p as M,a as b,f as s,g as m,t as x,q as I,e as i,w as O,d as W,D as P,v as j,s as Q,k as Y,r as u,m as G,o as V,F as J,b as K,U as X,_ as Z}from"./index-CdacCJcP.js";import{t as f}from"./leaveTime-ZdUoa0wT.js";const ee={class:"page-wrapper"},te={class:"main-container"},ae={class:"sum-bar"},ne={class:"add"},le={class:"ml-24"},se={class:"remain"},oe={class:"search-wrap fix"},ie={key:0,class:"search-wrap_date fl ml-12"},re={class:"page-panel"},ue=F({__name:"TimeLog",setup(de){const U=G(),z=[{k:0,v:"今日"},{k:1,v:"本周"},{k:2,v:"本月"},{k:3,v:"累计"}],o=l(3),w=l(""),y=l(""),h=l(""),H=l([]),r=l(1),_=l(parseInt(localStorage.getItem("customPageCount")||"10")),S=l([]),C=l(0),T=l(!1),k=l({});async function d(){T.value=!0;try{const t={rqType:o.value,keyword:w.value||void 0,startTime:o.value===3&&y.value||void 0,endTime:o.value===3&&h.value||void 0,pageIndex:r.value,pageSize:_.value},[e,a]=await Promise.all([P.records(t).send(),P.sum({rqType:o.value,startTime:t.startTime,endTime:t.endTime}).send()]);S.value=(e==null?void 0:e.content)||[],C.value=(e==null?void 0:e.total)||0,k.value=a||{}}catch(t){j.Message.error(t.message||"获取时长日志失败")}finally{T.value=!1}}async function N(){try{H.value=await Q.leaveTypes().send()||[]}catch{}}function q(){r.value=1,d()}function v(){r.value=1,d()}function D(t){r.value=t,d()}function $(t){r.value=1,_.value=t,localStorage.setItem("customPageCount",String(t)),d()}function L(t){t.leaveId&&U.push({path:"/detail",query:{leaveId:t.leaveId}})}const B=[{title:"序号",type:"index",width:70,align:"center"},{title:"姓名",key:"userName",width:110,align:"center"},{title:"请假类型",width:110,align:"center",render:(t,e)=>t("span",{},e.row.leaveTypeName||(e.row.leaveType?e.row.leaveType:"手动调整"))},{title:"时长(小时)",width:130,align:"center",render:(t,e)=>{const a=e.row,c=a.editHours||0,p=c>=0?"#19be6b":"#ed4014",g=`${c>=0?"+":""}${f(c)}`;return a.leaveId?t("a",{style:`color:${p};font-weight:600;`,onClick:()=>L(a)},g):t("span",{style:`color:${p};font-weight:600;`},g)}},{title:"变更后剩余",width:120,align:"center",render:(t,e)=>t("span",{},f(e.row.newHours))},{title:"备注",key:"describeText",minWidth:160,align:"left",render:(t,e)=>t("span",{},e.row.describeText||"-")},{title:"关联请假时间",minWidth:200,align:"left",render:(t,e)=>{const a=e.row;return a.startTime?t("span",{},`${String(a.startTime).slice(0,16)} ~ ${String(a.endTime).slice(0,16)}`):t("span",{style:"color:#c5c8ce;"},"-")}},{title:"发生时间",key:"occurTime",width:160,align:"center"}],E=Y(()=>X.useTableHeight({isSearch:!0,isOperat:!1,isPage:!0}));return M(()=>{N(),d()}),(t,e)=>{const a=u("Option"),c=u("Select"),p=u("DatePicker"),g=u("Input"),R=u("Table"),A=u("Page");return V(),b("div",ee,[s("div",te,[s("div",ae,[s("span",null,[e[4]||(e[4]=m("共计新加时长 ",-1)),s("b",ne,x(I(f)(k.value.addHours)),1),e[5]||(e[5]=m(" 小时",-1))]),s("span",le,[e[6]||(e[6]=m("共计剩余时长 ",-1)),s("b",se,x(I(f)(k.value.remainHours)),1),e[7]||(e[7]=m(" 小时",-1))])]),s("div",oe,[i(c,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=n=>o.value=n),class:"search-wrap_sel fl",style:{width:"120px"},onOnChange:q},{default:O(()=>[(V(),b(J,null,K(z,n=>i(a,{key:n.k,value:n.k},{default:O(()=>[m(x(n.v),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"]),o.value===3?(V(),b("div",ie,[i(p,{type:"date",placeholder:"开始日期",modelValue:y.value,"onUpdate:modelValue":e[1]||(e[1]=n=>y.value=n),onOnChange:v},null,8,["modelValue"]),e[8]||(e[8]=s("span",{class:"ml-8 mr-8"},"至",-1)),i(p,{type:"date",placeholder:"结束日期",modelValue:h.value,"onUpdate:modelValue":e[2]||(e[2]=n=>h.value=n),onOnChange:v},null,8,["modelValue"])])):W("",!0),i(g,{class:"fr",style:{width:"220px"},search:"",suffix:"ios-search",placeholder:"搜索姓名 / 备注",modelValue:w.value,"onUpdate:modelValue":e[3]||(e[3]=n=>w.value=n),onOnSearch:v,onOnClear:v},null,8,["modelValue"])]),i(R,{columns:B,data:S.value,class:"link-table table-bottom-box",height:E.value,loading:T.value,"no-data-text":"暂无时长流水"},null,8,["data","height","loading"]),s("div",re,[e[9]||(e[9]=s("div",{class:"fl ml-15 align-middle"},null,-1)),i(A,{class:"page-box fr",total:C.value,current:r.value,"page-size":_.value,"page-size-opts":[10,20,30,40],onOnPageSizeChange:$,onOnChange:D,placement:"top","show-total":"","show-sizer":""},null,8,["total","current","page-size"])])])])}}}),me=Z(ue,[["__scopeId","data-v-1cbd6526"]]);export{me as default};