forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
e7da047b21
@ -795,6 +795,16 @@ public class CKQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(CKConstants.toFloat64, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(CKConstants.toInt32, String.format(CKConstants.toDateTime, originName)) + "*1000";
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -892,6 +902,16 @@ public class CKQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(CKConstants.toFloat64, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(CKConstants.toInt32, String.format(CKConstants.toDateTime, originName)) + "*1000";
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
|
@ -763,6 +763,16 @@ public class Db2QueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == DeTypeConstants.DE_TIME) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(Db2Constants.CAST, originName, Db2Constants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(Db2Constants.UNIX_TIMESTAMP, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -850,6 +860,16 @@ public class Db2QueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == DeTypeConstants.DE_TIME) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(Db2Constants.CAST, originName, Db2Constants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(Db2Constants.UNIX_TIMESTAMP, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
|
@ -775,6 +775,16 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
String cast = String.format(DorisConstants.CAST, originName, DorisConstants.DEFAULT_INT_FORMAT) + "/1000";
|
||||
whereName = String.format(DorisConstants.FROM_UNIXTIME, cast, DorisConstants.DEFAULT_DATE_FORMAT);
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(DorisConstants.CAST, originName, DorisConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(DorisConstants.UNIX_TIMESTAMP, originName) + "*1000";
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 0) {
|
||||
whereName = String.format(DorisConstants.CAST, originName, DorisConstants.VARCHAR);
|
||||
} else {
|
||||
@ -864,6 +874,16 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
}
|
||||
} else if (field.getDeType() == 0) {
|
||||
whereName = String.format(DorisConstants.CAST, originName, DorisConstants.VARCHAR);
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(DorisConstants.CAST, originName, DorisConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(DorisConstants.UNIX_TIMESTAMP, originName) + "*1000";
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
|
@ -792,6 +792,16 @@ public class EsQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(EsSqlLConstants.CAST, originName, "double");
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(EsSqlLConstants.CAST, originName, "bigint");
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -873,6 +883,16 @@ public class EsQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(EsSqlLConstants.CAST, originName, "double");
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(EsSqlLConstants.CAST, originName, "bigint");
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
|
@ -756,6 +756,16 @@ public class HiveQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == DeTypeConstants.DE_TIME) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(HiveConstants.CAST, originName, HiveConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(HiveConstants.UNIX_TIMESTAMP, originName) + "*1000";
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -838,6 +848,16 @@ public class HiveQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == DeTypeConstants.DE_TIME) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(HiveConstants.CAST, originName, HiveConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(HiveConstants.UNIX_TIMESTAMP, originName) + "*1000";
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
|
@ -760,6 +760,16 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(MySQLConstants.CAST, originName, MySQLConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(MySQLConstants.UNIX_TIMESTAMP, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -841,6 +851,16 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(MySQLConstants.CAST, originName, MySQLConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(MySQLConstants.UNIX_TIMESTAMP, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
|
@ -812,6 +812,16 @@ public class OracleQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(OracleConstants.CAST, originName, OracleConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(OracleConstants.UNIX_TIMESTAMP, originName) + "*1000";
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -898,6 +908,16 @@ public class OracleQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(OracleConstants.CAST, originName, OracleConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(OracleConstants.UNIX_TIMESTAMP, originName) + "*1000";
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
|
@ -787,6 +787,16 @@ public class PgQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(PgConstants.CAST, originName, PgConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(PgConstants.UNIX_TIMESTAMP, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -869,6 +879,16 @@ public class PgQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(PgConstants.CAST, originName, PgConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(PgConstants.UNIX_TIMESTAMP, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
|
@ -728,6 +728,16 @@ public class RedshiftQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(PgConstants.CAST, originName, PgConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(PgConstants.UNIX_TIMESTAMP, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -806,6 +816,16 @@ public class RedshiftQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(PgConstants.CAST, originName, PgConstants.DEFAULT_FLOAT_FORMAT);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(PgConstants.UNIX_TIMESTAMP, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
|
@ -821,6 +821,16 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(SqlServerSQLConstants.CONVERT, SqlServerSQLConstants.DEFAULT_FLOAT_FORMAT, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(SqlServerSQLConstants.UNIX_TIMESTAMP, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -903,6 +913,16 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
|
||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
|
||||
whereName = String.format(SqlServerSQLConstants.CONVERT, SqlServerSQLConstants.DEFAULT_FLOAT_FORMAT, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 1) {
|
||||
whereName = String.format(SqlServerSQLConstants.UNIX_TIMESTAMP, originName);
|
||||
}
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereName = originName;
|
||||
}
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
|
@ -2,6 +2,9 @@
|
||||
<div>
|
||||
<div v-show="editControlButton" class="toolbar">
|
||||
<span style="float: right;">
|
||||
<el-button v-if="mobileLayoutStatus" size="mini" @click="editReset">
|
||||
{{ $t('commons.reset') }}
|
||||
</el-button>
|
||||
<el-button size="mini" @click="editSave">
|
||||
{{ $t('commons.confirm') }}
|
||||
</el-button>
|
||||
@ -366,6 +369,10 @@ export default {
|
||||
this.saveLinkage()
|
||||
}
|
||||
},
|
||||
editReset() {
|
||||
this.cancelMobileLayoutStatue(JSON.parse(this.componentDataCache))
|
||||
this.$store.commit('openMobileLayout')
|
||||
},
|
||||
editCancel() {
|
||||
if (this.mobileLayoutStatus) {
|
||||
this.cancelMobileLayoutStatue(JSON.parse(this.componentDataCache))
|
||||
|
@ -310,7 +310,7 @@ export default {
|
||||
created() {
|
||||
this.refId = uuid.v1
|
||||
if (this.element && this.element.propValue && this.element.propValue.viewId) {
|
||||
const hasFilter = this.componentData.filter(item => item.type === 'custom').some(item => item.options.value)
|
||||
const hasFilter = this.componentData.filter(item => item.type === 'custom').some(item => item.options.value || (item.options.attrs && item.options.attrs.default && item.options.attrs.default.isDynamic))
|
||||
hasFilter || this.getData(this.element.propValue.viewId, false)
|
||||
}
|
||||
},
|
||||
|
@ -273,6 +273,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.de-tabs-div {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.de-tabs {
|
||||
height: 100%;
|
||||
|
@ -61,7 +61,7 @@ class NumberRangeServiceImpl extends WidgetService {
|
||||
|
||||
filterFieldMethod(fields) {
|
||||
return fields.filter(field => {
|
||||
return field['deType'] === 2
|
||||
return field['deType'] === 2 || field['deType'] === 3
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ class NumberSelectGridServiceImpl extends WidgetService {
|
||||
|
||||
filterFieldMethod(fields) {
|
||||
return fields.filter(field => {
|
||||
return field['deType'] === 2
|
||||
return field['deType'] === 2 || field['deType'] === 3
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ class NumberSelectServiceImpl extends WidgetService {
|
||||
|
||||
filterFieldMethod(fields) {
|
||||
return fields.filter(field => {
|
||||
return field['deType'] === 2
|
||||
return field['deType'] === 2 || field['deType'] === 3
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,9 @@ const whiteList = ['/login', '/401', '/404', '/delink', '/nolic'] // no redirect
|
||||
router.beforeEach(async(to, from, next) => {
|
||||
// start progress bar
|
||||
NProgress.start()
|
||||
if (isMobile()) {
|
||||
|
||||
const mobiePreview = '/preview/'
|
||||
if (isMobile() && !to.path.includes(mobiePreview)) {
|
||||
window.location.href = window.origin + '/app.html'
|
||||
NProgress.done()
|
||||
}
|
||||
|
@ -191,6 +191,7 @@
|
||||
<el-form-item :label="$t('chart.belong_group')">
|
||||
<treeselect
|
||||
v-model="currGroup.id"
|
||||
:clearable="false"
|
||||
:options="chartGroupTreeAvailable"
|
||||
:normalizer="normalizer"
|
||||
:placeholder="$t('chart.select_group')"
|
||||
@ -425,7 +426,7 @@ export default {
|
||||
all: this.$t('commons.all'),
|
||||
folder: this.$t('commons.folder')
|
||||
},
|
||||
currentNodeData: {},
|
||||
currentViewNodeData: {},
|
||||
currentKey: null
|
||||
}
|
||||
},
|
||||
@ -671,8 +672,8 @@ export default {
|
||||
},
|
||||
|
||||
nodeClick(data, node) {
|
||||
this.currentNodeData = data
|
||||
if (data.modelInnerType !== 'group') {
|
||||
this.currentViewNodeData = data
|
||||
this.$emit('switchComponent', { name: 'ChartEdit', param: data })
|
||||
}
|
||||
},
|
||||
@ -933,8 +934,8 @@ export default {
|
||||
this.searchType = searchTypeInfo
|
||||
},
|
||||
nodeTypeChange(newType) {
|
||||
if (this.currentNodeData) {
|
||||
this.currentNodeData.modelInnerType = newType
|
||||
if (this.currentViewNodeData) {
|
||||
this.currentViewNodeData.modelInnerType = newType
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user