diff --git a/src/app/dashboard/customers/page.tsx b/src/app/dashboard/customers/page.tsx
deleted file mode 100644
index 328cf75..0000000
--- a/src/app/dashboard/customers/page.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Page() {
- return
Customer Page
;
-}
\ No newline at end of file
diff --git a/src/app/dashboard/invoices/page.tsx b/src/app/dashboard/invoices/page.tsx
deleted file mode 100644
index 60e6083..0000000
--- a/src/app/dashboard/invoices/page.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Page() {
- return Invoice Page
;
-}
\ No newline at end of file
diff --git a/src/app/dashboard/layout.tsx b/src/app/dashboard/layout.tsx
deleted file mode 100644
index 6e8e4c7..0000000
--- a/src/app/dashboard/layout.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-import SideNav from '@/app/ui/dashboard/sidenav';
-
-export default function Layout({ children }: { children: React.ReactNode }) {
- return (
-
- );
-}
\ No newline at end of file
diff --git a/src/app/dashboard/loading.tsx b/src/app/dashboard/loading.tsx
deleted file mode 100644
index 633fb4c..0000000
--- a/src/app/dashboard/loading.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Loading() {
- return Loading...
;
-}
\ No newline at end of file
diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx
deleted file mode 100644
index feb2238..0000000
--- a/src/app/dashboard/page.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Page() {
- return Dashboard Page
;
-}
\ No newline at end of file
diff --git a/src/app/ui/task/project/TreeTablePro.tsx b/src/app/ui/task/project/TreeTablePro.tsx
index 42ad2c9..b3ec658 100644
--- a/src/app/ui/task/project/TreeTablePro.tsx
+++ b/src/app/ui/task/project/TreeTablePro.tsx
@@ -3,7 +3,7 @@ import {
CheckSquareFilled,
QuestionCircleOutlined
} from '@ant-design/icons';
-import type {ActionType, FormInstance, ProColumns} from '@ant-design/pro-components';
+import type {ActionType, FormInstance, ProColumns, ProFormInstance} from '@ant-design/pro-components';
import {ProTable, TableDropdown} from '@ant-design/pro-components';
import {Button, DatePicker, Dropdown, Space, Switch, Tag, Tooltip} from 'antd';
import React, {useContext, useEffect, useRef} from 'react';
@@ -16,18 +16,17 @@ import {
} from "@/app/lib/task/project/data";
import {DetailModelForm} from "@/app/ui/task/project/DetailModelForm";
import OperationButton from "@/app/ui/task/OperationButton";
+import dayjs from "dayjs";
const TreeTablePro: React.FC = () => {
const actionRef = useRef();
- const formRef = useRef();
+ const formRef = useRef();
const [switchChecked, setSwitchChecked] = React.useState(true);
const [filterChecked, setFilterChecked] = React.useState(true);
- const reloadData=()=>{
- actionRef.current?.reload();
- formRef.current?.submit();
- }
+ const [current,setCurrent] = React.useState(1);
+ const [pageSize,setPageSize] = React.useState(5);
const { RangePicker } = DatePicker;
const columns: ProColumns[] = [
{
@@ -58,7 +57,7 @@ const TreeTablePro: React.FC = () => {
{
title: '任务优先级',
dataIndex: 'priority',
- order:1,
+ order:2,
valueType: 'select',
fieldProps: {
mode:"tags",
@@ -89,7 +88,7 @@ const TreeTablePro: React.FC = () => {
title: '任务状态',
dataIndex: 'state',
valueType: 'select',
- order:2,
+ order:3,
initialValue:['8','9'],
fieldProps: {
defaultValue:['8','9'],
@@ -116,6 +115,7 @@ const TreeTablePro: React.FC = () => {
title: '期望开始时间',
dataIndex: 'expectedStartTime',
valueType: 'date',
+ order:1,
renderFormItem:()=>
},
{
@@ -137,23 +137,28 @@ const TreeTablePro: React.FC = () => {
title: '操作',
key: 'option',
valueType: 'option',
- render: (_, record) => ,
+ render: (_, record) => {
+ actionRef.current?.reload( false);
+ }}/>,
}
];
let toolBarRenderList = [
- ,
+ {
+ actionRef.current?.reload( false);
+ }}/>,
{setSwitchChecked(checked);actionRef.current?.reset?.();formRef.current?.submit();}} />,
+ onChange={(checked, event) => {setSwitchChecked(checked);actionRef.current?.reset?.();}} />,
];
if (switchChecked){
toolBarRenderList.push(<>树子集是否参与过滤
{setFilterChecked(checked);reloadData();}} />>)
+ onChange={(checked, event) => {setFilterChecked(checked);
+ actionRef.current?.reload( false);
+ }} />>)
}
return (
columns={columns}
- formRef={formRef}
actionRef={actionRef}
cardBordered
request={async (params, sort, filter) => {
@@ -171,6 +176,14 @@ const TreeTablePro: React.FC = () => {
if (params.priority instanceof Array&¶ms.state.length>0){
searchList.push({name:'priority',value:params.priority.join(','),operateType:"IN"})
}
+ if (params.expectedStartTime instanceof Array&¶ms.expectedStartTime.length>0){
+ if (params.expectedStartTime[0]){
+ searchList.push({name:'expectedStartTime',value:dayjs(params.expectedStartTime[0]),operateType:">="})
+ }
+ if (params.expectedStartTime[1]){
+ searchList.push({name:'expectedStartTime',value:dayjs(params.expectedStartTime[1]),operateType:"<="})
+ }
+ }
if (params.name){
searchList.push({name:'name',value:params.name,operateType:"LIKE"})
}
@@ -207,8 +220,13 @@ const TreeTablePro: React.FC = () => {
}}
rowKey="id"
pagination={{
- pageSize: 5,
- onChange: (page) => console.log(page),
+ current: current,
+ pageSize: pageSize,
+ onChange: (current,pageSize) => {
+ console.log('onChange',current,pageSize)
+ setCurrent(current)
+ setPageSize(pageSize)
+ }
}}
dateFormatter="string"
// headerTitle="任务管理"