From e1d7446d8ca8539a4f5b351c390795d17d84a1f6 Mon Sep 17 00:00:00 2001 From: shixiaohua Date: Fri, 10 May 2024 16:10:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/task/four/layout.tsx | 11 +++++++---- src/ui/task/four/TreeTable.tsx | 4 +++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/task/four/layout.tsx b/src/app/task/four/layout.tsx index 1037b8a..f5ab29d 100644 --- a/src/app/task/four/layout.tsx +++ b/src/app/task/four/layout.tsx @@ -12,7 +12,9 @@ import {DataType, ResponseVO, ResultPage} from "@/lib/definitions"; export default function Layout({children}: { children: React.ReactNode }) { const [resultDataTypeList, setResultDataTypeList] = useState([]); + const [loadingState,setLoadingState] =useState(true) const refreshDate = (): void => { + setLoadingState(true) getTaskTreeResult(JSON.stringify({ pageSize:1000, pageNumber:1, @@ -24,6 +26,7 @@ export default function Layout({children}: { children: React.ReactNode }) { dataType.state=taskStateList.find(taskState=>taskState.code===dataType.state+'')?.name }) setResultDataTypeList(result.data.content) + setLoadingState(false) } }) } @@ -62,7 +65,7 @@ export default function Layout({children}: { children: React.ReactNode }) {
- +
@@ -70,7 +73,7 @@ export default function Layout({children}: { children: React.ReactNode }) {
- +
@@ -78,14 +81,14 @@ export default function Layout({children}: { children: React.ReactNode }) {
- +
ε‘δΈŠι‡θ¦
{/*
{children}
*/}
- +
diff --git a/src/ui/task/four/TreeTable.tsx b/src/ui/task/four/TreeTable.tsx index ad71936..fadaa19 100644 --- a/src/ui/task/four/TreeTable.tsx +++ b/src/ui/task/four/TreeTable.tsx @@ -29,7 +29,8 @@ const rowSelection: TableRowSelection = { interface TableSearchType { priority: string, resultDataTypeList: DataType[], - refreshDate?: () => void + refreshDate?: () => void, + loadingState:boolean } const TreeTable: React.FC = (props) => { @@ -178,6 +179,7 @@ const TreeTable: React.FC = (props) => { })} pagination={{pageSize: 5}} scroll={{y: 280}} + loading={props.loadingState} /> {/**/}