feat:时间块先显示描述后显示时间,刷新token接口限制,删除成功提示
This commit is contained in:
parent
ae11147281
commit
252b3f1478
|
@ -15,7 +15,7 @@ const nextConfig = {
|
|||
eslint: {
|
||||
// Warning: This allows production builds to successfully complete even if
|
||||
// your project has ESLint errors.
|
||||
ignoreDuringBuilds: true,
|
||||
// ignoreDuringBuilds: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ class OperationButton extends React.Component<OperationButtonProps, OperationMod
|
|||
deleteTask(this.props.itemId).then((response => {
|
||||
console.log('response', response)
|
||||
if (response.status.success) {
|
||||
message.success("删除任务成功:" + response.data)
|
||||
message.success("删除任务成功")
|
||||
this.props.refreshDate?.()
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -52,7 +52,7 @@ const RightOption: React.FC<OperationButtonProps> = (props) => {
|
|||
deleteTask(props.itemId).then((response => {
|
||||
console.log('response', response)
|
||||
if (response.status.success) {
|
||||
message.success("删除任务成功:" + response.data)
|
||||
message.success("删除任务成功")
|
||||
props.refreshDate?.()
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -32,7 +32,6 @@ import {editClickRecordRangeAPI} from "@/components/service/ScheduleTask";
|
|||
import {CopyOutlined, ExclamationCircleFilled, LoadingOutlined} from "@ant-design/icons";
|
||||
import {copyToClipboard} from "@/lib/copyToClipboard";
|
||||
import {solarToLunar} from "lunar-calendar";
|
||||
import CalendarHeader from "antd/es/calendar/Header";
|
||||
import CalHeader from "@/components/CalHeader";
|
||||
import {lunarDateShow} from "@/utils/timeFormatUtil";
|
||||
|
||||
|
@ -171,15 +170,19 @@ const CalShow: React.FC = () => {
|
|||
if (responseD.status.success) {
|
||||
let result: TaskEvent[] = responseD.data.content.map<TaskEvent>(taskState => {
|
||||
return {
|
||||
start: dayjs(taskState.expectedStartTime).toDate(),
|
||||
end: dayjs(taskState.expectedEndTime).toDate(),
|
||||
title: <Fragment><TaskNameAndIcon task={taskState}/>
|
||||
start: taskState.expectedStartTime?dayjs(taskState.expectedStartTime).toDate():dayjs(taskState.expectedEndTime).startOf('day').toDate(),
|
||||
end: taskState.expectedEndTime?dayjs(taskState.expectedEndTime).toDate():dayjs(taskState.expectedStartTime).endOf('day').toDate(),
|
||||
title: <Fragment>
|
||||
<div>
|
||||
<TaskNameAndIcon task={taskState}/>
|
||||
</div>
|
||||
<div>
|
||||
{view != 'month' && taskState.description && <CopyOutlined onClick={(e) => {
|
||||
e.preventDefault(); // 阻止默认行为(如果有)
|
||||
e.stopPropagation(); // 阻止事件冒泡
|
||||
copyToClipboard(taskState.description)
|
||||
}}/>} {view != 'month' && taskState.description}</div>
|
||||
}}/>} {view != 'month' && taskState.description}
|
||||
</div>
|
||||
</Fragment>,
|
||||
// style: {
|
||||
// backgroundColor: 'green',
|
||||
|
@ -425,8 +428,7 @@ const CalShow: React.FC = () => {
|
|||
formats={{
|
||||
dayFormat: dateFormat,
|
||||
// dateFormat: dateFormat,
|
||||
monthHeaderFormat: (date) => {
|
||||
const solarDate = new Date(date);
|
||||
monthHeaderFormat: (solarDate) => {
|
||||
const lunarDate = solarToLunar(
|
||||
solarDate.getFullYear(),
|
||||
solarDate.getMonth() + 1,
|
||||
|
|
|
@ -18,3 +18,26 @@
|
|||
background-color: green !important;
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
/* 修改计划展示,先展示描述后展示时间 start */
|
||||
.rbc-addons-dnd-resizable{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.rbc-event-label{
|
||||
/*设置顺序*/
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.rbc-day-slot .rbc-event-content{
|
||||
flex-grow: 0;
|
||||
min-height:unset;
|
||||
}
|
||||
.rbc-day-slot .rbc-event-content{
|
||||
/* 不自动增长 */
|
||||
flex-grow: 0;
|
||||
/* 移除组件内属性 min-height */
|
||||
min-height:unset;
|
||||
}
|
||||
|
||||
/* 修改计划展示,先展示描述后展示时间 end */
|
|
@ -364,7 +364,7 @@ export const DetailModelForm: React.FC<DetailModelFormProps> = (props) => {
|
|||
deleteTask(props.itemId).then((response => {
|
||||
console.log('response', response)
|
||||
if (response.status.success) {
|
||||
message.success("删除任务成功:" + response.data)
|
||||
message.success("删除任务成功")
|
||||
initData()
|
||||
props.reloadData?.()
|
||||
}
|
||||
|
|
|
@ -24,7 +24,10 @@ httpReq.interceptors.request.use((config) => {
|
|||
const token = localStorage.getItem('platform-security');
|
||||
if (token) {
|
||||
config.headers.Authorization = `Bearer ${token}`;
|
||||
if (config.url && config.url.indexOf("refreshToken") == -1) {
|
||||
if (config.url && config.url.indexOf("refreshToken") == -1 &&
|
||||
config.url.indexOf("/ask/login") == -1 &&
|
||||
config.url.indexOf("/generate/qrcode") == -1
|
||||
) {
|
||||
reduceToken(token);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue