fix: type

pull/355/head^2
xingyu4j 2026-06-05 19:03:12 +08:00
parent 0483d5cd8b
commit 58d4be5893
15 changed files with 72 additions and 56 deletions

View File

@ -29,6 +29,10 @@ export namespace CrmReceivablePlanApi {
returnTime: Date; returnTime: Date;
}; };
} }
export interface PlanPageParam extends PageParam {
customerId?: number;
contractId?: number;
}
} }
/** 查询回款计划列表 */ /** 查询回款计划列表 */

View File

@ -51,12 +51,12 @@ function handleColorChange(event: Event) {
<style scoped> <style scoped>
.route-color-picker__swatch { .route-color-picker__swatch {
inline-size: 36px;
block-size: 28px; block-size: 28px;
padding: 2px;
cursor: pointer;
border: 1px solid var(--ant-color-border, #d9d9d9); border: 1px solid var(--ant-color-border, #d9d9d9);
border-radius: 4px; border-radius: 4px;
cursor: pointer;
inline-size: 36px;
padding: 2px;
} }
.route-color-picker__swatch:disabled { .route-color-picker__swatch:disabled {

View File

@ -89,8 +89,20 @@ function initGantt() {
gantt.config.columns = [ gantt.config.columns = [
{ name: 'text', label: '任务名称', tree: true, width: 180, resize: true }, { name: 'text', label: '任务名称', tree: true, width: 180, resize: true },
{ name: 'workstation', label: '工作站', align: 'center', width: 100, resize: true }, {
{ name: 'process', label: '工序', align: 'center', width: 100, resize: true }, name: 'workstation',
label: '工作站',
align: 'center',
width: 100,
resize: true,
},
{
name: 'process',
label: '工序',
align: 'center',
width: 100,
resize: true,
},
{ name: 'start_date', label: '开始时间', align: 'center', width: 130 }, { name: 'start_date', label: '开始时间', align: 'center', width: 130 },
{ name: 'end_date', label: '结束时间', align: 'center', width: 130 }, { name: 'end_date', label: '结束时间', align: 'center', width: 130 },
]; ];
@ -194,7 +206,10 @@ defineExpose({ loadData });
</script> </script>
<template> <template>
<div ref="ganttContainer" :style="{ width: '100%', height: `${height}px` }"></div> <div
ref="ganttContainer"
:style="{ width: '100%', height: `${height}px` }"
></div>
</template> </template>
<style> <style>

View File

@ -2,9 +2,9 @@ import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { WmsItemCategoryApi } from '#/api/wms/md/item/category'; import type { WmsItemCategoryApi } from '#/api/wms/md/item/category';
import { DICT_TYPE, generateWmsCode, h } from 'vue'; import { h } from 'vue';
import { CommonStatusEnum } from '@vben/constants'; import { CommonStatusEnum, DICT_TYPE, generateWmsCode } from '@vben/constants';
import { getDictOptions } from '@vben/hooks'; import { getDictOptions } from '@vben/hooks';
import { handleTree } from '@vben/utils'; import { handleTree } from '@vben/utils';

View File

@ -1,9 +1,9 @@
import type { VbenFormApi, VbenFormSchema } from '#/adapter/form'; import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { generateWmsCode, h } from 'vue'; import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants'; import { DICT_TYPE, generateWmsCode } from '@vben/constants';
import { getDictOptions } from '@vben/hooks'; import { getDictOptions } from '@vben/hooks';
import { Button } from 'ant-design-vue'; import { Button } from 'ant-design-vue';

View File

@ -29,6 +29,10 @@ export namespace CrmReceivablePlanApi {
returnTime: Date; returnTime: Date;
}; };
} }
export interface PlanPageParam extends PageParam {
customerId?: number;
contractId?: number;
}
} }
/** 查询回款计划列表 */ /** 查询回款计划列表 */

View File

