diff --git a/next.config.mjs b/next.config.mjs
index 4678774..debd939 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */
-const nextConfig = {};
+const nextConfig = {
+ output: 'export',
+};
export default nextConfig;
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index f79dd85..db6348d 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -14,8 +14,9 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
-
-
{children}
-
- );
+
+ 任务管理
+ {children}
+
+);
}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index c2c6def..e3c6780 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,57 +1,11 @@
'use client'
-import AcmeLogo from '@/app/ui/acme-logo';
-import { ArrowRightIcon } from '@heroicons/react/24/outline';
-import Link from 'next/link';
-import Image from 'next/image';
import {useRouter} from "next/navigation";
-
export default function Home() {
const { replace } = useRouter();
- replace("/task/project")
+ replace("/task/four")
return (
-
- {/**/}
- {/**/}
- {/*
*/}
- {/*
*/}
- {/* Welcome to Acme. This is the example for the{' '}*/}
- {/* */}
- {/* Next.js Learn Course*/}
- {/* */}
- {/* , brought to you by Vercel.*/}
- {/*
*/}
- {/*
*/}
- {/*
Log in*/}
- {/* /!*
*!/*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/* /!* Add Hero Images Here *!/*/}
- {/* */}
- {/* */}
- {/*
*/}
- {/*
*/}
);
}
diff --git a/src/app/task/four/layout.tsx b/src/app/task/four/layout.tsx
index c1f3371..9c4bc05 100644
--- a/src/app/task/four/layout.tsx
+++ b/src/app/task/four/layout.tsx
@@ -8,7 +8,22 @@ import {getTaskTreeResult, taskStateList} from "@/app/lib/task/project/data";
import {DataType, ResponseVO, ResultPage} from "@/app/lib/definitions";
export default function Layout({children}: { children: React.ReactNode }) {
-
+ const [resultDataTypeList, setResultDataTypeList] = useState([]);
+ const refreshDate = (): void => {
+ getTaskTreeResult(JSON.stringify({
+ pageSize:1000,
+ pageNumber:1,
+ data: leftUp
+ })).then((result: ResponseVO>) => {
+ if (result.status.success) {
+ // recursionActionChild(result.data.content);
+ result.data.content.forEach(dataType=>{
+ dataType.state=taskStateList.find(taskState=>taskState.code===dataType.state+'')?.name
+ })
+ setResultDataTypeList(result.data.content)
+ }
+ })
+ }
useEffect(() => {
// @ts-ignore
const divWidth = document.getElementById('tenUp').offsetWidth;
@@ -40,23 +55,6 @@ export default function Layout({children}: { children: React.ReactNode }) {
leftUp.push(...parse);
}
}
-
- const [resultDataTypeList, setResultDataTypeList] = useState([]);
- const refreshDate = (): void => {
- getTaskTreeResult(JSON.stringify({
- pageSize:1000,
- pageNumber:1,
- data: leftUp
- })).then((result: ResponseVO>) => {
- if (result.status.success) {
- // recursionActionChild(result.data.content);
- result.data.content.forEach(dataType=>{
- dataType.state=taskStateList.find(taskState=>taskState.code===dataType.state+'')?.name
- })
- setResultDataTypeList(result.data.content)
- }
- })
- }
return (
diff --git a/src/app/task/layout.tsx b/src/app/task/layout.tsx
index 1594c07..1a78766 100644
--- a/src/app/task/layout.tsx
+++ b/src/app/task/layout.tsx
@@ -8,33 +8,39 @@ import {ConfigProvider} from "antd";
export default function Layout({children}: { children: React.ReactNode }) {
const [taskState, setTaskState] = React.useState
('8,9')
- let expectStartTimeList=[];
- expectStartTimeList.push({'name':"expectedStartTime",'value':dayjs().subtract(7,'day'),'operateType':">="});
- expectStartTimeList.push({'name':"expectedStartTime",'value':dayjs().add(7,'day'),'operateType':"<"})
+ let expectStartTimeList = [];
+ expectStartTimeList.push({'name': "expectedStartTime", 'value': dayjs().subtract(7, 'day'), 'operateType': ">="});
+ expectStartTimeList.push({'name': "expectedStartTime", 'value': dayjs().add(7, 'day'), 'operateType': "<"})
const [expectedStartTime, setExpectedStartTime] = React.useState(JSON.stringify(expectStartTimeList))
const [refreshDataFlag, setRefreshDataFlag] = React.useState(true)
+
function refreshData() {
setRefreshDataFlag(!refreshDataFlag)
}
- console.log('taskState,expectedStartTime,refreshDataFlag',taskState,expectedStartTime,refreshDataFlag)
+
+ console.log('taskState,expectedStartTime,refreshDataFlag', taskState, expectedStartTime, refreshDataFlag)
return (
-
-
-
- {children}
-
-
-
+ }}
+ >
+
+
+ {children}
+
+
);
}
diff --git a/src/app/ui/task/project/TreeTablePro.tsx b/src/app/ui/task/project/TreeTablePro.tsx
index b3ec658..0f5c5fa 100644
--- a/src/app/ui/task/project/TreeTablePro.tsx
+++ b/src/app/ui/task/project/TreeTablePro.tsx
@@ -18,8 +18,6 @@ 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();
@@ -30,11 +28,13 @@ const TreeTablePro: React.FC = () => {
const { RangePicker } = DatePicker;
const columns: ProColumns[] = [
{
+ key:'code',
title: '任务编码',
dataIndex: 'code',
width: '10%',
},
{
+ key: 'name',
title: '任务名称',
dataIndex: 'name',
width: '15%',
@@ -51,10 +51,12 @@ const TreeTablePro: React.FC = () => {
},
},
{
+ key: 'description',
title: '任务描述',
dataIndex: 'description',
},
{
+ key: 'priority',
title: '任务优先级',
dataIndex: 'priority',
order:2,
@@ -83,8 +85,8 @@ const TreeTablePro: React.FC = () => {
}
),
- },
- {
+ }, {
+ key: 'state',
title: '任务状态',
dataIndex: 'state',
valueType: 'select',
@@ -95,47 +97,33 @@ const TreeTablePro: React.FC = () => {
mode:"tags",
options: taskStateList.map(item => {
return {label: item.name, value: item.code}
- })
+ }),
},
- // renderFormItem: (_, { defaultRender }) => {
- // return defaultRender(_);
- // },
- // render: (_, record) => (
- //
- // {
- // item.code === record.state?.toString())?.color}
- // key={taskStateList.find(item => item.code === record.state?.toString())?.code}>
- // {taskStateList.find(item => item.code === record.state?.toString())?.name}
- //
- // }
- //
- // ),
- },
- {
+ }, {
+ key: 'expectedStartTime',
title: '期望开始时间',
dataIndex: 'expectedStartTime',
valueType: 'date',
order:1,
renderFormItem:()=>
- },
- {
+ }, {
+ key:'expectedEndTime',
title: '期望结束时间',
dataIndex: 'expectedEndTime',
valueType: 'date',
- },
- {
+ }, {
+ key: 'actualStartTime',
title: '实际开始时间',
dataIndex: 'actualStartTime',
valueType: 'date',
- },
- {
+ }, {
+ key: 'actualEndTime',
title: '期望结束时间',
dataIndex: 'actualEndTime',
valueType: 'date',
- },
- {
- title: '操作',
+ }, {
key: 'option',
+ title: '操作',
valueType: 'option',
render: (_, record) => {
actionRef.current?.reload( false);
@@ -143,10 +131,10 @@ const TreeTablePro: React.FC = () => {
}
];
let toolBarRenderList = [
- {
+ {
actionRef.current?.reload( false);
}}/>,
- {setSwitchChecked(checked);actionRef.current?.reset?.();}} />,
];
if (switchChecked){