no message
Former-commit-id: 4c20c279c2c6c0fd9766a1552544edda0418de37 Former-commit-id: e43f4acecf8f3cf1fc4a68c7d3c4b7c6fd6647a4 Former-commit-id: dffb8bf6fd083a6187ea42fc2347d358ce4236c4
This commit is contained in:
@@ -28,6 +28,7 @@ export default {
|
||||
return {
|
||||
chart: [
|
||||
{
|
||||
api: {url: '/api/chart/G2Line', data: {code: 1}},
|
||||
data: [],
|
||||
padding: [30, 40, 50, 50]
|
||||
}
|
||||
@@ -57,10 +58,7 @@ export default {
|
||||
methods: {
|
||||
// 请求图表数据
|
||||
syncData () {
|
||||
const api = [
|
||||
{url: '/api/chart/G2Line', data: {code: 1}}
|
||||
]
|
||||
this.$axios.all(api.map(e => this.$axios.post(e.url, e.data)))
|
||||
this.$axios.all(this.chart.map(e => this.$axios.post(e.api.url, e.api.data)))
|
||||
.then(this.$axios.spread((...res) => {
|
||||
res.forEach((e, index) => {
|
||||
this.chart[index].data = e
|
||||
|
||||
Reference in New Issue
Block a user