import { defineComponent, ref, reactive, computed, resolveComponent, mergeProps, withCtx, unref, createTextVNode, createVNode, toDisplayString, createBlock, openBlock, Fragment, renderList, isRef, createCommentVNode, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrRenderClass, ssrInterpolate, ssrRenderAttr } from 'vue/server-renderer'; import { ReloadOutlined } from '@ant-design/icons-vue'; import { message } from 'ant-design-vue'; import { a as _export_sfc, c as useHead } 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: "index", __ssrInlineRender: true, setup(__props) { useHead({ title: "专家管理 - 后台管理" }); const loading = ref(false); const experts = ref([]); const filterStatus = ref(void 0); const searchKeyword = ref(""); const pagination = reactive({ current: 1, pageSize: 20, showSizeChanger: true, showQuickJumper: true }); const statCards = reactive([ { key: 0, icon: "⏳", label: "待审核", value: 0, color: "orange" }, { key: 1, icon: "✅", label: "已认证", value: 0, color: "green" }, { key: 2, icon: "❌", label: "已拒绝", value: 0, color: "red" }, { key: -1, icon: "👥", label: "全部专家", value: 0, color: "blue" } ]); const columns = [ { title: "专家信息", key: "info", width: 280 }, { title: "联系方式", key: "contact", width: 200 }, { title: "状态", key: "status", width: 100 }, { title: "申请时间", key: "createTime", width: 120 }, { title: "操作", key: "action", width: 120 } ]; const showDetailModal = ref(false); const currentExpert = ref(null); const filteredExperts = computed(() => { const keyword = searchKeyword.value.trim().toLowerCase(); return experts.value.filter((item) => filterStatus.value === void 0 || item.status === filterStatus.value).filter((item) => { if (!keyword) return true; return [item.name, item.organization, item.researchArea].some((val) => String(val || "").toLowerCase().includes(keyword)); }).sort((a, b) => (b.id || 0) - (a.id || 0)); }); const pagedExperts = computed(() => { const start = (pagination.current - 1) * pagination.pageSize; return filteredExperts.value.slice(start, start + pagination.pageSize); }); const tablePagination = computed(() => ({ current: pagination.current, pageSize: pagination.pageSize, total: filteredExperts.value.length, showSizeChanger: pagination.showSizeChanger, showQuickJumper: pagination.showQuickJumper })); function updateStats() { statCards[0].value = experts.value.filter((i) => i.status === 0).length; statCards[1].value = experts.value.filter((i) => i.status === 1).length; statCards[2].value = experts.value.filter((i) => i.status === 2).length; statCards[3].value = experts.value.length; } async function loadExperts() { loading.value = true; try { updateStats(); } catch (e) { message.error(e?.message || "加载专家列表失败"); } finally { loading.value = false; } } function handleStatFilter(key) { filterStatus.value = key === -1 ? void 0 : key; pagination.current = 1; } function handleSearch() { pagination.current = 1; } function handleTableChange(pag) { pagination.current = pag.current; pagination.pageSize = pag.pageSize; } function handleView(record) { currentExpert.value = record; showDetailModal.value = true; } function handleReview(record) { currentExpert.value = record; showDetailModal.value = true; } async function handleApprove(expert) { try { message.success("已通过审核"); showDetailModal.value = false; await loadExperts(); } catch (e) { message.error(e?.message || "操作失败"); } } async function handleReject(expert) { try { message.success("已拒绝"); showDetailModal.value = false; await loadExperts(); } catch (e) { message.error(e?.message || "操作失败"); } } function statusText(status) { const map = { 0: "待审核", 1: "已认证", 2: "已拒绝" }; return map[status ?? -1] || "-"; } function statusColor(status) { const map = { 0: "orange", 1: "success", 2: "error" }; return map[status ?? -1] || "default"; } return (_ctx, _push, _parent, _attrs) => { const _component_a_space = resolveComponent("a-space"); const _component_a_button = resolveComponent("a-button"); const _component_a_row = resolveComponent("a-row"); const _component_a_col = resolveComponent("a-col"); const _component_a_select = resolveComponent("a-select"); const _component_a_select_option = resolveComponent("a-select-option"); const _component_a_input_search = resolveComponent("a-input-search"); const _component_a_table = resolveComponent("a-table"); const _component_a_tag = resolveComponent("a-tag"); const _component_a_modal = resolveComponent("a-modal"); const _component_a_descriptions = resolveComponent("a-descriptions"); const _component_a_descriptions_item = resolveComponent("a-descriptions-item"); const _component_a_divider = resolveComponent("a-divider"); _push(``); _push(ssrRenderComponent(_component_a_row, { gutter: [16, 16], class: "mb-6" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(``); ssrRenderList(unref(statCards), (stat) => { _push2(ssrRenderComponent(_component_a_col, { xs: 12, sm: 6, key: stat.key }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`
${ssrInterpolate(stat.icon)}
${ssrInterpolate(stat.value)}
${ssrInterpolate(stat.label)}
`); } else { return [ createVNode("div", { class: ["stat-card", [stat.color, { active: unref(filterStatus) === stat.key }]], onClick: ($event) => handleStatFilter(stat.key) }, [ createVNode("div", { class: "stat-icon" }, toDisplayString(stat.icon), 1), createVNode("div", { class: "stat-info" }, [ createVNode("div", { class: "stat-value" }, toDisplayString(stat.value), 1), createVNode("div", { class: "stat-label" }, toDisplayString(stat.label), 1) ]) ], 10, ["onClick"]) ]; } }), _: 2 }, _parent2, _scopeId)); }); _push2(``); } else { return [ (openBlock(true), createBlock(Fragment, null, renderList(unref(statCards), (stat) => { return openBlock(), createBlock(_component_a_col, { xs: 12, sm: 6, key: stat.key }, { default: withCtx(() => [ createVNode("div", { class: ["stat-card", [stat.color, { active: unref(filterStatus) === stat.key }]], onClick: ($event) => handleStatFilter(stat.key) }, [ createVNode("div", { class: "stat-icon" }, toDisplayString(stat.icon), 1), createVNode("div", { class: "stat-info" }, [ createVNode("div", { class: "stat-value" }, toDisplayString(stat.value), 1), createVNode("div", { class: "stat-label" }, toDisplayString(stat.label), 1) ]) ], 10, ["onClick"]) ]), _: 2 }, 1024); }), 128)) ]; } }), _: 1 }, _parent)); _push(`
📋 专家列表`); _push(ssrRenderComponent(_component_a_space, { wrap: "" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_a_select, { value: unref(filterStatus), "onUpdate:value": ($event) => isRef(filterStatus) ? filterStatus.value = $event : null, style: { "width": "120px" }, onChange: handleSearch }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_select_option, { value: void 0 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`全部状态`); } else { return [ createTextVNode("全部状态") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_select_option, { value: 0 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`待审核`); } else { return [ createTextVNode("待审核") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_select_option, { value: 1 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`已认证`); } else { return [ createTextVNode("已认证") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_select_option, { value: 2 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`已拒绝`); } else { return [ createTextVNode("已拒绝") ]; } }), _: 1 }, _parent3, _scopeId2)); } else { return [ createVNode(_component_a_select_option, { value: void 0 }, { default: withCtx(() => [ createTextVNode("全部状态") ]), _: 1 }), createVNode(_component_a_select_option, { value: 0 }, { default: withCtx(() => [ createTextVNode("待审核") ]), _: 1 }), createVNode(_component_a_select_option, { value: 1 }, { default: withCtx(() => [ createTextVNode("已认证") ]), _: 1 }), createVNode(_component_a_select_option, { value: 2 }, { default: withCtx(() => [ createTextVNode("已拒绝") ]), _: 1 }) ]; } }), _: 1 }, _parent2, _scopeId)); _push2(ssrRenderComponent(_component_a_input_search, { value: unref(searchKeyword), "onUpdate:value": ($event) => isRef(searchKeyword) ? searchKeyword.value = $event : null, placeholder: "搜索姓名 / 单位 / 研究领域", style: { "width": "240px" }, onSearch: handleSearch }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_a_select, { value: unref(filterStatus), "onUpdate:value": ($event) => isRef(filterStatus) ? filterStatus.value = $event : null, style: { "width": "120px" }, onChange: handleSearch }, { default: withCtx(() => [ createVNode(_component_a_select_option, { value: void 0 }, { default: withCtx(() => [ createTextVNode("全部状态") ]), _: 1 }), createVNode(_component_a_select_option, { value: 0 }, { default: withCtx(() => [ createTextVNode("待审核") ]), _: 1 }), createVNode(_component_a_select_option, { value: 1 }, { default: withCtx(() => [ createTextVNode("已认证") ]), _: 1 }), createVNode(_component_a_select_option, { value: 2 }, { default: withCtx(() => [ createTextVNode("已拒绝") ]), _: 1 }) ]), _: 1 }, 8, ["value", "onUpdate:value"]), createVNode(_component_a_input_search, { value: unref(searchKeyword), "onUpdate:value": ($event) => isRef(searchKeyword) ? searchKeyword.value = $event : null, placeholder: "搜索姓名 / 单位 / 研究领域", style: { "width": "240px" }, onSearch: handleSearch }, null, 8, ["value", "onUpdate:value"]) ]; } }), _: 1 }, _parent)); _push(`
`); _push(ssrRenderComponent(_component_a_table, { columns, "data-source": unref(pagedExperts), loading: unref(loading), pagination: unref(tablePagination), "row-key": "id", onChange: handleTableChange, size: "middle" }, { bodyCell: withCtx(({ column, record }, _push2, _parent2, _scopeId) => { if (_push2) { if (column.key === "info") { _push2(`
${ssrInterpolate(record.name?.charAt(0) || "?")}
${ssrInterpolate(record.name)}
`); if (record.title) { _push2(`🏷️ ${ssrInterpolate(record.title)}`); } else { _push2(``); } if (record.organization) { _push2(`🏛️ ${ssrInterpolate(record.organization)}`); } else { _push2(``); } _push2(`
`); } else { _push2(``); } if (column.key === "contact") { _push2(`
`); if (record.email) { _push2(`
📧 ${ssrInterpolate(record.email)}
`); } else { _push2(``); } if (record.phone) { _push2(`
📱 ${ssrInterpolate(record.phone)}
`); } else { _push2(``); } _push2(`
`); } else { _push2(``); } if (column.key === "status") { _push2(ssrRenderComponent(_component_a_tag, { color: statusColor(record.status) }, { default: withCtx((_, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`${ssrInterpolate(statusText(record.status))}`); } else { return [ createTextVNode(toDisplayString(statusText(record.status)), 1) ]; } }), _: 2 }, _parent2, _scopeId)); } else { _push2(``); } if (column.key === "createTime") { _push2(`${ssrInterpolate(record.createTime?.substring(0, 10) || "-")}`); } else { _push2(``); } if (column.key === "action") { _push2(ssrRenderComponent(_component_a_space, null, { default: withCtx((_, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleView(record) }, { default: withCtx((_2, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`查看`); } else { return [ createTextVNode("查看") ]; } }), _: 2 }, _parent3, _scopeId2)); if (record.status === 0) { _push3(ssrRenderComponent(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleReview(record) }, { default: withCtx((_2, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`审核`); } else { return [ createTextVNode("审核") ]; } }), _: 2 }, _parent3, _scopeId2)); } else { _push3(``); } } else { return [ createVNode(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleView(record) }, { default: withCtx(() => [ createTextVNode("查看") ]), _: 1 }, 8, ["onClick"]), record.status === 0 ? (openBlock(), createBlock(_component_a_button, { key: 0, type: "link", size: "small", onClick: ($event) => handleReview(record) }, { default: withCtx(() => [ createTextVNode("审核") ]), _: 1 }, 8, ["onClick"])) : createCommentVNode("", true) ]; } }), _: 2 }, _parent2, _scopeId)); } else { _push2(``); } } else { return [ column.key === "info" ? (openBlock(), createBlock("div", { key: 0, class: "expert-info-cell" }, [ createVNode("div", { class: "expert-avatar" }, toDisplayString(record.name?.charAt(0) || "?"), 1), createVNode("div", { class: "expert-info-text" }, [ createVNode("div", { class: "expert-name" }, toDisplayString(record.name), 1), createVNode("div", { class: "expert-meta" }, [ record.title ? (openBlock(), createBlock("span", { key: 0 }, "🏷️ " + toDisplayString(record.title), 1)) : createCommentVNode("", true), record.organization ? (openBlock(), createBlock("span", { key: 1, class: "meta-item" }, "🏛️ " + toDisplayString(record.organization), 1)) : createCommentVNode("", true) ]) ]) ])) : createCommentVNode("", true), column.key === "contact" ? (openBlock(), createBlock("div", { key: 1, class: "contact-cell" }, [ record.email ? (openBlock(), createBlock("div", { key: 0 }, "📧 " + toDisplayString(record.email), 1)) : createCommentVNode("", true), record.phone ? (openBlock(), createBlock("div", { key: 1 }, "📱 " + toDisplayString(record.phone), 1)) : createCommentVNode("", true) ])) : createCommentVNode("", true), column.key === "status" ? (openBlock(), createBlock(_component_a_tag, { key: 2, color: statusColor(record.status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(record.status)), 1) ]), _: 2 }, 1032, ["color"])) : createCommentVNode("", true), column.key === "createTime" ? (openBlock(), createBlock("span", { key: 3, class: "text-sm text-gray" }, toDisplayString(record.createTime?.substring(0, 10) || "-"), 1)) : createCommentVNode("", true), column.key === "action" ? (openBlock(), createBlock(_component_a_space, { key: 4 }, { default: withCtx(() => [ createVNode(_component_a_button, { type: "link", size: "small", onClick: ($event) => handleView(record) }, { default: withCtx(() => [ createTextVNode("查看") ]), _: 1 }, 8, ["onClick"]), record.status === 0 ? (openBlock(), createBlock(_component_a_button, { key: 0, type: "link", size: "small", onClick: ($event) => handleReview(record) }, { default: withCtx(() => [ createTextVNode("审核") ]), _: 1 }, 8, ["onClick"])) : createCommentVNode("", true) ]), _: 2 }, 1024)) : createCommentVNode("", true) ]; } }), _: 1 }, _parent)); _push(`
`); _push(ssrRenderComponent(_component_a_modal, { open: unref(showDetailModal), "onUpdate:open": ($event) => isRef(showDetailModal) ? showDetailModal.value = $event : null, title: "专家详情", width: "700px", footer: null }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { if (unref(currentExpert)) { _push2(``); _push2(ssrRenderComponent(_component_a_descriptions, { column: 2, bordered: "", size: "small" }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "姓名" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentExpert).name)}`); } else { return [ createTextVNode(toDisplayString(unref(currentExpert).name), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "职称" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentExpert).title || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentExpert).title || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "单位" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentExpert).organization || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentExpert).organization || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "研究领域" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentExpert).researchArea || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentExpert).researchArea || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "邮箱" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentExpert).email || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentExpert).email || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "电话" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentExpert).phone || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentExpert).phone || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "状态" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(ssrRenderComponent(_component_a_tag, { color: statusColor(unref(currentExpert).status) }, { default: withCtx((_4, _push5, _parent5, _scopeId4) => { if (_push5) { _push5(`${ssrInterpolate(statusText(unref(currentExpert).status))}`); } else { return [ createTextVNode(toDisplayString(statusText(unref(currentExpert).status)), 1) ]; } }), _: 1 }, _parent4, _scopeId3)); } else { return [ createVNode(_component_a_tag, { color: statusColor(unref(currentExpert).status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(unref(currentExpert).status)), 1) ]), _: 1 }, 8, ["color"]) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "申请时间" }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentExpert).createTime?.substring(0, 10) || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentExpert).createTime?.substring(0, 10) || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "个人简介", span: 2 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentExpert).bio || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentExpert).bio || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_descriptions_item, { label: "研究成果", span: 2 }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`${ssrInterpolate(unref(currentExpert).achievements || "-")}`); } else { return [ createTextVNode(toDisplayString(unref(currentExpert).achievements || "-"), 1) ]; } }), _: 1 }, _parent3, _scopeId2)); } else { return [ createVNode(_component_a_descriptions_item, { label: "姓名" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).name), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "职称" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).title || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "单位" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).organization || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "研究领域" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).researchArea || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "邮箱" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).email || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "电话" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).phone || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "状态" }, { default: withCtx(() => [ createVNode(_component_a_tag, { color: statusColor(unref(currentExpert).status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(unref(currentExpert).status)), 1) ]), _: 1 }, 8, ["color"]) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "申请时间" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).createTime?.substring(0, 10) || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "个人简介", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).bio || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "研究成果", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).achievements || "-"), 1) ]), _: 1 }) ]; } }), _: 1 }, _parent2, _scopeId)); if (unref(currentExpert).attachments?.length) { _push2(`

附件材料

`); ssrRenderList(unref(currentExpert).attachments, (file, idx) => { _push2(` 📎 ${ssrInterpolate(file.name)}`); }); _push2(`
`); } else { _push2(``); } if (unref(currentExpert).status === 0) { _push2(`
`); _push2(ssrRenderComponent(_component_a_divider, null, null, _parent2, _scopeId)); _push2(ssrRenderComponent(_component_a_space, null, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(ssrRenderComponent(_component_a_button, { type: "primary", onClick: ($event) => handleApprove(unref(currentExpert)) }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`通过审核`); } else { return [ createTextVNode("通过审核") ]; } }), _: 1 }, _parent3, _scopeId2)); _push3(ssrRenderComponent(_component_a_button, { danger: "", onClick: ($event) => handleReject(unref(currentExpert)) }, { default: withCtx((_3, _push4, _parent4, _scopeId3) => { if (_push4) { _push4(`拒绝`); } else { return [ createTextVNode("拒绝") ]; } }), _: 1 }, _parent3, _scopeId2)); } else { return [ createVNode(_component_a_button, { type: "primary", onClick: ($event) => handleApprove(unref(currentExpert)) }, { default: withCtx(() => [ createTextVNode("通过审核") ]), _: 1 }, 8, ["onClick"]), createVNode(_component_a_button, { danger: "", onClick: ($event) => handleReject(unref(currentExpert)) }, { default: withCtx(() => [ createTextVNode("拒绝") ]), _: 1 }, 8, ["onClick"]) ]; } }), _: 1 }, _parent2, _scopeId)); _push2(`
`); } else { _push2(``); } _push2(``); } else { _push2(``); } } else { return [ unref(currentExpert) ? (openBlock(), createBlock(Fragment, { key: 0 }, [ createVNode(_component_a_descriptions, { column: 2, bordered: "", size: "small" }, { default: withCtx(() => [ createVNode(_component_a_descriptions_item, { label: "姓名" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).name), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "职称" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).title || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "单位" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).organization || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "研究领域" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).researchArea || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "邮箱" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).email || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "电话" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).phone || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "状态" }, { default: withCtx(() => [ createVNode(_component_a_tag, { color: statusColor(unref(currentExpert).status) }, { default: withCtx(() => [ createTextVNode(toDisplayString(statusText(unref(currentExpert).status)), 1) ]), _: 1 }, 8, ["color"]) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "申请时间" }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).createTime?.substring(0, 10) || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "个人简介", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).bio || "-"), 1) ]), _: 1 }), createVNode(_component_a_descriptions_item, { label: "研究成果", span: 2 }, { default: withCtx(() => [ createTextVNode(toDisplayString(unref(currentExpert).achievements || "-"), 1) ]), _: 1 }) ]), _: 1 }), unref(currentExpert).attachments?.length ? (openBlock(), createBlock("div", { key: 0, class: "attachments-section" }, [ createVNode("h4", null, "附件材料"), createVNode("div", { class: "attachment-list" }, [ (openBlock(true), createBlock(Fragment, null, renderList(unref(currentExpert).attachments, (file, idx) => { return openBlock(), createBlock("a", { key: idx, href: file.url, target: "_blank" }, " 📎 " + toDisplayString(file.name), 9, ["href"]); }), 128)) ]) ])) : createCommentVNode("", true), unref(currentExpert).status === 0 ? (openBlock(), createBlock("div", { key: 1, class: "review-actions" }, [ createVNode(_component_a_divider), createVNode(_component_a_space, null, { default: withCtx(() => [ createVNode(_component_a_button, { type: "primary", onClick: ($event) => handleApprove(unref(currentExpert)) }, { default: withCtx(() => [ createTextVNode("通过审核") ]), _: 1 }, 8, ["onClick"]), createVNode(_component_a_button, { danger: "", onClick: ($event) => handleReject(unref(currentExpert)) }, { default: withCtx(() => [ createTextVNode("拒绝") ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }) ])) : createCommentVNode("", true) ], 64)) : createCommentVNode("", true) ]; } }), _: 1 }, _parent)); _push(``); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/admin/experts/index.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cade93fa"]]); export { index as default }; //# sourceMappingURL=index-Ds4UieiM.mjs.map