feat:发版
This commit is contained in:
parent
0a1bf766bc
commit
0e3275fe33
|
@ -13,13 +13,13 @@ import {MyRootProvider} from "./components/MyRootContext";
|
|||
function App() {
|
||||
return (
|
||||
<MyRootProvider>
|
||||
<Router>
|
||||
<Router basename="/mobile">
|
||||
<div className='app'>
|
||||
<Routes>
|
||||
<Route path='/' element={<Navigate to="/mobile/listTask"/>}>
|
||||
<Route path='/' element={<Navigate to="/home/listTask"/>}>
|
||||
|
||||
</Route>
|
||||
<Route path='/mobile' element={<Home/>}>
|
||||
<Route path='/home' element={<Home/>}>
|
||||
{/*<Route index element={<ToDoList />} />*/}
|
||||
<Route path='treeTask' element={<ToDoTree/>}/>
|
||||
<Route path='listTask' element={<ToDoList/>}></Route>
|
||||
|
|
|
@ -84,7 +84,7 @@ export default () => {
|
|||
const onFinish = (values) => {
|
||||
if (currentPath === "selectTask") {
|
||||
// 进入添加日志页面
|
||||
navigate("/mobile/detail/logTask")
|
||||
navigate("/detail/logTask")
|
||||
return;
|
||||
}
|
||||
console.log("提交:", values)
|
||||
|
@ -104,7 +104,7 @@ export default () => {
|
|||
key: 'back',
|
||||
text: '回到列表',
|
||||
onClick: () => {
|
||||
navigate("/mobile/listTask")
|
||||
navigate("/home/listTask")
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -133,7 +133,7 @@ export default () => {
|
|||
key: 'back',
|
||||
text: '回到列表',
|
||||
onClick: () => {
|
||||
navigate("/mobile/listTask")
|
||||
navigate("/home/listTask")
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -188,7 +188,7 @@ export default () => {
|
|||
showCount
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item name='state' label='任务状态' required={true} disabled={updateFiledDisabled}>
|
||||
<Form.Item name='state' initialValue='8' label='任务状态' rules={[{required: true, message: '任务状态不能为空'}]} disabled={updateFiledDisabled}>
|
||||
<Radio.Group>
|
||||
<Space direction='vertical'>
|
||||
<Radio value='8'><Tag color='primary'>未开始</Tag></Radio>
|
||||
|
@ -198,7 +198,7 @@ export default () => {
|
|||
</Space>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
<Form.Item name='priority' label='任务优先级' required={true} disabled={updateFiledDisabled}>
|
||||
<Form.Item name='priority' label='任务优先级' initialValue='2' rules={[{required: true, message: '任务优先级不能为空'}]} disabled={updateFiledDisabled}>
|
||||
<Radio.Group>
|
||||
<Space direction='vertical'>
|
||||
<Radio value='3'><Tag color='danger'>紧急重要</Tag></Radio>
|
||||
|
|
|
@ -93,7 +93,7 @@ const DetailSearchBar = (props) => {
|
|||
</div>
|
||||
{showCloseOutline && <div className="CloseOutline-CloseOutline" onClick={() => {
|
||||
dispatch({type:UPDATE_SEARCH,search:{
|
||||
"pageSize": 20,
|
||||
"pageSize": 12,
|
||||
"pageNumber": 1,
|
||||
"data": {
|
||||
"andList": [],
|
||||
|
|
|
@ -7,7 +7,7 @@ export const MyRootContext = createContext();
|
|||
export const UPDATE_SEARCH = "UPDATE_SEARCH";
|
||||
// 定义初始状态和 reducer 函数
|
||||
const initialState = {"search":{
|
||||
"pageSize": 20,
|
||||
"pageSize": 12,
|
||||
"pageNumber": 1,
|
||||
"data": {
|
||||
"orSearchModel": {
|
||||
|
|
|
@ -12,25 +12,25 @@ import "./index.css"
|
|||
|
||||
const tabs = [
|
||||
{
|
||||
key: '/mobile/treeTask',
|
||||
key: '/home/treeTask',
|
||||
title: '主子任务',
|
||||
icon: <AppOutline/>,
|
||||
// badge: '1',
|
||||
},
|
||||
{
|
||||
key: '/mobile/listTask',
|
||||
key: '/home/listTask',
|
||||
title: '列表任务',
|
||||
icon: <UnorderedListOutline/>,
|
||||
// badge: '2',
|
||||
},
|
||||
{
|
||||
key: '/mobile/calTask',
|
||||
key: '/home/calTask',
|
||||
title: '日历任务',
|
||||
icon: <CalendarOutline />,
|
||||
// badge: '3',
|
||||
},
|
||||
{
|
||||
key: '/mobile/me',
|
||||
key: '/home/me',
|
||||
title: '我的',
|
||||
icon: <UserOutline/>,
|
||||
// badge: '4',
|
||||
|
|
|
@ -139,7 +139,7 @@ const DetailSearchContext = () => {
|
|||
orSearchModel
|
||||
}
|
||||
}})
|
||||
navigate("/mobile/listTask")
|
||||
navigate("/home/listTask")
|
||||
}}
|
||||
footer={
|
||||
<Button block type='submit' color='primary' size='large'>
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
import React from "react";
|
||||
import {Button} from "antd-mobile";
|
||||
import Cookies from "js-cookie";
|
||||
|
||||
export function PersonalCenter() {
|
||||
return <div>pc端可访问:http://www.hauruyu.com</div>
|
||||
return <div>pc端可访问:http://www.hauruyu.com
|
||||
<Button color={"danger"} onClick={()=>{
|
||||
localStorage.removeItem('platform-security');
|
||||
Cookies.remove('platform-security');
|
||||
window.location.href="http:///www.huaruyu.com/login"
|
||||
}}>退出登录</Button>
|
||||
</div>
|
||||
}
|
|
@ -4,7 +4,6 @@ import dayjs from "dayjs";
|
|||
import {DATE_FORMAT} from "../../utils/timeFormatUtil";
|
||||
import {getDictionary} from "../../utils/dictUtil";
|
||||
import {Tag} from "antd-mobile";
|
||||
import detailSearchBar from "../../components/DetailSearchBar";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
import {MyRootContext, UPDATE_SEARCH} from "../../components/MyRootContext";
|
||||
|
||||
|
@ -90,7 +89,7 @@ const TaskCount = (props) => {
|
|||
orSearchModel
|
||||
}
|
||||
}})
|
||||
navigate("/mobile/listTask")
|
||||
navigate("/home/listTask")
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -18,8 +18,10 @@ export default ()=>{
|
|||
children: generate(option.value),
|
||||
}))
|
||||
}
|
||||
|
||||
return generate('0') ?? []
|
||||
}, [valueToOptions])
|
||||
|
||||
async function fetchOptionsForValue(v, level) {
|
||||
if (v in valueToOptions) return
|
||||
// if (level >= 3) {
|
||||
|
@ -39,10 +41,19 @@ export default ()=>{
|
|||
label: task.name,
|
||||
}))
|
||||
console.log("await getTaskByPid(v) options", options)
|
||||
if (options){
|
||||
setValueToOptions(prev => ({
|
||||
...prev,
|
||||
[v]: options,
|
||||
}))
|
||||
}else {
|
||||
setValueToOptions(prev => ({
|
||||
...prev,
|
||||
[v]: [],
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -52,6 +63,8 @@ export default ()=>{
|
|||
<Card title='任务名称'>
|
||||
任务详情
|
||||
</Card>
|
||||
<CascaderView options={options} />
|
||||
<CascaderView options={options} onChange={value => {
|
||||
fetchOptionsForValue(value)
|
||||
}}/>
|
||||
</Fragment>
|
||||
}
|
|
@ -6,8 +6,8 @@ import DetailSearchContext from "../pages/DetailSearchContext";
|
|||
|
||||
const router = [
|
||||
{
|
||||
key:"mobile",
|
||||
path: "/mobile",
|
||||
key:"home",
|
||||
path: "/home",
|
||||
element: <Home/>,
|
||||
children: [{
|
||||
key:"treeTask",
|
||||
|
|
|
@ -2,7 +2,7 @@ import {requestUtil} from "./requestUtil";
|
|||
|
||||
export const getTaskList = (data) => {
|
||||
let request = encodeURI(JSON.stringify(data))
|
||||
return requestUtil.get('/todo-server/V2/search/task_message_tree?search=' + request);
|
||||
return requestUtil.get('/V2/search/task_message_tree?search=' + request);
|
||||
}
|
||||
// 根据pid获取未完成的任务
|
||||
export const getTaskByPid = (pid) => {
|
||||
|
|
Loading…
Reference in New Issue