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 a02f8c5e8639fb7e0e462e6eeff81aaa4f79cbe1..e86a3f699ca8b623a316cf640a23626bea948be0 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/rule/scene/index.ts b/apps/web-antd/src/api/iot/rule/scene/index.ts index 5fc3224e19b00ea87c36046665f1ca902df092dc..59c8255a7869b827da9c3b1b3d1990c42c2c826f 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 341e0964e361bbbbbe94a9f568d0c0f36239215d..3540887049897867a38b4d44cab32c6341daf489 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/components/bpmn-process-designer/package/designer/plugins/descriptor/activitiDescriptor.json b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/activitiDescriptor.json index 94ba8f6cc88c5d6260d1c7076e3b1202ebf69324..879785225f8c529fbbd3626be3fc2adc2ae84ca4 100644 --- a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/activitiDescriptor.json +++ b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/activitiDescriptor.json @@ -740,7 +740,10 @@ "name": "FailedJobRetryTimeCycle", "superClass": ["Element"], "meta": { - "allowedIn": ["activiti:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + "allowedIn": [ + "activiti:AsyncCapable", + "bpmn:MultiInstanceLoopCharacteristics" + ] }, "properties": [ { diff --git a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/camundaDescriptor.json b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/camundaDescriptor.json index 8322561e71021d3acd79f9fc5186697be909309c..18fe8028869868292988f6bb27da6ff0d3727a32 100644 --- a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/camundaDescriptor.json +++ b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/camundaDescriptor.json @@ -727,7 +727,10 @@ "name": "FailedJobRetryTimeCycle", "superClass": ["Element"], "meta": { - "allowedIn": ["camunda:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + "allowedIn": [ + "camunda:AsyncCapable", + "bpmn:MultiInstanceLoopCharacteristics" + ] }, "properties": [ { diff --git a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/flowableDescriptor.json b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/flowableDescriptor.json index c98c972367f09fb67d2af283a372a53e3fb65000..2a929bd2d6c3745ed5455c23a4349fe56cbd3228 100644 --- a/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/flowableDescriptor.json +++ b/apps/web-antd/src/components/bpmn-process-designer/package/designer/plugins/descriptor/flowableDescriptor.json @@ -910,7 +910,10 @@ "name": "FailedJobRetryTimeCycle", "superClass": ["Element"], "meta": { - "allowedIn": ["flowable:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"] + "allowedIn": [ + "flowable:AsyncCapable", + "bpmn:MultiInstanceLoopCharacteristics" + ] }, "properties": [ { @@ -1254,11 +1257,11 @@ "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"] }, "properties": [ - { - "name": "value", - "type": "Integer", - "isBody": true - } + { + "name": "value", + "type": "Integer", + "isBody": true + } ] }, { diff --git a/apps/web-antd/src/components/bpmn-process-designer/package/penal/time-event-config/TimeEventConfig.vue b/apps/web-antd/src/components/bpmn-process-designer/package/penal/time-event-config/TimeEventConfig.vue index 688863a806cbc9c2b8ac78672316524205fd2c8b..7c5e1f6dc024a5ed2d25703386d6236576701509 100644 --- a/apps/web-antd/src/components/bpmn-process-designer/package/penal/time-event-config/TimeEventConfig.vue +++ b/apps/web-antd/src/components/bpmn-process-designer/package/penal/time-event-config/TimeEventConfig.vue @@ -238,7 +238,7 @@ watch(
diff --git a/apps/web-antd/src/router/routes/modules/iot.ts b/apps/web-antd/src/router/routes/modules/iot.ts index f43a547b06e647acc26ae2faf393374d06ee6a3b..54c0b27f8942595a76705fcf0e5f998a53ca027e 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,11 @@ 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'), }, ], }, ]; export default routes; - diff --git a/apps/web-antd/src/views/ai/chat/manager/data.ts b/apps/web-antd/src/views/ai/chat/manager/data.ts index e9379d9112435d19fb5715932cd5862a520598f0..5990e515e06ca7e61208b3fff82ab49e5994fe9e 100644 --- a/apps/web-antd/src/views/ai/chat/manager/data.ts +++ b/apps/web-antd/src/views/ai/chat/manager/data.ts @@ -109,7 +109,7 @@ export function useGridFormSchemaMessage(): VbenFormSchema[] { label: '用户编号', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', }, diff --git a/apps/web-antd/src/views/ai/image/manager/data.ts b/apps/web-antd/src/views/ai/image/manager/data.ts index 9875ed7d7fca1d7ddf2d293d011cf935c5e71588..d5e39b76bc15475fa3151813a7bb98991ef07482 100644 --- a/apps/web-antd/src/views/ai/image/manager/data.ts +++ b/apps/web-antd/src/views/ai/image/manager/data.ts @@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '用户编号', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', }, diff --git a/apps/web-antd/src/views/ai/mindmap/manager/data.ts b/apps/web-antd/src/views/ai/mindmap/manager/data.ts index 3889353cf526f66a044de0c911ffb470b8d37790..eb56c92a9250fbfa1e0646041b49b67386ef8e63 100644 --- a/apps/web-antd/src/views/ai/mindmap/manager/data.ts +++ b/apps/web-antd/src/views/ai/mindmap/manager/data.ts @@ -12,7 +12,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '用户编号', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', }, diff --git a/apps/web-antd/src/views/ai/model/chatRole/data.ts b/apps/web-antd/src/views/ai/model/chatRole/data.ts index 2e1bc63bf066ef50693d0058de41f0f20559739b..f06a832bf121e30c7d06abc0ab623285a4b95cf8 100644 --- a/apps/web-antd/src/views/ai/model/chatRole/data.ts +++ b/apps/web-antd/src/views/ai/model/chatRole/data.ts @@ -93,7 +93,7 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { placeholder: '请选择引用知识库', - api: getSimpleKnowledgeList, + api: () => getSimpleKnowledgeList(), labelField: 'name', mode: 'multiple', valueField: 'id', @@ -106,7 +106,7 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { placeholder: '请选择引用工具', - api: getToolSimpleList, + api: () => getToolSimpleList(), mode: 'multiple', labelField: 'name', valueField: 'id', diff --git a/apps/web-antd/src/views/ai/model/model/data.ts b/apps/web-antd/src/views/ai/model/model/data.ts index 31f3ab05b55a7f7b9216c1a639b404816e1bffa1..9dfe948f453d43a965e7050d663e9e9752de705b 100644 --- a/apps/web-antd/src/views/ai/model/model/data.ts +++ b/apps/web-antd/src/views/ai/model/model/data.ts @@ -48,7 +48,7 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { placeholder: '请选择API 秘钥', - api: getApiKeySimpleList, + api: () => getApiKeySimpleList(), labelField: 'name', valueField: 'id', allowClear: true, diff --git a/apps/web-antd/src/views/ai/music/manager/data.ts b/apps/web-antd/src/views/ai/music/manager/data.ts index 162e7a1968dd7d9b45484afe35a3dadf2d2b53a0..d6468eb0d0b56660a22c8a809f2faf551edab70f 100644 --- a/apps/web-antd/src/views/ai/music/manager/data.ts +++ b/apps/web-antd/src/views/ai/music/manager/data.ts @@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '用户编号', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', }, diff --git a/apps/web-antd/src/views/ai/write/manager/data.ts b/apps/web-antd/src/views/ai/write/manager/data.ts index d878d28ee348542e8992d9b7e0e57af2ba97b431..7c1768f64c7e38d4c9b690ec93513da7c8b29d5b 100644 --- a/apps/web-antd/src/views/ai/write/manager/data.ts +++ b/apps/web-antd/src/views/ai/write/manager/data.ts @@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '用户编号', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', }, diff --git a/apps/web-antd/src/views/bpm/group/data.ts b/apps/web-antd/src/views/bpm/group/data.ts index 455704f8658bbcfc8a6d66c2e5d0c057814b150a..5adde20852f21adc379786afffc33a0d4dc057a2 100644 --- a/apps/web-antd/src/views/bpm/group/data.ts +++ b/apps/web-antd/src/views/bpm/group/data.ts @@ -42,7 +42,7 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { placeholder: '请选择成员', - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', mode: 'tags', diff --git a/apps/web-antd/src/views/bpm/processInstance/data.ts b/apps/web-antd/src/views/bpm/processInstance/data.ts index 214c58b0bbd130957d4e200c0485dc54620ccd77..9b4b300d555b8ebd99fde6591801c495c71e2873 100644 --- a/apps/web-antd/src/views/bpm/processInstance/data.ts +++ b/apps/web-antd/src/views/bpm/processInstance/data.ts @@ -17,7 +17,7 @@ export function useGridFormSchema(): VbenFormSchema[] { // componentProps: { // placeholder: '请选择发起人', // allowClear: true, - // api: getSimpleUserList, + // api: () => getSimpleUserList(), // labelField: 'nickname', // valueField: 'id', // }, @@ -48,7 +48,7 @@ export function useGridFormSchema(): VbenFormSchema[] { componentProps: { placeholder: '请输入流程分类', allowClear: true, - api: getCategorySimpleList, + api: () => getCategorySimpleList(), labelField: 'name', valueField: 'code', }, diff --git a/apps/web-antd/src/views/bpm/processInstance/manager/data.ts b/apps/web-antd/src/views/bpm/processInstance/manager/data.ts index 1815cc2b5f6ca94545ffab43b8c7c7309a96fb14..1f6e8635cdb92208f21060eb86a407c466472e47 100644 --- a/apps/web-antd/src/views/bpm/processInstance/manager/data.ts +++ b/apps/web-antd/src/views/bpm/processInstance/manager/data.ts @@ -23,7 +23,7 @@ export function useGridFormSchema(): VbenFormSchema[] { componentProps: { placeholder: '请选择发起人', allowClear: true, - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', }, @@ -54,7 +54,7 @@ export function useGridFormSchema(): VbenFormSchema[] { componentProps: { placeholder: '请输入流程分类', allowClear: true, - api: getCategorySimpleList, + api: () => getCategorySimpleList(), labelField: 'name', valueField: 'code', }, diff --git a/apps/web-antd/src/views/bpm/task/done/data.ts b/apps/web-antd/src/views/bpm/task/done/data.ts index ac42b8ddd06d6bcdd7e8a189a8a271fd0210f478..9491148ec87ab4e0898c7c7c117ee2ab34aa12cc 100644 --- a/apps/web-antd/src/views/bpm/task/done/data.ts +++ b/apps/web-antd/src/views/bpm/task/done/data.ts @@ -35,7 +35,7 @@ export function useGridFormSchema(): VbenFormSchema[] { componentProps: { placeholder: '请输入流程分类', allowClear: true, - api: getCategorySimpleList, + api: () => getCategorySimpleList(), labelField: 'name', valueField: 'code', }, diff --git a/apps/web-antd/src/views/bpm/task/todo/data.ts b/apps/web-antd/src/views/bpm/task/todo/data.ts index 77b859b4b6c45ea62db782690e9f7d81df6847f7..968db62343d8eedd21ac5c88a4c57be958e92608 100644 --- a/apps/web-antd/src/views/bpm/task/todo/data.ts +++ b/apps/web-antd/src/views/bpm/task/todo/data.ts @@ -35,7 +35,7 @@ export function useGridFormSchema(): VbenFormSchema[] { componentProps: { placeholder: '请输入流程分类', allowClear: true, - api: getCategorySimpleList, + api: () => getCategorySimpleList(), labelField: 'name', valueField: 'code', }, diff --git a/apps/web-antd/src/views/crm/business/data.ts b/apps/web-antd/src/views/crm/business/data.ts index 426471f8dfff5919ef8eeb97ed2e0a1cef445a0d..6948cbf31401ea4a0345ab88be18d51642ac01d5 100644 --- a/apps/web-antd/src/views/crm/business/data.ts +++ b/apps/web-antd/src/views/crm/business/data.ts @@ -41,10 +41,8 @@ export function useFormSchema(): VbenFormSchema[] { }, componentProps: { api: () => getSimpleUserList(), - fieldNames: { - label: 'nickname', - value: 'id', - }, + labelField: 'nickname', + valueField: 'id', placeholder: '请选择负责人', allowClear: true, }, @@ -57,10 +55,8 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getCustomerSimpleList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择客户', allowClear: true, }, @@ -85,10 +81,8 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getBusinessStatusTypeSimpleList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择商机状态组', allowClear: true, }, diff --git a/apps/web-antd/src/views/crm/business/detail/data.ts b/apps/web-antd/src/views/crm/business/detail/data.ts index 3b1a76f52fb7b8954af6e7274e68271bd6820ece..0600d76e5613dbfd0cec42893f6ca29ab2a6bae9 100644 --- a/apps/web-antd/src/views/crm/business/detail/data.ts +++ b/apps/web-antd/src/views/crm/business/detail/data.ts @@ -1,11 +1,15 @@ -import type { VbenFormSchema } from '#/adapter/form'; import type { Ref } from 'vue'; + +import type { VbenFormSchema } from '#/adapter/form'; import type { CrmBusinessApi } from '#/api/crm/business'; import type { DescriptionItemSchema } from '#/components/description'; import { erpPriceInputFormatter, formatDateTime } from '@vben/utils'; -import { DEFAULT_STATUSES, getBusinessStatusSimpleList } from '#/api/crm/business/status'; +import { + DEFAULT_STATUSES, + getBusinessStatusSimpleList, +} from '#/api/crm/business/status'; /** 详情页的字段 */ export function useDetailSchema(): DescriptionItemSchema[] { diff --git a/apps/web-antd/src/views/crm/clue/data.ts b/apps/web-antd/src/views/crm/clue/data.ts index 3181b1da607f2591b6bf732467d7ae891b7f4da8..5983fde7f2cb2b340c4536aff1c36838ba4859bf 100644 --- a/apps/web-antd/src/views/crm/clue/data.ts +++ b/apps/web-antd/src/views/crm/clue/data.ts @@ -53,7 +53,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '负责人', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', allowClear: true, diff --git a/apps/web-antd/src/views/crm/contact/data.ts b/apps/web-antd/src/views/crm/contact/data.ts index 760f08525c9740d3d3797c4a5147b0ff9265da05..09336d478f337756c7ad186b0314e5aa3fe52b06 100644 --- a/apps/web-antd/src/views/crm/contact/data.ts +++ b/apps/web-antd/src/views/crm/contact/data.ts @@ -42,10 +42,8 @@ export function useFormSchema(): VbenFormSchema[] { }, componentProps: { api: () => getSimpleUserList(), - fieldNames: { - label: 'nickname', - value: 'id', - }, + labelField: 'nickname', + valueField: 'id', placeholder: '请选择负责人', }, defaultValue: userStore.userInfo?.id, @@ -57,10 +55,8 @@ export function useFormSchema(): VbenFormSchema[] { rules: 'required', componentProps: { api: () => getCustomerSimpleList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择客户', }, }, @@ -139,10 +135,8 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getSimpleContactList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择直属上级', }, }, @@ -195,10 +189,8 @@ export function useGridFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getCustomerSimpleList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择客户', }, }, diff --git a/apps/web-antd/src/views/crm/contract/data.ts b/apps/web-antd/src/views/crm/contract/data.ts index 91ceb1953d23bfb07d846f0f42e162098bd52422..36b0cecaedfcccb71b6a773f7867c6deabe43833 100644 --- a/apps/web-antd/src/views/crm/contract/data.ts +++ b/apps/web-antd/src/views/crm/contract/data.ts @@ -47,10 +47,8 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getSimpleUserList(), - fieldNames: { - label: 'nickname', - value: 'id', - }, + labelField: 'nickname', + valueField: 'id', }, dependencies: { triggerFields: ['id'], @@ -66,10 +64,8 @@ export function useFormSchema(): VbenFormSchema[] { rules: 'required', componentProps: { api: () => getCustomerSimpleList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择客户', }, }, @@ -142,10 +138,8 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getSimpleUserList(), - fieldNames: { - label: 'nickname', - value: 'id', - }, + labelField: 'nickname', + valueField: 'id', }, defaultValue: userStore.userInfo?.id, }, @@ -270,10 +264,8 @@ export function useGridFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getCustomerSimpleList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择客户', allowClear: true, }, diff --git a/apps/web-antd/src/views/crm/customer/data.ts b/apps/web-antd/src/views/crm/customer/data.ts index dc4e39df48a2c4e37df0ee83aa1c588ef27e453c..aa502383d52f3986fd6a08da7c466fee98f2a7fc 100644 --- a/apps/web-antd/src/views/crm/customer/data.ts +++ b/apps/web-antd/src/views/crm/customer/data.ts @@ -61,10 +61,8 @@ export function useFormSchema(): VbenFormSchema[] { }, componentProps: { api: () => getSimpleUserList(), - fieldNames: { - label: 'nickname', - value: 'id', - }, + labelField: 'nickname', + valueField: 'id', placeholder: '请选择负责人', allowClear: true, }, @@ -223,10 +221,8 @@ export function useImportFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getSimpleUserList(), - fieldNames: { - label: 'nickname', - value: 'id', - }, + labelField: 'nickname', + valueField: 'id', placeholder: '请选择负责人', allowClear: true, class: 'w-full', diff --git a/apps/web-antd/src/views/crm/customer/detail/data.ts b/apps/web-antd/src/views/crm/customer/detail/data.ts index 5540a93e35f07872c1387866294409b03a045125..60e6a6bf82f9c70a6602cf5b167f3792e5b0a7b1 100644 --- a/apps/web-antd/src/views/crm/customer/detail/data.ts +++ b/apps/web-antd/src/views/crm/customer/detail/data.ts @@ -28,10 +28,8 @@ export function useDistributeFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getSimpleUserList(), - fieldNames: { - label: 'nickname', - value: 'id', - }, + labelField: 'nickname', + valueField: 'id', }, defaultValue: userStore.userInfo?.id, rules: 'required', diff --git a/apps/web-antd/src/views/crm/customer/limitConfig/data.ts b/apps/web-antd/src/views/crm/customer/limitConfig/data.ts index bdf5ea41dfeec0553a83f2be5f84e9028a2da38c..fb079ae8ac9d497aa2d7263c61a3d34df3ae5bda 100644 --- a/apps/web-antd/src/views/crm/customer/limitConfig/data.ts +++ b/apps/web-antd/src/views/crm/customer/limitConfig/data.ts @@ -34,11 +34,9 @@ export function useFormSchema(confType: LimitConfType): VbenFormSchema[] { label: '规则适用人群', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', mode: 'multiple', allowClear: true, placeholder: '请选择规则适用人群', diff --git a/apps/web-antd/src/views/crm/followup/data.ts b/apps/web-antd/src/views/crm/followup/data.ts index 79a3413931eb1ec07d88a9e0aad8e84bbb651a12..c19b02f32818d7edbf8eafbdc66e9b8fc430244d 100644 --- a/apps/web-antd/src/views/crm/followup/data.ts +++ b/apps/web-antd/src/views/crm/followup/data.ts @@ -85,8 +85,9 @@ export function useFormSchema( }); return res.list; }, + labelField: 'name', + valueField: 'id', mode: 'multiple', - fieldNames: { label: 'name', value: 'id' }, }, }, { @@ -105,8 +106,9 @@ export function useFormSchema( }); return res.list; }, + labelField: 'name', + valueField: 'id', mode: 'multiple', - fieldNames: { label: 'name', value: 'id' }, }, }, ]; diff --git a/apps/web-antd/src/views/crm/permission/modules/data.ts b/apps/web-antd/src/views/crm/permission/modules/data.ts index fdbe9bcbd483cdf33ca30621ff2ee027d77fcc41..f2cb5a1f47e9bc9be9a3dec13fa1f1881939c728 100644 --- a/apps/web-antd/src/views/crm/permission/modules/data.ts +++ b/apps/web-antd/src/views/crm/permission/modules/data.ts @@ -23,7 +23,7 @@ export function useTransferFormSchema(): VbenFormSchema[] { label: '选择新负责人', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', }, @@ -116,7 +116,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '选择人员', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', }, diff --git a/apps/web-antd/src/views/crm/product/data.ts b/apps/web-antd/src/views/crm/product/data.ts index e3702280ba46e2099c26a916f7582aa2f62d5b25..32dc02b9d5fb03e5c55e4a8a52598dd1532203f6 100644 --- a/apps/web-antd/src/views/crm/product/data.ts +++ b/apps/web-antd/src/views/crm/product/data.ts @@ -43,10 +43,8 @@ export function useFormSchema(): VbenFormSchema[] { }, componentProps: { api: () => getSimpleUserList(), - fieldNames: { - label: 'nickname', - value: 'id', - }, + labelField: 'nickname', + valueField: 'id', placeholder: '请选择负责人', allowClear: true, }, diff --git a/apps/web-antd/src/views/crm/product/detail/data.ts b/apps/web-antd/src/views/crm/product/detail/data.ts index dc9bb6e11f280c91be05fe2f1a6443de32bf39de..1b783fc6f0929e1d2b92e686d9e6fc2b5650d19a 100644 --- a/apps/web-antd/src/views/crm/product/detail/data.ts +++ b/apps/web-antd/src/views/crm/product/detail/data.ts @@ -70,4 +70,3 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] { }, ]; } - diff --git a/apps/web-antd/src/views/crm/receivable/data.ts b/apps/web-antd/src/views/crm/receivable/data.ts index b71ed0edd6936f7580a843bda45e9d83e9fba477..2dfc958a5cc1486647ff72c30d95deb2ede0b55c 100644 --- a/apps/web-antd/src/views/crm/receivable/data.ts +++ b/apps/web-antd/src/views/crm/receivable/data.ts @@ -45,10 +45,8 @@ export function useFormSchema(): VbenFormSchema[] { }, componentProps: { api: () => getSimpleUserList(), - fieldNames: { - label: 'nickname', - value: 'id', - }, + labelField: 'nickname', + valueField: 'id', placeholder: '请选择负责人', allowClear: true, }, @@ -61,10 +59,8 @@ export function useFormSchema(): VbenFormSchema[] { rules: 'required', componentProps: { api: () => getCustomerSimpleList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择客户', }, dependencies: { @@ -193,10 +189,8 @@ export function useGridFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getCustomerSimpleList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择客户', allowClear: true, }, 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 b9c9507569efed9cc5a67e1e2f32ca0f463c6871..a004a9b48d787b739f69a2f1da572b8e9ab93851 100644 --- a/apps/web-antd/src/views/crm/receivable/plan/data.ts +++ b/apps/web-antd/src/views/crm/receivable/plan/data.ts @@ -29,10 +29,8 @@ export function useFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getSimpleUserList(), - fieldNames: { - label: 'nickname', - value: 'id', - }, + labelField: 'nickname', + valueField: 'id', }, dependencies: { triggerFields: ['id'], @@ -48,11 +46,10 @@ export function useFormSchema(): VbenFormSchema[] { rules: 'required', componentProps: { api: () => getCustomerSimpleList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择客户', + allowClear: true, }, }, { @@ -63,6 +60,7 @@ export function useFormSchema(): VbenFormSchema[] { componentProps: { options: [], placeholder: '请选择合同', + allowClear: true, }, dependencies: { triggerFields: ['customerId'], @@ -156,10 +154,8 @@ export function useGridFormSchema(): VbenFormSchema[] { component: 'ApiSelect', componentProps: { api: () => getCustomerSimpleList(), - fieldNames: { - label: 'name', - value: 'id', - }, + labelField: 'name', + valueField: 'id', placeholder: '请选择客户', allowClear: true, }, diff --git a/apps/web-antd/src/views/crm/receivable/plan/detail/data.ts b/apps/web-antd/src/views/crm/receivable/plan/detail/data.ts index 70d0716498f7074216ee1801ddfb6a38841846b8..2337653226752c71cc74daf0788430aa1b122473 100644 --- a/apps/web-antd/src/views/crm/receivable/plan/detail/data.ts +++ b/apps/web-antd/src/views/crm/receivable/plan/detail/data.ts @@ -31,8 +31,7 @@ export function useDetailSchema(): DescriptionItemSchema[] { { field: 'receivable', label: '实际回款金额', - content: (data) => - erpPriceInputFormatter(data?.receivable?.price ?? 0), + content: (data) => erpPriceInputFormatter(data?.receivable?.price ?? 0), }, ]; } @@ -78,8 +77,7 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] { { field: 'receivable', label: '实际回款金额', - content: (data) => - erpPriceInputFormatter(data?.receivable?.price ?? 0), + content: (data) => erpPriceInputFormatter(data?.receivable?.price ?? 0), }, { field: 'receivableRemain', @@ -92,8 +90,7 @@ export function useDetailBaseSchema(): DescriptionItemSchema[] { { field: 'receivable.returnTime', label: '实际回款日期', - content: (data) => - formatDateTime(data?.receivable?.returnTime) as string, + content: (data) => formatDateTime(data?.receivable?.returnTime) as string, }, { field: 'remark', diff --git a/apps/web-antd/src/views/crm/statistics/customer/data.ts b/apps/web-antd/src/views/crm/statistics/customer/data.ts index ec37c668a81d91aa89a7fbe63b09318ff40f2318..43cc36f63a9260ea5b48dd6de33cc5084f7c337b 100644 --- a/apps/web-antd/src/views/crm/statistics/customer/data.ts +++ b/apps/web-antd/src/views/crm/statistics/customer/data.ts @@ -99,7 +99,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '员工', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', placeholder: '请选择员工', diff --git a/apps/web-antd/src/views/crm/statistics/funnel/data.ts b/apps/web-antd/src/views/crm/statistics/funnel/data.ts index 87668577da81cd10fa9dfad0fd7aa6fc31dd8d24..b704d1e7185493482c88893999cc78bc0301d383 100644 --- a/apps/web-antd/src/views/crm/statistics/funnel/data.ts +++ b/apps/web-antd/src/views/crm/statistics/funnel/data.ts @@ -73,7 +73,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '员工', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), allowClear: true, labelField: 'nickname', valueField: 'id', diff --git a/apps/web-antd/src/views/crm/statistics/performance/data.ts b/apps/web-antd/src/views/crm/statistics/performance/data.ts index e56c7ebf7f7c192257bcf53b050fc43aa8b134fe..964f417edc746526ed9d7b8325d2379ec76f78c4 100644 --- a/apps/web-antd/src/views/crm/statistics/performance/data.ts +++ b/apps/web-antd/src/views/crm/statistics/performance/data.ts @@ -64,7 +64,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '员工', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', placeholder: '请选择员工', diff --git a/apps/web-antd/src/views/crm/statistics/portrait/data.ts b/apps/web-antd/src/views/crm/statistics/portrait/data.ts index 8eeff969bb61ab2f91a5c462806e5df16e5123be..3c2cc7c6295288846087c86dee7409327c50fc60 100644 --- a/apps/web-antd/src/views/crm/statistics/portrait/data.ts +++ b/apps/web-antd/src/views/crm/statistics/portrait/data.ts @@ -68,7 +68,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '员工', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', placeholder: '请选择员工', diff --git a/apps/web-antd/src/views/crm/statistics/portrait/index.vue b/apps/web-antd/src/views/crm/statistics/portrait/index.vue index 154ff710b861c2e000c745d2a019d1d0ee0ba6b4..1d93478a410b552dd38fd8b7612f03f06beb8510 100644 --- a/apps/web-antd/src/views/crm/statistics/portrait/index.vue +++ b/apps/web-antd/src/views/crm/statistics/portrait/index.vue @@ -38,8 +38,12 @@ const [Grid, gridApi] = useVbenVxeGrid({ ajax: { query: async (_, formValues) => { const res = await getDatas(activeTabName.value, formValues); - await renderLeftEcharts(getChartOptions(activeTabName.value, res).left); - await renderRightEcharts(getChartOptions(activeTabName.value, res).right); + await renderLeftEcharts( + getChartOptions(activeTabName.value, res).left, + ); + await renderRightEcharts( + getChartOptions(activeTabName.value, res).right, + ); return res; }, }, diff --git a/apps/web-antd/src/views/erp/finance/payment/data.ts b/apps/web-antd/src/views/erp/finance/payment/data.ts index a33430fafbb332a41b6e1825e6a7b8147fa49814..9cf6dfc34cbf6026a0e619e46c82ef0e2376ebe7 100644 --- a/apps/web-antd/src/views/erp/finance/payment/data.ts +++ b/apps/web-antd/src/views/erp/finance/payment/data.ts @@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择供应商', allowClear: true, showSearch: true, - api: getSupplierSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getSupplierSimpleList(), + labelField: 'name', + valueField: 'id', }, rules: 'required', }, @@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择财务人员', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -123,11 +119,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择付款账户', allowClear: true, showSearch: true, - api: getAccountSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getAccountSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -247,11 +241,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择供应商', allowClear: true, showSearch: true, - api: getSupplierSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getSupplierSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -262,11 +254,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择创建人', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -277,11 +267,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择财务人员', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -292,11 +280,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择付款账户', allowClear: true, showSearch: true, - api: getAccountSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getAccountSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/finance/receipt/data.ts b/apps/web-antd/src/views/erp/finance/receipt/data.ts index e1839932a641a3c61a51f39f8e35c3f0742fb9c8..85fc55c63706ab701560da10499878d992a6afb4 100644 --- a/apps/web-antd/src/views/erp/finance/receipt/data.ts +++ b/apps/web-antd/src/views/erp/finance/receipt/data.ts @@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择客户', allowClear: true, showSearch: true, - api: getCustomerSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getCustomerSimpleList(), + labelField: 'name', + valueField: 'id', }, rules: 'required', }, @@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择财务人员', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -123,11 +119,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择收款账户', allowClear: true, showSearch: true, - api: getAccountSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getAccountSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -247,11 +241,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择客户', allowClear: true, showSearch: true, - api: getCustomerSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getCustomerSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -262,11 +254,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择创建人', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -277,11 +267,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择财务人员', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -292,11 +280,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择收款账户', allowClear: true, showSearch: true, - api: getAccountSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getAccountSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/finance/receipt/modules/form.vue b/apps/web-antd/src/views/erp/finance/receipt/modules/form.vue index 7f7726fc3e7ce6955b7c5ebf1babab9fec8a8362..ed35d1df998cb427d2c8c19dbb8887b9d4c07428 100644 --- a/apps/web-antd/src/views/erp/finance/receipt/modules/form.vue +++ b/apps/web-antd/src/views/erp/finance/receipt/modules/form.vue @@ -26,17 +26,18 @@ const formData = ref< } >({ id: undefined, - no: undefined, - customerId: undefined, - accountId: undefined, - financeUserId: undefined, - receiptTime: undefined, - remark: undefined, + no: '', + customerId: 0, + accountId: 0, + financeUserId: 0, + receiptTime: new Date(), + remark: '', fileUrl: undefined, totalPrice: 0, discountPrice: 0, receiptPrice: 0, items: [], + status: 0, }); const formType = ref(''); // 表单类型:'create' | 'edit' | 'detail' @@ -141,7 +142,21 @@ const [Modal, modalApi] = useVbenModal({ }, async onOpenChange(isOpen: boolean) { if (!isOpen) { - formData.value = undefined; + formData.value = { + id: undefined, + no: '', + customerId: 0, + accountId: 0, + financeUserId: 0, + receiptTime: new Date(), + remark: '', + totalPrice: 0, + discountPrice: 0, + receiptPrice: 0, + status: 0, + items: [], + bizNo: '', + }; return; } // 加载数据 @@ -191,4 +206,4 @@ const [Modal, modalApi] = useVbenModal({ - \ No newline at end of file + diff --git a/apps/web-antd/src/views/erp/product/product/data.ts b/apps/web-antd/src/views/erp/product/product/data.ts index cfde896dbe1e2d53b817b12cb7ed9b27bc651724..e387f9908dc6cf66d30274e64d9c9fee9e0199c1 100644 --- a/apps/web-antd/src/views/erp/product/product/data.ts +++ b/apps/web-antd/src/views/erp/product/product/data.ts @@ -3,6 +3,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import { CommonStatusEnum, DICT_TYPE } from '@vben/constants'; import { getDictOptions } from '@vben/hooks'; +import { handleTree } from '@vben/utils'; import { z } from '#/adapter/form'; import { getProductCategorySimpleList } from '#/api/erp/product/category'; @@ -60,7 +61,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '单位', component: 'ApiSelect', componentProps: { - api: getProductUnitSimpleList, + api: () => getProductUnitSimpleList(), labelField: 'name', valueField: 'id', placeholder: '请选择单位', diff --git a/apps/web-antd/src/views/erp/purchase/in/data.ts b/apps/web-antd/src/views/erp/purchase/in/data.ts index c249080fea7a0ec90a94b4fea5951cab012e35f8..3853258cf7d2b31f49c6bf4e71dd81e80a79ccd3 100644 --- a/apps/web-antd/src/views/erp/purchase/in/data.ts +++ b/apps/web-antd/src/views/erp/purchase/in/data.ts @@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择供应商', allowClear: true, showSearch: true, - api: getSupplierSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getSupplierSimpleList(), + labelField: 'name', + valueField: 'id', }, rules: 'required', }, @@ -176,11 +174,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择结算账户', allowClear: true, showSearch: true, - api: getAccountSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getAccountSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -323,11 +319,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -347,11 +341,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择供应商', allowClear: true, showSearch: true, - api: getSupplierSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getSupplierSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -362,7 +354,7 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择仓库', allowClear: true, showSearch: true, - api: getWarehouseSimpleList, + api: () => getWarehouseSimpleList(), labelField: 'name', valueField: 'id', }, @@ -375,11 +367,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择创建人', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -399,11 +389,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择结算账户', allowClear: true, showSearch: true, - api: getAccountSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getAccountSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -542,11 +530,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/purchase/order/data.ts b/apps/web-antd/src/views/erp/purchase/order/data.ts index 1ca7e5a57112393df0f1b3ddd95b4628ad163f1b..f6d3760e7c1ea989b83625d2c9361fa796f62d72 100644 --- a/apps/web-antd/src/views/erp/purchase/order/data.ts +++ b/apps/web-antd/src/views/erp/purchase/order/data.ts @@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择供应商', allowClear: true, showSearch: true, - api: getSupplierSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getSupplierSimpleList(), + labelField: 'name', + valueField: 'id', }, rules: 'required', }, @@ -142,11 +140,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择结算账户', allowClear: true, showSearch: true, - api: getAccountSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getAccountSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -265,11 +261,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -289,11 +283,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择供应商', allowClear: true, showSearch: true, - api: getSupplierSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getSupplierSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -304,11 +296,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择创建人', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/purchase/return/data.ts b/apps/web-antd/src/views/erp/purchase/return/data.ts index d82a3e67cc281b68ab6b3891f90153ff872b2032..88ec806df589afc1d0008cab584c4855ddcd1750 100644 --- a/apps/web-antd/src/views/erp/purchase/return/data.ts +++ b/apps/web-antd/src/views/erp/purchase/return/data.ts @@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择供应商', allowClear: true, showSearch: true, - api: getSupplierSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getSupplierSimpleList(), + labelField: 'name', + valueField: 'id', }, rules: 'required', }, @@ -175,11 +173,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择结算账户', allowClear: true, showSearch: true, - api: getAccountSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getAccountSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -323,11 +319,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -347,11 +341,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择供应商', allowClear: true, showSearch: true, - api: getSupplierSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getSupplierSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -362,7 +354,7 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择仓库', allowClear: true, showSearch: true, - api: getWarehouseSimpleList, + api: () => getWarehouseSimpleList(), labelField: 'name', valueField: 'id', }, @@ -375,11 +367,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择创建人', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -526,11 +516,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/sale/order/data.ts b/apps/web-antd/src/views/erp/sale/order/data.ts index 52f762458078e192f053e41a775b4d6ee5240112..f86880c1a61efea1981d255211177106a42e2809 100644 --- a/apps/web-antd/src/views/erp/sale/order/data.ts +++ b/apps/web-antd/src/views/erp/sale/order/data.ts @@ -52,11 +52,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择客户', allowClear: true, showSearch: true, - api: getCustomerSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getCustomerSimpleList(), + labelField: 'name', + valueField: 'id', }, rules: 'required', }, @@ -68,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择销售人员', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -157,11 +153,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择结算账户', allowClear: true, showSearch: true, - api: getAccountSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getAccountSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -281,11 +275,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -305,11 +297,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择客户', allowClear: true, showSearch: true, - api: getCustomerSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getCustomerSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -320,11 +310,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择创建人', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/sale/out/data.ts b/apps/web-antd/src/views/erp/sale/out/data.ts index 95f2853fca9192e0780fe9553224432f78121c10..3d095856c2a2ffa19fdff8dfc7e2be281c0b8865 100644 --- a/apps/web-antd/src/views/erp/sale/out/data.ts +++ b/apps/web-antd/src/views/erp/sale/out/data.ts @@ -544,11 +544,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/sale/return/data.ts b/apps/web-antd/src/views/erp/sale/return/data.ts index f2c5b9dc35e75f63a822f17464cc92b4535f748a..00501ce7317907f0765f59585f7d3bd2effc1508 100644 --- a/apps/web-antd/src/views/erp/sale/return/data.ts +++ b/apps/web-antd/src/views/erp/sale/return/data.ts @@ -66,11 +66,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择客户', allowClear: true, showSearch: true, - api: getCustomerSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getCustomerSimpleList(), + labelField: 'name', + valueField: 'id', }, rules: 'required', }, @@ -82,11 +80,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择销售人员', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -191,11 +187,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { disabled: true, allowClear: true, showSearch: true, - api: getAccountSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getAccountSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -339,11 +333,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -363,11 +355,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择客户', allowClear: true, showSearch: true, - api: getCustomerSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getCustomerSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -378,7 +368,7 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择仓库', allowClear: true, showSearch: true, - api: getWarehouseSimpleList, + api: () => getWarehouseSimpleList(), labelField: 'name', valueField: 'id', }, @@ -391,11 +381,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择创建人', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { @@ -543,11 +531,9 @@ export function useOrderGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/sale/return/modules/sale-order-select.vue b/apps/web-antd/src/views/erp/sale/return/modules/sale-order-select.vue index 4d44aeee1b2cf59ed8fb5b17a326621241bd00d2..f7d18b7de331c613dfa0f52de29b0571189ebe9f 100644 --- a/apps/web-antd/src/views/erp/sale/return/modules/sale-order-select.vue +++ b/apps/web-antd/src/views/erp/sale/return/modules/sale-order-select.vue @@ -114,4 +114,4 @@ const handleOk = () => { > - \ No newline at end of file + diff --git a/apps/web-antd/src/views/erp/stock/check/data.ts b/apps/web-antd/src/views/erp/stock/check/data.ts index 8a60c2ab2d82b26d9f9279bc02f4f3ec706a59c2..33176d8b2ee22cd330456c0a7e707a9acef7b52b 100644 --- a/apps/web-antd/src/views/erp/stock/check/data.ts +++ b/apps/web-antd/src/views/erp/stock/check/data.ts @@ -180,11 +180,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -204,11 +202,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择仓库', allowClear: true, showSearch: true, - api: getWarehouseSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getWarehouseSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -219,11 +215,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择创建人', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/stock/check/modules/item-form.vue b/apps/web-antd/src/views/erp/stock/check/modules/item-form.vue index 54d6e55f968de3bad3ece3775505325dfeba95e7..472d8ec10e783065e6c1f2146e6f18035bc2f823 100644 --- a/apps/web-antd/src/views/erp/stock/check/modules/item-form.vue +++ b/apps/web-antd/src/views/erp/stock/check/modules/item-form.vue @@ -305,4 +305,4 @@ onMounted(async () => { /> - \ No newline at end of file + diff --git a/apps/web-antd/src/views/erp/stock/in/data.ts b/apps/web-antd/src/views/erp/stock/in/data.ts index 5414474c4921984060cd77e87110f5e52a22a14e..e2ff7117c5bbce83b94afb891a1d29672bde4957 100644 --- a/apps/web-antd/src/views/erp/stock/in/data.ts +++ b/apps/web-antd/src/views/erp/stock/in/data.ts @@ -50,11 +50,9 @@ export function useFormSchema(formType: string): VbenFormSchema[] { placeholder: '请选择供应商', allowClear: true, showSearch: true, - api: getSupplierSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getSupplierSimpleList(), + labelField: 'name', + valueField: 'id', }, rules: 'required', }, @@ -189,11 +187,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -213,11 +209,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择供应商', allowClear: true, showSearch: true, - api: getSupplierSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getSupplierSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -228,11 +222,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择仓库', allowClear: true, showSearch: true, - api: getWarehouseSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getWarehouseSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -243,11 +235,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择创建人', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/stock/move/data.ts b/apps/web-antd/src/views/erp/stock/move/data.ts index dc1321e8f1f49cfd1e2d2251ae0965bf61958eab..fbc94a128e3b75fb03df93fef7f2371b31a265ad 100644 --- a/apps/web-antd/src/views/erp/stock/move/data.ts +++ b/apps/web-antd/src/views/erp/stock/move/data.ts @@ -178,11 +178,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getProductSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -202,11 +200,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择调出仓库', allowClear: true, showSearch: true, - api: getWarehouseSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getWarehouseSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -217,11 +213,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择调入仓库', allowClear: true, showSearch: true, - api: getWarehouseSimpleList, - fieldNames: { - label: 'name', - value: 'id', - }, + api: () => getWarehouseSimpleList(), + labelField: 'name', + valueField: 'id', }, }, { @@ -232,11 +226,9 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择创建人', allowClear: true, showSearch: true, - api: getSimpleUserList, - fieldNames: { - label: 'nickname', - value: 'id', - }, + api: () => getSimpleUserList(), + labelField: 'nickname', + valueField: 'id', }, }, { diff --git a/apps/web-antd/src/views/erp/stock/record/data.ts b/apps/web-antd/src/views/erp/stock/record/data.ts index e4e3d0ecda077c4579a9df7811ccc82b735bfa1c..db0548c9a8e097b6b5d0ecfc1119200b9b2c0b94 100644 --- a/apps/web-antd/src/views/erp/stock/record/data.ts +++ b/apps/web-antd/src/views/erp/stock/record/data.ts @@ -19,7 +19,7 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, + api: () => getProductSimpleList(), labelField: 'name', valueField: 'id', }, @@ -32,7 +32,7 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择仓库', allowClear: true, showSearch: true, - api: getWarehouseSimpleList, + api: () => getWarehouseSimpleList(), labelField: 'name', valueField: 'id', }, diff --git a/apps/web-antd/src/views/erp/stock/stock/data.ts b/apps/web-antd/src/views/erp/stock/stock/data.ts index 037bb9c45686cac9964604b822c3fb2026ffa936..71c9a1549692450e8da1bbfd9194eafc9d0514ae 100644 --- a/apps/web-antd/src/views/erp/stock/stock/data.ts +++ b/apps/web-antd/src/views/erp/stock/stock/data.ts @@ -15,7 +15,7 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择产品', allowClear: true, showSearch: true, - api: getProductSimpleList, + api: () => getProductSimpleList(), labelField: 'name', valueField: 'id', }, @@ -28,7 +28,7 @@ export function useGridFormSchema(): VbenFormSchema[] { placeholder: '请选择仓库', allowClear: true, showSearch: true, - api: getWarehouseSimpleList, + api: () => getWarehouseSimpleList(), labelField: 'name', valueField: 'id', }, diff --git a/apps/web-antd/src/views/infra/codegen/data.ts b/apps/web-antd/src/views/infra/codegen/data.ts index 2db43ba8bfc9616833c00ffb9948a47ac83db1ed..921d1256b4aa62ebad7315c8f3cca7e0aaacdc46 100644 --- a/apps/web-antd/src/views/infra/codegen/data.ts +++ b/apps/web-antd/src/views/infra/codegen/data.ts @@ -25,13 +25,9 @@ export function useImportTableFormSchema(): VbenFormSchema[] { label: '数据源', component: 'ApiSelect', componentProps: { - api: async () => { - const data = await getDataSourceConfigList(); - return data.map((item) => ({ - label: item.name, - value: item.id, - })); - }, + api: () => getDataSourceConfigList(), + labelField: 'name', + valueField: 'id', autoSelect: 'first', placeholder: '请选择数据源', }, diff --git a/apps/web-antd/src/views/iot/alert/config/data.ts b/apps/web-antd/src/views/iot/alert/config/data.ts index 09ca905c7734db069aaf3a790926c407627b3fac..379867edb5e7079a6035f89d507699c007029617 100644 --- a/apps/web-antd/src/views/iot/alert/config/data.ts +++ b/apps/web-antd/src/views/iot/alert/config/data.ts @@ -63,7 +63,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '关联场景联动规则', component: 'ApiSelect', componentProps: { - api: getSimpleRuleSceneList, + api: () => getSimpleRuleSceneList(), labelField: 'name', valueField: 'id', mode: 'multiple', @@ -76,7 +76,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '接收的用户', component: 'ApiSelect', componentProps: { - api: getSimpleUserList, + api: () => getSimpleUserList(), labelField: 'nickname', valueField: 'id', mode: 'multiple', diff --git a/apps/web-antd/src/views/iot/alert/record/data.ts b/apps/web-antd/src/views/iot/alert/record/data.ts index 10ebb12f3907ba4895afeba982b5a65b414e2fc0..70b13b26770431091b5d45cb76fe5349c60e9c91 100644 --- a/apps/web-antd/src/views/iot/alert/record/data.ts +++ b/apps/web-antd/src/views/iot/alert/record/data.ts @@ -17,7 +17,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '告警配置', component: 'ApiSelect', componentProps: { - api: getSimpleAlertConfigList, + api: () => getSimpleAlertConfigList(), labelField: 'name', valueField: 'id', placeholder: '请选择告警配置', @@ -40,7 +40,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '产品', component: 'ApiSelect', componentProps: { - api: getSimpleProductList, + api: () => getSimpleProductList(), labelField: 'name', valueField: 'id', placeholder: '请选择产品', @@ -53,7 +53,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '设备', component: 'ApiSelect', componentProps: { - api: getSimpleDeviceList, + api: () => getSimpleDeviceList(), labelField: 'deviceName', valueField: 'id', placeholder: '请选择设备', diff --git a/apps/web-antd/src/views/iot/device/device/data.ts b/apps/web-antd/src/views/iot/device/device/data.ts index e825055dc41655b0e46d52389fc6409d688a4da9..a2fef45e8d32432cc6283b22e621de241c7af714 100644 --- a/apps/web-antd/src/views/iot/device/device/data.ts +++ b/apps/web-antd/src/views/iot/device/device/data.ts @@ -5,6 +5,7 @@ import { DICT_TYPE } from '@vben/constants'; import { getDictOptions } from '@vben/hooks'; import { z } from '#/adapter/form'; +import { getSimpleDeviceList } from '#/api/iot/device/device'; import { getSimpleDeviceGroupList } from '#/api/iot/device/group'; import { DeviceTypeEnum, @@ -27,7 +28,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '产品', component: 'ApiSelect', componentProps: { - api: getSimpleProductList, + api: () => getSimpleProductList(), labelField: 'name', valueField: 'id', placeholder: '请选择产品', @@ -55,12 +56,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '网关设备', component: 'ApiSelect', componentProps: { - api: async () => { - const { getSimpleDeviceList } = await import( - '#/api/iot/device/device' - ); - return getSimpleDeviceList(DeviceTypeEnum.GATEWAY); - }, + api: () => getSimpleDeviceList(DeviceTypeEnum.GATEWAY), labelField: 'nickname', valueField: 'id', placeholder: '子设备可选择父设备', @@ -93,7 +89,7 @@ export function useFormSchema(): VbenFormSchema[] { label: '设备分组', component: 'ApiSelect', componentProps: { - api: getSimpleDeviceGroupList, + api: () => getSimpleDeviceGroupList(), labelField: 'name', valueField: 'id', mode: 'multiple', @@ -113,16 +109,16 @@ export function useFormSchema(): VbenFormSchema[] { .optional() .or(z.literal('')), }, - // { - // fieldName: 'locationType', - // label: '定位类型', - // component: 'RadioGroup', - // componentProps: { - // options: getDictOptions(DICT_TYPE.IOT_LOCATION_TYPE, 'number'), - // buttonStyle: 'solid', - // optionType: 'button', - // }, - // }, + { + fieldName: 'locationType', + label: '定位类型', + component: 'RadioGroup', + componentProps: { + options: getDictOptions(DICT_TYPE.IOT_LOCATION_TYPE, 'number'), + buttonStyle: 'solid', + optionType: 'button', + }, + }, { fieldName: 'longitude', label: '设备经度', @@ -160,7 +156,7 @@ export function useGroupFormSchema(): VbenFormSchema[] { label: '设备分组', component: 'ApiSelect', componentProps: { - api: getSimpleDeviceGroupList, + api: () => getSimpleDeviceGroupList(), labelField: 'name', valueField: 'id', mode: 'multiple', @@ -203,7 +199,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '产品', component: 'ApiSelect', componentProps: { - api: getSimpleProductList, + api: () => getSimpleProductList(), labelField: 'name', valueField: 'id', placeholder: '请选择产品', @@ -253,7 +249,7 @@ export function useGridFormSchema(): VbenFormSchema[] { label: '设备分组', component: 'ApiSelect', componentProps: { - api: getSimpleDeviceGroupList, + api: () => getSimpleDeviceGroupList(), labelField: 'name', valueField: 'id', placeholder: '请选择设备分组', diff --git a/apps/web-antd/src/views/iot/device/device/index.vue b/apps/web-antd/src/views/iot/device/device/index.vue index 06e34ac5ed5d7c7adf43123838780550c8dc0b2b..f83a7c14a9e758fa89e2163b2f471b196575a6fe 100644 --- a/apps/web-antd/src/views/iot/device/device/index.vue +++ b/apps/web-antd/src/views/iot/device/device/index.vue @@ -32,7 +32,6 @@ import { getSimpleProductList } from '#/api/iot/product/product'; import { $t } from '#/locales'; import { useGridColumns } from './data'; -// @ts-ignore import DeviceCardView from './modules/DeviceCardView.vue'; import DeviceForm from './modules/DeviceForm.vue'; import DeviceGroupForm from './modules/DeviceGroupForm.vue'; diff --git a/apps/web-antd/src/views/iot/device/device/modules/DeviceGroupForm.vue b/apps/web-antd/src/views/iot/device/device/modules/DeviceGroupForm.vue index dbb75faa021a561ec6b03722035bfa0c39003ea8..fa85a0ffbdfe43f10684a9abd803223e9437c713 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/DeviceGroupForm.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/DeviceGroupForm.vue @@ -44,7 +44,7 @@ const [Modal, modalApi] = useVbenModal({ // 关闭并提示 await modalApi.close(); emit('success'); - message.success($t('common.updateSuccess')); + message.success($t('ui.actionMessage.operationSuccess')); } finally { modalApi.unlock(); } diff --git a/apps/web-antd/src/views/iot/device/device/modules/DeviceImportForm.vue b/apps/web-antd/src/views/iot/device/device/modules/DeviceImportForm.vue index 1bf1e0a4f27fcc67d4d52c0d14381b0bbfe156cb..04d674a5ebd0087448fd482256bbf6b9059fab92 100644 --- a/apps/web-antd/src/views/iot/device/device/modules/DeviceImportForm.vue +++ b/apps/web-antd/src/views/iot/device/device/modules/DeviceImportForm.vue @@ -111,14 +111,14 @@ const [Modal, modalApi] = useVbenModal({ }); /** 下载模板 */ -const handleDownloadTemplate = async () => { +async function handleDownloadTemplate() { try { const res = await importDeviceTemplate(); downloadFileFromBlobPart({ fileName: '设备导入模版.xls', source: res }); } catch (error: any) { message.error(error.message || '下载失败'); } -}; +}