feat: 本次提交更新内容如下
自动建群先这样
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
Switch,
|
||||
ProgressBar,
|
||||
Popover,
|
||||
Toast,
|
||||
NavBar,
|
||||
} from "antd-mobile";
|
||||
import { Input } from "antd";
|
||||
import { Button, Card, ProgressBar, Popover, Toast, NavBar } from "antd-mobile";
|
||||
import { Input, Switch } from "antd";
|
||||
import {
|
||||
MoreOutline,
|
||||
AddCircleOutline,
|
||||
@@ -116,14 +108,9 @@ const getStatusText = (status: string) => {
|
||||
|
||||
const AutoGroupList: React.FC = () => {
|
||||
const navigate = useNavigate();
|
||||
const [expandedTaskId, setExpandedTaskId] = useState<string | null>(null);
|
||||
const [searchTerm, setSearchTerm] = useState("");
|
||||
const [tasks, setTasks] = useState<GroupTask[]>(mockTasks);
|
||||
|
||||
const toggleExpand = (taskId: string) => {
|
||||
setExpandedTaskId(expandedTaskId === taskId ? null : taskId);
|
||||
};
|
||||
|
||||
const handleDelete = (taskId: string) => {
|
||||
const taskToDelete = tasks.find((task) => task.id === taskId);
|
||||
if (!taskToDelete) return;
|
||||
@@ -307,84 +294,9 @@ const AutoGroupList: React.FC = () => {
|
||||
<div className={style.taskFooter}>
|
||||
<div className={style.footerLeft}>
|
||||
<ClockCircleOutline style={{ marginRight: 4 }} />
|
||||
上次建群:{task.lastCreateTime}
|
||||
</div>
|
||||
<div className={style.footerRight}>
|
||||
创建时间:{task.createTime}
|
||||
<Button
|
||||
size="mini"
|
||||
fill="none"
|
||||
onClick={() => toggleExpand(task.id)}
|
||||
style={{ marginLeft: 8 }}
|
||||
>
|
||||
{expandedTaskId === task.id ? "收起" : "展开"}
|
||||
</Button>
|
||||
更新时间:{task.lastCreateTime}
|
||||
</div>
|
||||
</div>
|
||||
{expandedTaskId === task.id && (
|
||||
<div className={style.expandPanel}>
|
||||
<div className={style.expandGrid}>
|
||||
<div>
|
||||
<div className={style.expandTitle}>
|
||||
<SettingOutlined style={{ marginRight: 4 }} />{" "}
|
||||
基本设置
|
||||
</div>
|
||||
<div className={style.expandInfo}>
|
||||
建群间隔:{task.createInterval} 秒
|
||||
</div>
|
||||
<div className={style.expandInfo}>
|
||||
每日最大建群数:{task.maxGroupsPerDay} 个
|
||||
</div>
|
||||
<div className={style.expandInfo}>
|
||||
执行时间段:{task.timeRange.start} -{" "}
|
||||
{task.timeRange.end}
|
||||
</div>
|
||||
<div className={style.expandInfo}>
|
||||
群组规模:{task.groupSize.min}-{task.groupSize.max} 人
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className={style.expandTitle}>
|
||||
<TeamOutline style={{ marginRight: 4 }} /> 目标人群
|
||||
</div>
|
||||
<div className={style.expandTags}>
|
||||
{task.targetTags.map((tag) => (
|
||||
<span key={tag} className={style.tag}>
|
||||
{tag}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className={style.expandTitle}>
|
||||
<UserAddOutline style={{ marginRight: 4 }} /> 群组设置
|
||||
</div>
|
||||
<div className={style.expandInfo}>
|
||||
群名称模板:{task.groupNameTemplate}
|
||||
</div>
|
||||
<div className={style.expandInfo}>
|
||||
群描述:{task.groupDescription}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className={style.expandTitle}>
|
||||
<CalendarOutline style={{ marginRight: 4 }} />{" "}
|
||||
执行进度
|
||||
</div>
|
||||
<div className={style.expandInfo}>
|
||||
今日已建群:{task.createdGroups} /{" "}
|
||||
{task.maxGroupsPerDay}
|
||||
</div>
|
||||
<ProgressBar
|
||||
percent={Math.round(
|
||||
(task.createdGroups / task.maxGroupsPerDay) * 100
|
||||
)}
|
||||
style={{ marginTop: 8 }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Card>
|
||||
))
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user