index.8d82491e.js 3.0 KB

1
  1. import{d as l,w as a,X as h,j as e,M as n,F as i,z as o,C as u,aR as c,Z as d}from"./index.e6d6174e.js";import{C as m}from"./index.045f03fd.js";import{S as p}from"./index.c42f80e3.js";import{O as f}from"./organ-search.02ca21ae.js";import{L as S}from"./index.f904775d.js";import{S as b}from"./index.9093bc60.js";import{S as g}from"./index.6fbb4569.js";import"./index.d8c651bf.js";import"./use-height.8140ea04.js";import"./index.af99cf22.js";import"./index.17d70acf.js";import"./use-id.f239f36f.js";import"./index.05f2b7dd.js";import"./use-tab-status.e9ba8498.js";import"./icon_student.bbb32387.js";const j="_label_1m3l4_1";var r={label:j};function N(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!d(s)}var A=l({name:"myStudent",data(){return{searchStatus:!1,openStatus:!1,subjectList:[],list:[],dataShow:!0,loading:!1,finished:!1,params:{userName:"",subjectName:"\u5168\u90E8\u58F0\u90E8",subjectId:null,page:1,rows:20},height:"auto"}},async mounted(){try{const t=await a.get("/api-teacher/subject/subjectSelect");this.subjectList=t.data||[]}catch{}this.getList();const{height:s}=h(this.$refs.headers);this.height=s},methods:{onSort(){this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.searchStatus=!1,this.getList()},onSearch(s){this.params.userName=s,this.onSort()},async getList(){try{const s=await a.post("/api-teacher/courseSchedule/selectStudent",{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(i,null,[e(b,null,{default:()=>[e("div",{ref:"headers"},[e(m,{isFixed:!1,border:!1},null),e(p,{placeholder:"\u8BF7\u8F93\u5165\u5B66\u5458\u540D\u79F0",onSearch:this.onSearch},{left:()=>e("div",{class:r.label,onClick:()=>{this.searchStatus=!this.searchStatus,this.openStatus=!this.openStatus}},[this.params.subjectName,e(n,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])})])]}),this.dataShow?e(S,{loading:this.loading,"onUpdate:loading":t=>this.loading=t,finished:this.finished,finishedText:" ",class:[r.liveList,"mb12"],immediateCheck:!1,onLoad:this.getList},N(s=this.list.map(t=>e(g,{item:{userName:t.userName,subjectName:t.subjectName,avatar:t.avatar}},{default:()=>[t.lastEndClass!==0&&e(i,null,[o("\u4E0A\u6B21\u8BFE\u7A0B "),t.lastEndClass,o(" \u5929\u524D")])]})))?s:{default:()=>[s]}):e(u,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5B66\u5458"},null),e(c,{show:this.searchStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.searchStatus=!1,onClosed:()=>this.openStatus=!1},{default:()=>[this.openStatus&&e(f,{subjectList:this.subjectList,onSort:this.onSort,isReset:!0,modelValue:this.params.subjectId,"onUpdate:modelValue":t=>this.params.subjectId=t,subjectName:this.params.subjectName,"onUpdate:subjectName":t=>this.params.subjectName=t},null)]})])}});export{A as default};