forked from github/dataease
feat(数据集):自助数据集 优化
This commit is contained in:
parent
7edaa48a7d
commit
7a5037068e
@ -354,7 +354,7 @@ public class DataSetTableService {
|
||||
DataTableInfoDTO dataTableInfoDTO = new Gson().fromJson(dataSetTableRequest.getInfo(), DataTableInfoDTO.class);
|
||||
List<DataSetTableUnionDTO> list = dataSetTableUnionService.listByTableId(dataTableInfoDTO.getList().get(0).getTableId());
|
||||
|
||||
datasourceRequest.setQuery(getCustomSQL(dataTableInfoDTO, list));
|
||||
datasourceRequest.setQuery("SELECT * FROM (" + getCustomSQL(dataTableInfoDTO, list) + ") AS tmp LIMIT 0,1000");
|
||||
Map<String, List> result = jdbcProvider.fetchResultAndField(datasourceRequest);
|
||||
List<String[]> data = result.get("dataList");
|
||||
List<TableFiled> fields = result.get("fieldList");
|
||||
|
@ -28,7 +28,11 @@
|
||||
<el-col class="panel-height" style="width: 235px;border-top:solid 1px #dcdfe6;padding: 0 15px;overflow-y: auto;">
|
||||
<dataset-custom-field :table="table" :checked-list="checkedList" @getChecked="getChecked" />
|
||||
</el-col>
|
||||
<el-col class="panel-height" style="flex: 1;overflow: scroll;">
|
||||
<el-col class="panel-height" style="flex: 1;overflow: hidden;">
|
||||
<el-card class="box-card dataPreview" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{ $t('dataset.data_preview') }}</span>
|
||||
</div>
|
||||
<ux-grid
|
||||
ref="plxTable"
|
||||
size="mini"
|
||||
@ -46,6 +50,12 @@
|
||||
:resizable="true"
|
||||
/>
|
||||
</ux-grid>
|
||||
<span class="table-count">
|
||||
{{ $t('dataset.preview_show') }}
|
||||
<span class="span-number">1000</span>
|
||||
{{ $t('dataset.preview_item') }}
|
||||
</span>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-col>
|
||||
@ -101,7 +111,7 @@ export default {
|
||||
const that = this
|
||||
setTimeout(function() {
|
||||
const currentHeight = document.documentElement.clientHeight
|
||||
that.height = currentHeight - 56 - 15 - 26 - 25 - 43 - 15
|
||||
that.height = currentHeight - 56 - 15 - 26 - 25 - 43 - 16 - 37 - 20 - 10
|
||||
}, 10)
|
||||
},
|
||||
|
||||
@ -207,6 +217,14 @@ export default {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.dataPreview>>>.el-card__header{
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
.dataPreview>>>.el-card__body{
|
||||
padding:10px;
|
||||
}
|
||||
|
||||
span{
|
||||
font-size: 14px;
|
||||
}
|
||||
@ -214,4 +232,11 @@ export default {
|
||||
.panel-height{
|
||||
height: calc(100vh - 56px - 15px - 26px - 25px - 43px);
|
||||
}
|
||||
|
||||
.span-number{
|
||||
color: #f18126;
|
||||
}
|
||||
.table-count{
|
||||
color: #606266;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user