Browse Source

fix: 更换字段

feature-v1.0.0
ruancuihong 1 month ago
parent
commit
38f61a0cdc
  1. 15
      src/views/Main/DailyPatrolCard/index.vue
  2. 12
      src/views/Main/MonitoringCard/index.vue
  3. 2
      src/views/Main/ProjectCountCard/index.vue
  4. 2
      src/views/Main/RiskInspectionCard/index.vue

15
src/views/Main/DailyPatrolCard/index.vue

@ -4,10 +4,12 @@
<div class="echart-wrapper" ref="chartRef"></div>
<div class="appraise-progress">
<div class="tips">
<div>问题处理进度<span>{{progressCount}}%</span></div>
<div>
问题处理进度<span>{{ progressCount }}%</span>
</div>
</div>
<div class="progress">
<div class="progress-bar" :style="{width: `${progressCount}%`}"></div>
<div class="progress-bar" :style="{ width: `${progressCount}%` }"></div>
</div>
</div>
</div>
@ -40,7 +42,7 @@ const handleResize = () => {
};
const dailyData: any = ref([]);
const dailyCount = ref(0);
const progressCount = ref(0)
const progressCount = ref(0);
const getChartData = async (time: any) => {
dailyCount.value = 0;
dailyData.value = [];
@ -50,7 +52,7 @@ const getChartData = async (time: any) => {
...time,
group: 'K6'
};
const data: any = chartStore.initStatisticChart(pramas);
const data: any = await chartStore.initStatisticChart(pramas);
if (data?.yaxis?.length) {
let newArr = data.yaxis.flatMap((v: any) => v.series);
newArr?.forEach((item: any) => {
@ -243,11 +245,12 @@ watch(
() => props.timeRange,
(newVal) => {
getChartData(newVal);
getProgressData(newVal)
getProgressData(newVal);
}
);
onMounted(() => {
// getChartData(props.timeRange);
getChartData(props.timeRange);
getProgressData(props.timeRange);
window.addEventListener('resize', handleResize);
});

12
src/views/Main/MonitoringCard/index.vue

@ -13,17 +13,17 @@
<div class="cart-item-row">
<div class="left">
<div class="count">{{ chartData.cz || 0 }}</div>
<div class="name">测站数量</div>
<div class="name">水文工程检测测站数量</div>
<!-- <div class="name">水雨情监测设施</div> -->
</div>
<div class="right">
<div class="count">{{ chartData.cd || 0 }}</div>
<div class="name">测点数量</div>
<div class="name">水文工程检测测点数量</div>
<!-- <div class="name">水库大坝安全监测设施</div> -->
</div>
<div class="right">
<div class="count">{{ chartData.yx || 0 }}</div>
<div class="name">影像监视</div>
<div class="name">水事影像监测监</div>
</div>
</div>
</div>
@ -55,13 +55,13 @@ onMounted(() => {
if (item.code === 'YZT_CONSTRUCT_DBAQ_SUM') {
chartData.dbaq = +(+item.sum).toFixed(0);
}
if (item.code === 'ATT_ST_BASE') {
if (item.code === 'YZT_SWGCJCCZ_SUM') {
chartData.cz = +(+item.sum).toFixed(0);
}
if (item.code === 'ATT_ST_MP') {
if (item.code === 'YZT_SWGCJCCD_SUM') {
chartData.cd = +(+item.sum).toFixed(0);
}
if (item.code === 'ATT_WMST_BASE') {
if (item.code === 'YZT_SSYX_SUM') {
chartData.yx = +(+item.sum).toFixed(0);
}
});

2
src/views/Main/ProjectCountCard/index.vue

@ -31,7 +31,7 @@ const getChartData = async () => {
group: 'K1'
};
const data: any = chartStore.initStatisticChart(pramas)
const data: any = await chartStore.initStatisticChart(pramas)
if (data?.yaxis?.length) {
projectData.value = [];
let newArr = data.yaxis.flatMap((v: any) => v.series);

2
src/views/Main/RiskInspectionCard/index.vue

@ -59,7 +59,7 @@ const getChartData = async (time: any) => {
...time,
group: 'K5'
};
const data: any = chartStore.initStatisticChart(pramas);
const data: any = await chartStore.initStatisticChart(pramas);
if (data?.yaxis?.length) {
let newArr = data.yaxis.flatMap((v: any) => v.series);
newArr?.forEach((item: any) => {

Loading…
Cancel
Save