1 |
- import{d as D,ag as I,R as i,Z as F,c as e,q as u,a5 as C,F as W,k as P,o as g,f as Y,r as S,ah as _,$ as x,m as k,ai as E,P as T,aj as V,ak as A}from"./index.ffe80dbe.js";import{O as U}from"./index.c7af3af2.js";import{O as q}from"./index.4ddd16f0.js";import{O as $}from"./index.45b38760.js";import{s as G}from"./student-icon.30fb072d.js";import{m as Z}from"./msg-icon.adf37f7b.js";import{s as z,p as H}from"./phone-icon.7f60c6fb.js";import{A as J}from"./index.84851ef1.js";import{O as K}from"./index.6daa5b04.js";import{D as Q}from"./index.ff4fe619.js";import{L as X}from"./index.cafcb8b5.js";import{P as y}from"./index.777c6c1a.js";import"./index.92ec0bf4.js";import"./index.ea031708.js";import"./utils.18cb7a73.js";import"./use-tab-status.5a3cd090.js";import"./index.466e527a.js";import"./index.b4b77b5a.js";import"./index.02edecb1.js";const ee="_itemWrap_6hke8_1",te="_itemTop_6hke8_8",oe="_itemTopLeft_6hke8_16",ae="_headIcon_6hke8_21",se="_name_6hke8_33",ce="_tag_6hke8_41",ne="_itemTopRight_6hke8_54",re="_itemBottom_6hke8_63",le="_msgMain_6hke8_70",ie="_msgsub_6hke8_85",me="_itemBottomLeft_6hke8_94",ue="_itemBottomRight_6hke8_109",pe="_arrow_6hke8_113",he="_bottomTitle_6hke8_126",de="_bottomTitleLeft_6hke8_140",ve="_bottomConent_6hke8_153",fe="_bottomImgWrap_6hke8_159",ge="_bottomConentLeft_6hke8_168",_e="_bottomConentRight_6hke8_169";var s={itemWrap:ee,itemTop:te,itemTopLeft:oe,headIcon:ae,name:se,tag:ce,itemTopRight:ne,itemBottom:re,msgMain:le,msgsub:ie,itemBottomLeft:me,itemBottomRight:ue,arrow:pe,bottomTitle:he,bottomTitleLeft:de,bottomConent:ve,bottomImgWrap:fe,bottomConentLeft:ge,bottomConentRight:_e};const f=i({});var we=D({props:["item","forms"],name:"student-item",setup(r){const t=I(),c=i(!1),w=()=>{c.value=!0},p=()=>{c.value=!1};F(()=>r.forms,n=>{f.value=n},{deep:!0});const b=async()=>{try{await P({api:"joinChatGroup",content:{type:"single",id:r.item.imUserId}}),p()}catch{g("\u53D1\u8D77\u804A\u5929\u5931\u8D25"),p()}},l=async()=>{try{await P({api:"callPhone",content:{phone:r.item.phone}}),p()}catch{g("\u53D1\u8D77\u804A\u5929\u5931\u8D25"),p()}},d=()=>{console.log(f.value.practiceMonth,f.value.practiceMonthName),t.push({path:"/exercis-detail",query:{id:r.item.id,practiceMonth:f.value.practiceMonth,practiceMonthName:f.value.practiceMonthName}})};return()=>e(W,null,[e("div",null,[e("div",{class:s.itemWrap,onClick:d},[e("div",{class:s.itemTop},[e("div",{class:s.itemTopLeft},[e("div",{class:s.headIcon},[e("img",{src:r.item.avatar?r.item.avatar:G,alt:""},null)]),e("p",{class:s.name},[r.item.nickname]),e("div",{class:s.tag},[r.item.subjectNames?r.item.subjectNames:"\u6682\u65E0\u58F0\u90E8"])]),e("div",{class:s.itemTopRight},[e("div",{class:s.msgIcon,onClick:n=>{n.stopPropagation(),n.preventDefault(),w()}},[e("img",{src:Z,alt:""},null)])])]),e("div",{class:s.itemBottom},[e("div",{class:s.itemBottomLeft},[e("p",{class:s.msgMain},[r.item.practiceDays?r.item.practiceDays:0,u(" "),e("span",null,[u("\u5929")])]),e("p",{class:s.msgsub},[u("\u7EC3\u4E60\u5929\u6570")])]),e("div",{class:s.itemBottomRight},[e("p",{class:s.msgMain},[r.item.practiceTimes?r.item.practiceTimes:0,e("span",null,[u("\u5206\u949F")])]),e("p",{class:s.msgsub},[u("\u7EC3\u4E60\u65F6\u957F")]),e(C,{class:s.arrow,name:"arrow"},null)])])])]),e(J,{class:"bottomSheet",show:c.value,"onUpdate:show":n=>c.value=n},{default:()=>[e("div",{class:s.bottomConent},[e("div",{class:s.bottomConentLeft,onClick:n=>{n.stopPropagation(),n.preventDefault(),b()}},[e("div",{class:s.bottomImgWrap},[e("img",{src:z,alt:""},null)]),e("p",null,[u("\u53D1\u9001\u6D88\u606F")])]),e("div",{class:s.bottomConentRight,onClick:n=>{n.stopPropagation(),n.preventDefault(),l()}},[e("div",{class:s.bottomImgWrap},[e("img",{src:H,alt:""},null)]),e("p",null,[u("\u62E8\u6253\u7535\u8BDD")])])])],description:()=>e("div",{class:s.bottomTitle},[e("div",{class:s.bottomTitleLeft},[e("span",null,null),e("p",null,[u("\u8054\u7CFB\u65B9\u5F0F")])]),e("div",{class:s.bottomTitleRight,onClick:n=>{n.stopPropagation(),n.preventDefault(),p()}},[e(C,{class:s.cross,name:"cross"},null)])])})])}});const be="_chioseWrap_kqg22_1",ke="_searchBandWrap_kqg22_9",Te="_searchBand_kqg22_9",Ce="_recordSearch_kqg22_22";var Pe={chioseWrap:be,searchBandWrap:ke,searchBand:Te,recordSearch:Ce};function Se(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!A(r)}var $e=D({name:"exercise-record",setup(){const r=i(Y.platformApi);I();const t=S({showPopoverTime:!1,showPopoverOrchestra:!1,showPopoverSubject:!1,showPopoverSort:!1,actions:[],subjects:[],actionSorts:[{name:"\u6309\u5929\u6570",value:"PRACTICE_DAY",selected:!0},{name:"\u6309\u65F6\u957F",value:"PRACTICE_TIMES"}],currentDate:[_().format("YYYY"),_().format("MM")]}),c=S({practiceMonth:t.currentDate[0]+""+t.currentDate[1],practiceMonthName:t.currentDate[0]+"\u5E74"+t.currentDate[1]+"\u6708",orchestraId:"",orchestraName:"\u5168\u90E8\u4E50\u56E2",subjectId:"",subjectName:"\u5168\u90E8\u58F0\u90E8",sortType:"PRACTICE_DAY",sortTypeName:"\u6309\u5929\u6570",keyword:"",page:1,rows:20}),w=i(new Date(_().subtract(10,"year").format("YYYY-MM-DD"))),p=i(new Date(_().add(10,"year").format("YYYY-MM-DD"))),b=i(["year","month"]),l=i(!1),d=i(!1),n=i(!1),v=i(!1),h=i([]),m=async()=>{d.value=!0;try{l.value&&(c.page=1,h.value=[],l.value=!1);const a=await k.post(`${r.value}/student/page`,{data:{...c}});if(h.value.length>0&&a.data.pages===1)return;c.page=a.data.current+1,h.value=h.value.concat(a.data.rows||[]),v.value=h.value.length>0,console.log(v.value," showContact.value "),d.value=!1,n.value=a.data.current>=a.data.pages}catch(a){const o=a.message;g(o),v.value=!1,n.value=!0}};x(()=>{m(),N(),R()});const j=a=>{c.sortType=a.value,c.sortTypeName=a.name,t.actionSorts.forEach(o=>{o.selected=!1}),a.selected=!0,t.showPopoverSort=!1,l.value=!0,m()},M=a=>{c.practiceMonth=a.selectedValues[0]+a.selectedValues[1],c.practiceMonthName=a.selectedValues[0]+"\u5E74"+a.selectedValues[1]+"\u6708",t.showPopoverTime=!1,l.value=!0,m()},B=a=>{const o=a.selectedOptions[0]||{};c.orchestraId=o.value,c.orchestraName=o.name,t.showPopoverOrchestra=!1,l.value=!0,m()},O=a=>{const o=a.selectedOptions[0]||{};c.subjectId=o.value,c.subjectName=o.name,t.showPopoverSubject=!1,l.value=!0,m()},N=async()=>{try{const a=await k.post(`${r.value}/orchestra/page`,{data:{page:1,rows:9999,status:"DONE"}});t.actions=a.data.rows.map(o=>({name:o.name,value:o.id})),t.actions.unshift({name:"\u5168\u90E8\u4E50\u56E2",value:""})}catch(a){const o=a.message;g(o)}},R=async()=>{try{const a=await k.post(`${r.value}/subjectBasicConfig/page`,{data:{page:1,rows:9999}});t.subjects=a.data.rows.map(o=>({name:o.subjectName,value:o.subjectId})),t.subjects.unshift({name:"\u5168\u90E8\u58F0\u90E8",value:""})}catch(a){const o=a.message;g(o)}},L=()=>{n.value=!1,d.value=!0,m()};return()=>{let a;return e("div",{class:!v.value&&"emptyRootContainer"},[e(q,{position:"top",background:"#F8F8F8"},{default:()=>[e("div",null,[e(U,{placeholder:"\u8BF7\u8F93\u5165\u5B66\u751F\u59D3\u540D",class:Pe.recordSearch,onSearch:o=>{c.keyword=o,l.value=!0,m()}},null),e("div",{class:"searchGroup"},[e("div",{class:["searchItem",t.showPopoverTime?"searchItem-active":""],onClick:()=>{t.showPopoverTime=!0}},[e("span",null,[c.practiceMonthName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem",t.showPopoverOrchestra?"searchItem-active":""],onClick:()=>{t.showPopoverOrchestra=!0}},[e("span",null,[c.orchestraName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem",t.showPopoverSubject?"searchItem-active":""],onClick:()=>{t.showPopoverSubject=!0}},[e("span",null,[c.subjectName]),e("i",{class:"arrow"},null)]),e("div",{class:["searchItem",t.showPopoverSort?"searchItem-active":""],onClick:()=>{t.showPopoverSort=!0}},[e("span",null,[c.sortTypeName]),e("i",{class:"arrow"},null)])])])]}),v.value?e($,{modelValue:l.value,"onUpdate:modelValue":o=>l.value=o,onRefresh:L,style:"min-height: 100vh;"},{default:()=>[e(X,{"loading-text":" ",finished:n.value,style:{paddingTop:"12px"},"finished-text":"\u6CA1\u6709\u66F4\u591A\u4E86",onLoad:m},Se(a=h.value.map(o=>e(we,{item:o,forms:c},null)))?a:{default:()=>[a]})]}):e(E,{tips:"\u6682\u65E0\u7EC3\u4E60\u8BB0\u5F55"},null),e(T,{show:t.showPopoverTime,"onUpdate:show":o=>t.showPopoverTime=o,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(Q,{onCancel:()=>{t.showPopoverTime=!1},onConfirm:M,modelValue:t.currentDate,"onUpdate:modelValue":o=>t.currentDate=o,minDate:w.value,formatter:V,maxDate:p.value,columnsType:b.value},null)]}),e(K,{show:t.showPopoverSort,"onUpdate:show":o=>t.showPopoverSort=o,actions:t.actionSorts,onSelect:j},null),e(T,{show:t.showPopoverOrchestra,"onUpdate:show":o=>t.showPopoverOrchestra=o,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(y,{columns:t.actions,onCancel:()=>t.showPopoverOrchestra=!1,onConfirm:o=>B(o),columnsFieldNames:{text:"name",value:"value"}},null)]}),e(T,{show:t.showPopoverSubject,"onUpdate:show":o=>t.showPopoverSubject=o,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(y,{columns:t.subjects,onCancel:()=>t.showPopoverSubject=!1,onConfirm:o=>O(o),columnsFieldNames:{text:"name",value:"value"}},null)]})])}}});export{$e as default};
|