index.7c945d2b.js 4.0 KB

1
  1. import{t as T,v as w,z as g,d as v,y as S,U as k,c as t,D as C,r as D,$ as F,k as I,q as i,a5 as b,b3 as u,ah as y,ai as B,F as N,m}from"./index.ffe80dbe.js";import{s}from"./index.module.cb12d10a.js";import{O as E}from"./index.4ddd16f0.js";import{O as x}from"./index.a0ef77e4.js";import{C as P}from"./index.ea031708.js";import{G as Y,a as f}from"./index.72ca63b9.js";import"./index.1d5c6f70.js";const[R,p]=T("progress"),A={color:String,inactive:Boolean,pivotText:String,textColor:String,showPivot:w,pivotColor:String,trackColor:String,strokeWidth:g,percentage:{type:g,default:0,validator:r=>r>=0&&r<=100}};var M=v({name:R,props:A,setup(r){const e=S(()=>r.inactive?void 0:r.color),d=()=>{const{textColor:n,pivotText:l,pivotColor:a,percentage:o}=r,c=l!=null?l:`${o}%`;if(r.showPivot&&c){const h={color:n,left:`${+o}%`,transform:`translate(-${+o}%,-50%)`,background:a||e.value};return t("span",{style:h,class:p("pivot",{inactive:r.inactive})},[c])}};return()=>{const{trackColor:n,percentage:l,strokeWidth:a}=r,o={background:n,height:k(a)},c={width:`${l}%`,background:e.value};return t("div",{class:p(),style:o},[t("span",{class:p("portion",{inactive:r.inactive}),style:c},null),d()])}}});const O=C(M);var V=v({name:"practice-rewards",setup(){const r=localStorage.getItem("practice-rewards-see-type"),e=D({seeType:r||"hide",list:[],listState:{dataShow:!0,loading:!1,finished:!1},statistics:{totalTrainingSalary:0,waitSalary:0}}),d=S(()=>{const a=e.statistics;return a.totalTrainingSalary?a.waitSalary/a.totalTrainingSalary*100:0}),n=async()=>{try{const{data:a}=await m.post("/api-school/schoolWeekSalaryRecord/trainingStatistics");console.log(a),e.statistics={totalTrainingSalary:a.totalTrainingSalary||0,waitSalary:a.waitSalary||0}}catch{}},l=async()=>{try{const a=await m.post("/api-school/schoolWeekSalaryRecord/trainingList",{data:{}}),o=a.data||[];if(e.list.length>0&&o.current===1)return;e.list=a.data||[],e.listState.dataShow=e.list.length>0}catch{e.listState.dataShow=!1}};return F(()=>{n(),l()}),()=>t(N,null,[t(E,{position:"top",style:{background:"#fff"}},{default:()=>[t(x,{border:!1},{right:()=>t("span",{class:s.btn,onClick:()=>{I({api:"open_app_page",content:{action:"app",pageTag:"settlementRecord",url:"",params:JSON.stringify({type:"TRAINING"})}})}},[i("\u7ED3\u7B97\u8BB0\u5F55")])}),t("div",{class:s.headerContainer},[t("div",{class:s.headerContent},[t(b,{class:s.iconEye,name:e.seeType==="see"?"eye-o":"closed-eye",onClick:()=>{e.seeType==="see"?(localStorage.setItem("practice-rewards-see-type","hide"),e.seeType="hide"):(localStorage.setItem("practice-rewards-see-type","see"),e.seeType="see")}},null),t("div",{class:s.priceTitle},[i("\u5F85\u7ED3\u7B97\u91D1\u989D (\u5143)")]),t("div",{class:s.priceCount},[e.seeType==="see"?u(e.statistics.waitSalary):"****"]),t(O,{color:"#fff",trackColor:"#E7441A",showPivot:!1,percentage:d.value,strokeWidth:8},null),t("div",{class:s.countRewards},[i("\u7D2F\u8BA1\u5956\u52B1 (\u5143) \uFF1A"),t("span",null,[e.seeType==="see"?u(e.statistics.totalTrainingSalary):"****"])])])])]}),e.listState.dataShow?e.list.map(a=>t("div",{class:s.gridGroup},[t(P,{center:!0,isLink:!0,to:"/practice-rewards-detail?id="+a.id},{title:()=>t("div",{class:s.itemTitle},[t("span",{style:{fontFamily:"DINA"}},[y(a.startTime).format("YYYY-MM-DD"),i(" \u81F3")," ",y(a.endTime).format("YYYY-MM-DD")]),t("span",{class:[s.status,!a.settleFlag&&s.red]},[a.settleFlag?"\u5DF2\u7ED3\u7B97":"\u5F85\u7ED3\u7B97"])])}),t(Y,{class:s.grid,columnNum:2,border:!1},{default:()=>[t(f,{class:s.gridBorderRight},{default:()=>[t("div",{class:[s.gridItem]},[t("div",{class:s.gridItemTop},[t("span",{class:s.topNum,style:{color:"#333"}},[a.targetNum||0])]),t("div",null,[i("\u7EC3\u4E60\u8FBE\u6807\u4EBA\u6570")])])]}),t(f,null,{default:()=>[t("div",{class:s.gridItem},[t("div",{class:s.gridItemTop},[t("span",{class:s.topNum,style:{color:"#333"}},[u(a.totalSalary||0)]),i("\u5143")]),t("div",null,[i("\u5956\u52B1\u91D1\u989D")])])]})]})])):t(B,{btnStatus:!1,tips:"\u6682\u65E0\u7EC3\u4E60\u5956\u52B1\u8BB0\u5F55"},null)])}});export{V as default};