Merge branch 'dev' of github.com:dataease/dataease into dev

This commit is contained in:
wangjiahao 2022-04-21 10:13:00 +08:00
commit 977c51ef0e
5 changed files with 29 additions and 12 deletions

View File

@ -1377,7 +1377,7 @@ export default {
priority: 'Advanced setting',
extra_params: 'Extra JDBC connection string',
please_input_dataPath: 'Please enter the JsonPath data path',
warning: 'Contains invalid datasets',
warning: 'Contains invalid table',
data_table: 'Dataset Table',
data_table_name: 'Dataset Table name',
method: 'Request mode',

View File

@ -1378,7 +1378,7 @@ export default {
priority: '高級設置',
extra_params: '額外的JDBC連接字符串',
please_input_dataPath: '請輸入 JsonPath 數據路徑',
warning: '包含無效數據',
warning: '包含無效數據',
data_table: '數據表',
data_table_name: '數據表名稱',
method: '請求方式',

View File

@ -1386,7 +1386,7 @@ export default {
all_compute_mode: '直连、抽取模式',
extra_params: '额外的JDBC连接字符串',
please_input_dataPath: '请输入 JsonPath 数据路径',
warning: '包含无效数据',
warning: '包含无效数据',
data_table: '数据表',
data_table_name: '数据表名称',
method: '请求方式',

View File

@ -43,7 +43,7 @@
</el-col>
</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>
<el-steps :active="active" align-center>
<el-step title="步骤 1"></el-step>
@ -204,10 +204,14 @@
import i18n from "@/lang";
import {checkApiDatasource} from "@/api/system/datasource";
import ApiHttpRequestForm from '@/views/system/datasource/ApiHttpRequestForm'
import LayoutContent from '@/components/business/LayoutContent'
export default {
name: "DsConfiguration",
components: {
ApiHttpRequestForm,
LayoutContent
},
props: {
disabled: {
@ -219,12 +223,6 @@ export default {
method: String,
request: {},
response: {},
editApiItem: {
type: Boolean,
default() {
return false;
}
},
showScript: {
type: Boolean,
default: true,

View File

@ -41,7 +41,7 @@
</el-select>
</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 }" />
@ -239,6 +239,7 @@ export default {
} else {
this.create()
if (this.params && this.params.type) {
this.setType()
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 => {
if (!valid) {
return false
@ -411,6 +424,7 @@ export default {
})
},
validaDatasource() {
console.log(this.$refs)
if (!this.form.configuration.schema && this.form.type === 'oracle') {
this.$message.error(i18n.t('datasource.please_choose_schema'))
return
@ -423,7 +437,12 @@ export default {
if(this.datasourceType.isPlugin){
status = this.$refs['pluginDsConfig'].callPluginInner({methodName: 'validate'})
}else {
status = this.$refs['dsConfig'].$refs['DsConfig'].validate
this.$refs['dsConfig'].$refs['DsConfig'].validate(valid => {
status = valid
if(!valid){
return
}
})
}
if(!status){
return;