Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yuzhenWang
yd-csf-front
Commits
57bd0f29
Commit
57bd0f29
authored
Mar 17, 2026
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'swhotfix' into test
parents
34a3d7db
d312c36f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
10 deletions
+14
-10
src/api/common.js
+2
-3
src/components/LargeFileUploader/index.vue
+6
-5
src/views/sign/appointment/components/fileUpload.vue
+4
-1
src/views/sign/underwritingMain/policyDetail.vue
+2
-1
No files found.
src/api/common.js
View file @
57bd0f29
import
request
from
'@/utils/request'
// 修改上传图片方法,添加正确的请求配置
export
function
uploadImage
(
data
)
{
console
.
log
(
'data'
,
data
)
...
...
@@ -168,9 +167,9 @@ export function uploadMaterialList(data) {
})
}
// 删除上传文件
export
function
delUploadFile
(
fileBizId
)
{
export
function
delUploadFile
(
fileBizId
,
projectBizId
)
{
return
request
({
url
:
`/oss/api/ossFile/del?fileBizId=
${
fileBizId
}
`
,
url
:
`/oss/api/ossFile/del?fileBizId=
${
fileBizId
}
&projectBizId=
${
projectBizId
}
`
,
method
:
'delete'
})
}
...
...
src/components/LargeFileUploader/index.vue
View file @
57bd0f29
...
...
@@ -132,6 +132,7 @@ const props = defineProps({
tenantBizId
:
{
type
:
String
,
required
:
true
,
default
:
''
},
projectBizId
:
{
type
:
String
,
required
:
true
,
default
:
''
},
objectBizId
:
{
type
:
String
,
required
:
true
,
default
:
''
},
projectType
:
{
type
:
String
,
default
:
''
},
objectType
:
{
type
:
String
,
default
:
''
},
objectTableName
:
{
type
:
String
,
default
:
''
},
objectName
:
{
type
:
String
,
default
:
''
},
...
...
@@ -303,7 +304,7 @@ const initOssClient = async () => {
const
data
=
res
.
data
||
res
;
const
rawData
=
data
.
data
||
data
;
const
{
region
,
accessKeyId
,
accessKeySecret
,
stsToken
,
bucket
,
endpoint
}
=
rawData
;
const
{
region
,
accessKeyId
,
accessKeySecret
,
stsToken
,
bucket
,
endpoint
,
filePrefix
}
=
rawData
;
if
(
!
accessKeyId
||
!
bucket
)
throw
new
Error
(
'STS 凭证信息不完整'
);
...
...
@@ -319,6 +320,7 @@ const initOssClient = async () => {
endpoint
:
ossEndpoint
,
secure
:
true
,
timeout
:
60000
,
filePrefix
});
return
ossClient
.
value
;
}
catch
(
error
)
{
...
...
@@ -335,8 +337,8 @@ const uploadSingleFile = async (item) => {
console
.
error
(
'Invalid file object for upload:'
,
file
);
throw
new
Error
(
'文件对象无效,必须是 File 或 Blob 类型'
);
}
const
objectName
=
`
uploads/
${
props
.
projectBizId
}
/
${
Date
.
now
()}
_
${
item
.
uid
}
_
${
file
.
name
}
`
;
console
.
log
(
ossClient
.
value
)
const
objectName
=
`
${
ossClient
.
value
.
options
.
filePrefix
}${
props
.
projectBizId
}
${
Date
.
now
()}
_
${
item
.
uid
}
_
${
file
.
name
}
`
;
item
.
status
=
'uploading'
;
item
.
startTime
=
Date
.
now
();
...
...
@@ -360,8 +362,6 @@ const uploadSingleFile = async (item) => {
item
.
status
=
'success'
;
item
.
progress
=
100
;
item
.
speed
=
'-'
;
// const endpoint = client.options.endpoint.replace(/^https?:\/\//, '');
const
endpoint
=
client
.
options
.
endpoint
.
host
;
item
.
url
=
`https://
${
client
.
options
.
bucket
}
.
${
endpoint
}
/
${
objectName
}
`
;
...
...
@@ -400,6 +400,7 @@ const startUpload = async () => {
tenantBizId
:
props
.
tenantBizId
,
projectBizId
:
props
.
projectBizId
,
objectBizId
:
props
.
objectBizId
,
projectType
:
props
.
projectType
,
objectType
:
props
.
objectType
,
objectTableName
:
props
.
objectTableName
,
objectName
:
props
.
objectName
,
...
...
src/views/sign/appointment/components/fileUpload.vue
View file @
57bd0f29
...
...
@@ -85,6 +85,7 @@
<div
class=
"fileUploadBox"
>
<el-upload
:action=
"uploadImgUrl"
:data=
"{'projectBizId':userStore.projectInfo.projectBizId}"
:headers=
"headers"
multiple
:limit=
"limit"
...
...
@@ -138,6 +139,8 @@ import CardOne from '@/components/formCard/cardOne'
import
{
getToken
}
from
'@/utils/auth'
import
{
addFile
,
getAppointmentFile
,
delFile
,
editAppointmentFile
}
from
'@/api/sign/appointment'
import
useDictStore
from
'@/store/modules/dict'
import
useUserStore
from
'@/store/modules/user'
const
userStore
=
useUserStore
()
import
{
uploadMaterialList
,
delUploadFile
,
...
...
@@ -395,7 +398,7 @@ const uploadSuccess = (res, file, fileList) => {
// 删除已上传的文件(仅从列表移除,不调用后端删除)
const
removeUploadedFile
=
(
file
,
index
)
=>
{
try
{
delUploadFile
(
file
.
fileBizId
).
then
(
response
=>
{
delUploadFile
(
file
.
fileBizId
,
userStore
.
projectInfo
.
projectBizId
).
then
(
response
=>
{
uploadedFiles
.
value
.
splice
(
index
,
1
)
})
}
catch
(
error
)
{
...
...
src/views/sign/underwritingMain/policyDetail.vue
View file @
57bd0f29
...
...
@@ -199,6 +199,7 @@
:project-biz-id=
"userStore.projectInfo.projectBizId"
:object-biz-id=
"props.policyBizId"
:object-type=
"'DOCUMENT'"
:project-type=
"'pc'"
:upload-concurrency=
"3"
ref=
"uploaderRef"
/>
...
...
@@ -1117,7 +1118,7 @@ const handleCancel = () => {
const
deleteFile
=
(
row
)
=>
{
console
.
log
(
row
)
const
fileBizId
=
row
.
fileBizId
||
''
;
delUploadFile
(
fileBizId
).
then
(
res
=>
{
delUploadFile
(
fileBizId
,
userStore
.
projectInfo
.
projectBizId
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
===
200
){
getAttachmentListDetail
(
props
.
policyBizId
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment