代码上传

This commit is contained in:
yangchunyu 2024-06-26 18:03:23 +08:00
parent c8ce677444
commit c6f69f769b
2 changed files with 72 additions and 221 deletions

View File

@ -1,4 +1,5 @@
<template>
<view class="">
<view class="van-nav-bar">
<view class="van-nav-bar__content">
<view class="page-icon" @click="gotoBack">
@ -44,9 +45,7 @@
</view>
</view>
<view class="driving-print">
<view>
<view id="lineChartRef" :style="{ width: '200px', height: '200px' }" />
</view>
</view>
</view>
<view class="drivingList">
@ -81,7 +80,7 @@
<text class="warning">当前您的驾驶证积分清除截止时间为2024年08月30日零点</text>
</view>
</view>
</view>
</template>
<script setup>
@ -125,73 +124,9 @@
},
]
const option = {
series: [{
type: 'gauge',
min: 0, //
max: 12,
radius: '100%',
progress: {
show: true,
width: 18,
roundCap: true,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#A65FFB'
},
{
offset: 1,
color: '#3163F5'
}
])
}
},
axisLine: {
lineStyle: {
width: 18
},
roundCap: true
},
axisTick: {
show: false
},
splitLine: {
show: false
},
pointer: {
show: false
},
axisLabel: {
show: false
},
anchor: {
show: false
},
title: {
offsetCenter: [0, '20%'],
fontSize: 20
},
detail: {
valueAnimation: true,
formatter: '{value} 分',
color: 'inherit'
},
data: [{
value: 1,
name: '累计积分\n\n\n\n\n\n正常',
}]
}]
};
// ECharts
onMounted(() => {
// const lineChartContainer = lineChartRef.value;
const lineChartContainer = document.getElementById('lineChartRef');
if (lineChartContainer) {
const myChart = echarts.init(lineChartContainer);
myChart.setOption(option);
}
});
</script>
@ -290,6 +225,7 @@
.drivingList {
margin-bottom: 20rpx;
.item {
height: 120rpx;
background-color: #fff;
@ -305,7 +241,8 @@
width: 50rpx;
height: 50rpx;
}
.warning{
.warning {
display: inline-block;
margin-top: 20rpx;
font-size: 25rpx;

View File

@ -1,86 +0,0 @@
<template>
<view style="height: 300px; width: 200px; background-color: aqua">
<view id="lineChartRef" :style="{ width: '200px', height: '200px' }" />
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import * as echarts from 'echarts';
const option = {
series: [
{
type: 'gauge',
min: 0, //
max: 12,
radius: '35%',
progress: {
show: true,
width: 18,
roundCap: true,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: '#A65FFB'
},
{
offset: 1,
color: '#3163F5'
}
])
}
},
axisLine: {
lineStyle: {
width: 18
},
roundCap: true
},
axisTick: {
show: false
},
splitLine: {
show: false
},
pointer: {
show: false
},
axisLabel: {
show: false
},
anchor: {
show: false
},
title: {
offsetCenter: [0, '-30%'],
fontSize: 20
},
detail: {
valueAnimation: true,
formatter: '{value} 分\n正常',
color: 'inherit'
},
data: [
{
value: 1,
name: '累计积分'
}
]
}
]
};
// ECharts
onMounted(() => {
// const lineChartContainer = lineChartRef.value;
const lineChartContainer = document.getElementById('lineChartRef');
if (lineChartContainer) {
const myChart = echarts.init(lineChartContainer);
myChart.setOption(option);
}
});
</script>
<style></style>