index-legacy-6366ab80.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 n};var n={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(M){s=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),l=new S(r||[]);return a(i,"_invoke",{value:b(t,n,l)}),i}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(M){return{type:"throw",arg:M}}}n.wrap=f;var h={};function p(){}function m(){}function v(){}var y={};s(y,l,(function(){return this}));var g=Object.getPrototypeOf,_=g&&g(g(L([])));_&&_!==r&&o.call(_,l)&&(y=_);var w=v.prototype=p.prototype=Object.create(y);function j(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,n){function r(a,i,l,u){var c=d(e[a],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==t(f)&&o.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,l,u)}),(function(t){r("throw",t,l,u)})):n.resolve(f).then((function(t){s.value=t,l(s)}),(function(t){return r("throw",t,l,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(t,e){function o(){return new n((function(n,o){r(t,e,n,o)}))}return i=i?i.then(o,o):o()}})}function b(t,e,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return C()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=Y(i,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function Y(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,Y(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=d(r,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 D(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 S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function L(t){if(t){var e=t[l];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:C}}function C(){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=s(v,c,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},n.awrap=function(t){return{__await:t}},j(x.prototype),s(x.prototype,u,(function(){return this})),n.AsyncIterator=x,n.async=function(t,e,r,o,a){void 0===a&&(a=Promise);var i=new x(f(t,e,r,o),a);return n.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(w),s(w,c,"Generator"),s(w,l,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},n.values=L,S.prototype={constructor:S,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 n(n,r){return i.type="throw",i.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:L(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},n}function n(t,e,n,r,o,a,i){try{var l=t[a](i),u=l.value}catch(c){return void n(c)}l.done?e(u):Promise.resolve(u).then(r,o)}System.register(["./index-legacy-6cb64f6c.js","./index-legacy-49fe136a.js","./icon-timer-legacy-d80c79f8.js","./index-legacy-5bef4ac7.js","./index-legacy-8d85593e.js","./index-legacy-25a228fa.js","./index-legacy-78d1afa1.js","./index-legacy-a689f51b.js","./index-legacy-dabed3b6.js","./index-legacy-e94bbe34.js","./index-legacy-65fcef15.js","./use-tab-status-legacy-7568ad30.js"],(function(t,r){"use strict";var o,a,i,l,u,c,s,f,d,h,p,m,v,y,g,_,w,j,x,b,Y,D,k,S,L,C,M=document.createElement("style");return M.textContent='._patrolDropDown_nlqjj_1{--van-dropdown-menu-background: transparent;display:inline-flex;background-color:#f8f9fc;width:100%}._patrolDropDown_nlqjj_1 .van-dropdown-menu__title{margin:0 .34667rem;background-color:#fff;border-radius:.8rem;font-size:.37333rem;padding:.08rem .56rem .08rem .18667rem}._patrolDropDown_nlqjj_1 .van-dropdown-menu__title:after{right:.26667rem}._cellGroup_nlqjj_17{margin-bottom:.32rem}._cellGroup_nlqjj_17 ._timer_nlqjj_20{display:flex;align-items:center;font-size:.37333rem;color:var(--k-gray-3)}._cellGroup_nlqjj_17 ._iconTimer_nlqjj_26{font-size:.45333rem;margin-right:.16rem}._patrolContainer_nlqjj_30{display:flex;align-items:center;justify-content:space-between;font-size:.32rem}._patrolContainer_nlqjj_30 ._num_nlqjj_36{color:var(--k-gray-1)}._patrolContainer_nlqjj_30 ._num_nlqjj_36 span{font-size:.58667rem;font-weight:700;line-height:.69333rem;font-family:DINAlternate-Bold,DINAlternate}._patrolContainer_nlqjj_30 .van-grid{width:70%}._patrolContainer_nlqjj_30 .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_nlqjj_30 .van-grid-item:last-child:after{display:none}._patrolContainer_nlqjj_30 .van-grid-item__text{padding-top:.16rem;color:var(--k-gray-3);font-size:.32rem}._patrolContainer_nlqjj_30 ._btn_nlqjj_67{font-size:.37333rem;font-weight:400;padding:0 .37333rem}\n',document.head.appendChild(M),{setters:[function(t){o=t.M},function(t){a=t.d,i=t.N,l=t.o,u=t.w,c=t.g,s=t.O,f=t.I,d=t.h,h=t.B,p=t.Q,m=t.M,v=t.a,y=t.R},function(t){g=t.i},function(t){_=t.S,w=t.b,j=t.a},function(t){x=t.C},function(t){b=t.C},function(t){Y=t.G,D=t.a},function(t){k=t.M},function(t){S=t.D,L=t.a},function(t){C=t.L},null,null],execute:function(){var r={patrolDropDown:"_patrolDropDown_nlqjj_1",cellGroup:"_cellGroup_nlqjj_17",timer:"_timer_nlqjj_20",iconTimer:"_iconTimer_nlqjj_26",patrolContainer:"_patrolContainer_nlqjj_30",num:"_num_nlqjj_36",btn:"_btn_nlqjj_67"},M=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 n=e.slots,o=i({loading:!1});return l((function(){o.loading=t.show})),u((function(){return t.show}),(function(){o.loading=t.show})),function(){return c(_,{loading:o.loading,style:"flex-wrap: wrap"},{template:function(){return c("div",{style:{height:t.isLink?"calc(100vh - var(--header-height))":"auto",overflow:"hidden",width:"100%"}},[t.showCount.map((function(){return c(x,{inset:!0,class:r.cellGroup},{default:function(){return[c(b,{center:!0},{title:function(){return c("div",{class:r.timer},[c(w,{class:r.iconTimer},null),c(j,{rowWidth:"40%",style:{marginTop:"0"}},null)])},label:function(){return c("div",{class:r.patrolContainer},[c(Y,{columnNum:2,border:!1},{default:function(){return[c(D,null,{icon:function(){return c(j,{rowWidth:"40%",style:{width:"50px"},class:r.num},null)},text:function(){return c("div",{class:"van-grid-item__text"},[c(j,{rowWidth:"40%",style:{width:"50px"},class:r.num},null)])}}),c(D,null,{icon:function(){return c(j,{rowWidth:"40%",style:{width:"50px"},class:r.num},null)},text:function(){return c("div",{class:"van-grid-item__text"},[c(j,{rowWidth:"40%",style:{width:"50px"},class:r.num},null)])}})]}}),c(j,{class:r.btn,rowWidth:"20%"},null)])}})]}})}))])},default:function(){return n.default&&n.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:[]}),u=function(){var t,r=(t=e().mark((function t(){var n,r,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:if(n=t.sent,r=n.data,o=r||{},!(a.list.length>0&&1===o.pageNo)){t.next=11;break}return t.abrupt("return");case 11: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=19;break;case 16:t.prev=16,t.t0=t.catch(0),a.listState.finished=!0;case 19:return t.prev=19,a.listState.dataShow=a.list.length>0,a.listState.refreshing=!1,a.listState.loading=!1,a.isClick=!1,t.finish(19);case 25:case"end":return t.stop()}}),t,null,[[0,16,19,25]])})),function(){var e=this,r=arguments;return new Promise((function(o,a){var i=t.apply(e,r);function l(t){n(i,o,a,l,u,"next",t)}function u(t){n(i,o,a,l,u,"throw",t)}l(void 0)}))});return function(){return r.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 n=y().startOf("month").format("YYYY-MM-DD"),r=y().endOf("month").format("YYYY-MM-DD");a.params.startTime=n,a.params.endTime=r}else if("term"==a.statusValue){var o=y().year(),i="09-01",l="03-01",u=y(o+i).format("YYYY-MM-DD"),c=y(o+l).format("YYYY-MM-DD"),s=y().format("YYYY-MM-DD"),f=y(s).isBefore(y(u)),d=y(s).isBefore(y(c));console.log(f,d,"before"),f&&d&&(a.params.startTime=y(o-1+i).format("YYYY-MM-DD"),a.params.endTime=y(y().year()+l).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()+l).add(1,"year").subtract(1,"day").format("YYYY-MM-DD")),f&&!d&&(a.params.startTime=y(o+l).format("YYYY-MM-DD"),a.params.endTime=y(o+i).subtract(1,"day").format("YYYY-MM-DD"))}};return l((function(){_(),u()})),function(){return c("div",{class:r["patrol-evaluation"]},[c(o,{position:"top"},{default:function(){return[c(s,null,null),c(S,{class:r.patrolDropDown},{default:function(){return[c(L,{modelValue:a.statusValue,"onUpdate:modelValue":function(t){return a.statusValue=t},options:a.statusColumns,onChange:function(){_(),a.listState.dataShow=!0,a.params.page=1,u()}},null)]}})]}}),c(M,{show:a.listState.loading,"onUpdate:show":function(t){return a.listState.loading=t}},{default:function(){return[c(k,{modelValue:a.listState.refreshing,"onUpdate:modelValue":function(t){return a.listState.refreshing=t},onRefresh:function(){return a.params.page=1,void u()},style:{minHeight:"calc(100vh - var(--header-height))"}},{default:function(){return[c(C,{finished:a.listState.finished,finishedText:" ",style:{overflow:"hidden"},onLoad:u,immediateCheck:!1},{default:function(){return[a.listState.dataShow?a.list.map((function(e){return c(x,{inset:!0,class:r.cellGroup},{default:function(){return[c(b,{center:!0},{title:function(){return c("div",{class:r.timer},[c(f,{name:g,class:r.iconTimer},null),e.date])},label:function(){return c("div",{class:r.patrolContainer},[c(Y,{columnNum:2,border:!1},{default:function(){return[c(D,null,{icon:function(){return c("div",{class:r.num},[c("span",null,[e.patrolCount]),d("节")])},text:function(){return c("div",{class:"van-grid-item__text"},[d("已评价")])}}),c(D,null,{icon:function(){return c("div",{class:r.num},[c("span",null,[e.totalCount]),d("节")])},text:function(){return c("div",{class:"van-grid-item__text"},[d("全部课程")])}})]}}),c(h,{type:"primary",class:r.btn,size:"small",round:!0,onClick:function(){t.push({path:"/patrol-evaluation-detail",query:{date:e.date}})}},{default:function(){return[d("查看详情")]}})])}})]}})})):c(p,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]}})]}})]}})])}}}))}}}))}();