66 lines
1.1 KiB
Vue
66 lines
1.1 KiB
Vue
<template>
|
|
<ChartCard margin="30rpx 0 0 0" title="工程划分">
|
|
<view class="inspection ">
|
|
<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: {
|
|
showTitle: true,
|
|
data: [{
|
|
title: "单位:个"
|
|
}]
|
|
},
|
|
extra: {
|
|
column: {
|
|
type: "group",
|
|
width: 30,
|
|
activeBgColor: "#000000",
|
|
activeBgOpacity: 0.08,
|
|
}
|
|
}
|
|
})
|
|
|
|
const chartData = ref({})
|
|
|
|
const handleTap = (e) => {
|
|
console.log(e)
|
|
}
|
|
|
|
|
|
onReady(() => {
|
|
let res = {
|
|
categories: ["单位工程数", "分部工程数", "分项工程数"],
|
|
series: [{
|
|
name: '',
|
|
data: [10000, 5428, 6852]
|
|
},
|
|
]
|
|
};
|
|
chartData.value = JSON.parse(JSON.stringify(res));
|
|
})
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.inspection {
|
|
width: 100%;
|
|
height: 300rpx;
|
|
}
|
|
</style> |