Compare commits

...

21 Commits

Author SHA1 Message Date
fit2cloud-chenyw
da2817436b fix(仪表板): 下拉过滤器交换多字段顺序后排序逻辑错乱 2022-07-07 01:59:13 -04:00
fit2cloud-chenyw
e53ee284f0 fix(仪表板): 仪表板过滤器设置默认值失效 2022-07-07 00:05:19 -04:00
taojinlong
66f4ccf027 fix(数据集): 处理 sql 参数错误 2022-07-06 23:42:09 +08:00
fit2cloud-chenyw
a2d5752d2d fix(仪表板): 树形过滤器不能添加多字段 2022-07-06 04:16:01 -04:00
王嘉豪
023e247c3c
Merge pull request #2600 from dataease/dev
merge
2022-07-06 15:48:21 +08:00
fit2cloud-chenyw
5f8eeb613c fix(仪表板): 删除分享仪表板报错 2022-07-06 03:47:04 -04:00
fit2cloud-chenyw
cef39c48ea fix(仪表板): 取消收藏成功没有提示 2022-07-06 02:31:20 -04:00
fit2cloud-chenyw
5e3c06dc06 Merge branch 'v1.12' of fit2cloud:dataease/dataease into v1.12 2022-07-06 02:29:58 -04:00
taojinlong
9b6e054747 Merge branch 'dev' of github.com:dataease/dataease into dev 2022-07-06 13:52:40 +08:00
taojinlong
c18dcd7ab8 Merge branch 'dev' of github.com:dataease/dataease into dev 2022-07-06 13:50:14 +08:00
taojinlong
8b38303a08 fix(数据源): 校验数据源重复 2022-07-06 13:47:41 +08:00
fit2cloud-chenyw
9883b214ac perf(系统): 升级kettle依赖版本号到8.3.0.18-1112(更好下载) 2022-07-05 23:04:04 -04:00
junjun
e8adea94c8 refactor(视图): 轴值间隔与刻度数增加说明 2022-07-05 16:56:50 +08:00
junjun
785a72b94b Merge remote-tracking branch 'origin/v1.12' into v1.12 2022-07-05 10:44:14 +08:00
dataeaseShu
58cb969aca
Merge pull request #2579 from dataease/pr@dev_safari_reg
fix: 修复safari由于不支持对js中正则表达式的 几个新增的断言验证不支持导致的白屏
2022-07-05 10:43:08 +08:00
junjun
63710fb5bf fix(视图): SQLServer明细表类型转换错误 2022-07-05 10:39:48 +08:00
dataeaseShu
755d3cdba3 fix: 修复safari由于不支持对js中正则表达式的 几个新增的断言验证不支持导致的白屏 2022-07-05 10:39:00 +08:00
taojinlong
242b975186 fix(数据源): 校验数据源配置的有效性 2022-07-04 15:32:18 +08:00
fit2cloud-chenyw
9faed37970 fix(仪表板): 下拉过滤器添加同数据集多字段虽然有提示但还是能添加成功 2022-07-04 11:57:56 +08:00
fit2cloud-chenyw
c4e46f653a fix(系统管理): 授权插件菜单的操作在记录日志时无法获取到菜单名称 2022-07-04 11:57:36 +08:00
fit2cloud-chenyw
747dd55358 fix(仪表板): 下拉过滤器删除带有sql注入的排序字段后依然不能点击确认按钮 2022-07-04 11:57:12 +08:00
11 changed files with 117 additions and 67 deletions

View File

@ -2577,6 +2577,7 @@ public class DataSetTableService {
stringBuilder.append(SubstitutedSql);
return;
}
inExpression.getLeftExpression().accept(this);
if (inExpression.isNot()) {
getBuffer().append(" " + " NOT IN " + " ");
} else {

View File

@ -132,6 +132,13 @@ export default {
return this.index > 0
}
},
watch: {
index(val, old) {
if (val !== old) {
this.sortChange('none')
}
}
},
mounted() {
},
created() {

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -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) {

View File

@ -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)
}
}
}

View File

@ -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) {