style:样式修改
Showing
7 changed files
with
46 additions
and
18 deletions
| ... | @@ -38,7 +38,7 @@ | ... | @@ -38,7 +38,7 @@ |
| 38 | "babel-plugin-dynamic-import-node": "2.3.3", | 38 | "babel-plugin-dynamic-import-node": "2.3.3", |
| 39 | "chalk": "2.4.2", | 39 | "chalk": "2.4.2", |
| 40 | "connect": "3.6.6", | 40 | "connect": "3.6.6", |
| 41 | "element-ui": "^2.15.8", | 41 | "element-ui": "^2.15.13", |
| 42 | "html-webpack-plugin": "3.2.0", | 42 | "html-webpack-plugin": "3.2.0", |
| 43 | "runjs": "4.3.2", | 43 | "runjs": "4.3.2", |
| 44 | "sass-loader": "8.0.2", | 44 | "sass-loader": "8.0.2", | ... | ... |
| ... | @@ -149,7 +149,7 @@ export function getCurrentDate (date = 'firstDay') { | ... | @@ -149,7 +149,7 @@ export function getCurrentDate (date = 'firstDay') { |
| 149 | 149 | ||
| 150 | export function setExport2Excel (exportName) { | 150 | export function setExport2Excel (exportName) { |
| 151 | /* generate workbook object from table */ | 151 | /* generate workbook object from table */ |
| 152 | var wb = XLSX2.utils.table_to_sheet(document.querySelector("#mytable"));//mytable为表格的id名 | 152 | var wb = XLSX2.utils.table_to_sheet(document.querySelector("#mytable"), { raw: true });//mytable为表格的id名 |
| 153 | if (!wb['!merges']) { | 153 | if (!wb['!merges']) { |
| 154 | this.$message.warning('无法导出:报表无数据'); | 154 | this.$message.warning('无法导出:报表无数据'); |
| 155 | return | 155 | return | ... | ... |
| ... | @@ -18,3 +18,8 @@ | ... | @@ -18,3 +18,8 @@ |
| 18 | .export-excel-wrapper { | 18 | .export-excel-wrapper { |
| 19 | display: inline-block; | 19 | display: inline-block; |
| 20 | } | 20 | } |
| 21 | |||
| 22 | /deep/.el-table--group, | ||
| 23 | .el-table--border { | ||
| 24 | border: 1px solid #458ACF !important; | ||
| 25 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -87,7 +87,10 @@ class data extends filter { | ... | @@ -87,7 +87,10 @@ class data extends filter { |
| 87 | prop: 'failReportRatio24To48h', | 87 | prop: 'failReportRatio24To48h', |
| 88 | render: (h, scope) => { | 88 | render: (h, scope) => { |
| 89 | return ( | 89 | return ( |
| 90 | <span>{(scope.row.failReportRatio24To48h * 100).toFixed(2)}%</span> | 90 | <div> |
| 91 | <span>{(scope.row.failReportRatio24To48h * 100).toFixed(2)}</span> | ||
| 92 | % | ||
| 93 | </div> | ||
| 91 | ); | 94 | ); |
| 92 | }, | 95 | }, |
| 93 | } | 96 | } | ... | ... |
| ... | @@ -173,5 +173,9 @@ export default { | ... | @@ -173,5 +173,9 @@ export default { |
| 173 | // 引入表单整体样式 | 173 | // 引入表单整体样式 |
| 174 | // @import "~@/styles/public.scss"; | 174 | // @import "~@/styles/public.scss"; |
| 175 | @import "../css/index.scss"; | 175 | @import "../css/index.scss"; |
| 176 | |||
| 177 | /deep/th.el-table__cell { | ||
| 178 | height: 0 !important; | ||
| 179 | } | ||
| 176 | </style> | 180 | </style> |
| 177 | 181 | ... | ... |
| ... | @@ -14,13 +14,11 @@ class data extends filter { | ... | @@ -14,13 +14,11 @@ class data extends filter { |
| 14 | label: '分项', | 14 | label: '分项', |
| 15 | children: [ | 15 | children: [ |
| 16 | { | 16 | { |
| 17 | width:1 | ||
| 18 | }, | ||
| 19 | { | ||
| 20 | label: '国有建设用地使用权登记得分及空项率', | 17 | label: '国有建设用地使用权登记得分及空项率', |
| 21 | children: [ | 18 | children: [ |
| 22 | { | 19 | { |
| 23 | prop: 'gyjsydsyqRate', | 20 | prop: 'gyjsydsyqRate', |
| 21 | width: 150, | ||
| 24 | render: (h, scope) => { | 22 | render: (h, scope) => { |
| 25 | return ( | 23 | return ( |
| 26 | <span>{scope.row.gyjsydsyqRate.toFixed(2)}</span> | 24 | <span>{scope.row.gyjsydsyqRate.toFixed(2)}</span> |
| ... | @@ -29,6 +27,7 @@ class data extends filter { | ... | @@ -29,6 +27,7 @@ class data extends filter { |
| 29 | }, | 27 | }, |
| 30 | { | 28 | { |
| 31 | prop: 'gyjsydsyqRadio', | 29 | prop: 'gyjsydsyqRadio', |
| 30 | width: 150, | ||
| 32 | render: (h, scope) => { | 31 | render: (h, scope) => { |
| 33 | return ( | 32 | return ( |
| 34 | <span>{(scope.row.gyjsydsyqRadio * 100).toFixed(2)}%</span> | 33 | <span>{(scope.row.gyjsydsyqRadio * 100).toFixed(2)}%</span> | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Author: yangwei | 2 | * @Author: yangwei |
| 3 | * @Date: 2023-02-17 16:32:50 | 3 | * @Date: 2023-02-17 16:32:50 |
| 4 | * @LastEditors: yangwei | 4 | * @LastEditors: Please set LastEditors |
| 5 | * @LastEditTime: 2023-03-09 11:19:43 | 5 | * @LastEditTime: 2023-03-14 13:19:18 |
| 6 | * @FilePath: \bdcjg-web\src\views\statistics\registerBookQuality\index.vue | 6 | * @FilePath: \bdcjg-web\src\views\statistics\registerBookQuality\index.vue |
| 7 | * @Description: | 7 | * @Description: |
| 8 | * | 8 | * |
| ... | @@ -43,10 +43,11 @@ | ... | @@ -43,10 +43,11 @@ |
| 43 | </div> | 43 | </div> |
| 44 | <!-- 列表区域 --> | 44 | <!-- 列表区域 --> |
| 45 | <div class="from-clues-content"> | 45 | <div class="from-clues-content"> |
| 46 | <lb-table ref="table" :pagination="false" :header-cell-style="headerStyle" :column="tableData.columns" :data="tableData.data"> | 46 | <lb-table ref="table" :pagination="false" :border="true" :header-cell-style="headerStyle" |
| 47 | :column="tableData.columns" :data="tableData.data"> | ||
| 47 | </lb-table> | 48 | </lb-table> |
| 48 | <down-lb-table ref="table" v-show="false" :id="'mytable'" :downExcel="true" :pagination="false" | 49 | <down-lb-table ref="table" v-show="false" :id="'mytable'" :header-cell-style="headerStyle1" :downExcel="true" |
| 49 | :column="tableData.columns" :data="tableData.data" :downTitle="downTitle"> | 50 | :pagination="false" :column="tableData.columns" :data="tableData.data" :downTitle="downTitle"> |
| 50 | </down-lb-table> | 51 | </down-lb-table> |
| 51 | </div> | 52 | </div> |
| 52 | </div> | 53 | </div> |
| ... | @@ -138,6 +139,17 @@ export default { | ... | @@ -138,6 +139,17 @@ export default { |
| 138 | this.handleResetForm() | 139 | this.handleResetForm() |
| 139 | this.generateFileName() | 140 | this.generateFileName() |
| 140 | }, | 141 | }, |
| 142 | mounted () { | ||
| 143 | this.$nextTick(function () { | ||
| 144 | let c = document.getElementsByClassName("el-table__header") | ||
| 145 | let k = c[0].getElementsByClassName("is-group has-gutter"); | ||
| 146 | let f = k[0].children | ||
| 147 | let d = f[1].getElementsByClassName("el-table__cell") | ||
| 148 | let p = d[0] | ||
| 149 | p.setAttribute("rowspan", 2) | ||
| 150 | }) | ||
| 151 | |||
| 152 | }, | ||
| 141 | methods: { | 153 | methods: { |
| 142 | handleSearch () { }, | 154 | handleSearch () { }, |
| 143 | // 生成文件名 | 155 | // 生成文件名 |
| ... | @@ -150,15 +162,16 @@ export default { | ... | @@ -150,15 +162,16 @@ export default { |
| 150 | }, | 162 | }, |
| 151 | headerStyle ({ row, rowIndex }) { | 163 | headerStyle ({ row, rowIndex }) { |
| 152 | if (rowIndex == 1) { | 164 | if (rowIndex == 1) { |
| 153 | row[0].colSpan = 2 | 165 | row.forEach(item => { |
| 154 | row.forEach(item=>{ | 166 | item.rowSpan = 2 |
| 167 | }) | ||
| 168 | } | ||
| 169 | }, | ||
| 170 | headerStyle1 ({ row, rowIndex }) { | ||
| 171 | if (rowIndex == 2) { | ||
| 172 | row.forEach(item => { | ||
| 155 | item.rowSpan = 2 | 173 | item.rowSpan = 2 |
| 156 | }) | 174 | }) |
| 157 | // row[0].rowSpan = 2; | ||
| 158 | // row[1].rowSpan = 2; | ||
| 159 | // row[2].rowSpan = 2; | ||
| 160 | // row[3].rowSpan = 2; | ||
| 161 | // row[4].rowSpan = 2; | ||
| 162 | } | 175 | } |
| 163 | }, | 176 | }, |
| 164 | // 初始化数据 | 177 | // 初始化数据 |
| ... | @@ -181,5 +194,9 @@ export default { | ... | @@ -181,5 +194,9 @@ export default { |
| 181 | // 引入表单整体样式 | 194 | // 引入表单整体样式 |
| 182 | // @import "~@/styles/public.scss"; | 195 | // @import "~@/styles/public.scss"; |
| 183 | @import "../css/index.scss"; | 196 | @import "../css/index.scss"; |
| 197 | |||
| 198 | /deep/.el-table thead.is-group th.el-table__cell { | ||
| 199 | height: 14px !important; | ||
| 200 | } | ||
| 184 | </style> | 201 | </style> |
| 185 | 202 | ... | ... |
-
Please register or sign in to post a comment