-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
重新封装upload,download components. 补全components name 加入charts图表。
- Loading branch information
Showing
13 changed files
with
133 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import axios from 'axios' | ||
import {getToken} from '@/utils/auth' | ||
|
||
export default function (AffixID){ | ||
|
||
console.log(AffixID) | ||
return new Promise((resolve,reject)=>{ | ||
axios.get(`${process.env.BASE_API}file/download`, | ||
{ | ||
headers:{ | ||
auth:getToken() | ||
}, | ||
|
||
responseType: 'blob', // 表明返回服务器返回的数据类型, 没有会乱码 | ||
|
||
params: { | ||
AffixID, | ||
} | ||
|
||
} | ||
).then((response)=>{ | ||
let date = new Date(); | ||
let filefix = date.getFullYear() + '-' + date.getMonth() + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds(); | ||
let blob = new Blob([response.data],{ | ||
|
||
type: response.headers['Content-Type'] | ||
|
||
}); //创建一个blob对象 | ||
let a = document.createElement('a'); //创建一个<a></a>标签 | ||
a.href = URL.createObjectURL(blob); // response is a blob | ||
a.download = filefix + "下载文件.docx"; //文件名称 | ||
a.style.display = 'none'; | ||
document.body.appendChild(a); | ||
a.click(); | ||
a.remove(); | ||
|
||
resolve() | ||
|
||
}).catch(e=>{ | ||
reject(e) | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<div id="person_count" style="width:100%"> | ||
<mix-chart id="chart1" width="100%" height="600px" ></mix-chart> | ||
<line-marker id="chart2" width="100%" height="600px"></line-marker> | ||
<keyboard id="chart3" width="100%" height="600px"></keyboard> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import mixChart from "@/components/Charts/mixChart"; | ||
import lineMarker from "@/components/Charts/lineMarker"; | ||
import keyboard from "@/components/Charts/keyboard"; | ||
export default { | ||
name: "person_count", | ||
data() { | ||
return {} | ||
}, | ||
components: { | ||
mixChart, | ||
lineMarker, | ||
keyboard | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,7 @@ | |
<script> | ||
import axios from "axios"; | ||
export default { | ||
name:"book", | ||
data() { | ||
return { | ||
//表格当前页数据 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,8 @@ | |
<script> | ||
import axios from "axios"; | ||
export default { | ||
name:"movie", | ||
data() { | ||
return { | ||
//表格当前页数据 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,8 @@ | |
<script> | ||
import axios from "axios"; | ||
export default { | ||
name:"music", | ||
data() { | ||
return { | ||
//表格当前页数据 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,7 @@ | |
} from "@/api/system/dept"; | ||
export default { | ||
name:"dept", | ||
data() { | ||
return { | ||
textMap: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters