From 3a95a23d45ebfe0c138e7b56d570b18accd09b51 Mon Sep 17 00:00:00 2001 From: luojie <125330818@qq.com> Date: Mon, 12 Jan 2026 23:09:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86][upa?= =?UTF-8?q?dte]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/template/index.js | 9 +++++ src/components/Template/BaseInfoFormPcakge.vue | 4 +- src/components/Template/CustomTable.vue | 2 +- src/components/Template/HandleFormItem.vue | 45 ++++++++++++++++------ src/components/Template/Step.vue | 2 +- src/utils/eventBus.js | 2 + .../business/comps/template/TemplateTable.vue | 29 ++++++++------ .../comps/template/comps/sp/SWYPFXRYPZB.vue | 27 ++++++++++--- .../comps/template/comps/sp/SWYPNBGZYZBB.vue | 18 ++++----- .../comps/template/mixins/templateMixin.js | 15 ++++++-- vue.config.js | 4 +- 11 files changed, 111 insertions(+), 46 deletions(-) create mode 100644 src/utils/eventBus.js diff --git a/src/api/template/index.js b/src/api/template/index.js index 373745b..9320dc0 100644 --- a/src/api/template/index.js +++ b/src/api/template/index.js @@ -7,4 +7,13 @@ export const getReagentList = (params) => { method: 'get', params }) +} + +//获取最新的sn号 +export const getLatestSn = (params) => { + return request({ + url: '/system/business/public/getSn', + method: 'get', + params + }) } \ No newline at end of file diff --git a/src/components/Template/BaseInfoFormPcakge.vue b/src/components/Template/BaseInfoFormPcakge.vue index 0df2758..c327180 100644 --- a/src/components/Template/BaseInfoFormPcakge.vue +++ b/src/components/Template/BaseInfoFormPcakge.vue @@ -243,6 +243,7 @@ export default { this.$set(this.errors, key, false); } }, + //更新表单数据 updateFormData(key, value) { this.formFields[key] = value; // 清除该表单项的错误状态 @@ -250,6 +251,7 @@ export default { this.$set(this.errors, key, false); } }, + //批量更新表单数据 batchUpdateFormData(data) { Object.keys(data).forEach(key => { this.formFields[key] = data[key]; @@ -467,7 +469,7 @@ export default { }); }, //直接获取表单数据,不做校验 - getDirectFormData() { + getFilledFormData() { return this.formFields; }, getFormDataByKey(key) { diff --git a/src/components/Template/CustomTable.vue b/src/components/Template/CustomTable.vue index 0ac4625..d13e3a1 100644 --- a/src/components/Template/CustomTable.vue +++ b/src/components/Template/CustomTable.vue @@ -192,7 +192,7 @@ export default { this.headerSelectFields = headerSelectObj; }, // 直接获取表单数据,不做校验 - getDirectFormData() { + getFilledFormData() { return { stepTableFormData: [...this.localDataSource], headerSelectFields: this.headerSelectFields, diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue index ebe14fd..38ed74d 100644 --- a/src/components/Template/HandleFormItem.vue +++ b/src/components/Template/HandleFormItem.vue @@ -33,7 +33,7 @@