- 新增api目录下多个接口路径代理处理文件,支持动态拼接目标URL - 根据环境变量选择不同的后端服务地址(如dev和生产环境) - 统一添加TenantId和Authorization请求头传递租户及身份信息 - 实现请求参数及搜索参数的完整转发 - 引入better-sqlite3及node内建模块支持服务端功能 - 新增专家详情页面,实现文章、成果及预约咨询功能展示 - 页面实现加载骨架屏、标签页切换及空状态提示优化体验
1124 lines
49 KiB
JavaScript
1124 lines
49 KiB
JavaScript
import { defineComponent, ref, reactive, computed, watch, 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 members = ref([]);
|
|
const memberType = ref("all");
|
|
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: 260 },
|
|
{ title: "联系方式", key: "contact", width: 180 },
|
|
{ title: "状态", key: "status", width: 100 },
|
|
{ title: "申请时间", key: "createTime", width: 120 },
|
|
{ title: "操作", key: "action", width: 120 }
|
|
];
|
|
const showDetailModal = ref(false);
|
|
const currentMember = ref(null);
|
|
const filteredMembers = computed(() => {
|
|
const keyword = searchKeyword.value.trim().toLowerCase();
|
|
return members.value.filter((item) => {
|
|
if (memberType.value === "enterprise") return item.type === 1;
|
|
if (memberType.value === "personal") return item.type === 2;
|
|
return true;
|
|
}).filter((item) => filterStatus.value === void 0 || item.status === filterStatus.value).filter((item) => {
|
|
if (!keyword) return true;
|
|
return [item.name, item.contact].some((val) => String(val || "").toLowerCase().includes(keyword));
|
|
}).sort((a, b) => (b.id || 0) - (a.id || 0));
|
|
});
|
|
const pagedMembers = computed(() => {
|
|
const start = (pagination.current - 1) * pagination.pageSize;
|
|
return filteredMembers.value.slice(start, start + pagination.pageSize);
|
|
});
|
|
const tablePagination = computed(() => ({
|
|
current: pagination.current,
|
|
pageSize: pagination.pageSize,
|
|
total: filteredMembers.value.length,
|
|
showSizeChanger: pagination.showSizeChanger,
|
|
showQuickJumper: pagination.showQuickJumper
|
|
}));
|
|
function updateStats() {
|
|
const filtered = members.value.filter((item) => {
|
|
if (memberType.value === "enterprise") return item.type === 1;
|
|
if (memberType.value === "personal") return item.type === 2;
|
|
return true;
|
|
});
|
|
statCards[0].value = filtered.filter((i) => i.status === 0).length;
|
|
statCards[1].value = filtered.filter((i) => i.status === 1).length;
|
|
statCards[2].value = filtered.filter((i) => i.status === 2).length;
|
|
statCards[3].value = filtered.length;
|
|
}
|
|
async function loadMembers() {
|
|
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) {
|
|
currentMember.value = record;
|
|
showDetailModal.value = true;
|
|
}
|
|
function handleReview(record) {
|
|
currentMember.value = record;
|
|
showDetailModal.value = true;
|
|
}
|
|
async function handleApprove(member) {
|
|
try {
|
|
message.success("已通过审核");
|
|
showDetailModal.value = false;
|
|
await loadMembers();
|
|
} catch (e) {
|
|
message.error(e?.message || "操作失败");
|
|
}
|
|
}
|
|
async function handleReject(member) {
|
|
try {
|
|
message.success("已拒绝");
|
|
showDetailModal.value = false;
|
|
await loadMembers();
|
|
} 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";
|
|
}
|
|
watch(memberType, () => {
|
|
updateStats();
|
|
});
|
|
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_radio_group = resolveComponent("a-radio-group");
|
|
const _component_a_radio_button = resolveComponent("a-radio-button");
|
|
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(`<div${ssrRenderAttrs(mergeProps({ class: "members-page" }, _attrs))} data-v-f747bdd7><div class="page-header" data-v-f747bdd7><div data-v-f747bdd7><h2 class="page-title" data-v-f747bdd7>💼 会员管理</h2><p class="page-desc" data-v-f747bdd7>管理企业会员和个人会员,支持入会申请审核</p></div>`);
|
|
_push(ssrRenderComponent(_component_a_space, null, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(ssrRenderComponent(_component_a_button, {
|
|
onClick: loadMembers,
|
|
loading: unref(loading)
|
|
}, {
|
|
icon: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(ssrRenderComponent(unref(ReloadOutlined), null, null, _parent3, _scopeId2));
|
|
} else {
|
|
return [
|
|
createVNode(unref(ReloadOutlined))
|
|
];
|
|
}
|
|
}),
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(` 刷新 `);
|
|
} else {
|
|
return [
|
|
createTextVNode(" 刷新 ")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
} else {
|
|
return [
|
|
createVNode(_component_a_button, {
|
|
onClick: loadMembers,
|
|
loading: unref(loading)
|
|
}, {
|
|
icon: withCtx(() => [
|
|
createVNode(unref(ReloadOutlined))
|
|
]),
|
|
default: withCtx(() => [
|
|
createTextVNode(" 刷新 ")
|
|
]),
|
|
_: 1
|
|
}, 8, ["loading"])
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</div>`);
|
|
_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(`<div class="${ssrRenderClass([[stat.color, { active: unref(filterStatus) === stat.key }], "stat-card"])}" data-v-f747bdd7${_scopeId2}><div class="stat-icon" data-v-f747bdd7${_scopeId2}>${ssrInterpolate(stat.icon)}</div><div class="stat-info" data-v-f747bdd7${_scopeId2}><div class="stat-value" data-v-f747bdd7${_scopeId2}>${ssrInterpolate(stat.value)}</div><div class="stat-label" data-v-f747bdd7${_scopeId2}>${ssrInterpolate(stat.label)}</div></div></div>`);
|
|
} 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(ssrRenderComponent(_component_a_radio_group, {
|
|
value: unref(memberType),
|
|
"onUpdate:value": ($event) => isRef(memberType) ? memberType.value = $event : null,
|
|
"button-style": "solid",
|
|
class: "mb-4"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(ssrRenderComponent(_component_a_radio_button, { value: "all" }, {
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`全部`);
|
|
} else {
|
|
return [
|
|
createTextVNode("全部")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
_push2(ssrRenderComponent(_component_a_radio_button, { value: "enterprise" }, {
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`企业会员`);
|
|
} else {
|
|
return [
|
|
createTextVNode("企业会员")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
_push2(ssrRenderComponent(_component_a_radio_button, { value: "personal" }, {
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`个人会员`);
|
|
} else {
|
|
return [
|
|
createTextVNode("个人会员")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
} else {
|
|
return [
|
|
createVNode(_component_a_radio_button, { value: "all" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode("全部")
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_radio_button, { value: "enterprise" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode("企业会员")
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_radio_button, { value: "personal" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode("个人会员")
|
|
]),
|
|
_: 1
|
|
})
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`<div class="panel" data-v-f747bdd7><div class="panel-header" data-v-f747bdd7><span class="panel-title" data-v-f747bdd7>📋 会员列表</span>`);
|
|
_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(`</div>`);
|
|
_push(ssrRenderComponent(_component_a_table, {
|
|
columns,
|
|
"data-source": unref(pagedMembers),
|
|
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(`<div class="member-info-cell" data-v-f747bdd7${_scopeId}><div class="${ssrRenderClass([record.type === 1 ? "enterprise" : "personal", "member-avatar"])}" data-v-f747bdd7${_scopeId}>${ssrInterpolate(record.type === 1 ? "🏢" : "👤")}</div><div class="member-info-text" data-v-f747bdd7${_scopeId}><div class="member-name" data-v-f747bdd7${_scopeId}>${ssrInterpolate(record.name)}</div><div class="member-meta" data-v-f747bdd7${_scopeId}>`);
|
|
_push2(ssrRenderComponent(_component_a_tag, {
|
|
color: record.type === 1 ? "blue" : "green",
|
|
size: "small"
|
|
}, {
|
|
default: withCtx((_, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`${ssrInterpolate(record.type === 1 ? "企业会员" : "个人会员")}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(record.type === 1 ? "企业会员" : "个人会员"), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 2
|
|
}, _parent2, _scopeId));
|
|
_push2(`</div></div></div>`);
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
if (column.key === "contact") {
|
|
_push2(`<div class="contact-cell" data-v-f747bdd7${_scopeId}>`);
|
|
if (record.contact) {
|
|
_push2(`<div data-v-f747bdd7${_scopeId}>📞 ${ssrInterpolate(record.contact)}</div>`);
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
if (record.phone) {
|
|
_push2(`<div data-v-f747bdd7${_scopeId}>📱 ${ssrInterpolate(record.phone)}</div>`);
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
_push2(`</div>`);
|
|
} 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(`<span class="text-sm text-gray" data-v-f747bdd7${_scopeId}>${ssrInterpolate(record.createTime?.substring(0, 10) || "-")}</span>`);
|
|
} 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: "member-info-cell"
|
|
}, [
|
|
createVNode("div", {
|
|
class: ["member-avatar", record.type === 1 ? "enterprise" : "personal"]
|
|
}, toDisplayString(record.type === 1 ? "🏢" : "👤"), 3),
|
|
createVNode("div", { class: "member-info-text" }, [
|
|
createVNode("div", { class: "member-name" }, toDisplayString(record.name), 1),
|
|
createVNode("div", { class: "member-meta" }, [
|
|
createVNode(_component_a_tag, {
|
|
color: record.type === 1 ? "blue" : "green",
|
|
size: "small"
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(record.type === 1 ? "企业会员" : "个人会员"), 1)
|
|
]),
|
|
_: 2
|
|
}, 1032, ["color"])
|
|
])
|
|
])
|
|
])) : createCommentVNode("", true),
|
|
column.key === "contact" ? (openBlock(), createBlock("div", {
|
|
key: 1,
|
|
class: "contact-cell"
|
|
}, [
|
|
record.contact ? (openBlock(), createBlock("div", { key: 0 }, "📞 " + toDisplayString(record.contact), 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(`</div>`);
|
|
_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(currentMember)) {
|
|
_push2(`<!--[-->`);
|
|
_push2(ssrRenderComponent(_component_a_tag, {
|
|
color: unref(currentMember).type === 1 ? "blue" : "green",
|
|
style: { "margin-bottom": "16px" }
|
|
}, {
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`${ssrInterpolate(unref(currentMember).type === 1 ? "企业会员" : "个人会员")}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(unref(currentMember).type === 1 ? "企业会员" : "个人会员"), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
_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(currentMember).name)}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(unref(currentMember).name), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent3, _scopeId2));
|
|
_push3(ssrRenderComponent(_component_a_descriptions_item, { label: "联系人" }, {
|
|
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
if (_push4) {
|
|
_push4(`${ssrInterpolate(unref(currentMember).contact || "-")}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(unref(currentMember).contact || "-"), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent3, _scopeId2));
|
|
_push3(ssrRenderComponent(_component_a_descriptions_item, { label: "联系电话" }, {
|
|
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
if (_push4) {
|
|
_push4(`${ssrInterpolate(unref(currentMember).phone || "-")}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(unref(currentMember).phone || "-"), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent3, _scopeId2));
|
|
_push3(ssrRenderComponent(_component_a_descriptions_item, { label: "邮箱" }, {
|
|
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
if (_push4) {
|
|
_push4(`${ssrInterpolate(unref(currentMember).email || "-")}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(unref(currentMember).email || "-"), 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(currentMember).status)
|
|
}, {
|
|
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
|
|
if (_push5) {
|
|
_push5(`${ssrInterpolate(statusText(unref(currentMember).status))}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(statusText(unref(currentMember).status)), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent4, _scopeId3));
|
|
} else {
|
|
return [
|
|
createVNode(_component_a_tag, {
|
|
color: statusColor(unref(currentMember).status)
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(statusText(unref(currentMember).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(currentMember).createTime?.substring(0, 10) || "-")}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(unref(currentMember).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(currentMember).bio || "-")}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(unref(currentMember).bio || "-"), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent3, _scopeId2));
|
|
} else {
|
|
return [
|
|
createVNode(_component_a_descriptions_item, { label: "姓名/企业名" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).name), 1)
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, { label: "联系人" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).contact || "-"), 1)
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, { label: "联系电话" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).phone || "-"), 1)
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, { label: "邮箱" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).email || "-"), 1)
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, { label: "状态" }, {
|
|
default: withCtx(() => [
|
|
createVNode(_component_a_tag, {
|
|
color: statusColor(unref(currentMember).status)
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(statusText(unref(currentMember).status)), 1)
|
|
]),
|
|
_: 1
|
|
}, 8, ["color"])
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, { label: "申请时间" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).createTime?.substring(0, 10) || "-"), 1)
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, {
|
|
label: "简介",
|
|
span: 2
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).bio || "-"), 1)
|
|
]),
|
|
_: 1
|
|
})
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
if (unref(currentMember).attachments?.length) {
|
|
_push2(`<div class="attachments-section" data-v-f747bdd7${_scopeId}><h4 data-v-f747bdd7${_scopeId}>附件材料</h4><div class="attachment-list" data-v-f747bdd7${_scopeId}><!--[-->`);
|
|
ssrRenderList(unref(currentMember).attachments, (file, idx) => {
|
|
_push2(`<a${ssrRenderAttr("href", file.url)} target="_blank" data-v-f747bdd7${_scopeId}> 📎 ${ssrInterpolate(file.name)}</a>`);
|
|
});
|
|
_push2(`<!--]--></div></div>`);
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
if (unref(currentMember).status === 0) {
|
|
_push2(`<div class="review-actions" data-v-f747bdd7${_scopeId}>`);
|
|
_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(currentMember))
|
|
}, {
|
|
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(currentMember))
|
|
}, {
|
|
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(currentMember))
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode("通过审核")
|
|
]),
|
|
_: 1
|
|
}, 8, ["onClick"]),
|
|
createVNode(_component_a_button, {
|
|
danger: "",
|
|
onClick: ($event) => handleReject(unref(currentMember))
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode("拒绝")
|
|
]),
|
|
_: 1
|
|
}, 8, ["onClick"])
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
_push2(`</div>`);
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
_push2(`<!--]-->`);
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
} else {
|
|
return [
|
|
unref(currentMember) ? (openBlock(), createBlock(Fragment, { key: 0 }, [
|
|
createVNode(_component_a_tag, {
|
|
color: unref(currentMember).type === 1 ? "blue" : "green",
|
|
style: { "margin-bottom": "16px" }
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).type === 1 ? "企业会员" : "个人会员"), 1)
|
|
]),
|
|
_: 1
|
|
}, 8, ["color"]),
|
|
createVNode(_component_a_descriptions, {
|
|
column: 2,
|
|
bordered: "",
|
|
size: "small"
|
|
}, {
|
|
default: withCtx(() => [
|
|
createVNode(_component_a_descriptions_item, { label: "姓名/企业名" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).name), 1)
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, { label: "联系人" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).contact || "-"), 1)
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, { label: "联系电话" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).phone || "-"), 1)
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, { label: "邮箱" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).email || "-"), 1)
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, { label: "状态" }, {
|
|
default: withCtx(() => [
|
|
createVNode(_component_a_tag, {
|
|
color: statusColor(unref(currentMember).status)
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(statusText(unref(currentMember).status)), 1)
|
|
]),
|
|
_: 1
|
|
}, 8, ["color"])
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, { label: "申请时间" }, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).createTime?.substring(0, 10) || "-"), 1)
|
|
]),
|
|
_: 1
|
|
}),
|
|
createVNode(_component_a_descriptions_item, {
|
|
label: "简介",
|
|
span: 2
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode(toDisplayString(unref(currentMember).bio || "-"), 1)
|
|
]),
|
|
_: 1
|
|
})
|
|
]),
|
|
_: 1
|
|
}),
|
|
unref(currentMember).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(currentMember).attachments, (file, idx) => {
|
|
return openBlock(), createBlock("a", {
|
|
key: idx,
|
|
href: file.url,
|
|
target: "_blank"
|
|
}, " 📎 " + toDisplayString(file.name), 9, ["href"]);
|
|
}), 128))
|
|
])
|
|
])) : createCommentVNode("", true),
|
|
unref(currentMember).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(currentMember))
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode("通过审核")
|
|
]),
|
|
_: 1
|
|
}, 8, ["onClick"]),
|
|
createVNode(_component_a_button, {
|
|
danger: "",
|
|
onClick: ($event) => handleReject(unref(currentMember))
|
|
}, {
|
|
default: withCtx(() => [
|
|
createTextVNode("拒绝")
|
|
]),
|
|
_: 1
|
|
}, 8, ["onClick"])
|
|
]),
|
|
_: 1
|
|
})
|
|
])) : createCommentVNode("", true)
|
|
], 64)) : createCommentVNode("", true)
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</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/members/index.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f747bdd7"]]);
|
|
|
|
export { index as default };
|
|
//# sourceMappingURL=index-DdeGb0tg.mjs.map
|