feat(数据集):自定义数据集不能再制作自定义数据集

This commit is contained in:
junjie 2021-06-10 10:48:05 +08:00
parent 113d04b5a1
commit dd8e622958
5 changed files with 18 additions and 3 deletions

View File

@ -21,6 +21,12 @@
<if test="mode != null">
and mode = #{mode,jdbcType=INTEGER}
</if>
<if test="typeFilter != null">
and type in
<foreach collection="typeFilter" item="item" open="(" separator="," close=")">
#{item,jdbcType=INTEGER}
</foreach>
</if>
</where>
<if test="sort != null">
order by ${sort}

View File

@ -19,4 +19,5 @@ public class DataSetTableRequest extends DatasetTable {
private String userId;
private Integer editType;
private Boolean isRename;
private List<String> typeFilter;
}

View File

@ -176,6 +176,7 @@ public class DataSetTableService {
public List<DataSetTableDTO> list(DataSetTableRequest dataSetTableRequest) {
dataSetTableRequest.setUserId(String.valueOf(AuthUtils.getUser().getUserId()));
dataSetTableRequest.setTypeFilter(dataSetTableRequest.getTypeFilter());
return extDataSetTableMapper.search(dataSetTableRequest);
}

View File

@ -23,7 +23,7 @@
</el-row>
<el-col style="display: flex;flex-direction: row">
<el-col class="panel-height" style="width: 220px;border-right:solid 1px #dcdfe6;border-top:solid 1px #dcdfe6;padding-right: 15px;overflow-y: auto;">
<dataset-group-selector :table="table" :mode="1" :checked-list="checkedList" :union-data="unionData" @getTable="getTable" />
<dataset-group-selector :custom-type="customType" :table="table" :mode="1" :checked-list="checkedList" :union-data="unionData" @getTable="getTable" />
</el-col>
<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" />
@ -83,7 +83,8 @@ export default {
unionData: [],
height: 500,
data: [],
fields: []
fields: [],
customType: ['db', 'sql', 'excel']
}
},
watch: {

View File

@ -108,6 +108,11 @@ import { isKettleRunning, post } from '@/api/dataset/dataset'
export default {
name: 'DatasetGroupSelector',
props: {
customType: {
type: Array,
required: false,
default: null
},
mode: {
type: Number,
required: false,
@ -226,7 +231,8 @@ export default {
post('/dataset/table/list', {
sort: 'type asc,create_time desc,name asc',
sceneId: this.currGroup.id,
mode: this.mode < 0 ? null : this.mode
mode: this.mode < 0 ? null : this.mode,
typeFilter: this.customType ? this.customType : null
}, false).then(response => {
this.tables = response.data
for (let i = 0; i < this.tables.length; i++) {