1 |
- import{d as u,j as t,z as i,M as o,F as d,g as n,w as l,X as f,B as p,C as S,aR as A,Z as b}from"./index.394decd7.js";import{C as g}from"./index.e6e212d8.js";import{S as C}from"./index.3bbf4ddb.js";import{L as q}from"./index.dc786267.js";import{A as v}from"./index.4b9edf44.js";import{S as _}from"./index.ada5e712.js";import{C as j}from"./index.9e0d46e4.js";import{I as w}from"./index.ae2dd816.js";import{R as y}from"./index.eb3110b4.js";import{i as I}from"./icon_teacher.40b6f077.js";import{O as N}from"./organ-search.9a8e75c7.js";import"./use-tab-status.723110ee.js";import"./index.224299a1.js";import"./use-id.e2f22365.js";import"./use-refs.09b2d19c.js";import"./index.dab716ce.js";const L="_filterSection_u46xa_1",x="_dataItem_u46xa_8",T="_btn_u46xa_25";var r={filterSection:L,dataItem:x,btn:T};const k="_practiceItem_a61ew_1",E="_piCoverContainer_a61ew_7",V="_tag_a61ew_14",G="_piCover_a61ew_7",W="_piTitle_a61ew_28",B="_piName_a61ew_33",F="_subject_a61ew_39",Q="_piNameSubject_a61ew_48",J="_piContent_a61ew_52",Z="_edu_a61ew_63",z="_courseInfo_a61ew_68",R="_classNum_a61ew_75",K="_priceTime_a61ew_79";var s={practiceItem:k,piCoverContainer:E,tag:V,piCover:G,piTitle:W,piName:B,subject:F,piNameSubject:Q,piContent:J,edu:Z,courseInfo:z,classNum:R,priceTime:K},D="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAaCAMAAACTisy7AAAAAXNSR0IArs4c6QAAAV9QTFRFAAAAAAAAgICAVVVVgICAZmZmgICAbW1tVVVVcXFxZmZmXV1dYmJicHBwaWlpY2Nja2traGhobGxsampqaWlpbW1ta2trampqa2traGhobGxsampqa2tra2trampqaGhoampqbGxsa2trampqaWlpa2trbGxsa2trbGxsampqa2tra2trampqampqaWlpaWlpampqa2trampqampqaWlpaWlpa2trampqaWlpa2traWlpampqampqa2trampqa2tra2traWlpa2trampqa2trampqampqa2tra2tra2tra2trampqampqa2trampqampqa2trampqampqaWlpampqampqaWlpampqa2trampqampqampqa2trampqampqampqampqampqampqampqaWlpampqampqampqampqampqampqampqaWlpampqampqampqampqampqaWlpampqampqpoCj+QAAAHR0Uk5TAAECAwQFBgcJCQoLDRAREhMWGh0iIyYpKyw0NTc5PEBBQkxNTlFTVldbX2JjZ2hrc3V2eHl+gYKDg4WJi42OmZuenqGlqKusrrGztrm6vL7Ex8jJy87Q09XW2Nnc3+Ln6Onq6+3u7/Dx8/X29/f4+/z9/v5olxpFAAABEUlEQVQoz2NgoAYQtU+M0GfDKiXpkp/vHlYSp8uKISXjWZRnL8LAqBZeEqvDgiKl6FeSaSsEZjJpRJbEaDHDZBhVgkpSzQTgKpk0o0uiNZkgHNeSeCMeFIOYtWJKIhXAzIQCIw50J7AYliSDGXKhJfEG3Chy0k7ZJSVQtlJwSZIJ3GRO7ZCSPBe4JANDSUZJiikviCVml1qSXyLIgCxpruBfkm4prOpbVOitZAWUQJEE2u1TUlKSbC3CwGCBKcnAIGWszg6isUrCAEgyLAyPJBKgQDJQAolnhSqZXVLgJAxhcmn6FKBKSog55OfY8DMwyjtmlCR6RaFHhLhHcZpzbEmumzILtlQk65cVoMdHlbQKABQyPpsAaTVpAAAAAElFTkSuQmCC",P=u({name:"practiceItem",props:{item:{type:Object,default:{}},onClick:{type:Function,default:e=>{}}},computed:{subjectNameList(){const{configSubject:e}=this.item;return e?e.split(","):[]},starGrade(){const{starGrade:e}=this.item;return Number(e)||0}},render(){return t(j,{center:!0,border:!1,class:s.practiceItem,onClick:()=>{this.onClick(this.item)}},{icon:()=>t("div",{class:s.piCoverContainer},[t(w,{class:s.piCover,fit:"cover",src:this.item.avatar||I},null)]),title:()=>t("div",null,[t("div",{class:[s.piTitle,"van-ellipsis"]},[t("p",{class:s.piNameSubject},[t("span",{class:s.piName},[this.item.userName||`\u6E38\u5BA2${this.item.teacherId||""}`])]),this.starGrade?t(y,{readonly:!0,modelValue:this.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:11},null):t("span",{style:{fontSize:"12px",color:"#999999"}},[i("\u6682\u65E0\u8BC4\u5206")])]),t("div",{class:s.piContent},[this.item.schoolSubject&&t("p",{class:s.edu},[t(o,{size:14,name:D,style:{paddingRight:"5px"}},null),t("span",null,[this.item.schoolSubject])]),t("p",{class:s.courseInfo},[t("span",{class:s.classNum},[i("\u5DF2\u4E0A\u8BFE\u7A0B"),t("i",null,[this.item.expTime]),i("\u8282")]),t("span",{class:s.priceTime},[this.item.subjectPrice>0&&t(d,null,[t("i",null,[i("\xA5"),this.item.subjectPrice]),i("/")]),this.item.courseMinutes,i("\u5206\u949F")])])])])})}});function O(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!b(e)}const m=[{name:"\u4E0D\u9650\u5236",value:"",color:"var(--van-primary)"},{name:"\u5355\u4EF7\u6700\u9AD8",value:"subjectPrice DESC",color:"#333"},{name:"\u5355\u4EF7\u6700\u4F4E",value:"subjectPrice ASC",color:"#333"},{name:"\u8BFE\u65F6\u6570\u6700\u591A",value:"expTime DESC",color:"#333"},{name:"\u8BC4\u5206\u6700\u9AD8",value:"starGrade DESC",color:"#333"}];var pt=u({name:"practiceClass",data(){return{openStatus:!1,searchStatus:!1,subjectList:[],list:[],dataShow:!0,loading:!1,finished:!1,searchType:"organ",tempSort:{starGrade:"ALL",expTime:"ALL",subjectPrice:"ALL"},dataLoading:!1,params:{search:"",sort:"",subjectName:"",isScreen:!1,subjectId:null,page:1,rows:20},show:!1,height:"auto"}},async mounted(){var a,c;this.params.subjectId=((a=n.user.data)==null?void 0:a.subjectId)||null,this.params.subjectName=((c=n.user.data)==null?void 0:c.subjectName)||"";try{const h=await l.get("/api-student/subject/subjectSelect");this.subjectList=h.data||[]}catch{}const{height:e}=f(this.$refs.headers);this.height=e,this.getList()},methods:{onSearch(e){this.params.search=e,this.onSort()},onSort(){this.params.page=1,this.list=[],this.dataShow=!0,this.loading=!1,this.finished=!1,this.searchStatus=!1,this.getList()},onSheetSelect(e){m.forEach(a=>{a.color="#333",a.value===e.value&&(a.color="var(--van-primary)")}),this.params.sort=e.value,this.show=!1,this.onSort()},async getList(){try{if(this.dataLoading)return;this.dataLoading=!0;const e=await l.post("/api-student/courseSchedule/teacherList",{data:{...this.params}});this.dataLoading=!1,this.loading=!1;const a=e.data||{};if(this.list.length>0&&a.pageNo===1)return;this.list=this.list.concat(a.rows||[]),this.finished=a.pageNo>=a.totalPage,this.params.page=a.pageNo+1,this.dataShow=this.list.length>0}catch{this.dataShow=!1,this.finished=!0}}},render(){let e;return t("div",{style:{overflow:"hidden",minHeight:"100vh"}},[t(C,{class:"sticky",offsetTop:0,style:{background:"var(--van-primary)",height:this.height+"px !important",width:"100%"}},{default:()=>[t("div",{ref:"headers"},[t(g,{title:"\u966A\u7EC3\u8BFE",isFixed:!1,border:!1,backIconColor:"white",background:"var(--van-primary)",color:"#fff"},null),t(_,{placeholder:"\u8BF7\u8F93\u5165\u8001\u5E08\u540D\u79F0",inputBackground:"white",background:"var(--van-primary)",onSearch:this.onSearch},null),t("div",{class:r.filterSection},[t("div",null,[t(p,{class:[r.btn],type:"primary",size:"small",round:!0,plain:!0,onClick:()=>{this.searchStatus=!this.searchStatus,this.openStatus=!this.openStatus,this.searchType="organ"}},{default:()=>[this.params.subjectName,t(o,{classPrefix:"iconfont",name:"down",size:8,style:{marginLeft:"4px"},color:"var(--van-primary)"},null)]}),t(p,{class:[r.btn],size:"small",type:this.params.isScreen?"primary":"default",round:!0,plain:!0,onClick:()=>{this.params.isScreen=!this.params.isScreen,this.onSort()}},{default:()=>[i("30\u5929\u5185\u672A\u7EA6\u6EE1")]})]),t("div",null,[t("div",{class:r.dataItem,onClick:()=>{this.show=!0}},[i("\u7B5B\u9009"),t(o,{classPrefix:"iconfont",name:"down",size:8,style:{marginLeft:"4px"},color:"var(--van-primary)"},null)])])])])]}),this.dataShow?t(q,{loading:this.loading,"onUpdate:loading":a=>this.loading=a,finished:this.finished,finishedText:" ",immediateCheck:!1,class:[r.practiceList,"mb12"],onLoad:this.getList},O(e=this.list.map(a=>t(P,{item:a,onClick:()=>{this.$router.push({path:"/teacherHome",query:{teacherId:a.teacherId,tabs:"practice",subjectId:this.params.subjectId}})}},null)))?e:{default:()=>[e]}):t(S,{btnStatus:!1,classImgSize:"SMALL",tips:"\u6682\u65E0\u966A\u7EC3\u8001\u5E08"},null),t(v,{show:this.show,"onUpdate:show":a=>this.show=a,actions:m,cancelText:"\u53D6\u6D88",onSelect:this.onSheetSelect,closeOnClickAction:!0,onCancel:()=>this.show=!1},null),t(A,{show:this.searchStatus,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>this.searchStatus=!1,onClosed:()=>this.openStatus=!1},{default:()=>[this.searchType==="organ"&&this.openStatus&&t(N,{subjectList:this.subjectList,onSort:this.onSort,modelValue:this.params.subjectId,"onUpdate:modelValue":a=>this.params.subjectId=a,subjectName:this.params.subjectName,"onUpdate:subjectName":a=>this.params.subjectName=a},null)]})])}});export{pt as default};
|