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.394decd7.js";import{C as m}from"./index.e6e212d8.js";import{S as p}from"./index.ada5e712.js";import{O as f}from"./organ-search.9a8e75c7.js";import{L as S}from"./index.dc786267.js";import{S as b}from"./index.3bbf4ddb.js";import{S as g}from"./index.37000a98.js";import"./index.9e0d46e4.js";import"./index.224299a1.js";import"./use-id.e2f22365.js";import"./index.dab716ce.js";import"./use-tab-status.723110ee.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};
|