unitDetail.bc52b067.js 6.6 KB

1
  1. import{d as E,ag as C,ah as F,g as y,r as g,$ as T,m as h,c as t,ak as I,al as N,R as d,y as D,aj as O,a5 as U,B as L,q as b}from"./index.5f7ffb46.js";import{O as P}from"./index.7790de2a.js";import{q as k}from"./quest-icon.f1b2f4e3.js";import{U as x,s as f}from"./unit-list-item.298a198d.js";import{i as G}from"./icon_teacher.df08d662.js";import{O as q}from"./index.1d6ac2c5.js";import{u as _}from"./index.b28db9f5.js";import{R as w,a as p}from"./index.ba71b8ca.js";import{T as S}from"./index.ab2541bb.js";import{L as V}from"./index.9ef28852.js";import{C as z}from"./index.abd668f7.js";import{I as M}from"./index.276a5d68.js";import{O as R}from"./index.95a99ca5.js";import{T as W,a as B}from"./index.6bbd7daa.js";import"./icon-edit.664c5ff1.js";import"./icon-muit-message.0a72e92d.js";import"./index.052b3caa.js";import"./Checker.40bdbb46.js";import"./use-tab-status.69b57a37.js";import"./index.99e0cf1f.js";import"./index.61ab9823.js";const $="_radioSection_fvm6e_1",j="_radioItem_fvm6e_8",H="_unitList_fvm6e_19",J="_liveList_fvm6e_22",K="_manageCell_fvm6e_27",Q="_TagWrap_fvm6e_30",X="_studentTag_fvm6e_35",Y="_A_PASS_fvm6e_45",Z="_B_NO_PASS_fvm6e_49",tt="_C_ING_fvm6e_53",et="_D_NO_SUBMIT_fvm6e_57",at="_img_fvm6e_61",st="_name_fvm6e_68",ut="_phone_fvm6e_75",it="_status_fvm6e_81",ot="_frozen_fvm6e_86";var s={radioSection:$,radioItem:j,unitList:H,liveList:J,manageCell:K,TagWrap:Q,studentTag:X,A_PASS:Y,B_NO_PASS:Z,C_ING:tt,D_NO_SUBMIT:et,img:at,name:st,phone:ut,status:it,frozen:ot};function lt(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!N(o)}var v=E({name:"unit-student-list",props:{type:{type:Number,default:1}},setup(o){C();const r=F(),c=y.platformApi,u=g({classGroupUnitExaminationId:r.query.id,status:"",page:1}),e=g({list:[],listState:{dataShow:!0,loading:!1,finished:!1,refreshing:!1,height:0},oldValue:""});T(()=>{l()});const l=async()=>{try{const i=await h.post(`${c}/studentUnitExamination/studentDetail`,{data:{...u},requestType:"form"});e.listState.loading=!1,e.listState.refreshing=!1;const a=i.data||{};if(e.list.length>0&&a.current===1)return;e.list=e.list=a[o.type]||[],e.listState.dataShow=e.list.length>0,e.listState.finished=!0}catch{e.listState.dataShow=!1,e.listState.finished=!0}},m=()=>{u.page=1,e.list=[],e.listState.dataShow=!0,e.listState.loading=!1,e.listState.finished=!1,l()},A=i=>{l()},n=i=>{i==e.oldValue?(u.status="",e.oldValue=""):e.oldValue=i};return()=>{let i;return t("div",{class:s.unitList},[t(w,{"checked-color":"#FF8057",modelValue:u.status,"onUpdate:modelValue":a=>u.status=a,direction:"horizontal",onChange:A},{default:()=>[t(S,{size:"large",type:"primary",color:u.status!=="A_PASS"?"#EAEAEA":"#FF8057",textColor:u.status!=="A_PASS"?"#AAA":"#FFF",class:s.radioSection},{default:()=>[t(p,{class:s.radioItem,name:"A_PASS",onClick:()=>n("A_PASS")},null),_.A_PASS]}),t(S,{size:"large",type:"primary",color:u.status!=="B_NO_PASS"?"#EAEAEA":"#FF8057",textColor:u.status!=="B_NO_PASS"?"#AAA":"#FFF",class:s.radioSection},{default:()=>[t(p,{class:s.radioItem,name:"B_NO_PASS",onClick:()=>n("B_NO_PASS")},null)," ",_.B_NO_PASS]}),t(S,{size:"large",type:"primary",color:u.status!=="C_ING"?"#EAEAEA":"#FF8057",textColor:u.status!=="C_ING"?"#AAA":"#FFF",class:s.radioSection},{default:()=>[t(p,{class:s.radioItem,name:"C_ING",onClick:()=>n("C_ING")},null)," ",_.C_ING]}),t(S,{size:"large",type:"primary",color:u.status!=="D_NO_SUBMIT"?"#EAEAEA":"#FF8057",textColor:u.status!=="D_NO_SUBMIT"?"#AAA":"#FFF",class:s.radioSection},{default:()=>[t(p,{class:s.radioItem,name:"D_NO_SUBMIT",onClick:()=>n("D_NO_SUBMIT")},null),_.D_NO_SUBMIT]})]}),e.listState.dataShow?t(q,{modelValue:e.listState.refreshing,"onUpdate:modelValue":a=>e.listState.refreshing=a,onRefresh:m,style:{minHeight:"calc(50vh)"}},{default:()=>[t(V,{finished:e.listState.finished,finishedText:" ",class:[s.liveList],immediateCheck:!1},lt(i=e.list.map(a=>t(z,{center:!0,class:s.manageCell},{icon:()=>t(M,{class:s.img,src:a.avatar?a.avatar:G},null),title:()=>t("div",{class:s.content},[t("div",{class:s.TagWrap},[" ",t("p",{class:[s.name,"van-ellipsis"]},[a.studentName?a.studentName:"--"]),t("div",{class:[s.studentTag,s[a.status]]},[_[a.status]])]),a.submitTime?t("p",{class:s.phone},[a.submitTime]):""])})))?i:{default:()=>[i]})]}):t(I,{btnStatus:!1,tips:"\u6682\u65E0\u5B66\u5458"},null)])}}}),Dt=E({name:"unitDetail",setup(){const o=C(),r=F(),c=g({studentList:{}});d(!1),d(!1);const u=y.platformApi,e=d(1),l=d({}),m=d(!1),A=async()=>{try{const a=await h.post(`${u}/classGroupUnitExamination/detail`,{data:{classGroupUnitExaminationId:r.query.id},requestType:"form"});l.value=a.data,console.log("\u{1F680} ~ file: unitDetail.tsx:45 ~ getDetail ~ info.value",l.value)}catch(a){console.log(a)}},n=async()=>{try{const{data:a}=await h.post(`${u}/studentUnitExamination/studentDetail`,{data:{classGroupUnitExaminationId:r.query.id},requestType:"form"});console.log(a),c.studentList=a||{}}catch{}},i=D(()=>!(c.studentList[e.value]&&c.studentList[e.value].length>0));return T(()=>{A(),n()}),()=>t("div",{class:f.unitDetail},[t(O,null,null),t(x,{item:l.value},null),t("div",{class:f.tabsWrap},[t(U,{class:f.tabsWrapIcon,name:k,size:18,color:"#333",onClick:()=>{m.value=!0}},null),t(W,{active:e.value,"onUpdate:active":a=>e.value=a,class:f.rankTabs,background:"#F8F8F8","title-active-color":"#333333","title-inactive-color":"#777",color:"#FF8057",lineWidth:20,lineHeight:4,shrink:!0},{default:()=>[t(B,{name:1,title:"\u5355\u56E2\u5B66\u5458"},{default:()=>[t(v,{type:1},null)]}),t(B,{name:2,title:"\u53CC\u56E2\u5B66\u5458"},{default:()=>[t(v,{type:2},null)]}),t(B,{name:3,title:"\u591A\u56E2\u5B66\u5458"},{default:()=>[t(v,{type:3},null)]})]})]),t(P,{position:"bottom"},{default:()=>[t("div",{class:["btnGroup"]},[t(L,{block:!0,round:!0,type:"primary",disabled:i.value,onClick:()=>{o.push({path:"/unit-detail",query:{id:r.query.id,level:e.value}})}},{default:()=>[b("\u6D4B\u8BD5\u62A5\u544A")]})])]}),t(R,{show:m.value,"onUpdate:show":a=>m.value=a,title:"\u5B66\u5458\u5206\u7C7B",message:"\u6839\u636E\u5B66\u5458\u5165\u56E2\u7684\u6279\u6B21\u5BF9\u4E0D\u540C\u8BAD\u7EC3\u9636\u6BB5\u7684\u5B66\u5458\u8FDB\u884C\u5206\u7C7B\uFF0C\u4E0D\u540C\u8BAD\u7EC3\u9636\u6BB5\u7684\u5B66\u5458\u53EF\u5E03\u7F6E\u4E0D\u540C\u6807\u51C6\u7684\u8BFE\u540E\u4F5C\u4E1A\u548C\u9636\u6BB5\u81EA\u6D4B\u5185\u5BB9\u3002\\n\\n\u5355\u56E2\u5B66\u5458\uFF1A\u6700\u65B0\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458\\n\u53CC\u56E2\u5B66\u5458\uFF1A\u8F83\u65E9\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458\\n\u591A\u56E2\u5B66\u5458\uFF1A\u6700\u65E9\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458",messageAlign:"left",confirmButtonText:"\u6211\u77E5\u9053\u4E86"},null)])}});export{Dt as default};