5cc5ea6e by lihua

fix: 数据字典,上传文件去掉签名

1 parent 6ac3b327
......@@ -69,10 +69,18 @@ export const getUpFileSignByUrl = (params) => {
});
};
function getPathUrl(url:string) {
// 查找问号的位置
var questionMarkIndex = url.indexOf('?');
// 如果存在问号,则返回问号之前的部分;如果不存在,则返回原url
return questionMarkIndex !== -1 ? url.substring(0, questionMarkIndex) : url;
}
//obs上传
export const obsUploadRequest = (params) => {
return request({
url: params.signedUrl,
url: params.signedUrl && getPathUrl(params.signedUrl),
withCredentials: false,
headers: params.actualSignedRequestHeaders ? {
"Content-Type": params.actualSignedRequestHeaders[
......
......@@ -280,6 +280,17 @@ const routes: RouteRecordRaw[] = [
cache: true
},
},
{
path: '/data-inventory/data-dictionary/import-file',
name: 'importFile',
component: () => import('@/views/importFile.vue'),
meta: {
title: '文件导入',
sidebar: false,
breadcrumb: false,
cache: true
},
},
],
},
{
......
......@@ -170,7 +170,7 @@ const toolBtnClick = (btn) => {
cacheStore.setCatch('uploadSetting', info)
nextTick(() => {
router.push({
path: '/data-standards/import-file',
path: '/data-inventory/data-dictionary/import-file',
});
})
} else if (type == 'submit') {
......
......@@ -25,6 +25,9 @@ import {
getDownFileSignByUrl,
obsDownloadRequest
} from '@/api/modules/obsService';
import {
getDictionaryTree
} from '@/api/modules/dataInventory';
import { commonPageConfig } from '@/utils/enum';
const { proxy } = getCurrentInstance() as any;
......@@ -44,9 +47,9 @@ const tabsActiveName = ref('')
const uploadSetting: any = ref({})
const importType = ref('')
const defaulttabs = [
{ label: '标准集导入', name: 'standard' },
{ label: '字段标准导入', name: 'field' },
{ label: '命名标准导入', name: 'naming' },
// { label: '标准集导入', name: 'standard' },
// { label: '字段标准导入', name: 'field' },
// { label: '命名标准导入', name: 'naming' },
{ label: '数据字典导入', name: 'dictionary' },
// { label: '质量模型导入', name: 'qualityModelGroup' },
// { label: '质量规则导入', name: 'qualityRule' },
......@@ -135,23 +138,23 @@ const dialogInfo: any = ref({
})
// // 获取所有数据字典
// const getDictList = () => {
// const params = {
// paramCode: 'data_structure_code'
// }
// getDictionaryTree(params).then((res: any) => {
// if (res.code == proxy.$passCode) {
// const data = res.data ?? []
// const treeList = data.filter(item => item.children && item.children.length)
// dictionaryList.value = treeList
// } else {
// ElMessage({
// type: 'error',
// message: res.msg,
// })
// }
// })
// }
const getDictList = () => {
const params = {
paramCode: '数据字典类型'
}
getDictionaryTree(params).then((res: any) => {
if (res.code == proxy.$passCode) {
const data = res.data ?? []
const treeList = data.filter(item => item.children && item.children.length)
dictionaryList.value = treeList
} else {
ElMessage({
type: 'error',
message: res.msg,
})
}
})
}
const tabsChange = (name) => {
tabsActiveName.value = name
......@@ -658,10 +661,11 @@ onActivated(() => {
if (isfileImport) {
tabsActiveName.value = 'importFile'
} else {
tabsActiveName.value = uploadSetting.value?.type || 'standard'
tabsActiveName.value = uploadSetting.value?.type || 'dictionary'
}
if (tabsActiveName.value == 'dictionary') {
getDictList();
}
//getDictList()
setUploadInfo()
})
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!