feat:时间块先显示描述后显示时间,刷新token接口限制,删除成功提示
This commit is contained in:
parent
ae11147281
commit
252b3f1478
|
@ -15,7 +15,7 @@ const nextConfig = {
|
||||||
eslint: {
|
eslint: {
|
||||||
// Warning: This allows production builds to successfully complete even if
|
// Warning: This allows production builds to successfully complete even if
|
||||||
// your project has ESLint errors.
|
// 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 => {
|
deleteTask(this.props.itemId).then((response => {
|
||||||
console.log('response', response)
|
console.log('response', response)
|
||||||
if (response.status.success) {
|
if (response.status.success) {
|
||||||
message.success("删除任务成功:" + response.data)
|
message.success("删除任务成功")
|
||||||
this.props.refreshDate?.()
|
this.props.refreshDate?.()
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -52,7 +52,7 @@ const RightOption: React.FC<OperationButtonProps> = (props) => {
|
||||||
deleteTask(props.itemId).then((response => {
|
deleteTask(props.itemId).then((response => {
|
||||||
console.log('response', response)
|
console.log('response', response)
|
||||||
if (response.status.success) {
|
if (response.status.success) {
|
||||||
message.success("删除任务成功:" + response.data)
|
message.success("删除任务成功")
|
||||||
props.refreshDate?.()
|
props.refreshDate?.()
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -32,7 +32,6 @@ import {editClickRecordRangeAPI} from "@/components/service/ScheduleTask";
|
||||||
import {CopyOutlined, ExclamationCircleFilled, LoadingOutlined} from "@ant-design/icons";
|
import {CopyOutlined, ExclamationCircleFilled, LoadingOutlined} from "@ant-design/icons";
|
||||||
import {copyToClipboard} from "@/lib/copyToClipboard";
|
import {copyToClipboard} from "@/lib/copyToClipboard";
|
||||||
import {solarToLunar} from "lunar-calendar";
|
import {solarToLunar} from "lunar-calendar";
|
||||||
import CalendarHeader from "antd/es/calendar/Header";
|
|
||||||
import CalHeader from "@/components/CalHeader";
|
import CalHeader from "@/components/CalHeader";
|
||||||
import {lunarDateShow} from "@/utils/timeFormatUtil";
|
import {lunarDateShow} from "@/utils/timeFormatUtil";
|
||||||
|
|
||||||
|
@ -171,15 +170,19 @@ const CalShow: React.FC = () => {
|
||||||
if (responseD.status.success) {
|
if (responseD.status.success) {
|
||||||
let result: TaskEvent[] = responseD.data.content.map<TaskEvent>(taskState => {
|
let result: TaskEvent[] = responseD.data.content.map<TaskEvent>(taskState => {
|
||||||
return {
|
return {
|
||||||
start: dayjs(taskState.expectedStartTime).toDate(),
|
start: taskState.expectedStartTime?dayjs(taskState.expectedStartTime).toDate():dayjs(taskState.expectedEndTime).startOf('day').toDate(),
|
||||||
end: dayjs(taskState.expectedEndTime).toDate(),
|
end: taskState.expectedEndTime?dayjs(taskState.expectedEndTime).toDate():dayjs(taskState.expectedStartTime).endOf('day').toDate(),
|
||||||
title: <Fragment><TaskNameAndIcon task={taskState}/>
|
title: <Fragment>
|
||||||
|
<div>
|
||||||
|
<TaskNameAndIcon task={taskState}/>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{view != 'month' && taskState.description && <CopyOutlined onClick={(e) => {
|
{view != 'month' && taskState.description && <CopyOutlined onClick={(e) => {
|
||||||
e.preventDefault(); // 阻止默认行为(如果有)
|
e.preventDefault(); // 阻止默认行为(如果有)
|
||||||
e.stopPropagation(); // 阻止事件冒泡
|
e.stopPropagation(); // 阻止事件冒泡
|
||||||
copyToClipboard(taskState.description)
|
copyToClipboard(taskState.description)
|
||||||
}}/>} {view != 'month' && taskState.description}</div>
|
}}/>} {view != 'month' && taskState.description}
|
||||||
|
</div>
|
||||||
</Fragment>,
|
</Fragment>,
|
||||||
// style: {
|
// style: {
|
||||||
// backgroundColor: 'green',
|
// backgroundColor: 'green',
|
||||||
|
@ -425,8 +428,7 @@ const CalShow: React.FC = () => {
|
||||||
formats={{
|
formats={{
|
||||||
dayFormat: dateFormat,
|
dayFormat: dateFormat,
|
||||||
// dateFormat: dateFormat,
|
// dateFormat: dateFormat,
|
||||||
monthHeaderFormat: (date) => {
|
monthHeaderFormat: (solarDate) => {
|
||||||
const solarDate = new Date(date);
|
|
||||||
const lunarDate = solarToLunar(
|
const lunarDate = solarToLunar(
|
||||||
solarDate.getFullYear(),
|
solarDate.getFullYear(),
|
||||||
solarDate.getMonth() + 1,
|
solarDate.getMonth() + 1,
|
||||||
|
|
|
@ -18,3 +18,26 @@
|
||||||
background-color: green !important;
|
background-color: green !important;
|
||||||
color: black !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 => {
|
deleteTask(props.itemId).then((response => {
|
||||||
console.log('response', response)
|
console.log('response', response)
|
||||||
if (response.status.success) {
|
if (response.status.success) {
|
||||||
message.success("删除任务成功:" + response.data)
|
message.success("删除任务成功")
|
||||||
initData()
|
initData()
|
||||||
props.reloadData?.()
|
props.reloadData?.()
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,10 @@ httpReq.interceptors.request.use((config) => {
|
||||||
const token = localStorage.getItem('platform-security');
|
const token = localStorage.getItem('platform-security');
|
||||||
if (token) {
|
if (token) {
|
||||||
config.headers.Authorization = `Bearer ${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);
|
reduceToken(token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue