diff --git a/src/components/card/CardProj.tsx b/src/components/card/CardProj.tsx index d9a36a0..27edb8f 100644 --- a/src/components/card/CardProj.tsx +++ b/src/components/card/CardProj.tsx @@ -15,7 +15,7 @@ import { import { Button, Tag, Modal, Carousel } from 'antd'; import { GenerateStatus } from "../../interfaces/proj/IProj.ts"; import { useNavigate } from "react-router-dom"; -import { Axios, post, downloadUrl, get,del } from "../../util/AjaxUtils.ts"; +import { Axios, post, downloadUrl, get, del } from "../../util/AjaxUtils.ts"; import { useEffect, useState } from "react"; import useMessage from "antd/es/message/useMessage"; import setImg from '../../static/right/set.png' @@ -143,7 +143,7 @@ export default function CardProj(props: any) { }) } // 保存提示标签 - const saveRemind= (projRemindId: string, projId: string) => { + const saveRemind = (projRemindId: string, projId: string) => { post({ messageApi, url: `/api/proj/remind/task/save`, @@ -155,7 +155,7 @@ export default function CardProj(props: any) { }, onSuccess() { - + setRemindIdArray((prevArray: any) => [...prevArray, projRemindId]); }, onFinally() { @@ -164,7 +164,7 @@ export default function CardProj(props: any) { }) } // 删除提示标签 - const deleteRemind= (projRemindId: string, projId: string) => { + const deleteRemind = (projRemindId: string, projId: string) => { // setRemindIdArray((prevArray: any[]) => prevArray.filter(id => id !== projRemindId)); del({ @@ -172,7 +172,7 @@ export default function CardProj(props: any) { url: `/api/proj/remind/task/delete/proj-id/${projId}/proj-remind-id/${projRemindId}`, onSuccess() { setRemindIdArray((prevArray: any[]) => prevArray.filter(id => id !== projRemindId)); - + } }) } @@ -612,11 +612,12 @@ export default function CardProj(props: any) { -
-
- -
- {/* {props.tagArray.map((item: any) => { +
0 ? 'unset' : 'none', + }}> +
+ + {/* {props.tagArray.map((item: any) => { return (
{ - return ( + {props.remindTagArray.map((item: any) => { + return ( + +
0 ? 'unset' : 'none', -
{ - if(RemindIdArray.includes(item.value)){ - deleteRemind(item.value, data.projId) - }else{ - saveRemind(item.value, data.projId) - } - }} - > - {item.label} -
+ onClick={() => { + if (RemindIdArray.includes(item.value)) { + deleteRemind(item.value, data.projId) + } else { + saveRemind(item.value, data.projId) + } - ) - })} + }} + > + {item.label} +
+ + + ) + })} +
{/*
diff --git a/src/components/card/card-proj.css b/src/components/card/card-proj.css index a5fe1d4..34eeab7 100644 --- a/src/components/card/card-proj.css +++ b/src/components/card/card-proj.css @@ -19,11 +19,12 @@ border-radius: 6px; background-color: var(--color-light); /* padding: 5px 15px; */ - height: 270px; + /* height: 270px; */ /* width: calc(100vw - 330px); */ /* margin-bottom: 20px; */ border-radius: 13px; - + padding-bottom: 20px; + box-sizing: border-box; } @@ -43,6 +44,7 @@ /* background-color: red; */ align-items: center; /* justify-content: center; */ + margin-top: 10px; } .cpt-left { display: flex; @@ -154,8 +156,9 @@ display: flex; align-items: center; justify-content: space-between; - height: 175px; + /* height: 175px; */ padding-left: 18px; + margin-top: 20px; } .cpb-left { @@ -576,11 +579,12 @@ border-radius: 6px; background-color: var(--color-light); /* padding: 5px 15px; */ - min-height: 280px; + /* min-height: 280px; */ /* width: calc(100vw - 330px); */ /* margin-bottom: 20px; */ border-radius: 13px; - + padding-bottom: 10px; + box-sizing: border-box; } @@ -687,7 +691,7 @@ padding-right: 9px; margin-left: 10px; cursor: pointer; - margin-top: 4px; + /* margin-top: 4px; */ } .cpt-right { @@ -715,8 +719,9 @@ display: flex; align-items: center; justify-content: space-between; - min-height: 175px; + /* min-height: 175px; */ padding-left: 18px; + margin-top: 20px; } .cpb-left {