From f0a33a628bc68f11962c5634f41e4b563522fc04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=90=A6?= Date: Mon, 10 Aug 2026 18:44:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=201.=20=E6=9B=B4=E6=96=B0=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=202.=20=E4=BF=AE=E5=A4=8D=E6=A1=86=E6=9E=B6=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=90=8E=E5=AF=BC=E8=87=B4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/package.json | 26 +- apps/web-antd/src/adapter/component/index.ts | 10 + .../commands/SetCellValueCommand.ts | 24 +- .../src/components/form/component-map.ts | 4 +- .../form/components/api-log-user-picker.vue | 692 +++++++++--------- .../src/components/form/components/editor.vue | 28 +- .../src/utils/chinesePrescriptionMargin.ts | 120 +-- .../express/express-company/config/table.ts | 2 +- .../express/express-company/index.vue | 2 +- .../order/prescription/config/table.ts | 2 +- .../business/order/prescription/index.vue | 2 +- .../order/product-order/config/table.ts | 2 +- .../business/order/product-order/index.vue | 2 +- .../business/order/register/config/table.ts | 2 +- .../views/business/order/register/index.vue | 2 +- .../patient-call-log-dict/config/table.ts | 2 +- .../business/patient-call-log-dict/index.vue | 2 +- .../product/china-medicine/config/table.ts | 2 +- .../business/product/china-medicine/index.vue | 2 +- .../product/drug-categories/config/table.ts | 2 +- .../product/drug-categories/index.vue | 2 +- .../product/health-food/config/table.ts | 2 +- .../business/product/health-food/index.vue | 2 +- .../product/medical-device/config/table.ts | 2 +- .../business/product/medical-device/index.vue | 2 +- .../business/product/non-drug/config/table.ts | 2 +- .../views/business/product/non-drug/index.vue | 2 +- .../product/service-pack/config/table.ts | 2 +- .../business/product/service-pack/index.vue | 2 +- .../product/western-medicine/config/table.ts | 2 +- .../product/western-medicine/index.vue | 2 +- .../config/table.ts | 2 +- .../special-prescription-category/index.vue | 2 +- .../special-prescription/config/table.ts | 2 +- .../business/special-prescription/index.vue | 2 +- .../admin/config/table.ts | 2 +- .../warehouse-drug-management/admin/index.vue | 2 +- .../shop/config/table.ts | 2 +- .../warehouse-drug-management/shop/index.vue | 2 +- .../store/config/table.ts | 2 +- .../warehouse-drug-management/store/index.vue | 2 +- .../doctor/doctor-article/config/table.ts | 2 +- .../src/views/doctor/doctor-article/index.vue | 2 +- .../src/views/doctor/doctor/config/table.ts | 2 +- .../src/views/doctor/doctor/index.vue | 2 +- .../components/EntryListPage.vue | 4 +- .../views/doctor/pharmacist/config/table.ts | 2 +- .../src/views/doctor/pharmacist/index.vue | 2 +- .../charge-cash-pay-record/config/table.ts | 2 +- .../finance/charge-cash-pay-record/index.vue | 2 +- .../views/finance/fund-water/config/table.ts | 2 +- .../src/views/finance/fund-water/index.vue | 2 +- .../finance/invoice-center/config/table.ts | 2 +- .../views/finance/invoice-center/index.vue | 2 +- .../config/table.ts | 2 +- .../monthly-payment-settlement/index.vue | 2 +- .../finance/monthly-payment/config/table.ts | 2 +- .../views/finance/monthly-payment/index.vue | 2 +- .../views/finance/my-invoice/config/table.ts | 2 +- .../src/views/finance/my-invoice/index.vue | 2 +- .../finance/withdrawal-audit/config/table.ts | 2 +- .../views/finance/withdrawal-audit/index.vue | 2 +- .../withdrawal/config/account-change-table.ts | 2 +- .../withdrawal/config/settlement-table.ts | 4 +- .../views/finance/withdrawal/config/table.ts | 2 +- .../src/views/finance/withdrawal/index.vue | 8 +- .../src/views/log/api-log/config/table.ts | 2 +- apps/web-antd/src/views/log/api-log/index.vue | 2 +- .../src/views/log/ledger-log/config/table.ts | 2 +- .../src/views/log/ledger-log/index.vue | 2 +- .../src/views/log/old-api-log/config/table.ts | 2 +- .../src/views/log/old-api-log/index.vue | 2 +- .../src/views/log/op-log/config/table.ts | 2 +- apps/web-antd/src/views/log/op-log/index.vue | 2 +- .../src/views/log/order-log/config/table.ts | 2 +- .../src/views/log/order-log/index.vue | 2 +- .../log/prescription-log/config/table.ts | 2 +- .../src/views/log/prescription-log/index.vue | 2 +- .../log/queue-job/components/QueueJobList.vue | 2 +- .../src/views/log/queue-job/config/table.ts | 2 +- .../warehouse-drug-change-log/config/table.ts | 2 +- .../log/warehouse-drug-change-log/index.vue | 2 +- .../audit-prescription/config/table.ts | 2 +- .../pharmacist/audit-prescription/index.vue | 2 +- .../views/system/admin/_shared/admin-page.vue | 2 +- .../system/admin/_shared/table-config.ts | 2 +- .../src/views/system/admin/config/table.ts | 2 +- .../src/views/system/ai/api-key/index.vue | 4 +- .../views/system/base-config/config/table.ts | 2 +- .../src/views/system/base-config/index.vue | 2 +- .../delivery-warehouse-drug/config/table.ts | 2 +- .../system/delivery-warehouse-drug/index.vue | 2 +- .../delivery-warehouse-order/config/table.ts | 2 +- .../config/table.ts | 2 +- .../index.vue | 2 +- .../config/table.ts | 2 +- .../delivery-warehouse-product/index.vue | 2 +- .../delivery-warehouse-stock/config/table.ts | 2 +- .../system/delivery-warehouse/config/table.ts | 2 +- .../views/system/delivery-warehouse/index.vue | 2 +- .../src/views/system/dict/disease/index.vue | 4 +- .../views/system/dict/doctor-order/index.vue | 4 +- .../dict/tcm/components/TcmDictListPage.vue | 4 +- .../src/views/system/dict/west-unit/index.vue | 4 +- .../views/system/doctor-input/config/table.ts | 2 +- .../src/views/system/doctor-input/index.vue | 2 +- .../src/views/system/golden-formula/index.vue | 4 +- .../views/system/home-zones/config/table.ts | 2 +- .../src/views/system/home-zones/index.vue | 2 +- .../src/views/system/menu/config/table.ts | 2 +- apps/web-antd/src/views/system/menu/index.vue | 2 +- .../src/views/system/notice/config/table.ts | 2 +- .../src/views/system/notice/index.vue | 2 +- .../src/views/system/oa-chat/config/table.ts | 2 +- .../src/views/system/oa-chat/index.vue | 2 +- .../system/oa-notify-log/config/table.ts | 2 +- .../src/views/system/oa-notify-log/index.vue | 2 +- .../src/views/system/oa-robot/config/table.ts | 2 +- .../src/views/system/oa-robot/index.vue | 2 +- .../src/views/system/oa-scene/config/table.ts | 2 +- .../src/views/system/oa-scene/index.vue | 2 +- .../src/views/system/pharmacy/config/table.ts | 2 +- .../src/views/system/pharmacy/index.vue | 2 +- .../config/qualifications-table.ts | 2 +- .../src/views/system/platform-info/index.vue | 2 +- .../platform-qualifications/config/table.ts | 2 +- .../system/platform-qualifications/index.vue | 2 +- .../src/views/system/platform/config/table.ts | 2 +- .../src/views/system/platform/index.vue | 2 +- .../components/inline-field-editor.vue | 364 ++++----- .../src/views/system/region/config/table.ts | 2 +- .../system/role-quick-nav/config/table.ts | 2 +- .../src/views/system/role-quick-nav/index.vue | 2 +- .../src/views/system/role/config/table.ts | 2 +- apps/web-antd/src/views/system/role/index.vue | 2 +- .../components/CompareTrendChart.vue | 84 ++- .../components/InputCountTrendChart.vue | 87 ++- .../views/system/store-input/config/table.ts | 4 +- .../src/views/system/store-input/index.vue | 2 +- .../store/components/DrugPriceModal.vue | 2 +- .../system/store/config/drug-price-table.ts | 2 +- .../src/views/system/store/config/table.ts | 2 +- .../web-antd/src/views/system/store/index.vue | 2 +- .../src/views/system/supplier/config/table.ts | 2 +- .../src/views/system/supplier/index.vue | 2 +- .../system/transfer-question/config/table.ts | 2 +- .../views/system/transfer-question/index.vue | 2 +- .../views/system/vip/level/config/table.ts | 2 +- pnpm-lock.yaml | 62 +- pnpm-workspace.yaml | 15 + 150 files changed, 1005 insertions(+), 811 deletions(-) diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 1e518e99..acb384ca 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -27,6 +27,7 @@ }, "dependencies": { "@ant-design/icons-vue": "^7.0.1", + "@fortawesome/fontawesome-free": "^6.7.2", "@vben/access": "workspace:*", "@vben/common-ui": "workspace:*", "@vben/constants": "workspace:*", @@ -41,27 +42,26 @@ "@vben/styles": "workspace:*", "@vben/types": "workspace:*", "@vben/utils": "workspace:*", + "@vueup/vue-quill": "^1.2.0", "@vueuse/core": "catalog:", "ant-design-vue": "catalog:", + "axios": "^1.10.0", "dayjs": "catalog:", "exceljs": "^4.4.0", - "markdown-it": "^14.1.0", - "pinia": "catalog:", - "sortablejs": "catalog:", - "vue": "catalog:", - "vue-router": "catalog:", - "xlsx": "^0.18.5" - }, - "devDependencies": { - "@types/sortablejs": "catalog:", - "@fortawesome/fontawesome-free": "^6.7.2", - "@vueup/vue-quill": "^1.2.0", - "axios": "^1.10.0", "html2canvas": "^1.4.1", "js-base64": "^3.7.7", "lodash-es": "^4.17.21", "lucide-vue-next": "^0.487.0", + "markdown-it": "^14.1.0", "md-editor-v3": "^5.4.5", - "xgplayer": "^3.0.24" + "pinia": "catalog:", + "sortablejs": "catalog:", + "vue": "catalog:", + "vue-router": "catalog:", + "xgplayer": "^3.0.24", + "xlsx": "^0.18.5" + }, + "devDependencies": { + "@types/sortablejs": "catalog:" } } diff --git a/apps/web-antd/src/adapter/component/index.ts b/apps/web-antd/src/adapter/component/index.ts index add1f8d0..e8f94298 100644 --- a/apps/web-antd/src/adapter/component/index.ts +++ b/apps/web-antd/src/adapter/component/index.ts @@ -68,6 +68,8 @@ import { isEmpty } from '@vben/utils'; import { message, Modal, notification } from 'ant-design-vue'; +import { registerComponent } from '#/components/form/component-map'; + type AdapterUploadProps = UploadProps & { aspectRatio?: string; crop?: boolean; @@ -620,6 +622,8 @@ export type ComponentType = | 'DatePicker' | 'DefaultButton' | 'Divider' + /** OA 场景表单的图片/文件素材选择(透传 acceptTypes 过滤类型) */ + | 'GalleryPickLink' | 'IconPicker' | 'Input' | 'InputNumber' @@ -637,6 +641,10 @@ export type ComponentType = | 'TimePicker' | 'TreeSelect' | 'Upload' + | 'UploadImage' + | 'UploadImageSortable' + | 'UploadOssFile' + | 'UploadDraggerPaste' | BaseFormComponentType; /** @@ -737,6 +745,8 @@ async function initComponentAdapter() { Upload: withPreviewUpload(), }; + // 自动注册 components/form 与 views/**/components/form 下的业务表单组件(如 Editor、Avatar) + registerComponent(components); // 将组件注册到全局共享状态中 globalShareState.setComponents(components); diff --git a/apps/web-antd/src/components/canvas-spreadsheet/commands/SetCellValueCommand.ts b/apps/web-antd/src/components/canvas-spreadsheet/commands/SetCellValueCommand.ts index c7b5c89d..7034cfb2 100644 --- a/apps/web-antd/src/components/canvas-spreadsheet/commands/SetCellValueCommand.ts +++ b/apps/web-antd/src/components/canvas-spreadsheet/commands/SetCellValueCommand.ts @@ -1,12 +1,12 @@ -import type { SpreadsheetCommand } from '../types'; - -export function createSetCellValueCommand( - undo: () => void | Promise, - redo: () => void | Promise, -): SpreadsheetCommand { - return { - label: 'setCellValue', - undo, - redo, - }; -} +import type { SpreadsheetCommand } from '../types'; + +export function createSetCellValueCommand( + undo: () => void | Promise, + redo: () => void | Promise, +): SpreadsheetCommand { + return { + label: 'setCellValue', + undo, + redo, + }; +} diff --git a/apps/web-antd/src/components/form/component-map.ts b/apps/web-antd/src/components/form/component-map.ts index 8f7353c6..b4af6e68 100644 --- a/apps/web-antd/src/components/form/component-map.ts +++ b/apps/web-antd/src/components/form/component-map.ts @@ -1,7 +1,7 @@ -import type { CustomComponentType } from './types'; - import type { Component } from 'vue'; +import type { CustomComponentType } from './types'; + import { getFileNameWithoutExtension, toPascalCase } from '#/util/tool'; const componentMap = new Map(); diff --git a/apps/web-antd/src/components/form/components/api-log-user-picker.vue b/apps/web-antd/src/components/form/components/api-log-user-picker.vue index 35e2a87d..1dab28d8 100644 --- a/apps/web-antd/src/components/form/components/api-log-user-picker.vue +++ b/apps/web-antd/src/components/form/components/api-log-user-picker.vue @@ -1,346 +1,346 @@ - - - - - - - - \ No newline at end of file + + + + + + + + diff --git a/apps/web-antd/src/components/form/components/editor.vue b/apps/web-antd/src/components/form/components/editor.vue index d928227c..93debba7 100644 --- a/apps/web-antd/src/components/form/components/editor.vue +++ b/apps/web-antd/src/components/form/components/editor.vue @@ -1,9 +1,9 @@ - - - - + + + + + diff --git a/apps/web-antd/src/views/system/region/config/table.ts b/apps/web-antd/src/views/system/region/config/table.ts index ec503085..a7ea65a4 100644 --- a/apps/web-antd/src/views/system/region/config/table.ts +++ b/apps/web-antd/src/views/system/region/config/table.ts @@ -54,7 +54,7 @@ export const gridOptions: VxeGridProps = { // custom: true, // 自定义列 zoom: true, // 最大化最小化 slots: { - buttons: 'toolbar-buttons', + buttons: 'toolbar-actions', }, custom: { // 自定义列-图标 diff --git a/apps/web-antd/src/views/system/role-quick-nav/config/table.ts b/apps/web-antd/src/views/system/role-quick-nav/config/table.ts index b69e8f2b..266c7744 100644 --- a/apps/web-antd/src/views/system/role-quick-nav/config/table.ts +++ b/apps/web-antd/src/views/system/role-quick-nav/config/table.ts @@ -69,7 +69,7 @@ export const gridOptions: VxeGridProps = { // custom: true, // 自定义列 zoom: true, // 最大化最小化 slots: { - buttons: 'toolbar-buttons', + buttons: 'toolbar-actions', }, custom: { // 自定义列-图标 diff --git a/apps/web-antd/src/views/system/role-quick-nav/index.vue b/apps/web-antd/src/views/system/role-quick-nav/index.vue index 666ec507..fea102fe 100644 --- a/apps/web-antd/src/views/system/role-quick-nav/index.vue +++ b/apps/web-antd/src/views/system/role-quick-nav/index.vue @@ -69,7 +69,7 @@ const deleteApi = (row: any) => { -