Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pda-ui
Project
Project
Details
Activity
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
pda
pda-ui
Commits
911e9aa3
Commit
911e9aa3
authored
Jul 16, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化作业端版本记录上传
parent
0ecfcdb2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
index.vue
src/views/system/version/index.vue
+12
-10
No files found.
src/views/system/version/index.vue
View file @
911e9aa3
...
...
@@ -118,7 +118,7 @@
:headers=
"headers"
:show-file-list=
"false"
:limit=
"1"
>
<el-button
size=
"small"
type=
"primary"
>
浏览
</el-button>
<el-button
size=
"small"
type=
"primary"
:loading=
"loading"
>
浏览
</el-button>
</el-upload>
</el-input>
</el-form-item>
...
...
@@ -166,6 +166,7 @@
title
:
""
,
// 是否显示弹出层
open
:
false
,
loading
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
...
...
@@ -189,18 +190,18 @@
methods
:
{
// 上传前校检格式和大小
handleBeforeUpload
(
file
)
{
// 校检文件大小
if
(
this
.
fileSize
)
{
const
isLt
=
file
.
size
/
1024
/
1024
<
this
.
fileSize
;
if
(
!
isLt
)
{
this
.
$message
.
error
(
`上传文件大小不能超过
${
this
.
fileSize
}
MB!`
);
return
false
;
}
this
.
loading
=
true
// 校检文件后缀名
if
(
file
&&
file
.
name
&&
file
.
name
.
substring
(
file
.
name
.
lastIndexOf
(
'.'
)
+
1
)
===
'apk'
)
{
return
true
;
}
else
{
this
.
$message
.
error
(
'请上传APK安装包'
);
this
.
loading
=
false
return
false
;
}
console
.
log
(
'file'
,
file
)
return
true
;
},
handleUploadSuccess
(
res
,
file
)
{
this
.
loading
=
false
// 如果上传成功
if
(
res
.
code
==
200
)
{
this
.
form
.
url
=
res
.
url
...
...
@@ -211,6 +212,7 @@
this
.
$refs
.
upload
.
clearFiles
();
},
handleUploadError
()
{
this
.
loading
=
false
this
.
$message
.
error
(
"文件上传失败"
);
},
/** 查询作业端版本记录列表 */
...
...
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