@appthen/cli 1.2.11 → 1.2.13
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.
- package/bin/main.js +47 -0
- package/dist/index.js +6185 -15001
- package/package.json +8 -4
- package/tests/test-app/.appthen/shadow-space-100001-test-app-e99876b1.json +1197 -741
- package/tests/test-app/.appthen/space-config.json +2 -2
- package/tests/test-app/src/components/MessageCenter.tsx +506 -0
- package/tests/test-app/src/pages/CustomerManagement.tsx +535 -0
- package/tests/test-app/src/pages/CyberpunkDashboard.tsx +348 -0
- package/tests/test-app/src/pages/CyberpunkProductManagement.tsx +637 -0
- package/tests/test-app/src/pages/CyberpunkUserList.tsx +316 -0
- package/tests/test-app/src/pages/DashboardV2.tsx +334 -0
- package/tests/test-app/src/pages/DataReport.tsx +298 -0
- package/tests/test-app/src/pages/DataStatistics.tsx +317 -0
- package/tests/test-app/src/pages/DepartmentManagement.tsx +503 -0
- package/tests/test-app/src/pages/FileExplorer.tsx +441 -0
- package/tests/test-app/src/pages/OrderDetail.tsx +393 -0
- package/tests/test-app/src/pages/ProductManagement.tsx +521 -0
- package/tests/test-app/src/pages/ProjectTimeline.tsx +395 -0
- package/tests/test-app/src/pages/RoleManagement.tsx +523 -0
- package/tests/test-app/src/pages/StaticCyberpunkDashboard.tsx +462 -0
- package/tests/test-app/src/pages/StaticCyberpunkUserList.tsx +567 -0
- package/tests/test-app/src/pages/StudentWeaknessList.tsx +547 -0
- package/tests/test-app/src/pages/SystemSettings.tsx +422 -0
- package/tests/test-app/src/pages/TaskManagement.tsx +467 -0
- package/tests/test-app/src/pages/TicketManagement.tsx +402 -0
- package/tests/test-app/src/pages/UserProfile.tsx +404 -0
- package/tests/test-app/src/pages/WorkflowDesigner.tsx +434 -0
- package/tests/test-app/src/pages/admin/dashboard.tsx +591 -0
- package/tests/test-app/src/pages/article-list.tsx +222 -0
- package/tests/test-app/src/pages/babyProductRecommendationPage.tsx +168 -0
- package/tests/test-app/src/pages/category-list.tsx +179 -0
- package/tests/test-app/src/pages/comment-list.tsx +194 -0
- package/tests/test-app/src/pages/cyberpunk/cyberpunkCRMPage.tsx +1299 -0
- package/tests/test-app/src/pages/data-analytics.tsx +1872 -0
- package/tests/test-app/src/pages/data-overview.tsx +600 -0
- package/tests/test-app/src/pages/demo-error-page.tsx +119 -0
- package/tests/test-app/src/pages/department-list.tsx +183 -0
- package/tests/test-app/src/pages/goods-list.tsx +233 -0
- package/tests/test-app/src/pages/housekeeping/adminDashboardPage.tsx +880 -0
- package/tests/test-app/src/pages/mobile_terminal/uiHandsOnPractice.tsx +1 -1
- package/tests/test-app/src/pages/notice-list.tsx +217 -0
- package/tests/test-app/src/pages/order-detail.tsx +330 -0
- package/tests/test-app/src/pages/order-list.tsx +195 -0
- package/tests/test-app/src/pages/order-management.tsx +563 -0
- package/tests/test-app/src/pages/page/OrderList.tsx +230 -0
- package/tests/test-app/src/pages/role-list.tsx +184 -0
- package/tests/test-app/src/pages/simple/simplePage.tsx +92 -0
- package/tests/test-app/src/pages/simple-page.tsx +43 -0
- package/tests/test-app/src/pages/test-destructure.tsx +44 -0
- package/tests/test-app/src/pages/test-error-page.tsx +75 -0
- package/tests/test-app/src/pages/test-page-with-errors.tsx +51 -0
- package/tests/test-app/src/pages/test-page.tsx +101 -0
- package/tests/test-app/src/pages/test-render.tsx +52 -0
- package/tests/test-app/src/pages/test-return-type.tsx +41 -0
- package/tests/test-app/src/pages/test-type-assertion.tsx +37 -0
- package/tests/test-app/src/pages/ui/styleSelectorPage.tsx +1554 -0
- package/tests/test-app/src/pages/user-list.tsx +212 -0
- package/tests/test-app/src/pages/wrong-page.tsx +50 -0
- package/tests/test-app/.appthen/shadow-space-unknown-user-test-app-e99876b1.json +0 -1060
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 任务管理
|
|
3
|
+
* 项目任务跟踪和管理
|
|
4
|
+
*
|
|
5
|
+
* @type Page
|
|
6
|
+
* @route /tasks
|
|
7
|
+
* @screen 1920w
|
|
8
|
+
* @frames web
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class IProps {
|
|
15
|
+
projectId?: number;
|
|
16
|
+
taskId?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* 数据与接口请求定义
|
|
21
|
+
*/
|
|
22
|
+
class IState {
|
|
23
|
+
tasks?: {
|
|
24
|
+
/* @example 1 */id?: number,
|
|
25
|
+
/* @example 用户登录功能开发 */title?: string,
|
|
26
|
+
/* @example 进行中 */status?: string,
|
|
27
|
+
/* @example high */priority?: string,
|
|
28
|
+
/* @example 张三 */assignee?: string,
|
|
29
|
+
/* @example 60 */progress?: number,
|
|
30
|
+
/* @example 2024-01-20 */deadline?: string,
|
|
31
|
+
/* @example 4 */rating?: number,
|
|
32
|
+
tags?: string[],
|
|
33
|
+
}[];
|
|
34
|
+
loading?: boolean;
|
|
35
|
+
activeTab?: string;
|
|
36
|
+
filters?: {
|
|
37
|
+
status?: string,
|
|
38
|
+
priority?: string,
|
|
39
|
+
assignee?: string,
|
|
40
|
+
};
|
|
41
|
+
@Form({
|
|
42
|
+
setter: "JsonSetter"
|
|
43
|
+
})
|
|
44
|
+
selectedTaskIds?: string[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
class Document extends React.Component<IProps, IState> {
|
|
48
|
+
state = {
|
|
49
|
+
tasks: [
|
|
50
|
+
{
|
|
51
|
+
id: 1,
|
|
52
|
+
title: '用户登录功能开发',
|
|
53
|
+
status: '进行中',
|
|
54
|
+
priority: 'high',
|
|
55
|
+
assignee: '张三',
|
|
56
|
+
progress: 60,
|
|
57
|
+
deadline: '2024-01-20',
|
|
58
|
+
rating: 4,
|
|
59
|
+
tags: ['前端', '登录'],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 2,
|
|
63
|
+
title: '订单系统优化',
|
|
64
|
+
status: '待开始',
|
|
65
|
+
priority: 'high',
|
|
66
|
+
assignee: '李四',
|
|
67
|
+
progress: 0,
|
|
68
|
+
deadline: '2024-01-25',
|
|
69
|
+
rating: 0,
|
|
70
|
+
tags: ['后端', '订单'],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 3,
|
|
74
|
+
title: '数据报表导出功能',
|
|
75
|
+
status: '进行中',
|
|
76
|
+
priority: 'medium',
|
|
77
|
+
assignee: '王五',
|
|
78
|
+
progress: 30,
|
|
79
|
+
deadline: '2024-01-22',
|
|
80
|
+
rating: 3,
|
|
81
|
+
tags: ['报表', '导出'],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: 4,
|
|
85
|
+
title: '移动端适配',
|
|
86
|
+
status: '已完成',
|
|
87
|
+
priority: 'medium',
|
|
88
|
+
assignee: '赵六',
|
|
89
|
+
progress: 100,
|
|
90
|
+
deadline: '2024-01-15',
|
|
91
|
+
rating: 5,
|
|
92
|
+
tags: ['移动端', '适配'],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 5,
|
|
96
|
+
title: '权限管理模块',
|
|
97
|
+
status: '待审核',
|
|
98
|
+
priority: 'high',
|
|
99
|
+
assignee: '张三',
|
|
100
|
+
progress: 90,
|
|
101
|
+
deadline: '2024-01-18',
|
|
102
|
+
rating: 4,
|
|
103
|
+
tags: ['权限', '安全'],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: 6,
|
|
107
|
+
title: 'API 接口文档',
|
|
108
|
+
status: '已完成',
|
|
109
|
+
priority: 'low',
|
|
110
|
+
assignee: '李四',
|
|
111
|
+
progress: 100,
|
|
112
|
+
deadline: '2024-01-12',
|
|
113
|
+
rating: 5,
|
|
114
|
+
tags: ['文档', 'API'],
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
loading: false,
|
|
118
|
+
activeTab: 'all',
|
|
119
|
+
filters: { status: 'all', priority: 'all', assignee: 'all' },
|
|
120
|
+
selectedTaskIds: [],
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
handleTabChange(key) {
|
|
124
|
+
this.setState({
|
|
125
|
+
activeTab: key,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
handleFilterChange(field, value) {
|
|
130
|
+
this.setState({
|
|
131
|
+
filters: {
|
|
132
|
+
...this.state.filters,
|
|
133
|
+
[field]: value,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
handleSelectTask(taskId, checked) {
|
|
139
|
+
if (checked) {
|
|
140
|
+
this.setState({
|
|
141
|
+
selectedTaskIds: [...this.state.selectedTaskIds, taskId],
|
|
142
|
+
});
|
|
143
|
+
} else {
|
|
144
|
+
this.setState({
|
|
145
|
+
selectedTaskIds: this.state.selectedTaskIds.filter(id => id !== taskId),
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
handleBatchDelete() {
|
|
151
|
+
this.setState({
|
|
152
|
+
tasks: this.state.tasks.filter(
|
|
153
|
+
t => !this.state.selectedTaskIds.includes(t.id)
|
|
154
|
+
),
|
|
155
|
+
selectedTaskIds: [],
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
updateTaskProgress(taskId, progress) {
|
|
160
|
+
this.setState({
|
|
161
|
+
tasks: this.state.tasks.map(t => {
|
|
162
|
+
if (t.id === taskId) {
|
|
163
|
+
return {
|
|
164
|
+
...t,
|
|
165
|
+
progress,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
return t;
|
|
169
|
+
}),
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
rateTask(taskId, rating) {
|
|
174
|
+
this.setState({
|
|
175
|
+
tasks: this.state.tasks.map(t => {
|
|
176
|
+
if (t.id === taskId) {
|
|
177
|
+
return {
|
|
178
|
+
...t,
|
|
179
|
+
rating,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
return t;
|
|
183
|
+
}),
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
render() {
|
|
188
|
+
const tasks = this.state.tasks;
|
|
189
|
+
const loading = this.state.loading;
|
|
190
|
+
const activeTab = this.state.activeTab;
|
|
191
|
+
const filters = this.state.filters;
|
|
192
|
+
const selectedTaskIds = this.state.selectedTaskIds;
|
|
193
|
+
const statusColors = {
|
|
194
|
+
待开始: 'default',
|
|
195
|
+
进行中: 'processing',
|
|
196
|
+
待审核: 'warning',
|
|
197
|
+
已完成: 'success',
|
|
198
|
+
};
|
|
199
|
+
const priorityColors = {
|
|
200
|
+
high: 'red',
|
|
201
|
+
medium: 'orange',
|
|
202
|
+
low: 'green',
|
|
203
|
+
};
|
|
204
|
+
const assignees = [...new Set(tasks.map(t => t.assignee))];
|
|
205
|
+
const filteredTasks = tasks.filter(task => {
|
|
206
|
+
const matchStatus = activeTab === 'all' || task.status === activeTab;
|
|
207
|
+
const matchPriority =
|
|
208
|
+
filters.priority === 'all' || task.priority === filters.priority;
|
|
209
|
+
const matchAssignee =
|
|
210
|
+
filters.assignee === 'all' || task.assignee === filters.assignee;
|
|
211
|
+
return matchStatus && matchPriority && matchAssignee;
|
|
212
|
+
});
|
|
213
|
+
const taskStats = {
|
|
214
|
+
total: tasks.length,
|
|
215
|
+
inProgress: tasks.filter(t => t.status === '进行中').length,
|
|
216
|
+
completed: tasks.filter(t => t.status === '已完成').length,
|
|
217
|
+
avgProgress: Math.round(
|
|
218
|
+
tasks.reduce((sum, t) => sum + t.progress, 0) / tasks.length
|
|
219
|
+
),
|
|
220
|
+
};
|
|
221
|
+
if (loading) {
|
|
222
|
+
return <View className="p-6">加载中...</View>;
|
|
223
|
+
}
|
|
224
|
+
const taskCard = task => (
|
|
225
|
+
<Card
|
|
226
|
+
key={task.id}
|
|
227
|
+
className={`mb-3 hover:shadow-lg transition-shadow ${
|
|
228
|
+
task.status === '已完成' ? 'bg-green-50' : ''
|
|
229
|
+
}`}
|
|
230
|
+
>
|
|
231
|
+
<View className="flex items-start justify-between">
|
|
232
|
+
<View className="flex-1">
|
|
233
|
+
<View className="flex items-center gap-2 mb-2">
|
|
234
|
+
<Tag color={statusColors[task.status]}>{task.status}</Tag>
|
|
235
|
+
<Tag color={priorityColors[task.priority]}>{task.priority}</Tag>
|
|
236
|
+
{task.tags.map(tag => (
|
|
237
|
+
<Tag key={tag} color="blue">
|
|
238
|
+
{tag}
|
|
239
|
+
</Tag>
|
|
240
|
+
))}
|
|
241
|
+
</View>
|
|
242
|
+
<Text className="text-lg font-bold">{task.title}</Text>
|
|
243
|
+
<View className="flex items-center gap-4 mt-3 text-gray-500 text-sm">
|
|
244
|
+
<View className="flex items-center gap-1">
|
|
245
|
+
<Avatar size={20}>{task.assignee.charAt(0)}</Avatar>
|
|
246
|
+
<Text>{task.assignee}</Text>
|
|
247
|
+
</View>
|
|
248
|
+
<Text>截止: {task.deadline}</Text>
|
|
249
|
+
</View>
|
|
250
|
+
<View className="mt-3">
|
|
251
|
+
<Text className="text-sm text-gray-500">进度</Text>
|
|
252
|
+
<Progress percent={task.progress} size="small" />
|
|
253
|
+
</View>
|
|
254
|
+
{task.status === '已完成' && (
|
|
255
|
+
<View className="mt-2 flex items-center gap-2">
|
|
256
|
+
<Text className="text-sm text-gray-500">评价:</Text>
|
|
257
|
+
<Rate
|
|
258
|
+
value={task.rating}
|
|
259
|
+
onChange={value => this.rateTask(task.id, value)}
|
|
260
|
+
/>
|
|
261
|
+
</View>
|
|
262
|
+
)}
|
|
263
|
+
</View>
|
|
264
|
+
</View>
|
|
265
|
+
</Card>
|
|
266
|
+
);
|
|
267
|
+
return (
|
|
268
|
+
<Page className="p-[24px] bg-[var(--gray-50)] min-h-screen">
|
|
269
|
+
<View className="mb-[24px]">
|
|
270
|
+
<Text className="text-2xl font-bold text-[#1f2937]">任务管理</Text>
|
|
271
|
+
<Text className="text-[#6b7280] text-sm mt-[4px]">
|
|
272
|
+
项目任务跟踪和管理
|
|
273
|
+
</Text>
|
|
274
|
+
</View>
|
|
275
|
+
<Card className="mb-[24px]">
|
|
276
|
+
<View className="gap-4 grid grid-cols-4">
|
|
277
|
+
<View className="text-[var(--center)] p-[16px] bg-[var(--blue-50)] rounded">
|
|
278
|
+
<Text className="text-3xl font-bold text-[var(--blue-600)]">
|
|
279
|
+
{taskStats.total}
|
|
280
|
+
</Text>
|
|
281
|
+
<Text className="block text-sm text-[#4b5563] mt-[4px]">
|
|
282
|
+
总任务数
|
|
283
|
+
</Text>
|
|
284
|
+
</View>
|
|
285
|
+
<View className="text-[var(--center)] p-[16px] bg-[var(--orange-50)] rounded">
|
|
286
|
+
<Text className="text-3xl font-bold text-[var(--orange-600)]">
|
|
287
|
+
{taskStats.inProgress}
|
|
288
|
+
</Text>
|
|
289
|
+
<Text className="block text-sm text-[#4b5563] mt-[4px]">
|
|
290
|
+
进行中
|
|
291
|
+
</Text>
|
|
292
|
+
</View>
|
|
293
|
+
<View className="text-[var(--center)] p-[16px] bg-[var(--green-50)] rounded">
|
|
294
|
+
<Text className="text-3xl font-bold text-[var(--green-600)]">
|
|
295
|
+
{taskStats.completed}
|
|
296
|
+
</Text>
|
|
297
|
+
<Text className="block text-sm text-[#4b5563] mt-[4px]">
|
|
298
|
+
已完成
|
|
299
|
+
</Text>
|
|
300
|
+
</View>
|
|
301
|
+
<View className="text-[var(--center)] p-[16px] bg-[var(--purple-50)] rounded">
|
|
302
|
+
<Text className="text-3xl font-bold text-[var(--purple-600)]">
|
|
303
|
+
{taskStats.avgProgress}%
|
|
304
|
+
</Text>
|
|
305
|
+
<Text className="block text-sm text-[#4b5563] mt-[4px]">
|
|
306
|
+
平均进度
|
|
307
|
+
</Text>
|
|
308
|
+
</View>
|
|
309
|
+
</View>
|
|
310
|
+
</Card>
|
|
311
|
+
<Card className="mb-[24px]">
|
|
312
|
+
<View className="flex items-center justify-between">
|
|
313
|
+
<View className="gap-4 flex items-center">
|
|
314
|
+
<Select
|
|
315
|
+
value={filters.priority}
|
|
316
|
+
onChange={value => this.handleFilterChange('priority', value)}
|
|
317
|
+
placeholder="优先级"
|
|
318
|
+
className=""
|
|
319
|
+
>
|
|
320
|
+
<Select.Option value="all">全部优先级</Select.Option>
|
|
321
|
+
<Select.Option value="high">高</Select.Option>
|
|
322
|
+
<Select.Option value="medium">中</Select.Option>
|
|
323
|
+
<Select.Option value="low">低</Select.Option>
|
|
324
|
+
</Select>
|
|
325
|
+
<Select
|
|
326
|
+
value={filters.assignee}
|
|
327
|
+
onChange={value => this.handleFilterChange('assignee', value)}
|
|
328
|
+
placeholder="负责人"
|
|
329
|
+
className=""
|
|
330
|
+
>
|
|
331
|
+
<Select.Option value="all">全部人员</Select.Option>
|
|
332
|
+
{assignees.map((assignee, index) => (
|
|
333
|
+
<Select.Option key={assignee} value={assignee}>
|
|
334
|
+
<Text>{assignee}</Text>
|
|
335
|
+
</Select.Option>
|
|
336
|
+
))}
|
|
337
|
+
</Select>
|
|
338
|
+
</View>
|
|
339
|
+
<Button type="primary">+ 新建任务</Button>
|
|
340
|
+
</View>
|
|
341
|
+
</Card>
|
|
342
|
+
<Card>
|
|
343
|
+
<Tabs
|
|
344
|
+
activeKey={activeTab}
|
|
345
|
+
onChange={key => this.handleTabChange(key)}
|
|
346
|
+
>
|
|
347
|
+
<Tabs.TabPane tab={`全部 (${tasks.length})`} key="all">
|
|
348
|
+
{!!(filteredTasks.length === 0) && (
|
|
349
|
+
<View className="text-[#9ca3af] pt-[32px] pb-[32px]">
|
|
350
|
+
暂无任务
|
|
351
|
+
</View>
|
|
352
|
+
)}
|
|
353
|
+
{!(filteredTasks.length === 0) && (
|
|
354
|
+
<Text>
|
|
355
|
+
{filteredTasks.map(function (task) {
|
|
356
|
+
return taskCard(task);
|
|
357
|
+
})}
|
|
358
|
+
</Text>
|
|
359
|
+
)}
|
|
360
|
+
</Tabs.TabPane>
|
|
361
|
+
<Tabs.TabPane
|
|
362
|
+
tab={`进行中 (${
|
|
363
|
+
tasks.filter(function (t) {
|
|
364
|
+
return t.status === '进行中';
|
|
365
|
+
}).length
|
|
366
|
+
})`}
|
|
367
|
+
key="进行中"
|
|
368
|
+
>
|
|
369
|
+
{!!(
|
|
370
|
+
filteredTasks.filter(function (t) {
|
|
371
|
+
return t.status === '进行中';
|
|
372
|
+
}).length === 0
|
|
373
|
+
) && (
|
|
374
|
+
<View className="text-[#9ca3af] pt-[32px] pb-[32px]">
|
|
375
|
+
暂无进行中任务
|
|
376
|
+
</View>
|
|
377
|
+
)}
|
|
378
|
+
{!(
|
|
379
|
+
filteredTasks.filter(function (t) {
|
|
380
|
+
return t.status === '进行中';
|
|
381
|
+
}).length === 0
|
|
382
|
+
) && (
|
|
383
|
+
<Text>
|
|
384
|
+
{filteredTasks
|
|
385
|
+
.filter(function (t) {
|
|
386
|
+
return t.status === '进行中';
|
|
387
|
+
})
|
|
388
|
+
.map(function (task) {
|
|
389
|
+
return taskCard(task);
|
|
390
|
+
})}
|
|
391
|
+
</Text>
|
|
392
|
+
)}
|
|
393
|
+
</Tabs.TabPane>
|
|
394
|
+
<Tabs.TabPane
|
|
395
|
+
tab={`待审核 (${
|
|
396
|
+
tasks.filter(function (t) {
|
|
397
|
+
return t.status === '待审核';
|
|
398
|
+
}).length
|
|
399
|
+
})`}
|
|
400
|
+
key="待审核"
|
|
401
|
+
>
|
|
402
|
+
{!!(
|
|
403
|
+
filteredTasks.filter(function (t) {
|
|
404
|
+
return t.status === '待审核';
|
|
405
|
+
}).length === 0
|
|
406
|
+
) && (
|
|
407
|
+
<View className="text-[#9ca3af] pt-[32px] pb-[32px]">
|
|
408
|
+
暂无待审核任务
|
|
409
|
+
</View>
|
|
410
|
+
)}
|
|
411
|
+
{!(
|
|
412
|
+
filteredTasks.filter(function (t) {
|
|
413
|
+
return t.status === '待审核';
|
|
414
|
+
}).length === 0
|
|
415
|
+
) && (
|
|
416
|
+
<Text>
|
|
417
|
+
{filteredTasks
|
|
418
|
+
.filter(function (t) {
|
|
419
|
+
return t.status === '待审核';
|
|
420
|
+
})
|
|
421
|
+
.map(function (task) {
|
|
422
|
+
return taskCard(task);
|
|
423
|
+
})}
|
|
424
|
+
</Text>
|
|
425
|
+
)}
|
|
426
|
+
</Tabs.TabPane>
|
|
427
|
+
<Tabs.TabPane
|
|
428
|
+
tab={`已完成 (${
|
|
429
|
+
tasks.filter(function (t) {
|
|
430
|
+
return t.status === '已完成';
|
|
431
|
+
}).length
|
|
432
|
+
})`}
|
|
433
|
+
key="已完成"
|
|
434
|
+
>
|
|
435
|
+
{!!(
|
|
436
|
+
filteredTasks.filter(function (t) {
|
|
437
|
+
return t.status === '已完成';
|
|
438
|
+
}).length === 0
|
|
439
|
+
) && (
|
|
440
|
+
<View className="text-[#9ca3af] pt-[32px] pb-[32px]">
|
|
441
|
+
暂无已完成任务
|
|
442
|
+
</View>
|
|
443
|
+
)}
|
|
444
|
+
{!(
|
|
445
|
+
filteredTasks.filter(function (t) {
|
|
446
|
+
return t.status === '已完成';
|
|
447
|
+
}).length === 0
|
|
448
|
+
) && (
|
|
449
|
+
<Text>
|
|
450
|
+
{filteredTasks
|
|
451
|
+
.filter(function (t) {
|
|
452
|
+
return t.status === '已完成';
|
|
453
|
+
})
|
|
454
|
+
.map(function (task) {
|
|
455
|
+
return taskCard(task);
|
|
456
|
+
})}
|
|
457
|
+
</Text>
|
|
458
|
+
)}
|
|
459
|
+
</Tabs.TabPane>
|
|
460
|
+
</Tabs>
|
|
461
|
+
</Card>
|
|
462
|
+
</Page>
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export default Document;
|