index.32f0d7a4.js 3.0 KB

1
  1. import{d as l,y as a,Y as h,j as e,N as n,F as i,A as o,C as u,aS as c,$ as d}from"./ResizeObserver.es.b7226882.js";import{C as m}from"./index.969bba7f.js";import{S as p}from"./index.521acd0b.js";import{O as f}from"./organ-search.59e9ff38.js";import{L as S}from"./index.9fec2202.js";import{S as b}from"./index.f6c44874.js";import{S as g}from"./index.20618b5a.js";import"./index.40f703b6.js";import"./index.021f1c7b.js";import"./use-id.5d5e6e63.js";import"./index.ed3a5560.js";import"./use-tab-status.db1f6d2e.js";import"./icon_student.c3c58354.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 k=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{k as default};