import{_ as y,a0 as D,ac as S,au as I,L as _,k as t,w as e,M as f,j as T,C as g,E as p,H as F,o,p as r,t as u,a1 as h,Q as C,c as n,i,K as k,q as N,v as P,l as B,ay as U}from"./index-CZJgrp0v.js";import{_ as V}from"./uv-tags.Iqd2Do9l.js";import{a as R}from"./common.D2w6zaJ1.js";const E={name:"skillCard",props:{data:{type:Object,default:()=>({})},isView:{type:Boolean,default:!1}},data(){return{defaultImg:I()+"/social/certificate.png",activeStatus:"all",showReasonPopup:!1,rejectReason:"",tagList:[{name:"all",text:"全部"},{name:"passed",text:"已通过"},{name:"rejected",text:"未通过"},{name:"pending",text:"待审核"}],records:[]}},computed:{statusClass(){return{0:"yellow",1:"green",2:"blue"}[this.data.gradeDetermStatus]||"yellow"},statusText(){return{0:"待确认",1:"已确认",2:"变更中"}[this.data.gradeDetermStatus]||"待确认"},filteredRecords(){return this.activeStatus==="all"?this.records:this.records.filter(l=>l.status===this.activeStatus)}},methods:{showCertificate(){if(!this.data.certificateUrl)return this.$showToastNone("证书图片不存在");this.$refs.certPopup.open()},closeCertificate(){this.$refs.certPopup.close()},onPreviewImage(){if(!this.data.certificateUrl)return this.$showToastNone("图片不存在");S({urls:[this.data.certificateUrl],current:1,indicator:"number",loop:!0})},download(){if(!this.data.certificateUrl)return this.$showToastNone("图片不存在");R(this.data.certificateUrl,"认证证书.png")},handleClick(){this.$emit("click",this.data)},toRecordHistory(){this.data.gradeDetermChangeStatus==="pending"&&D({url:"/pages/athleteRankPart/skillCertification/record?gradeDetermId="+this.data.gradeDetermId})},formatTime(l){return l}}};function j(l,H,s,L,x,c){const v=g(p("uv-tags"),V),a=T,w=N,d=P,m=B,b=g(p("uv-popup"),F);return o(),_(f,null,[t(a,{class:"skill-card",onClick:c.handleClick},{default:e(()=>[t(a,{class:"top-box"},{default:e(()=>[t(a,{class:"flex"},{default:e(()=>[t(v,{text:s.data.gradeDetermDictName,bgColor:"#ECF5FF",color:"#0067c0",borderColor:"#D9ECFF"},null,8,["text"]),t(a,{class:"title"},{default:e(()=>[r(u(s.data.gradeDetermTypeCn),1)]),_:1})]),_:1}),t(a,null,{default:e(()=>[t(a,{class:h(["status-tag",c.statusClass])},{default:e(()=>[r(u(c.statusText),1)]),_:1},8,["class"])]),_:1})]),_:1}),t(a,{class:"bottom-box"},{default:e(()=>[t(a,{class:"mb-8rpx"},{default:e(()=>[r("时间："+u(s.data.createTime),1)]),_:1}),C("div",{class:"btmLine"},[s.isView&&s.data.gradeDetermChangeStatus!=="not_change"?(o(),n(a,{key:0,onClick:k(c.toRecordHistory,["stop"])},{default:e(()=>[r(" 变更记录： "),t(w,{class:h(s.data.gradeDetermChangeStatus==="pending"?"link-color":"")},{default:e(()=>[r(u(s.data.gradeDetermChangeStatusCn),1)]),_:1},8,["class"])]),_:1},8,["onClick"])):i("",!0),C("div",{class:"btnBox"},[s.isView?i("",!0):(o(),_(f,{key:0},[s.data.gradeDetermStatus===0?(o(),n(d,{key:0,class:"foo-right button"},{default:e(()=>[r("去确认")]),_:1})):i("",!0),s.data.gradeDetermStatus===1?(o(),n(d,{key:1,class:"foo-right button"},{default:e(()=>[r("查看详情")]),_:1})):i("",!0),s.data.gradeDetermStatus===1?(o(),n(d,{key:2,class:"foo-right button",onClick:k(c.showCertificate,["stop"])},{default:e(()=>[r(" 查看证书 ")]),_:1},8,["onClick"])):i("",!0)],64)),s.data.gradeDetermChangeStatus==="pending"?(o(),n(d,{key:1,class:"foo-right button"},{default:e(()=>[r(" 查看详情 ")]),_:1})):i("",!0)])])]),_:1})]),_:1},8,["onClick"]),t(b,{ref:"certPopup",mode:"center",bgColor:"transparent"},{default:e(()=>[t(a,{class:"cert-popup"},{default:e(()=>[t(a,{class:"cert-popup-card"},{default:e(()=>[t(m,{src:s.data.certificateUrl||x.defaultImg,mode:"widthFix",class:"cert-popup-img",onClick:c.onPreviewImage},null,8,["src","onClick"]),t(a,{class:"cert-popup-bar"},{default:e(()=>[t(a,{class:"cert-popup-btn",onClick:c.onPreviewImage},{default:e(()=>[r("全屏预览")]),_:1},8,["onClick"]),t(a,{class:"cert-popup-btn primary",onClick:c.download},{default:e(()=>[r("保存图片")]),_:1},8,["onClick"])]),_:1})]),_:1}),t(m,{class:"cert-popup-close",src:U,mode:"aspectFit",onClick:c.closeCertificate},null,8,["onClick"])]),_:1})]),_:1},512)],64)}const K=y(E,[["render",j],["__scopeId","data-v-9de144a2"]]);export{K as S};
