TODO日{currentDay && dayjs(currentDay).format(DATE_FORMAT)}代办:
- {currentDay && 详情}
+ {/*{currentDay && 详情}*/}
{!dayjs(currentMonth).isSame(today, 'months') &&
backToToday()}>回到当月}
diff --git a/src/pages/ToDoCal/index.jsx b/src/pages/ToDoCal/index.jsx
index 9a1e15b..9c868b7 100644
--- a/src/pages/ToDoCal/index.jsx
+++ b/src/pages/ToDoCal/index.jsx
@@ -2,14 +2,14 @@ import {Calendar, Cascader, SwipeAction, Tag} from "antd-mobile";
import dayjs from "dayjs";
import {TaskCount} from "../TaskCount";
import React, {Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState} from "react";
-import {getTaskByPid, getTaskCount} from "../../utils";
-import {FrownFill, SmileFill} from "antd-mobile-icons";
+import {getTaskCount} from "../../utils";
import {NEW, OVERDUE, UNDER_WAY} from "../../utils/commonConstant";
-import {dateStartUtcFormat} from "../../utils/timeFormatUtil";
+import {dateStartUtcFormat, dayStartUtcFormat, nextDayStartUtcFormat} from "../../utils/timeFormatUtil";
import './index.css'
+import TaskItemList from "../../components/TaskItemList";
-const ToDoCal = (props) => {
+const ToDoCal = () => {
const today = new Date()
const calRef = useRef(null);
const refSwip = useRef(null);
@@ -22,8 +22,10 @@ const ToDoCal = (props) => {
console.log("getCurrentShowDay", getCurrentShowDay())
const {startDay, endDay} = getCurrentShowDay();
listTaskCount(startDay, endDay);
+ todoDayDetail(new Date())
}, [currentMonth])
let loading = false
+ const currentDaySearch =useRef()
async function listTaskCount(start, end) {
if (loading) {
@@ -55,6 +57,54 @@ const ToDoCal = (props) => {
setCurrentDay(today)
}
+ const todoDayDetail = (searchDay) => {
+ let andSearchModel = {}
+ let orSearchModel = {andSearchModel}
+ if (searchDay) {
+ andSearchModel.andList = [{
+ "name": "expectedStartTime",
+ "value": nextDayStartUtcFormat(searchDay),
+ "operateType": "<"
+ }, {
+ "name": "expectedEndTime",
+ "value": dayStartUtcFormat(searchDay),
+ "operateType": ">"
+ }]
+ andSearchModel.orSearchModel = {
+ "andList": [
+ {
+ "name": "expectedStartTime",
+ "value": nextDayStartUtcFormat(searchDay),
+ "operateType": "<"
+ }, {
+ "name": "expectedStartTime",
+ "value": dayStartUtcFormat(searchDay),
+ "operateType": ">"
+ }, {
+ "name": "expectedEndTime",
+ "operateType": "NULL"
+ }
+ ], orSearchModel: {
+ "andList": [
+ {
+ "name": "expectedEndTime",
+ "value": nextDayStartUtcFormat(searchDay),
+ "operateType": "<"
+ }, {
+ "name": "expectedEndTime",
+ "value": dayStartUtcFormat(searchDay),
+ "operateType": ">"
+ }, {
+ "name": "expectedStartTime",
+ "operateType": "NULL"
+ }
+ ]
+ }
+ }
+ }
+ currentDaySearch.value = {data:orSearchModel}
+ }
+
return (
@@ -145,6 +195,7 @@ const ToDoCal = (props) => {
defaultValue={currentDay}
onChange={val => {
setCurrentDay(val)
+ todoDayDetail(val)
}}
onPageChange={(year, month) => {
console.log(year, month)
@@ -156,6 +207,8 @@ const ToDoCal = (props) => {
+
+
)
}