index.65d34c29.js 3.0 KB

1
  1. import{C as l}from"./index.33f0ddb9.js";import{d as h,e as a,Y as n,i as e,N as u,F as i,A as o,C as c,aT as d,$ as m}from"./index.6b776f4b.js";import{C as p}from"./index.1c64afe2.js";import{O as f}from"./organ-search.97411f26.js";import{L as S}from"./index.9b1da5d2.js";import{S as b}from"./index.998c3386.js";import{S as g}from"./index.7dbe3499.js";import"./index.f0306d29.js";import"./use-height.c83159bc.js";import"./index.7486196c.js";import"./index.ef17e812.js";import"./use-id.40b6af6b.js";import"./index.beb9a25a.js";import"./use-tab-status.ad41a764.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]"&&!m(s)}var P=h({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}=n(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(l,{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(u,{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(c,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u5B66\u5458"},null),e(d,{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{P as default};