|
@ -4,10 +4,10 @@ |
|
|
<div class="echart-wrapper" ref="chartRef"></div> |
|
|
<div class="echart-wrapper" ref="chartRef"></div> |
|
|
<div class="appraise-progress"> |
|
|
<div class="appraise-progress"> |
|
|
<div class="tips"> |
|
|
<div class="tips"> |
|
|
<div>问题处理进度:<span>23%</span></div> |
|
|
<div>问题处理进度:<span>{{progressCount}}%</span></div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="progress"> |
|
|
<div class="progress"> |
|
|
<div class="progress-bar" style="width: 23%"></div> |
|
|
<div class="progress-bar" :style="{width: `${progressCount}%`}"></div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -40,6 +40,7 @@ const handleResize = () => { |
|
|
}; |
|
|
}; |
|
|
const dailyData: any = ref([]); |
|
|
const dailyData: any = ref([]); |
|
|
const dailyCount = ref(0); |
|
|
const dailyCount = ref(0); |
|
|
|
|
|
const progressCount = ref(0) |
|
|
const getChartData = async (time: any) => { |
|
|
const getChartData = async (time: any) => { |
|
|
dailyCount.value = 0; |
|
|
dailyCount.value = 0; |
|
|
dailyData.value = []; |
|
|
dailyData.value = []; |
|
@ -220,10 +221,29 @@ const initChart = () => { |
|
|
// Set options and render chart |
|
|
// Set options and render chart |
|
|
chart.setOption(option); |
|
|
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( |
|
|
watch( |
|
|
() => props.timeRange, |
|
|
() => props.timeRange, |
|
|
(newVal) => { |
|
|
(newVal) => { |
|
|
getChartData(newVal); |
|
|
getChartData(newVal); |
|
|
|
|
|
getProgressData(newVal) |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|