|
@@ -240,7 +240,12 @@
|
|
|
</thead>
|
|
</thead>
|
|
|
</table>
|
|
</table>
|
|
|
|
|
|
|
|
- <div class="fp-scroll-body">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ ref="planScrollBody"
|
|
|
|
|
+ class="fp-scroll-body"
|
|
|
|
|
+ @mouseenter="stopPlanAutoScroll"
|
|
|
|
|
+ @mouseleave="startPlanAutoScroll"
|
|
|
|
|
+ >
|
|
|
<table class="fp-main-table">
|
|
<table class="fp-main-table">
|
|
|
<colgroup>
|
|
<colgroup>
|
|
|
<col style="width: 11%" />
|
|
<col style="width: 11%" />
|
|
@@ -511,6 +516,11 @@
|
|
|
},
|
|
},
|
|
|
activeInventoryFilter() {
|
|
activeInventoryFilter() {
|
|
|
this.fetchInventoryData();
|
|
this.fetchInventoryData();
|
|
|
|
|
+ },
|
|
|
|
|
+ filteredPlanRows() {
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.restartPlanAutoScroll();
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
@@ -520,6 +530,7 @@
|
|
|
_initLayout: false,
|
|
_initLayout: false,
|
|
|
resizeTimer: null,
|
|
resizeTimer: null,
|
|
|
updateTimer: null,
|
|
updateTimer: null,
|
|
|
|
|
+ planAutoScrollTimer: null,
|
|
|
date: '',
|
|
date: '',
|
|
|
time: '',
|
|
time: '',
|
|
|
week: '',
|
|
week: '',
|
|
@@ -602,11 +613,13 @@
|
|
|
);
|
|
);
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.isFlag = true;
|
|
this.isFlag = true;
|
|
|
|
|
+ this.startPlanAutoScroll();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
|
clearInterval(this.updateTimer);
|
|
clearInterval(this.updateTimer);
|
|
|
clearTimeout(this.resizeTimer);
|
|
clearTimeout(this.resizeTimer);
|
|
|
|
|
+ this.stopPlanAutoScroll();
|
|
|
window.removeEventListener('resize', this.handleWindowResize);
|
|
window.removeEventListener('resize', this.handleWindowResize);
|
|
|
document.removeEventListener(
|
|
document.removeEventListener(
|
|
|
'fullscreenchange',
|
|
'fullscreenchange',
|
|
@@ -631,6 +644,34 @@
|
|
|
const isOverflowing = el.scrollWidth > el.clientWidth;
|
|
const isOverflowing = el.scrollWidth > el.clientWidth;
|
|
|
el.title = isOverflowing ? text : '';
|
|
el.title = isOverflowing ? text : '';
|
|
|
},
|
|
},
|
|
|
|
|
+ restartPlanAutoScroll() {
|
|
|
|
|
+ this.stopPlanAutoScroll();
|
|
|
|
|
+ this.startPlanAutoScroll();
|
|
|
|
|
+ },
|
|
|
|
|
+ startPlanAutoScroll() {
|
|
|
|
|
+ this.stopPlanAutoScroll();
|
|
|
|
|
+ const scrollBody = this.$refs.planScrollBody;
|
|
|
|
|
+ if (!scrollBody) return;
|
|
|
|
|
+ if (scrollBody.scrollHeight <= scrollBody.clientHeight + 2) {
|
|
|
|
|
+ scrollBody.scrollTop = 0;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.planAutoScrollTimer = setInterval(() => {
|
|
|
|
|
+ const maxScrollTop = scrollBody.scrollHeight - scrollBody.clientHeight;
|
|
|
|
|
+ if (maxScrollTop <= 0) return;
|
|
|
|
|
+ if (scrollBody.scrollTop >= maxScrollTop - 1) {
|
|
|
|
|
+ scrollBody.scrollTop = 0;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ scrollBody.scrollTop += 1;
|
|
|
|
|
+ }, 40);
|
|
|
|
|
+ },
|
|
|
|
|
+ stopPlanAutoScroll() {
|
|
|
|
|
+ if (this.planAutoScrollTimer) {
|
|
|
|
|
+ clearInterval(this.planAutoScrollTimer);
|
|
|
|
|
+ this.planAutoScrollTimer = null;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
handleFullscreenChange() {
|
|
handleFullscreenChange() {
|
|
|
this.isFlag = false;
|
|
this.isFlag = false;
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|