This commit is contained in:
2026-08-17 11:01:21 +08:00
parent 6e07cab51f
commit 255573ed06
705 changed files with 8762 additions and 36677 deletions
+28 -16
View File
@@ -1,6 +1,6 @@
<template>
<ChartCard margin="30rpx 0 0 0" title="施工方案数">
<view class="inspection">
<view class="inspection" @click="router.push('/pages/quality/constructionPlan/index')">
<qiun-data-charts type="column" :canvas2d="false" :opts="opts" :chartData="chartData" @getIndex="handleTap" />
</view>
</ChartCard>
@@ -8,7 +8,14 @@
<script setup>
import ChartCard from '@/components/chartCard.vue';
import { ref, onMounted } from 'vue';
import { ref, watch } from 'vue';
import { router } from '@/utils';
let props = defineProps({
constructSolutionData: {
type: Array,
default: () => []
}
});
const opts = ref({
padding: [15, 15, 0, 5],
@@ -40,20 +47,25 @@ const chartData = ref({});
const handleTap = (e) => {
console.log(e);
};
onMounted(() => {
let res = {
categories: ['方案总数', '企业审批总数', '项目审批总数'],
series: [
{
color: '#5c7fcb',
name: '',
data: [100, 542, 685]
}
]
};
chartData.value = JSON.parse(JSON.stringify(res));
});
watch(
() => props.constructSolutionData,
(newVal) => {
if (newVal && newVal.length) {
console.log('监听数据', newVal);
// 只有当数据存在时才赋值
let res = {
categories: ['方案总数', '企业审批总数', '项目审批总数'],
series: [
{
data: newVal
}
]
};
chartData.value = JSON.parse(JSON.stringify(res));
}
},
{ deep: true, immediate: true }
);
</script>
<style lang="scss">