|
|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
- <div id="bottom1">
|
|
|
+ <div id="bottom2">
|
|
|
<div class="up">
|
|
|
<div class="bg-color-black">
|
|
|
<div class="d-flex pt-1 pl-2 pb-2 jc-center">
|
|
|
<span class="fs-xxl text mx-2 fw-b">订单执行进度</span>
|
|
|
</div>
|
|
|
- <div class="body-box">
|
|
|
+ <div class="body-box" ref="bodyBox">
|
|
|
<dv-scroll-board
|
|
|
:config="config"
|
|
|
ref="scroll-board"
|
|
|
@@ -26,7 +26,7 @@ export default {
|
|
|
header: ['单号','业务员','产品编号','产品名称', '订单数','裁切','打点','SMT','无尘1','无尘2','组装1','组装2','样品','丝印','包装'],
|
|
|
data: [],
|
|
|
rowNum: 14,
|
|
|
- headerHeight: 45, // 增大表头高度
|
|
|
+ headerHeight: 45,
|
|
|
headerBGC: 'rgba(15,19,37,0.27)',
|
|
|
oddRowBGC: 'rgba(15,19,37,0.6)',
|
|
|
evenRowBGC: 'rgba(23,28,51,0.51)',
|
|
|
@@ -34,17 +34,24 @@ export default {
|
|
|
align: ['center','center','center','center','center','center','center','center','center','center','center','center','center','center','center'],
|
|
|
index: false,
|
|
|
carousel: 'single',
|
|
|
- hoverPause: true
|
|
|
+ hoverPause: true,
|
|
|
+ // 添加等待时间确保高度计算正确
|
|
|
+ waitTime: 500
|
|
|
},
|
|
|
timing: null,
|
|
|
- componentKey: 0 // 用于强制重新渲染
|
|
|
+ componentKey: 0
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.refreshdata();
|
|
|
+ this.resizeHandler();
|
|
|
+ window.addEventListener('resize', this.resizeHandler);
|
|
|
},
|
|
|
activated() {
|
|
|
- this.componentKey += 1; // 页面切换时强制重新渲染
|
|
|
+ this.componentKey += 1;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.resizeHandler();
|
|
|
+ });
|
|
|
this.refreshdata();
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
@@ -52,8 +59,21 @@ export default {
|
|
|
if (this.$refs['scroll-board'] && this.$refs['scroll-board'].destroy) {
|
|
|
this.$refs['scroll-board'].destroy();
|
|
|
}
|
|
|
+ window.removeEventListener('resize', this.resizeHandler);
|
|
|
},
|
|
|
methods: {
|
|
|
+ resizeHandler() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.bodyBox) {
|
|
|
+ const height = this.$refs.bodyBox.clientHeight - 40; // 减去一些边距
|
|
|
+ this.config = {
|
|
|
+ ...this.config,
|
|
|
+ height: height + 'px'
|
|
|
+ };
|
|
|
+ this.componentKey += 1; // 强制重新渲染以应用新高度
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
refreshdata() {
|
|
|
this.getdata();
|
|
|
this.timing = setInterval(() => {
|
|
|
@@ -72,14 +92,12 @@ export default {
|
|
|
const item = [];
|
|
|
const baseClass = 'cell-text';
|
|
|
|
|
|
- // 前5列使用黄色
|
|
|
item.push(`<span class="${baseClass} colorY">${element.v_salecode}</span>`);
|
|
|
item.push(`<span class="${baseClass} colorY">${element.sa_seller}</span>`);
|
|
|
item.push(`<span class="${baseClass} colorY">${element.v_prodcode}</span>`);
|
|
|
item.push(`<span class="${baseClass} colorY">${element.v_prdetail}</span>`);
|
|
|
item.push(`<span class="${baseClass} colorY">${element.v_qty}</span>`);
|
|
|
|
|
|
- // 处理各工序状态
|
|
|
const processes = ['裁切', '打点', 'smt', '无尘01', '无尘02', '组装01', '组装02', '样品', '丝印', '包装'];
|
|
|
processes.forEach(process => {
|
|
|
const val = element[process];
|
|
|
@@ -116,17 +134,21 @@ export default {
|
|
|
$box-height: 950px;
|
|
|
$box-width: 100%;
|
|
|
|
|
|
-#bottom1 {
|
|
|
+#bottom2 {
|
|
|
padding: 10px;
|
|
|
height: $box-height;
|
|
|
width: $box-width;
|
|
|
border-radius: 5px;
|
|
|
|
|
|
.up {
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
.bg-color-black {
|
|
|
border-radius: 10px;
|
|
|
- height: 920px;
|
|
|
+ height: 100%;
|
|
|
padding: 5px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
}
|
|
|
|
|
|
.text {
|
|
|
@@ -135,9 +157,11 @@ $box-width: 100%;
|
|
|
}
|
|
|
|
|
|
.body-box {
|
|
|
+ flex: 1;
|
|
|
width: $box-width;
|
|
|
- height: 900px;
|
|
|
+ height: $box-height; // 修复flex布局中的高度问题
|
|
|
overflow: hidden;
|
|
|
+ position: relative;
|
|
|
|
|
|
.dv-scroll-board {
|
|
|
width: 100% !important;
|
|
|
@@ -147,14 +171,14 @@ $box-width: 100%;
|
|
|
font-size: 20px !important;
|
|
|
|
|
|
.header-item {
|
|
|
- line-height: 45px !important; // 与headerHeight一致
|
|
|
+ line-height: 45px !important;
|
|
|
padding: 0 5px !important;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.rows {
|
|
|
.row-item {
|
|
|
- line-height: 45px !important; // 统一行高
|
|
|
+ line-height: 45px !important;
|
|
|
margin: 0 !important;
|
|
|
padding: 0 !important;
|
|
|
|