Browse Source

🐛进度-按日期查看-昨日

shaogen1995 1 year ago
parent
commit
150f964ae2
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/pages/B1Plan/PlanModal.tsx

+ 3 - 2
src/pages/B1Plan/PlanModal.tsx

@@ -158,8 +158,9 @@ function PlanModal({ title, closePageFu }: Props) {
     const numRes = nowTime - 86400000 * num;
     const numRes = nowTime - 86400000 * num;
     const arr = [
     const arr = [
       dayjs(numRes).format("YYYY-MM-DD"),
       dayjs(numRes).format("YYYY-MM-DD"),
-      dayjs(nowTime).format("YYYY-MM-DD"),
+      dayjs(num === 1 ? numRes : nowTime).format("YYYY-MM-DD"),
     ];
     ];
+
     const obj = {
     const obj = {
       ...tableSelectRef.current,
       ...tableSelectRef.current,
       timeAll: arr,
       timeAll: arr,
@@ -202,7 +203,7 @@ function PlanModal({ title, closePageFu }: Props) {
   const deriveFu = useCallback(async () => {
   const deriveFu = useCallback(async () => {
     if (list.length === 0) return MessageFu.warning("当前搜索条件没有数据!");
     if (list.length === 0) return MessageFu.warning("当前搜索条件没有数据!");
     let name = title + dayjs(new Date()).format("YYYY-MM-DD HH:mm");
     let name = title + dayjs(new Date()).format("YYYY-MM-DD HH:mm");
-    name=name.replaceAll('/','_')    
+    name = name.replaceAll("/", "_");
 
 
     const option = {
     const option = {
       fileName: name,
       fileName: name,