1, 修改数据列表无法刷新的问题;

2, 修改时间选择,后端按照年实现的,前端同样按照年份选择实现;
3,修改环比同比计算;
4,回款金额统计bug修复。
This commit is contained in:
scholar
2024-04-19 17:46:09 +08:00
parent b57a2c50a9
commit f4dd1bed63
4 changed files with 40 additions and 34 deletions

View File

@ -1,4 +1,4 @@
<!-- 客户总量统计 -->
<!-- 员工业绩统计 -->
<template>
<!-- Echarts图 -->
<el-card shadow="never">
@ -180,6 +180,7 @@ const loadData = async () => {
// 2.2 更新列表数据
list.value = performanceList
convertListData()
loading.value = false
}
@ -190,8 +191,9 @@ const tableData = reactive([{title: '当月合同金额统计(元)'}, {title
{title: '同比增长率(%'}, {title: '环比增长率(%'}])
// 定义 init 方法
const init = () => {
const convertListData = () => {
const columnObj = {label: '日期', prop: 'title'}
columnsData.splice(0, columnsData.length)//清空数组
columnsData.push(columnObj)
list.value.forEach((item, index) => {
@ -200,8 +202,8 @@ const init = () => {
tableData[0]['prop' + index] = item.currentMonthCount
tableData[1]['prop' + index] = item.lastMonthCount
tableData[2]['prop' + index] = item.lastYearCount
tableData[3]['prop' + index] = item.lastYearCount !== 0 ? (item.currentMonthCount / item.lastYearCount).toFixed(2) : 'NULL'
tableData[4]['prop' + index] = item.lastMonthCount !== 0 ? (item.currentMonthCount / item.lastMonthCount).toFixed(2) : 'NULL'
tableData[3]['prop' + index] = item.lastMonthCount !== 0 ? (item.currentMonthCount / item.lastMonthCount).toFixed(2) : 'NULL'
tableData[4]['prop' + index] = item.lastYearCount !== 0 ? (item.currentMonthCount / item.lastYearCount).toFixed(2) : 'NULL'
})
}
@ -210,6 +212,5 @@ defineExpose({ loadData })
/** 初始化 */
onMounted(async () => {
await loadData()
init()
})
</script>