diff --git a/src/views/sunVillage_info/entityReport/reportLineSummary.vue b/src/views/sunVillage_info/entityReport/reportLineSummary.vue index 408fe4ac..7d77f904 100644 --- a/src/views/sunVillage_info/entityReport/reportLineSummary.vue +++ b/src/views/sunVillage_info/entityReport/reportLineSummary.vue @@ -51,30 +51,29 @@
- - - + + + @@ -136,6 +135,11 @@ export default { rows: [], cells: [], rules: [], + headerRows: [], + headerLength: 0, + headerDeep: 0, + headerTypes: [], + header: null, }, templateList: [], loading: false, @@ -247,6 +251,11 @@ export default { rows: [], cells: [], rules: [], + headerRows: [], + headerLength: 0, + headerDeep: 0, + headerTypes: [], + header: null, }; }, parseQuery() { @@ -358,18 +367,19 @@ export default { border: 0.01rem solid #1989fa; table-layout: fixed; } - thead td { + th { text-align: center; border: 0.01rem solid #1989fa; - height: 1rem; + min-height: 1rem; font-size: 0.32rem; - padding: 0 0.4rem; + padding: 0.4rem 0.4rem; margin: 0; font-weight: bold; + min-width: 1rem; + /*max-width: 2rem;*/ white-space: nowrap; - /*max-width: 1.2rem;*/ } - tbody td { + td { font-size: 0.3rem; border: 0.01rem solid #1989fa; height: 1rem; @@ -380,6 +390,7 @@ export default { margin: 0; /*max-width: 1.5rem;*/ position: relative; + min-width: 1rem; } .input-field { diff --git a/src/views/sunVillage_info/entityReport/reportLineView.vue b/src/views/sunVillage_info/entityReport/reportLineView.vue index 3f59ae82..383109be 100644 --- a/src/views/sunVillage_info/entityReport/reportLineView.vue +++ b/src/views/sunVillage_info/entityReport/reportLineView.vue @@ -49,7 +49,7 @@
-
+
@@ -128,6 +128,12 @@ export default { rows: [], cells: [], rules: [], + headerRows: [], + headerLength: 0, + headerDeep: 0, + headerTypes: [], + header: null, + detailHeaders: [], }, templateList: [], loading: false, @@ -159,9 +165,13 @@ export default { this.loading = true; if(this.editorData.id) // 修改 { - getReport(this.editorData.id).then((resp) => { + getReport(this.editorData.id, { + genDetailHeaders: true + }).then((resp) => { let reportData = resp.data; - getReportTemplate(reportData.templateId).then((resp) => { + getReportTemplate(reportData.templateId, { + genDetailHeaders: true + }).then((resp) => { let templateData = resp.data; this.setTableData(templateData, reportData); }).finally(() => { @@ -173,7 +183,9 @@ export default { } else { - getReportTemplate(this.editorData.templateId).then((resp) => { + getReportTemplate(this.editorData.templateId, { + genDetailHeaders: true + }).then((resp) => { let templateData = resp.data; this.setTableData(templateData); }).finally(() => { @@ -197,6 +209,11 @@ export default { let cells = reportData.cells; data = reportData; data.headers = templateData.headers; + data.headerRows = templateData.headerRows; + data.headerTypes = templateData.headerTypes; + data.headerLength = templateData.headerLength; + data.headerDeep = templateData.headerDeep; + data.detailHeaders = templateData.detailHeaders; data.rows = templateData.rows; data.cells = templateData.cells; data.rules = templateData.rules; @@ -208,7 +225,7 @@ export default { cols.forEach((x) => { if(group[rowIndex] && group[rowIndex][x.colIndex]) { - if(templateData.headers[x.colIndex].type === '4') + if(templateData.headerTypes[x.colIndex] === '4') x.name = group[rowIndex][x.colIndex].name; x.val = group[rowIndex][x.colIndex].val; } @@ -297,6 +314,12 @@ export default { rows: [], cells: [], rules: [], + headerRows: [], + headerLength: 0, + headerDeep: 0, + headerTypes: [], + header: null, + detailHeaders: [], }; }, parseQuery() { diff --git a/src/views/sunVillage_info/entityReport/reportView.vue b/src/views/sunVillage_info/entityReport/reportView.vue index d7f48a31..7e7cfaa8 100644 --- a/src/views/sunVillage_info/entityReport/reportView.vue +++ b/src/views/sunVillage_info/entityReport/reportView.vue @@ -52,27 +52,26 @@
{{header.headerName}}
+ {{header.headerName}} +
-
+
-
+
-
{{col.name}}
+
{{col.name}}
- +
- - - + + + - + @@ -155,6 +154,11 @@ export default { rows: [], cells: [], rules: [], + headerRows: [], + headerLength: 0, + headerDeep: 0, + headerTypes: [], + header: null, }, templateList: [], loading: false, @@ -223,6 +227,10 @@ export default { let cells = reportData.cells; data = reportData; data.headers = templateData.headers; + data.headerRows = templateData.headerRows; + data.headerTypes = templateData.headerTypes; + data.headerLength = templateData.headerLength; + data.headerDeep = templateData.headerDeep; data.rows = templateData.rows; data.cells = templateData.cells; data.rules = templateData.rules; @@ -234,7 +242,7 @@ export default { cols.forEach((x) => { if(group[rowIndex] && group[rowIndex][x.colIndex]) { - if(templateData.headers[x.colIndex].type === '4') + if(templateData.headerTypes[x.colIndex] === '4') x.name = group[rowIndex][x.colIndex].name; x.val = group[rowIndex][x.colIndex].val; } @@ -347,16 +355,21 @@ export default { rows: [], cells: [], rules: [], + headerRows: [], + headerLength: 0, + headerDeep: 0, + headerTypes: [], + header: null, }; }, validate(showMsg) { if(!this.editorData.rules || !this.editorData.rules.length) return true; let errors = []; - for(let i in this.editorData.headers) + for(let i in this.editorData.headerTypes) { - let header = this.editorData.headers[i]; - if(header.type !== '2') + let type = this.editorData.headerTypes[i]; + if(type !== '2') continue; let map = {}; for(let m in this.editorData.rows) @@ -502,18 +515,19 @@ export default { border: 0.01rem solid #1989fa; table-layout: fixed; } - thead td { + th { text-align: center; border: 0.01rem solid #1989fa; - height: 1rem; + min-height: 1rem; font-size: 0.32rem; - padding: 0 0.4rem; + padding: 0.4rem 0.4rem; margin: 0; font-weight: bold; + min-width: 1rem; + /*max-width: 2rem;*/ white-space: nowrap; - /*max-width: 1.2rem;*/ } - tbody td { + td { font-size: 0.3rem; border: 0.01rem solid #1989fa; height: 1rem; @@ -524,6 +538,7 @@ export default { margin: 0; /*max-width: 1.5rem;*/ position: relative; + min-width: 1rem; } .input-field {
{{header.headerName}}
+ {{header.headerName}} +
-
+
-
+
-
{{col.name}}
+
{{col.name}}