From faa303526df6e2c54429683958878e947bf51f41 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 25 Jun 2025 15:17:37 +0800 Subject: [PATCH 01/16] feat: crm business status --- .../src/api/crm/business/status/index.ts | 13 +- .../src/views/crm/business/status/data.ts | 16 +- .../crm/business/status/modules/form.vue | 145 ++++++++++++++++-- apps/web-antd/src/views/crm/contact/data.ts | 2 +- .../crm/product/modules/product-table.vue | 2 +- 5 files changed, 148 insertions(+), 30 deletions(-) diff --git a/apps/web-antd/src/api/crm/business/status/index.ts b/apps/web-antd/src/api/crm/business/status/index.ts index 9445938fd..98c969af9 100644 --- a/apps/web-antd/src/api/crm/business/status/index.ts +++ b/apps/web-antd/src/api/crm/business/status/index.ts @@ -5,20 +5,19 @@ import { requestClient } from '#/api/request'; export namespace CrmBusinessStatusApi { /** 商机状态信息 */ export interface BusinessStatusType { - id: number; + id?: number; name: string; percent: number; - sort: number; } /** 商机状态组信息 */ export interface BusinessStatus { - id: number; + id?: number; name: string; - deptIds: number[]; - deptNames: string[]; - creator: string; - createTime: Date; + deptIds?: number[]; + deptNames?: string[]; + creator?: string; + createTime?: Date; statuses?: BusinessStatusType[]; } } diff --git a/apps/web-antd/src/views/crm/business/status/data.ts b/apps/web-antd/src/views/crm/business/status/data.ts index cae23dcf5..419dc5111 100644 --- a/apps/web-antd/src/views/crm/business/status/data.ts +++ b/apps/web-antd/src/views/crm/business/status/data.ts @@ -3,9 +3,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import { handleTree } from '@vben/utils'; -import { z } from '#/adapter/form'; import { getDeptList } from '#/api/system/dept'; -import { CommonStatusEnum, DICT_TYPE, getDictOptions } from '#/utils'; /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { @@ -38,17 +36,13 @@ export function useFormSchema(): VbenFormSchema[] { placeholder: '请选择应用部门', treeDefaultExpandAll: true, }, + help: '不选择部门时,默认全公司生效', }, { - fieldName: 'status', - label: '状态', - component: 'RadioGroup', - componentProps: { - options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'), - buttonStyle: 'solid', - optionType: 'button', - }, - rules: z.number().default(CommonStatusEnum.ENABLE), + fieldName: 'statuses', + label: '阶段设置', + component: 'Input', + rules: 'required', }, ]; } diff --git a/apps/web-antd/src/views/crm/business/status/modules/form.vue b/apps/web-antd/src/views/crm/business/status/modules/form.vue index 0097e1693..96fdf3858 100644 --- a/apps/web-antd/src/views/crm/business/status/modules/form.vue +++ b/apps/web-antd/src/views/crm/business/status/modules/form.vue @@ -5,11 +5,13 @@ import { computed, ref } from 'vue'; import { useVbenModal } from '@vben/common-ui'; -import { message } from 'ant-design-vue'; +import { Input, InputNumber, message } from 'ant-design-vue'; import { useVbenForm } from '#/adapter/form'; +import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { createBusinessStatus, + DEFAULT_STATUSES, getBusinessStatus, updateBusinessStatus, } from '#/api/crm/business/status'; @@ -62,30 +64,153 @@ const [Modal, modalApi] = useVbenModal({ }, async onOpenChange(isOpen: boolean) { if (!isOpen) { - formData.value = undefined; return; } // 加载数据 const data = modalApi.getData(); - if (!data || !data.id) { - return; - } + modalApi.lock(); try { - formData.value = await getBusinessStatus(data.id as number); - // 设置到 values - if (formData.value) { - await formApi.setValues(formData.value); + if (!data || !data.id) { + formData.value = { + id: undefined, + name: '', + deptIds: [], + statuses: [], + }; + addStatus(); + } else { + formData.value = await getBusinessStatus(data.id as number); + if ( + !formData.value?.statuses?.length || + formData.value?.statuses?.length === 0 + ) { + addStatus(); + } } + // 设置到 values + await formApi.setValues(formData.value as any); + formData.value!.statuses = + formData.value?.statuses?.concat(DEFAULT_STATUSES); + gridApi.grid.reloadData(formData.value!.statuses as any); } finally { modalApi.unlock(); } }, }); + +/** 添加状态 */ +function addStatus() { + formData.value!.statuses!.push({ + name: '', + percent: undefined, + } as any); +} + +/** 删除状态 */ +function deleteStatusArea(row: any) { + formData.value!.statuses!.splice(row.index, 1); +} + +/** 表格配置 */ +const [Grid, gridApi] = useVbenVxeGrid({ + gridOptions: { + editConfig: { + trigger: 'click', + mode: 'cell', + }, + columns: [ + { + field: 'defaultStatus', + title: '阶段', + minWidth: 100, + slots: { default: 'defaultStatus' }, + }, + { + field: 'name', + title: '阶段名称', + minWidth: 100, + slots: { default: 'name' }, + }, + { + field: 'percent', + title: '赢单率(%)', + minWidth: 100, + slots: { default: 'percent' }, + }, + { + title: '操作', + width: 130, + fixed: 'right', + slots: { default: 'actions' }, + }, + ], + data: formData.value?.statuses?.concat(DEFAULT_STATUSES), + border: true, + showOverflow: true, + autoResize: true, + keepSource: true, + rowConfig: { + keyField: 'row_id', + }, + pagerConfig: { + enabled: false, + }, + toolbarConfig: { + enabled: false, + }, + }, +}); diff --git a/apps/web-antd/src/views/crm/contact/data.ts b/apps/web-antd/src/views/crm/contact/data.ts index 31dee6a36..4addb322a 100644 --- a/apps/web-antd/src/views/crm/contact/data.ts +++ b/apps/web-antd/src/views/crm/contact/data.ts @@ -43,7 +43,7 @@ export function useFormSchema(): VbenFormSchema[] { componentProps: { api: () => getCustomerSimpleList(), fieldNames: { - label: 'nickname', + label: 'name', value: 'id', }, }, diff --git a/apps/web-antd/src/views/crm/product/modules/product-table.vue b/apps/web-antd/src/views/crm/product/modules/product-table.vue index a9083b61c..4b01eacdc 100644 --- a/apps/web-antd/src/views/crm/product/modules/product-table.vue +++ b/apps/web-antd/src/views/crm/product/modules/product-table.vue @@ -112,7 +112,7 @@ watch( item.sellingPrice = item.contractPrice; }); } - gridApi.grid?.loadData(tableData.value); + gridApi.grid.reloadData(tableData.value); }, { immediate: true, From 709501937deb44518b87c305d7972677eabee670 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 25 Jun 2025 15:21:48 +0800 Subject: [PATCH 02/16] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/crm/customer/data.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/web-antd/src/views/crm/customer/data.ts b/apps/web-antd/src/views/crm/customer/data.ts index 7fb0671c3..46aa99d05 100644 --- a/apps/web-antd/src/views/crm/customer/data.ts +++ b/apps/web-antd/src/views/crm/customer/data.ts @@ -154,6 +154,8 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { field: 'name', title: '客户名称', fixed: 'left', + align: 'left', + minWidth: 280, slots: { default: 'name', }, @@ -161,6 +163,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'source', title: '客户来源', + minWidth: 100, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.CRM_CUSTOMER_SOURCE }, @@ -169,22 +172,32 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'mobile', title: '手机', + minWidth: 100, }, { field: 'telephone', title: '电话', + minWidth: 100, }, { field: 'email', title: '邮箱', + minWidth: 100, + }, + { + field: 'areaName', + title: '地址', + minWidth: 140, }, { field: 'detailAddress', title: '地址', + minWidth: 140, }, { field: 'industryId', title: '客户行业', + minWidth: 80, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.CRM_CUSTOMER_INDUSTRY }, @@ -193,6 +206,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'level', title: '客户级别', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.CRM_CUSTOMER_LEVEL }, @@ -201,30 +215,36 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'ownerUserName', title: '负责人', + minWidth: 80, }, { field: 'ownerUserDeptName', title: '所属部门', + minWidth: 100, }, { field: 'contactNextTime', title: '下次联系时间', formatter: 'formatDateTime', + minWidth: 160, }, { field: 'contactLastTime', title: '最后跟进时间', formatter: 'formatDateTime', + minWidth: 160, }, { field: 'updateTime', title: '更新时间', formatter: 'formatDateTime', + minWidth: 160, }, { field: 'createTime', title: '创建时间', formatter: 'formatDateTime', + minWidth: 160, }, { title: '操作', From 3527b12b84e876d7bb3598ccde8c6cde1cd7a83a Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 25 Jun 2025 15:29:53 +0800 Subject: [PATCH 03/16] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=9C=80?= =?UTF-8?q?=E5=B0=8F=E5=AE=BD=E5=BA=A6=EF=BC=8C=E4=BD=BFfixed=E7=94=9F?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/crm/business/data.ts | 24 ++++++++++++++++---- apps/web-antd/src/views/crm/clue/data.ts | 15 ++++++++++++ apps/web-antd/src/views/crm/contact/data.ts | 16 +++++++++++++ apps/web-antd/src/views/crm/product/data.ts | 11 +++++++++ 4 files changed, 61 insertions(+), 5 deletions(-) diff --git a/apps/web-antd/src/views/crm/business/data.ts b/apps/web-antd/src/views/crm/business/data.ts index 6993b9af3..2a0642e46 100644 --- a/apps/web-antd/src/views/crm/business/data.ts +++ b/apps/web-antd/src/views/crm/business/data.ts @@ -157,69 +157,83 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { field: 'name', title: '商机名称', fixed: 'left', + minWidth: 240, slots: { default: 'name' }, }, { field: 'customerName', title: '客户名称', fixed: 'left', + minWidth: 240, slots: { default: 'customerName' }, }, { field: 'totalPrice', title: '商机金额(元)', + minWidth: 140, formatter: 'formatAmount2', }, { field: 'dealTime', title: '预计成交日期', formatter: 'formatDate', + minWidth: 180, }, { field: 'remark', title: '备注', + minWidth: 200, }, { field: 'contactNextTime', title: '下次联系时间', formatter: 'formatDate', + minWidth: 180, }, { field: 'ownerUserName', title: '负责人', + minWidth: 120, }, { field: 'ownerUserDeptName', title: '所属部门', + minWidth: 120, }, { field: 'contactLastTime', title: '最后跟进时间', formatter: 'formatDateTime', - }, - { - field: 'updateTime', - title: '更新时间', - formatter: 'formatDateTime', + minWidth: 180, }, { field: 'createTime', title: '创建时间', formatter: 'formatDateTime', + minWidth: 180, }, { field: 'creatorName', title: '创建人', + minWidth: 120, + }, + { + field: 'updateTime', + title: '更新时间', + formatter: 'formatDateTime', + minWidth: 180, }, { field: 'statusTypeName', title: '商机状态组', fixed: 'right', + minWidth: 120, }, { field: 'statusName', title: '商机阶段', fixed: 'right', + minWidth: 120, }, { title: '操作', diff --git a/apps/web-antd/src/views/crm/clue/data.ts b/apps/web-antd/src/views/crm/clue/data.ts index ef35115ba..e3b31da22 100644 --- a/apps/web-antd/src/views/crm/clue/data.ts +++ b/apps/web-antd/src/views/crm/clue/data.ts @@ -164,6 +164,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { field: 'name', title: '线索名称', fixed: 'left', + minWidth: 240, slots: { default: 'name', }, @@ -171,6 +172,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'source', title: '线索来源', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.CRM_CUSTOMER_SOURCE }, @@ -179,22 +181,27 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'mobile', title: '手机', + minWidth: 120, }, { field: 'telephone', title: '电话', + minWidth: 120, }, { field: 'email', title: '邮箱', + minWidth: 120, }, { field: 'detailAddress', title: '地址', + minWidth: 120, }, { field: 'industryId', title: '客户行业', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.CRM_CUSTOMER_INDUSTRY }, @@ -203,6 +210,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'level', title: '客户级别', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.CRM_CUSTOMER_LEVEL }, @@ -211,34 +219,41 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'ownerUserName', title: '负责人', + minWidth: 120, }, { field: 'ownerUserDeptName', title: '所属部门', + minWidth: 120, }, { field: 'contactNextTime', title: '下次联系时间', formatter: 'formatDateTime', + minWidth: 180, }, { field: 'contactLastTime', title: '最后跟进时间', formatter: 'formatDateTime', + minWidth: 180, }, { field: 'updateTime', title: '更新时间', formatter: 'formatDateTime', + minWidth: 180, }, { field: 'createTime', title: '创建时间', formatter: 'formatDateTime', + minWidth: 120, }, { field: 'creatorName', title: '创建人', + minWidth: 120, }, { title: '操作', diff --git a/apps/web-antd/src/views/crm/contact/data.ts b/apps/web-antd/src/views/crm/contact/data.ts index 4addb322a..e6a168004 100644 --- a/apps/web-antd/src/views/crm/contact/data.ts +++ b/apps/web-antd/src/views/crm/contact/data.ts @@ -188,17 +188,20 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { field: 'name', title: '联系人姓名', fixed: 'left', + minWidth: 240, slots: { default: 'name' }, }, { field: 'customerName', title: '客户名称', fixed: 'left', + minWidth: 240, slots: { default: 'customerName' }, }, { field: 'sex', title: '性别', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.SYSTEM_USER_SEX }, @@ -207,26 +210,32 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'mobile', title: '手机', + minWidth: 120, }, { field: 'telephone', title: '电话', + minWidth: 120, }, { field: 'email', title: '邮箱', + minWidth: 120, }, { field: 'post', title: '职位', + minWidth: 120, }, { field: 'detailAddress', title: '地址', + minWidth: 120, }, { field: 'master', title: '关键决策人', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.INFRA_BOOLEAN_STRING }, @@ -235,34 +244,41 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'parentId', title: '直属上级', + minWidth: 120, slots: { default: 'parentId' }, }, { field: 'ownerUserName', title: '负责人', + minWidth: 120, }, { field: 'ownerUserDeptName', title: '所属部门', + minWidth: 120, }, { field: 'contactNextTime', title: '下次联系时间', formatter: 'formatDateTime', + minWidth: 180, }, { field: 'remark', title: '备注', + minWidth: 200, }, { field: 'createTime', title: '创建时间', formatter: 'formatDateTime', + minWidth: 180, }, { field: 'updateTime', title: '更新时间', formatter: 'formatDateTime', + minWidth: 180, }, { title: '操作', diff --git a/apps/web-antd/src/views/crm/product/data.ts b/apps/web-antd/src/views/crm/product/data.ts index b51855cb8..9658081c8 100644 --- a/apps/web-antd/src/views/crm/product/data.ts +++ b/apps/web-antd/src/views/crm/product/data.ts @@ -124,15 +124,18 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'name', title: '产品名称', + minWidth: 240, slots: { default: 'name' }, }, { field: 'categoryName', title: '产品类型', + minWidth: 120, }, { field: 'unit', title: '产品单位', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.CRM_PRODUCT_UNIT }, @@ -141,15 +144,18 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'no', title: '产品编码', + minWidth: 120, }, { field: 'price', title: '价格(元)', formatter: 'formatAmount2', + minWidth: 120, }, { field: 'description', title: '产品描述', + minWidth: 200, }, { field: 'status', @@ -158,24 +164,29 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { name: 'CellDict', props: { type: DICT_TYPE.CRM_PRODUCT_STATUS }, }, + minWidth: 120, }, { field: 'ownerUserName', title: '负责人', + minWidth: 120, }, { field: 'updateTime', title: '更新时间', formatter: 'formatDateTime', + minWidth: 180, }, { field: 'creatorName', title: '创建人', + minWidth: 120, }, { field: 'createTime', title: '创建时间', formatter: 'formatDateTime', + minWidth: 180, }, { title: '操作', From 510d91cb66047c365d894ed50e34d5919385eb5c Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 25 Jun 2025 15:43:15 +0800 Subject: [PATCH 04/16] fix: crm plan --- .../src/views/crm/receivable/plan/data.ts | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/views/crm/receivable/plan/data.ts b/apps/web-antd/src/views/crm/receivable/plan/data.ts index 2ae3fe87e..138afa219 100644 --- a/apps/web-antd/src/views/crm/receivable/plan/data.ts +++ b/apps/web-antd/src/views/crm/receivable/plan/data.ts @@ -3,6 +3,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import { floatToFixed2 } from '@vben/utils'; +import { getContractSimpleList } from '#/api/crm/contract'; import { getCustomerSimpleList } from '#/api/crm/customer'; import { DICT_TYPE, getDictOptions } from '#/utils'; @@ -24,14 +25,32 @@ export function useFormSchema(): VbenFormSchema[] { { fieldName: 'contractId', label: '合同', - component: 'ApiSelect', + component: 'Select', rules: 'required', componentProps: { - api: getCustomerSimpleList, - labelField: 'name', - valueField: 'id', + options: [], placeholder: '请选择合同', }, + dependencies: { + triggerFields: ['customerId'], + disabled: (values) => !values.customerId, + async componentProps(values) { + if (!values.customerId) { + return { + options: [], + placeholder: '请选择客户', + }; + } + const res = await getContractSimpleList(values.customerId); + return { + options: res.map((item) => ({ + label: item.name, + value: item.id, + })), + placeholder: '请选择合同', + }; + }, + }, }, { fieldName: 'period', From b183f0b9e1bb9b08e16509d447a6c89c22876c7b Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 25 Jun 2025 17:15:10 +0800 Subject: [PATCH 05/16] fix: crm business status --- .../views/crm/business/status/modules/form.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/web-antd/src/views/crm/business/status/modules/form.vue b/apps/web-antd/src/views/crm/business/status/modules/form.vue index 96fdf3858..9bb325afd 100644 --- a/apps/web-antd/src/views/crm/business/status/modules/form.vue +++ b/apps/web-antd/src/views/crm/business/status/modules/form.vue @@ -1,7 +1,7 @@ diff --git a/apps/web-antd/src/views/ai/knowledge/knowledge/modules/form.vue b/apps/web-antd/src/views/ai/knowledge/knowledge/modules/form.vue index 2c582e452..3861b5b1f 100644 --- a/apps/web-antd/src/views/ai/knowledge/knowledge/modules/form.vue +++ b/apps/web-antd/src/views/ai/knowledge/knowledge/modules/form.vue @@ -18,7 +18,7 @@ import { $t } from '#/locales'; import { useFormSchema } from '../data'; const emit = defineEmits(['success']); -const formData = ref(); +const formData = ref(); const getTitle = computed(() => { return formData.value?.id ? $t('ui.actionTitle.edit', ['AI 知识库']) @@ -47,7 +47,7 @@ const [Modal, modalApi] = useVbenModal({ modalApi.lock(); // 提交表单 const data = - (await formApi.getValues()) as AiKnowledgeKnowledgeApi.KnowledgeVO; + (await formApi.getValues()) as AiKnowledgeKnowledgeApi.Knowledge; try { await (formData.value?.id ? updateKnowledge(data) @@ -66,7 +66,7 @@ const [Modal, modalApi] = useVbenModal({ return; } // 加载数据 - const data = modalApi.getData(); + const data = modalApi.getData(); if (!data || !data.id) { return; } diff --git a/apps/web-antd/src/views/ai/knowledge/segment/index.vue b/apps/web-antd/src/views/ai/knowledge/segment/index.vue index b33bcbd1c..c38c0fda6 100644 --- a/apps/web-antd/src/views/ai/knowledge/segment/index.vue +++ b/apps/web-antd/src/views/ai/knowledge/segment/index.vue @@ -41,12 +41,12 @@ function handleCreate() { } /** 编辑 */ -function handleEdit(row: AiKnowledgeKnowledgeApi.KnowledgeVO) { +function handleEdit(row: AiKnowledgeKnowledgeApi.Knowledge) { formModalApi.setData(row).open(); } /** 删除 */ -async function handleDelete(row: AiKnowledgeKnowledgeApi.KnowledgeVO) { +async function handleDelete(row: AiKnowledgeKnowledgeApi.Knowledge) { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting', [row.id]), key: 'action_key_msg', @@ -89,12 +89,12 @@ const [Grid, gridApi] = useVbenVxeGrid({ refresh: { code: 'query' }, search: true, }, - } as VxeTableGridOptions, + } as VxeTableGridOptions, }); /** 修改是否发布 */ async function handleStatusChange( - row: AiKnowledgeSegmentApi.KnowledgeSegmentVO, + row: AiKnowledgeSegmentApi.KnowledgeSegment, ) { try { // 修改状态的二次确认 diff --git a/apps/web-antd/src/views/ai/knowledge/segment/modules/form.vue b/apps/web-antd/src/views/ai/knowledge/segment/modules/form.vue index 103cf36a2..73ccf0144 100644 --- a/apps/web-antd/src/views/ai/knowledge/segment/modules/form.vue +++ b/apps/web-antd/src/views/ai/knowledge/segment/modules/form.vue @@ -18,7 +18,7 @@ import { $t } from '#/locales'; import { useFormSchema } from '../data'; const emit = defineEmits(['success']); -const formData = ref(); +const formData = ref(); const getTitle = computed(() => { return formData.value?.id ? $t('ui.actionTitle.edit', ['分段']) @@ -47,7 +47,7 @@ const [Modal, modalApi] = useVbenModal({ modalApi.lock(); // 提交表单 const data = - (await formApi.getValues()) as AiKnowledgeSegmentApi.KnowledgeSegmentVO; + (await formApi.getValues()) as AiKnowledgeSegmentApi.KnowledgeSegment; try { await (formData.value?.id ? updateKnowledgeSegment(data) @@ -66,7 +66,7 @@ const [Modal, modalApi] = useVbenModal({ return; } // 加载数据 - const data = modalApi.getData(); + const data = modalApi.getData(); if (!data || !data.id) { await formApi.setValues(data); return; diff --git a/apps/web-antd/src/views/ai/mindmap/index/index.vue b/apps/web-antd/src/views/ai/mindmap/index/index.vue index e5ea9727f..5fe6a3f67 100644 --- a/apps/web-antd/src/views/ai/mindmap/index/index.vue +++ b/apps/web-antd/src/views/ai/mindmap/index/index.vue @@ -27,7 +27,7 @@ function directGenerate(existPrompt: string) { isEnd.value = true; } /** 提交生成 */ -function submit(data: AiMindmapApi.AiMindMapGenerateReqVO) { +function submit(data: AiMindmapApi.AiMindMapGenerateReq) { isGenerating.value = true; isStart.value = true; isEnd.value = false; diff --git a/apps/web-antd/src/views/ai/mindmap/manager/index.vue b/apps/web-antd/src/views/ai/mindmap/manager/index.vue index a757d699a..6976846c9 100644 --- a/apps/web-antd/src/views/ai/mindmap/manager/index.vue +++ b/apps/web-antd/src/views/ai/mindmap/manager/index.vue @@ -31,7 +31,7 @@ function onRefresh() { } /** 删除 */ -async function handleDelete(row: AiMindmapApi.MindMapVO) { +async function handleDelete(row: AiMindmapApi.MindMap) { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting', [row.id]), key: 'action_key_msg', @@ -73,9 +73,9 @@ const [Grid, gridApi] = useVbenVxeGrid({ refresh: { code: 'query' }, search: true, }, - } as VxeTableGridOptions, + } as VxeTableGridOptions, }); -async function openPreview(row: AiMindmapApi.MindMapVO) { +async function openPreview(row: AiMindmapApi.MindMap) { previewVisible.value = false; drawerApi.open(); await nextTick(); diff --git a/apps/web-antd/src/views/ai/model/apiKey/index.vue b/apps/web-antd/src/views/ai/model/apiKey/index.vue index 962962819..29b136893 100644 --- a/apps/web-antd/src/views/ai/model/apiKey/index.vue +++ b/apps/web-antd/src/views/ai/model/apiKey/index.vue @@ -29,12 +29,12 @@ function handleCreate() { } /** 编辑 */ -function handleEdit(row: AiModelApiKeyApi.ApiKeyVO) { +function handleEdit(row: AiModelApiKeyApi.ApiKey) { formModalApi.setData(row).open(); } /** 删除 */ -async function handleDelete(row: AiModelApiKeyApi.ApiKeyVO) { +async function handleDelete(row: AiModelApiKeyApi.ApiKey) { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting', [row.name]), key: 'action_key_msg', @@ -77,7 +77,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ refresh: { code: 'query' }, search: true, }, - } as VxeTableGridOptions, + } as VxeTableGridOptions, }); diff --git a/apps/web-antd/src/views/ai/model/apiKey/modules/form.vue b/apps/web-antd/src/views/ai/model/apiKey/modules/form.vue index 41b19dd20..acc34ca49 100644 --- a/apps/web-antd/src/views/ai/model/apiKey/modules/form.vue +++ b/apps/web-antd/src/views/ai/model/apiKey/modules/form.vue @@ -14,7 +14,7 @@ import { $t } from '#/locales'; import { useFormSchema } from '../data'; const emit = defineEmits(['success']); -const formData = ref(); +const formData = ref(); const getTitle = computed(() => { return formData.value?.id ? $t('ui.actionTitle.edit', ['API 密钥']) @@ -42,7 +42,7 @@ const [Modal, modalApi] = useVbenModal({ } modalApi.lock(); // 提交表单 - const data = (await formApi.getValues()) as AiModelApiKeyApi.ApiKeyVO; + const data = (await formApi.getValues()) as AiModelApiKeyApi.ApiKey; try { await (formData.value?.id ? updateApiKey(data) : createApiKey(data)); // 关闭并提示 @@ -59,7 +59,7 @@ const [Modal, modalApi] = useVbenModal({ return; } // 加载数据 - const data = modalApi.getData(); + const data = modalApi.getData(); if (!data || !data.id) { return; } diff --git a/apps/web-antd/src/views/ai/model/chatRole/index.vue b/apps/web-antd/src/views/ai/model/chatRole/index.vue index b3228467e..c1cc3402c 100644 --- a/apps/web-antd/src/views/ai/model/chatRole/index.vue +++ b/apps/web-antd/src/views/ai/model/chatRole/index.vue @@ -29,12 +29,12 @@ function handleCreate() { } /** 编辑 */ -function handleEdit(row: AiModelChatRoleApi.ChatRoleVO) { +function handleEdit(row: AiModelChatRoleApi.ChatRole) { formModalApi.setData({ formType: 'update', ...row }).open(); } /** 删除 */ -async function handleDelete(row: AiModelChatRoleApi.ChatRoleVO) { +async function handleDelete(row: AiModelChatRoleApi.ChatRole) { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting', [row.name]), key: 'action_key_msg', @@ -77,7 +77,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ refresh: { code: 'query' }, search: true, }, - } as VxeTableGridOptions, + } as VxeTableGridOptions, }); diff --git a/apps/web-antd/src/views/ai/model/chatRole/modules/form.vue b/apps/web-antd/src/views/ai/model/chatRole/modules/form.vue index 5e94fb067..b9f1ce4f1 100644 --- a/apps/web-antd/src/views/ai/model/chatRole/modules/form.vue +++ b/apps/web-antd/src/views/ai/model/chatRole/modules/form.vue @@ -19,7 +19,7 @@ import { $t } from '#/locales'; import { useFormSchema } from '../data'; const emit = defineEmits(['success']); -const formData = ref(); +const formData = ref(); const getTitle = computed(() => { return formData.value?.id ? $t('ui.actionTitle.edit', ['聊天角色']) @@ -47,7 +47,7 @@ const [Modal, modalApi] = useVbenModal({ } modalApi.lock(); // 提交表单 - const data = (await formApi.getValues()) as AiModelChatRoleApi.ChatRoleVO; + const data = (await formApi.getValues()) as AiModelChatRoleApi.ChatRole; try { await (formData.value?.id ? updateChatRole(data) : createChatRole(data)); // 关闭并提示 @@ -64,7 +64,7 @@ const [Modal, modalApi] = useVbenModal({ return; } // 加载数据 - const data = modalApi.getData(); + const data = modalApi.getData(); if (!data || !data.id) { await formApi.setValues(data); return; diff --git a/apps/web-antd/src/views/ai/model/model/index.vue b/apps/web-antd/src/views/ai/model/model/index.vue index b8e37ff82..6bdd6fe79 100644 --- a/apps/web-antd/src/views/ai/model/model/index.vue +++ b/apps/web-antd/src/views/ai/model/model/index.vue @@ -17,7 +17,7 @@ import { $t } from '#/locales'; import { useGridColumns, useGridFormSchema } from './data'; import Form from './modules/form.vue'; -const apiKeyList = ref([] as AiModelApiKeyApi.ApiKeyVO[]); +const apiKeyList = ref([] as AiModelApiKeyApi.ApiKey[]); const [FormModal, formModalApi] = useVbenModal({ connectedComponent: Form, destroyOnClose: true, @@ -34,12 +34,12 @@ function handleCreate() { } /** 编辑 */ -function handleEdit(row: AiModelModelApi.ModelVO) { +function handleEdit(row: AiModelModelApi.Model) { formModalApi.setData(row).open(); } /** 删除 */ -async function handleDelete(row: AiModelModelApi.ModelVO) { +async function handleDelete(row: AiModelModelApi.Model) { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting', [row.name]), key: 'action_key_msg', @@ -82,7 +82,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ refresh: { code: 'query' }, search: true, }, - } as VxeTableGridOptions, + } as VxeTableGridOptions, }); onMounted(async () => { // 获得下拉数据 diff --git a/apps/web-antd/src/views/ai/model/model/modules/form.vue b/apps/web-antd/src/views/ai/model/model/modules/form.vue index 5cc55bf5f..05bbd9595 100644 --- a/apps/web-antd/src/views/ai/model/model/modules/form.vue +++ b/apps/web-antd/src/views/ai/model/model/modules/form.vue @@ -15,7 +15,7 @@ import { $t } from '#/locales'; import { useFormSchema } from '../data'; const emit = defineEmits(['success']); -const formData = ref(); +const formData = ref(); const getTitle = computed(() => { return formData.value?.id ? $t('ui.actionTitle.edit', ['模型配置']) @@ -43,7 +43,7 @@ const [Modal, modalApi] = useVbenModal({ } modalApi.lock(); // 提交表单 - const data = (await formApi.getValues()) as AiModelModelApi.ModelVO; + const data = (await formApi.getValues()) as AiModelModelApi.Model; try { await (formData.value?.id ? updateModel(data) : createModel(data)); // 关闭并提示 @@ -60,7 +60,7 @@ const [Modal, modalApi] = useVbenModal({ return; } // 加载数据 - const data = modalApi.getData(); + const data = modalApi.getData(); if (!data || !data.id) { return; } diff --git a/apps/web-antd/src/views/ai/model/tool/index.vue b/apps/web-antd/src/views/ai/model/tool/index.vue index 197bebbaa..e708b5608 100644 --- a/apps/web-antd/src/views/ai/model/tool/index.vue +++ b/apps/web-antd/src/views/ai/model/tool/index.vue @@ -29,12 +29,12 @@ function handleCreate() { } /** 编辑 */ -function handleEdit(row: AiModelToolApi.ToolVO) { +function handleEdit(row: AiModelToolApi.Tool) { formModalApi.setData(row).open(); } /** 删除 */ -async function handleDelete(row: AiModelToolApi.ToolVO) { +async function handleDelete(row: AiModelToolApi.Tool) { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting', [row.name]), key: 'action_key_msg', @@ -77,7 +77,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ refresh: { code: 'query' }, search: true, }, - } as VxeTableGridOptions, + } as VxeTableGridOptions, }); diff --git a/apps/web-antd/src/views/ai/model/tool/modules/form.vue b/apps/web-antd/src/views/ai/model/tool/modules/form.vue index 5b5566eb9..9772c98b7 100644 --- a/apps/web-antd/src/views/ai/model/tool/modules/form.vue +++ b/apps/web-antd/src/views/ai/model/tool/modules/form.vue @@ -14,7 +14,7 @@ import { $t } from '#/locales'; import { useFormSchema } from '../data'; const emit = defineEmits(['success']); -const formData = ref(); +const formData = ref(); const getTitle = computed(() => { return formData.value?.id ? $t('ui.actionTitle.edit', ['工具']) @@ -42,7 +42,7 @@ const [Modal, modalApi] = useVbenModal({ } modalApi.lock(); // 提交表单 - const data = (await formApi.getValues()) as AiModelToolApi.ToolVO; + const data = (await formApi.getValues()) as AiModelToolApi.Tool; try { await (formData.value?.id ? updateTool(data) : createTool(data)); // 关闭并提示 @@ -59,7 +59,7 @@ const [Modal, modalApi] = useVbenModal({ return; } // 加载数据 - const data = modalApi.getData(); + const data = modalApi.getData(); if (!data || !data.id) { return; } diff --git a/apps/web-antd/src/views/ai/music/manager/index.vue b/apps/web-antd/src/views/ai/music/manager/index.vue index ecdc9c60b..6293341ad 100644 --- a/apps/web-antd/src/views/ai/music/manager/index.vue +++ b/apps/web-antd/src/views/ai/music/manager/index.vue @@ -24,7 +24,7 @@ function onRefresh() { } /** 删除 */ -async function handleDelete(row: AiMusicApi.MusicVO) { +async function handleDelete(row: AiMusicApi.Music) { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting', [row.id]), key: 'action_key_msg', @@ -41,7 +41,7 @@ async function handleDelete(row: AiMusicApi.MusicVO) { } } /** 修改是否发布 */ -const handleUpdatePublicStatusChange = async (row: AiMusicApi.MusicVO) => { +const handleUpdatePublicStatusChange = async (row: AiMusicApi.Music) => { try { // 修改状态的二次确认 const text = row.publicStatus ? '公开' : '私有'; @@ -82,7 +82,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ refresh: { code: 'query' }, search: true, }, - } as VxeTableGridOptions, + } as VxeTableGridOptions, }); onMounted(async () => { // 获得下拉数据 diff --git a/apps/web-antd/src/views/ai/write/index/components/Left.vue b/apps/web-antd/src/views/ai/write/index/components/Left.vue index 1925f8d08..069558a15 100644 --- a/apps/web-antd/src/views/ai/write/index/components/Left.vue +++ b/apps/web-antd/src/views/ai/write/index/components/Left.vue @@ -17,7 +17,7 @@ import { import Tag from './Tag.vue'; -type TabType = AiWriteApi.WriteVO['type']; +type TabType = AiWriteApi.Write['type']; defineProps<{ isWriting: boolean; @@ -26,7 +26,7 @@ defineProps<{ const emit = defineEmits<{ (e: 'example', param: 'reply' | 'write'): void; (e: 'reset'): void; - (e: 'submit', params: Partial): void; + (e: 'submit', params: Partial): void; }>(); function omit(obj: Record, keysToOmit: string[]) { @@ -74,7 +74,7 @@ const [DefineLabel, ReuseLabel] = createReusableTemplate<{ label: string; }>(); -const initData: AiWriteApi.WriteVO = { +const initData: AiWriteApi.Write = { type: 1, prompt: '', originalContent: '', @@ -84,10 +84,10 @@ const initData: AiWriteApi.WriteVO = { format: 1, }; -const formData = ref({ ...initData }); +const formData = ref({ ...initData }); /** 用来记录切换之前所填写的数据,切换的时候给赋值回来 */ -const recordFormData = {} as Record; +const recordFormData = {} as Record; /** 切换tab */ function switchTab(value: TabType) { if (value !== selectedTab.value) { diff --git a/apps/web-antd/src/views/ai/write/index/index.vue b/apps/web-antd/src/views/ai/write/index/index.vue index 1f30fd25d..79485fbe8 100644 --- a/apps/web-antd/src/views/ai/write/index/index.vue +++ b/apps/web-antd/src/views/ai/write/index/index.vue @@ -24,7 +24,7 @@ function stopStream() { /** 执行写作 */ const rightRef = ref>(); -function submit(data: Partial) { +function submit(data: Partial) { abortController.value = new AbortController(); writeResult.value = ''; isWriting.value = true; diff --git a/apps/web-antd/src/views/ai/write/manager/index.vue b/apps/web-antd/src/views/ai/write/manager/index.vue index c6e013010..32a7e17d2 100644 --- a/apps/web-antd/src/views/ai/write/manager/index.vue +++ b/apps/web-antd/src/views/ai/write/manager/index.vue @@ -23,7 +23,7 @@ function onRefresh() { } /** 删除 */ -async function handleDelete(row: AiWriteApi.AiWritePageReqVO) { +async function handleDelete(row: AiWriteApi.AiWritePageReq) { const hideLoading = message.loading({ content: $t('ui.actionMessage.deleting', [row.id]), key: 'action_key_msg', @@ -65,7 +65,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ refresh: { code: 'query' }, search: true, }, - } as VxeTableGridOptions, + } as VxeTableGridOptions, }); onMounted(async () => { // 获得下拉数据 From ab4e467b451cf6ba73c47d1a126208e5dc2e1fb5 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Wed, 25 Jun 2025 18:51:13 +0800 Subject: [PATCH 09/16] =?UTF-8?q?feat:=20=E5=8E=BB=E9=99=A4=E6=89=80?= =?UTF-8?q?=E6=9C=89=E6=8E=A5=E5=8F=A3=E4=B8=AD=E7=9A=84=20vo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat/index/components/conversation/ConversationList.vue | 4 +--- apps/web-antd/src/views/ai/chat/index/index.vue | 4 +--- apps/web-antd/src/views/ai/knowledge/segment/index.vue | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/apps/web-antd/src/views/ai/chat/index/components/conversation/ConversationList.vue b/apps/web-antd/src/views/ai/chat/index/components/conversation/ConversationList.vue index e516c112b..54c766749 100644 --- a/apps/web-antd/src/views/ai/chat/index/components/conversation/ConversationList.vue +++ b/apps/web-antd/src/views/ai/chat/index/components/conversation/ConversationList.vue @@ -260,9 +260,7 @@ async function handleClearConversation() { } /** 对话置顶 */ -async function handleTop( - conversation: AiChatConversationApi.ChatConversation, -) { +async function handleTop(conversation: AiChatConversationApi.ChatConversation) { // 更新对话置顶 conversation.pinned = !conversation.pinned; await updateChatConversationMy(conversation); diff --git a/apps/web-antd/src/views/ai/chat/index/index.vue b/apps/web-antd/src/views/ai/chat/index/index.vue index bffdac0f3..5cfc50187 100644 --- a/apps/web-antd/src/views/ai/chat/index/index.vue +++ b/apps/web-antd/src/views/ai/chat/index/index.vue @@ -307,9 +307,7 @@ async function doSendMessage(content: string) { } /** 真正执行【发送】消息操作 */ -async function doSendMessageStream( - userMessage: AiChatMessageApi.ChatMessage, -) { +async function doSendMessageStream(userMessage: AiChatMessageApi.ChatMessage) { // 创建 AbortController 实例,以便中止请求 conversationInAbortController.value = new AbortController(); // 标记对话进行中 diff --git a/apps/web-antd/src/views/ai/knowledge/segment/index.vue b/apps/web-antd/src/views/ai/knowledge/segment/index.vue index c38c0fda6..53a7297f9 100644 --- a/apps/web-antd/src/views/ai/knowledge/segment/index.vue +++ b/apps/web-antd/src/views/ai/knowledge/segment/index.vue @@ -93,9 +93,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }); /** 修改是否发布 */ -async function handleStatusChange( - row: AiKnowledgeSegmentApi.KnowledgeSegment, -) { +async function handleStatusChange(row: AiKnowledgeSegmentApi.KnowledgeSegment) { try { // 修改状态的二次确认 const text = row.status ? '启用' : '禁用'; From e95805899a0755d1e5af48d98e3130883199441d Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Thu, 26 Jun 2025 14:32:49 +0800 Subject: [PATCH 10/16] fix: delete user --- apps/web-antd/src/views/system/user/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web-antd/src/views/system/user/index.vue b/apps/web-antd/src/views/system/user/index.vue index 4aa72d026..d1069e976 100644 --- a/apps/web-antd/src/views/system/user/index.vue +++ b/apps/web-antd/src/views/system/user/index.vue @@ -274,7 +274,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ icon: ACTION_ICON.DELETE, auth: ['system:user:delete'], popConfirm: { - title: $t('ui.actionMessage.deleteConfirm', [row.name]), + title: $t('ui.actionMessage.deleteConfirm', [row.username]), confirm: handleDelete.bind(null, row), }, }, From eb960dd38e44302ddc11b2879a419a64e91bcacd Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Thu, 26 Jun 2025 15:16:11 +0800 Subject: [PATCH 11/16] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/crm/backlog/index.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/views/crm/backlog/index.vue b/apps/web-antd/src/views/crm/backlog/index.vue index f1e45938f..4dffc497d 100644 --- a/apps/web-antd/src/views/crm/backlog/index.vue +++ b/apps/web-antd/src/views/crm/backlog/index.vue @@ -93,12 +93,13 @@ onMounted(async () => { - - - + diff --git a/apps/web-antd/src/views/mall/trade/brokerage/user/data.ts b/apps/web-antd/src/views/mall/trade/brokerage/user/data.ts index 86948da8b..8de25b5bf 100644 --- a/apps/web-antd/src/views/mall/trade/brokerage/user/data.ts +++ b/apps/web-antd/src/views/mall/trade/brokerage/user/data.ts @@ -53,7 +53,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'avatar', title: '头像', - width: 70, + minWidth: 70, cellRender: { name: 'CellImage', props: { @@ -71,7 +71,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'brokerageUserCount', title: '推广人数', - width: 80, + minWidth: 80, }, { field: 'brokerageOrderCount', @@ -116,18 +116,18 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'brokerageTime', title: '成为推广员时间', - width: 180, + minWidth: 180, formatter: 'formatDateTime', }, { field: 'bindUserId', title: '上级推广员编号', - width: 150, + minWidth: 150, }, { field: 'bindUserTime', title: '推广员绑定时间', - width: 180, + minWidth: 180, formatter: 'formatDateTime', }, { diff --git a/apps/web-antd/src/views/mall/trade/brokerage/user/modules/order-list-modal.vue b/apps/web-antd/src/views/mall/trade/brokerage/user/modules/order-list-modal.vue index 80403aea1..8706aa32f 100644 --- a/apps/web-antd/src/views/mall/trade/brokerage/user/modules/order-list-modal.vue +++ b/apps/web-antd/src/views/mall/trade/brokerage/user/modules/order-list-modal.vue @@ -99,7 +99,7 @@ function useColumns(): VxeTableGridOptions['columns'] { { field: 'sourceUserAvatar', title: '头像', - width: 70, + minWidth: 70, cellRender: { name: 'CellImage', props: { diff --git a/apps/web-antd/src/views/mall/trade/brokerage/user/modules/user-list-modal.vue b/apps/web-antd/src/views/mall/trade/brokerage/user/modules/user-list-modal.vue index b6d42606a..d69d6b352 100644 --- a/apps/web-antd/src/views/mall/trade/brokerage/user/modules/user-list-modal.vue +++ b/apps/web-antd/src/views/mall/trade/brokerage/user/modules/user-list-modal.vue @@ -75,7 +75,7 @@ function useColumns(): VxeTableGridOptions['columns'] { { field: 'avatar', title: '头像', - width: 70, + minWidth: 70, cellRender: { name: 'CellImage', props: { From ec9b364b33c7176248bf03f229242c7fc356f5b1 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Thu, 26 Jun 2025 17:45:23 +0800 Subject: [PATCH 16/16] fix: locales --- apps/web-antd/src/views/crm/contract/index.vue | 4 ++-- apps/web-antd/src/views/crm/receivable/index.vue | 4 ++-- apps/web-antd/src/views/infra/fileConfig/index.vue | 2 +- .../src/views/mall/promotion/combination/activity/index.vue | 2 +- packages/locales/src/langs/en-US/ui.json | 4 +++- packages/locales/src/langs/zh-CN/ui.json | 4 +++- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/apps/web-antd/src/views/crm/contract/index.vue b/apps/web-antd/src/views/crm/contract/index.vue index a99def71c..c9ef83bc4 100644 --- a/apps/web-antd/src/views/crm/contract/index.vue +++ b/apps/web-antd/src/views/crm/contract/index.vue @@ -72,13 +72,13 @@ async function handleDelete(row: CrmContractApi.Contract) { /** 提交审核 */ async function handleSubmit(row: CrmContractApi.Contract) { const hideLoading = message.loading({ - content: $t('ui.actionMessage.submitting', [row.name]), + content: '提交审核中...', key: 'action_key_msg', }); try { await submitContract(row.id as number); message.success({ - content: $t('ui.actionMessage.submitSuccess', [row.name]), + content: '提交审核成功', key: 'action_key_msg', }); onRefresh(); diff --git a/apps/web-antd/src/views/crm/receivable/index.vue b/apps/web-antd/src/views/crm/receivable/index.vue index be7bbfc24..c24268f02 100644 --- a/apps/web-antd/src/views/crm/receivable/index.vue +++ b/apps/web-antd/src/views/crm/receivable/index.vue @@ -72,13 +72,13 @@ async function handleDelete(row: CrmReceivableApi.Receivable) { /** 提交审核 */ async function handleSubmit(row: CrmReceivableApi.Receivable) { const hideLoading = message.loading({ - content: $t('ui.actionMessage.submitting', [row.no]), + content: '提交审核中...', key: 'action_key_msg', }); try { await submitReceivable(row.id as number); message.success({ - content: $t('ui.actionMessage.submitSuccess', [row.no]), + content: '提交审核成功', key: 'action_key_msg', }); onRefresh(); diff --git a/apps/web-antd/src/views/infra/fileConfig/index.vue b/apps/web-antd/src/views/infra/fileConfig/index.vue index 06418759e..4687f08e7 100644 --- a/apps/web-antd/src/views/infra/fileConfig/index.vue +++ b/apps/web-antd/src/views/infra/fileConfig/index.vue @@ -51,7 +51,7 @@ async function handleMaster(row: InfraFileConfigApi.FileConfig) { }); try { await updateFileConfigMaster(row.id as number); - message.success($t('ui.actionMessage.operationSuccess')); + message.success($t('ui.actionMessage.updateSuccess', [row.name])); onRefresh(); } finally { hideLoading(); diff --git a/apps/web-antd/src/views/mall/promotion/combination/activity/index.vue b/apps/web-antd/src/views/mall/promotion/combination/activity/index.vue index c0821d27c..287071e0e 100644 --- a/apps/web-antd/src/views/mall/promotion/combination/activity/index.vue +++ b/apps/web-antd/src/views/mall/promotion/combination/activity/index.vue @@ -52,7 +52,7 @@ async function handleClose( } const hideLoading = message.loading({ - content: $t('ui.actionMessage.processing'), + content: '关闭中...', key: 'action_key_msg', }); try { diff --git a/packages/locales/src/langs/en-US/ui.json b/packages/locales/src/langs/en-US/ui.json index a236d7444..80d000e42 100644 --- a/packages/locales/src/langs/en-US/ui.json +++ b/packages/locales/src/langs/en-US/ui.json @@ -32,7 +32,9 @@ "importSuccess": "Import succeeded", "importFail": "Import failed", "downloadTemplateFail": "Download template failed", - "updating": "Updating {0}..." + "updating": "Updating {0}...", + "updateSuccess": "Update {0} successfully", + "updateFailed": "Update {0} failed" }, "placeholder": { "input": "Please enter", diff --git a/packages/locales/src/langs/zh-CN/ui.json b/packages/locales/src/langs/zh-CN/ui.json index d1de301df..d0676ed9a 100644 --- a/packages/locales/src/langs/zh-CN/ui.json +++ b/packages/locales/src/langs/zh-CN/ui.json @@ -32,7 +32,9 @@ "importSuccess": "导入成功", "importFail": "导入失败", "downloadTemplateFail": "下载模板失败", - "updating": "正在更新 {0}..." + "updating": "正在更新 {0}...", + "updateSuccess": "更新 {0} 成功", + "updateFailed": "更新 {0} 失败" }, "placeholder": { "input": "请输入",