detail.89b02fe1.js 4.6 KB

1
  1. import{d as b,ah as j,r as y,$ as v,c as s,aj as N,q as r,ba as m,ak as C,P as I,F as w,al as E,m as n}from"./index.5f7ffb46.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.abd668f7.js";import{G as L,a as d}from"./index.adf0b8fc.js";import{L as B}from"./index.9ef28852.js";import{C as F}from"./index.052b3caa.js";import{I as T}from"./index.276a5d68.js";import{T as x}from"./index.ab2541bb.js";import{P as G}from"./index.de1f78a6.js";import"./use-tab-status.69b57a37.js";import"./Picker.148c9d83.js";import"./index.6bbd7daa.js";import"./index.99e0cf1f.js";import"./index.61ab9823.js";function f(u){return typeof u=="function"||Object.prototype.toString.call(u)==="[object Object]"&&!E(u)}var K=b({name:"practice-detail",setup(){const u=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:u.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{}},o=async()=>{try{if(t.isClick)return;t.isClick=!0;const l=await n.post("/api-school/schoolWeekSalaryRecord/detailInfo/trainingPage",{data:{...t.params,id:u.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(c=>{c.subjectNameList=c.subjectNames?c.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,o()};return v(()=>{g(),S(),o()}),()=>{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:o,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};