import{d as n,g as d,D as l,x as c,T as o,j as e,F as i,C as h,B as p}from"./index.3bfa6a0e.js";import{C}from"./index.aac5e6b2.js";import{C as m}from"./cert-three.80c846f5.js";import{t as a}from"./teacherState.a772ca79.js";import{C as s}from"./index.645e7ddc.js";import"./index.0916b076.js";import"./index.bb2d59fe.js";import"./index.b7202cd4.js";import"./index.0fd5538f.js";import"./index.e9acc943.js";import"./index.e55f880d.js";import"./oss-file-upload.782d2199.js";import"./index.79997a38.js";import"./index.983bfd1a.js";import"./use-id.7c44c16f.js";var v=n({name:"teacher-cert-update",data(){return{authStatus:!1}},async mounted(){var t;try{if(!((t=d.user.data)!=null&&t.entryFlag)){l.alert({message:"\u60A8\u5C1A\u672A\u5B8C\u6210\u8FBE\u4EBA\u8BA4\u8BC1\uFF0C\u8FBE\u4EBA\u8BA4\u8BC1\u540E\u624D\u53EF\u66F4\u65B0\u8D44\u6599\u54E6\uFF01",confirmButtonColor:"#2DC7AA"}).then(()=>{this.$router.replace("/teacherCert")});return}const r=(await c.get("/api-teacher/teacherAuthEntryRecord/getLastRecordByUserId")).data||{},u=r.teacherAuthStatus||0;this.authStatus=u==="DOING",a.teacherCert.graduateSchool=r.graduateSchool,a.teacherCert.subject=r.subject,a.teacherCert.subjectId=r.subjectId,a.teacherCert.introduction=r.introduction,a.teacherCert.styleVideoJson=r.styleVideoJson,a.teacherCert.gradCertificate=r.gradCertificate,a.teacherCert.degreeCertificate=r.degreeCertificate,a.teacherCert.teacherCertificate=r.teacherCertificate}catch{}},methods:{async onSubmit(){const t=a.teacherCert;if(!t.graduateSchool){o("\u8BF7\u8F93\u5165\u60A8\u7684\u6BD5\u4E1A\u9662\u6821");return}if(!t.subject){o("\u8BF7\u8F93\u5165\u60A8\u7684\u4E13\u4E1A");return}await c.post("/api-teacher/teacherAuthEntryRecord/doApply",{data:{graduateSchool:t.graduateSchool,subject:t.subject,subjectId:t.subjectId,introduction:t.introduction,styleVideoJson:t.styleVideoJson,gradCertificate:t.gradCertificate,degreeCertificate:t.degreeCertificate,teacherCertificate:t.teacherCertificate}}),o("\u63D0\u4EA4\u6210\u529F"),this.authStatus=!0}},render(){return e(i,null,[this.authStatus?e(i,null,[e(s,null,null),e(h,{type:"teacherCert",style:{paddingTop:"60px"},classImgSize:"CERT",tips:"\u611F\u8C22\u60A8\u7684\u7533\u8BF7\uFF0C\u5C0F\u9177\u5C06\u572824\u5C0F\u65F6\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u8BF7\u7559\u610FAPP\u6D88\u606F\u53CA\u77ED\u4FE1\u83B7\u53D6\u5BA1\u6838\u7ED3\u679C\u3002"},null)]):e(i,null,[e(s,null,null),e("div",{style:{paddingTop:"12px"}},[e(m,null,null),e(C,{position:"bottom"},{default:()=>[e("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[e(p,{block:!0,round:!0,onClick:this.onSubmit,type:"primary",text:"\u63D0\u4EA4\u5BA1\u6838"},null)])]})])])])}});export{v as default};
