- 新增api目录下多个接口路径代理处理文件,支持动态拼接目标URL - 根据环境变量选择不同的后端服务地址(如dev和生产环境) - 统一添加TenantId和Authorization请求头传递租户及身份信息 - 实现请求参数及搜索参数的完整转发 - 引入better-sqlite3及node内建模块支持服务端功能 - 新增专家详情页面,实现文章、成果及预约咨询功能展示 - 页面实现加载骨架屏、标签页切换及空状态提示优化体验
250 lines
11 KiB
JavaScript
250 lines
11 KiB
JavaScript
import { a as _export_sfc, c as useHead, n as navigateTo } from './server.mjs';
|
|
import { defineComponent, ref, reactive, resolveComponent, mergeProps, withCtx, unref, createTextVNode, createVNode, toDisplayString, createBlock, createCommentVNode, openBlock, useSSRContext } from 'vue';
|
|
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate } from 'vue/server-renderer';
|
|
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 'ant-design-vue';
|
|
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: "expert",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
useHead({ title: "专家申请管理" });
|
|
const loading = ref(false);
|
|
const stats = reactive({ total: 12, pending: 3, approved: 8, rejected: 1 });
|
|
const columns = [
|
|
{ title: "申请人", dataIndex: "name", key: "name" },
|
|
{ title: "单位", dataIndex: "organization", key: "organization" },
|
|
{ title: "研究领域", dataIndex: "researchArea", key: "researchArea" },
|
|
{ title: "申请时间", dataIndex: "applyTime", key: "applyTime" },
|
|
{ title: "状态", key: "status", width: 100 },
|
|
{ title: "操作", key: "action", width: 80 }
|
|
];
|
|
const recentApplications = ref([
|
|
{ id: 1, name: "张某某", organization: "广西大学", researchArea: "区域经济", applyTime: "2024-12-18", status: "pending" },
|
|
{ id: 2, name: "李某某", organization: "广西社科院", researchArea: "产业政策", applyTime: "2024-12-17", status: "pending" },
|
|
{ id: 3, name: "王某某", organization: "广西师范大学", researchArea: "金融经济", applyTime: "2024-12-15", status: "approved" }
|
|
]);
|
|
function getStatusColor(status) {
|
|
const map = { pending: "orange", approved: "green", rejected: "red" };
|
|
return map[status] || "default";
|
|
}
|
|
function getStatusText(status) {
|
|
const map = { pending: "待审核", approved: "已通过", rejected: "已拒绝" };
|
|
return map[status] || status;
|
|
}
|
|
async function loadData() {
|
|
}
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
const _component_a_space = resolveComponent("a-space");
|
|
const _component_a_button = resolveComponent("a-button");
|
|
const _component_a_table = resolveComponent("a-table");
|
|
const _component_a_tag = resolveComponent("a-tag");
|
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "admin-applications-expert" }, _attrs))} data-v-ecb81a69><div class="page-header" data-v-ecb81a69><h3 data-v-ecb81a69>专家申请管理</h3>`);
|
|
_push(ssrRenderComponent(_component_a_space, null, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(ssrRenderComponent(_component_a_button, {
|
|
type: "primary",
|
|
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/admin/experts/review")
|
|
}, {
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`前往审核`);
|
|
} else {
|
|
return [
|
|
createTextVNode("前往审核")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
_push2(ssrRenderComponent(_component_a_button, { onClick: loadData }, {
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`刷新`);
|
|
} else {
|
|
return [
|
|
createTextVNode("刷新")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
} else {
|
|
return [
|
|
createVNode(_component_a_button, {
|
|
type: "primary",
|
|
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/admin/experts/review")
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode("前往审核")
|
|
]),
|
|
_: 1
|
|
}, 8, ["onClick"]),
|
|
createVNode(_component_a_button, { onClick: loadData }, {
|
|
default: withCtx(() => [
|
|
createTextVNode("刷新")
|
|
]),
|
|
_: 1
|
|
})
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</div><div class="stats-row" data-v-ecb81a69><div class="stat-item blue" data-v-ecb81a69><div class="stat-num" data-v-ecb81a69>${ssrInterpolate(unref(stats).total)}</div><div class="stat-label" data-v-ecb81a69>总申请</div></div><div class="stat-item orange" data-v-ecb81a69><div class="stat-num" data-v-ecb81a69>${ssrInterpolate(unref(stats).pending)}</div><div class="stat-label" data-v-ecb81a69>待审核</div></div><div class="stat-item green" data-v-ecb81a69><div class="stat-num" data-v-ecb81a69>${ssrInterpolate(unref(stats).approved)}</div><div class="stat-label" data-v-ecb81a69>已通过</div></div><div class="stat-item red" data-v-ecb81a69><div class="stat-num" data-v-ecb81a69>${ssrInterpolate(unref(stats).rejected)}</div><div class="stat-label" data-v-ecb81a69>已拒绝</div></div></div><div class="template-card" data-v-ecb81a69><h4 data-v-ecb81a69>申请材料模板</h4><p data-v-ecb81a69>以下为专家申请所需材料的模板文件,请申请人按要求填写并提交。</p><div class="template-list" data-v-ecb81a69><div class="template-item" data-v-ecb81a69><span class="template-icon" data-v-ecb81a69>📄</span><span class="template-name" data-v-ecb81a69>专家申请表(个人签字)</span>`);
|
|
_push(ssrRenderComponent(_component_a_button, {
|
|
size: "small",
|
|
type: "primary"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`下载模板`);
|
|
} else {
|
|
return [
|
|
createTextVNode("下载模板")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</div><div class="template-item" data-v-ecb81a69><span class="template-icon" data-v-ecb81a69>📋</span><span class="template-name" data-v-ecb81a69>专家申请说明文件</span>`);
|
|
_push(ssrRenderComponent(_component_a_button, {
|
|
size: "small",
|
|
type: "primary"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`下载模板`);
|
|
} else {
|
|
return [
|
|
createTextVNode("下载模板")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</div></div></div><div class="table-card" data-v-ecb81a69><div class="table-header" data-v-ecb81a69><span class="table-title" data-v-ecb81a69>近期申请记录</span>`);
|
|
_push(ssrRenderComponent(_component_a_button, {
|
|
size: "small",
|
|
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/admin/experts/review")
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`查看全部并审核 →`);
|
|
} else {
|
|
return [
|
|
createTextVNode("查看全部并审核 →")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</div>`);
|
|
_push(ssrRenderComponent(_component_a_table, {
|
|
columns,
|
|
"data-source": unref(recentApplications),
|
|
loading: unref(loading),
|
|
"row-key": "id",
|
|
pagination: false,
|
|
size: "middle"
|
|
}, {
|
|
bodyCell: withCtx(({ column, record }, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
if (column.key === "status") {
|
|
_push2(ssrRenderComponent(_component_a_tag, {
|
|
color: getStatusColor(record.status)
|
|
}, {
|
|
default: withCtx((_, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`${ssrInterpolate(getStatusText(record.status))}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(getStatusText(record.status)), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 2
|
|
}, _parent2, _scopeId));
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
if (column.key === "action") {
|
|
_push2(ssrRenderComponent(_component_a_button, {
|
|
size: "small",
|
|
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/admin/experts/review")
|
|
}, {
|
|
default: withCtx((_, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`审核`);
|
|
} else {
|
|
return [
|
|
createTextVNode("审核")
|
|
];
|
|
}
|
|
}),
|
|
_: 2
|
|
}, _parent2, _scopeId));
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
} else {
|
|
return [
|
|
column.key === "status" ? (openBlock(), createBlock(_component_a_tag, {
|
|
key: 0,
|
|
color: getStatusColor(record.status)
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(getStatusText(record.status)), 1)
|
|
]),
|
|
_: 2
|
|
}, 1032, ["color"])) : createCommentVNode("", true),
|
|
column.key === "action" ? (openBlock(), createBlock(_component_a_button, {
|
|
key: 1,
|
|
size: "small",
|
|
onClick: ($event) => ("navigateTo" in _ctx ? _ctx.navigateTo : unref(navigateTo))("/admin/experts/review")
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode("审核")
|
|
]),
|
|
_: 1
|
|
}, 8, ["onClick"])) : 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/admin/applications/expert.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
const expert = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ecb81a69"]]);
|
|
|
|
export { expert as default };
|
|
//# sourceMappingURL=expert-BQyfMLGC.mjs.map
|