diff --git a/src/views/Main/DailyPatrolCard/index.vue b/src/views/Main/DailyPatrolCard/index.vue
index a02d311..85ace85 100644
--- a/src/views/Main/DailyPatrolCard/index.vue
+++ b/src/views/Main/DailyPatrolCard/index.vue
@@ -4,10 +4,10 @@
-
问题处理进度:23%
+
问题处理进度:{{progressCount}}%
@@ -40,6 +40,7 @@ const handleResize = () => {
};
const dailyData: any = ref([]);
const dailyCount = ref(0);
+const progressCount = ref(0)
const getChartData = async (time: any) => {
dailyCount.value = 0;
dailyData.value = [];
@@ -220,10 +221,29 @@ const initChart = () => {
// Set options and render chart
chart.setOption(option);
};
+const getProgressData = async (time: any) => {
+ progressCount.value = 0;
+ const pramas = {
+ // endTime: '',
+ // startTime: '',
+ ...time,
+ group: 'K6_1'
+ };
+ const data: any = await chartStore.initStatisticChart(pramas);
+ if (data?.yaxis?.length) {
+ let newArr = data.yaxis.flatMap((v: any) => v.series);
+ newArr?.forEach((item: any) => {
+ if (item.name == '比例') {
+ progressCount.value = Number(item.sum) || 0;
+ }
+ });
+ }
+};
watch(
() => props.timeRange,
(newVal) => {
getChartData(newVal);
+ getProgressData(newVal)
}
);
onMounted(() => {