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