gongchunyi
16 小时以前 0ce91265f1ec4592b862fe0f8feaa48022eefe4b
fix: 字段与接口返回数据保持一致
已修改2个文件
12 ■■■■ 文件已修改
src/api/reportAnalysis/qualityReport.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/reportManagement/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/reportAnalysis/qualityReport.js
@@ -43,10 +43,10 @@
}
// 获取热点检测指标统计
export function getTopParameters(inspectType) {
export function getTopParameters(modelType) {
  return request({
    url: '/qualityReport/getTopParameters',
    method: 'get',
    params: { inspectType }
    params: { modelType }
  })
}
src/views/reportAnalysis/reportManagement/index.vue
@@ -302,17 +302,17 @@
};
const getYearlyStatValue = (type, field) => {
  const stat = yearlyPassRateData.value.find(item => item.inspectType === type);
  const stat = yearlyPassRateData.value.find(item => item.modelType === type);
  return stat ? stat[field] : 0;
};
const getInspectStatValue = (type, field) => {
  const stat = inspectStatisticsData.value.find(item => item.inspectType === type);
  const stat = inspectStatisticsData.value.find(item => item.modelType === type);
  return stat ? stat[field] : 0;
};
const getPassRateStatValue = (type, field) => {
  const stat = passRateStatisticsData.value.find(item => item.inspectType === type);
  const stat = passRateStatisticsData.value.find(item => item.modelType === type);
  if (stat) {
    if (field === 'completionRate' || field === 'passRate') {
      return stat[field] ? Number(stat[field]).toFixed(0) + '%' : '0%';
@@ -387,7 +387,7 @@
const fetchTopParametersData = async () => {
  try {
    const typeMap = { raw: 0, semi: 1, final: 2 };
    const typeMap = { raw: 1, semi: 2, final: 3 };
    const res = await getTopParameters(typeMap[activeTab.value]);
    if (res.code === 200) {
      topParametersData.value = res.data;