Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pet-business-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
刘怀志
pet-business-web
Commits
f7a704fc
Commit
f7a704fc
authored
Aug 23, 2023
by
陈明豪
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
451ff952
08e64a6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
btn.scss
src/assets/styles/btn.scss
+2
-2
index.vue
src/components/FileUpload/index.vue
+7
-3
download.js
src/plugins/download.js
+11
-2
No files found.
src/assets/styles/btn.scss
View file @
f7a704fc
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
border
:
1px
solid
#5BB647
!
important
;
border
:
1px
solid
#5BB647
!
important
;
color
:
#FFFFFF
!
important
;
color
:
#FFFFFF
!
important
;
}
}
&
.is-disabled
,
&
.is-disabled
:hover
,
&
.is-disabled
:focus
,
&
.permi-disabled
,
&
.permi-disabled
:hover
,
&
.permi-disabled
:focus
{
&
.is-disabled
.el-button.el-button--default
,
&
.is-disabled.el-button.el-button--default
:hover
,
&
.is-disabled.el-button.el-button--default
:focus
,
&
.permi-disabled.el-button.el-button--default
,
&
.permi-disabled.el-button.el-button--default
:hover
,
&
.permi-disabled.el-button.el-button--default
:focus
{
background
:
#83C374
!
important
;
background
:
#83C374
!
important
;
color
:
#FFFFFF
!
important
;
color
:
#FFFFFF
!
important
;
border
:
1px
solid
#83C374
!
important
;
border
:
1px
solid
#83C374
!
important
;
...
@@ -197,7 +197,7 @@
...
@@ -197,7 +197,7 @@
color
:
#FFFFFF
!
important
;
color
:
#FFFFFF
!
important
;
border
:
1px
solid
#55A343
!
important
;
border
:
1px
solid
#55A343
!
important
;
}
}
&
.is-disabled
,
&
.is-disabled
:hover
,
&
.is-disabled
:focus
,
&
.permi-disabled
,
&
.permi-disabled
:hover
,
&
.permi-disabled
:focus
{
&
.is-disabled
.el-button.el-button--default
,
&
.is-disabled.el-button.el-button--default
:hover
,
&
.is-disabled.el-button.el-button--default
:focus
,
&
.permi-disabled.el-button.el-button--default
,
&
.permi-disabled.el-button.el-button--default
:hover
,
&
.permi-disabled.el-button.el-button--default
:focus
{
background
:
#83C374
!
important
;
background
:
#83C374
!
important
;
color
:
#FFFFFF
!
important
;
color
:
#FFFFFF
!
important
;
border
:
1px
solid
#83C374
!
important
;
border
:
1px
solid
#83C374
!
important
;
...
...
src/components/FileUpload/index.vue
View file @
f7a704fc
...
@@ -194,11 +194,15 @@ export default {
...
@@ -194,11 +194,15 @@ export default {
},
},
// 获取展示文件名称
// 获取展示文件名称
getShowFileName
(
name
)
{
getShowFileName
(
name
)
{
if
(
name
.
lastIndexOf
(
'-'
)
>
-
1
)
{
const
keyword
=
'-'
return
name
.
substring
(
name
.
lastIndexOf
(
'-'
)
+
1
)
const
index
=
name
.
indexOf
(
keyword
,
name
.
indexOf
(
keyword
)
+
1
)
let
result
=
''
if
(
index
!==
-
1
)
{
result
=
name
.
substring
(
index
+
keyword
.
length
)
}
else
{
}
else
{
re
turn
'
'
re
sult
=
'aa.pdf
'
}
}
return
result
},
},
// 对象转成指定字符串分隔
// 对象转成指定字符串分隔
listToString
(
list
,
separator
)
{
listToString
(
list
,
separator
)
{
...
...
src/plugins/download.js
View file @
f7a704fc
...
@@ -26,7 +26,7 @@ export default {
...
@@ -26,7 +26,7 @@ export default {
})
})
},
},
resource
(
resource
)
{
resource
(
resource
)
{
var
url
=
baseURL
+
'
/common/download/resource?resource
='
+
encodeURIComponent
(
resource
)
var
url
=
baseURL
+
'
business/common/downloadMinio?url
='
+
encodeURIComponent
(
resource
)
axios
({
axios
({
method
:
'get'
,
method
:
'get'
,
url
:
url
,
url
:
url
,
...
@@ -36,7 +36,16 @@ export default {
...
@@ -36,7 +36,16 @@ export default {
const
isBlob
=
blobValidate
(
res
.
data
)
const
isBlob
=
blobValidate
(
res
.
data
)
if
(
isBlob
)
{
if
(
isBlob
)
{
const
blob
=
new
Blob
([
res
.
data
])
const
blob
=
new
Blob
([
res
.
data
])
this
.
saveAs
(
blob
,
decodeURIComponent
(
res
.
headers
[
'download-filename'
]))
const
url
=
res
.
config
[
'url'
]
const
keyword
=
'-'
const
index
=
url
.
indexOf
(
keyword
,
url
.
indexOf
(
keyword
,
url
.
indexOf
(
keyword
)
+
1
)
+
1
)
let
result
=
''
if
(
index
!==
-
1
)
{
result
=
url
.
substring
(
index
+
keyword
.
length
)
}
else
{
result
=
'aa.pdf'
}
this
.
saveAs
(
blob
,
decodeURIComponent
(
result
))
}
else
{
}
else
{
this
.
printErrMsg
(
res
.
data
)
this
.
printErrMsg
(
res
.
data
)
}
}
...
...
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