Skip to content

Commit 74a298c

Browse files
committed
feat:ticket-server-mark
Synchronize:2026/03/10-15:47:14 Private-Origin: 2becead1402e006b63f53100c7ddd75951378c18
1 parent de45e28 commit 74a298c

File tree

5 files changed

+52
-4
lines changed

5 files changed

+52
-4
lines changed

frontend-admin/src/components/TicketDetailComponent.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,12 @@ const TicketDetailComponent: React.FC<{
646646
}}
647647
>
648648
{detail.displayTitle}
649+
{detail.operator.startsWith(
650+
'EC-'
651+
) &&
652+
gLang(
653+
'ticketDetail.inGameLabel'
654+
)}
649655
</span>
650656
</Popover>
651657
) : (
@@ -663,6 +669,12 @@ const TicketDetailComponent: React.FC<{
663669
}}
664670
>
665671
{detail.displayTitle}
672+
{detail.operator.startsWith(
673+
'EC-'
674+
) &&
675+
gLang(
676+
'ticketDetail.inGameLabel'
677+
)}
666678
</span>
667679
</Tooltip>
668680
)
@@ -680,6 +692,12 @@ const TicketDetailComponent: React.FC<{
680692
}}
681693
>
682694
{detail.displayTitle}
695+
{detail.operator.startsWith(
696+
'EC-'
697+
) &&
698+
gLang(
699+
'ticketDetail.inGameLabel'
700+
)}
683701
</span>
684702
)}
685703
{detail.action ===

frontend-admin/src/language/language.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,7 @@ export const adminLanguageConfig = {
11681168
todayStatsTypesTitle: '按类型分布',
11691169
todayStatsTimeTitle: '按发起时间分布',
11701170
todayStatsAutoClosed: '自动关闭:{count}',
1171+
todayStatsInGameSubmitted: '今日服内发送:{count}',
11711172
todayStatsViewDetails: '查看详情',
11721173
todayStatsCollapseDetails: '收起详情',
11731174
jwt: {

frontend-admin/src/pages/admin/admin-dashboard/components/TodayTicketsModal.tsx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ interface TodayStats {
2727
byType: Record<string, number>;
2828
hourly: number[]; // length 24
2929
auto_closed?: number;
30+
in_game_submitted?: number;
3031
}
3132

3233
export default function TodayTicketsModal({
@@ -61,6 +62,7 @@ export default function TodayTicketsModal({
6162
byType: resp.byType || {},
6263
hourly: resp.hourly || [],
6364
auto_closed: resp.auto_closed || 0,
65+
in_game_submitted: resp.in_game_submitted || 0,
6466
});
6567
},
6668
}).finally(() => setLoading(false));
@@ -117,8 +119,8 @@ export default function TodayTicketsModal({
117119

118120
{!loading && data && (
119121
<>
120-
<Row gutter={16}>
121-
<Col span={12}>
122+
<Row gutter={[16, 16]}>
123+
<Col xs={24} sm={12} md={8}>
122124
<Card
123125
bordered={false}
124126
bodyStyle={{
@@ -136,7 +138,7 @@ export default function TodayTicketsModal({
136138
/>
137139
</Card>
138140
</Col>
139-
<Col span={12}>
141+
<Col xs={24} sm={12} md={8}>
140142
<Card
141143
bordered={false}
142144
bodyStyle={{
@@ -154,6 +156,24 @@ export default function TodayTicketsModal({
154156
/>
155157
</Card>
156158
</Col>
159+
<Col xs={24} sm={12} md={8}>
160+
<Card
161+
bordered={false}
162+
bodyStyle={{
163+
padding: 12,
164+
background: token.colorFillAlter,
165+
borderRadius: token.borderRadiusLG,
166+
}}
167+
>
168+
<Statistic
169+
title={gLang('adminMain.todayStatsInGameSubmitted', {
170+
count: '',
171+
}).replace(':', '')}
172+
value={data.in_game_submitted ?? 0}
173+
valueStyle={{ fontSize: 20 }}
174+
/>
175+
</Card>
176+
</Col>
157177
</Row>
158178

159179
<Row gutter={24}>

frontend-common/language.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,7 @@ export const languageConfig: Readonly<LanguageConfig> = {
899899
revokedMessage: '撤回消息',
900900
internalNote: '内部备注',
901901
noteLabel: '备注',
902+
inGameLabel: '(服内)',
902903
editNote: '编辑',
903904
convertToReply: '转为用户可见',
904905
editNoteSuccess: '内部注释已更新',

mock-backend/server.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,15 @@ app.post('/ticket/listByOpenIdAndType', (req, res) => {
14141414
});
14151415

14161416
app.get('/ticket/today-stats', (_req, res) => {
1417-
res.json(ok({ created: 12, closed: 9, pending: 3 }));
1417+
res.json(
1418+
ok({
1419+
total: 12,
1420+
byType: { AG: 5, RP: 3, SP: 2, MM: 2 },
1421+
hourly: Array.from({ length: 24 }, (_, index) => (index % 5 === 0 ? 1 : 0)),
1422+
auto_closed: 2,
1423+
in_game_submitted: 7,
1424+
})
1425+
);
14181426
});
14191427

14201428
app.get('/ticket/today-stats/hour', (_req, res) => {

0 commit comments

Comments
 (0)