Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
Laisi_AutoMES2
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
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
jiawei.su
Laisi_AutoMES2
Commits
074e22d5
Commit
074e22d5
authored
Jan 22, 2021
by
yucheng.jiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载
parent
96f66c8a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
1 deletion
+51
-1
accountInfo.vue
Html/src/view/fms/config/accountInfo.vue
+51
-1
No files found.
Html/src/view/fms/config/accountInfo.vue
View file @
074e22d5
...
@@ -239,7 +239,17 @@ export default {
...
@@ -239,7 +239,17 @@ export default {
render
:(
h
,
params
)
=>
{
render
:(
h
,
params
)
=>
{
return
h
(
'span'
,{
return
h
(
'span'
,{
style
:{
style
:{
color
:
'#2b85e4'
color
:
'#2b85e4'
,
cursor
:
'pointer'
},
on
:{
click
:()
=>
{
let
name
=
params
.
row
.
filename
;
let
url
=
params
.
row
.
fileurl
;
if
(
url
){
this
.
downFile
(
url
,
name
);
}
}
}
}
},
params
.
row
.
filename
);
},
params
.
row
.
filename
);
}
}
...
@@ -519,6 +529,46 @@ export default {
...
@@ -519,6 +529,46 @@ export default {
this
.
fileurl
=
''
;
this
.
fileurl
=
''
;
},
},
/*********文件上传 end******** */
/*********文件上传 end******** */
//下载文件
downFile
(
url
,
fileName
){
let
params
=
{
name
:
fileName
,
url
:
url
,
};
this
.
axios
.
request
({
url
:
"/config/Download/DownloadFileByUrl"
,
params
,
method
:
"get"
,
responseType
:
"blob"
,
})
.
then
((
res
)
=>
{
console
.
log
(
111111
)
console
.
log
(
res
)
if
(
res
.
status
==
200
)
{
if
(
res
.
data
){
let
url
;
let
link
=
document
.
createElement
(
"a"
);
url
=
window
.
URL
.
createObjectURL
(
data
);
link
.
style
.
display
=
"none"
;
link
.
href
=
url
;
link
.
setAttribute
(
"download"
,
fileName
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
}
}
}).
catch
(
error
=>
{
this
.
$Message
.
error
(
'请求错误'
)
});
// console.log(fileName)
// console.log(data)
// let url = window.URL.createObjectURL(new Blob([data]));
// let link = document.createElement("a");
// link.style.display = "none";
// link.href = url;
// link.setAttribute("download", fileName);
// document.body.appendChild(link);
// link.click();
},
//导出模板
//导出模板
loadexcel
()
{
loadexcel
()
{
// this.axios.request({
// this.axios.request({
...
...
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