yjtgq-app/pages/index/test.vue

61 lines
1.3 KiB
Vue
Raw Normal View History

2025-11-22 14:43:07 +08:00
<template>
<view class="charts-box">
<!-- <qiun-data-charts type="column" :chartData="chartData" /> -->
<!-- 11111 -->
<web-view src="http://192.168.66.38:3000/web#/mgr/home"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
chartData: {
categories: [],
series: [
{
name: "目标值",
data: []
},
{
name: "完成量",
data: []
}
]
},
};
},
mounted() {
this.getServerData();
},
methods: {
getServerData() {
//模拟从服务器获取数据时的延时
setTimeout(() => {
let res = {
categories: ["2016","2017","2018","2019","2020","2021"],
series: [
{
name: "目标值",
data: [35,36,31,33,13,34]
},
{
name: "完成量",
data: [18,27,21,24,6,28]
}
]
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 500);
},
}
};
</script>
<style lang="scss" scoped>
.charts-box{
width: 2000px;
height: 1000px;
}
</style>