diff --git a/web/src/pages/dataSourceManage/components/datasourceForm/index.vue b/web/src/pages/dataSourceManage/components/datasourceForm/index.vue index b4d6ca55e..cde26395d 100644 --- a/web/src/pages/dataSourceManage/components/datasourceForm/index.vue +++ b/web/src/pages/dataSourceManage/components/datasourceForm/index.vue @@ -50,7 +50,8 @@ const typesMap = { // dataSource: 'options', dataSource: (data, source, self)=>{ const fApi = self.fApi; - if(/^https?:/.test(data.dataSource)){ + if(typeof data.dataSource === 'string'){ + ///^https?:/.test(data.dataSource) request(data.dataSource, {}, { method: "GET", }).then(result=>{ diff --git a/web/src/pages/jobManagement/components/dyncRender.vue b/web/src/pages/jobManagement/components/dyncRender.vue index b1c9ece64..419431f38 100644 --- a/web/src/pages/jobManagement/components/dyncRender.vue +++ b/web/src/pages/jobManagement/components/dyncRender.vue @@ -113,7 +113,13 @@ export default defineComponent({ let partitionArr = ref([]) const _buildMap = function () { partitionArr.value = [] - let url = source.split('?')[0] + let url + const source_reg = new RegExp('^http'); + if (source_reg.test(source.value)) { + url = source.split('?')[0] + } else { + url = window.location.origin + source.split('?')[0] + } getPartitionInfo({ source: url, dataSourceId: props.data.id,