data is virtual complete
This commit is contained in:
@@ -1,50 +1,83 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
<view id="chart" style="width: 100%; height: 400px;"></view>
|
||||||
|
<view id="pie" style="width: 100%; height: 400px;"></view>
|
||||||
|
<view id="category" style="width: 100%; height: 400px;"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import * as echarts from "../../js_sdk/u-charts/echarts.min.js"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
chart: null,
|
||||||
|
category: null,
|
||||||
|
pie: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
mounted() {
|
||||||
async requests(gest,path){
|
this.$nextTick(() => {
|
||||||
let test
|
this.chart = echarts.init(document.getElementById('chart'))
|
||||||
if(gest=="get"){
|
this.chart.setOption({
|
||||||
let text = await fetch(`http://124.93.196.45:10091/Neusoft/times-model${path}`,{
|
color: ['#614321', '#456124'],
|
||||||
method:"GET",
|
xAxis: {
|
||||||
headers:{
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||||
"Content-Type":"application/json",
|
},
|
||||||
"Authorization":(await this.requests("POST","/app/login"))
|
yAxis: {},
|
||||||
}
|
series: [{
|
||||||
})
|
type: 'bar',
|
||||||
}else if(gest="POST"){
|
data: [23, 24, 18, 25, 27, 100, 25]
|
||||||
let text = await fetch(`http://124.93.196.45:10091/Neusoft/times-model${path}`,{
|
}, {
|
||||||
method:"GET",
|
type: 'bar',
|
||||||
headers:{
|
data: [23, 24, 18, 25, 27, 42, 25]
|
||||||
"Content-Type":"application/json",
|
}]
|
||||||
},
|
})
|
||||||
body:JSON.stringify({
|
})
|
||||||
"password": "0CYdq6Hn",
|
this.$nextTick(() => {
|
||||||
"username": "6dOMIgIU"
|
this.pie = echarts.init(document.getElementById("pie"))
|
||||||
})
|
this.pie.setOption({
|
||||||
})
|
series: [{
|
||||||
}
|
type: "pie",
|
||||||
const data = await text
|
data: [{
|
||||||
console.log(data);
|
value: 10,
|
||||||
}
|
name: "10%"
|
||||||
},
|
}, {
|
||||||
async mounted(){
|
value: 20,
|
||||||
let get=[]
|
name: "20%"
|
||||||
|
}, {
|
||||||
|
value: 25,
|
||||||
|
name: "25%"
|
||||||
|
}, {
|
||||||
|
value: 10,
|
||||||
|
name: "10%"
|
||||||
|
}, {
|
||||||
|
value: 15,
|
||||||
|
name: "15%"
|
||||||
|
}, {
|
||||||
|
value: 20,
|
||||||
|
name: "20%"
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.category = echarts.init(document.getElementById("category"))
|
||||||
|
this.category.setOption({
|
||||||
|
xAxis: {
|
||||||
|
data: [30, 20, 31, 41, 73, 42, 25]
|
||||||
|
},
|
||||||
|
yAxis: {},
|
||||||
|
series: [{
|
||||||
|
type: "line",
|
||||||
|
data: [23, 24, 18, 25, 27, 42, 25]
|
||||||
|
}, {
|
||||||
|
type: "line",
|
||||||
|
data: [32, 24, 42, 25, 72, 42, 25]
|
||||||
|
}]
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user