Merge remote-tracking branch 'src/master'
This commit is contained in:
@@ -180,5 +180,15 @@
|
||||
"SonarQube代码质量检查问题修改",
|
||||
"SonarQube code quality inspection issue modification"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.3.2",
|
||||
"date": "2025-09-24",
|
||||
"notes": [
|
||||
"Bugfix",
|
||||
"Bugfix",
|
||||
"SonarQube代码质量检查问题修改",
|
||||
"SonarQube code quality inspection issue modification"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jordium-gantt-vue3",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.2",
|
||||
"type": "module",
|
||||
"main": "dist/jordium-gantt-vue3.cjs.js",
|
||||
"module": "dist/jordium-gantt-vue3.es.js",
|
||||
|
||||
@@ -180,5 +180,15 @@
|
||||
"SonarQube代码质量检查问题修改",
|
||||
"SonarQube code quality inspection issue modification"
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.3.2",
|
||||
"date": "2025-09-24",
|
||||
"notes": [
|
||||
"修复缺陷",
|
||||
"Bugfix",
|
||||
"SonarQube代码质量检查问题修改",
|
||||
"SonarQube code quality inspection issue modification"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -365,18 +365,16 @@ const confirmDate = () => {
|
||||
emit('update:modelValue', newValue)
|
||||
emit('change', newValue)
|
||||
}
|
||||
} else {
|
||||
if (singleValue.value) {
|
||||
// 格式化日期和时间
|
||||
const date = new Date(singleValue.value)
|
||||
const dateFormat = `${date.getFullYear()}/${String(date.getMonth() + 1).padStart(2, '0')}/${String(date.getDate()).padStart(2, '0')}`
|
||||
const formattedDateTime = selectedTime.value
|
||||
? `${dateFormat} ${selectedTime.value}`
|
||||
: dateFormat
|
||||
} else if (singleValue.value) {
|
||||
// 格式化日期和时间
|
||||
const date = new Date(singleValue.value)
|
||||
const dateFormat = `${date.getFullYear()}/${String(date.getMonth() + 1).padStart(2, '0')}/${String(date.getDate()).padStart(2, '0')}`
|
||||
const formattedDateTime = selectedTime.value
|
||||
? `${dateFormat} ${selectedTime.value}`
|
||||
: dateFormat
|
||||
|
||||
emit('update:modelValue', formattedDateTime)
|
||||
emit('change', formattedDateTime)
|
||||
}
|
||||
emit('update:modelValue', formattedDateTime)
|
||||
emit('change', formattedDateTime)
|
||||
}
|
||||
|
||||
// 确认后关闭面板
|
||||
@@ -746,14 +744,6 @@ const handlePickerBlur = () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 时间选择器获得焦点时取消关闭
|
||||
const handleTimePickerFocus = () => {
|
||||
if (blurTimer.value) {
|
||||
clearTimeout(blurTimer.value)
|
||||
blurTimer.value = null
|
||||
}
|
||||
}
|
||||
|
||||
// 时间选择器失去焦点时关闭
|
||||
const handleTimePickerBlur = () => {
|
||||
blurTimer.value = setTimeout(() => {
|
||||
@@ -972,7 +962,7 @@ const timePickerStyle = computed(() => {
|
||||
tabindex="-1"
|
||||
@click.stop
|
||||
@mousedown.prevent
|
||||
@focus="handleTimePickerFocus"
|
||||
@focus="handlePickerFocus"
|
||||
@blur="handleTimePickerBlur"
|
||||
>
|
||||
<div class="el-time-picker-header">
|
||||
@@ -1157,8 +1147,9 @@ const timePickerStyle = computed(() => {
|
||||
|
||||
<!-- 时间选择器输入框 -->
|
||||
<div class="el-time-picker-input">
|
||||
<label class="el-time-picker-label">{{ t.time }}:</label>
|
||||
<label class="el-time-picker-label" for="time-input">{{ t.time }}:</label>
|
||||
<input
|
||||
id="time-input"
|
||||
ref="timeInputRef"
|
||||
type="text"
|
||||
class="el-time-input"
|
||||
|
||||
@@ -645,7 +645,7 @@ const calculateQuarterViewMilestonePosition = (targetDate: Date, baseStartDate:
|
||||
const month = targetDate.getMonth() + 1 // getMonth()返回0-11,需要+1
|
||||
let quarter = 1
|
||||
if (month >= 1 && month <= 3) {
|
||||
quarter = 1 // Q1: 1-3月
|
||||
// Q1: 1-3月
|
||||
} else if (month >= 4 && month <= 6) {
|
||||
quarter = 2 // Q2: 4-6月
|
||||
} else if (month >= 7 && month <= 9) {
|
||||
|
||||
@@ -1468,7 +1468,6 @@ onUnmounted(() => {
|
||||
user-select: none;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
||||
transition: box-shadow 0.2s;
|
||||
/*min-width: 60px;*/
|
||||
z-index: 100;
|
||||
border: 2px solid;
|
||||
overflow: visible; /* 允许内容超出 TaskBar */
|
||||
|
||||
+89
-197
@@ -1029,15 +1029,10 @@ const scrollToTodayCenter = (retry = 0) => {
|
||||
|
||||
// 年度视图和季度视图需要使用实际的timeline绘制起始日期
|
||||
let startNormalized: Date
|
||||
if (currentTimeScale.value === TimelineScale.YEAR) {
|
||||
const yearRange = getYearTimelineRange()
|
||||
startNormalized = new Date(
|
||||
yearRange.startDate.getFullYear(),
|
||||
yearRange.startDate.getMonth(),
|
||||
yearRange.startDate.getDate(),
|
||||
)
|
||||
} else if (currentTimeScale.value === TimelineScale.QUARTER) {
|
||||
// 季度视图使用与年度视图相同的基准日期,确保坐标系统一致
|
||||
if (
|
||||
currentTimeScale.value === TimelineScale.YEAR ||
|
||||
currentTimeScale.value === TimelineScale.QUARTER
|
||||
) {
|
||||
const yearRange = getYearTimelineRange()
|
||||
startNormalized = new Date(
|
||||
yearRange.startDate.getFullYear(),
|
||||
@@ -1091,7 +1086,7 @@ const scrollToTodayCenter = (retry = 0) => {
|
||||
const month = todayNormalized.getMonth() + 1
|
||||
let quarter = 1
|
||||
if (month >= 1 && month <= 3) {
|
||||
quarter = 1 // Q1: 1-3月
|
||||
// Q1: 1-3月
|
||||
} else if (month >= 4 && month <= 6) {
|
||||
quarter = 2 // Q2: 4-6月
|
||||
} else if (month >= 7 && month <= 9) {
|
||||
@@ -3475,152 +3470,6 @@ const handleAddSuccessor = (task: Task) => {
|
||||
opacity: 0.15;
|
||||
}
|
||||
|
||||
/* 小时视图专用样式 */
|
||||
.date-row {
|
||||
min-height: 40px;
|
||||
border-bottom: 1px solid var(--gantt-border-medium, #e1e4e8);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hours-row {
|
||||
min-height: 40px;
|
||||
border-bottom: 1px solid var(--gantt-border-light, #d1d5da);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.timeline-day-item {
|
||||
border-right: 1px solid var(--gantt-border-medium, #e1e4e8);
|
||||
background-color: var(--gantt-bg-secondary, #f6f8fa);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 40px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 小时视图日期项专用样式 */
|
||||
.timeline-day-item.hour-view-day {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
border-right: 1px solid var(--gantt-border-medium, #e1e4e8);
|
||||
background-color: var(--gantt-bg-secondary, #f6f8fa);
|
||||
}
|
||||
|
||||
.timeline-hour-item {
|
||||
height: 100%;
|
||||
border-right: 1px solid var(--gantt-border-light, #d1d5da);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 40px;
|
||||
transition: background-color 0.2s ease;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.hour-column {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
border-right: 1px solid var(--gantt-border-light, #d1d5da);
|
||||
transition: background-color 0.2s ease;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.date-label {
|
||||
color: var(--gantt-text-header, #24292e);
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hours-row {
|
||||
min-height: 40px;
|
||||
border-bottom: 1px solid var(--gantt-border-light, #d1d5da);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.timeline-hour-item {
|
||||
height: 100%;
|
||||
border-right: 1px solid var(--gantt-border-light, #d1d5da);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 40px;
|
||||
transition: background-color 0.2s ease;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.timeline-hour-item.today {
|
||||
background-color: var(--gantt-primary);
|
||||
color: var(--gantt-text-white);
|
||||
}
|
||||
|
||||
.hour-label {
|
||||
color: var(--gantt-text-primary, #24292e);
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
line-height: 1.3;
|
||||
text-align: center;
|
||||
letter-spacing: 0px;
|
||||
}
|
||||
|
||||
.timeline-hour-item.today .hour-label {
|
||||
color: var(--gantt-text-white);
|
||||
}
|
||||
|
||||
.hour-column {
|
||||
border-right: 1px solid var(--gantt-border-light, #d1d5da);
|
||||
position: relative;
|
||||
transition: background-color 0.2s ease;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.hour-column.weekend {
|
||||
background-color: var(--gantt-bg-secondary, #f5f7fa);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.hour-column.rest-hour {
|
||||
background-color: var(--gantt-bg-secondary, #f5f7fa);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.hour-column.working-hour {
|
||||
background-color: var(--gantt-bg-primary, #ffffff);
|
||||
}
|
||||
|
||||
.hour-column.today {
|
||||
background-color: var(--gantt-primary-color, #409eff);
|
||||
opacity: 0.2;
|
||||
border-left: 2px solid var(--gantt-primary-color, #409eff);
|
||||
}
|
||||
|
||||
/* 15分钟刻度线样式 */
|
||||
.quarter-hour-lines {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.quarter-line {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 1px;
|
||||
background-color: var(--gantt-border-light, #d1d5da);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* 年度视图样式 */
|
||||
.half-years-row {
|
||||
min-height: 36px;
|
||||
@@ -3785,13 +3634,7 @@ const handleAddSuccessor = (task: Task) => {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hours-row {
|
||||
min-height: 40px;
|
||||
border-bottom: 1px solid var(--gantt-border-light, #d1d5da);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/*---------------*/
|
||||
.timeline-day-item {
|
||||
top: 0;
|
||||
height: 100%;
|
||||
@@ -3804,6 +3647,60 @@ const handleAddSuccessor = (task: Task) => {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 小时视图日期项专用样式 */
|
||||
.timeline-day-item.hour-view-day {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
border-right: 1px solid var(--gantt-border-medium, #e1e4e8);
|
||||
background-color: var(--gantt-bg-secondary, #f6f8fa);
|
||||
}
|
||||
|
||||
.date-label {
|
||||
color: var(--gantt-text-header, #24292e);
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hours-row {
|
||||
min-height: 40px;
|
||||
border-bottom: 1px solid var(--gantt-border-light, #d1d5da);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.hour-label {
|
||||
color: var(--gantt-text-primary, #24292e);
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
line-height: 1.3;
|
||||
text-align: center;
|
||||
letter-spacing: 0px;
|
||||
}
|
||||
|
||||
/* 15分钟刻度线样式 */
|
||||
.quarter-hour-lines {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.quarter-line {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 1px;
|
||||
background-color: var(--gantt-border-light, #d1d5da);
|
||||
opacity: 0.5;
|
||||
}
|
||||
/**------------------------ */
|
||||
|
||||
.timeline-hour-item {
|
||||
top: 0;
|
||||
height: 100%;
|
||||
@@ -3814,6 +3711,16 @@ const handleAddSuccessor = (task: Task) => {
|
||||
min-height: 40px;
|
||||
transition: background-color 0.2s ease;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.timeline-hour-item.today {
|
||||
background-color: var(--gantt-primary);
|
||||
color: var(--gantt-text-white);
|
||||
}
|
||||
|
||||
.timeline-hour-item.today .hour-label {
|
||||
color: var(--gantt-text-white);
|
||||
}
|
||||
|
||||
/* 小时视图非工作时间样式 - 参考日视图周末样式 */
|
||||
@@ -3830,61 +3737,46 @@ const handleAddSuccessor = (task: Task) => {
|
||||
position: relative;
|
||||
min-width: 100%;
|
||||
min-height: 100px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.hour-column {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
border-right: 1px solid var(--gantt-border-light, #d1d5da);
|
||||
pointer-events: none;
|
||||
background-color: transparent;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.hour-column:hover {
|
||||
background-color: var(--gantt-hover-bg, rgba(0, 123, 255, 0.1));
|
||||
}
|
||||
.hour-columns-container {
|
||||
position: relative;
|
||||
display: flex;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
/* 小时视图header容器 */
|
||||
.hour-header-container {
|
||||
position: relative;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.date-row {
|
||||
min-height: 40px;
|
||||
border-bottom: 1px solid var(--gantt-border-light, #d1d5da);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hour-column {
|
||||
border-right: 1px solid var(--gantt-border-light, #e0e6ed);
|
||||
background-color: var(--gantt-bg-primary, #ffffff);
|
||||
transition: background-color 0.2s ease;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.hour-column:hover {
|
||||
background-color: var(--gantt-bg-hover, rgba(64, 158, 255, 0.05));
|
||||
.hour-column.weekend {
|
||||
background-color: var(--gantt-bg-secondary, #f5f7fa);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.hour-column.today {
|
||||
background-color: var(--gantt-primary-color, #f0f9ff);
|
||||
border-left: 2px solid var(--gantt-primary-color, #409eff);
|
||||
.hour-column.rest-hour {
|
||||
background-color: var(--gantt-bg-secondary, #f5f7fa);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.hour-column.working-hour {
|
||||
background-color: var(--gantt-bg-primary, #ffffff);
|
||||
}
|
||||
|
||||
.hour-column.today {
|
||||
background-color: var(--gantt-primary-color, #409eff);
|
||||
opacity: 0.2;
|
||||
border-left: 2px solid var(--gantt-primary-color, #409eff);
|
||||
}
|
||||
|
||||
.hour-column:hover {
|
||||
background-color: var(--gantt-bg-hover, rgba(64, 158, 255, 0.05));
|
||||
}
|
||||
|
||||
/* 小时视图暗色主题样式 */
|
||||
:global(html[data-theme='dark']) .date-row {
|
||||
background: var(--gantt-bg-secondary, #1a1a1a) !important;
|
||||
|
||||
Reference in New Issue
Block a user