unitDetail.50778bc3.js 6.6 KB

12345
  1. import{d as T,ag as I,ah as N,g as F,r as h,$ as C,m as y,c as t,ak as O,al as B,R as d,y as U,aj as D,a5 as E,B as L,q as b}from"./index.332c7f08.js";import{O as P}from"./index.d7c1b6ac.js";import{q as k}from"./quest-icon.f1b2f4e3.js";import{U as x,s as f}from"./unit-list-item.779fc91e.js";import{i as G}from"./icon_teacher.df08d662.js";import{O as q}from"./index.626c48f9.js";import{u as _}from"./index.b28db9f5.js";import{R as w,a as p}from"./index.a4155be3.js";import{T as S}from"./index.98482791.js";import{L as V}from"./index.b186dfda.js";import{C as z}from"./index.91135ff9.js";import{I as M}from"./index.96a8db5e.js";import{O as R}from"./index.a8f5f4b5.js";import{T as W,a as A}from"./index.7c580591.js";import"./icon-edit.664c5ff1.js";import"./icon-muit-message.0a72e92d.js";import"./index.324108a5.js";import"./Checker.1af5496e.js";import"./use-tab-status.9d769af8.js";import"./index.1e2dfe6e.js";import"./index.4aa8e076.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",it="_phone_fvm6e_75",ot="_status_fvm6e_81",lt="_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:it,status:ot,frozen:lt};function nt(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!B(l)}var g=T({name:"unit-student-list",props:{type:{type:Number,default:1}},setup(l){I();const u=N(),c=F.platformApi,i=h({classGroupUnitExaminationId:u.query.id,status:"",page:1}),e=h({list:[],listState:{dataShow:!0,loading:!1,finished:!1,refreshing:!1,height:0},oldValue:""});C(()=>{n()});const n=async()=>{try{const o=await y.post(`${c}/studentUnitExamination/studentDetail`,{data:{...i},requestType:"form"});e.listState.loading=!1,e.listState.refreshing=!1;const a=o.data||{};if(e.list.length>0&&a.current===1)return;e.list=e.list=a[l.type]||[],e.listState.dataShow=e.list.length>0,e.listState.finished=!0}catch{e.listState.dataShow=!1,e.listState.finished=!0}},m=()=>{i.page=1,e.list=[],e.listState.dataShow=!0,e.listState.loading=!1,e.listState.finished=!1,n()},v=o=>{n()},r=o=>{o==e.oldValue?(i.status="",e.oldValue=""):e.oldValue=o};return()=>{let o;return t("div",{class:s.unitList},[t(w,{"checked-color":"#FF8057",modelValue:i.status,"onUpdate:modelValue":a=>i.status=a,direction:"horizontal",onChange:v},{default:()=>[t(S,{size:"large",type:"primary",color:i.status!=="A_PASS"?"#EAEAEA":"#FF8057",textColor:i.status!=="A_PASS"?"#AAA":"#FFF",class:s.radioSection},{default:()=>[t(p,{class:s.radioItem,name:"A_PASS",onClick:()=>r("A_PASS")},null),_.A_PASS]}),t(S,{size:"large",type:"primary",color:i.status!=="B_NO_PASS"?"#EAEAEA":"#FF8057",textColor:i.status!=="B_NO_PASS"?"#AAA":"#FFF",class:s.radioSection},{default:()=>[t(p,{class:s.radioItem,name:"B_NO_PASS",onClick:()=>r("B_NO_PASS")},null)," ",_.B_NO_PASS]}),t(S,{size:"large",type:"primary",color:i.status!=="C_ING"?"#EAEAEA":"#FF8057",textColor:i.status!=="C_ING"?"#AAA":"#FFF",class:s.radioSection},{default:()=>[t(p,{class:s.radioItem,name:"C_ING",onClick:()=>r("C_ING")},null)," ",_.C_ING]}),t(S,{size:"large",type:"primary",color:i.status!=="D_NO_SUBMIT"?"#EAEAEA":"#FF8057",textColor:i.status!=="D_NO_SUBMIT"?"#AAA":"#FFF",class:s.radioSection},{default:()=>[t(p,{class:s.radioItem,name:"D_NO_SUBMIT",onClick:()=>r("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},nt(o=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]):""])})))?o:{default:()=>[o]})]}):t(O,{btnStatus:!1,tips:"\u6682\u65E0\u5B66\u5458"},null)])}}}),Ut=T({name:"unitDetail",setup(){const l=I(),u=N(),c=h({studentList:{}});d(!1),d(!1);const i=F.platformApi,e=d(1),n=d({}),m=d(!1),v=async()=>{try{const a=await y.post(`${i}/classGroupUnitExamination/detail`,{data:{classGroupUnitExaminationId:u.query.id},requestType:"form"});n.value=a.data,console.log("\u{1F680} ~ file: unitDetail.tsx:45 ~ getDetail ~ info.value",n.value)}catch(a){console.log(a)}},r=async()=>{try{const{data:a}=await y.post(`${i}/studentUnitExamination/studentDetail`,{data:{classGroupUnitExaminationId:u.query.id},requestType:"form"});console.log(a),c.studentList=a||{}}catch{}},o=U(()=>!(c.studentList[e.value]&&c.studentList[e.value].length>0));return C(()=>{v(),r()}),()=>t("div",{class:f.unitDetail},[t(D,null,null),t(x,{item:n.value},null),t("div",{class:f.tabsWrap},[t(E,{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(A,{name:1,title:"\u5355\u56E2\u5B66\u5458"},{default:()=>[t(g,{type:1},null)]}),t(A,{name:2,title:"\u53CC\u56E2\u5B66\u5458"},{default:()=>[t(g,{type:2},null)]}),t(A,{name:3,title:"\u591A\u56E2\u5B66\u5458"},{default:()=>[t(g,{type:3},null)]})]})]),t(P,{position:"bottom"},{default:()=>[t("div",{class:["btnGroup"]},[t(L,{block:!0,round:!0,type:"primary",disabled:o.value,onClick:()=>{l.push({path:"/unit-detail",query:{id:u.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
  2. \u5355\u56E2\u5B66\u5458\uFF1A\u6700\u65B0\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458
  3. \u53CC\u56E2\u5B66\u5458\uFF1A\u8F83\u65E9\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458
  4. \u591A\u56E2\u5B66\u5458\uFF1A\u6700\u65E9\u8FDB\u5165\u672C\u4E50\u56E2\u7684\u5B66\u5458`,messageAlign:"left",confirmButtonText:"\u6211\u77E5\u9053\u4E86"},null)])}});export{Ut as default};