index.27567943.js 3.2 KB

1
  1. import{d as m,w as a,y as o,j as t,A as n,N as r,C as l,aS as h,b8 as c,F as u,$ as d}from"./ResizeObserver.es.f28023e0.js";import{C as p}from"./index.bd375ca9.js";import{R as f,C as g}from"./index.00276806.js";import"./index.c6c54752.js";import{L as C}from"./index.79f59946.js";import{C as w}from"./index.8cee14de.js";import{D as S}from"./index.ff961b8a.js";import"./use-tab-status.653933d8.js";import"./title_timers.bb73d550.js";import"./icon_name_active.3e9031ca.js";import"./icon_tips.75e86958.js";import"./index.3b2e70c8.js";import"./index.2a22730e.js";import"./icon_timer2.5fb1750d.js";import"./index.eb1d9d01.js";import"./utils.6e3cf8f8.js";import"./index.da2fb993.js";const T="_searchList_1bbiv_1",b="_dataItem_1bbiv_6",L="_countTimer_1bbiv_11",_="_timer_1bbiv_15",Y="_title_1bbiv_26";var i={searchList:T,dataItem:b,countTimer:L,timer:_,title:Y};function y(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!d(s)}var q=m({name:"courseRecord",data(){return{list:[],dataShow:!0,loading:!1,finished:!1,monthTxt:a().format("YYYY\u5E74MM\u6708"),month:new Date,params:{status:"COMPLETE",month:a().format("YYYY-MM"),page:1,rows:20},timeShow:!1,studentStatus:!1,consumeTime:0}},async mounted(){this.getConsumeTime(),this.getList()},methods:{onSearch(){this.dataShow=!0,this.loading=!1,this.finished=!1,this.list=[],this.params.page=1,this.getConsumeTime(),this.getList()},async getConsumeTime(){try{const s=await await o.get("/api-teacher/courseSchedule/selectConsumeTime",{params:{month:this.params.month}});console.log(s),this.consumeTime=s.data.consumeTime||0}catch{}},async getList(){try{const s=await o.post("/api-teacher/courseSchedule/selectConsumeTimeList",{data:this.params});this.loading=!1;const e=s.data||{};if(this.list.length>0&&e.pageNo===1)return;this.list=this.list.concat(e.rows||[]),this.finished=e.pageNo>=e.totalPage,this.params.page=e.pageNo+1,this.dataShow=this.list.length>0}catch{this.dataShow=!1,this.finished=!0}}},render(){let s;return t(u,null,[t(p,null,null),t(f,{class:[i.countTimer,"van-hairline--bottom"]},{default:()=>[t(g,{span:9},{default:()=>[t("p",{class:i.timer},[this.consumeTime,t("span",null,[n("\u5206\u949F")])]),t("p",{class:i.title},[t("span",null,[n("\u5DF2\u6D88\u8017\u65F6\u957F")])])]})]}),t("div",{class:i.searchList},[t("div",{class:i.dataItem,onClick:()=>{this.timeShow=!0}},[this.monthTxt,t(r,{classPrefix:"iconfont",name:"down",size:8,style:{marginLeft:"4px"},color:"#CCCCCC"},null)])]),this.dataShow?t(C,{loading:this.loading,"onUpdate:loading":e=>this.loading=e,finished:this.finished,finishedText:" ",class:[i.liveList,"mb12"],immediateCheck:!1,onLoad:this.getList},y(s=this.list.map(e=>t(w,{item:e,operation:!1},null)))?s:{default:()=>[s]}):t(l,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u8BFE\u7A0B"},null),t(h,{position:"bottom",show:this.timeShow,"onUpdate:show":e=>this.timeShow=e,round:!0},{default:()=>[t("div",{class:i.picker},[t(S,{modelValue:this.month,"onUpdate:modelValue":e=>this.month=e,type:"year-month",formatter:c,onConfirm:e=>{this.monthTxt=a(e).format("YYYY\u5E74MM\u6708"),this.params.month=a(e).format("YYYY-MM"),this.timeShow=!1,this.onSearch()},onCancel:()=>this.timeShow=!1},null)])]})])}});export{q as default};