openxiangda 1.0.69 → 1.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,135 +0,0 @@
1
- import { CheckCircle2, Clock3, Filter, Inbox, RefreshCw } from "lucide-react";
2
- import { useMemo, useState } from "react";
3
-
4
- import { taskItems } from "@/app/starter-content";
5
- import {
6
- ListItem,
7
- PageHeader,
8
- Panel,
9
- SecondaryButton,
10
- StatusPill,
11
- cn,
12
- } from "@/shared/ui";
13
-
14
- type TaskFilter = "all" | "pending" | "done";
15
-
16
- const doneItems = [
17
- {
18
- assignee: "系统运营组",
19
- due: "昨天",
20
- priority: "low" as const,
21
- status: "已完成",
22
- title: "确认服务入口可访问",
23
- },
24
- {
25
- assignee: "数据管理员",
26
- due: "本周一",
27
- priority: "low" as const,
28
- status: "已完成",
29
- title: "完成数据台账月度归档",
30
- },
31
- ];
32
-
33
- export function TaskCenterPage() {
34
- const [filter, setFilter] = useState<TaskFilter>("all");
35
- const tasks = useMemo(() => {
36
- if (filter === "pending") return taskItems;
37
- if (filter === "done") return doneItems;
38
- return [...taskItems, ...doneItems];
39
- }, [filter]);
40
-
41
- return (
42
- <div className="min-w-0 space-y-5">
43
- <PageHeader
44
- actions={
45
- <>
46
- <SecondaryButton>
47
- <Filter size={17} />
48
- 筛选
49
- </SecondaryButton>
50
- <SecondaryButton onClick={() => window.location.reload()}>
51
- <RefreshCw size={17} />
52
- 刷新
53
- </SecondaryButton>
54
- </>
55
- }
56
- description="集中查看当前账号需要处理、跟进和确认的业务事项。"
57
- meta={
58
- <>
59
- <StatusPill tone="amber">待处理 {taskItems.length}</StatusPill>
60
- <StatusPill tone="emerald">已完成 {doneItems.length}</StatusPill>
61
- </>
62
- }
63
- title="待办中心"
64
- />
65
-
66
- <Panel>
67
- <div className="mb-4 flex flex-wrap gap-2">
68
- {[
69
- { label: "全部", value: "all" as const },
70
- { label: "待处理", value: "pending" as const },
71
- { label: "已完成", value: "done" as const },
72
- ].map(item => (
73
- <button
74
- className={cn(
75
- "h-9 rounded-full px-4 text-sm font-semibold transition",
76
- filter === item.value
77
- ? "bg-slate-950 text-white shadow-lg shadow-slate-300/60"
78
- : "bg-slate-100 text-slate-600 hover:bg-slate-200/80",
79
- )}
80
- key={item.value}
81
- onClick={() => setFilter(item.value)}
82
- type="button"
83
- >
84
- {item.label}
85
- </button>
86
- ))}
87
- </div>
88
-
89
- <div className="space-y-3">
90
- {tasks.map(item => {
91
- const done = item.status === "已完成";
92
- return (
93
- <ListItem
94
- icon={done ? <CheckCircle2 size={17} /> : <Clock3 size={17} />}
95
- key={`${item.title}-${item.status}`}
96
- tone={done ? "emerald" : item.priority === "high" ? "rose" : "amber"}
97
- >
98
- <div className="flex flex-col gap-3 md:flex-row md:items-center md:justify-between">
99
- <div className="min-w-0">
100
- <div className="truncate text-sm font-semibold text-slate-950">{item.title}</div>
101
- <div className="mt-1 flex flex-wrap gap-2 text-xs text-slate-500">
102
- <span>{item.assignee}</span>
103
- <span>·</span>
104
- <span>{item.due}</span>
105
- </div>
106
- </div>
107
- <StatusPill tone={done ? "emerald" : item.priority === "high" ? "rose" : "amber"}>
108
- {item.status}
109
- </StatusPill>
110
- </div>
111
- </ListItem>
112
- );
113
- })}
114
- </div>
115
- </Panel>
116
-
117
- <Panel title="办理建议" description="优先处理高优先级和临近截止时间的事项,保持流程顺畅。">
118
- <div className="grid gap-3 md:grid-cols-3">
119
- <ListItem icon={<Inbox size={17} />} tone="blue">
120
- <div className="text-sm font-semibold text-slate-950">统一入口</div>
121
- <div className="mt-1 text-xs leading-5 text-slate-500">把审批、补充资料和确认事项集中到一个页面。</div>
122
- </ListItem>
123
- <ListItem icon={<Clock3 size={17} />} tone="amber">
124
- <div className="text-sm font-semibold text-slate-950">按时推进</div>
125
- <div className="mt-1 text-xs leading-5 text-slate-500">使用截止时间和状态提醒帮助用户判断优先级。</div>
126
- </ListItem>
127
- <ListItem icon={<CheckCircle2 size={17} />} tone="emerald">
128
- <div className="text-sm font-semibold text-slate-950">闭环记录</div>
129
- <div className="mt-1 text-xs leading-5 text-slate-500">完成事项保留处理痕迹,便于后续查询。</div>
130
- </ListItem>
131
- </div>
132
- </Panel>
133
- </div>
134
- );
135
- }
@@ -1,71 +0,0 @@
1
- import { ArrowRight, FileText, Inbox, Search, ShieldCheck } from "lucide-react";
2
-
3
- import { portalEntries, recentActivities } from "@/app/starter-content";
4
- import {
5
- ListItem,
6
- MetricCard,
7
- PageHeader,
8
- Panel,
9
- StatusPill,
10
- } from "@/shared/ui";
11
-
12
- const icons = [FileText, Inbox, Search];
13
-
14
- export function UserPortalPage() {
15
- return (
16
- <div className="min-w-0 space-y-5">
17
- <PageHeader
18
- description="普通用户可以在这里发起申请、查看事项进度,并查询自己有权限访问的数据。"
19
- meta={
20
- <>
21
- <StatusPill tone="emerald">已登录</StatusPill>
22
- <StatusPill tone="blue">服务入口</StatusPill>
23
- <StatusPill tone="violet">我的事项</StatusPill>
24
- </>
25
- }
26
- title="用户门户"
27
- />
28
-
29
- <section className="grid gap-4 md:grid-cols-3">
30
- {portalEntries.map((entry, index) => (
31
- <MetricCard
32
- caption={entry.desc}
33
- icon={icons[index]}
34
- key={entry.label}
35
- label={entry.label}
36
- tone={entry.tone}
37
- value={<span className="text-base">进入</span>}
38
- />
39
- ))}
40
- </section>
41
-
42
- <section className="grid gap-5 lg:grid-cols-[minmax(0,1fr)_360px]">
43
- <Panel title="我的事项" description="常用事项会集中展示,便于持续跟进。">
44
- <div className="grid gap-3 md:grid-cols-2">
45
- {portalEntries.map(entry => (
46
- <ListItem key={entry.label} tone={entry.tone}>
47
- <div className="flex items-center justify-between gap-3">
48
- <div className="min-w-0">
49
- <div className="truncate text-sm font-semibold text-slate-950">{entry.label}</div>
50
- <div className="mt-1 truncate text-xs text-slate-500">{entry.desc}</div>
51
- </div>
52
- <ArrowRight className="shrink-0 text-slate-400" size={17} />
53
- </div>
54
- </ListItem>
55
- ))}
56
- </div>
57
- </Panel>
58
-
59
- <Panel title="最近动态">
60
- <div className="space-y-3">
61
- {recentActivities.slice(0, 3).map(activity => (
62
- <ListItem icon={<ShieldCheck size={17} />} key={activity} tone="emerald">
63
- <div className="text-sm leading-6 text-slate-600">{activity}</div>
64
- </ListItem>
65
- ))}
66
- </div>
67
- </Panel>
68
- </section>
69
- </div>
70
- );
71
- }
@@ -1,49 +0,0 @@
1
- import { FileCheck2, Globe2, LockKeyhole, MessageSquareText } from "lucide-react";
2
-
3
- import { publicServices } from "@/app/starter-content";
4
- import {
5
- ListItem,
6
- PageHeader,
7
- Panel,
8
- StatusPill,
9
- } from "@/shared/ui";
10
-
11
- const icons = [Globe2, FileCheck2, LockKeyhole];
12
-
13
- export function PublicHomePage() {
14
- return (
15
- <div className="min-w-0 space-y-5">
16
- <PageHeader
17
- description="这里用于承载无需登录即可访问的说明、登记、查询或邀请链接。"
18
- meta={
19
- <>
20
- <StatusPill tone="blue">公开说明</StatusPill>
21
- <StatusPill tone="emerald">公开登记</StatusPill>
22
- <StatusPill tone="amber">安全链接</StatusPill>
23
- </>
24
- }
25
- title="公开服务"
26
- />
27
- <Panel title="可用服务" description="把面向外部用户或访客的入口集中展示,降低访问成本。">
28
- <div className="grid gap-3 md:grid-cols-3">
29
- {publicServices.map((service, index) => {
30
- const Icon = icons[index];
31
- return (
32
- <ListItem icon={<Icon size={17} />} key={service.label} tone={service.tone}>
33
- <div className="text-sm font-semibold text-slate-950">{service.label}</div>
34
- <div className="mt-1 text-xs leading-5 text-slate-500">{service.desc}</div>
35
- </ListItem>
36
- );
37
- })}
38
- </div>
39
- </Panel>
40
- <Panel title="访问说明">
41
- <ListItem icon={<MessageSquareText size={17} />} tone="violet">
42
- <div className="text-sm leading-6 text-slate-600">
43
- 公开页面适合发布说明、收集反馈和提供一次性访问入口。涉及敏感数据时,仍应通过后端权限和短期凭证控制访问范围。
44
- </div>
45
- </ListItem>
46
- </Panel>
47
- </div>
48
- );
49
- }
@@ -1,8 +0,0 @@
1
- {
2
- "code": "app_user_spa_pages",
3
- "name": "普通用户 SPA 页面",
4
- "roles": ["app_user"],
5
- "menuCodes": ["user_portal", "public_home"],
6
- "routeCodes": ["portal.home", "public.home"],
7
- "pathPatterns": ["/view/:appType/portal/*", "/view/:appType/public/*"]
8
- }