<<<<<<<< HEAD:dist/assets/index-518c0ec0.js import{M as T}from"./index-fbc0b234.js";import{d as Y,O as w,o as D,w as C,g as e,R as x,I as k,h as u,B as b,T as V,N as B,a as G,S as s}from"./index-6ef77773.js";import{i as E}from"./icon-timer-ac089c62.js";import{S as N,b as L,a as n}from"./index-54d65aa5.js";import{C as y}from"./index-62b5de3e.js";import{C as g}from"./index-2ab268f1.js";import{G as v,a as f}from"./index-46050490.js";import{M as W}from"./index-03f0ddaa.js";import{D as I,a as O}from"./index-325981c7.js";import{L as R}from"./index-b948e350.js";import"./index-6cce5316.js";import"./use-tab-status-875823de.js";const F="_patrolDropDown_1sv47_1",A="_cellGroup_1sv47_19",H="_timer_1sv47_22",P="_iconTimer_1sv47_28",U="_patrolContainer_1sv47_32",q="_num_1sv47_38",j="_btn_1sv47_69",o={patrolDropDown:F,cellGroup:A,timer:H,iconTimer:P,patrolContainer:U,num:q,btn:j},z=Y({name:"skeleton-modal",props:{show:{type:Boolean,default:!1},showCount:{type:Array,default:()=>[1,2,3,4,5,6]},isLink:{type:Boolean,default:!0}},setup(i,{slots:t}){const r=w({loading:!1});return D(()=>{r.loading=i.show}),C(()=>i.show,()=>{r.loading=i.show}),()=>e(N,{loading:r.loading,style:"flex-wrap: wrap"},{template:()=>e("div",{style:{height:i.isLink?"calc(100vh - var(--header-height))":"auto",overflow:"hidden",width:"100%"}},[i.showCount.map(()=>e(y,{inset:!0,class:o.cellGroup},{default:()=>[e(g,{center:!0},{title:()=>e("div",{class:o.timer},[e(L,{class:o.iconTimer},null),e(n,{rowWidth:"40%",style:{marginTop:"0"}},null)]),label:()=>e("div",{class:o.patrolContainer},[e(v,{columnNum:2,border:!1},{default:()=>[e(f,null,{icon:()=>e(n,{rowWidth:"40%",style:{width:"50px"},class:o.num},null),text:()=>e("div",{class:"van-grid-item__text"},[e(n,{rowWidth:"40%",style:{width:"50px"},class:o.num},null)])}),e(f,null,{icon:()=>e(n,{rowWidth:"40%",style:{width:"50px"},class:o.num},null),text:()=>e("div",{class:"van-grid-item__text"},[e(n,{rowWidth:"40%",style:{width:"50px"},class:o.num},null)])})]}),e(n,{class:o.btn,rowWidth:"20%"},null)])})]}))]),default:()=>t.default&&t.default()})}}),rt=Y({name:"patrol-evaluation",setup(){const i=B(),t=w({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:[]}),r=async()=>{try{if(t.isClick)return;t.isClick=!0;const{data:a}=await G.post("/api-web/coursePatrolEvaluation/pageStat",{data:t.params}),l=a||{};t.listState.refreshing?t.list=l.rows||[]:t.list=t.list.concat(l.rows||[]),t.listState.finished=l.pageNo>=l.totalPage,t.params.page=l.pageNo+1}catch(a){t.listState.finished=!0}finally{setTimeout(()=>{t.listState.dataShow=t.list.length>0,t.listState.refreshing=!1,t.listState.loading=!1,t.isClick=!1},500)}},M=()=>{t.params.page=1,r()},p=()=>{if(t.statusValue=="week"){const a=s().startOf("week").add(1,"day").format("YYYY-MM-DD"),l=s().endOf("week").add(1,"day").format("YYYY-MM-DD");t.params.startTime=a,t.params.endTime=l}else if(t.statusValue=="month"){const a=s().startOf("month").format("YYYY-MM-DD"),l=s().endOf("month").format("YYYY-MM-DD");t.params.startTime=a,t.params.endTime=l}else if(t.statusValue=="term"){const a=s().year(),l="09-01",d="03-01",_=s(a+l).format("YYYY-MM-DD"),S=s(a+d).format("YYYY-MM-DD"),h=s().format("YYYY-MM-DD"),m=s(h).isBefore(s(_)),c=s(h).isBefore(s(S));console.log(m,c,"before"),m&&c&&(t.params.startTime=s(a-1+l).format("YYYY-MM-DD"),t.params.endTime=s(s().year()+d).subtract(1,"day").format("YYYY-MM-DD")),!m&&!c&&(t.params.startTime=s(s().year()+l).format("YYYY-MM-DD"),t.params.endTime=s(s().year()+d).add(1,"year").subtract(1,"day").format("YYYY-MM-DD")),m&&!c&&(t.params.startTime=s(a+d).format("YYYY-MM-DD"),t.params.endTime=s(a+l).subtract(1,"day").format("YYYY-MM-DD"))}};return D(()=>{p(),r()}),()=>e("div",{class:o["patrol-evaluation"]},[e(T,{position:"top"},{default:()=>[e(x,null,null),e(I,{class:o.patrolDropDown},{default:()=>[e(O,{modelValue:t.statusValue,"onUpdate:modelValue":a=>t.statusValue=a,options:t.statusColumns,onChange:()=>{p(),t.listState.dataShow=!0,t.listState.refreshing=!0,t.params.page=1,r()}},null)]})]}),e(z,{show:t.listState.loading,"onUpdate:show":a=>t.listState.loading=a},{default:()=>[e(W,{modelValue:t.listState.refreshing,"onUpdate:modelValue":a=>t.listState.refreshing=a,onRefresh:()=>M(),style:{minHeight:"calc(100vh - var(--header-height))"}},{default:()=>[e(R,{finished:t.listState.finished,finishedText:" ",style:{overflow:"hidden"},onLoad:r,immediateCheck:!1},{default:()=>[t.listState.dataShow?t.list.map(a=>e(y,{inset:!0,class:o.cellGroup},{default:()=>[e(g,{center:!0},{title:()=>e("div",{class:o.timer},[e(k,{name:E,class:o.iconTimer},null),a.date]),label:()=>e("div",{class:o.patrolContainer},[e(v,{columnNum:2,border:!1},{default:()=>[e(f,null,{icon:()=>e("div",{class:o.num},[e("span",null,[a.patrolCount]),u("节")]),text:()=>e("div",{class:"van-grid-item__text"},[u("已评价")])}),e(f,null,{icon:()=>e("div",{class:o.num},[e("span",null,[a.totalCount]),u("节")]),text:()=>e("div",{class:"van-grid-item__text"},[u("全部课程")])})]}),e(b,{type:"primary",class:o.btn,size:"small",round:!0,onClick:()=>{i.push({path:"/patrol-evaluation-detail",query:{date:a.date}})}},{default:()=>[u("查看详情")]})])})]})):e(V,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]})]})]})])}});export{rt as default}; ======== import{M as T}from"./index-8b3add60.js";import{d as Y,O as w,o as D,w as C,g as e,R as x,I as k,h as u,B as b,T as V,N as B,a as G,S as s}from"./index-dbd58bee.js";import{i as E}from"./icon-timer-ac089c62.js";import{S as N,b as L,a as n}from"./index-8ef299c2.js";import{C as y}from"./index-372c1fbe.js";import{C as g}from"./index-56f3e976.js";import{G as v,a as f}from"./index-360b2184.js";import{M as W}from"./index-88ef4b67.js";import{D as I,a as O}from"./index-751eeaa2.js";import{L as R}from"./index-f53d898e.js";import"./index-56f13818.js";import"./use-tab-status-855575aa.js";const F="_patrolDropDown_1sv47_1",A="_cellGroup_1sv47_19",H="_timer_1sv47_22",P="_iconTimer_1sv47_28",U="_patrolContainer_1sv47_32",q="_num_1sv47_38",j="_btn_1sv47_69",o={patrolDropDown:F,cellGroup:A,timer:H,iconTimer:P,patrolContainer:U,num:q,btn:j},z=Y({name:"skeleton-modal",props:{show:{type:Boolean,default:!1},showCount:{type:Array,default:()=>[1,2,3,4,5,6]},isLink:{type:Boolean,default:!0}},setup(i,{slots:t}){const r=w({loading:!1});return D(()=>{r.loading=i.show}),C(()=>i.show,()=>{r.loading=i.show}),()=>e(N,{loading:r.loading,style:"flex-wrap: wrap"},{template:()=>e("div",{style:{height:i.isLink?"calc(100vh - var(--header-height))":"auto",overflow:"hidden",width:"100%"}},[i.showCount.map(()=>e(y,{inset:!0,class:o.cellGroup},{default:()=>[e(g,{center:!0},{title:()=>e("div",{class:o.timer},[e(L,{class:o.iconTimer},null),e(n,{rowWidth:"40%",style:{marginTop:"0"}},null)]),label:()=>e("div",{class:o.patrolContainer},[e(v,{columnNum:2,border:!1},{default:()=>[e(f,null,{icon:()=>e(n,{rowWidth:"40%",style:{width:"50px"},class:o.num},null),text:()=>e("div",{class:"van-grid-item__text"},[e(n,{rowWidth:"40%",style:{width:"50px"},class:o.num},null)])}),e(f,null,{icon:()=>e(n,{rowWidth:"40%",style:{width:"50px"},class:o.num},null),text:()=>e("div",{class:"van-grid-item__text"},[e(n,{rowWidth:"40%",style:{width:"50px"},class:o.num},null)])})]}),e(n,{class:o.btn,rowWidth:"20%"},null)])})]}))]),default:()=>t.default&&t.default()})}}),rt=Y({name:"patrol-evaluation",setup(){const i=B(),t=w({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:[]}),r=async()=>{try{if(t.isClick)return;t.isClick=!0;const{data:a}=await G.post("/api-web/coursePatrolEvaluation/pageStat",{data:t.params}),l=a||{};t.listState.refreshing?t.list=l.rows||[]:t.list=t.list.concat(l.rows||[]),t.listState.finished=l.pageNo>=l.totalPage,t.params.page=l.pageNo+1}catch(a){t.listState.finished=!0}finally{setTimeout(()=>{t.listState.dataShow=t.list.length>0,t.listState.refreshing=!1,t.listState.loading=!1,t.isClick=!1},500)}},M=()=>{t.params.page=1,r()},p=()=>{if(t.statusValue=="week"){const a=s().startOf("week").add(1,"day").format("YYYY-MM-DD"),l=s().endOf("week").add(1,"day").format("YYYY-MM-DD");t.params.startTime=a,t.params.endTime=l}else if(t.statusValue=="month"){const a=s().startOf("month").format("YYYY-MM-DD"),l=s().endOf("month").format("YYYY-MM-DD");t.params.startTime=a,t.params.endTime=l}else if(t.statusValue=="term"){const a=s().year(),l="09-01",d="03-01",_=s(a+l).format("YYYY-MM-DD"),S=s(a+d).format("YYYY-MM-DD"),h=s().format("YYYY-MM-DD"),m=s(h).isBefore(s(_)),c=s(h).isBefore(s(S));console.log(m,c,"before"),m&&c&&(t.params.startTime=s(a-1+l).format("YYYY-MM-DD"),t.params.endTime=s(s().year()+d).subtract(1,"day").format("YYYY-MM-DD")),!m&&!c&&(t.params.startTime=s(s().year()+l).format("YYYY-MM-DD"),t.params.endTime=s(s().year()+d).add(1,"year").subtract(1,"day").format("YYYY-MM-DD")),m&&!c&&(t.params.startTime=s(a+d).format("YYYY-MM-DD"),t.params.endTime=s(a+l).subtract(1,"day").format("YYYY-MM-DD"))}};return D(()=>{p(),r()}),()=>e("div",{class:o["patrol-evaluation"]},[e(T,{position:"top"},{default:()=>[e(x,null,null),e(I,{class:o.patrolDropDown},{default:()=>[e(O,{modelValue:t.statusValue,"onUpdate:modelValue":a=>t.statusValue=a,options:t.statusColumns,onChange:()=>{p(),t.listState.dataShow=!0,t.listState.refreshing=!0,t.params.page=1,r()}},null)]})]}),e(z,{show:t.listState.loading,"onUpdate:show":a=>t.listState.loading=a},{default:()=>[e(W,{modelValue:t.listState.refreshing,"onUpdate:modelValue":a=>t.listState.refreshing=a,onRefresh:()=>M(),style:{minHeight:"calc(100vh - var(--header-height))"}},{default:()=>[e(R,{finished:t.listState.finished,finishedText:" ",style:{overflow:"hidden"},onLoad:r,immediateCheck:!1},{default:()=>[t.listState.dataShow?t.list.map(a=>e(y,{inset:!0,class:o.cellGroup},{default:()=>[e(g,{center:!0},{title:()=>e("div",{class:o.timer},[e(k,{name:E,class:o.iconTimer},null),a.date]),label:()=>e("div",{class:o.patrolContainer},[e(v,{columnNum:2,border:!1},{default:()=>[e(f,null,{icon:()=>e("div",{class:o.num},[e("span",null,[a.patrolCount]),u("节")]),text:()=>e("div",{class:"van-grid-item__text"},[u("已评价")])}),e(f,null,{icon:()=>e("div",{class:o.num},[e("span",null,[a.totalCount]),u("节")]),text:()=>e("div",{class:"van-grid-item__text"},[u("全部课程")])})]}),e(b,{type:"primary",class:o.btn,size:"small",round:!0,onClick:()=>{i.push({path:"/patrol-evaluation-detail",query:{date:a.date}})}},{default:()=>[u("查看详情")]})])})]})):e(V,{style:{minHeight:"calc(100vh - var(--header-height))"},description:"暂无数据"},null)]})]})]})])}});export{rt as default}; >>>>>>>> 87d4d1b1 (更新):dist/assets/index-89192a85.js