index-legacy-f1512008.js 15 KB

1
  1. !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(j){c=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),u=new L(n||[]);return a(i,"_invoke",{value:Y(t,r,u)}),i}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(j){return{type:"throw",arg:j}}}r.wrap=f;var h={};function p(){}function m(){}function v(){}var y={};c(y,u,(function(){return this}));var g=Object.getPrototypeOf,_=g&&g(g(C([])));_&&_!==n&&o.call(_,u)&&(y=_);var w=v.prototype=p.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(e,r){function n(a,i,u,l){var s=d(e[a],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,l)}),(function(t){n("throw",t,u,l)})):r.resolve(f).then((function(t){c.value=t,u(c)}),(function(t){return n("throw",t,u,l)}))}l(s.arg)}var i;a(this,"_invoke",{value:function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return i=i?i.then(o,o):o()}})}function Y(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return M()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=D(i,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=d(t,e,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function D(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,D(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=d(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function C(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:M}}function M(){return{value:void 0,done:!0}}return m.prototype=v,a(w,"constructor",{value:v,configurable:!0}),a(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},x(b.prototype),c(b.prototype,l,(function(){return this})),r.AsyncIterator=b,r.async=function(t,e,n,o,a){void 0===a&&(a=Promise);var i=new b(f(t,e,n,o),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(w),c(w,s,"Generator"),c(w,u,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=C,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},r}function r(t,e,r,n,o,a,i){try{var u=t[a](i),l=u.value}catch(s){return void r(s)}u.done?e(l):Promise.resolve(l).then(n,o)}System.register(["./index-legacy-ec77484a.js","./index-legacy-64376843.js","./icon-timer-legacy-d80c79f8.js","./index-legacy-2e556ecc.js","./index-legacy-981ae1f4.js","./index-legacy-a7502a0a.js","./index-legacy-07eb4825.js","./index-legacy-d2e4cf84.js","./index-legacy-c347537c.js","./index-legacy-4fc1e501.js","./index-legacy-86b38a8e.js","./use-tab-status-legacy-b3d1a2e2.js"],(function(t,n){"use strict";var o,a,i,u,l,s,c,f,d,h,p,m,v,y,g,_,w,x,b,Y,D,S,k,L,C,M,j=document.createElement("style");return j.textContent='._patrolDropDown_1sv47_1{--van-dropdown-menu-background: transparent;display:inline-flex;background-color:#f8f9fc;width:100%}._patrolDropDown_1sv47_1 .van-dropdown-menu__title{margin:0 .34667rem;background-color:#fff;border-radius:.8rem;font-size:.37333rem;padding:.08rem .56rem .08rem .18667rem}._patrolDropDown_1sv47_1 .van-dropdown-menu__title:after{right:.26667rem;background-color:transparent transparent var(--k-gray-4) var(--k-gray-4);opacity:1}._cellGroup_1sv47_19{margin-bottom:.32rem}._cellGroup_1sv47_19 ._timer_1sv47_22{display:flex;align-items:center;font-size:.37333rem;color:var(--k-gray-3)}._cellGroup_1sv47_19 ._iconTimer_1sv47_28{font-size:.45333rem;margin-right:.16rem}._patrolContainer_1sv47_32{display:flex;align-items:center;justify-content:space-between;font-size:.32rem}._patrolContainer_1sv47_32 ._num_1sv47_38{color:var(--k-gray-1)}._patrolContainer_1sv47_32 ._num_1sv47_38 span{font-size:.58667rem;font-weight:700;line-height:.69333rem;font-family:DINAlternate-Bold,DINAlternate}._patrolContainer_1sv47_32 .van-grid{width:70%}._patrolContainer_1sv47_32 .van-grid-item:after{content:" ";position:absolute;top:50%;right:0;margin-top:-.42667rem;width:.02667rem;height:.90667rem;background:linear-gradient(to bottom,rgba(226,230,230,.3),#e0e0e0,rgba(225,227,227,.3));border-radius:.02667rem}._patrolContainer_1sv47_32 .van-grid-item:last-child:after{display:none}._patrolContainer_1sv47_32 .van-grid-item__text{padding-top:.16rem;color:var(--k-gray-3);font-size:.32rem}._patrolContainer_1sv47_32 ._btn_1sv47_69{font-size:.37333rem;font-weight:400;padding:0 .18667rem;height:.69333rem}\n',document.head.appendChild(j),{setters:[function(t){o=t.M},function(t){a=t.d,i=t.O,u=t.o,l=t.w,s=t.g,c=t.R,f=t.I,d=t.h,h=t.B,p=t.T,m=t.N,v=t.a,y=t.S},function(t){g=t.i},function(t){_=t.S,w=t.b,x=t.a},function(t){b=t.C},function(t){Y=t.C},function(t){D=t.G,S=t.a},function(t){k=t.M},function(t){L=t.D,C=t.a},function(t){M=t.L},null,null],execute:function(){var n={patrolDropDown:"_patrolDropDown_1sv47_1",cellGroup:"_cellGroup_1sv47_19",timer:"_timer_1sv47_22",iconTimer:"_iconTimer_1sv47_28",patrolContainer:"_patrolContainer_1sv47_32",num:"_num_1sv47_38",btn:"_btn_1sv47_69"},j=a({name:"skeleton-modal",props:{show:{type:Boolean,default:!1},showCount:{type:Array,default:function(){return[1,2,3,4,5,6]}},isLink:{type:Boolean,default:!0}},setup:function(t,e){var r=e.slots,o=i({loading:!1});return u((function(){o.loading=t.show})),l((function(){return t.show}),(function(){o.loading=t.show})),function(){return s(_,{loading:o.loading,style:"flex-wrap: wrap"},{template:function(){return s("div",{style:{height:t.isLink?"calc(100vh - var(--header-height))":"auto",overflow:"hidden",width:"100%"}},[t.showCount.map((function(){return s(b,{inset:!0,class:n.cellGroup},{default:function(){return[s(Y,{center:!0},{title:function(){return s("div",{class:n.timer},[s(w,{class:n.iconTimer},null),s(x,{rowWidth:"40%",style:{marginTop:"0"}},null)])},label:function(){return s("div",{class:n.patrolContainer},[s(D,{columnNum:2,border:!1},{default:function(){return[s(S,null,{icon:function(){return s(x,{rowWidth:"40%",style:{width:"50px"},class:n.num},null)},text:function(){return s("div",{class:"van-grid-item__text"},[s(x,{rowWidth:"40%",style:{width:"50px"},class:n.num},null)])}}),s(S,null,{icon:function(){return s(x,{rowWidth:"40%",style:{width:"50px"},class:n.num},null)},text:function(){return s("div",{class:"van-grid-item__text"},[s(x,{rowWidth:"40%",style:{width:"50px"},class:n.num},null)])}})]}}),s(x,{class:n.btn,rowWidth:"20%"},null)])}})]}})}))])},default:function(){return r.default&&r.default()}})}}});t("default",a({name:"patrol-evaluation",setup:function(){var t=m(),a=i({isClick:!1,listState:{dataShow:!0,loading:!0,finished:!1,refreshing:!1},params:{startTime:"",endTime:"",page:1,rows:20},statusValue:"week",statusColumns:[{text:"本周",value:"week"},{text:"本月",value:"month"},{text:"本学期",value:"term"}],list:[]}),l=function(){var t,n=(t=e().mark((function t(){var r,n,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!a.isClick){t.next=3;break}return t.abrupt("return");case 3:return a.isClick=!0,t.next=6,v.post("/api-web/coursePatrolEvaluation/pageStat",{data:a.params});case 6:r=t.sent,n=r.data,o=n||{},a.listState.refreshing?a.list=o.rows||[]:a.list=a.list.concat(o.rows||[]),a.listState.finished=o.pageNo>=o.totalPage,a.params.page=o.pageNo+1,t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),a.listState.finished=!0;case 17:return t.prev=17,setTimeout((function(){a.listState.dataShow=a.list.length>0,a.listState.refreshing=!1,a.listState.loading=!1,a.isClick=!1}),500),t.finish(17);case 20:case"end":return t.stop()}}),t,null,[[0,14,17,20]])})),function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function u(t){r(i,o,a,u,l,"next",t)}function l(t){r(i,o,a,u,l,"throw",t)}u(void 0)}))});return function(){return n.apply(this,arguments)}}(),_=function(){if("week"==a.statusValue){var t=y().startOf("week").add(1,"day").format("YYYY-MM-DD"),e=y().endOf("week").add(1,"day").format("YYYY-MM-DD");a.params.startTime=t,a.params.endTime=e}else if("month"==a.statusValue){var r=y().startOf("month").format("YYYY-MM-DD"),n=y().endOf("month").format("YYYY-MM-DD");a.params.startTime=r,a.params.endTime=n}else if("term"==a.statusValue){var o=y().year(),i="09-01",u="03-01",l=y(o+i).format("YYYY-MM-DD"),s=y(o+u).format("YYYY-MM-DD"),c=y().format("YYYY-MM-DD"),f=y(c).isBefore(y(l)),d=y(c).isBefore(y(s));console.log(f,d,"before"),f&&d&&(a.params.startTime=y(o-1+i).format("YYYY-MM-DD"),a.params.endTime=y(y().year()+u).subtract(1,"day").format("YYYY-MM-DD")),f||d||(a.params.startTime=y(y().year()+i).format("YYYY-MM-DD"),a.params.endTime=y(y().year()+u).add(1,"year").subtract(1,"day").format("YYYY-MM-DD")),f&&!d&&(a.params.startTime=y(o+u).format("YYYY-MM-DD"),a.params.endTime=y(o+i).subtract(1,"day").format("YYYY-MM-DD"))}};return u((function(){_(),l()})),function(){return s("div",{class:n["patrol-evaluation"]},[s(o,{position:"top"},{default:function(){return[s(c,null,null),s(L,{class:n.patrolDropDown},{default:function(){return[s(C,{modelValue:a.statusValue,"onUpdate:modelValue":function(t){return a.statusValue=t},options:a.statusColumns,onChange:function(){_(),a.listState.dataShow=!0,a.listState.refreshing=!0,a.params.page=1,l()}},null)]}})]}}),s(j,{show:a.listState.loading,"onUpdate:show":function(t){return a.listState.loading=t}},{default:function(){return[s(k,{modelValue:a.listState.refreshing,"onUpdate:modelValue":function(t){return a.listState.refreshing=t},onRefresh:function(){return a.params.page=1,void l()},style:{minHeight:"calc(100vh - var(--header-height))"}},{default:function(){return[s(M,{finished:a.listState.finished,finishedText:" ",style:{overflow:"hidden"},onLoad:l,immediateCheck:!1},{default:function(){return[a.listState.dataShow?a.list.map((function(e){return s(b,{inset:!0,class:n.cellGroup},{default:function(){return[s(Y,{center:!0},{title:function(){return s("div",{class:n.timer},[s(f,{name:g,class:n.iconTimer},null),e.date])},label:function(){return s("div",{class:n.patrolContainer},[s(D,{columnNum:2,border:!1},{default:function(){return[s(S,null,{icon:function(){return s("div",{class:n.num},[s("span",null,[e.patrolCount]),d("节")])},text:function(){return s("div",{class:"van-grid-item__text"},[d("已评价")])}}),s(S,null,{icon:function(){return s("div",{class:n.num},[s("span",null,[e.totalCount]),d("节")])},text:function(){return s("div",{class:"van-grid-item__text"},[d("全部课程")])}})]}}),s(h,{type:"primary",class:n.btn,size:"small",round:!0,onClick:function(){t.push({path:"/patrol-evaluation-detail",query:{date:e.date}})}},{default:function(){return[d("查看详情")]}})])}})]}})})):s(p,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]}})]}})]}})])}}}))}}}))}();