trainDetail.97b59c4b.js 6.6 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["trainDetail"],{2090:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"trainDetail"},[a("van-sticky",[t.headerStatus?a("m-header",{attrs:{isFixed:!1}}):t._e(),a("van-row",{staticClass:"dataSearch",attrs:{type:"flex"}},[a("van-col",{attrs:{span:"9",offset:"1"}},[a("van-cell",{attrs:{value:t.searchList.startTime},on:{click:function(e){return t.onChangeDate("showStart")}}})],1),a("van-col",{staticClass:"flexCenter",attrs:{span:"1"}},[t._v("-")]),a("van-col",{attrs:{span:"9"}},[a("van-cell",{attrs:{value:t.searchList.endTime},on:{click:function(e){return t.onChangeDate("showEnd")}}})],1),a("van-col",{staticClass:"flexCenter",attrs:{span:"4"}},[a("span",{staticClass:"btn-search",on:{click:t.onSearch}},[t._v("搜索")])])],1)],1),a("van-popup",{style:{height:"40%"},attrs:{position:"bottom",round:""},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},[a("van-datetime-picker",{attrs:{"min-date":t.dataForm.minDate,"max-date":t.dataForm.maxDate,formatter:t.formatter,type:"date"},on:{cancel:function(e){t.dataForm.status=!1},confirm:t.chioseDate},model:{value:t.dataForm.currentDate,callback:function(e){t.$set(t.dataForm,"currentDate",e)},expression:"dataForm.currentDate"}})],1),a("div",{staticClass:"specialList"},[t.show?a("van-list",{key:"trainDetail",attrs:{finished:t.finished,"finished-text":"- 没有更多内容 -","immediate-check":!1},on:{load:function(e){return t.getList()}},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},t._l(t.dataList,function(e,n){return a("van-cell-group",{key:n,staticClass:"data-content",on:{click:function(a){return t.onDetail(e)}}},[a("van-cell",{staticStyle:{padding:"16px 12px"},attrs:{center:!0},scopedSlots:t._u([{key:"title",fn:function(){return[a("span",{staticStyle:{"font-size":".17rem",color:"#333333","font-weight":"500","padding-right":".05rem","padding-bottom":".05rem"}},[t._v(t._s(e.sysMusicScoreName))])]},proxy:!0}],null,!0)},[a("p",{staticStyle:{"font-size":"14px",color:"#808080"}},[t._v(t._s(e.createTime))])]),a("van-cell",{staticStyle:{padding:"12px 12px 16px"},attrs:{clickable:!1,center:""},scopedSlots:t._u([{key:"title",fn:function(){return[a("van-grid",{attrs:{border:!1,"column-num":"4",clickable:!0}},[a("van-grid-item",{staticClass:"van-hairline--right",attrs:{text:"综合得分"},scopedSlots:t._u([{key:"icon",fn:function(){return[t._v(t._s(e.score)+"分")]},proxy:!0}],null,!0)}),a("van-grid-item",{staticClass:"van-hairline--right",attrs:{text:"音准"},scopedSlots:t._u([{key:"icon",fn:function(){return[a("span",{staticStyle:{color:"#01C1B5"}},[t._v(t._s(e.intonation)+"分")])]},proxy:!0}],null,!0)}),a("van-grid-item",{staticClass:"van-hairline--right",attrs:{text:"节奏"},scopedSlots:t._u([{key:"icon",fn:function(){return[a("span",{staticStyle:{color:"#FF802C"}},[t._v(t._s(e.cadence)+"分")])]},proxy:!0}],null,!0)}),a("van-grid-item",{attrs:{text:"完成度"},scopedSlots:t._u([{key:"icon",fn:function(){return[a("span",{staticStyle:{color:"#FF802C"}},[t._v(t._s(e.integrity)+"分")])]},proxy:!0}],null,!0)})],1)]},proxy:!0}],null,!0)})],1)}),1):a("m-empty",{key:"trainDetail",attrs:{msg:"暂无训练详情"}}),a("div",{staticClass:"button-group"},[a("van-button",{attrs:{type:"primary",size:"large"},on:{click:t.addVisited}},[t._v("添加回访")]),a("div",{staticClass:"placeholder-btn"})],1)],1)],1)},s=[],i=a("a34a"),r=a.n(i),o=a("6e6e"),c=a("d678"),u=a("5a0c"),l=a.n(u),d=a("ff51"),h=a("1576");function m(t){return v(t)||f(t)||p()}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function f(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function v(t){if(Array.isArray(t)){for(var e=0,a=new Array(t.length);e<t.length;e++)a[e]=t[e];return a}}function y(t,e,a,n,s,i,r){try{var o=t[i](r),c=o.value}catch(u){return void a(u)}o.done?e(c):Promise.resolve(c).then(n,s)}function g(t){return function(){var e=this,a=arguments;return new Promise(function(n,s){var i=t.apply(e,a);function r(t){y(i,n,s,r,o,"next",t)}function o(t){y(i,n,s,r,o,"throw",t)}r(void 0)})}}var D={components:{MHeader:o["a"],MEmpty:c["a"]},data:function(){var t=this.$route.query;return{headerStatus:!0,show:!0,username:t.username,searchList:{startTime:l()().format("YYYY-MM-DD"),endTime:l()().format("YYYY-MM-DD"),userId:t.userId,page:1,rows:20},dataForm:{type:null,status:!1,minDate:new Date(2e3,0,1),maxDate:new Date(2030,11,31),currentDate:new Date},dataList:[],loading:!1,finished:!1}},mounted:function(){(Object(d["b"])().android||Object(d["b"])().iPhone)&&(this.headerStatus=!1),document.title="评测详情",this.getList()},methods:{addVisited:function(){this.$router.push({path:"/addVisit",query:{userId:this.searchList.userId,username:this.username,type:"train",name:"新增回访记录"}})},getList:function(){var t=g(r.a.mark(function t(){var e,a,n,s;return r.a.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(h["b"])(this.searchList);case 3:if(a=t.sent,n=a.data,this.loading=!1,!(this.dataList.length>0&&1==n.pageNo)){t.next=8;break}return t.abrupt("return");case 8:s=n.rows||[],(e=this.dataList).push.apply(e,m(s)),this.searchList.page>=n.totalPage&&(this.finished=!0),this.searchList.page++,this.dataList.length<=0&&(this.show=!1),t.next=19;break;case 15:t.prev=15,t.t0=t["catch"](0),this.show=!1,this.finished=!0;case 19:case"end":return t.stop()}},t,this,[[0,15]])}));function e(){return t.apply(this,arguments)}return e}(),onSearch:function(){this.dataList=[],this.show=!0,this.loading=!0,this.finished=!1,this.searchList.page=1,this.getList()},onChangeDate:function(t){var e=this,a=this.dataForm;"showEnd"==t?(a.minDate=new Date(l()(this.searchList.startTime)),a.maxDate=new Date(2030,11,31),setTimeout(function(){a.currentDate=e.searchList.endTime?new Date(l()(e.searchList.endTime)):new Date},500)):"showStart"==t&&(a.minDate=new Date(2e3,0,1),a.maxDate=new Date(l()(this.searchList.endTime)),setTimeout(function(){a.currentDate=e.searchList.startTime?new Date(l()(e.searchList.startTime)):new Date},500)),a.status=!0,a.type=t},chioseDate:function(t){var e=this.dataForm;"showStart"==e.type?this.searchList.startTime=l()(t).format("YYYY-MM-DD"):"showEnd"==e.type&&(this.searchList.endTime=l()(t).format("YYYY-MM-DD")),e.status=!1},formatter:function(t,e){return"year"===t?"".concat(e,"年"):"month"===t?"".concat(e,"月"):"day"==t?"".concat(e,"日"):e}}},w=D,x=(a("fc58"),a("2877")),b=Object(x["a"])(w,n,s,!1,null,"65db4d93",null);e["default"]=b.exports},e2de:function(t,e,a){},fc58:function(t,e,a){"use strict";var n=a("e2de"),s=a.n(n);s.a}}]);