diff --git a/src/views/mes/prepare/index.vue b/src/views/mes/prepare/index.vue index eb520ff..5a9e31c 100644 --- a/src/views/mes/prepare/index.vue +++ b/src/views/mes/prepare/index.vue @@ -226,14 +226,14 @@
-
+
@@ -256,22 +256,22 @@
+ border style="width: 100%;"> - - - - - + + + + + - - + +
@@ -310,7 +310,8 @@ export default { // components: {Detail}, data() { return { - fenyeNumber:13, + fenyeNumber:2, + fenyeNumberTwo:4, shengchan:true, newWorkerLoading: false, refreshNewWorkerTable:true, @@ -431,9 +432,11 @@ export default { header: params.header, // '表单', targetStyles: ['*'], style: ` - - body {margin: 5mm;padding: 0;} + + body {margin: 3mm;padding: 0;} .fy{page-break-after: always;} + table { border-collapse: collapse; } table, th, td { border: 2px solid black; } + .el-table .cell{padding-left:5px;padding-right:5px;} `, ignoreElements: params.ignore || [], // ['no-print'] properties: params.properties || null @@ -463,9 +466,9 @@ export default { let chunkedArray = []; // 遍历this.printData.workTable - for (let i = 0; i < this.printData.workTable.length; i += this.fenyeNumber) { + for (let i = 0; i < this.printData.workTable.length; i += (i==0?this.fenyeNumber:this.fenyeNumberTwo)) { // 使用slice方法从当前索引i开始切割,切割长度为10(如果剩余元素少于10,则切割剩余所有元素) - let chunk = this.printData.workTable.slice(i, i + this.fenyeNumber); + let chunk = this.printData.workTable.slice(i, i + (i==0?this.fenyeNumber:this.fenyeNumberTwo)); // 将切割后的数组添加到chunkedArray中 chunkedArray.push(chunk); } @@ -506,9 +509,9 @@ export default { let chunkedArray = []; // 遍历this.printData.workTable - for (let i = 0; i < this.printData.workTable.length; i += this.fenyeNumber) { + for (let i = 0; i < this.printData.workTable.length; i += (i==0?this.fenyeNumber:this.fenyeNumberTwo)) { // 使用slice方法从当前索引i开始切割,切割长度为10(如果剩余元素少于10,则切割剩余所有元素) - let chunk = this.printData.workTable.slice(i, i + this.fenyeNumber); + let chunk = this.printData.workTable.slice(i, i + (i==0?this.fenyeNumber:this.fenyeNumberTwo)); // 将切割后的数组添加到chunkedArray中 chunkedArray.push(chunk); } @@ -653,8 +656,25 @@ export default { };