Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
中汽研标准应用数据库
car-database-web
Commits
0ab8053f
Commit
0ab8053f
authored
Feb 12, 2025
by
高滢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(检测方案): 添加声明文件
parent
a0adf02f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
38 deletions
+74
-38
inputUpload.vue
src/components/CheckCoiumns/inputUpload.vue
+74
-38
No files found.
src/components/CheckCoiumns/inputUpload.vue
View file @
0ab8053f
<
template
>
<div>
<div
class=
"input-upload"
>
<el-input
v-bind=
"items"
...
...
@@ -12,10 +13,8 @@
<el-upload
class=
"upload-demo"
:action=
"uploadImgUrl"
:on-preview=
"handlePreview"
v-model=
"model.file"
ref=
"fileUpload"
:on-remove=
"handleRemove"
:before-remove=
"beforeRemove"
:show-file-list=
"false"
:limit=
"1"
...
...
@@ -34,6 +33,30 @@
</div>
</el-upload>
</div>
<div
v-if=
"prop=='chcek5'"
>
<el-upload
class=
"upload-demo"
:action=
"uploadImgUrl"
v-model=
"model.statementFile"
ref=
"fileUploadStatement"
:before-remove=
"beforeRemove"
:show-file-list=
"false"
:limit=
"1"
accept=
".pdf ,.doc ,.docx ,.xls, .xlsx"
:on-success=
"handleSuccessFile"
:on-exceed=
"handleExceed"
:headers=
"headers"
>
<el-button
size=
"small"
:disabled=
"status"
type=
"text"
>
当车企没有授权的第三方应用时,点击此处上传声明文件
</el-button>
<div
slot=
"tip"
class=
"el-upload__tip"
>
<div
v-if=
"model.statementPath"
>
<el-link
:href=
"model.statementPath"
>
{{
model
.
statementName
}}
</el-link>
</div>
</div>
</el-upload>
</div>
</div>
</
template
>
<
script
>
export
default
{
...
...
@@ -60,7 +83,10 @@ export default {
value
:
''
,
file
:
''
,
path
:
''
,
name
:
''
name
:
''
,
statementFile
:
''
,
statementPath
:
''
,
statementName
:
''
,
},
headers
:
{
Authorization
:
'Bearer '
+
this
.
$store
.
getters
.
token
...
...
@@ -79,6 +105,7 @@ export default {
}
},
mounted
()
{
console
.
log
(
'12121212222222'
,
this
.
prop
)
if
(
this
.
defaultValue
)
{
this
.
model
=
this
.
defaultValue
this
.
$emit
(
'changeVal'
,
{
name
:
this
.
prop
,
val
:
this
.
result
})
...
...
@@ -105,20 +132,18 @@ export default {
value
:
''
,
file
:
''
,
path
:
''
,
name
:
''
name
:
''
,
statementFile
:
''
,
statementPath
:
''
,
statementName
:
''
,
}
},
setDefaultValue
(
val
)
{
this
.
value
=
val
},
handleRemove
(
file
,
fileList
)
{
console
.
log
(
file
,
fileList
)
},
handlePreview
(
file
)
{
console
.
log
(
file
)
},
handleSuccess
(
res
,
file
)
{
if
(
res
.
code
===
200
)
{
console
.
log
(
this
.
model
)
this
.
model
.
path
=
process
.
env
.
VUE_APP_IMAGE_API
+
res
.
url
this
.
model
.
name
=
res
.
originalFilename
this
.
$refs
.
fileUpload
.
clearFiles
()
...
...
@@ -127,6 +152,17 @@ export default {
this
.
$message
.
error
(
'error'
)
}
},
handleSuccessFile
(
res
,
file
)
{
if
(
res
.
code
===
200
)
{
console
.
log
(
this
.
model
)
this
.
model
.
statementPath
=
process
.
env
.
VUE_APP_IMAGE_API
+
res
.
url
this
.
model
.
statementName
=
res
.
originalFilename
this
.
$refs
.
fileUploadStatement
.
clearFiles
()
this
.
$message
.
success
(
'上传成功'
)
}
else
{
this
.
$message
.
error
(
'error'
)
}
},
handleExceed
(
files
,
fileList
)
{
this
.
$message
.
warning
(
`当前限制选择 1 个文件,本次选择了
${
files
.
length
}
个文件,共选择了
${
...
...
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