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

65 lines
1.1 KiB
Vue

<template>
<ChartCard margin="0 0 30rpx 0" title="危大工程管控数据">
<view class="big-crisis">
<qiun-data-charts type="column" :opts="opts" :chartData="chartData" @getIndex="handleTap" />
</view>
</ChartCard>
</template>
<script setup>
import ChartCard from '@/components/chartCard.vue'
import {
ref
} from 'vue';
import {
onReady
} from '@dcloudio/uni-app'
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)
}
onReady(() => {
let res = {
categories: ["未开始", "进行中", "已完成", "培训人次", "作业人次"],
series: [{
data: [35, 36, 31, 33, 13]
}]
};
chartData.value = JSON.parse(JSON.stringify(res));
})
</script>
<style lang="scss">
.big-crisis {
width: 100%;
height: 400rpx;
}
</style>