diff --git a/docker/out/背景19-1733751214093.jpg b/docker/out/背景19-1733751214093.jpg deleted file mode 100644 index 5e40629..0000000 Binary files a/docker/out/背景19-1733751214093.jpg and /dev/null differ diff --git a/public/static/iconfont.js b/public/static/iconfont.js new file mode 100644 index 0000000..234a6e9 --- /dev/null +++ b/public/static/iconfont.js @@ -0,0 +1 @@ +window._iconfont_svg_string_4912592='',(l=>{var t=(a=(a=document.getElementsByTagName("script"))[a.length-1]).getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var c,e,h,i,o,n=function(t,a){a.parentNode.insertBefore(t,a)};if(t&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}c=function(){var t,a=document.createElement("div");a.innerHTML=l._iconfont_svg_string_4912592,(a=a.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",a=a,(t=document.body).firstChild?n(a,t.firstChild):t.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(c,0):(e=function(){document.removeEventListener("DOMContentLoaded",e,!1),c()},document.addEventListener("DOMContentLoaded",e,!1)):document.attachEvent&&(h=c,i=l.document,o=!1,s(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,d())})}function d(){o||(o=!0,h())}function s(){try{i.documentElement.doScroll("left")}catch(t){return void setTimeout(s,50)}d()}})(window); \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 63fac20..47b37e0 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -20,6 +20,7 @@ export default function RootLayout({ 任务管理 + {children} diff --git a/src/app/page.module.css b/src/app/page.module.css index 5c4b1e6..23ef2a4 100644 --- a/src/app/page.module.css +++ b/src/app/page.module.css @@ -6,7 +6,14 @@ padding: 6rem; min-height: 100vh; } - +.icon { + /* em 当前元素的 font-size 值,如果元素没有显式设置 font-size,则继承父元素的 font-size。 控制与字体大小相关的属性*/ + width: 1em; + height: 1em; + vertical-align: -0.15em; + fill: currentColor; + overflow: hidden; +} .description { display: inherit; justify-content: inherit; @@ -22,6 +29,7 @@ display: flex; justify-content: center; align-items: center; + /* 始终基于根字体,更稳定,实现全局尺寸控制(避免嵌套问题)*/ gap: 0.5rem; } diff --git a/src/ui/globals.css b/src/ui/globals.css index 1b3be3f..8f10e6e 100644 --- a/src/ui/globals.css +++ b/src/ui/globals.css @@ -15,4 +15,7 @@ input[type='number']::-webkit-inner-spin-button { input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; +} +{ + font-size: 16px; } \ No newline at end of file diff --git a/src/ui/task/TitleOperation.modules.css b/src/ui/task/TitleOperation.modules.css index fcceb82..151ade5 100644 --- a/src/ui/task/TitleOperation.modules.css +++ b/src/ui/task/TitleOperation.modules.css @@ -1,3 +1,17 @@ .ant-select-selection-overflow-item-suffix{ visibility: hidden; } +.container{ + padding: 0 20px; + display: flex; + /* 决定主轴方向 */ + flex-direction: row; + /* 交叉轴对齐方式,垂直居中 */ + align-items: center; + /* 主轴对齐方式,水平居中(可选) */ + justify-content: space-between; + /* 是否换行*/ + flex-wrap: wrap; + /* 多行时的垂直对齐 */ + align-content: space-between; +} diff --git a/src/ui/task/TitleOperation.tsx b/src/ui/task/TitleOperation.tsx index 8b73268..4687f93 100644 --- a/src/ui/task/TitleOperation.tsx +++ b/src/ui/task/TitleOperation.tsx @@ -31,89 +31,92 @@ export const TitleOperation: React.FC = ({ expectStartTimeParseResult[0] && expectStartTimeParseResult[0].value ? dayjs(expectStartTimeParseResult[0].value.toString()) : undefined, expectStartTimeParseResult[1] && expectStartTimeParseResult[1].value ? dayjs(expectStartTimeParseResult[1].value.toString()) : undefined ]; - return - - { - !usePathname().startsWith("/task/project") && - - } - { - !usePathname().startsWith("/task/four") && - - } - { - !usePathname().startsWith("/task/calendar") && - - } - { - /*日历需要状态*/ - !usePathname().startsWith("/task/project") && - 任务状态: - { + console.log('onChange') + setTaskState(value.join(',')) + }} + options={taskStateList.map(item => { + return {label: item.name, value: item.code} + })} + /> + + } + { + /*四相线需要状态时间*/ + usePathname().startsWith("/task/four") && + 期望开始时间范围: + { + console.log('onChange:', dates, dateStrings); + if (!dates) { + setExpectedStartTime('') + return + } + let expectStartTimeList = []; + if (dates[0]) { + expectStartTimeList.push({ + 'name': "expectedStartTime", + 'value': dates[0], + 'operateType': ">=" + }); + } else { + expectStartTimeList.push(undefined) + } + if (dates[1]) { + expectStartTimeList.push({ + 'name': "expectedStartTime", + 'value': dates[1].add(1, 'day'), + 'operateType': "<" + }) + } else { + expectStartTimeList.push(undefined) + } + setExpectedStartTime(JSON.stringify(expectStartTimeList)) + }} + /> + + } + + + } diff --git a/src/ui/task/project/TreeTablePro.tsx b/src/ui/task/project/TreeTablePro.tsx index 8bfe581..398f51f 100644 --- a/src/ui/task/project/TreeTablePro.tsx +++ b/src/ui/task/project/TreeTablePro.tsx @@ -6,7 +6,7 @@ import { 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'; +import React, {Fragment, useContext, useEffect, useRef} from 'react'; import {DataType} from "@/lib/definitions"; import { getTaskTreeResult, @@ -21,6 +21,7 @@ import '@/ui/task/project/TreeTablePro.modules.css' import {useSearchParams} from "next/navigation"; + const TreeTablePro: React.FC = () => { const actionRef = useRef(); const formRef = useRef(); @@ -33,12 +34,6 @@ const TreeTablePro: React.FC = () => { const { RangePicker } = DatePicker; console.log("TreeTablePro",useSearchParams().get('pid')) const columns: ProColumns[] = [ - { - key:'code', - title: '任务编码', - dataIndex: 'code', - width: '10%', - }, { key: 'name', title: '任务名称', @@ -55,6 +50,14 @@ const TreeTablePro: React.FC = () => { }, ], }, + render:(_, record)=>{ + return + + {record.name} + + } }, { key: 'description',