fix(workspace/moments-sync): 修复群组选择key冲突并更新内容库显示逻辑
修复测试页面中群组选择tab的key冲突问题,将'groups'改为'groups2' 更新MomentsSync页面内容库显示逻辑,使用contentGroupsOptions中的name字段替代contentLibraryNames
This commit is contained in:
@@ -89,7 +89,7 @@ const ComponentTest: React.FC = () => {
|
||||
</div>
|
||||
</Tabs.Tab>
|
||||
|
||||
<Tabs.Tab title="群组选择" key="groups">
|
||||
<Tabs.Tab title="群组选择" key="groups2">
|
||||
<div style={{ padding: "16px 0" }}>
|
||||
<h3 style={{ marginBottom: 16 }}>GroupSelection 组件测试</h3>
|
||||
<GroupSelection
|
||||
|
||||
@@ -28,7 +28,15 @@ interface MomentsSyncTask {
|
||||
createTime: string;
|
||||
creatorName: string;
|
||||
contentLib?: string;
|
||||
config?: { devices?: string[]; contentLibraryNames?: string[] };
|
||||
config?: {
|
||||
devices?: string[];
|
||||
contentGroups: number[];
|
||||
contentGroupsOptions?: {
|
||||
id: number;
|
||||
name: string;
|
||||
[key: string]: any;
|
||||
}[];
|
||||
};
|
||||
}
|
||||
|
||||
const getStatusText = (status: number) => {
|
||||
@@ -195,7 +203,7 @@ const MomentsSync: React.FC = () => {
|
||||
</span>
|
||||
<div className={style.emptyText}>暂无同步任务</div>
|
||||
<Button
|
||||
type="primary"
|
||||
color="primary"
|
||||
onClick={() => navigate("/workspace/moments-sync/new")}
|
||||
>
|
||||
新建第一个任务
|
||||
@@ -256,9 +264,9 @@ const MomentsSync: React.FC = () => {
|
||||
<div className={style.itemInfoRow}>
|
||||
<div className={style.infoCol}>
|
||||
内容库:
|
||||
{task.config?.contentLibraryNames?.join(",") ||
|
||||
task.contentLib ||
|
||||
"默认内容库"}
|
||||
{task.config?.contentGroupsOptions
|
||||
?.map(c => c.name)
|
||||
.join(",") || "默认内容库"}
|
||||
</div>
|
||||
<div className={style.infoCol}>
|
||||
创建人:{task.creatorName}
|
||||
|
||||
Reference in New Issue
Block a user