2023-08-12 15:44:27 +00:00
|
|
|
<template>
|
2023-12-03 07:44:34 +00:00
|
|
|
<view class="content">
|
|
|
|
|
<image class="logo" src="@/static/logo.png"></image>
|
|
|
|
|
<view class="text-area">
|
|
|
|
|
<text class="title">Hello RuoYi-Vue</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="text-area">
|
|
|
|
|
<up-text type="primary" text="uview-plus"></up-text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="charts-box">
|
|
|
|
|
<qiun-data-charts type="column" :chartData="chartData" />
|
|
|
|
|
</view>
|
2023-08-12 15:44:27 +00:00
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
2023-08-14 12:38:10 +00:00
|
|
|
<script setup>
|
|
|
|
|
import { ref, onMounted } from 'vue';
|
|
|
|
|
|
2023-12-03 07:44:34 +00:00
|
|
|
const chartData = ref({});
|
|
|
|
|
|
|
|
|
|
onMounted(() => { getServerData() });
|
|
|
|
|
|
|
|
|
|
function 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],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
chartData.value = JSON.parse(JSON.stringify(res));
|
|
|
|
|
}, 500);
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2023-08-12 15:44:27 +00:00
|
|
|
|
2023-12-03 07:44:34 +00:00
|
|
|
<style scoped>
|
|
|
|
|
.content {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2023-08-12 15:44:27 +00:00
|
|
|
}
|
2023-12-03 07:44:34 +00:00
|
|
|
|
|
|
|
|
.logo {
|
|
|
|
|
height: 200rpx;
|
|
|
|
|
width: 200rpx;
|
|
|
|
|
margin-top: 200rpx;
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
margin-right: auto;
|
|
|
|
|
margin-bottom: 50rpx;
|
2023-08-12 15:44:27 +00:00
|
|
|
}
|
2023-12-03 07:44:34 +00:00
|
|
|
|
|
|
|
|
.text-area {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
2023-08-12 15:44:27 +00:00
|
|
|
}
|
|
|
|
|
|
2023-12-03 07:44:34 +00:00
|
|
|
.title {
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
color: #8f8f94;
|
|
|
|
|
}
|
2023-08-12 15:44:27 +00:00
|
|
|
|
2023-12-03 07:44:34 +00:00
|
|
|
.charts-box {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 300px;
|
2023-08-12 15:44:27 +00:00
|
|
|
}
|
|
|
|
|
</style>
|