Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
86dbeb91
authored
2025-03-07 11:03:56 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复obs上传地址
1 parent
b4e3a624
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
src/api/modules/obsService.ts
src/components/Form/index.vue
src/views/data_meta/analysisView.vue
src/views/data_meta/metaSheet.vue
src/api/modules/obsService.ts
View file @
86dbeb9
...
...
@@ -69,7 +69,7 @@ export const getUpFileSignByUrl = (params) => {
});
};
function getPathUrl(url:string) {
export
function getPathUrl(url:string) {
// 查找问号的位置
var questionMarkIndex = url.indexOf('?');
...
...
@@ -80,7 +80,7 @@ function getPathUrl(url:string) {
//obs上传
export const obsUploadRequest = (params) => {
return request({
url: params.signedUrl
&& getPathUrl(params.signedUrl)
,
url: params.signedUrl,
withCredentials: false,
headers: params.actualSignedRequestHeaders ? {
"Content-Type": params.actualSignedRequestHeaders[
...
...
src/components/Form/index.vue
View file @
86dbeb9
...
...
@@ -28,7 +28,8 @@ import {
getUpFileSignByUrl
,
obsUploadRequest
,
getDownFileSignByUrl
,
obsDownloadRequest
obsDownloadRequest
,
getPathUrl
}
from
"@/api/modules/obsService"
;
import
{
Editor
,
EditorExpose
}
from
'@/components/Editor'
...
...
@@ -522,7 +523,7 @@ const uploadFile = (file, item) => {
actualSignedRequestHeaders: res.data.actualSignedRequestHeaders
}).then(() => {
if (res.code == '00000') {
file.file.url = res.data.signedUrl;
file.file.url = res.data.signedUrl
&& getPathUrl(res.data.signedUrl)
;
let fileItem = {
name: file.file.name,
url: res.data.signedUrl,
...
...
src/views/data_meta/analysisView.vue
View file @
86dbeb9
...
...
@@ -25,7 +25,8 @@ import {
import
{
parseAndDecodeUrl
,
getUpFileSignByUrl
,
obsUploadRequest
obsUploadRequest
,
getPathUrl
}
from
"@/api/modules/obsService"
;
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
useDataMetaStore
from
"@/store/modules/dataMeta"
...
...
@@ -873,7 +874,7 @@ const pageSave = () => {
saveMetaReportAnalysis
({
table
:
lastClickNode
.
value
.
tableName
,
database
:
lastClickNode
.
value
.
databaseName
,
analysisReportUrl
:
res
.
data
?.
signedUrl
,
analysisReportUrl
:
res
.
data
?.
signedUrl
&&
getPathUrl
(
res
.
data
?.
signedUrl
)
,
analysisReportName
:
analysisReportName
,
databaseChName
:
lastClickNode
.
value
.
databaseChName
}).
then
((
res
:
any
)
=>
{
...
...
src/views/data_meta/metaSheet.vue
View file @
86dbeb9
...
...
@@ -31,7 +31,8 @@ import { TableColumnWidth } from '@/utils/enum';
import
{
parseAndDecodeUrl
,
getUpFileSignByUrl
,
obsUploadRequest
obsUploadRequest
,
getPathUrl
}
from
"@/api/modules/obsService"
;
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
...
...
@@ -573,7 +574,7 @@ const pageSave = () => {
saveMetaReportAnalysis
({
table
:
sheetInfo
.
value
.
tableName
,
database
:
sheetInfo
.
value
.
databaseName
,
analysisReportUrl
:
res
.
data
?.
signedUrl
,
analysisReportUrl
:
res
.
data
?.
signedUrl
&&
getPathUrl
(
res
.
data
?.
signedUrl
)
,
analysisReportName
:
analysisReportName
,
databaseChName
:
sheetInfo
.
value
.
databaseChName
}).
then
((
res
:
any
)
=>
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment