Browse Source

refactor:数据统计显示

old
wangqing 5 years ago
parent
commit
9a96454859
  1. 22
      src/views/form/statistics.vue

22
src/views/form/statistics.vue

@ -26,19 +26,23 @@
<div class="result-table-view"> <div class="result-table-view">
<el-table <el-table
stripe stripe
header-cell-class-name="data-table-header"
:data="projectResultList"> :data="projectResultList">
<el-table-column <el-table-column
type="selection" type="selection"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column v-for="col in fixedCustomColumns" :key="`t${col}`" <el-table-column
:label="fixedDefaultLabelFormColumn[col]"> v-for="col in fixedCustomColumns" :key="`t${col}`"
:label="fixedDefaultLabelFormColumn[col]">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row[col] }} {{ scope.row[col] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-for="col in otherCustomColumns" :key="col" <el-table-column
:label="projectItemColumns[col]"> show-overflow-tooltip
v-for="col in otherCustomColumns" :key="col"
:label="projectItemColumns[col]">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row['processData'][col] }} {{ scope.row['processData'][col] }}
</template> </template>
@ -61,7 +65,7 @@
/> />
</div> </div>
</div> </div>
<div class="custom-col-container"> <div class="custom-col-container">
<el-dialog center title="自定义显示列" :visible.sync="customColumnDialogVisible"> <el-dialog center title="自定义显示列" :visible.sync="customColumnDialogVisible">
<el-row> <el-row>
<el-col :span="3"> <el-col :span="3">
@ -139,7 +143,8 @@ export default {
}, methods: { }, methods: {
renderHeader(h) { renderHeader(h) {
return ( return (
<i class="el-icon-setting" style="color:currentColor" onClick={() => this.customColumnDialogVisible = true}></i> <i class="el-icon-setting" style="color:currentColor"
onClick={() => this.customColumnDialogVisible = true}></i>
) )
}, },
queryProjectResult() { queryProjectResult() {
@ -226,4 +231,9 @@ export default {
line-height: 25px; line-height: 25px;
color: white; color: white;
} }
/deep/ .data-table-header .cell {
text-overflow: ellipsis !important;
white-space: nowrap !important;
}
</style> </style>

Loading…
Cancel
Save