|
@@ -10,26 +10,17 @@ import {
|
|
|
Empty,
|
|
|
Pagination,
|
|
|
} from "antd";
|
|
|
-import { history, useRequest } from "umi";
|
|
|
+import { useRequest } from "umi";
|
|
|
import { AppstoreOutlined, MenuOutlined } from "@ant-design/icons";
|
|
|
import { FlowchartMindMapList } from "@/api/systemDesigner";
|
|
|
-import { GraphType } from "@/enum";
|
|
|
+import ProjectCard from "./ProjectCard";
|
|
|
|
|
|
-import defaultFlowImg from "@/assets/image/flow.png";
|
|
|
-import defaultMindImg from "@/assets/image/mindmap.png";
|
|
|
export default function All() {
|
|
|
const [display, setDisplay] = useState("card");
|
|
|
const [dataSource, setDataSource] = useState<any[]>([]);
|
|
|
const [total, setTotal] = useState(0);
|
|
|
- const handleToEdit = (record: any) => {
|
|
|
- if (record.type === GraphType.mindmap) {
|
|
|
- history.push(`/mindmap/${record.id}`);
|
|
|
- } else {
|
|
|
- history.push(`/flow/${record.id}`);
|
|
|
- }
|
|
|
- };
|
|
|
|
|
|
- const { loading, run } = useRequest(FlowchartMindMapList, {
|
|
|
+ const { loading, run, refresh } = useRequest(FlowchartMindMapList, {
|
|
|
defaultParams: [
|
|
|
{
|
|
|
currentPage: 1,
|
|
@@ -72,13 +63,13 @@ export default function All() {
|
|
|
}
|
|
|
footer={[]}
|
|
|
>
|
|
|
- <ProCard
|
|
|
+ {/* <ProCard
|
|
|
style={{
|
|
|
height: "calc(100vh - 140px)",
|
|
|
minHeight: 800,
|
|
|
overflow: "auto",
|
|
|
}}
|
|
|
- >
|
|
|
+ > */}
|
|
|
<Breadcrumb
|
|
|
items={[
|
|
|
{
|
|
@@ -129,40 +120,7 @@ export default function All() {
|
|
|
xxl={6}
|
|
|
key={index}
|
|
|
>
|
|
|
- <Card
|
|
|
- hoverable
|
|
|
- bordered
|
|
|
- cover={
|
|
|
- <img
|
|
|
- style={{ height: 200, objectFit: "cover" }}
|
|
|
- src={
|
|
|
- item?.coverImage ||
|
|
|
- (item.type === GraphType.mindmap
|
|
|
- ? defaultMindImg
|
|
|
- : defaultFlowImg)
|
|
|
- }
|
|
|
- />
|
|
|
- }
|
|
|
- onClick={() => handleToEdit(item)}
|
|
|
- >
|
|
|
- <Card.Meta
|
|
|
- title={
|
|
|
- <span>
|
|
|
- {item.type === GraphType.mindmap ? (
|
|
|
- <i
|
|
|
- className={`iconfont icon-siweidaotu_huaban1 color-#3bc9c1 mr-8px`}
|
|
|
- />
|
|
|
- ) : (
|
|
|
- <i
|
|
|
- className={`iconfont icon-liuchengtu color-#067bef mr-8px`}
|
|
|
- />
|
|
|
- )}
|
|
|
- {item.name}
|
|
|
- </span>
|
|
|
- }
|
|
|
- description={`更新于: ${item.updatedTime}`}
|
|
|
- />
|
|
|
- </Card>
|
|
|
+ <ProjectCard record={item} onFresh={refresh} onDelete={refresh}/>
|
|
|
</Col>
|
|
|
);
|
|
|
})}
|
|
@@ -219,7 +177,7 @@ export default function All() {
|
|
|
}}
|
|
|
/>
|
|
|
)}
|
|
|
- </ProCard>
|
|
|
+ {/* </ProCard> */}
|
|
|
</PageContainer>
|
|
|
</>
|
|
|
);
|