update 新增图表,暂时隐藏
This commit is contained in:
@@ -352,6 +352,7 @@ const lang = {
|
||||
项目任务完成情况统计: 'Project Task Completion Statistics',
|
||||
文件操作统计: 'File Operate Statistics',
|
||||
难度系数占比: 'Difficulty Coefficient Ratio',
|
||||
场景算例统计: 'Scene Run Statistics',
|
||||
},
|
||||
工位时间维护: {
|
||||
阶段: 'Phase',
|
||||
|
||||
@@ -347,6 +347,7 @@ const lang = {
|
||||
项目任务完成情况统计: '项目任务完成情况统计',
|
||||
文件操作统计: '文件操作统计',
|
||||
难度系数占比: '难度系数占比',
|
||||
场景算例统计: '场景算例统计',
|
||||
},
|
||||
工位时间维护: {
|
||||
阶段: '阶段',
|
||||
|
||||
@@ -19,7 +19,8 @@ import performanceCompletion from './dataStatistics/performanceCompletion.vue';
|
||||
import projectTaskComplete from './dataStatistics/projectTaskComplete.vue';
|
||||
import reviewPassed from './dataStatistics/reviewPassed.vue';
|
||||
import dashboardSetting from '@/components/common/dashboardSetting/index.vue';
|
||||
import userDifficultyRateChart from './dataStatistics/userDifficultyRateChart.vue';
|
||||
// import userDifficultyRateChart from './dataStatistics/userDifficultyRateChart.vue';
|
||||
// import sceneRunStatistics from './dataStatistics/sceneRunStatistics.vue';
|
||||
|
||||
// 统一请求项目列表
|
||||
useProjectList();
|
||||
@@ -52,11 +53,16 @@ const baseList = [
|
||||
title: '用户组难度系数统计',
|
||||
component: userDifficultyCoefficientChart, // 用户组难度系数统计
|
||||
},
|
||||
{
|
||||
id: 'userDifficultyRate',
|
||||
title: '难度系数占比',
|
||||
component: userDifficultyRateChart, // 难度系数占比
|
||||
},
|
||||
// {
|
||||
// id: 'userDifficultyRate',
|
||||
// title: '难度系数占比',
|
||||
// component: userDifficultyRateChart, // 难度系数占比
|
||||
// },
|
||||
// {
|
||||
// id: 'sceneRunStatistics',
|
||||
// title: '场景算例统计',
|
||||
// component: sceneRunStatistics, // 场景算例统计
|
||||
// },
|
||||
{
|
||||
id: 'userTaskComplete',
|
||||
title: '用户组任务完成情况统计',
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<commonFilterChart
|
||||
:title="$t('数据统计.场景算例统计')"
|
||||
:charts-id="'chart-scene-run'"
|
||||
:bar-type="'barChart'"
|
||||
:option="chartOption"
|
||||
:showChangeModel="true"
|
||||
:filterItems="['dateRange', 'projectName', 'projectCode']"
|
||||
@update="initStatistics"
|
||||
>
|
||||
</commonFilterChart>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import commonFilterChart from '@/components/common/echartCard/commonFilterChart.vue';
|
||||
|
||||
// 初始化用户组项目统计
|
||||
const chartOption = ref();
|
||||
const initStatistics = async () => {
|
||||
chartOption.value = {};
|
||||
};
|
||||
</script>
|
||||
@@ -54,6 +54,7 @@ const updateStatistics = async (formData: any) => {
|
||||
const res: any = await getUserGroupDifficultyStatisticsApi(params);
|
||||
if (res && res.code === 200) {
|
||||
const difficultyCount: Record<any, number> = {};
|
||||
nodata.value = res.data.result.length === 0;
|
||||
res.data.result.forEach((item: any) => {
|
||||
// 遍历item.difficultyCount这个对象,将key和value分别存入difficultyCount对象中,如果key已经存在,则将value累加
|
||||
Object.keys(item.difficultyCount).forEach((key: any) => {
|
||||
|
||||
Reference in New Issue
Block a user