From e52b52c0e9c59147ef28f2cd5a44ef792804e91b Mon Sep 17 00:00:00 2001 From: xue <571013506@qq.com> Date: Fri, 21 Jun 2024 17:44:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=9B=BE=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fta/enterprisestatistics/echarts-data.ts | 247 ++++++++++++++++++ src/views/fta/enterprisestatistics/index.vue | 222 +++++++++++++++- 2 files changed, 462 insertions(+), 7 deletions(-) create mode 100644 src/views/fta/enterprisestatistics/echarts-data.ts diff --git a/src/views/fta/enterprisestatistics/echarts-data.ts b/src/views/fta/enterprisestatistics/echarts-data.ts new file mode 100644 index 0000000..47653b8 --- /dev/null +++ b/src/views/fta/enterprisestatistics/echarts-data.ts @@ -0,0 +1,247 @@ +import { EChartsOption } from 'echarts' + +const { t } = useI18n() + +//月度 +export const lmonthlData: EChartsOption = { + title: { + text: t('analysis.monthlStatistics'), + left: 'center' + }, + xAxis: { + data: [ + t('analysis.january'), + t('analysis.february'), + t('analysis.march'), + t('analysis.april'), + t('analysis.may'), + t('analysis.june'), + t('analysis.july'), + t('analysis.august'), + t('analysis.september'), + t('analysis.october'), + t('analysis.november'), + t('analysis.december') + ], + boundaryGap: false, + axisTick: { + show: false + } + }, + grid: { + left: 20, + right: 20, + bottom: 20, + top: 80, + containLabel: true + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'cross' + }, + padding: [5, 10] + }, + yAxis: { + axisTick: { + show: false + } + }, + legend: { + data: [t('analysis.value')], + top: 50 + }, + series: [ + { + name: t('analysis.value'), + smooth: true, + type: 'line', + data: [], + animationDuration: 2800, + animationEasing: 'cubicInOut' + }, + ] +} + +//季度 +export const lquarterData: EChartsOption = { + title: { + text: t('analysis.quarterStatistics'), // 修改标题为月度注册人数 + left: 'center' + }, + xAxis: { + data: [ + t('analysis.quarterOne'), + t('analysis.quarterTwo'), + t('analysis.quarterThree'), + t('analysis.quarterFour') + ], // 后端接口获取的月份数据将填充在这里 + boundaryGap: false, + axisTick: { + show: false + } + }, + grid: { + left: 20, + right: 20, + bottom: 20, + top: 80, + containLabel: true + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'cross' + }, + padding: [5, 10] + }, + yAxis: { + axisTick: { + show: false + } + }, + legend: { + data: [t('analysis.value')], + top: 50 + }, + series: [ + { + name: t('analysis.value'), + smooth: true, + type: 'line', + data: [], // 后端接口获取的预估注册人数数据将填充在这里 + animationDuration: 2800, + animationEasing: 'cubicInOut' + }, + ] +} + +// 年度 +export const lyearData : EChartsOption = { + title: { + text: t('analysis.yearStatistics'), // 修改标题为月度注册人数 + left: 'center' + }, + xAxis: { + data: [ + t('analysis.year20'), + t('analysis.year21'), + t('analysis.year22'), + t('analysis.year23'), + t('analysis.year24'), + t('analysis.year25'), + t('analysis.year26'), + t('analysis.year27'), + t('analysis.year28'), + t('analysis.year29'), + t('analysis.year30'), + ], + boundaryGap: false, + axisTick: { + show: false + } + }, + grid: { + left: 20, + right: 20, + bottom: 20, + top: 80, + containLabel: true + }, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'cross' + }, + padding: [5, 10] + }, + yAxis: { + axisTick: { + show: false + } + }, + legend: { + data: [t('analysis.value')], + top: 50 + }, + series: [ + { + name: t('analysis.value'), + smooth: true, + type: 'line', + data: [], // 后端接口获取的预估注册人数数据将填充在这里 + animationDuration: 2800, + animationEasing: 'cubicInOut' + } + ] +} + +// +export const EnterpriseData: EChartsOption = { + title: { + text: t('analysis.enterpriseData'), + left: 'center' + }, + tooltip: { + trigger: 'item', + formatter: '{a}
{b} : {c} ({d}%)' + }, + legend: { + orient: 'vertical', + left: 'left', + data: [ + t('analysis.greatEnterprise'), + t('analysis.centreEnterprise'), + t('analysis.smallEnterprise') + ] + }, + series: [ + { + name: t('analysis.value'), + type: 'pie', + radius: '55%', + center: ['50%', '60%'], + data: [] + } + ] +} + +//审核状态统计 +export const lauditStatusData: EChartsOption = { + tooltip: { + trigger: 'item' + }, + legend: { + top: '5%', + left: 'center', + data:[ + t('analysis.running'), + t('analysis.approve'), + t('analysis.reject'), + t('analysis.cancel') + ] + }, + series: [ + { + name: 'Access From', + type: 'pie', + radius: ['40%', '70%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + emphasis: { + label: { + show: true, + fontSize: 40, + fontWeight: 'bold' + } + }, + labelLine: { + show: false + }, + data: [] + } + ] +} diff --git a/src/views/fta/enterprisestatistics/index.vue b/src/views/fta/enterprisestatistics/index.vue index 8a3593d..1976335 100644 --- a/src/views/fta/enterprisestatistics/index.vue +++ b/src/views/fta/enterprisestatistics/index.vue @@ -1,11 +1,219 @@ - - + -