Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da2817436b | ||
|
|
e53ee284f0 | ||
|
|
66f4ccf027 | ||
|
|
a2d5752d2d | ||
|
|
023e247c3c | ||
|
|
5f8eeb613c | ||
|
|
cef39c48ea | ||
|
|
5e3c06dc06 | ||
|
|
9b6e054747 | ||
|
|
c18dcd7ab8 | ||
|
|
8b38303a08 | ||
|
|
9883b214ac | ||
|
|
e8adea94c8 | ||
|
|
785a72b94b | ||
|
|
58cb969aca | ||
|
|
63710fb5bf | ||
|
|
755d3cdba3 | ||
|
|
242b975186 | ||
|
|
9faed37970 | ||
|
|
c4e46f653a | ||
|
|
747dd55358 |
@ -2577,6 +2577,7 @@ public class DataSetTableService {
|
||||
stringBuilder.append(SubstitutedSql);
|
||||
return;
|
||||
}
|
||||
inExpression.getLeftExpression().accept(this);
|
||||
if (inExpression.isNot()) {
|
||||
getBuffer().append(" " + " NOT IN " + " ");
|
||||
} else {
|
||||
|
||||
@ -132,6 +132,13 @@ export default {
|
||||
return this.index > 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
index(val, old) {
|
||||
if (val !== old) {
|
||||
this.sortChange('none')
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
created() {
|
||||
|
||||
@ -113,7 +113,9 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
bus.$on('onScroll', this.onScroll)
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
if (this.inDraw) {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
bus.$off('onScroll', this.onScroll)
|
||||
|
||||
@ -71,7 +71,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
if (this.inDraw) {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
bus.$off('reset-default-value', this.resetDefaultValue)
|
||||
|
||||
@ -104,7 +104,9 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
if (this.inDraw) {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
bus.$off('reset-default-value', this.resetDefaultValue)
|
||||
|
||||
@ -190,7 +190,9 @@ export default {
|
||||
|
||||
mounted() {
|
||||
bus.$on('onScroll', this.onScroll)
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
if (this.inDraw) {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
bus.$off('onScroll', this.onScroll)
|
||||
|
||||
@ -200,7 +200,9 @@ export default {
|
||||
this.initLoad()
|
||||
},
|
||||
mounted() {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
if (this.inDraw) {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
bus.$off('reset-default-value', this.resetDefaultValue)
|
||||
|
||||
@ -203,7 +203,9 @@ export default {
|
||||
this.initLoad()
|
||||
},
|
||||
mounted() {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
if (this.inDraw) {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
bus.$off('reset-default-value', this.resetDefaultValue)
|
||||
@ -396,8 +398,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.el-input-group--append {
|
||||
.el-input__inner {
|
||||
background: var(--BgSelectTreeColor, #FFFFFF) !important;
|
||||
|
||||
@ -181,7 +181,7 @@
|
||||
|
||||
<de-main-container class="ms-main-container">
|
||||
<div v-if="currentElement.options && currentElement.options.attrs">
|
||||
<filter-head :element="currentElement" :all-fields="allFields" :widget="widget" />
|
||||
<filter-head :element="currentElement" :table-fields-map="tableFieldsMap" :widget="widget" />
|
||||
|
||||
<filter-control :element="currentElement" :widget="widget" :control-attrs="myAttrs" :child-views="childViews" />
|
||||
|
||||
@ -297,7 +297,7 @@ export default {
|
||||
datasetParams: []
|
||||
},
|
||||
currentElement: null,
|
||||
allFields: [],
|
||||
tableFieldsMap: {},
|
||||
tempTreeDatas: null,
|
||||
showTips: false
|
||||
}
|
||||
@ -632,7 +632,7 @@ export default {
|
||||
loadField(tableId) {
|
||||
fieldListWithPermission(tableId).then(res => {
|
||||
let datas = res.data
|
||||
this.allFields = JSON.parse(JSON.stringify(datas))
|
||||
this.$set(this.tableFieldsMap, tableId, JSON.parse(JSON.stringify(datas)))
|
||||
if (this.widget && this.widget.filterFieldMethod) {
|
||||
datas = this.widget.filterFieldMethod(datas)
|
||||
}
|
||||
@ -643,7 +643,7 @@ export default {
|
||||
comLoadField(tableId) {
|
||||
fieldListWithPermission(tableId).then(res => {
|
||||
let datas = res.data
|
||||
this.allFields = JSON.parse(JSON.stringify(datas))
|
||||
this.$set(this.tableFieldsMap, tableId, JSON.parse(JSON.stringify(datas)))
|
||||
if (this.widget && this.widget.filterFieldMethod) {
|
||||
datas = this.widget.filterFieldMethod(datas)
|
||||
}
|
||||
@ -675,6 +675,7 @@ export default {
|
||||
onMove(e, originalEvent) {
|
||||
this.showTips = false
|
||||
this.moveId = e.draggedContext.element.id
|
||||
if (this.isTree) return true
|
||||
const tabelId = e.draggedContext.element.tableId
|
||||
const prohibit = this.currentElement.options.attrs.dragItems.some(item => item.tableId === tabelId)
|
||||
if (prohibit) {
|
||||
|
||||
@ -18,8 +18,7 @@
|
||||
>
|
||||
|
||||
<v-flex v-for="(item,index) in element.options.attrs.dragItems" :key="item.id">
|
||||
|
||||
<drag-item :key="item.id" :is-sort-widget="isSortWidget" :item="item" :index="index" :sort="element.options.attrs.sort" :all-fields="index ? [] : allFields" @closeItem="closeItem" @sort-change="sortChange" />
|
||||
<drag-item :key="item.id" :is-sort-widget="isSortWidget" :item="item" :index="index" :sort="element.options.attrs.sort" :all-fields="index ? [] : fieldsMap[item.tableId]" @closeItem="closeItem" @sort-change="sortChange" />
|
||||
</v-flex>
|
||||
|
||||
<span solt="footer">{{ $t('panel.drag_here') }}</span>
|
||||
@ -46,9 +45,9 @@ export default {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
allFields: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
tableFieldsMap: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
},
|
||||
widget: {
|
||||
type: Object,
|
||||
@ -63,6 +62,9 @@ export default {
|
||||
computed: {
|
||||
isSortWidget() {
|
||||
return this.widget && this.widget.isSortWidget && this.widget.isSortWidget()
|
||||
},
|
||||
fieldsMap() {
|
||||
return JSON.parse(JSON.stringify(this.tableFieldsMap))
|
||||
}
|
||||
},
|
||||
|
||||
@ -74,7 +76,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
onMove(e, originalEvent) {
|
||||
// this.moveId = e.draggedContext.element.id
|
||||
return true
|
||||
},
|
||||
end2(e) {},
|
||||
@ -88,7 +89,6 @@ export default {
|
||||
},
|
||||
sortChange(param) {
|
||||
this.element.options.attrs.sort = param
|
||||
// this.$emit('sort-change', param)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -340,54 +340,85 @@ export default {
|
||||
}
|
||||
let repeat = false
|
||||
const repeatDsName = []
|
||||
this.tData.forEach(item => {
|
||||
if (item.id === this.form.type) {
|
||||
item.children.forEach(child => {
|
||||
if (this.formType === 'modify' && child.id === this.form.id) {
|
||||
return
|
||||
}
|
||||
const configuration = JSON.parse(child.configuration)
|
||||
if (!configuration) {
|
||||
return
|
||||
}
|
||||
switch (this.form.type) {
|
||||
case 'mysql':
|
||||
case 'TiDB':
|
||||
case 'StarRocks':
|
||||
case 'hive':
|
||||
case 'mariadb':
|
||||
case 'ds_doris':
|
||||
case 'ck':
|
||||
case 'mongo':
|
||||
case 'mariadb':
|
||||
case 'impala':
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port) {
|
||||
repeat = true
|
||||
repeatDsName.push(child.name)
|
||||
}
|
||||
break
|
||||
case 'pg':
|
||||
case 'sqlServer':
|
||||
case 'redshift':
|
||||
case 'oracle':
|
||||
case 'db2':
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port && configuration.schema == this.form.configuration.schema) {
|
||||
repeatDsName.push(child.name)
|
||||
repeat = true
|
||||
}
|
||||
break
|
||||
case 'es':
|
||||
if (configuration.url == this.form.configuration.url) {
|
||||
repeatDsName.push(child.name)
|
||||
repeat = true
|
||||
}
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
if(!this.datasourceType.isPlugin){
|
||||
this.tData.forEach(item => {
|
||||
if (item.id === this.form.type) {
|
||||
item.children.forEach(child => {
|
||||
if (this.formType === 'modify' && child.id === this.form.id) {
|
||||
return
|
||||
}
|
||||
const configuration = JSON.parse(child.configuration)
|
||||
if (!configuration) {
|
||||
return
|
||||
}
|
||||
switch (this.form.type) {
|
||||
case 'mysql':
|
||||
case 'TiDB':
|
||||
case 'StarRocks':
|
||||
case 'hive':
|
||||
case 'mariadb':
|
||||
case 'ds_doris':
|
||||
case 'ck':
|
||||
case 'mongo':
|
||||
case 'mariadb':
|
||||
case 'impala':
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port) {
|
||||
repeat = true
|
||||
repeatDsName.push(child.name)
|
||||
}
|
||||
break
|
||||
case 'pg':
|
||||
case 'sqlServer':
|
||||
case 'redshift':
|
||||
case 'oracle':
|
||||
case 'db2':
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port && configuration.schema == this.form.configuration.schema) {
|
||||
repeatDsName.push(child.name)
|
||||
repeat = true
|
||||
}
|
||||
break
|
||||
case 'es':
|
||||
if (configuration.url == this.form.configuration.url) {
|
||||
repeatDsName.push(child.name)
|
||||
repeat = true
|
||||
}
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}else {
|
||||
if( this.datasourceType.isJdbc){
|
||||
this.tData.forEach(item => {
|
||||
if (item.id === this.form.type) {
|
||||
item.children.forEach(child => {
|
||||
if (this.formType === 'modify' && child.id === this.form.id) {
|
||||
return
|
||||
}
|
||||
const configuration = JSON.parse(child.configuration)
|
||||
if (!configuration) {
|
||||
return
|
||||
}
|
||||
if(configuration.schema != null){
|
||||
if (configuration.schema == this.form.configuration.schema && configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port) {
|
||||
repeat = true
|
||||
repeatDsName.push(child.name)
|
||||
}
|
||||
}else {
|
||||
if (configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port) {
|
||||
repeat = true
|
||||
repeatDsName.push(child.name)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let status = null
|
||||
if (this.datasourceType.isPlugin) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user