diff --git a/apps/web-antd/public/wx-xingyu.png b/apps/web-antd/public/wx-xingyu.png index 5e4b6017d..da2e45a34 100644 Binary files a/apps/web-antd/public/wx-xingyu.png and b/apps/web-antd/public/wx-xingyu.png differ diff --git a/apps/web-antd/src/api/bpm/category/index.ts b/apps/web-antd/src/api/bpm/category/index.ts index d8b5a9b3d..64cf36cb4 100644 --- a/apps/web-antd/src/api/bpm/category/index.ts +++ b/apps/web-antd/src/api/bpm/category/index.ts @@ -10,7 +10,7 @@ export namespace BpmCategoryApi { code: string; status: number; description?: string; - sort: number; // 分类排序 + sort: number; } } diff --git a/apps/web-antd/src/api/bpm/definition/index.ts b/apps/web-antd/src/api/bpm/definition/index.ts index c7facf6ec..01f0fd2a5 100644 --- a/apps/web-antd/src/api/bpm/definition/index.ts +++ b/apps/web-antd/src/api/bpm/definition/index.ts @@ -1,23 +1,31 @@ import type { PageParam, PageResult } from '@vben/request'; +import type { BpmModelApi } from '#/api/bpm/model'; + import { requestClient } from '#/api/request'; export namespace BpmProcessDefinitionApi { /** 流程定义 */ export interface ProcessDefinition { id: string; + key?: string; version: number; name: string; + category: string; description: string; deploymentTime: number; suspensionState: number; modelType: number; modelId: string; formType?: number; + formId?: number; + formName?: string; + formCustomCreatePath?: string; bpmnXml?: string; simpleModel?: string; formFields?: string[]; icon?: string; + startUsers?: BpmModelApi.UserInfo[]; } } diff --git a/apps/web-antd/src/api/bpm/form/index.ts b/apps/web-antd/src/api/bpm/form/index.ts index 0789071b2..99c1299e9 100644 --- a/apps/web-antd/src/api/bpm/form/index.ts +++ b/apps/web-antd/src/api/bpm/form/index.ts @@ -5,7 +5,7 @@ import { requestClient } from '#/api/request'; export namespace BpmFormApi { /** 流程表单 */ export interface Form { - id?: number | undefined; + id?: number; name: string; conf: string; fields: string[]; @@ -23,7 +23,7 @@ export async function getFormPage(params: PageParam) { } /** 获取表单详情 */ -export async function getFormDetail(id: number) { +export async function getForm(id: number) { return requestClient.get(`/bpm/form/get?id=${id}`); } diff --git a/apps/web-antd/src/api/bpm/model/index.ts b/apps/web-antd/src/api/bpm/model/index.ts index 443b85c5e..cd2afbc84 100644 --- a/apps/web-antd/src/api/bpm/model/index.ts +++ b/apps/web-antd/src/api/bpm/model/index.ts @@ -52,7 +52,7 @@ export interface ModelCategoryInfo { } /** 获取流程模型列表 */ -export async function getModelList(name: string | undefined) { +export async function getModelList(name?: string) { return requestClient.get('/bpm/model/list', { params: { name }, }); diff --git a/apps/web-antd/src/api/bpm/processInstance/index.ts b/apps/web-antd/src/api/bpm/processInstance/index.ts index 32e0075b9..ecbc03855 100644 --- a/apps/web-antd/src/api/bpm/processInstance/index.ts +++ b/apps/web-antd/src/api/bpm/processInstance/index.ts @@ -15,6 +15,7 @@ export namespace BpmProcessInstanceApi { export interface Task { id: number; name: string; + assigneeUser?: User; } export interface User { @@ -51,6 +52,7 @@ export namespace BpmProcessInstanceApi { export interface ProcessInstance { businessKey: string; category: string; + categoryName?: string; createTime: string; endTime: string; fields: string[]; @@ -64,6 +66,10 @@ export namespace BpmProcessInstanceApi { startTime?: Date; startUser?: User; status: number; + summary?: { + key: string; + value: string; + }[]; tasks?: BpmProcessInstanceApi.Task[]; } diff --git a/apps/web-antd/src/api/bpm/task/index.ts b/apps/web-antd/src/api/bpm/task/index.ts index 1ab011925..63e1af886 100644 --- a/apps/web-antd/src/api/bpm/task/index.ts +++ b/apps/web-antd/src/api/bpm/task/index.ts @@ -13,6 +13,7 @@ export namespace BpmTaskApi { status: number; // 监听器状态 event: string; // 监听事件 valueType: string; // 监听器值类型 + processInstance?: BpmProcessInstanceApi.ProcessInstance; // 流程实例 } // 流程任务 diff --git a/apps/web-antd/src/api/erp/finance/payment/index.ts b/apps/web-antd/src/api/erp/finance/payment/index.ts index c988b1286..502811665 100644 --- a/apps/web-antd/src/api/erp/finance/payment/index.ts +++ b/apps/web-antd/src/api/erp/finance/payment/index.ts @@ -20,9 +20,9 @@ export namespace ErpFinancePaymentApi { export interface FinancePayment { id?: number; // 付款单编号 no: string; // 付款单号 - supplierId: number; // 供应商编号 + supplierId?: number; // 供应商编号 supplierName?: string; // 供应商名称 - paymentTime: Date; // 付款时间 + paymentTime?: Date; // 付款时间 totalPrice: number; // 合计金额,单位:元 discountPrice: number; // 优惠金额 paymentPrice: number; // 实际付款金额 diff --git a/apps/web-antd/src/api/erp/finance/receipt/index.ts b/apps/web-antd/src/api/erp/finance/receipt/index.ts index a02f8c5e8..e86a3f699 100644 --- a/apps/web-antd/src/api/erp/finance/receipt/index.ts +++ b/apps/web-antd/src/api/erp/finance/receipt/index.ts @@ -2,7 +2,7 @@ import type { PageParam, PageResult } from '@vben/request'; import { requestClient } from '#/api/request'; -namespace ErpFinanceReceiptApi { +export namespace ErpFinanceReceiptApi { /** 收款单项 */ export interface FinanceReceiptItem { id?: number; diff --git a/apps/web-antd/src/api/iot/ota/task/record/index.ts b/apps/web-antd/src/api/iot/ota/task/record/index.ts index 3ad7b0990..8d41d1b74 100644 --- a/apps/web-antd/src/api/iot/ota/task/record/index.ts +++ b/apps/web-antd/src/api/iot/ota/task/record/index.ts @@ -95,7 +95,7 @@ export function getOtaTaskRecordStatusStatistics( taskId?: number, ) { return requestClient.get>( - '/iot/ota/task/record/status-statistics', + '/iot/ota/task/record/get-status-statistics', { params: { firmwareId, taskId } }, ); } diff --git a/apps/web-antd/src/api/iot/rule/scene/index.ts b/apps/web-antd/src/api/iot/rule/scene/index.ts index 5fc3224e1..59c8255a7 100644 --- a/apps/web-antd/src/api/iot/rule/scene/index.ts +++ b/apps/web-antd/src/api/iot/rule/scene/index.ts @@ -101,6 +101,7 @@ export interface Action { identifier?: string; value?: any; alertConfigId?: number; + params?: string; } /** 查询场景联动规则分页 */ diff --git a/apps/web-antd/src/api/iot/thingmodel/index.ts b/apps/web-antd/src/api/iot/thingmodel/index.ts index 341e0964e..354088704 100644 --- a/apps/web-antd/src/api/iot/thingmodel/index.ts +++ b/apps/web-antd/src/api/iot/thingmodel/index.ts @@ -175,17 +175,27 @@ export function deleteThingModelList(ids: number[]) { }); } -/** 导入物模型 TSL */ +/** 获取物模型 TSL */ +export function getThingModelTSL(productId: number) { + return requestClient.get( + '/iot/thing-model/get-tsl', + { params: { productId } }, + ); +} + +/** 导入物模型 TSL export function importThingModelTSL(productId: number, tslData: any) { return requestClient.post('/iot/thing-model/import-tsl', { productId, tslData, }); } + */ -/** 导出物模型 TSL */ +/** 导出物模型 TSL export function exportThingModelTSL(productId: number) { return requestClient.get('/iot/thing-model/export-tsl', { params: { productId }, }); } + */ diff --git a/apps/web-antd/src/api/mall/statistics/common.ts b/apps/web-antd/src/api/mall/statistics/common.ts index bb474b5cc..3b1fad6d7 100644 --- a/apps/web-antd/src/api/mall/statistics/common.ts +++ b/apps/web-antd/src/api/mall/statistics/common.ts @@ -1,5 +1,5 @@ /** 数据对照 Response */ -export interface MallDataComparisonResp { +export interface DataComparisonRespVO { value: T; reference: T; } diff --git a/apps/web-antd/src/api/mall/statistics/member.ts b/apps/web-antd/src/api/mall/statistics/member.ts index ea90af372..71423b131 100644 --- a/apps/web-antd/src/api/mall/statistics/member.ts +++ b/apps/web-antd/src/api/mall/statistics/member.ts @@ -1,13 +1,15 @@ -import type { MallDataComparisonResp } from './common'; +import type { Dayjs } from 'dayjs'; -import { formatDate } from '@vben/utils'; +import type { DataComparisonRespVO } from './common'; + +import { formatDateTime } from '@vben/utils'; import { requestClient } from '#/api/request'; export namespace MallMemberStatisticsApi { /** 会员分析 Request */ - export interface AnalyseReq { - times: Date[]; // 时间范围 + export interface MemberAnalyseReqVO { + times: Date[] | Dayjs[]; // 时间范围 } /** 会员分析对照数据 Response */ @@ -23,7 +25,7 @@ export namespace MallMemberStatisticsApi { orderUserCount: number; // 下单用户数 payUserCount: number; // 支付用户数 atv: number; // 平均客单价 - comparison: MallDataComparisonResp; // 对照数据 + comparison: DataComparisonRespVO; // 对照数据 } /** 会员地区统计 Response */ @@ -57,7 +59,7 @@ export namespace MallMemberStatisticsApi { } /** 会员数量统计 Response */ - export interface Count { + export interface MemberCountRespVO { visitUserCount: string; // 用户访问量 registerUserCount: number; // 注册用户数量 } @@ -77,12 +79,17 @@ export function getMemberSummary() { } /** 查询会员分析数据 */ -export function getMemberAnalyse(params: MallMemberStatisticsApi.AnalyseReq) { +export function getMemberAnalyse( + params: MallMemberStatisticsApi.MemberAnalyseReqVO, +) { return requestClient.get( '/statistics/member/analyse', { params: { - times: [formatDate(params.times[0]), formatDate(params.times[1])], + times: [ + formatDateTime(params.times[0]), + formatDateTime(params.times[1]), + ], }, }, ); @@ -112,7 +119,7 @@ export function getMemberTerminalStatisticsList() { /** 获得用户数量量对照 */ export function getUserCountComparison() { return requestClient.get< - MallDataComparisonResp + DataComparisonRespVO >('/statistics/member/user-count-comparison'); } @@ -122,7 +129,7 @@ export function getMemberRegisterCountList(beginTime: Date, endTime: Date) { '/statistics/member/register-count-list', { params: { - times: [formatDate(beginTime), formatDate(endTime)], + times: [formatDateTime(beginTime), formatDateTime(endTime)], }, }, ); diff --git a/apps/web-antd/src/api/mall/statistics/product.ts b/apps/web-antd/src/api/mall/statistics/product.ts index d458d4353..2e83f945a 100644 --- a/apps/web-antd/src/api/mall/statistics/product.ts +++ b/apps/web-antd/src/api/mall/statistics/product.ts @@ -1,6 +1,6 @@ import type { PageParam, PageResult } from '@vben/request'; -import type { MallDataComparisonResp } from './common'; +import type { DataComparisonRespVO } from './common'; import { requestClient } from '#/api/request'; @@ -41,14 +41,14 @@ export namespace MallProductStatisticsApi { } /** 获得商品统计分析 */ -export function getProductStatisticsAnalyse(params: PageParam) { +export function getProductStatisticsAnalyse(params: any) { return requestClient.get< - MallDataComparisonResp + DataComparisonRespVO >('/statistics/product/analyse', { params }); } /** 获得商品状况明细 */ -export function getProductStatisticsList(params: PageParam) { +export function getProductStatisticsList(params: any) { return requestClient.get( '/statistics/product/list', { params }, @@ -56,7 +56,7 @@ export function getProductStatisticsList(params: PageParam) { } /** 导出获得商品状况明细 Excel */ -export function exportProductStatisticsExcel(params: PageParam) { +export function exportProductStatisticsExcel(params: any) { return requestClient.download('/statistics/product/export-excel', { params }); } diff --git a/apps/web-antd/src/api/mall/statistics/trade.ts b/apps/web-antd/src/api/mall/statistics/trade.ts index 1f866c636..17b20e709 100644 --- a/apps/web-antd/src/api/mall/statistics/trade.ts +++ b/apps/web-antd/src/api/mall/statistics/trade.ts @@ -1,6 +1,6 @@ -import type { MallDataComparisonResp } from './common'; +import type { DataComparisonRespVO } from './common'; -import { formatDate } from '@vben/utils'; +import { formatDate, formatDateTime } from '@vben/utils'; import { requestClient } from '#/api/request'; @@ -43,7 +43,7 @@ export namespace MallTradeStatisticsApi { } /** 交易订单统计 Response */ - export interface TradeOrderSummary { + export interface TradeOrderSummaryRespVO { /** 支付订单商品数 */ orderPayCount?: number; /** 总支付金额,单位:分 */ @@ -71,36 +71,28 @@ const formatDateParam = (params: MallTradeStatisticsApi.TradeTrendReq) => { /** 查询交易统计 */ export function getTradeStatisticsSummary() { return requestClient.get< - MallDataComparisonResp + DataComparisonRespVO >('/statistics/trade/summary'); } /** 获得交易状况统计 */ -export function getTradeStatisticsAnalyse( - params: MallTradeStatisticsApi.TradeTrendReq, -) { +export function getTradeStatisticsAnalyse(params: any) { return requestClient.get< - MallDataComparisonResp - >('/statistics/trade/analyse', { params: formatDateParam(params) }); + DataComparisonRespVO + >('/statistics/trade/analyse', { params }); } /** 获得交易状况明细 */ -export function getTradeStatisticsList( - params: MallTradeStatisticsApi.TradeTrendReq, -) { +export function getTradeStatisticsList(params: any) { return requestClient.get( '/statistics/trade/list', - { params: formatDateParam(params) }, + { params }, ); } /** 导出交易状况明细 */ -export function exportTradeStatisticsExcel( - params: MallTradeStatisticsApi.TradeTrendReq, -) { - return requestClient.download('/statistics/trade/export-excel', { - params: formatDateParam(params), - }); +export function exportTradeStatisticsExcel(params: any) { + return requestClient.download('/statistics/trade/export-excel', { params }); } /** 获得交易订单数量 */ @@ -113,7 +105,7 @@ export function getOrderCount() { /** 获得交易订单数量对照 */ export function getOrderComparison() { return requestClient.get< - MallDataComparisonResp + DataComparisonRespVO >('/statistics/trade/order-comparison'); } @@ -124,12 +116,12 @@ export function getOrderCountTrendComparison( endTime: Date, ) { return requestClient.get< - MallDataComparisonResp[] + DataComparisonRespVO[] >('/statistics/trade/order-count-trend', { params: { type, - beginTime: formatDate(beginTime), - endTime: formatDate(endTime), + beginTime: formatDateTime(beginTime), + endTime: formatDateTime(endTime), }, }); } diff --git a/apps/web-antd/src/api/mp/statistics/index.ts b/apps/web-antd/src/api/mp/statistics/index.ts index e36073820..47200ff2b 100644 --- a/apps/web-antd/src/api/mp/statistics/index.ts +++ b/apps/web-antd/src/api/mp/statistics/index.ts @@ -1,13 +1,10 @@ -import type { PageParam } from '@vben/request'; - import { requestClient } from '#/api/request'; export namespace MpStatisticsApi { /** 统计查询参数 */ - export interface StatisticsQuery extends PageParam { + export interface StatisticsQuery { accountId: number; - beginDate: string; - endDate: string; + date: Date[]; } /** 消息发送概况数据 */ diff --git a/apps/web-antd/src/bootstrap.ts b/apps/web-antd/src/bootstrap.ts index 0f1ab09fb..be5a5eda7 100644 --- a/apps/web-antd/src/bootstrap.ts +++ b/apps/web-antd/src/bootstrap.ts @@ -35,6 +35,7 @@ async function bootstrap(namespace: string) { // }); const app = createApp(App); + app.use(VueDOMPurifyHTML); // 注册v-loading指令 registerLoadingDirective(app, { @@ -61,10 +62,6 @@ async function bootstrap(namespace: string) { // formCreate setupFormCreate(app); - // vue-dompurify-html - // TODO @dhb52:VueDOMPurifyHTML 是不是不用引入哈? - app.use(VueDOMPurifyHTML); - // 配置Motion插件 const { MotionPlugin } = await import('@vben/plugins/motion'); app.use(MotionPlugin); diff --git a/apps/web-antd/src/components/bpmn-process-designer/package/index.ts b/apps/web-antd/src/components/bpmn-process-designer/package/index.ts deleted file mode 100644 index f5e6b117f..000000000 --- a/apps/web-antd/src/components/bpmn-process-designer/package/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import './theme/index.scss'; -import 'bpmn-js/dist/assets/diagram-js.css'; -import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css'; -import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css'; -import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css'; -// TODO @puhui999:样式问题:设计器那,位置不太对; - -export { default as MyProcessDesigner } from './designer'; -// TODO @puhui999:流程发起时,预览相关的,需要使用; -export { default as MyProcessViewer } from './designer/index2'; -export { default as MyProcessPenal } from './penal'; - -// TODO @puhui999:【有个迁移的打印】【新增】流程打印,由 [@Lesan](https://gitee.com/LesanOuO) 贡献 [#816](https://gitee.com/yudaocode/yudao-ui-admin-vue3/pulls/816/)、[#1418](https://gitee.com/zhijiantianya/ruoyi-vue-pro/pulls/1418/)、[#817](https://gitee.com/yudaocode/yudao-ui-admin-vue3/pulls/817/)、[#1419](https://gitee.com/zhijiantianya/ruoyi-vue-pro/pulls/1419/)、[#1424](https://gitee.com/zhijiantianya/ruoyi-vue-pro/pulls/1424)、[#819](https://gitee.com/yudaocode/yudao-ui-admin-vue3/pulls/819)、[#821](https://gitee.com/yudaocode/yudao-ui-admin-vue3/pulls/821/) diff --git a/apps/web-antd/src/components/description/description.vue b/apps/web-antd/src/components/description/description.vue index c3f54695f..057f9db03 100644 --- a/apps/web-antd/src/components/description/description.vue +++ b/apps/web-antd/src/components/description/description.vue @@ -1,82 +1,196 @@ diff --git a/apps/web-antd/src/components/description/typing.ts b/apps/web-antd/src/components/description/typing.ts index a0e997770..378f4a2ad 100644 --- a/apps/web-antd/src/components/description/typing.ts +++ b/apps/web-antd/src/components/description/typing.ts @@ -1,27 +1,56 @@ -import type { DescriptionsProps } from 'ant-design-vue'; +import type { DescriptionsProps } from 'ant-design-vue/es/descriptions'; +import type { JSX } from 'vue/jsx-runtime'; import type { CSSProperties, VNode } from 'vue'; -// TODO @xingyu:【content】这个纠结下;1)vben2.0 是 render;https://doc.vvbin.cn/components/desc.html#usage 2) -// TODO @xingyu:vben2.0 还有 sapn【done】、labelMinWidth、contentMinWidth -// TODO @xingyu:【hidden】这个纠结下;1)vben2.0 是 show; +import type { Recordable } from '@vben/types'; + export interface DescriptionItemSchema { - label: string | VNode; // 内容的描述 - field?: string; // 对应 data 中的字段名 - content?: ((data: any) => string | VNode) | string | VNode; // 自定义需要展示的内容,比如说 dict-tag - span?: number; // 包含列的数量 - labelStyle?: CSSProperties; // 自定义标签样式 - contentStyle?: CSSProperties; // 自定义内容样式 - hidden?: ((data: any) => boolean) | boolean; // 是否显示 + labelMinWidth?: number; + contentMinWidth?: number; + // 自定义标签样式 + labelStyle?: CSSProperties; + // 对应 data 中的字段名 + field: string; + // 内容的描述 + label: JSX.Element | string | VNode; + // 包含列的数量 + span?: number; + // 是否显示 + show?: (...arg: any) => boolean; + // 插槽名称 + slot?: string; + // 自定义需要展示的内容 + render?: ( + val: any, + data?: Recordable, + ) => Element | JSX.Element | number | string | undefined | VNode; } -// TODO @xingyu:vben2.0 还有 title【done】、bordered【done】d、useCollapse、collapseOptions -// TODO @xingyu:from 5.0:bordered 默认为 true -// TODO @xingyu:from 5.0:column 默认为 lg: 3, md: 3, sm: 2, xl: 3, xs: 1, xxl: 4 -// TODO @xingyu:from 5.0:size 默认为 small;有 'default', 'middle', 'small', undefined -// TODO @xingyu:from 5.0:useCollapse 默认为 true -export interface DescriptionsOptions { - data?: Record; // 数据 - schema?: DescriptionItemSchema[]; // 描述项配置 - componentProps?: DescriptionsProps; // antd Descriptions 组件参数 +export interface DescriptionProps extends DescriptionsProps { + // 是否包含卡片组件 + useCard?: boolean; + // 描述项配置 + schema: DescriptionItemSchema[]; + // 数据 + data: Recordable; + // 标题 + title?: string; + // 是否包含边框 + bordered?: boolean; + // 列数 + column?: + | number + | { + lg: number; + md: number; + sm: number; + xl: number; + xs: number; + xxl: number; + }; +} + +export interface DescInstance { + setDescProps(descProps: Partial): void; } diff --git a/apps/web-antd/src/components/description/use-description.ts b/apps/web-antd/src/components/description/use-description.ts index 7f99238bf..fd24920f0 100644 --- a/apps/web-antd/src/components/description/use-description.ts +++ b/apps/web-antd/src/components/description/use-description.ts @@ -1,71 +1,31 @@ -import type { DescriptionsOptions } from './typing'; +import type { Component } from 'vue'; -import { defineComponent, h, isReactive, reactive, watch } from 'vue'; +import type { DescInstance, DescriptionProps } from './typing'; + +import { h, reactive } from 'vue'; import Description from './description.vue'; -/** 描述列表 api 定义 */ -class DescriptionApi { - private state = reactive>({}); +export function useDescription(options?: Partial) { + const propsState = reactive>(options || {}); - constructor(options: DescriptionsOptions) { - this.state = { ...options }; - } + const api: DescInstance = { + setDescProps: (descProps: Partial): void => { + Object.assign(propsState, descProps); + }, + }; - getState(): DescriptionsOptions { - return this.state as DescriptionsOptions; - } - - // TODO @xingyu:【setState】纠结下:1)vben2.0 是 data https://doc.vvbin.cn/components/desc.html#usage; - setState(newState: Partial) { - this.state = { ...this.state, ...newState }; - } -} - -export type ExtendedDescriptionApi = DescriptionApi; - -export function useDescription(options: DescriptionsOptions) { - const IS_REACTIVE = isReactive(options); - const api = new DescriptionApi(options); - // 扩展 API - const extendedApi: ExtendedDescriptionApi = api as never; - const Desc = defineComponent({ + // 创建一个包装组件,将 propsState 合并到 props 中 + const DescriptionWrapper: Component = { name: 'UseDescription', inheritAttrs: false, - setup(_, { attrs, slots }) { - // 合并props和attrs到state - api.setState({ ...attrs }); - - return () => - h( - Description, - { - ...api.getState(), - ...attrs, - }, - slots, - ); + setup(_props, { attrs, slots }) { + return () => { + // @ts-ignore - 避免类型实例化过深 + return h(Description, { ...propsState, ...attrs }, slots); + }; }, - }); + }; - // 响应式支持 - if (IS_REACTIVE) { - watch( - () => options.schema, - (newSchema) => { - api.setState({ schema: newSchema }); - }, - { immediate: true, deep: true }, - ); - - watch( - () => options.data, - (newData) => { - api.setState({ data: newData }); - }, - { immediate: true, deep: true }, - ); - } - - return [Desc, extendedApi] as const; + return [DescriptionWrapper, api] as const; } diff --git a/apps/web-antd/src/components/form-create/components/use-api-select.tsx b/apps/web-antd/src/components/form-create/components/use-api-select.tsx index 6d728715e..ead612517 100644 --- a/apps/web-antd/src/components/form-create/components/use-api-select.tsx +++ b/apps/web-antd/src/components/form-create/components/use-api-select.tsx @@ -202,7 +202,7 @@ export function useApiSelect(option: ApiSelectProps) { onUpdate:value={onUpdateModelValue as any} value={modelValue as any} {...restAttrs} - // TODO: remote 对等实现 + // TODO @xingyu remote 对等实现, 还是说没作用 // remote={props.remote} {...(props.remote && { remoteMethod })} > @@ -223,7 +223,7 @@ export function useApiSelect(option: ApiSelectProps) { onUpdate:value={onUpdateModelValue as any} value={modelValue as any} {...restAttrs} - // TODO: @dhb52 remote 对等实现, 还是说没作用 + // TODO: @xingyu remote 对等实现, 还是说没作用 // remote={props.remote} {...(props.remote && { remoteMethod })} > diff --git a/apps/web-antd/src/components/form-create/typing.ts b/apps/web-antd/src/components/form-create/typing.ts index b89e6f780..35c1a39fc 100644 --- a/apps/web-antd/src/components/form-create/typing.ts +++ b/apps/web-antd/src/components/form-create/typing.ts @@ -1,9 +1,7 @@ -import type { Rule } from '@form-create/ant-design-vue'; - /** 数据字典 Select 选择器组件 Props 类型 */ export interface DictSelectProps { dictType: string; // 字典类型 - valueType?: 'bool' | 'int' | 'str'; // 字典值类型 TODO @芋艿:'boolean' | 'number' | 'string';需要和 vue3 一起统一! + valueType?: 'bool' | 'int' | 'str'; // 字典值类型 selectType?: 'checkbox' | 'radio' | 'select'; // 选择器类型,下拉框 select、多选框 checkbox、单选框 radio formCreateInject?: any; } @@ -22,25 +20,6 @@ export interface Menu { list: MenuItem[]; } -export type MenuList = Array; - -// TODO @dhb52:MenuList、Menu、MenuItem、DragRule 这几个,是不是没用到呀? -// 拖拽组件的规则 -export interface DragRule { - icon: string; - name: string; - label: string; - children?: string; - inside?: true; - drag?: string | true; - dragBtn?: false; - mask?: false; - - rule(): Rule; - - props(v: any, v1: any): Rule[]; -} - /** 通用 API 下拉组件 Props 类型 */ export interface ApiSelectProps { name: string; // 组件名称 diff --git a/apps/web-antd/src/components/shortcut-date-range-picker/index.ts b/apps/web-antd/src/components/shortcut-date-range-picker/index.ts new file mode 100644 index 000000000..a3ee51539 --- /dev/null +++ b/apps/web-antd/src/components/shortcut-date-range-picker/index.ts @@ -0,0 +1 @@ +export { default as ShortcutDateRangePicker } from './shortcut-date-range-picker.vue'; diff --git a/apps/web-antd/src/components/shortcut-date-range-picker/shortcut-date-range-picker.vue b/apps/web-antd/src/components/shortcut-date-range-picker/shortcut-date-range-picker.vue new file mode 100644 index 000000000..e5ff39990 --- /dev/null +++ b/apps/web-antd/src/components/shortcut-date-range-picker/shortcut-date-range-picker.vue @@ -0,0 +1,89 @@ + + + diff --git a/apps/web-antd/src/components/summary-card/index.ts b/apps/web-antd/src/components/summary-card/index.ts deleted file mode 100644 index 598d73d61..000000000 --- a/apps/web-antd/src/components/summary-card/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as SummaryCard } from './summary-card.vue'; -export type { SummaryCardProps } from './typing'; diff --git a/apps/web-antd/src/components/summary-card/summary-card.vue b/apps/web-antd/src/components/summary-card/summary-card.vue deleted file mode 100644 index b2fdd3510..000000000 --- a/apps/web-antd/src/components/summary-card/summary-card.vue +++ /dev/null @@ -1,57 +0,0 @@ - - diff --git a/apps/web-antd/src/components/summary-card/typing.ts b/apps/web-antd/src/components/summary-card/typing.ts deleted file mode 100644 index 0ef1fdc6f..000000000 --- a/apps/web-antd/src/components/summary-card/typing.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface SummaryCardProps { - title: string; - tooltip?: string; - icon?: string; - iconColor?: string; - iconBgColor?: string; - prefix?: string; - value?: number; - decimals?: number; - percent?: number | string; -} diff --git a/apps/web-antd/src/components/table-action/icons.ts b/apps/web-antd/src/components/table-action/icons.ts index 88cda5978..df5bf1a77 100644 --- a/apps/web-antd/src/components/table-action/icons.ts +++ b/apps/web-antd/src/components/table-action/icons.ts @@ -10,4 +10,5 @@ export const ACTION_ICON = { MORE: 'lucide:ellipsis-vertical', VIEW: 'lucide:eye', COPY: 'lucide:copy', + CLOSE: 'lucide:x', }; diff --git a/apps/web-antd/src/components/upload/image-upload.vue b/apps/web-antd/src/components/upload/image-upload.vue index 4f0e9d1bf..a79f5b7cb 100644 --- a/apps/web-antd/src/components/upload/image-upload.vue +++ b/apps/web-antd/src/components/upload/image-upload.vue @@ -241,7 +241,7 @@ function handleUploadSuccess(res: any, file: File) { // 处理上传错误 function handleUploadError(error: any) { console.error('上传错误:', error); - message.error($t('ui.upload.uploadError')); + message.error('上传错误!!!'); // 上传失败时减少计数器 uploadNumber.value = Math.max(0, uploadNumber.value - 1); } diff --git a/apps/web-antd/src/plugins/form-create/index.ts b/apps/web-antd/src/plugins/form-create/index.ts index 958b9d52b..d7b59b5b7 100644 --- a/apps/web-antd/src/plugins/form-create/index.ts +++ b/apps/web-antd/src/plugins/form-create/index.ts @@ -91,10 +91,12 @@ const components = [ FileUpload, ]; +// 参考 https://www.form-create.com/v3/ant-design-vue/auto-import 文档 export function setupFormCreate(app: App) { components.forEach((component) => { app.component(component.name as string, component); }); + // TODO @xingyu:这里为啥 app.component('AMessage', message); 看官方是没有的; app.component('AMessage', message); formCreate.use(install); app.use(formCreate); diff --git a/apps/web-antd/src/router/routes/modules/ai.ts b/apps/web-antd/src/router/routes/modules/ai.ts index 67f9f69d8..dc66c4927 100644 --- a/apps/web-antd/src/router/routes/modules/ai.ts +++ b/apps/web-antd/src/router/routes/modules/ai.ts @@ -83,7 +83,7 @@ const routes: RouteRecordRaw[] = [ }, }, { - path: 'console/workflow/create', + path: String.raw`workflow/create/:id(\d+)/:type(update|create)`, component: () => import('#/views/ai/workflow/form/index.vue'), name: 'AiWorkflowCreate', meta: { diff --git a/apps/web-antd/src/router/routes/modules/bpm.ts b/apps/web-antd/src/router/routes/modules/bpm.ts index 21abaabe5..05e0e5664 100644 --- a/apps/web-antd/src/router/routes/modules/bpm.ts +++ b/apps/web-antd/src/router/routes/modules/bpm.ts @@ -51,7 +51,7 @@ const routes: RouteRecordRaw[] = [ name: 'BpmFormEditor', component: () => import('#/views/bpm/form/designer/index.vue'), meta: { - title: '编辑流程表单', + title: '设计流程表单', activePath: '/bpm/manager/form', }, props: (route) => { diff --git a/apps/web-antd/src/router/routes/modules/iot.ts b/apps/web-antd/src/router/routes/modules/iot.ts index f43a547b0..3e7f87caf 100644 --- a/apps/web-antd/src/router/routes/modules/iot.ts +++ b/apps/web-antd/src/router/routes/modules/iot.ts @@ -18,7 +18,8 @@ const routes: RouteRecordRaw[] = [ title: '产品详情', activePath: '/iot/device/product', }, - component: () => import('#/views/iot/product/product/modules/detail/index.vue'), + component: () => + import('#/views/iot/product/product/modules/detail/index.vue'), }, { path: 'device/detail/:id', @@ -27,11 +28,21 @@ const routes: RouteRecordRaw[] = [ title: '设备详情', activePath: '/iot/device/device', }, - component: () => import('#/views/iot/device/device/modules/detail/index.vue'), + component: () => + import('#/views/iot/device/device/modules/detail/index.vue'), + }, + { + path: 'ota/firmware/detail/:id', + name: 'IoTOtaFirmwareDetail', + meta: { + title: '固件详情', + activePath: '/iot/ota', + }, + component: () => + import('#/views/iot/ota/modules/firmware-detail/index.vue'), }, ], }, ]; export default routes; - diff --git a/apps/web-antd/src/router/routes/modules/mall.ts b/apps/web-antd/src/router/routes/modules/mall.ts index e68bea65f..870c111f5 100644 --- a/apps/web-antd/src/router/routes/modules/mall.ts +++ b/apps/web-antd/src/router/routes/modules/mall.ts @@ -18,7 +18,7 @@ const routes: RouteRecordRaw[] = [ title: '商品添加', activePath: '/mall/product/spu', }, - component: () => import('#/views/mall/product/spu/modules/form.vue'), + component: () => import('#/views/mall/product/spu/form/index.vue'), }, { path: String.raw`spu/edit/:id(\d+)`, @@ -27,16 +27,16 @@ const routes: RouteRecordRaw[] = [ title: '商品编辑', activePath: '/mall/product/spu', }, - component: () => import('#/views/mall/product/spu/modules/form.vue'), + component: () => import('#/views/mall/product/spu/form/index.vue'), }, { path: String.raw`spu/detail/:id(\d+)`, name: 'ProductSpuDetail', meta: { title: '商品详情', - activePath: '/crm/business', + activePath: '/mall/product/spu', }, - component: () => import('#/views/mall/product/spu/modules/detail.vue'), + component: () => import('#/views/mall/product/spu/form/index.vue'), }, ], }, diff --git a/apps/web-antd/src/views/_core/authentication/forget-password.vue b/apps/web-antd/src/views/_core/authentication/forget-password.vue index 2ef4b0ff1..4837cf7dc 100644 --- a/apps/web-antd/src/views/_core/authentication/forget-password.vue +++ b/apps/web-antd/src/views/_core/authentication/forget-password.vue @@ -197,7 +197,7 @@ async function handleSubmit(values: Recordable) { await smsResetPassword({ mobile, code, password }); message.success($t('authentication.resetPasswordSuccess')); // 重置成功后跳转到首页 - router.push('/'); + await router.push('/'); } catch (error) { console.error('重置密码失败:', error); } finally { diff --git a/apps/web-antd/src/views/_core/authentication/sso-login.vue b/apps/web-antd/src/views/_core/authentication/sso-login.vue index 1bc7ad9b1..aba72ac83 100644 --- a/apps/web-antd/src/views/_core/authentication/sso-login.vue +++ b/apps/web-antd/src/views/_core/authentication/sso-login.vue @@ -11,7 +11,7 @@ import { authorize, getAuthorize } from '#/api/system/oauth2/open'; defineOptions({ name: 'SSOLogin' }); -const { query } = useRoute(); // 路由参数 +const { query } = useRoute(); const client = ref({ name: '', 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 08348f79c..7339c9e5b 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 @@ -17,6 +17,7 @@ import { getChatConversationMyList, updateChatConversationMy, } from '#/api/ai/chat/conversation'; +import { $t } from '#/locales'; import RoleRepository from '../role/RoleRepository.vue'; @@ -201,7 +202,8 @@ async function updateConversationTitle( if ( filterConversationList.length > 0 && filterConversationList[0] && // tip:避免切换对话 - activeConversationId.value === filterConversationList[0].id + activeConversationId.value === + (filterConversationList[0].id as number) ) { emits('onConversationClick', filterConversationList[0]); } @@ -249,7 +251,7 @@ async function handleClearConversation() { try { await confirm('确认后对话会全部清空,置顶的对话除外。'); await deleteChatConversationMyByUnpinned(); - message.success('操作成功!'); + message.success($t('ui.actionMessage.operationSuccess')); // 清空 对话 和 对话内容 activeConversationId.value = null; // 获取 对话列表 @@ -305,7 +307,7 @@ onMounted(async () => {