1 |
- import{C as m}from"./index.2c715c84.js";import{d as r,t as i,b as o,i as t,F as l,w as n,L as h,ak as c,C as u,ab as d,a$ as p}from"./index.9a8e7555.js";import{R as f,C as g}from"./index.1d0ada62.js";import"./index.7d9da821.js";import{L as C}from"./index.87809eea.js";import{C as w}from"./index.3e20da78.js";import{D as S}from"./index.db84d102.js";import"./use-height.5caa9b61.js";import"./use-tab-status.41627c38.js";import"./share_bg.cffdd379.js";import"./icon_tips.1c27519f.js";import"./index.3b6c3426.js";import"./index.e50ea8f8.js";import"./icon_timer2.563d016a.js";import"./index.376fb8f6.js";import"./utils.72992dd7.js";import"./index.0c52a5ac.js";const b="_searchList_1bbiv_1",T="_dataItem_1bbiv_6",L="_countTimer_1bbiv_11",_="_timer_1bbiv_15",Y="_title_1bbiv_26";var a={searchList:b,dataItem:T,countTimer:L,timer:_,title:Y};function v(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!c(s)}var A=r({name:"courseRecord",data(){return{list:[],dataShow:!0,loading:!1,finished:!1,monthTxt:i().format("YYYY\u5E74MM\u6708"),month:new Date,params:{status:"COMPLETE",month:i().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(l,null,[t(m,null,null),t(f,{class:[a.countTimer,"van-hairline--bottom"]},{default:()=>[t(g,{span:9},{default:()=>[t("p",{class:a.timer},[this.consumeTime,t("span",null,[n("\u5206\u949F")])]),t("p",{class:a.title},[t("span",null,[n("\u5DF2\u6D88\u8017\u65F6\u957F")])])]})]}),t("div",{class:a.searchList},[t("div",{class:a.dataItem,onClick:()=>{this.timeShow=!0}},[this.monthTxt,t(h,{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:[a.liveList,"mb12"],immediateCheck:!1,onLoad:this.getList},v(s=this.list.map(e=>t(w,{item:e,operation:!1},null)))?s:{default:()=>[s]}):t(u,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u8BFE\u7A0B"},null),t(d,{position:"bottom",show:this.timeShow,"onUpdate:show":e=>this.timeShow=e,round:!0},{default:()=>[t("div",{class:a.picker},[t(S,{modelValue:this.month,"onUpdate:modelValue":e=>this.month=e,type:"year-month",formatter:p,onConfirm:e=>{this.monthTxt=i(e).format("YYYY\u5E74MM\u6708"),this.params.month=i(e).format("YYYY-MM"),this.timeShow=!1,this.onSearch()},onCancel:()=>this.timeShow=!1},null)])]})])}});export{A as default};
|