From 925b485e661682a2fcfc8b8a47a8148d16ec818e Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期六, 11 十月 2025 13:08:54 +0800
Subject: [PATCH] 新增最终数据产品月度巡查简报
---
src/views/fysp/data-product/middle-data-product/ProdProblemCountSummary.vue | 96 +++++++++++++++++++++++++----------------------
1 files changed, 51 insertions(+), 45 deletions(-)
diff --git a/src/views/fysp/data-product/middle-data-product/ProdProblemCountSummary.vue b/src/views/fysp/data-product/middle-data-product/ProdProblemCountSummary.vue
index a743ccc..8baf62d 100644
--- a/src/views/fysp/data-product/middle-data-product/ProdProblemCountSummary.vue
+++ b/src/views/fysp/data-product/middle-data-product/ProdProblemCountSummary.vue
@@ -7,7 +7,10 @@
:loading="loading"
>
<template #step1="{ onSearch }">
- <ProdQueryOptCompare :loading="loading" @submit="onSearch"></ProdQueryOptCompare>
+ <ProdQueryOptCompare
+ :loading="loading"
+ @submit="onSearch"
+ ></ProdQueryOptCompare>
</template>
<template #step2="{ contentHeight }">
<el-scrollbar :height="contentHeight">
@@ -78,11 +81,12 @@
import * as echarts from 'echarts';
import dayjs from 'dayjs';
import BaseProdProcess from '@/views/fysp/data-product/components/BaseProdProcess.vue';
+import ProdQueryOptCompare from '@/views/fysp/data-product/components/ProdQueryOptCompare.vue';
import dataprodmiddleApi from '@/api/fysp/dataprodmiddleApi.js';
import { conversionFromTable } from '@/utils/excel';
import { useProdStepChange } from '@/views/fysp/data-product/prod-step-change.js';
import { barChartOption, downloadChartImage } from '@/utils/echart-util.js';
-import ProdQueryOptCompare from '@/views/fysp/data-product/components/ProdQueryOptCompare.vue';
+import Proxy from '@/views/fysp/data-product/middle-data-product/ProdProblemCountSummaryProxy.js';
const { active, changeActive } = useProdStepChange();
const loading = ref(false);
@@ -92,18 +96,19 @@
let chart;
const tableData = computed(() => {
- return tableData1.value.map((item) => {
- const last = tableData2.value.find(
- (item2) => item2.townCode === item.townCode
- );
- item.ratio = Math.round(item.ratio * 10) / 10 || 0;
- return {
- ...item,
- lastSceneCount: last?.sceneCount || 0,
- lastProblemCount: last?.problemCount || 0,
- lastRatio: Math.round((last?.ratio || 0) * 10) / 10 || 0
- };
- });
+ // return tableData1.value.map((item) => {
+ // const last = tableData2.value.find(
+ // (item2) => item2.townCode === item.townCode
+ // );
+ // item.ratio = Math.round(item.ratio * 10) / 10 || 0;
+ // return {
+ // ...item,
+ // lastSceneCount: last?.sceneCount || 0,
+ // lastProblemCount: last?.problemCount || 0,
+ // lastRatio: Math.round((last?.ratio || 0) * 10) / 10 || 0
+ // };
+ // });
+ return Proxy.combineData(tableData1.value, tableData2.value);
});
function onStep1(opts) {
@@ -147,39 +152,40 @@
if (chart == undefined) {
chart = echarts.init(chartRef.value);
}
- const year = dayjs(opt1.startTime).year();
- const month1 = dayjs(opt1.startTime).month() + 1;
- const month2 = dayjs(opt2.startTime).month() + 1;
- const time = `${year}骞�${month1}鏈堛��${month2}鏈坄;
- const option = barChartOption();
- option.title.text = `${time}${opt1.districtName}鍚勮閬擄紙闀囷級${opt1.sceneTypeName}鎵皹姹℃煋闂鏁板潎鍊煎姣擿;
+ // const year = dayjs(opt1.startTime).year();
+ // const month1 = dayjs(opt1.startTime).month() + 1;
+ // const month2 = dayjs(opt2.startTime).month() + 1;
+ // const time = `${year}骞�${month1}鏈堛��${month2}鏈坄;
+ // const option = barChartOption();
+ // option.title.text = `${time}${opt1.districtName}鍚勮閬擄紙闀囷級${opt1.sceneTypeName}鎵皹姹℃煋闂鏁板潎鍊煎姣擿;
- option.xAxis.name = '琛楅亾锛堥晣锛�';
- option.xAxis.data = tableData.value.map((item) => item.townName);
- option.yAxis.name = '闂鏁板潎鍊�';
+ // option.xAxis.name = '琛楅亾锛堥晣锛�';
+ // option.xAxis.data = tableData.value.map((item) => item.townName);
+ // option.yAxis.name = '闂鏁板潎鍊�';
- option.series = [
- {
- name: `${month1}鏈坄,
- type: 'bar', // 鍥捐〃绫诲瀷鏀逛负鏌辩姸鍥�
- data: tableData.value.map((item) => item.ratio),
- label: {
- show: true,
- position: 'top', // 鏍囩鏄剧ず鍦ㄦ煴瀛愰《閮�
- formatter: '{c}' // 鏍囩鏍煎紡锛氭暟閲�
- }
- },
- {
- name: `${month2}鏈坄,
- type: 'bar', // 鍥捐〃绫诲瀷鏀逛负鏌辩姸鍥�
- data: tableData.value.map((item) => item.lastRatio),
- label: {
- show: true,
- position: 'top', // 鏍囩鏄剧ず鍦ㄦ煴瀛愰《閮�
- formatter: '{c}' // 鏍囩鏍煎紡锛氭暟閲�
- }
- }
- ];
+ // option.series = [
+ // {
+ // name: `${month1}鏈坄,
+ // type: 'bar', // 鍥捐〃绫诲瀷鏀逛负鏌辩姸鍥�
+ // data: tableData.value.map((item) => item.ratio),
+ // label: {
+ // show: true,
+ // position: 'top', // 鏍囩鏄剧ず鍦ㄦ煴瀛愰《閮�
+ // formatter: '{c}' // 鏍囩鏍煎紡锛氭暟閲�
+ // }
+ // },
+ // {
+ // name: `${month2}鏈坄,
+ // type: 'bar', // 鍥捐〃绫诲瀷鏀逛负鏌辩姸鍥�
+ // data: tableData.value.map((item) => item.lastRatio),
+ // label: {
+ // show: true,
+ // position: 'top', // 鏍囩鏄剧ず鍦ㄦ煴瀛愰《閮�
+ // formatter: '{c}' // 鏍囩鏍煎紡锛氭暟閲�
+ // }
+ // }
+ // ];
+ const option = Proxy.genChartOption(opt1, opt2, tableData.value);
chart.setOption(option);
}
--
Gitblit v1.9.3