var D=(s,f,n)=>new Promise((C,g)=>{var m=r=>{try{t(n.next(r))}catch(u){g(u)}},c=r=>{try{t(n.throw(r))}catch(u){g(u)}},t=r=>r.done?C(r.value):Promise.resolve(r.value).then(m,c);t((n=n.apply(s,f)).next())});import{_ as O,c as _,w as e,j as T,C as k,E as v,D as w,o,k as a,i as p,p as d,t as l,a1 as L,L as y,M as x,N as b,q as E,f as R}from"./index-CZJgrp0v.js";import{_ as B}from"./uv-tags.Iqd2Do9l.js";import{j as I}from"./skillCertification.CotfeN81.js";const N={name:"skillCard",props:{data:{type:Object,default:()=>({})},showOperate:{type:Boolean,default:!1},isEditRecord:{type:Boolean,default:!1}},data(){return{}},methods:{toEdit(){this.$emit("edit",this.data)},toDelete(){this.$emit("delete",this.data)},getTypeText(s){return{referee:"裁判员",athlete:"运动员",volunteer:"志愿者"}[s]||""},getStatusText(s){return{passed:"已通过",rejected:"未通过",pending:"待审核"}[s]||""},formatTime(s){return s}}};function V(s,f,n,C,g,m){const c=k(v("uv-tags"),B),t=T,r=E,u=k(v("uv-icon"),w);return o(),_(t,{class:"score-card"},{default:e(()=>[a(t,{class:"top-box"},{default:e(()=>[a(t,{class:"flex"},{default:e(()=>{var i;return[a(c,{text:(i=n.data.changeDataObject.dictName)==null?void 0:i.split(",")[0],bgColor:"#ECF5FF",color:"#0067c0",borderColor:"#D9ECFF"},null,8,["text"]),a(t,{class:"title"},{default:e(()=>[d(l(n.data.eventName),1)]),_:1})]}),_:1}),a(t,null,{default:e(()=>[a(t,{class:L(["status-tag",n.data.status==="passed"?"green":"yellow"])},{default:e(()=>[d(l(n.data.changeDataObject.eventTypeCn),1)]),_:1},8,["class"])]),_:1})]),_:1}),n.data.gradeChangeRecordType==="add"?(o(),_(t,{key:0,class:"bottom-box two-col"},{default:e(()=>[a(t,null,{default:e(()=>[d("队员要求："+l(n.data.changeDataObject.teamMemberTypeCn),1)]),_:1}),a(t,null,{default:e(()=>[d("代表身份："+l(n.data.changeDataObject.gradeRecordIdentityCn),1)]),_:1}),a(t,null,{default:e(()=>[d("所在校区："+l(n.data.changeDataObject.campusCn),1)]),_:1}),a(t,null,{default:e(()=>[d("成绩类型："+l(n.data.changeDataObject.gradeDemandTypeCn),1)]),_:1}),a(t,null,{default:e(()=>[d("成绩："+l(n.data.changeDataObject.grade),1)]),_:1})]),_:1})):(o(),_(t,{key:1,class:"bottom-box"},{default:e(()=>[(o(!0),y(x,null,b(n.data.changeContent,(i,h)=>(o(),_(t,{class:"flex mb-8rpx",key:h},{default:e(()=>[a(t,null,{default:e(()=>[d(l(i.fieldValue)+"： ",1),a(r,{style:{color:"#0067c0"}},{default:e(()=>[d(l(i.oldValue),1)]),_:2},1024)]),_:2},1024),a(t,{class:"change-tag"},{default:e(()=>[d(" 修改为 "),a(r,{style:{color:"#0067c0"}},{default:e(()=>[d(l(i.newValue),1)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})),n.showOperate?(o(),_(t,{key:2,class:"flx-end"},{default:e(()=>[a(t,{class:"flx-box mr-36rpx",onClick:m.toDelete},{default:e(()=>[a(u,{name:"trash",color:"#606266",size:"22"}),a(t,{class:"des"},{default:e(()=>[d("删除")]),_:1})]),_:1},8,["onClick"]),a(t,{class:"flx-box",onClick:m.toEdit},{default:e(()=>[a(u,{name:"edit-pen",color:"#606266",size:"22"}),a(t,{class:"des"},{default:e(()=>[d("编辑")]),_:1})]),_:1},8,["onClick"])]),_:1})):p("",!0)]),_:1})}const F=O(N,[["render",V],["__scopeId","data-v-ec7ebf0a"]]),M={name:"skillCertificationRecord",components:{RecordCard:F},onLoad(s){s.gradeDetermId&&(this.gradeDetermId=s.gradeDetermId,this.getChangeRecordPage())},data(){return{gradeDetermId:"",recordList:[]}},methods:{getChangeRecordPage(){return D(this,null,function*(){let s=yield I({gradeDetermId:this.gradeDetermId});if(s.code!==0){this.$showToastNone(s.msg);return}(s.data||[]).forEach(f=>{(f.gradeChangeRecordListRespVOList||[]).forEach(n=>{try{n.changeContent=JSON.parse(n.changeContent)}catch(C){n.changeContent=n.changeContent}})}),this.recordList=s.data})},formatTime(s){return(s||"").slice(0,10)}},mounted(){}};function S(s,f,n,C,g,m){const c=T,t=R("RecordCard"),r=R("layout-default-uni");return o(),_(r,null,{default:e(()=>[a(c,{class:"page-main-container"},{default:e(()=>[a(c,{class:"timeline-box"},{default:e(()=>[(o(!0),y(x,null,b(g.recordList,(u,i)=>(o(),_(c,{key:i,class:"timeline-item"},{default:e(()=>[a(c,{class:"timeline-tag flx-justify-between"},{default:e(()=>[a(c,{class:"tag-time"},{default:e(()=>[d(l(u.gradeDetermGradeBatchTime),1)]),_:2},1024),u.gradeDetermGradeBatchStatus==="pending"?(o(),_(c,{key:0,class:"tag-status"},{default:e(()=>[d(l(u.gradeDetermGradeBatchStatusCn),1)]),_:2},1024)):p("",!0)]),_:2},1024),(o(!0),y(x,null,b(u.gradeChangeRecordListRespVOList,(h,j)=>(o(),_(c,{key:h.gradeChangeRecordId},{default:e(()=>[a(c,{class:"type-box"},{default:e(()=>[d(l(j+1)+"、赛事成绩"+l(h.gradeChangeRecordType==="add"?"新增":"修改"),1)]),_:2},1024),a(t,{data:h},null,8,["data"])]),_:2},1024))),128))]),_:2},1024))),128))]),_:1}),this.recordList.length?p("",!0):(o(),_(c,{key:0,class:"empty"},{default:e(()=>[d("暂无变更记录")]),_:1}))]),_:1})]),_:1})}const J=O(M,[["render",S],["__scopeId","data-v-392cc804"]]);export{J as default};
