index-legacy.2314d56d.js 6.2 KB

1
  1. !function(){function t(t,e,r,n,a,i,o){try{var s=t[i](o),c=s.value}catch(l){return void r(l)}s.done?e(c):Promise.resolve(c).then(n,a)}function e(e){return function(){var r=this,n=arguments;return new Promise((function(a,i){var o=e.apply(r,n);function s(e){t(o,a,i,s,c,"next",e)}function c(e){t(o,a,i,s,c,"throw",e)}s(void 0)}))}}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,a,i=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);o=!0);}catch(c){s=!0,a=c}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy.48c8d62c.js","./index.module-legacy.c223b4c5.js","./index-legacy.8cf5f94f.js","./index-legacy.f3037807.js","./index-legacy.087e0425.js","./index-legacy.8429fc95.js","./index-legacy.ac553194.js"],(function(t){"use strict";var n,a,i,o,s,c,l,u,d,f,p,y,v,g,h,m,S,w,T,b,k,x,C,I;return{setters:[function(t){n=t.t,a=t.v,i=t.z,o=t.d,s=t.y,c=t.U,l=t.c,u=t.D,d=t.r,f=t.$,p=t.k,y=t.q,v=t.a5,g=t.b3,h=t.ah,m=t.ai,S=t.F,w=t.m},function(t){T=t.s},function(t){b=t.O},function(t){k=t.O},function(t){x=t.C},function(t){C=t.G,I=t.a},function(){}],execute:function(){var j=r(n("progress"),2),R=j[0],A=j[1],N={color:String,inactive:Boolean,pivotText:String,textColor:String,showPivot:a,pivotColor:String,trackColor:String,strokeWidth:i,percentage:{type:i,default:0,validator:function(t){return t>=0&&t<=100}}},Y=o({name:R,props:N,setup:function(t){var e=s((function(){return t.inactive?void 0:t.color})),r=function(){var r=t.textColor,n=t.pivotText,a=t.pivotColor,i=t.percentage,o=null!=n?n:"".concat(i,"%");if(t.showPivot&&o){var s={color:r,left:"".concat(+i,"%"),transform:"translate(-".concat(+i,"%,-50%)"),background:a||e.value};return l("span",{style:s,class:A("pivot",{inactive:t.inactive})},[o])}};return function(){var n=t.trackColor,a=t.percentage,i=t.strokeWidth,o={background:n,height:c(i)},s={width:"".concat(a,"%"),background:e.value};return l("div",{class:A(),style:o},[l("span",{class:A("portion",{inactive:t.inactive}),style:s},null),r()])}}}),D=u(Y);t("default",o({name:"practice-rewards",setup:function(){var t=localStorage.getItem("practice-rewards-see-type"),r=d({seeType:t||"hide",list:[],listState:{dataShow:!0,loading:!1,finished:!1},statistics:{totalTrainingSalary:0,waitSalary:0}}),n=s((function(){var t=r.statistics;return t.totalTrainingSalary?t.waitSalary/t.totalTrainingSalary*100:0})),a=function(){var t=e(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,w.post("/api-school/schoolWeekSalaryRecord/trainingStatistics");case 3:e=t.sent,n=e.data,console.log(n),r.statistics={totalTrainingSalary:n.totalTrainingSalary||0,waitSalary:n.waitSalary||0},t.next=11;break;case 9:t.prev=9,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),i=function(){var t=e(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,w.post("/api-school/schoolWeekSalaryRecord/trainingList",{data:{}});case 3:if(e=t.sent,n=e.data||[],!(r.list.length>0&&1===n.current)){t.next=7;break}return t.abrupt("return");case 7:r.list=e.data||[],r.listState.dataShow=r.list.length>0,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),r.listState.dataShow=!1;case 14:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(){return t.apply(this,arguments)}}();return f((function(){a(),i()})),function(){return l(S,null,[l(b,{position:"top",style:{background:"#fff"}},{default:function(){return[l(k,{border:!1},{right:function(){return l("span",{class:T.btn,onClick:function(){p({api:"open_app_page",content:{action:"app",pageTag:"settlementRecord",url:"",params:JSON.stringify({type:"TRAINING"})}})}},[y("结算记录")])}}),l("div",{class:T.headerContainer},[l("div",{class:T.headerContent},[l(v,{class:T.iconEye,name:"see"===r.seeType?"eye-o":"closed-eye",onClick:function(){"see"===r.seeType?(localStorage.setItem("practice-rewards-see-type","hide"),r.seeType="hide"):(localStorage.setItem("practice-rewards-see-type","see"),r.seeType="see")}},null),l("div",{class:T.priceTitle},[y("待结算金额 (元)")]),l("div",{class:T.priceCount},["see"===r.seeType?g(r.statistics.waitSalary):"****"]),l(D,{color:"#fff",trackColor:"#E7441A",showPivot:!1,percentage:n.value,strokeWidth:8},null),l("div",{class:T.countRewards},[y("累计奖励 (元) :"),l("span",null,["see"===r.seeType?g(r.statistics.totalTrainingSalary):"****"])])])])]}}),r.listState.dataShow?r.list.map((function(t){return l("div",{class:T.gridGroup},[l(x,{center:!0,isLink:!0,to:"/practice-rewards-detail?id="+t.id},{title:function(){return l("div",{class:T.itemTitle},[l("span",{style:{fontFamily:"DINA"}},[h(t.startTime).format("YYYY-MM-DD"),y(" 至")," ",h(t.endTime).format("YYYY-MM-DD")]),l("span",{class:[T.status,!t.settleFlag&&T.red]},[t.settleFlag?"已结算":"待结算"])])}}),l(C,{class:T.grid,columnNum:2,border:!1},{default:function(){return[l(I,{class:T.gridBorderRight},{default:function(){return[l("div",{class:[T.gridItem]},[l("div",{class:T.gridItemTop},[l("span",{class:T.topNum,style:{color:"#333"}},[t.targetNum||0])]),l("div",null,[y("练习达标人数")])])]}}),l(I,null,{default:function(){return[l("div",{class:T.gridItem},[l("div",{class:T.gridItemTop},[l("span",{class:T.topNum,style:{color:"#333"}},[g(t.totalSalary||0)]),y("元")]),l("div",null,[y("奖励金额")])])]}})]}})])})):l(m,{btnStatus:!1,tips:"暂无练习奖励记录"},null)])}}}))}}}))}();