fix(project): 修复 CRM 统计页面类型检查错误

This commit is contained in:
YunaiV
2026-07-19 19:41:00 +08:00
parent f97bb9f33a
commit cf3895375f
6 changed files with 20 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { EchartsUIType } from '@vben/plugins/echarts';
import type { EChartsOption, EchartsUIType } from '@vben/plugins/echarts';
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
@@ -135,14 +135,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
toolbarConfig: {
enabled: false,
},
} as VxeTableGridOptions<
CrmStatisticsPerformanceTargetApi.PerformanceTargetRespVO
>,
} as VxeTableGridOptions<CrmStatisticsPerformanceTargetApi.PerformanceTargetRespVO>,
});
/** 获取接口参数 */
async function getApiParams() {
const values = await formApi.getValues();
const values =
await formApi.getValues<CrmStatisticsPerformanceTargetApi.PerformanceTargetReqVO>();
return {
...values,
year: Number(values.year),
@@ -158,7 +157,7 @@ function formatMonth(year: number, month: number) {
function getChartOptions(
year: number,
data: CrmStatisticsPerformanceTargetApi.PerformanceTargetRespVO[],
) {
): EChartsOption {
return {
grid: {
left: 20,

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { EchartsUIType } from '@vben/plugins/echarts';
import type { EChartsOption, EchartsUIType } from '@vben/plugins/echarts';
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
@@ -411,7 +411,7 @@ function spanMethod({ columnIndex, row }: any) {
/** 获得产品分类销售分析图表 */
function getProductCategoryChartOptions(
data: CrmStatisticsProductApi.ProductCategoryRespVO[],
) {
): EChartsOption {
return {
title: {
text: '产品分类销量占比',

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { EchartsUIType } from '@vben/plugins/echarts';
import type { EChartsOption, EchartsUIType } from '@vben/plugins/echarts';
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
@@ -135,14 +135,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
toolbarConfig: {
enabled: false,
},
} as VxeTableGridOptions<
CrmStatisticsPerformanceTargetApi.PerformanceTargetRespVO
>,
} as VxeTableGridOptions<CrmStatisticsPerformanceTargetApi.PerformanceTargetRespVO>,
});
/** 获取接口参数 */
async function getApiParams() {
const values = await formApi.getValues();
const values =
await formApi.getValues<CrmStatisticsPerformanceTargetApi.PerformanceTargetReqVO>();
return {
...values,
year: Number(values.year),
@@ -158,7 +157,7 @@ function formatMonth(year: number, month: number) {
function getChartOptions(
year: number,
data: CrmStatisticsPerformanceTargetApi.PerformanceTargetRespVO[],
) {
): EChartsOption {
return {
grid: {
left: 20,

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { EchartsUIType } from '@vben/plugins/echarts';
import type { EChartsOption, EchartsUIType } from '@vben/plugins/echarts';
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
@@ -411,7 +411,7 @@ function spanMethod({ columnIndex, row }: any) {
/** 获得产品分类销售分析图表 */
function getProductCategoryChartOptions(
data: CrmStatisticsProductApi.ProductCategoryRespVO[],
) {
): EChartsOption {
return {
title: {
text: '产品分类销量占比',

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { EchartsUIType } from '@vben/plugins/echarts';
import type { EChartsOption, EchartsUIType } from '@vben/plugins/echarts';
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
@@ -140,7 +140,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
/** 获取接口参数 */
async function getApiParams() {
const values = await formApi.getValues();
const values =
await formApi.getValues<CrmStatisticsPerformanceTargetApi.PerformanceTargetReqVO>();
return {
...values,
year: Number(values.year),
@@ -156,7 +157,7 @@ function formatMonth(year: number, month: number) {
function getChartOptions(
year: number,
data: CrmStatisticsPerformanceTargetApi.PerformanceTargetRespVO[],
) {
): EChartsOption {
return {
grid: {
left: 20,

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { EchartsUIType } from '@vben/plugins/echarts';
import type { EChartsOption, EchartsUIType } from '@vben/plugins/echarts';
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
@@ -411,7 +411,7 @@ function spanMethod({ columnIndex, row }: any) {
/** 获得产品分类销售分析图表 */
function getProductCategoryChartOptions(
data: CrmStatisticsProductApi.ProductCategoryRespVO[],
) {
): EChartsOption {
return {
title: {
text: '产品分类销量占比',