feat: 本次提交更新内容如下
朋友圈同步完成
This commit is contained in:
@@ -45,7 +45,7 @@ const formatDate = (dateStr?: string) => {
|
|||||||
|
|
||||||
// 组件属性接口
|
// 组件属性接口
|
||||||
interface ContentLibrarySelectionProps {
|
interface ContentLibrarySelectionProps {
|
||||||
selectedLibraries: string[];
|
selectedLibraries: (string | number)[];
|
||||||
onSelect: (libraries: string[]) => void;
|
onSelect: (libraries: string[]) => void;
|
||||||
onSelectDetail?: (libraries: ContentLibraryItem[]) => void;
|
onSelectDetail?: (libraries: ContentLibraryItem[]) => void;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
import React, { useState, useEffect, useCallback } from "react";
|
import React, { useState, useEffect, useCallback } from "react";
|
||||||
import { useParams, useNavigate } from "react-router-dom";
|
import { useParams, useNavigate } from "react-router-dom";
|
||||||
import { Button, Switch, message, Spin, Badge } from "antd";
|
import { Button, Switch, message, Spin } from "antd";
|
||||||
import {
|
import NavCommon from "@/components/NavCommon";
|
||||||
ArrowLeftOutlined,
|
import { EditOutlined } from "@ant-design/icons";
|
||||||
EditOutlined,
|
|
||||||
ClockCircleOutlined,
|
|
||||||
DatabaseOutlined,
|
|
||||||
MobileOutlined,
|
|
||||||
} from "@ant-design/icons";
|
|
||||||
import Layout from "@/components/Layout/Layout";
|
import Layout from "@/components/Layout/Layout";
|
||||||
import style from "./index.module.scss";
|
import style from "./index.module.scss";
|
||||||
import request from "@/api/request";
|
import request from "@/api/request";
|
||||||
@@ -117,22 +112,19 @@ const MomentsSyncDetail: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<Layout
|
<Layout
|
||||||
header={
|
header={
|
||||||
<div className={style.headerBar}>
|
<NavCommon
|
||||||
<Button
|
title="查看朋友圈同步任务"
|
||||||
type="text"
|
right={
|
||||||
icon={<ArrowLeftOutlined />}
|
<Button
|
||||||
onClick={() => navigate("/workspace/moments-sync")}
|
icon={<EditOutlined />}
|
||||||
className={style.backBtn}
|
onClick={handleEdit}
|
||||||
/>
|
className={style.editBtn}
|
||||||
<span className={style.title}>任务详情</span>
|
type="primary"
|
||||||
<Button
|
>
|
||||||
icon={<EditOutlined />}
|
编辑任务
|
||||||
onClick={handleEdit}
|
</Button>
|
||||||
className={style.editBtn}
|
}
|
||||||
>
|
/>
|
||||||
编辑
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className={style.detailBg}>
|
<div className={style.detailBg}>
|
||||||
@@ -155,29 +147,49 @@ const MomentsSyncDetail: React.FC = () => {
|
|||||||
size="small"
|
size="small"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={style.detailInfoRow}>
|
<div
|
||||||
<div className={style.infoCol}>
|
style={{
|
||||||
推送设备:{task.config?.devices?.length || 0} 个
|
display: "flex",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
marginTop: 16,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<div style={{ fontWeight: 500, marginBottom: 8 }}>任务详情</div>
|
||||||
|
<div style={{ fontSize: 14, color: "#222", marginBottom: 4 }}>
|
||||||
|
推送设备:{task.config?.devices?.length || 0} 个
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: 14, color: "#222", marginBottom: 4 }}>
|
||||||
|
内容库:{task.config?.contentLibraryNames?.join(",") || "-"}
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: 14, color: "#222", marginBottom: 4 }}>
|
||||||
|
已同步:{task.syncCount || 0} 条
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: 14, color: "#222" }}>
|
||||||
|
创建人:{task.creatorName}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={style.infoCol}>
|
<div>
|
||||||
内容库:{task.config?.contentLibraryNames?.join(",") || "-"}
|
<div style={{ fontWeight: 500, marginBottom: 8 }}>时间信息</div>
|
||||||
|
<div style={{ fontSize: 14, color: "#222", marginBottom: 4 }}>
|
||||||
|
创建时间:{task.createTime}
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: 14, color: "#222" }}>
|
||||||
|
上次同步:{task.lastSyncTime || "无"}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={style.detailInfoRow}>
|
<div
|
||||||
<div className={style.infoCol}>
|
style={{
|
||||||
已同步:{task.syncCount || 0} 条
|
borderTop: "1px solid #f0f0f0",
|
||||||
</div>
|
margin: "16px 0 0 0",
|
||||||
<div className={style.infoCol}>创建人:{task.creatorName}</div>
|
paddingTop: 12,
|
||||||
</div>
|
}}
|
||||||
<div className={style.detailBottom}>
|
>
|
||||||
<div className={style.bottomLeft}>
|
<div style={{ fontWeight: 500, marginBottom: 8 }}>同步内容预览</div>
|
||||||
<ClockCircleOutlined className={style.clockIcon} />
|
<div style={{ color: "#888", fontSize: 14 }}>暂无内容预览</div>
|
||||||
上次同步:{task.lastSyncTime || "无"}
|
|
||||||
</div>
|
|
||||||
<div className={style.bottomRight}>创建时间:{task.createTime}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* 可继续补充更多详情卡片,如同步设置、同步记录等 */}
|
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react";
|
|||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { Switch, Input, message, Dropdown, Menu } from "antd";
|
import { Switch, Input, message, Dropdown, Menu } from "antd";
|
||||||
import { NavBar, Button } from "antd-mobile";
|
import { NavBar, Button } from "antd-mobile";
|
||||||
|
import NavCommon from "@/components/NavCommon";
|
||||||
import {
|
import {
|
||||||
PlusOutlined,
|
PlusOutlined,
|
||||||
SearchOutlined,
|
SearchOutlined,
|
||||||
@@ -149,17 +150,8 @@ const MomentsSync: React.FC = () => {
|
|||||||
<Layout
|
<Layout
|
||||||
header={
|
header={
|
||||||
<>
|
<>
|
||||||
<NavBar
|
<NavCommon
|
||||||
back={null}
|
title="朋友圈同步"
|
||||||
style={{ background: "#fff" }}
|
|
||||||
left={
|
|
||||||
<div className="nav-title">
|
|
||||||
<ArrowLeftOutlined
|
|
||||||
twoToneColor="#1677ff"
|
|
||||||
onClick={() => navigate("/workspace")}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
right={
|
right={
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
@@ -169,9 +161,8 @@ const MomentsSync: React.FC = () => {
|
|||||||
<PlusOutlined /> 新建任务
|
<PlusOutlined /> 新建任务
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
>
|
/>
|
||||||
<span className="nav-title">朋友圈同步</span>
|
|
||||||
</NavBar>
|
|
||||||
<div className="search-bar">
|
<div className="search-bar">
|
||||||
<div className="search-input-wrapper">
|
<div className="search-input-wrapper">
|
||||||
<Input
|
<Input
|
||||||
@@ -194,6 +185,7 @@ const MomentsSync: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
loading={loading}
|
||||||
>
|
>
|
||||||
<div className={style.pageBg}>
|
<div className={style.pageBg}>
|
||||||
<div className={style.taskList}>
|
<div className={style.taskList}>
|
||||||
|
|||||||
@@ -1,31 +1,12 @@
|
|||||||
import request from "@/api/request";
|
import request from "@/api/request";
|
||||||
|
|
||||||
// 创建朋友圈同步任务
|
// 创建朋友圈同步任务
|
||||||
export const createMomentsSync = (params: {
|
export const createMomentsSync = (params: any) =>
|
||||||
name: string;
|
request("/v1/workbench/create", params, "POST");
|
||||||
devices: string[];
|
|
||||||
contentLibraries: string[];
|
|
||||||
syncCount: number;
|
|
||||||
startTime: string;
|
|
||||||
endTime: string;
|
|
||||||
accountType: number;
|
|
||||||
status: number;
|
|
||||||
type: number;
|
|
||||||
}) => request("/v1/workbench/create", params, "POST");
|
|
||||||
|
|
||||||
// 更新朋友圈同步任务
|
// 更新朋友圈同步任务
|
||||||
export const updateMomentsSync = (params: {
|
export const updateMomentsSync = (params: any) =>
|
||||||
id: string;
|
request("/v1/workbench/update", params, "POST");
|
||||||
name: string;
|
|
||||||
devices: string[];
|
|
||||||
contentLibraries: string[];
|
|
||||||
syncCount: number;
|
|
||||||
startTime: string;
|
|
||||||
endTime: string;
|
|
||||||
accountType: number;
|
|
||||||
status: number;
|
|
||||||
type: number;
|
|
||||||
}) => request("/v1/workbench/update", params, "POST");
|
|
||||||
|
|
||||||
// 获取朋友圈同步任务详情
|
// 获取朋友圈同步任务详情
|
||||||
export const getMomentsSyncDetail = (id: string) =>
|
export const getMomentsSyncDetail = (id: string) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user