forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
977c51ef0e
@ -1377,7 +1377,7 @@ export default {
|
|||||||
priority: 'Advanced setting',
|
priority: 'Advanced setting',
|
||||||
extra_params: 'Extra JDBC connection string',
|
extra_params: 'Extra JDBC connection string',
|
||||||
please_input_dataPath: 'Please enter the JsonPath data path',
|
please_input_dataPath: 'Please enter the JsonPath data path',
|
||||||
warning: 'Contains invalid datasets',
|
warning: 'Contains invalid table',
|
||||||
data_table: 'Dataset Table',
|
data_table: 'Dataset Table',
|
||||||
data_table_name: 'Dataset Table name',
|
data_table_name: 'Dataset Table name',
|
||||||
method: 'Request mode',
|
method: 'Request mode',
|
||||||
|
@ -1378,7 +1378,7 @@ export default {
|
|||||||
priority: '高級設置',
|
priority: '高級設置',
|
||||||
extra_params: '額外的JDBC連接字符串',
|
extra_params: '額外的JDBC連接字符串',
|
||||||
please_input_dataPath: '請輸入 JsonPath 數據路徑',
|
please_input_dataPath: '請輸入 JsonPath 數據路徑',
|
||||||
warning: '包含無效數據機',
|
warning: '包含無效數據表',
|
||||||
data_table: '數據表',
|
data_table: '數據表',
|
||||||
data_table_name: '數據表名稱',
|
data_table_name: '數據表名稱',
|
||||||
method: '請求方式',
|
method: '請求方式',
|
||||||
|
@ -1386,7 +1386,7 @@ export default {
|
|||||||
all_compute_mode: '直连、抽取模式',
|
all_compute_mode: '直连、抽取模式',
|
||||||
extra_params: '额外的JDBC连接字符串',
|
extra_params: '额外的JDBC连接字符串',
|
||||||
please_input_dataPath: '请输入 JsonPath 数据路径',
|
please_input_dataPath: '请输入 JsonPath 数据路径',
|
||||||
warning: '包含无效数据集',
|
warning: '包含无效数据表',
|
||||||
data_table: '数据表',
|
data_table: '数据表',
|
||||||
data_table_name: '数据表名称',
|
data_table_name: '数据表名称',
|
||||||
method: '请求方式',
|
method: '请求方式',
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-dialog :title="api_table_title" :visible="editApiItem" :before-close="closeEditItem" width="60%"
|
<el-dialog :title="api_table_title" :visible="edit_api_item" :before-close="closeEditItem" width="60%"
|
||||||
class="dialog-css" append-to-body>
|
class="dialog-css" append-to-body>
|
||||||
<el-steps :active="active" align-center>
|
<el-steps :active="active" align-center>
|
||||||
<el-step title="步骤 1"></el-step>
|
<el-step title="步骤 1"></el-step>
|
||||||
@ -204,10 +204,14 @@
|
|||||||
|
|
||||||
import i18n from "@/lang";
|
import i18n from "@/lang";
|
||||||
import {checkApiDatasource} from "@/api/system/datasource";
|
import {checkApiDatasource} from "@/api/system/datasource";
|
||||||
|
import ApiHttpRequestForm from '@/views/system/datasource/ApiHttpRequestForm'
|
||||||
|
import LayoutContent from '@/components/business/LayoutContent'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DsConfiguration",
|
name: "DsConfiguration",
|
||||||
components: {
|
components: {
|
||||||
|
ApiHttpRequestForm,
|
||||||
|
LayoutContent
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
disabled: {
|
disabled: {
|
||||||
@ -219,12 +223,6 @@ export default {
|
|||||||
method: String,
|
method: String,
|
||||||
request: {},
|
request: {},
|
||||||
response: {},
|
response: {},
|
||||||
editApiItem: {
|
|
||||||
type: Boolean,
|
|
||||||
default() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
showScript: {
|
showScript: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<ds-configuration ref="dsConfig" v-if="!datasourceType.isPlugin" :form="form" :disabled="params && params.id && params.showModel && params.showModel === 'show' && !canEdit" :edit-api-item="edit_api_item"></ds-configuration>
|
<ds-configuration ref="dsConfig" v-if="!datasourceType.isPlugin" :form="form" :disabled="params && params.id && params.showModel && params.showModel === 'show' && !canEdit"></ds-configuration>
|
||||||
<plugin-com ref="pluginDsConfig" v-if="datasourceType.isPlugin" :component-name="datasourceType.type" :obj="{form, disabled }" />
|
<plugin-com ref="pluginDsConfig" v-if="datasourceType.isPlugin" :component-name="datasourceType.type" :obj="{form, disabled }" />
|
||||||
|
|
||||||
|
|
||||||
@ -239,6 +239,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.create()
|
this.create()
|
||||||
if (this.params && this.params.type) {
|
if (this.params && this.params.type) {
|
||||||
|
this.setType()
|
||||||
this.changeType()
|
this.changeType()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -347,6 +348,18 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let status = null;
|
||||||
|
if(this.datasourceType.isPlugin){
|
||||||
|
status = this.$refs['pluginDsConfig'].callPluginInner({methodName: 'validate'})
|
||||||
|
}else {
|
||||||
|
status = this.$refs['dsConfig'].$refs['DsConfig'].validate(valid => {
|
||||||
|
status = valid
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if(!status){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.$refs.dsForm.validate(valid => {
|
this.$refs.dsForm.validate(valid => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return false
|
||||||
@ -411,6 +424,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
validaDatasource() {
|
validaDatasource() {
|
||||||
|
console.log(this.$refs)
|
||||||
if (!this.form.configuration.schema && this.form.type === 'oracle') {
|
if (!this.form.configuration.schema && this.form.type === 'oracle') {
|
||||||
this.$message.error(i18n.t('datasource.please_choose_schema'))
|
this.$message.error(i18n.t('datasource.please_choose_schema'))
|
||||||
return
|
return
|
||||||
@ -423,7 +437,12 @@ export default {
|
|||||||
if(this.datasourceType.isPlugin){
|
if(this.datasourceType.isPlugin){
|
||||||
status = this.$refs['pluginDsConfig'].callPluginInner({methodName: 'validate'})
|
status = this.$refs['pluginDsConfig'].callPluginInner({methodName: 'validate'})
|
||||||
}else {
|
}else {
|
||||||
status = this.$refs['dsConfig'].$refs['DsConfig'].validate
|
this.$refs['dsConfig'].$refs['DsConfig'].validate(valid => {
|
||||||
|
status = valid
|
||||||
|
if(!valid){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if(!status){
|
if(!status){
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user