1 |
- import{d as b,aV as j,r as y,$ as v,c as s,q as r,b3 as m,ai as N,P as C,F as I,ak as w,m as n}from"./index.ffe80dbe.js";import{O as E}from"./index.a0ef77e4.js";import{s as a}from"./index.module.cb12d10a.js";import{i as k}from"./icon_student.660125da.js";import{C as p}from"./index.ea031708.js";import{G as L,a as d}from"./index.72ca63b9.js";import{L as B}from"./index.cafcb8b5.js";import{C as F}from"./index.914765a1.js";import{I as T}from"./index.7e972106.js";import{T as O}from"./index.55ba7429.js";import{P as x}from"./index.777c6c1a.js";import"./index.1d5c6f70.js";import"./use-tab-status.5a3cd090.js";import"./index.466e527a.js";import"./index.b4b77b5a.js";import"./index.02edecb1.js";function f(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!w(o)}var Q=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:i}=await n.post("/api-school/schoolWeekSalaryRecord/detailInfo/trainingTitle",{data:{id:o.query.id}});t.statistics={standardSalary:i.standardSalary||0,targetNum:i.targetNum||0,actualSalary:i.actualSalary||0},console.log(i)}catch{}},S=async()=>{try{const{data:i}=await n.post("/api-school/subjectBasicConfig/page",{data:{page:1,rows:50}});t.subjectList=i.rows||[],t.subjectList.unshift({subjectId:"",subjectName:"\u5168\u90E8\u58F0\u90E8"})}catch{}},c=async()=>{try{if(t.isClick)return;t.isClick=!0;const i=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=i.data||{};if(console.log(e),t.list.length>0&&e.current===1)return;const l=e.rows||[];l.forEach(u=>{u.subjectNameList=u.subjectNames?u.subjectNames.split(","):[]}),t.list=t.list.concat(l||[]),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 i;return s(I,null,[s(E,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(i=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(l=>s(O,{textColor:"#F67146",color:"#FFE7DA"},f(l)?l:{default:()=>[l]}))])]),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")])])})))?i:{default:()=>[i]})]}):s(N,{btnStatus:!1,tips:"\u6682\u65E0\u6570\u636E"},null),s(C,{show:t.subjectStatus,"onUpdate:show":e=>t.subjectStatus=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[s(x,{columns:t.subjectList,onCancel:()=>t.subjectStatus=!1,onConfirm:e=>{console.log(e);const l=e.selectedOptions[0];t.subjectName=l.subjectName,t.params.subjectId=l.subjectId,h(),t.subjectStatus=!1},columnsFieldNames:{text:"subjectName",value:"subjectId"}},null)]})])}}});export{Q as default};
|