Commit d8a0f2d2 authored by 邓超's avatar 邓超

fix: 修改节假日不能周末不能修改问题,对样式进行优化

parent 44d809be
Pipeline #65697 waiting for manual action with stages
......@@ -13,7 +13,7 @@ const HolidayConfig = props => {
useEffect(() => {
if (visible) {
let obj = msg.msg;
console.log(msg.holidayOptions);
console.log(msg, 'afsdfasd');
let list = [...holidaysList].map(item => ({ value: item, label: item }));
if (obj.nWeek === 6) {
list.push({ value: '周六', label: '周六' });
......@@ -21,7 +21,7 @@ const HolidayConfig = props => {
if (obj.nWeek === 7) {
list.push({ value: '周日', label: '周日' });
}
console.log(list, 'list');
// console.log(list, 'list');
setOptions(list);
if (!msg.isRest) {
confirm({
......@@ -46,7 +46,7 @@ const HolidayConfig = props => {
}}
>
{obj.nWeek === 6 || obj.nWeek === 7 ? (
<Select placeholder="请选择假日名称" options={msg.holidayOptions} />
<Select placeholder="请选择假日名称" options={list} />
) : (
<AutoComplete placeholder="请输入假日名称" options={msg.holidayOptions} />
)}
......@@ -162,11 +162,12 @@ const HolidayConfig = props => {
setFlag(flag + 1);
}
};
return (
<div>
<Modal
title={null}
visible={visible && (msg.msg.nWeek === 6 || msg.msg.nWeek === 7)}
visible={visible && (msg.msg.nWeek === 6 || msg.msg.nWeek === 7) && msg.isRest}
onOk={onFinish}
onCancel={handleCancel}
maskClosable={false}
......
......@@ -133,6 +133,9 @@ const Holidays = () => {
document.querySelectorAll('.ant-popconfirm').forEach(ele => {
ele.style.zoom = 'normal';
});
document.querySelectorAll('.ant-select-dropdown').forEach(ele => {
ele.style.zoom = 'normal';
});
};
}, []);
const resizeListener = () => {
......@@ -236,6 +239,7 @@ const Holidays = () => {
let obj = calendar.solar2lunar(year, month, day);
let date = `${year}-${month}-${day}`;
let holidayMsg = calendarHoliday.current?.get(date);
let today = moment(new Date()).format('YYYY-MM-DD');
return (
<div
key={date}
......@@ -245,6 +249,7 @@ const Holidays = () => {
[styles.holidays]: holidayMsg?.DayType === 3,
[styles.weekend]: week === 0 || week === 6,
[styles.choose]: date === currentDate,
[styles.today]: date === today,
})}
onDoubleClick={() => onSelect(value, obj)}
onClick={e => {
......@@ -314,10 +319,11 @@ const Holidays = () => {
}}
/>
<Select
style={{ margin: '0 5px' }}
style={{ margin: '0 5px', width: '80px' }}
dropdownMatchSelectWidth={false}
className="my-year-select"
value={year}
defaultOpen
onChange={newYear => {
console.log(newYear);
const now = value.clone().year(newYear);
......@@ -349,7 +355,7 @@ const Holidays = () => {
}}
/>
<Select
style={{ margin: '0 5px' }}
style={{ margin: '0 5px', width: '80px' }}
dropdownMatchSelectWidth={false}
value={month}
onChange={newMonth => {
......
......@@ -187,6 +187,22 @@
.choose {
border: 1px solid #6394FF;
}
.today {
.tiemBox {
p:nth-of-type(1) {
color: #3D78FF;
font-weight: 700;
}
p:nth-of-type(2) {
color: #3D78FF;
font-weight: 700;
}
}
}
}
.workTiemContainer {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment