提交 9b987366 authored 作者: taojinlong's avatar taojinlong

refactor: 冲突

...@@ -172,7 +172,7 @@ public class SqlserverQueryProvider extends QueryProvider { ...@@ -172,7 +172,7 @@ public class SqlserverQueryProvider extends QueryProvider {
@Override @Override
public String createQueryTableWithLimit(String table, List<DatasetTableField> fields, Integer limit, boolean isGroup, Datasource ds, List<ChartFieldCustomFilterDTO> fieldCustomFilter) { public String createQueryTableWithLimit(String table, List<DatasetTableField> fields, Integer limit, boolean isGroup, Datasource ds, List<ChartFieldCustomFilterDTO> fieldCustomFilter) {
String schema = new Gson().fromJson(ds.getConfiguration(), JdbcConfiguration.class).getSchema(); String schema = new Gson().fromJson(ds.getConfiguration(), JdbcConfiguration.class).getSchema();
return String.format("SELECT top %s * from %s ", limit.toString(), schema + "." + table); return String.format("SELECT top %s * from %s ", limit.toString(), schema + "." + String.format(SqlServerSQLConstants.KEYWORD_TABLE, table));
} }
@Override @Override
......
...@@ -1268,7 +1268,7 @@ export default { ...@@ -1268,7 +1268,7 @@ export default {
delete_warning: 'Confirm to delete?', delete_warning: 'Confirm to delete?',
input_name: 'Please input name', input_name: 'Please input name',
input_limit_2_25: '2-25 chars', input_limit_2_25: '2-25 chars',
input_limit_0_50: '0-50 chars', input_limit_2_50: '2-50 chars',
oracle_connection_type: 'Service Name/SID', oracle_connection_type: 'Service Name/SID',
oracle_sid: 'SID', oracle_sid: 'SID',
oracle_service_name: 'Service Name', oracle_service_name: 'Service Name',
......
...@@ -1269,7 +1269,7 @@ export default { ...@@ -1269,7 +1269,7 @@ export default {
delete_warning: '確定要刪除嗎?', delete_warning: '確定要刪除嗎?',
input_name: '請輸入名稱', input_name: '請輸入名稱',
input_limit_2_25: '2-25字符', input_limit_2_25: '2-25字符',
input_limit_0_50: '0-50字符', input_limit_2_50: '2-50字符',
oracle_connection_type: '服務名/SID', oracle_connection_type: '服務名/SID',
oracle_sid: 'SID', oracle_sid: 'SID',
oracle_service_name: '服務名', oracle_service_name: '服務名',
......
...@@ -1273,7 +1273,7 @@ export default { ...@@ -1273,7 +1273,7 @@ export default {
delete_warning: '确定要删除吗?', delete_warning: '确定要删除吗?',
input_name: '请输入名称', input_name: '请输入名称',
input_limit_2_25: '2-25字符', input_limit_2_25: '2-25字符',
input_limit_0_50: '0-50字符', input_limit_2_50: '2-50字符',
oracle_connection_type: '服务名/SID', oracle_connection_type: '服务名/SID',
oracle_sid: 'SID', oracle_sid: 'SID',
oracle_service_name: '服务名', oracle_service_name: '服务名',
......
...@@ -379,7 +379,7 @@ export default { ...@@ -379,7 +379,7 @@ export default {
taskFormRules: { taskFormRules: {
name: [ name: [
{ required: true, message: this.$t('dataset.required'), trigger: 'change' }, { required: true, message: this.$t('dataset.required'), trigger: 'change' },
{ min: 2, max: 50, message: this.$t('datasource.input_limit_0_50', [2, 50]), trigger: 'blur' } { min: 2, max: 50, message: this.$t('datasource.input_limit_2_50', [2, 50]), trigger: 'blur' }
], ],
type: [ type: [
{ required: true, message: this.$t('dataset.required'), trigger: 'change' } { required: true, message: this.$t('dataset.required'), trigger: 'change' }
......
...@@ -215,7 +215,7 @@ export default { ...@@ -215,7 +215,7 @@ export default {
rule: { rule: {
name: [{required: true, message: i18n.t('datasource.input_name'), trigger: 'blur'}, name: [{required: true, message: i18n.t('datasource.input_name'), trigger: 'blur'},
{min: 2, max: 25, message: i18n.t('datasource.input_limit_2_25', [2, 25]), trigger: 'blur'}], {min: 2, max: 25, message: i18n.t('datasource.input_limit_2_25', [2, 25]), trigger: 'blur'}],
desc: [{min: 0, max: 50, message: i18n.t('datasource.input_limit_0_50'), trigger: 'blur'}], desc: [{min: 2, max: 50, message: i18n.t('datasource.input_limit_2_50'), trigger: 'blur'}],
type: [{required: true, message: i18n.t('datasource.please_choose_type'), trigger: 'change'}], type: [{required: true, message: i18n.t('datasource.please_choose_type'), trigger: 'change'}],
'configuration.dataBase': [{ 'configuration.dataBase': [{
required: true, required: true,
...@@ -351,7 +351,7 @@ export default { ...@@ -351,7 +351,7 @@ export default {
return return
} }
let repeat = false let repeat = false
let repeatDsName = '' let repeatDsName = []
this.tData.forEach(item => { this.tData.forEach(item => {
if(item.id === this.form.type){ if(item.id === this.form.type){
item.children.forEach(child => { item.children.forEach(child => {
...@@ -369,7 +369,7 @@ export default { ...@@ -369,7 +369,7 @@ export default {
case 'mariadb': case 'mariadb':
if(configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port){ if(configuration.host == this.form.configuration.host && configuration.dataBase == this.form.configuration.dataBase && configuration.port == this.form.configuration.port){
repeat = true repeat = true
repeatDsName = child.name repeatDsName.push(child.name)
} }
break break
case 'pg': case 'pg':
...@@ -378,13 +378,13 @@ export default { ...@@ -378,13 +378,13 @@ export default {
case 'oracle': case 'oracle':
case 'db2': 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){ 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 = child.name repeatDsName.push(child.name)
repeat = true repeat = true
} }
break break
case 'es': case 'es':
if(configuration.url == this.form.configuration.url){ if(configuration.url == this.form.configuration.url){
repeatDsName = child.name repeatDsName.push(child.name)
repeat = true repeat = true
} }
break break
...@@ -404,7 +404,7 @@ export default { ...@@ -404,7 +404,7 @@ export default {
form.configuration = JSON.stringify(form.configuration) form.configuration = JSON.stringify(form.configuration)
if (this.formType === 'modify' && this.originConfiguration !== form.configuration) { if (this.formType === 'modify' && this.originConfiguration !== form.configuration) {
if(repeat){ if(repeat){
$confirm(i18n.t('datasource.repeat_datasource_msg') + '[' + repeatDsName + '], ' + i18n.t('datasource.confirm_save'), () => { $confirm(i18n.t('datasource.repeat_datasource_msg') + '[' + repeatDsName.join(',') + '], ' + i18n.t('datasource.confirm_save'), () => {
$confirm(i18n.t('datasource.edit_datasource_msg'), () => { $confirm(i18n.t('datasource.edit_datasource_msg'), () => {
this.method(method, form) this.method(method, form)
}) })
...@@ -417,7 +417,7 @@ export default { ...@@ -417,7 +417,7 @@ export default {
return return
} }
if(repeat){ if(repeat){
$confirm(i18n.t('datasource.repeat_datasource_msg') + '[' + repeatDsName + '], ' + i18n.t('datasource.confirm_save'), () => { $confirm(i18n.t('datasource.repeat_datasource_msg') + '[' + repeatDsName.join(',') + '], ' + i18n.t('datasource.confirm_save'), () => {
this.method(method, form) this.method(method, form)
}) })
}else { }else {
......
...@@ -325,7 +325,7 @@ export default { ...@@ -325,7 +325,7 @@ export default {
taskFormRules: { taskFormRules: {
name: [ name: [
{ required: true, message: this.$t('dataset.required'), trigger: 'change' }, { required: true, message: this.$t('dataset.required'), trigger: 'change' },
{ min: 2, max: 50, message: this.$t('datasource.input_limit_0_50', [2, 50]), trigger: 'blur' } { min: 2, max: 50, message: this.$t('datasource.input_limit_2_50', [2, 50]), trigger: 'blur' }
], ],
type: [ type: [
{ required: true, message: this.$t('dataset.required'), trigger: 'change' } { required: true, message: this.$t('dataset.required'), trigger: 'change' }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论