chunk-0427c002.undefined.1671071058477.js 5.4 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0427c002"],{"1cf3":function(t,e,a){"use strict";a.r(e);var i=a("2df3"),s=a("4e07");Object(i["a"])(s["a"])},"360a":function(t,e,a){"use strict";a.r(e);var i=a("2df3"),s=a("0905");Object(i["a"])(s["a"])},3920:function(t,e,a){"use strict";a("e8eb")},d81f:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"pages"},[i("div",{staticClass:"headerInfo"},[i("img",{staticClass:"headBack",attrs:{src:a("aed9"),width:"100%"}}),i("div",{staticClass:"backView"},[i("span",{staticClass:"Back",on:{click:function(e){return t.back()}}},[t._v("返回")]),i("span",{staticClass:"Record",on:{click:function(e){return t.toRecord()}}},[t._v("训练记录")])]),i("div",{staticClass:"userInfo"},["男"==t.user.Sex?i("img",{staticClass:"round_icon",style:{border:"solid 2px #AACC03"},attrs:{src:""!=t.user.Head?t.user.Head:t.headImgUrl}}):t._e(),"女"==t.user.Sex?i("img",{staticClass:"round_icon",style:{border:"solid 2px #E75296"},attrs:{src:""!=t.user.Head?t.user.Head:t.headImgUrl}}):t._e(),i("span",[t._v(t._s(t.user.Name))])])]),t._m(0),i("div",{staticClass:"tabs"},t._l(t.weeks,(function(e,a){return i("div",{staticClass:"dayInfo",on:{click:function(i){return t.changeActive(e.disable,a)}}},[i("div",{class:[{disableTab:e.disable}]},[i("div",{class:[{tab:!0},{activeTab:a==t.active}]},[t._v(" 周"+t._s(e.name.substring(2,3))+" ")]),i("div",{staticClass:"dayDate"},[i("span",[t._v(t._s(e.dayDate))]),i("br"),t._v(" "+t._s(e.monthDate)+"月 ")])])])})),0),t._m(1),null==t.trainingMotionList?i("div",{staticClass:"recordEmpty"},[t._v(" 当天暂无训练计划 ")]):t._e(),t._l(t.trainingMotionList,(function(e){return i("div",{staticClass:"trainingDetail"},[i("ul",[i("li",[i("div",[t._v(t._s(e.VTitle))]),i("div",[t._v(t._s(e.TrName))])])])])})),i("bottomTab",{attrs:{curTab:t.thisTab}})],2)},s=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"title"},[a("em",[t._v("日常训练")])])},function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"topTitle"},[a("span",[t._v("名称")]),a("span",[t._v("训练要求")])])}],n=(a("2bd2"),a("07c0"),a("a717"),a("d7f0"),a("82ae"),a("a8da")),r=a("b8a1"),o=(a("379d"),a("fed1"));a("0e88");a("37d4"),a("fc1c"),a("61e2"),a("6232"),a("360a"),a("1cf3"),a("fa51");var c={data:function(){return{active:0,weeks:[],today:"",viewType:"",dtoId:"",userMd5:"",thisTab:"日常训练",screenWidth:document.body.clientWidth+"px",headImgUrl:a("c18d"),trainingMotionList:[],classFinish:0,classTotal:0,user:{Name:"",Age:"",Height:"",Weight:"",StaticHr:"",Phone:"",Sex:"",Head:""}}},watch:{$route:function(t){if("dailyTrainingDetail"==t.name){var e=this;e.active=0,e.dtoId=this.$route.query.dtoId,e.viewType=e.$route.query.viewType,e.getUserInfo(),e.getFurtherDays(7)}}},mounted:function(){var t=this;t.active=0,t.dtoId=this.$route.query.dtoId,t.viewType=t.$route.query.viewType,t.getUserInfo(),t.getFurtherDays(7)},methods:{back:function(){1==this.viewType?this.$router.push({path:"/report"}):this.$router.push({path:"/dailyTrainingList"})},toRecord:function(){this.$router.push({path:"/dailyTrainingList"})},changeActive:function(t,e){t||(this.active=e,console.log(this.weeks[e].orderDate),this.getTrainingDetail())},getUserInfo:function(){var t=this,e={token:localStorage.token},a=o.stringify(e);Object(r["T"])(a).then((function(e){var a=e;0==a.Code?(t.user=a.Rs,t.userMd5=a.Rs.UserMd5):t.$toast.message(a.Memo)}))},getFurtherDays:function(t){var e=new Date(this.$route.query.beginDate),a=e.getTime(),i=864e5,s="",n=[],r=0,o=0,c=!1;this.weeks=[];for(var u=0;u<7;u++)s=new Date(a+u*i),r=s.getMonth()+1,o=s.getDate(),r=r<10?"0"+r:r,o=o<10?"0"+o:o,u>=t&&(c=!0),n={name:this.numberToWeek(s.getDay()),data:s.getMonth()+1+"月"+s.getDate()+"日",orderDate:s.getFullYear()+"-"+r+"-"+o,day:this.numberToWeek(s.getDay()),monthDate:s.getMonth()+1,dayDate:s.getDate(),disable:c},this.weeks.push(n);this.today=this.weeks[0].name,this.getTrainingDetail()},numberToWeek:function(t){switch(parseInt(t)){case 1:return"星期一";case 2:return"星期二";case 3:return"星期三";case 4:return"星期四";case 5:return"星期五";case 6:return"星期六";case 0:return"星期天"}},getTrainingDetail:function(){var t=this,e={token:localStorage.token,dtoId:t.dtoId,inComingDay:this.weeks[this.active].orderDate},a=o.stringify(e);Object(r["p"])(a).then((function(e){var a=e;0==a.Code?t.trainingMotionList=a.Rs:t.trainingMotionList=[]}))}},filters:{hidePhone:function(t){var e=String(t),a=e.length;if(a>=7){var i=e.slice(-8,-4);return e.replace(i,"****")}if(a<7&&a>=6){var s=e.slice(-4,-2);return e.replace(s,"**")}},filterTime:function(t){return t?dateFormatWithoutZone(t,16):0},fmtTime:function(t){if(t){t*=1e3;var e=new Date(t),a=e.getFullYear(),i=e.getMonth()+1;i=i<10?"0"+i:i;var s=e.getDate();s=s<10?"0"+s:s;var n=e.getHours();n=n<10?"0"+n:n;var r=e.getMinutes();r=r<10?"0"+r:r;var o=e.getSeconds();return o=o<10?"0"+o:o,a+"-"+i+"-"+s}return 0}},beforeRouteEnter:function(t,e,a){a((function(e){"reportLessonDetail"==t.name&&e.getUserInfo()}))},components:{bottomTab:n["a"]}},u=c,d=(a("3920"),a("cba8")),l=Object(d["a"])(u,i,s,!1,null,"2765368d",null);e["default"]=l.exports},e8eb:function(t,e,a){},fa51:function(t,e,a){"use strict";a.r(e);var i=a("2df3"),s=a("d902");Object(i["a"])(s["a"])},fc1c:function(t,e,a){"use strict";a.r(e);var i=a("2df3"),s=a("419c");Object(i["a"])(s["a"])}}]);
  2. //# sourceMappingURL=chunk-0427c002.undefined.1671071058477.js.map