1 |
- import{d as b,ah as j,r as y,$ as v,c as s,aj as N,q as r,b6 as m,ak as C,P as I,F as w,al as E,m as n}from"./index.1c621181.js";import{s as a}from"./index.module.ee4f9b91.js";import{i as k}from"./icon_student.660125da.js";import{C as p}from"./index.fd5ae97b.js";import{G as L,a as d}from"./index.5a8ac45d.js";import{L as B}from"./index.d5ee0b18.js";import{C as F}from"./index.2db9d877.js";import{I as T}from"./index.4c221cbe.js";import{T as x}from"./index.4e64eb97.js";import{P as G}from"./index.53518914.js";import"./use-tab-status.40058c51.js";import"./Picker.9bc4331c.js";import"./index.88a00aa9.js";import"./index.78a302c3.js";import"./index.d5b73933.js";function f(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!E(o)}var K=b({name:"practice-detail",setup(){const o=j(),t=y({subjectStatus:!1,subjectList:[],isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1,refreshing:!1,height:0},subjectName:"\u5168\u90E8\u58F0\u90E8",params:{type:null,subjectId:null,page:1,rows:20},statistics:{standardSalary:0,targetNum:0,actualSalary:0}}),g=async()=>{try{const{data:l}=await n.post("/api-school/schoolWeekSalaryRecord/detailInfo/trainingTitle",{data:{id:o.query.id}});t.statistics={standardSalary:l.standardSalary||0,targetNum:l.targetNum||0,actualSalary:l.actualSalary||0},console.log(l)}catch{}},S=async()=>{try{const{data:l}=await n.post("/api-school/subjectBasicConfig/page",{data:{page:1,rows:50}});t.subjectList=l.rows||[],t.subjectList.unshift({subjectId:"",subjectName:"\u5168\u90E8\u58F0\u90E8"})}catch{}},c=async()=>{try{if(t.isClick)return;t.isClick=!0;const l=await n.post("/api-school/schoolWeekSalaryRecord/detailInfo/trainingPage",{data:{...t.params,id:o.query.id}});t.listState.loading=!1,t.listState.refreshing=!1;const e=l.data||{};if(console.log(e),t.list.length>0&&e.current===1)return;const i=e.rows||[];i.forEach(u=>{u.subjectNameList=u.subjectNames?u.subjectNames.split(","):[]}),t.list=t.list.concat(i||[]),t.listState.finished=e.current>=e.pages,t.params.page=e.current+1,t.listState.dataShow=t.list.length>0,t.isClick=!1}catch{t.listState.dataShow=!1,t.listState.finished=!0,t.listState.refreshing=!1,t.isClick=!1}},h=()=>{t.params.page=1,t.list=[],t.listState.dataShow=!0,t.listState.loading=!1,t.listState.finished=!1,c()};return v(()=>{g(),S(),c()}),()=>{let l;return s(w,null,[s(N,null,null),s("div",{class:a.item},[s(p,{center:!0},{title:()=>s("div",{class:a.itemTitle},[s("div",{class:a.titleLine},null),s("span",null,[r("\u7EC3\u4E60\u5956\u52B1")])])}),s(L,{class:a.grid,columnNum:3,border:!1},{default:()=>[s(d,{class:a.gridBorderRight},{default:()=>[s("div",{class:a.gridItem},[s("div",{class:a.gridItemTop},[s("span",{class:a.topNum,style:{color:"#333"}},[m(t.statistics.standardSalary||0)]),r("\u5143/\u4EBA")]),s("div",null,[r("\u5956\u52B1\u6807\u51C6")])])]}),s(d,{class:a.gridBorderRight},{default:()=>[s("div",{class:a.gridItem},[s("div",{class:a.gridItemTop},[s("span",{class:a.topNum,style:{color:"#333"}},[t.statistics.targetNum]),r("\u4EBA")]),s("div",null,[r("\u7EC3\u4E60\u8FBE\u6807\u4EBA\u6570")])])]}),s(d,null,{default:()=>[s("div",{class:a.gridItem},[s("div",{class:a.gridItemTop},[s("span",{class:a.topNum},[m(t.statistics.actualSalary||0)]),r("\u5143")]),s("div",null,[r("\u5956\u52B1\u91D1\u989D")])])]})]})]),s("div",{class:"searchGroup-single",style:"padding-top: 0 !important;"},[s("div",{class:["searchItem",t.subjectStatus&&"searchItem-active"],onClick:()=>{t.subjectStatus=!t.subjectStatus}},[t.subjectName])]),t.listState.dataShow?s(B,{finished:t.listState.finished,finishedText:" ",class:[a.liveList],onLoad:c,immediateCheck:!1},{default:()=>[s(F,{inset:!0,class:a.cellGroup},f(l=t.list.map(e=>s(p,{center:!0},{icon:()=>s(T,{src:e.avatar||k,class:a.img},null),title:()=>s("div",{class:a.userInfo},[s("div",{class:a.userName},[e.nickname]),s("div",{class:a.subjectNames},[e.subjectNameList.map(i=>s(x,{textColor:"#F67146",color:"#FFE7DA"},f(i)?i:{default:()=>[i]}))])]),value:()=>s("div",{class:a.mins},[s("div",{class:a.nums},[s("span",null,[e.practiceTimes]),r(" \u5206\u949F")]),s("div",{class:a.text},[r("\u7EC3\u4E60\u65F6\u957F")])])})))?l:{default:()=>[l]})]}):s(C,{btnStatus:!1,tips:"\u6682\u65E0\u6570\u636E"},null),s(I,{show:t.subjectStatus,"onUpdate:show":e=>t.subjectStatus=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[s(G,{columns:t.subjectList,onCancel:()=>t.subjectStatus=!1,onConfirm:e=>{console.log(e);const i=e.selectedOptions[0];t.subjectName=i.subjectName,t.params.subjectId=i.subjectId,h(),t.subjectStatus=!1},columnsFieldNames:{text:"subjectName",value:"subjectId"}},null)]})])}}});export{K as default};
|