From c35def30146d5d918aafe0fb001a307c041ead4f Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Tue, 18 Mar 2025 17:42:39 +0800
Subject: [PATCH] init
---
.../BatchData/components/ShowBatchData.vue | 76 ++++++++++++++++++-
1 file changed, 75 insertions(+), 1 deletion(-)
diff --git a/src/views/BatchData/components/ShowBatchData.vue b/src/views/BatchData/components/ShowBatchData.vue
index b603805..1149dab 100644
--- a/src/views/BatchData/components/ShowBatchData.vue
+++ b/src/views/BatchData/components/ShowBatchData.vue
@@ -8,6 +8,12 @@
append-to-body
@close="$emit('update:isShow', false)"
>
+
+
+
{{ $route.meta.title }}
+
+
+
{{ detail.aspiration ? detail.aspiration.title : '' }}
@@ -27,7 +33,11 @@
-
+
+
+ {{ row.batchSubs.hasOwnProperty("notShowSpecialtyObey") ? "-" : (row.batchSubs.specialtyObey ? "是" : "否") }}
+
+
@@ -63,6 +73,14 @@ export default {
},
},
methods: {
+ exportTable() {
+ const $table = this.$refs.table
+ if ($table) {
+ $table.exportData({
+ type: 'xlsx'
+ })
+ }
+ },
formatData(arr) {
const transformedArray = [];
arr.forEach(batch => {
@@ -135,6 +153,8 @@ export default {
mergeCells() {
let mergeCells = [];
let c1rowspan = 1;
+ let c2rowspan = 1;
+ let c3rowspan = 1;
for (let i = 1; i < this.list.length; i++) {
const item = this.list[i];
@@ -154,6 +174,54 @@ export default {
row: i - (c1rowspan - 1), col: 0, rowspan: c1rowspan, colspan: 1
});
}
+
+ if (item.batchSubs.batchSubId === prevItem.batchSubs.batchSubId) {
+ c2rowspan++;
+ } else {
+ mergeCells.push({
+ row: i - c2rowspan, col: 1, rowspan: c2rowspan, colspan: 1
+ });
+ c2rowspan = 1;
+ }
+
+ if (i === this.list.length - 1 && item.batchSubs.batchSubId === prevItem.batchSubs.batchSubId) {
+ mergeCells.push({
+ row: i - (c2rowspan - 1), col: 1, rowspan: c2rowspan, colspan: 1
+ });
+ }
+
+ if (item.batchSubs.batchSubSchools.batchSubSchoolId === prevItem.batchSubs.batchSubSchools.batchSubSchoolId) {
+ c3rowspan++;
+ } else {
+ mergeCells.push({
+ row: i - c3rowspan, col: 2, rowspan: c3rowspan, colspan: 1
+ });
+ mergeCells.push({
+ row: i - c3rowspan, col: 3, rowspan: c3rowspan, colspan: 1
+ });
+ mergeCells.push({
+ row: i - c3rowspan, col: 4, rowspan: c3rowspan, colspan: 1
+ });
+ mergeCells.push({
+ row: i - c3rowspan, col: 8, rowspan: c3rowspan, colspan: 1
+ });
+ c3rowspan = 1;
+ }
+
+ if (i === this.list.length - 1 && item.batchSubs.batchSubSchools.batchSubSchoolId === prevItem.batchSubs.batchSubSchools.batchSubSchoolId) {
+ mergeCells.push({
+ row: i - (c3rowspan - 1), col: 2, rowspan: c3rowspan, colspan: 1
+ });
+ mergeCells.push({
+ row: i - (c3rowspan - 1), col: 3, rowspan: c3rowspan, colspan: 1
+ });
+ mergeCells.push({
+ row: i - (c3rowspan - 1), col: 4, rowspan: c3rowspan, colspan: 1
+ });
+ mergeCells.push({
+ row: i - (c3rowspan - 1), col: 8, rowspan: c3rowspan, colspan: 1
+ });
+ }
}
console.log(mergeCells);
@@ -176,4 +244,10 @@ export default {
.title {
text-align: center;
}
+.title-panel {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding-right: 2vw;
+}