Files
Home-Care/hss-home-service/website/.nuxt/prerender/chunks/build/index-kIYeHZWZ.mjs
comclib c02029a5f3 feat: 初始化居家上门服务系统完整项目代码
- Spring Boot 后端服务 (hss-home-service)
- delivery-miniapp 配送小程序
- website 官网 (Nuxt)
- docs 架构设计文档
- Docker 容器化部署配置

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 09:04:49 +08:00

224 lines
14 KiB
JavaScript

import { n as navigateTo, _ as __nuxt_component_0 } from './server.mjs';
import { _ as _sfc_main$1 } from './AppIcon--JRwwp2l.mjs';
import { defineComponent, ref, withAsyncContext, mergeProps, withCtx, createVNode, createTextVNode, toDisplayString, unref, useSSRContext } from 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/vue/index.mjs';
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr } from 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/vue/server-renderer/index.mjs';
import { u as usePlatformAuth } from './usePlatformAuth-DS6-BJES.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/ofetch/dist/node.mjs';
import '../_/renderer.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/vue-bundle-renderer/dist/runtime.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/h3/dist/index.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/ufo/dist/index.mjs';
import '../nitro/nitro.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/destr/dist/index.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/hookable/dist/index.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/node-mock-http/dist/index.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/unstorage/dist/index.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/unstorage/drivers/fs.mjs';
import 'node:crypto';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/unstorage/drivers/fs-lite.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/unstorage/drivers/lru-cache.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/ohash/dist/index.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/klona/dist/index.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/defu/dist/defu.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/scule/dist/index.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/unctx/dist/index.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/radix3/dist/index.mjs';
import 'node:fs';
import 'node:url';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/pathe/dist/index.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/unhead/dist/server.mjs';
import 'node:async_hooks';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/devalue/index.js';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/unhead/dist/plugins.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/unhead/dist/utils.mjs';
import 'file:///home/akoo/%E5%B1%85%E5%AE%B6%E6%9C%8D%E5%8A%A1/hss-home-service/website/node_modules/vue-router/vue-router.node.mjs';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "index",
__ssrInlineRender: true,
async setup(__props) {
let __temp, __restore;
const { isLoggedIn, user, ROLES } = usePlatformAuth();
const stats = ref({});
ref([]);
const activeMenu = ref("dashboard");
if (!isLoggedIn.value) {
[__temp, __restore] = withAsyncContext(() => navigateTo("/platform/login")), await __temp, __restore();
}
const menuItems = [
{ key: "dashboard", label: "\u5DE5\u4F5C\u53F0", icon: "chart" },
{ key: "applications", label: "\u670D\u52A1\u7533\u8BF7", icon: "clipboard", href: "/platform/applications" },
{ key: "work-orders", label: "\u5DE5\u5355\u7BA1\u7406", icon: "document", href: "/platform/work-orders" }
];
const roleMenus = {
RECEPTIONIST: ["applications"],
ASSESSOR: ["applications"],
DISPATCHER: ["work-orders"],
STAFF: ["work-orders"],
SETTLER: ["dashboard"],
SUPERVISOR: ["dashboard"],
ADMIN: ["applications", "work-orders"]
};
return (_ctx, _push, _parent, _attrs) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
const _component_NuxtLink = __nuxt_component_0;
const _component_AppIcon = _sfc_main$1;
_push(`<div${ssrRenderAttrs(mergeProps({ class: "min-h-screen bg-surface flex" }, _attrs))}><aside class="hidden lg:flex flex-col w-56 bg-white border-r shrink-0"><div class="p-4 border-b">`);
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/platform",
class: "flex items-center gap-2 font-bold text-primary"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`<div class="w-8 h-8 rounded-lg bg-primary flex items-center justify-center text-white text-xs font-mono"${_scopeId}>H</div><span class="text-sm"${_scopeId}>\u667A\u6167\u533B\u517B\u5E73\u53F0</span>`);
} else {
return [
createVNode("div", { class: "w-8 h-8 rounded-lg bg-primary flex items-center justify-center text-white text-xs font-mono" }, "H"),
createVNode("span", { class: "text-sm" }, "\u667A\u6167\u533B\u517B\u5E73\u53F0")
];
}
}),
_: 1
}, _parent));
_push(`</div><nav class="flex-1 p-3 space-y-1"><!--[-->`);
ssrRenderList(menuItems, (m) => {
_push(ssrRenderComponent(_component_NuxtLink, {
key: m.key,
to: m.href || "/platform",
class: ["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors", activeMenu.value === m.key ? "bg-primary-50 text-primary font-medium" : "text-text-secondary hover:bg-gray-50"]
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(ssrRenderComponent(_component_AppIcon, {
name: m.icon,
class: "w-4 h-4"
}, null, _parent2, _scopeId));
_push2(` ${ssrInterpolate(m.label)}`);
} else {
return [
createVNode(_component_AppIcon, {
name: m.icon,
class: "w-4 h-4"
}, null, 8, ["name"]),
createTextVNode(" " + toDisplayString(m.label), 1)
];
}
}),
_: 2
}, _parent));
});
_push(`<!--]--></nav><div class="p-3 border-t"><div class="flex items-center gap-2 px-3 py-2 text-sm"><div class="w-7 h-7 rounded-full bg-primary-50 text-primary flex items-center justify-center text-xs font-bold">${ssrInterpolate((_b = (_a = unref(user)) == null ? void 0 : _a.userName) == null ? void 0 : _b.charAt(0))}</div><div class="min-w-0"><div class="text-xs font-medium truncate">${ssrInterpolate((_c = unref(user)) == null ? void 0 : _c.userName)}</div><select class="text-xs text-text-secondary bg-transparent border-none outline-none cursor-pointer"><!--[-->`);
ssrRenderList(unref(ROLES), (r) => {
var _a2;
_push(`<option${ssrRenderAttr("value", r.key)}${ssrIncludeBooleanAttr(((_a2 = unref(user)) == null ? void 0 : _a2.userRole) === r.key) ? " selected" : ""}>${ssrInterpolate(r.label)}</option>`);
});
_push(`<!--]--></select></div></div><button class="w-full mt-2 px-3 py-2 text-xs text-text-secondary hover:text-red-500 transition-colors text-left rounded-lg hover:bg-red-50">\u9000\u51FA\u767B\u5F55</button></div></aside><main class="flex-1 overflow-auto"><div class="lg:hidden bg-white border-b px-4 py-3 flex items-center justify-between">`);
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/platform",
class: "font-bold text-primary text-sm"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`\u667A\u6167\u533B\u517B\u5E73\u53F0`);
} else {
return [
createTextVNode("\u667A\u6167\u533B\u517B\u5E73\u53F0")
];
}
}),
_: 1
}, _parent));
_push(`<div class="flex items-center gap-2"><select class="text-xs border rounded-lg px-2 py-1 outline-none"><!--[-->`);
ssrRenderList(unref(ROLES), (r) => {
var _a2;
_push(`<option${ssrRenderAttr("value", r.key)}${ssrIncludeBooleanAttr(((_a2 = unref(user)) == null ? void 0 : _a2.userRole) === r.key) ? " selected" : ""}>${ssrInterpolate(r.label)}</option>`);
});
_push(`<!--]--></select><button class="text-xs text-red-500">\u9000\u51FA</button></div></div><div class="p-4 lg:p-8"><h2 class="text-xl font-bold mb-6">\u5DE5\u4F5C\u53F0 \u2014 ${ssrInterpolate(((_d = unref(ROLES).find((r) => {
var _a2;
return r.key === ((_a2 = unref(user)) == null ? void 0 : _a2.userRole);
})) == null ? void 0 : _d.label) || ((_e = unref(user)) == null ? void 0 : _e.userRole))}</h2><div class="grid grid-cols-2 lg:grid-cols-4 gap-4 mb-8"><div class="bg-white rounded-xl p-4 shadow-sm border"><div class="text-2xl font-bold font-mono text-primary">${ssrInterpolate(stats.value.todayOrders || "--")}</div><div class="text-xs text-text-secondary mt-1">\u4ECA\u65E5\u5DE5\u5355</div></div><div class="bg-white rounded-xl p-4 shadow-sm border"><div class="text-2xl font-bold font-mono text-accent-700">${ssrInterpolate(stats.value.inProgress || "--")}</div><div class="text-xs text-text-secondary mt-1">\u8FDB\u884C\u4E2D</div></div><div class="bg-white rounded-xl p-4 shadow-sm border"><div class="text-2xl font-bold font-mono text-green-600">${ssrInterpolate(stats.value.completedToday || "--")}</div><div class="text-xs text-text-secondary mt-1">\u5DF2\u5B8C\u6210</div></div><div class="bg-white rounded-xl p-4 shadow-sm border"><div class="text-2xl font-bold font-mono text-red-500">${ssrInterpolate(stats.value.exceptions || "--")}</div><div class="text-xs text-text-secondary mt-1">\u5F02\u5E38</div></div></div><div class="grid lg:grid-cols-2 gap-6"><div class="bg-white rounded-2xl shadow-sm border p-6"><h3 class="font-bold mb-4">\u5FEB\u6377\u64CD\u4F5C</h3><div class="grid grid-cols-2 gap-3">`);
if (["RECEPTIONIST", "ADMIN"].includes(((_f = unref(user)) == null ? void 0 : _f.userRole) || "")) {
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/platform/applications",
class: "p-4 rounded-xl bg-primary-50 text-primary text-sm font-medium hover:bg-primary hover:text-white transition-colors text-center"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`\u53D7\u7406\u65B0\u7533\u8BF7`);
} else {
return [
createTextVNode("\u53D7\u7406\u65B0\u7533\u8BF7")
];
}
}),
_: 1
}, _parent));
} else {
_push(`<!---->`);
}
if (["DISPATCHER", "ADMIN"].includes(((_g = unref(user)) == null ? void 0 : _g.userRole) || "")) {
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/platform/work-orders",
class: "p-4 rounded-xl bg-accent-50 text-accent-700 text-sm font-medium hover:bg-accent hover:text-white transition-colors text-center"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`\u67E5\u770B\u5DE5\u5355`);
} else {
return [
createTextVNode("\u67E5\u770B\u5DE5\u5355")
];
}
}),
_: 1
}, _parent));
} else {
_push(`<!---->`);
}
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/demo",
class: "p-4 rounded-xl bg-gray-50 text-text-secondary text-sm font-medium hover:bg-gray-100 transition-colors text-center"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`\u5E73\u53F0\u6F14\u793A`);
} else {
return [
createTextVNode("\u5E73\u53F0\u6F14\u793A")
];
}
}),
_: 1
}, _parent));
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/",
class: "p-4 rounded-xl bg-gray-50 text-text-secondary text-sm font-medium hover:bg-gray-100 transition-colors text-center"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`\u8FD4\u56DE\u5B98\u7F51`);
} else {
return [
createTextVNode("\u8FD4\u56DE\u5B98\u7F51")
];
}
}),
_: 1
}, _parent));
_push(`</div></div><div class="bg-white rounded-2xl shadow-sm border p-6"><h3 class="font-bold mb-4">\u5F53\u524D\u89D2\u8272\u6743\u9650</h3><div class="space-y-2 text-sm"><div class="flex justify-between py-2 border-b border-gray-50"><span class="text-text-secondary">\u89D2\u8272</span><span class="font-medium">${ssrInterpolate((_h = unref(ROLES).find((r) => {
var _a2;
return r.key === ((_a2 = unref(user)) == null ? void 0 : _a2.userRole);
})) == null ? void 0 : _h.label)}</span></div><div class="flex justify-between py-2 border-b border-gray-50"><span class="text-text-secondary">\u53EF\u64CD\u4F5C\u6A21\u5757</span><span class="font-medium">${ssrInterpolate((roleMenus[((_i = unref(user)) == null ? void 0 : _i.userRole) || ""] || ["dashboard"]).join(", "))}</span></div><div class="flex justify-between py-2"><span class="text-text-secondary">\u6570\u636E\u8303\u56F4</span><span class="font-medium">\u672C\u673A\u6784</span></div></div></div></div></div></main></div>`);
};
}
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/platform/index.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export { _sfc_main as default };
//# sourceMappingURL=index-kIYeHZWZ.mjs.map