1 |
- import{d as m,x as a,e as o,i as e,A as n,N as r,C as h,aT as l,b2 as c,F as u,$ as d}from"./index.7994470a.js";import{R as p,C as f}from"./index.80389b79.js";import"./index.b5726455.js";import{L as g}from"./index.ec643df3.js";import{C}from"./index.29d48e07.js";import{D as w}from"./index.e89aa9d7.js";import"./use-tab-status.00d7316c.js";import"./title_timers.bb73d550.js";import"./icon_name_active.3e9031ca.js";import"./icon_tips.75e86958.js";import"./index.777f4790.js";import"./index.9cdb5783.js";import"./icon_timer2.5fb1750d.js";import"./index.e6c57a63.js";import"./utils.4585c89d.js";import"./index.7273768c.js";const S="_searchList_1bbiv_1",T="_dataItem_1bbiv_6",b="_countTimer_1bbiv_11",L="_timer_1bbiv_15",_="_title_1bbiv_26";var i={searchList:S,dataItem:T,countTimer:b,timer:L,title:_};function Y(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!d(s)}var A=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 t=s.data||{};if(this.list.length>0&&t.pageNo===1)return;this.list=this.list.concat(t.rows||[]),this.finished=t.pageNo>=t.totalPage,this.params.page=t.pageNo+1,this.dataShow=this.list.length>0}catch{this.dataShow=!1,this.finished=!0}}},render(){let s;return e(u,null,[e(p,{class:[i.countTimer,"van-hairline--bottom"]},{default:()=>[e(f,{span:9},{default:()=>[e("p",{class:i.timer},[this.consumeTime,e("span",null,[n("\u5206\u949F")])]),e("p",{class:i.title},[e("span",null,[n("\u5DF2\u6D88\u8017\u65F6\u957F")])])]})]}),e("div",{class:i.searchList},[e("div",{class:i.dataItem,onClick:()=>{this.timeShow=!0}},[this.monthTxt,e(r,{classPrefix:"iconfont",name:"down",size:8,style:{marginLeft:"4px"},color:"#CCCCCC"},null)])]),this.dataShow?e(g,{loading:this.loading,"onUpdate:loading":t=>this.loading=t,finished:this.finished,finishedText:" ",class:[i.liveList,"mb12"],immediateCheck:!1,onLoad:this.getList},Y(s=this.list.map(t=>e(C,{item:t,operation:!1},null)))?s:{default:()=>[s]}):e(h,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u8BFE\u7A0B"},null),e(l,{position:"bottom",show:this.timeShow,"onUpdate:show":t=>this.timeShow=t,round:!0},{default:()=>[e("div",{class:i.picker},[e(w,{modelValue:this.month,"onUpdate:modelValue":t=>this.month=t,type:"year-month",formatter:c,onConfirm:t=>{this.monthTxt=a(t).format("YYYY\u5E74MM\u6708"),this.params.month=a(t).format("YYYY-MM"),this.timeShow=!1,this.onSearch()},onCancel:()=>this.timeShow=!1},null)])]})])}});export{A as default};
|