|
@@ -263,13 +263,10 @@
|
|
|
v-for="day in calendarCells"
|
|
v-for="day in calendarCells"
|
|
|
:key="day.key"
|
|
:key="day.key"
|
|
|
:disabled="!day.date"
|
|
:disabled="!day.date"
|
|
|
- placement="auto"
|
|
|
|
|
|
|
+ placement="bottom-start"
|
|
|
effect="light"
|
|
effect="light"
|
|
|
popper-class="calendar-day-tooltip"
|
|
popper-class="calendar-day-tooltip"
|
|
|
- :popper-append-to-body="true"
|
|
|
|
|
- :popper-options="calendarTooltipPopperOptions"
|
|
|
|
|
- :manual="true"
|
|
|
|
|
- :value="activeCalendarTooltipKey === day.key"
|
|
|
|
|
|
|
+ :popper-append-to-body="false"
|
|
|
:open-delay="120"
|
|
:open-delay="120"
|
|
|
:hide-after="0"
|
|
:hide-after="0"
|
|
|
:enterable="false"
|
|
:enterable="false"
|
|
@@ -307,8 +304,6 @@
|
|
|
<div
|
|
<div
|
|
|
class="calendar-cell"
|
|
class="calendar-cell"
|
|
|
:class="getCalendarDayClass(day)"
|
|
:class="getCalendarDayClass(day)"
|
|
|
- @mouseenter="showCalendarTooltip(day)"
|
|
|
|
|
- @mouseleave="hideCalendarTooltip(day)"
|
|
|
|
|
@click="day.date && openCalendarDayDrawer(day)"
|
|
@click="day.date && openCalendarDayDrawer(day)"
|
|
|
>
|
|
>
|
|
|
<div v-if="day.date" class="day-head">
|
|
<div v-if="day.date" class="day-head">
|
|
@@ -549,19 +544,6 @@
|
|
|
hasMore: true,
|
|
hasMore: true,
|
|
|
portals: [],
|
|
portals: [],
|
|
|
selectedCalendarType: 1,
|
|
selectedCalendarType: 1,
|
|
|
- activeCalendarTooltipKey: '',
|
|
|
|
|
- calendarTooltipPopperOptions: {
|
|
|
|
|
- modifiers: {
|
|
|
|
|
- preventOverflow: {
|
|
|
|
|
- boundariesElement: 'viewport',
|
|
|
|
|
- padding: 12
|
|
|
|
|
- },
|
|
|
|
|
- flip: {
|
|
|
|
|
- boundariesElement: 'viewport',
|
|
|
|
|
- padding: 12
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
calendarTypeOptions: [
|
|
calendarTypeOptions: [
|
|
|
{ label: '标准生产日历', shortLabel: '标准生产', value: 1 },
|
|
{ label: '标准生产日历', shortLabel: '标准生产', value: 1 },
|
|
|
{ label: '设备维护日历', shortLabel: '设备维护', value: 2 },
|
|
{ label: '设备维护日历', shortLabel: '设备维护', value: 2 },
|
|
@@ -819,21 +801,10 @@
|
|
|
console.log('day~~~', day);
|
|
console.log('day~~~', day);
|
|
|
this.selectedScheduleDate = day;
|
|
this.selectedScheduleDate = day;
|
|
|
},
|
|
},
|
|
|
- showCalendarTooltip(day) {
|
|
|
|
|
- if (day.date) {
|
|
|
|
|
- this.activeCalendarTooltipKey = day.key;
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- hideCalendarTooltip(day) {
|
|
|
|
|
- if (!day || this.activeCalendarTooltipKey === day.key) {
|
|
|
|
|
- this.activeCalendarTooltipKey = '';
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
openCalendarDayDrawer(day) {
|
|
openCalendarDayDrawer(day) {
|
|
|
if (!day || !day.date) {
|
|
if (!day || !day.date) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- this.hideCalendarTooltip(day);
|
|
|
|
|
this.handleDateClick(day.date);
|
|
this.handleDateClick(day.date);
|
|
|
this.currentDay = {
|
|
this.currentDay = {
|
|
|
...day,
|
|
...day,
|
|
@@ -2867,97 +2838,3 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
|
-
|
|
|
|
|
-<style lang="scss">
|
|
|
|
|
- body .calendar-day-tooltip {
|
|
|
|
|
- max-width: min(360px, calc(100vw - 32px));
|
|
|
|
|
- max-height: calc(100vh - 32px);
|
|
|
|
|
- padding: 0;
|
|
|
|
|
- border: 1px solid #d8e6f7;
|
|
|
|
|
- border-radius: 8px;
|
|
|
|
|
- box-shadow: 0 16px 36px rgba(31, 45, 61, 0.18);
|
|
|
|
|
- overflow: auto;
|
|
|
|
|
-
|
|
|
|
|
- .popper__arrow {
|
|
|
|
|
- border-top-color: #d8e6f7 !important;
|
|
|
|
|
- border-bottom-color: #d8e6f7 !important;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- body .calendar-day-tooltip .calendar-tooltip-content {
|
|
|
|
|
- min-width: 270px;
|
|
|
|
|
- max-width: 340px;
|
|
|
|
|
- padding: 12px 14px;
|
|
|
|
|
- color: #303133;
|
|
|
|
|
- background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
|
|
|
|
|
- border-radius: 8px;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- body .calendar-day-tooltip .tooltip-head {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- gap: 12px;
|
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
- padding-bottom: 8px;
|
|
|
|
|
- border-bottom: 1px solid #e6eef8;
|
|
|
|
|
-
|
|
|
|
|
- strong {
|
|
|
|
|
- color: #1f3d66;
|
|
|
|
|
- font-size: 15px;
|
|
|
|
|
- line-height: 20px;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- span {
|
|
|
|
|
- height: 20px;
|
|
|
|
|
- padding: 0 8px;
|
|
|
|
|
- border-radius: 10px;
|
|
|
|
|
- background: #fff1f0;
|
|
|
|
|
- color: #f5222d;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
- line-height: 20px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- body .calendar-day-tooltip .tooltip-row {
|
|
|
|
|
- display: grid;
|
|
|
|
|
- grid-template-columns: 72px minmax(0, 1fr);
|
|
|
|
|
- gap: 10px;
|
|
|
|
|
- align-items: start;
|
|
|
|
|
- margin-top: 7px;
|
|
|
|
|
- padding: 6px 8px;
|
|
|
|
|
- border-radius: 6px;
|
|
|
|
|
- background: rgba(236, 246, 255, 0.68);
|
|
|
|
|
- font-size: 13px;
|
|
|
|
|
- line-height: 20px;
|
|
|
|
|
-
|
|
|
|
|
- span {
|
|
|
|
|
- color: #7b8794;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- strong {
|
|
|
|
|
- color: #2f3a4a;
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- word-break: break-word;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- body .calendar-day-tooltip .tooltip-stats {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
- gap: 8px;
|
|
|
|
|
- margin-top: 12px;
|
|
|
|
|
-
|
|
|
|
|
- span {
|
|
|
|
|
- padding: 3px 9px;
|
|
|
|
|
- border-radius: 12px;
|
|
|
|
|
- background: #edf5ff;
|
|
|
|
|
- color: #1f66c2;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- font-weight: 700;
|
|
|
|
|
- line-height: 18px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-</style>
|
|
|