CNCEC_APP/pages/index/board/safe/bigCrisisCard.vue

61 lines
1.0 KiB
Vue
Raw Normal View History

2026-03-25 14:54:15 +08:00
<template>
<ChartCard margin="0 0 30rpx 0" title="危大工程数">
2026-03-25 14:54:15 +08:00
<view class="big-crisis">
<qiun-data-charts type="column" :opts="opts" :canvas2d="false" :chartData="chartData" @getIndex="handleTap" />
2026-03-25 14:54:15 +08:00
</view>
</ChartCard>
</template>
<script setup>
import ChartCard from '@/components/chartCard.vue'
import {
ref,onMounted
2026-03-25 14:54:15 +08:00
} from 'vue';
const opts = ref({
padding: [15, 15, 0, 5],
enableScroll: false,
legend: {
show: false
},
xAxis: {
disableGrid: true
},
yAxis: {
data: [{
min: 0
}]
},
extra: {
column: {
type: "group",
width: 20,
activeBgColor: "#000000",
activeBgOpacity: 0.08
}
}
})
const chartData = ref({})
const handleTap = (e) => {
console.log(e)
}
onMounted(() => {
2026-03-25 14:54:15 +08:00
let res = {
categories: ["已完成个数", "进行中个数", "作业人数", "培训人次数"],
2026-03-25 14:54:15 +08:00
series: [{
data: [35, 36, 31, 33]
2026-03-25 14:54:15 +08:00
}]
};
chartData.value = JSON.parse(JSON.stringify(res));
})
</script>
<style lang="scss">
.big-crisis {
width: 100%;
height: 400rpx;
}
</style>