Files
jczxw-pc/.output/server/chunks/build/apply-B2xHqrDp.mjs
赵忠林 528fe28ffc feat(api): 添加多路由代理处理实现
- 新增api目录下多个接口路径代理处理文件,支持动态拼接目标URL
- 根据环境变量选择不同的后端服务地址(如dev和生产环境)
- 统一添加TenantId和Authorization请求头传递租户及身份信息
- 实现请求参数及搜索参数的完整转发
- 引入better-sqlite3及node内建模块支持服务端功能
- 新增专家详情页面,实现文章、成果及预约咨询功能展示
- 页面实现加载骨架屏、标签页切换及空状态提示优化体验
2026-04-28 13:50:27 +08:00

1127 lines
51 KiB
JavaScript

import { defineComponent, ref, reactive, resolveComponent, mergeProps, unref, withCtx, createVNode, createTextVNode, withDirectives, vShow, createBlock, createCommentVNode, openBlock, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderStyle } from 'vue/server-renderer';
import { message } from 'ant-design-vue';
import { UploadOutlined, CheckCircleOutlined } from '@ant-design/icons-vue';
import { a as _export_sfc, c as useHead, n as navigateTo } from './server.mjs';
import '../nitro/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import 'better-sqlite3';
import 'vue-router';
import '@babel/runtime/helpers/esm/extends';
import 'stylis';
import 'dayjs';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/plugins';
import 'unhead/utils';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "apply",
__ssrInlineRender: true,
setup(__props) {
useHead({ title: "专家申请 - 决策咨询网" });
const currentStep = ref(0);
const submitting = ref(false);
const formData = reactive({
name: "",
title: "",
organization: "",
researchArea: "",
email: "",
phone: "",
bio: "",
resume: "",
certificate: "",
achievements: []
});
const rules = {
name: [{ required: true, message: "请输入姓名" }],
email: [{ required: true, type: "email", message: "请输入正确的邮箱" }]
};
function beforeUpload(file) {
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
message.error("文件大小不能超过 10MB");
return false;
}
return true;
}
function handleUpload(type) {
return async (option) => {
try {
const form = new FormData();
form.append("file", option.file);
option.onSuccess();
message.success("上传成功");
} catch (e) {
option.onError();
message.error("上传失败");
}
};
}
function handleNext() {
if (currentStep.value === 0) {
if (!formData.name || !formData.email) {
message.warning("请填写必填项");
return;
}
}
currentStep.value++;
}
async function handleSubmit() {
submitting.value = true;
try {
message.success("提交成功,请等待审核");
navigateTo("/expert");
} catch (e) {
message.error(e?.message || "提交失败");
} finally {
submitting.value = false;
}
}
return (_ctx, _push, _parent, _attrs) => {
const _component_a_steps = resolveComponent("a-steps");
const _component_a_step = resolveComponent("a-step");
const _component_a_form = resolveComponent("a-form");
const _component_a_row = resolveComponent("a-row");
const _component_a_col = resolveComponent("a-col");
const _component_a_form_item = resolveComponent("a-form-item");
const _component_a_input = resolveComponent("a-input");
const _component_a_textarea = resolveComponent("a-textarea");
const _component_a_upload = resolveComponent("a-upload");
const _component_a_button = resolveComponent("a-button");
const _component_a_result = resolveComponent("a-result");
_push(`<div${ssrRenderAttrs(mergeProps({ class: "expert-apply-page" }, _attrs))} data-v-2075d442><div class="page-header" data-v-2075d442><h1 class="page-title" data-v-2075d442>专家申请</h1><p class="page-desc" data-v-2075d442>成为平台认证专家,展示研究成果,分享专业观点</p></div><div class="apply-form-wrap" data-v-2075d442>`);
_push(ssrRenderComponent(_component_a_steps, {
current: unref(currentStep),
class: "steps-wrap"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(ssrRenderComponent(_component_a_step, { title: "填写信息" }, null, _parent2, _scopeId));
_push2(ssrRenderComponent(_component_a_step, { title: "上传资料" }, null, _parent2, _scopeId));
_push2(ssrRenderComponent(_component_a_step, { title: "提交审核" }, null, _parent2, _scopeId));
} else {
return [
createVNode(_component_a_step, { title: "填写信息" }),
createVNode(_component_a_step, { title: "上传资料" }),
createVNode(_component_a_step, { title: "提交审核" })
];
}
}),
_: 1
}, _parent));
_push(ssrRenderComponent(_component_a_form, {
model: unref(formData),
rules,
layout: "vertical",
class: "apply-form"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`<div style="${ssrRenderStyle(unref(currentStep) === 0 ? null : { display: "none" })}" data-v-2075d442${_scopeId}><h3 class="section-title" data-v-2075d442${_scopeId}>基本信息</h3>`);
_push2(ssrRenderComponent(_component_a_row, { gutter: 24 }, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(ssrRenderComponent(_component_a_col, { span: 12 }, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_form_item, {
label: "姓名",
name: "name"
}, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(ssrRenderComponent(_component_a_input, {
value: unref(formData).name,
"onUpdate:value": ($event) => unref(formData).name = $event,
placeholder: "请输入您的姓名"
}, null, _parent5, _scopeId4));
} else {
return [
createVNode(_component_a_input, {
value: unref(formData).name,
"onUpdate:value": ($event) => unref(formData).name = $event,
placeholder: "请输入您的姓名"
}, null, 8, ["value", "onUpdate:value"])
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_form_item, {
label: "姓名",
name: "name"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).name,
"onUpdate:value": ($event) => unref(formData).name = $event,
placeholder: "请输入您的姓名"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(ssrRenderComponent(_component_a_col, { span: 12 }, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_form_item, {
label: "职称/职务",
name: "title"
}, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(ssrRenderComponent(_component_a_input, {
value: unref(formData).title,
"onUpdate:value": ($event) => unref(formData).title = $event,
placeholder: "如:教授、研究员"
}, null, _parent5, _scopeId4));
} else {
return [
createVNode(_component_a_input, {
value: unref(formData).title,
"onUpdate:value": ($event) => unref(formData).title = $event,
placeholder: "如:教授、研究员"
}, null, 8, ["value", "onUpdate:value"])
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_form_item, {
label: "职称/职务",
name: "title"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).title,
"onUpdate:value": ($event) => unref(formData).title = $event,
placeholder: "如:教授、研究员"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent3, _scopeId2));
} else {
return [
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "姓名",
name: "name"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).name,
"onUpdate:value": ($event) => unref(formData).name = $event,
placeholder: "请输入您的姓名"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "职称/职务",
name: "title"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).title,
"onUpdate:value": ($event) => unref(formData).title = $event,
placeholder: "如:教授、研究员"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
})
];
}
}),
_: 1
}, _parent2, _scopeId));
_push2(ssrRenderComponent(_component_a_row, { gutter: 24 }, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(ssrRenderComponent(_component_a_col, { span: 12 }, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_form_item, {
label: "工作单位",
name: "organization"
}, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(ssrRenderComponent(_component_a_input, {
value: unref(formData).organization,
"onUpdate:value": ($event) => unref(formData).organization = $event,
placeholder: "请输入您的工作单位"
}, null, _parent5, _scopeId4));
} else {
return [
createVNode(_component_a_input, {
value: unref(formData).organization,
"onUpdate:value": ($event) => unref(formData).organization = $event,
placeholder: "请输入您的工作单位"
}, null, 8, ["value", "onUpdate:value"])
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_form_item, {
label: "工作单位",
name: "organization"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).organization,
"onUpdate:value": ($event) => unref(formData).organization = $event,
placeholder: "请输入您的工作单位"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(ssrRenderComponent(_component_a_col, { span: 12 }, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_form_item, {
label: "研究领域",
name: "researchArea"
}, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(ssrRenderComponent(_component_a_input, {
value: unref(formData).researchArea,
"onUpdate:value": ($event) => unref(formData).researchArea = $event,
placeholder: "请输入您的研究领域"
}, null, _parent5, _scopeId4));
} else {
return [
createVNode(_component_a_input, {
value: unref(formData).researchArea,
"onUpdate:value": ($event) => unref(formData).researchArea = $event,
placeholder: "请输入您的研究领域"
}, null, 8, ["value", "onUpdate:value"])
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_form_item, {
label: "研究领域",
name: "researchArea"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).researchArea,
"onUpdate:value": ($event) => unref(formData).researchArea = $event,
placeholder: "请输入您的研究领域"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent3, _scopeId2));
} else {
return [
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "工作单位",
name: "organization"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).organization,
"onUpdate:value": ($event) => unref(formData).organization = $event,
placeholder: "请输入您的工作单位"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "研究领域",
name: "researchArea"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).researchArea,
"onUpdate:value": ($event) => unref(formData).researchArea = $event,
placeholder: "请输入您的研究领域"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
})
];
}
}),
_: 1
}, _parent2, _scopeId));
_push2(ssrRenderComponent(_component_a_row, { gutter: 24 }, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(ssrRenderComponent(_component_a_col, { span: 12 }, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_form_item, {
label: "邮箱",
name: "email"
}, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(ssrRenderComponent(_component_a_input, {
value: unref(formData).email,
"onUpdate:value": ($event) => unref(formData).email = $event,
placeholder: "请输入邮箱"
}, null, _parent5, _scopeId4));
} else {
return [
createVNode(_component_a_input, {
value: unref(formData).email,
"onUpdate:value": ($event) => unref(formData).email = $event,
placeholder: "请输入邮箱"
}, null, 8, ["value", "onUpdate:value"])
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_form_item, {
label: "邮箱",
name: "email"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).email,
"onUpdate:value": ($event) => unref(formData).email = $event,
placeholder: "请输入邮箱"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(ssrRenderComponent(_component_a_col, { span: 12 }, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_form_item, {
label: "联系电话",
name: "phone"
}, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(ssrRenderComponent(_component_a_input, {
value: unref(formData).phone,
"onUpdate:value": ($event) => unref(formData).phone = $event,
placeholder: "请输入联系电话"
}, null, _parent5, _scopeId4));
} else {
return [
createVNode(_component_a_input, {
value: unref(formData).phone,
"onUpdate:value": ($event) => unref(formData).phone = $event,
placeholder: "请输入联系电话"
}, null, 8, ["value", "onUpdate:value"])
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_form_item, {
label: "联系电话",
name: "phone"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).phone,
"onUpdate:value": ($event) => unref(formData).phone = $event,
placeholder: "请输入联系电话"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
];
}
}),
_: 1
}, _parent3, _scopeId2));
} else {
return [
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "邮箱",
name: "email"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).email,
"onUpdate:value": ($event) => unref(formData).email = $event,
placeholder: "请输入邮箱"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "联系电话",
name: "phone"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).phone,
"onUpdate:value": ($event) => unref(formData).phone = $event,
placeholder: "请输入联系电话"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
})
];
}
}),
_: 1
}, _parent2, _scopeId));
_push2(ssrRenderComponent(_component_a_form_item, {
label: "个人简介",
name: "bio"
}, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(ssrRenderComponent(_component_a_textarea, {
value: unref(formData).bio,
"onUpdate:value": ($event) => unref(formData).bio = $event,
rows: 4,
placeholder: "请简要介绍您的学术背景和工作经历"
}, null, _parent3, _scopeId2));
} else {
return [
createVNode(_component_a_textarea, {
value: unref(formData).bio,
"onUpdate:value": ($event) => unref(formData).bio = $event,
rows: 4,
placeholder: "请简要介绍您的学术背景和工作经历"
}, null, 8, ["value", "onUpdate:value"])
];
}
}),
_: 1
}, _parent2, _scopeId));
_push2(`</div><div style="${ssrRenderStyle(unref(currentStep) === 1 ? null : { display: "none" })}" data-v-2075d442${_scopeId}><h3 class="section-title" data-v-2075d442${_scopeId}>资质证明材料</h3><p class="section-desc" data-v-2075d442${_scopeId}>请上传相关证明材料,以便我们审核您的专家资质</p>`);
_push2(ssrRenderComponent(_component_a_form_item, { label: "个人简历" }, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(ssrRenderComponent(_component_a_upload, {
"before-upload": beforeUpload,
"custom-request": handleUpload()
}, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_button, null, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(ssrRenderComponent(unref(UploadOutlined), null, null, _parent5, _scopeId4));
_push5(` 上传简历`);
} else {
return [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传简历")
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_button, null, {
default: withCtx(() => [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传简历")
]),
_: 1
})
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(`<div class="upload-hint" data-v-2075d442${_scopeId2}>支持 PDF、Word 格式,不超过 10MB</div>`);
} else {
return [
createVNode(_component_a_upload, {
"before-upload": beforeUpload,
"custom-request": handleUpload()
}, {
default: withCtx(() => [
createVNode(_component_a_button, null, {
default: withCtx(() => [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传简历")
]),
_: 1
})
]),
_: 1
}, 8, ["custom-request"]),
createVNode("div", { class: "upload-hint" }, "支持 PDF、Word 格式,不超过 10MB")
];
}
}),
_: 1
}, _parent2, _scopeId));
_push2(ssrRenderComponent(_component_a_form_item, { label: "职称/学历证明" }, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(ssrRenderComponent(_component_a_upload, {
"before-upload": beforeUpload,
"custom-request": handleUpload()
}, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_button, null, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(ssrRenderComponent(unref(UploadOutlined), null, null, _parent5, _scopeId4));
_push5(` 上传证明`);
} else {
return [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传证明")
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_button, null, {
default: withCtx(() => [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传证明")
]),
_: 1
})
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(`<div class="upload-hint" data-v-2075d442${_scopeId2}>支持 JPG、PNG、PDF 格式</div>`);
} else {
return [
createVNode(_component_a_upload, {
"before-upload": beforeUpload,
"custom-request": handleUpload()
}, {
default: withCtx(() => [
createVNode(_component_a_button, null, {
default: withCtx(() => [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传证明")
]),
_: 1
})
]),
_: 1
}, 8, ["custom-request"]),
createVNode("div", { class: "upload-hint" }, "支持 JPG、PNG、PDF 格式")
];
}
}),
_: 1
}, _parent2, _scopeId));
_push2(ssrRenderComponent(_component_a_form_item, { label: "研究成果或获奖证明" }, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(ssrRenderComponent(_component_a_upload, {
multiple: "",
"before-upload": beforeUpload,
"custom-request": handleUpload()
}, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(ssrRenderComponent(_component_a_button, null, {
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
if (_push5) {
_push5(ssrRenderComponent(unref(UploadOutlined), null, null, _parent5, _scopeId4));
_push5(` 上传材料`);
} else {
return [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传材料")
];
}
}),
_: 1
}, _parent4, _scopeId3));
} else {
return [
createVNode(_component_a_button, null, {
default: withCtx(() => [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传材料")
]),
_: 1
})
];
}
}),
_: 1
}, _parent3, _scopeId2));
_push3(`<div class="upload-hint" data-v-2075d442${_scopeId2}>可上传多份材料</div>`);
} else {
return [
createVNode(_component_a_upload, {
multiple: "",
"before-upload": beforeUpload,
"custom-request": handleUpload()
}, {
default: withCtx(() => [
createVNode(_component_a_button, null, {
default: withCtx(() => [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传材料")
]),
_: 1
})
]),
_: 1
}, 8, ["custom-request"]),
createVNode("div", { class: "upload-hint" }, "可上传多份材料")
];
}
}),
_: 1
}, _parent2, _scopeId));
_push2(`</div><div class="confirm-section" style="${ssrRenderStyle(unref(currentStep) === 2 ? null : { display: "none" })}" data-v-2075d442${_scopeId}>`);
_push2(ssrRenderComponent(_component_a_result, {
title: "确认提交申请",
"sub-title": "请确认您填写的信息和上传的材料准确无误"
}, {
icon: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(ssrRenderComponent(unref(CheckCircleOutlined), { style: { "font-size": "80px", "color": "#52c41a" } }, null, _parent3, _scopeId2));
} else {
return [
createVNode(unref(CheckCircleOutlined), { style: { "font-size": "80px", "color": "#52c41a" } })
];
}
}),
extra: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(ssrRenderComponent(_component_a_button, {
type: "primary",
size: "large",
onClick: handleSubmit,
loading: unref(submitting)
}, {
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
if (_push4) {
_push4(` 确认提交 `);
} else {
return [
createTextVNode(" 确认提交 ")
];
}
}),
_: 1
}, _parent3, _scopeId2));
} else {
return [
createVNode(_component_a_button, {
type: "primary",
size: "large",
onClick: handleSubmit,
loading: unref(submitting)
}, {
default: withCtx(() => [
createTextVNode(" 确认提交 ")
]),
_: 1
}, 8, ["loading"])
];
}
}),
_: 1
}, _parent2, _scopeId));
_push2(`</div><div class="step-actions" data-v-2075d442${_scopeId}>`);
if (unref(currentStep) > 0) {
_push2(ssrRenderComponent(_component_a_button, {
onClick: ($event) => currentStep.value--
}, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(`上一步`);
} else {
return [
createTextVNode("上一步")
];
}
}),
_: 1
}, _parent2, _scopeId));
} else {
_push2(`<!---->`);
}
if (unref(currentStep) < 2) {
_push2(ssrRenderComponent(_component_a_button, {
type: "primary",
onClick: handleNext
}, {
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
if (_push3) {
_push3(`下一步`);
} else {
return [
createTextVNode("下一步")
];
}
}),
_: 1
}, _parent2, _scopeId));
} else {
_push2(`<!---->`);
}
_push2(`</div>`);
} else {
return [
withDirectives(createVNode("div", null, [
createVNode("h3", { class: "section-title" }, "基本信息"),
createVNode(_component_a_row, { gutter: 24 }, {
default: withCtx(() => [
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "姓名",
name: "name"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).name,
"onUpdate:value": ($event) => unref(formData).name = $event,
placeholder: "请输入您的姓名"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "职称/职务",
name: "title"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).title,
"onUpdate:value": ($event) => unref(formData).title = $event,
placeholder: "如:教授、研究员"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_row, { gutter: 24 }, {
default: withCtx(() => [
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "工作单位",
name: "organization"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).organization,
"onUpdate:value": ($event) => unref(formData).organization = $event,
placeholder: "请输入您的工作单位"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "研究领域",
name: "researchArea"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).researchArea,
"onUpdate:value": ($event) => unref(formData).researchArea = $event,
placeholder: "请输入您的研究领域"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_row, { gutter: 24 }, {
default: withCtx(() => [
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "邮箱",
name: "email"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).email,
"onUpdate:value": ($event) => unref(formData).email = $event,
placeholder: "请输入邮箱"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_col, { span: 12 }, {
default: withCtx(() => [
createVNode(_component_a_form_item, {
label: "联系电话",
name: "phone"
}, {
default: withCtx(() => [
createVNode(_component_a_input, {
value: unref(formData).phone,
"onUpdate:value": ($event) => unref(formData).phone = $event,
placeholder: "请输入联系电话"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
]),
_: 1
})
]),
_: 1
}),
createVNode(_component_a_form_item, {
label: "个人简介",
name: "bio"
}, {
default: withCtx(() => [
createVNode(_component_a_textarea, {
value: unref(formData).bio,
"onUpdate:value": ($event) => unref(formData).bio = $event,
rows: 4,
placeholder: "请简要介绍您的学术背景和工作经历"
}, null, 8, ["value", "onUpdate:value"])
]),
_: 1
})
], 512), [
[vShow, unref(currentStep) === 0]
]),
withDirectives(createVNode("div", null, [
createVNode("h3", { class: "section-title" }, "资质证明材料"),
createVNode("p", { class: "section-desc" }, "请上传相关证明材料,以便我们审核您的专家资质"),
createVNode(_component_a_form_item, { label: "个人简历" }, {
default: withCtx(() => [
createVNode(_component_a_upload, {
"before-upload": beforeUpload,
"custom-request": handleUpload()
}, {
default: withCtx(() => [
createVNode(_component_a_button, null, {
default: withCtx(() => [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传简历")
]),
_: 1
})
]),
_: 1
}, 8, ["custom-request"]),
createVNode("div", { class: "upload-hint" }, "支持 PDF、Word 格式,不超过 10MB")
]),
_: 1
}),
createVNode(_component_a_form_item, { label: "职称/学历证明" }, {
default: withCtx(() => [
createVNode(_component_a_upload, {
"before-upload": beforeUpload,
"custom-request": handleUpload()
}, {
default: withCtx(() => [
createVNode(_component_a_button, null, {
default: withCtx(() => [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传证明")
]),
_: 1
})
]),
_: 1
}, 8, ["custom-request"]),
createVNode("div", { class: "upload-hint" }, "支持 JPG、PNG、PDF 格式")
]),
_: 1
}),
createVNode(_component_a_form_item, { label: "研究成果或获奖证明" }, {
default: withCtx(() => [
createVNode(_component_a_upload, {
multiple: "",
"before-upload": beforeUpload,
"custom-request": handleUpload()
}, {
default: withCtx(() => [
createVNode(_component_a_button, null, {
default: withCtx(() => [
createVNode(unref(UploadOutlined)),
createTextVNode(" 上传材料")
]),
_: 1
})
]),
_: 1
}, 8, ["custom-request"]),
createVNode("div", { class: "upload-hint" }, "可上传多份材料")
]),
_: 1
})
], 512), [
[vShow, unref(currentStep) === 1]
]),
withDirectives(createVNode("div", { class: "confirm-section" }, [
createVNode(_component_a_result, {
title: "确认提交申请",
"sub-title": "请确认您填写的信息和上传的材料准确无误"
}, {
icon: withCtx(() => [
createVNode(unref(CheckCircleOutlined), { style: { "font-size": "80px", "color": "#52c41a" } })
]),
extra: withCtx(() => [
createVNode(_component_a_button, {
type: "primary",
size: "large",
onClick: handleSubmit,
loading: unref(submitting)
}, {
default: withCtx(() => [
createTextVNode(" 确认提交 ")
]),
_: 1
}, 8, ["loading"])
]),
_: 1
})
], 512), [
[vShow, unref(currentStep) === 2]
]),
createVNode("div", { class: "step-actions" }, [
unref(currentStep) > 0 ? (openBlock(), createBlock(_component_a_button, {
key: 0,
onClick: ($event) => currentStep.value--
}, {
default: withCtx(() => [
createTextVNode("上一步")
]),
_: 1
}, 8, ["onClick"])) : createCommentVNode("", true),
unref(currentStep) < 2 ? (openBlock(), createBlock(_component_a_button, {
key: 1,
type: "primary",
onClick: handleNext
}, {
default: withCtx(() => [
createTextVNode("下一步")
]),
_: 1
})) : createCommentVNode("", true)
])
];
}
}),
_: 1
}, _parent));
_push(`</div></div>`);
};
}
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/expert/apply.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const apply = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2075d442"]]);
export { apply as default };
//# sourceMappingURL=apply-B2xHqrDp.mjs.map