@ -29,6 +29,10 @@ export namespace CrmReceivablePlanApi {
returnTime: Date; returnTime: Date;
}; };
} }
export interface PlanPageParam extends PageParam {
customerId?: number;
contractId?: number;
}
} }
/** 查询回款计划列表 */ /** 查询回款计划列表 */

View File

@ -21,7 +21,7 @@ import {
import { useGridColumns, useGridFormSchema } from './data'; import { useGridColumns, useGridFormSchema } from './data';
// TODO @ antd // TODO @ antd
const summary = ref<MallOrderApi.OrderSummary>(); const summary = ref<MallOrderApi.OrderSummaryRespVO>();
/** 刷新表格 */ /** 刷新表格 */
function handleRefresh() { function handleRefresh() {

View File

@ -89,8 +89,20 @@ function initGantt() {
gantt.config.columns = [ gantt.config.columns = [
{ name: 'text', label: '任务名称', tree: true, width: 180, resize: true }, { name: 'text', label: '任务名称', tree: true, width: 180, resize: true },
{ name: 'workstation', label: '工作站', align: 'center', width: 100, resize: true }, {
{ name: 'process', label: '工序', align: 'center', width: 100, resize: true }, name: 'workstation',
label: '工作站',
align: 'center',
width: 100,
resize: true,
},
{
name: 'process',
label: '工序',
align: 'center',
width: 100,
resize: true,
},
{ name: 'start_date', label: '开始时间', align: 'center', width: 130 }, { name: 'start_date', label: '开始时间', align: 'center', width: 130 },
{ name: 'end_date', label: '结束时间', align: 'center', width: 130 }, { name: 'end_date', label: '结束时间', align: 'center', width: 130 },
]; ];
@ -194,7 +206,10 @@ defineExpose({ loadData });
</script> </script>
<template> <template>
<div ref="ganttContainer" :style="{ width: '100%', height: `${height}px` }"></div> <div
ref="ganttContainer"
:style="{ width: '100%', height: `${height}px` }"
></div>
</template> </template>
<style> <style>

View File

@ -1,10 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { WmsHomeStatisticsApi } from '#/api/wms/home'; import type { WmsHomeStatisticsApi } from '#/api/wms/home';
import { OrderStatusEnum, OrderTypeEnum, ref } from 'vue'; import { ref } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { DICT_TYPE } from '@vben/constants'; import { DICT_TYPE, OrderStatusEnum, OrderTypeEnum } from '@vben/constants';
import { getDictLabel } from '@vben/hooks'; import { getDictLabel } from '@vben/hooks';
import { ElButton, ElCard, ElMessage, ElSkeleton } from 'element-plus'; import { ElButton, ElCard, ElMessage, ElSkeleton } from 'element-plus';

View File

@ -2,9 +2,9 @@ import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { WmsItemCategoryApi } from '#/api/wms/md/item/category'; import type { WmsItemCategoryApi } from '#/api/wms/md/item/category';
import { DICT_TYPE, generateWmsCode, h } from 'vue'; import { h } from 'vue';
import { CommonStatusEnum } from '@vben/constants'; import { CommonStatusEnum, DICT_TYPE, generateWmsCode } from '@vben/constants';
import { getDictOptions } from '@vben/hooks'; import { getDictOptions } from '@vben/hooks';
import { handleTree } from '@vben/utils'; import { handleTree } from '@vben/utils';

View File

@ -1,9 +1,9 @@
import type { VbenFormApi, VbenFormSchema } from '#/adapter/form'; import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { generateWmsCode, h } from 'vue'; import { h } from 'vue';
import { DICT_TYPE } from '@vben/constants'; import { DICT_TYPE, generateWmsCode } from '@vben/constants';
import { getDictOptions } from '@vben/hooks'; import { getDictOptions } from '@vben/hooks';
import { ElButton } from 'element-plus'; import { ElButton } from 'element-plus';

View File

@ -1,22 +1,3 @@
import type {
// 系列类型的定义后缀都为 SeriesOption
BarSeriesOption,
GaugeSeriesOption,
LineSeriesOption,
MapSeriesOption,
} from 'echarts/charts';
import type {
DatasetComponentOption,
DataZoomComponentOption,
GeoComponentOption,
GridComponentOption,
// 组件类型的定义后缀都为 ComponentOption
TitleComponentOption,
TooltipComponentOption,
VisualMapComponentOption,
} from 'echarts/components';
import type { ComposeOption } from 'echarts/core';
import { import {
BarChart, BarChart,
FunnelChart, FunnelChart,
@ -48,21 +29,6 @@ import {
} from 'echarts/features'; } from 'echarts/features';
import { CanvasRenderer } from 'echarts/renderers'; import { CanvasRenderer } from 'echarts/renderers';
// 通过 ComposeOption 来组合出一个只有必须组件和图表的 Option 类型
export type ECOption = ComposeOption<
| BarSeriesOption
| DatasetComponentOption
| DataZoomComponentOption
| GaugeSeriesOption
| GeoComponentOption
| GridComponentOption
| LineSeriesOption
| MapSeriesOption
| TitleComponentOption
| TooltipComponentOption
| VisualMapComponentOption
>;
// 注册必须的组件 // 注册必须的组件
echarts.use([ echarts.use([
TitleComponent, TitleComponent,
@ -89,6 +55,5 @@ echarts.use([
MapChart, MapChart,
GeoComponent, GeoComponent,
]); ]);
export type { ECOption } from './types';
export default echarts; export default echarts;

View File

@ -1,5 +1,6 @@
export * from './echarts';
export { default as EchartsUI } from './echarts-ui.vue'; export { default as EchartsUI } from './echarts-ui.vue';
export type { ECOption } from './types'; export * from './types';
export * from './use-echarts'; export * from './use-echarts';
// add by 芋艿:额外透出 echarts 原生 EChartsOption 类型,方便业务模块(如 mes/home 图表配置)声明 option 返回值类型,避免业务侧直接依赖 echarts 包apps 未把 echarts 列为直接依赖) // add by 芋艿:额外透出 echarts 原生 EChartsOption 类型,方便业务模块(如 mes/home 图表配置)声明 option 返回值类型,避免业务侧直接依赖 echarts 包apps 未把 echarts 列为直接依赖)

View File

@ -1,28 +1,36 @@
import type { import type {
BarSeriesOption, BarSeriesOption,
LineSeriesOption, LineSeriesOption,
MapSeriesOption,
PieSeriesOption, PieSeriesOption,
RadarSeriesOption, RadarSeriesOption,
} from 'echarts/charts'; } from 'echarts/charts';
import type { import type {
DatasetComponentOption, DatasetComponentOption,
DataZoomComponentOption,
GeoComponentOption,
GridComponentOption, GridComponentOption,
LegendComponentOption, LegendComponentOption,
TitleComponentOption, TitleComponentOption,
ToolboxComponentOption, ToolboxComponentOption,
TooltipComponentOption, TooltipComponentOption,
VisualMapComponentOption,
} from 'echarts/components'; } from 'echarts/components';
import type { ComposeOption } from 'echarts/core'; import type { ComposeOption } from 'echarts/core';
export type ECOption = ComposeOption< export type ECOption = ComposeOption<
| BarSeriesOption | BarSeriesOption
| DatasetComponentOption | DatasetComponentOption
| DataZoomComponentOption
| GeoComponentOption
| GridComponentOption | GridComponentOption
| LegendComponentOption | LegendComponentOption
| LineSeriesOption | LineSeriesOption
| MapSeriesOption
| PieSeriesOption | PieSeriesOption
| RadarSeriesOption | RadarSeriesOption
| TitleComponentOption | TitleComponentOption
| ToolboxComponentOption | ToolboxComponentOption
| TooltipComponentOption | TooltipComponentOption
| VisualMapComponentOption
>; >;