From 9e6d32b4d78830cd5d2fc5d91baca2ab2a433730 Mon Sep 17 00:00:00 2001
From: luojie <125330818@qq.com>
Date: Mon, 2 Mar 2026 22:32:46 +0800
Subject: [PATCH 01/12] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1?=
=?UTF-8?q?=E7=90=86][update]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Template/BaseInfoFormPackage.vue | 4 ++--
src/views/business/comps/template/comps/sp/SP0020.vue | 19 +++++++++++--------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/components/Template/BaseInfoFormPackage.vue b/src/components/Template/BaseInfoFormPackage.vue
index eb28b6e..b26a054 100644
--- a/src/components/Template/BaseInfoFormPackage.vue
+++ b/src/components/Template/BaseInfoFormPackage.vue
@@ -92,7 +92,7 @@
{{ sItem.otherLabel ? $t(sItem.otherLabel) :
$t("template.common.other") }}
-
+
{{ sItem.otherLabel ? $t(sItem.otherLabel) :
$t("template.common.other") }}
-
+
+ :ref="refConfig.baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
+ :ref="refConfig.remarkRef" :formConfig="remarkConig" :formData="formData" />
@@ -30,6 +30,12 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion
import { getBaseInfoFormConfig} from "../../formConfig/sp/SP0019";
import { getSynrFormConfig} from "../../formConfig/sp/SP0020";
+const refConfig = {
+ baseInfoRef: "baseInfoRef",
+ remarkRef: "remarkRef",
+}
+
+const compRefs = Object.values(refConfig);
export default {
name: "SP0020",
@@ -74,7 +80,7 @@ export default {
data() {
return {
formData: {},
- compRefs:["baseInfoRef", "storageConditionRef", "spzxhRef","yqInfoTableRef","ryTableRef", "remarkRef"]
+ refConfig
};
},
mounted() {
@@ -93,16 +99,13 @@ export default {
this.$refs.ryTableRef.updateDataSourceByRowIndex(rowIndex, params);
}
},
- onYqSubmit(data, col, rowIndex, colIndex, row){
- console.log(data, col, rowIndex, colIndex, row,"onRegentSubmit")
- },
//获取已填写的表单数据
getFilledFormData() {
- return this.getFilledFormDataByRefs(this.compRefs)
+ return this.getFilledFormDataByRefs(compRefs)
},
//获取填写完成的表单数据
async getFormData() {
- let content = await this.validFormFields(this.compRefs);
+ let content = await this.validFormFields(compRefs);
console.log(content)
return content;
},
From 7c3919616d12452afb8a25d6791717caf16b09f6 Mon Sep 17 00:00:00 2001
From: lslaiwy <1209768238@qq.com>
Date: Mon, 2 Mar 2026 22:37:19 +0800
Subject: [PATCH 02/12] =?UTF-8?q?fix:[=E8=A1=A8=E5=8D=95=E7=AE=A1=E7=90=86?=
=?UTF-8?q?]=E4=BF=AE=E6=94=B9=E5=85=B6=E4=BB=96=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/lang/zh/template/dl.js | 7 +++----
src/views/business/comps/template/comps/dl/DL016.vue | 1 +
src/views/business/comps/template/comps/dl/DL017.vue | 1 +
src/views/business/comps/template/comps/dl/DL018.vue | 1 +
src/views/business/comps/template/comps/dl/DL019.vue | 1 +
src/views/business/comps/template/comps/dl/DL021.vue | 15 +++++----------
6 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/lang/zh/template/dl.js b/src/lang/zh/template/dl.js
index 124605d..8583c66 100644
--- a/src/lang/zh/template/dl.js
+++ b/src/lang/zh/template/dl.js
@@ -180,9 +180,8 @@ export default {
dlbz: '备注',
gcqk: '观察情况',
- jlzb:'剂量组别',
- xybh:'悬液编号',
- bplsh1:'玻片流水号',
- bplsh2:'玻片流水号',
+ bpbh:'玻片编号',
+ gcxps:'观察细胞数目',
+ zqxxbs:'中期相细胞数',
},
}
diff --git a/src/views/business/comps/template/comps/dl/DL016.vue b/src/views/business/comps/template/comps/dl/DL016.vue
index 2a9b682..8e22210 100644
--- a/src/views/business/comps/template/comps/dl/DL016.vue
+++ b/src/views/business/comps/template/comps/dl/DL016.vue
@@ -150,6 +150,7 @@ export default {
fillType: 'preFill',
options: this.getDictOptions('business_dl_qsxjbltj'),
otherCode: 'bltjOther',
+ showOtherLabel:false
},
}
}
diff --git a/src/views/business/comps/template/comps/dl/DL017.vue b/src/views/business/comps/template/comps/dl/DL017.vue
index 9bda0c3..e86ba26 100644
--- a/src/views/business/comps/template/comps/dl/DL017.vue
+++ b/src/views/business/comps/template/comps/dl/DL017.vue
@@ -151,6 +151,7 @@ export default {
fillType: 'preFill',
options: this.getDictOptions('business_dl_qsxjbltj'),
otherCode: 'bltjOther',
+ showOtherLabel:false
},
}
}
diff --git a/src/views/business/comps/template/comps/dl/DL018.vue b/src/views/business/comps/template/comps/dl/DL018.vue
index 8476fd1..a2b95dd 100644
--- a/src/views/business/comps/template/comps/dl/DL018.vue
+++ b/src/views/business/comps/template/comps/dl/DL018.vue
@@ -151,6 +151,7 @@ export default {
fillType: 'preFill',
options: this.getDictOptions('business_dl_qsxjbltj'),
otherCode: 'bltjOther',
+ showOtherLabel:false
},
}
}
diff --git a/src/views/business/comps/template/comps/dl/DL019.vue b/src/views/business/comps/template/comps/dl/DL019.vue
index 44fb85c..2c4758d 100644
--- a/src/views/business/comps/template/comps/dl/DL019.vue
+++ b/src/views/business/comps/template/comps/dl/DL019.vue
@@ -151,6 +151,7 @@ export default {
fillType: 'preFill',
options: this.getDictOptions('business_dl_qsxjbltj'),
otherCode: 'bltjOther',
+ showOtherLabel:false
},
}
}
diff --git a/src/views/business/comps/template/comps/dl/DL021.vue b/src/views/business/comps/template/comps/dl/DL021.vue
index 8322937..659bbbf 100644
--- a/src/views/business/comps/template/comps/dl/DL021.vue
+++ b/src/views/business/comps/template/comps/dl/DL021.vue
@@ -123,21 +123,16 @@ export default {
bodyMaxlength: 50,
},{
label: 'template.dl.dl021.gcxps',
- prop: 'dwbh',
- bodyType: 'checkboxTag',
+ prop: 'cyd',
+ bodyType: 'input',
bodyFillType: 'actFill',
- bodySubType:"button",
- bodySubFillType:"preFill",
- bodySubButtonName:"template.common.importTemplate",
- bodySubKey:"exportBtn",
- showBodySub:this.fillType === "preFill",
- width: 280,
+ width: 100,
bodyMaxlength: 10,
},{
label: 'template.dl.dl021.zqxxbs',
- prop: 'ypsl',
+ label: 'template.dl.dl021.gcxps',
+ prop: 'cyd',
bodyType: 'input',
- bodyDisabled: true,
bodyFillType: 'actFill',
width: 80,
bodyMaxlength: 10,
From d9660bfd268f8c18efd9a79355bc758c2e150e46 Mon Sep 17 00:00:00 2001
From: luojie <125330818@qq.com>
Date: Tue, 3 Mar 2026 10:21:40 +0800
Subject: [PATCH 03/12] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1?=
=?UTF-8?q?=E7=90=86][update]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Template/HandleFormItem.vue | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue
index c316990..091b4b1 100644
--- a/src/components/Template/HandleFormItem.vue
+++ b/src/components/Template/HandleFormItem.vue
@@ -48,6 +48,10 @@
+
+
+
Date: Tue, 3 Mar 2026 10:26:41 +0800
Subject: [PATCH 04/12] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86?=
=?UTF-8?q?]=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/business/comps/template/mixins/templateMixin.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js
index 985e974..52f8d54 100644
--- a/src/views/business/comps/template/mixins/templateMixin.js
+++ b/src/views/business/comps/template/mixins/templateMixin.js
@@ -62,6 +62,7 @@ export default {
studySn,
templateMc,
templateMcEn,
+ templateId,
templateSn,
startDate,
bdmc,
@@ -109,7 +110,8 @@ export default {
studySn,
templateMc,
templateMcEn,
- templateSn,
+ templateId,
+ templateSn,
startDate,
bdmc,
endDate,
@@ -123,6 +125,7 @@ export default {
studySn,
templateMc,
templateMcEn,
+ templateId,
templateSn,
startDate,
bdmc,
From 30911fcb41ef52842950ed4cff20ac813bd4c940 Mon Sep 17 00:00:00 2001
From: HanLong <404402223@qq.com>
Date: Tue, 3 Mar 2026 11:18:27 +0800
Subject: [PATCH 05/12] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1?=
=?UTF-8?q?=E7=90=86][PCR007]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/lang/en/template/pcr.js | 13 +
src/lang/zh/template/pcr.js | 13 +
.../business/comps/template/TemplateTable.vue | 6 +-
.../business/comps/template/comps/pcr/PCR005.vue | 40 ++-
.../business/comps/template/comps/pcr/PCR007.vue | 390 +++++++++++++++++++++
.../comps/template/dialog/ImportExcelDialog.vue | 4 +-
.../comps/template/formConfig/PCRTableConfig.js | 117 +++++++
7 files changed, 566 insertions(+), 17 deletions(-)
create mode 100644 src/views/business/comps/template/comps/pcr/PCR007.vue
diff --git a/src/lang/en/template/pcr.js b/src/lang/en/template/pcr.js
index 92be159..e5ae109 100644
--- a/src/lang/en/template/pcr.js
+++ b/src/lang/en/template/pcr.js
@@ -47,6 +47,19 @@ export default {
ypznd: '样品终浓度',
fj: 'Attachment',
},
+ pcr007: {
+ dztpbh: '电子天平编号',
+ clpbh: 'Analysis Batch Number',
+ ypmc: '样品名称',
+ ypcsnd: '样品初始浓度',
+ sxbs: '稀释倍数',
+ ysypxytj: '预设样品吸样体积',
+ sjypxytj: '实际样品吸样体积',
+ ysxsyxytj: '预设稀释液吸样体积',
+ sjxsyxytj: '实际稀释液吸样体积',
+ ypznd: '样品终浓度',
+ fj: 'Attachment',
+ },
// 生物样品分析方法学样品制备表-准确度与精密度
sp008: {
title:
diff --git a/src/lang/zh/template/pcr.js b/src/lang/zh/template/pcr.js
index 953405b..80f8fe1 100644
--- a/src/lang/zh/template/pcr.js
+++ b/src/lang/zh/template/pcr.js
@@ -46,6 +46,19 @@ export default {
ypznd: '样品终浓度',
fj: '附件',
},
+ pcr007: {
+ dztpbh: '电子天平编号',
+ clpbh: 'Analysis Batch Number',
+ ypmc: '样品名称',
+ ypcsnd: '样品初始浓度',
+ sxbs: '稀释倍数',
+ ysypxytj: '预设样品吸样体积',
+ sjypxytj: '实际样品吸样体积',
+ ysxsyxytj: '预设稀释液吸样体积',
+ sjxsyxytj: '实际稀释液吸样体积',
+ ypznd: '样品终浓度',
+ fj: 'Attachment',
+ },
// 生物样品分析方法学样品制备表-Recovery
sp009: {
title: '生物样品分析方法学样品制备表(Recovery)',
diff --git a/src/views/business/comps/template/TemplateTable.vue b/src/views/business/comps/template/TemplateTable.vue
index eea82a2..dad03e8 100644
--- a/src/views/business/comps/template/TemplateTable.vue
+++ b/src/views/business/comps/template/TemplateTable.vue
@@ -52,6 +52,7 @@ import PCR002 from "./comps/pcr/PCR002.vue";
import PCR003 from "./comps/pcr/PCR003.vue";
import PCR004 from "./comps/pcr/PCR004.vue";
import PCR005 from "./comps/pcr/PCR005.vue";
+import PCR007 from "./comps/pcr/PCR007.vue";
//LBA
// LBA001-使用SP001
@@ -114,7 +115,7 @@ export default {
//色谱
SP001, SP003, SP00456,SP007, SP008, SP009,SP0019,SP0020,
// PCR
- PCR002, PCR003, PCR004, PCR005,
+ PCR002, PCR003, PCR004, PCR005,PCR007,
//LBA
LBA002,
LBA003,
@@ -162,7 +163,7 @@ export default {
handleEditSignCancel(e) {
EventBus.$emit('edit-sign-cancel', e);
},
-
+
},
props: {
sn: {
@@ -232,6 +233,7 @@ export default {
'PCR003': 'PCR003',
'PCR004': 'PCR004',
'PCR005': 'PCR005',
+ 'PCR007': 'PCR007',
//LBA
'LBA001': 'SP001',
'LBA002': 'LBA002',
diff --git a/src/views/business/comps/template/comps/pcr/PCR005.vue b/src/views/business/comps/template/comps/pcr/PCR005.vue
index 8b5599e..6a23326 100644
--- a/src/views/business/comps/template/comps/pcr/PCR005.vue
+++ b/src/views/business/comps/template/comps/pcr/PCR005.vue
@@ -16,10 +16,14 @@
+ :sn="templateData.templateSn" :templateData="templateData" fillType="actFill" />
@@ -588,12 +588,7 @@ export default {
if (params) {
this.reset()
if (params.formId && params.formId != '') {
- if (params.fromYt) {
- this.showIndex = 1
- this.bdmbTitle = this.$t('page.business.study.studyFormFill.ytbd')
- } else {
- this.showIndex = 2
- }
+
this.$modal.loading()
studyFormFill_info({ id: params.formId }).then(response => {
this.form = response.data
@@ -601,6 +596,12 @@ export default {
this.templateData = deepClone(this.form)
const obj = Object.assign({}, this.$route, { title: this.form.bdmc })
this.$tab.updatePage(obj);
+ if (params.fromYt) {
+ this.showIndex = 1
+ this.bdmbTitle = this.$t('page.business.study.studyFormFill.ytbd')
+ } else {
+ this.showIndex = 2
+ }
this.saveSimpleLog({ jcmc: '填报表单编辑', jcmcEn: 'Record Edit', name: this.form.bdmc + '(' + this.form.bdbh + ')', nameEn: this.form.bdmc + '(' + this.form.bdbh + ')' })
this.$modal.closeLoading()
})
From 7978b3eb352bc3b02ec7f6f5710b8a4f55c35cf7 Mon Sep 17 00:00:00 2001
From: luojie <125330818@qq.com>
Date: Tue, 3 Mar 2026 14:46:33 +0800
Subject: [PATCH 07/12] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1?=
=?UTF-8?q?=E7=90=86][update]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Template/BaseInfoFormPackage.vue | 26 +---
src/components/Template/HandleFormItem.vue | 144 ++++++++++++++++++++-
.../business/comps/template/comps/sp/SP0020.vue | 6 +-
.../comps/template/formConfig/sp/SP0019.js | 4 +-
.../comps/template/formConfig/sp/SP0020.js | 58 ++++++++-
5 files changed, 206 insertions(+), 32 deletions(-)
diff --git a/src/components/Template/BaseInfoFormPackage.vue b/src/components/Template/BaseInfoFormPackage.vue
index b26a054..cb4705b 100644
--- a/src/components/Template/BaseInfoFormPackage.vue
+++ b/src/components/Template/BaseInfoFormPackage.vue
@@ -125,14 +125,6 @@
@update:error="errors[key] = false" @resetRecord="resetRecord(key)" :item="sItem"
:value="formFields[key]" />
-
-
- onAttachmentChange(key, e)"
- :error="errors[key]" @update:error="errors[key] = false"
- :orange-bg="orangeBgFields[key]" />
-
onBeforeReagentSubmit(data, callback, key)"
@@ -293,12 +285,6 @@
@update:error="errors[key] = false" @resetRecord="resetRecord(key)" :item="sItem"
:value="formFields[key]" />
-
- onAttachmentChange(key, e)" :error="errors[key]"
- @update:error="errors[key] = false" :orange-bg="orangeBgFields[key]" />
-
onBeforeReagentSubmit(data, callback, key)"
@@ -313,15 +299,17 @@
-
-
-
@@ -177,11 +176,11 @@ export default {
type: "cellItem",
label: 'template.pcr.pcr005.clpbh',
config: {
- act: {
+ clpbh: {
label: '',
type: "input",
fillType: "actFill",
- otherCode: "preOther",
+ otherCode: "clpbh",
}
}
},
@@ -237,7 +236,7 @@ export default {
},
methods: {
downloadExcelTemplate() {
- this.exportExcel(['样品名称', '样品初始浓度', '稀释倍数', '预设样品吸样体积'])
+ this.exportExcel(['样品名称', '样品初始浓度', '稀释倍数', '预设样品吸样体积'], 'PCR分析样品处理表导入模板')
},
//选择试剂提交事件
onSelectReagentSubmit(code, row) {
@@ -310,15 +309,15 @@ export default {
},
//获取已填写的表单数据
getFilledFormData() {
- return this.getFilledFormDataByRefs(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"])
+ return this.getFilledFormDataByRefs(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "fjRef", "remarkRef"])
},
async getFormData() {
- let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]);
+ let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "fjRef", "remarkRef"]);
return content;
},
getResource() {
let content = this.getFilledFormData();
-
+ console.log(content)
//生成resource
let tmpResource = []
if (this.fillType === "actFill") {
@@ -333,7 +332,7 @@ export default {
tmpResource.push({
mc: null,
- bh: item.startSolutionCode,
+ bh: content.subSolution,
ph: null,
ndz: null,
nd: null,
@@ -342,10 +341,10 @@ export default {
sxrq: null,
kc: null,
kcdw: null,
- syl: item.actStartSolutionVolume,
+ syl: item.ysxsyxytj,
type: 1,
elnType: this.product,
- syldw: content.headerSelectFields.actStartSolutionVolumeUnit,
+ syldw: content.headerSelectFields.sjxsyxytjUnit,
yxzq: null,
yxzqdw: null,
})
diff --git a/src/views/business/comps/template/comps/pcr/PCR007.vue b/src/views/business/comps/template/comps/pcr/PCR007.vue
index 8d8a7f5..dcfbadb 100644
--- a/src/views/business/comps/template/comps/pcr/PCR007.vue
+++ b/src/views/business/comps/template/comps/pcr/PCR007.vue
@@ -26,6 +26,7 @@
-
-
-
-
@@ -63,7 +59,7 @@ import { EventBus } from "@/utils/eventBus";
import { volumeConverter } from "@/utils/volConverter";//体积单位转换
import { convertConcentration } from "@/utils/conConverter";//浓度单位转换
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
-import { getPCR005Config } from "../../formConfig/PCRTableConfig.js";
+import { getPCR007Config } from "../../formConfig/PCRTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
import ImportExcelDialog from '../../dialog/ImportExcelDialog'
@@ -79,7 +75,7 @@ export default {
},
computed: {
tableStepColumns() {
- return getPCR005Config(this);
+ return getPCR007Config(this);
},
// 附件表单配置
getFjFormConfig() {
@@ -151,43 +147,8 @@ export default {
}
},
{
- type: "conditionItem",
- label: 'template.common.processCondition',
- config: {
- pre: {
- label: 'template.common.preFill',
- type: "select",
- multiple: true,
- fillType: "preFill",
- options: this.getDictOptions('business_pztj'),
- otherCode: "preOther",
- },
- act: {
- label: 'template.common.actualFill',
- type: "select",
- fillType: "actFill",
- otherCode: "actOther",
- multiple: true,
- compareTo: "pre",
- options: this.getDictOptions('business_pztj')
- }
- }
- },
- {
- type: "cellItem",
- label: 'template.pcr.pcr005.clpbh',
- config: {
- act: {
- label: '',
- type: "input",
- fillType: "actFill",
- otherCode: "preOther",
- }
- }
- },
- {
type: "cellItem",
- label: 'template.common.configurationTime',
+ label: 'template.pcr.pcr007.czsj',
config: {
startDate: {
label: 'template.common.startTime',
@@ -208,14 +169,10 @@ export default {
type: 'step',
config: {
solution: {
- labelWidth: 80,
+ labelWidth: 100,
label: 'template.pcr.pcr007.dztpbh',
- type: 'input',
- fillType: 'preFill',
- subType: 'sj',
- subKey: 'subSolution',
- subFillType: 'actFill',
- maxlength: 20
+ type: 'yq',
+ fillType: 'actFill',
},
}
}
@@ -237,7 +194,7 @@ export default {
},
methods: {
downloadExcelTemplate() {
- this.exportExcel(['样品名称', '样品初始浓度', '稀释倍数', '预设样品吸样体积'])
+ this.exportExcel(['样品名称', '样品初始浓采样前样品管试剂预计添加体积度'], 'PCR分析采集管称重记录表导入模板')
},
//选择试剂提交事件
onSelectReagentSubmit(code, row) {
@@ -253,10 +210,6 @@ export default {
list.push({
ypmc: item[0],
ypcsnd: item[1],
- sxbs: item[2],
- ysypxytj: item[3],
- targetDiluentVolumePrecision: 3,
- actSolutionVolumePrecision: 3
})
})
this.$refs.stepTableRef.addRows(list)
@@ -265,48 +218,8 @@ export default {
},
// 失去焦点,计算
onHandleTableBlur() {
- let content = this.getFilledFormData();
- // 预填
- let ysypxytjUnit = content.headerSelectFields.ysypxytjUnit
- let ysxsyxytjUnit = content.headerSelectFields.ysxsyxytjUnit
-
- let ypzndUnit = content.headerSelectFields.ypzndUnit
- let ypcsndUnit = content.headerSelectFields.ypcsndUnit
- if (this.fillType === "preFill") {
- let tableList = content.stepTableFormData
- if (tableList && tableList.length > 0) {
- for (let i = 0; i < tableList.length; i++) {
- let item = tableList[i]
- if (
- isValueEmpty(ysypxytjUnit) ||
- isValueEmpty(ysxsyxytjUnit) ||
- isValueEmpty(item.sxbs) ||
- isValueEmpty(item.ysypxytj) ||
- isValueEmpty(item.actSolutionVolumePrecision) ||
- isValueEmpty(item.ypcsnd)
- ) {
- continue;
- }
- // 计算预设稀释液吸样体积 公式:(稀释倍数-1)*样品理论体积
- let ysxsyxytj = (item.sxbs - 1) * item.ysypxytj
- ysxsyxytj = volumeConverter.convert(ysxsyxytj + ysypxytjUnit, ysxsyxytjUnit).toFixed(
- item.actSolutionVolumePrecision
- )
- tableList[i].ysxsyxytj = ysxsyxytj
-
- // 计算样品终浓度: 样品初始浓度/稀释倍数
- let ypznd = (item.ypcsnd) / item.sxbs
- ypznd = convertConcentration.convert(ypznd + ypcsndUnit, ypzndUnit).toFixed(
- item.targetDiluentVolumePrecision
- )
- tableList[i].ypznd = ypznd
-
- }
- }
- this.$refs.stepTableRef.updateDataSource(tableList);
- }
},
//获取已填写的表单数据
getFilledFormData() {
@@ -325,31 +238,6 @@ export default {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
- //配置的试剂
- let item = tableList[i]
- console.log('表格item:' + JSON.stringify(item))
-
- //使用的
-
- tmpResource.push({
- mc: null,
- bh: item.startSolutionCode,
- ph: null,
- ndz: null,
- nd: null,
- nddw: null,
- ly: 'ELN配制',
- sxrq: null,
- kc: null,
- kcdw: null,
- syl: item.actStartSolutionVolume,
- type: 1,
- elnType: this.product,
- syldw: content.headerSelectFields.actStartSolutionVolumeUnit,
- yxzq: null,
- yxzqdw: null,
- })
-
}
}
}
@@ -365,7 +253,6 @@ export default {
//保存
async onSave() {
let content = this.$refs.stepRef.getStepResource();
- console.log(content);
},
// 删除表格行
diff --git a/src/views/business/comps/template/formConfig/PCRTableConfig.js b/src/views/business/comps/template/formConfig/PCRTableConfig.js
index 4f7168b..cbaacc9 100644
--- a/src/views/business/comps/template/formConfig/PCRTableConfig.js
+++ b/src/views/business/comps/template/formConfig/PCRTableConfig.js
@@ -632,6 +632,7 @@ export const getPCR005Config = ($this) => {
fillType: 'preFill',
headerSelectKey: 'sjypxytjUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
+ copyFrom: 'ysypxytj', //复制哪个字段
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
@@ -666,6 +667,7 @@ export const getPCR005Config = ($this) => {
fillType: 'preFill',
headerSelectKey: 'sjxsyxytjUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
+ copyFrom: 'ysxsyxytj', //复制哪个字段
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
@@ -699,7 +701,7 @@ export const getPCR005Config = ($this) => {
export const getPCR007Config = ($this) => {
return [
{
- label: 'template.pcr.pcr005.ypmc',
+ label: 'template.pcr.pcr007.ypmc',
prop: 'ypmc',
width: 280,
bodyType: 'input',
@@ -708,105 +710,50 @@ export const getPCR007Config = ($this) => {
bodyFillType: 'preFill',
},
{
- label: 'template.pcr.pcr005.ypcsnd',
- prop: 'ypcsnd',
- width: 280,
- showWidth: 180,
- fillType: 'preFill',
- headerSelectKey: 'ypcsndUnit',
- headerOptions: $this.getDictOptions('business_nddw'),
- bodyType: 'inputNumber',
- bodyFillType: 'preFill',
- bodyMaxlength: 10,
- },
- {
- label: 'template.pcr.pcr005.sxbs',
- prop: 'sxbs',
- width: 280,
- showWidth: 180,
- fillType: 'preFill',
- bodyType: 'inputNumber',
- bodyFillType: 'preFill',
- bodyMaxlength: 10,
- },
- {
- label: 'template.pcr.pcr005.ysypxytj',
- prop: 'ysypxytj',
+ label: 'template.pcr.pcr007.cyqypgsjyjtjtj',
+ prop: 'cyqypgsjyjtjtj',
width: 280,
showWidth: 180,
fillType: 'preFill',
- headerSelectKey: 'ysypxytjUnit',
+ headerSelectKey: 'cyqypgsjyjtjtjUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10,
},
{
- label: 'template.pcr.pcr005.sjypxytj',
- prop: 'sjypxytj',
+ label: 'template.pcr.pcr007.cyqypgsjsjtjtj',
+ prop: 'cyqypgsjsjtjtj',
width: 280,
showWidth: 180,
fillType: 'preFill',
- headerSelectKey: 'sjypxytjUnit',
+ headerSelectKey: 'cyqypgsjsjtjtjUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
+ copyFrom: 'cyqypgsjyjtjtj', //复制哪个字段
bodyMaxlength: 10,
},
{
- label: 'template.pcr.pcr005.ysxsyxytj',
- prop: 'ysxsyxytj',
- width: 280,
- showWidth: 180,
- fillType: 'preFill',
- headerSelectKey: 'ysxsyxytjUnit',
- headerOptions: $this.getDictOptions('business_tjdw'),
- bodyDisabled: true,
- bodyType: 'inputNumber',
- bodyFillType: 'preFill',
- bodyMaxlength: 10,
- bodySubType: 'inputNumber',
- bodySubKey: 'actSolutionVolumePrecision',
- subPrecision: 0,
- bodyFillType: 'preFill',
- bodySubFillType: 'preFill',
- showBodySub: $this.fillType === 'preFill',
- bodyPrecisionKey: 0,
- bodyMaxlength: 10,
- bodySubPlaceholder: 'template.common.xswsPlaceholder',
- },
- {
- label: 'template.pcr.pcr005.sjxsyxytj',
- prop: 'sjxsyxytj',
+ label: 'template.pcr.pcr007.cygzl',
+ prop: 'cygzl',
width: 280,
showWidth: 180,
fillType: 'preFill',
- headerSelectKey: 'sjxsyxytjUnit',
+ headerSelectKey: 'cygzlUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
+ bodySubType: 'button',
+ bodySubButtonName: 'form.hqz',
bodyMaxlength: 10,
- },
- {
- label: 'template.pcr.pcr005.ypznd',
- prop: 'ypznd',
- width: 280,
- showWidth: 180,
- fillType: 'preFill',
- headerSelectKey: 'ypzndUnit',
- headerOptions: $this.getDictOptions('business_nddw'),
- bodyDisabled: true,
- bodyType: 'inputNumber',
- bodyFillType: 'preFill',
- bodyMaxlength: 10,
- bodySubType: 'inputNumber',
bodySubKey: 'targetDiluentVolumePrecision',
bodyPrecisionKey: 'targetDiluentVolumePrecision',
- bodySubFillType: 'preFill',
+ bodySubFillType: 'actFill',
subPrecision: 0,
- showBodySub: $this.fillType === 'preFill',
+ showBodySub: $this.fillType === 'actFill',
bodyMaxlength: 10,
bodySubPlaceholder: 'template.common.xswsPlaceholder',
- },
+ }
]
}
\ No newline at end of file
From 7e6f74cd7453c98c2167f4db3175a74b022c621d Mon Sep 17 00:00:00 2001
From: memorylkf <312904636@qq.com>
Date: Tue, 3 Mar 2026 18:06:49 +0800
Subject: [PATCH 10/12] =?UTF-8?q?feat:=20[=E6=AD=A5=E9=AA=A4=E7=AE=A1?=
=?UTF-8?q?=E7=90=86]=20=E6=96=B0=E5=A2=9E=E7=94=9F=E7=89=A9=E6=A0=B7?=
=?UTF-8?q?=E5=93=81=E5=88=86=E6=9E=90=E6=AD=A5=E9=AA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Template/Step.vue | 41 ++++++++-
src/components/Template/StepComponents/ry/fy.vue | 2 +-
src/components/Template/StepComponents/ry/jd.vue | 102 ++++++++++++++++++++-
src/components/Template/StepComponents/ry/lx.vue | 4 +-
.../Template/StepComponents/swypfx/hhspe.vue | 91 ++++++++++++++++++
.../Template/StepComponents/swypfx/jryp.vue | 67 ++++++++++++++
.../Template/StepComponents/swypfx/zyfc.vue | 79 ++++++++++++++++
7 files changed, 380 insertions(+), 6 deletions(-)
create mode 100644 src/components/Template/StepComponents/swypfx/hhspe.vue
create mode 100644 src/components/Template/StepComponents/swypfx/jryp.vue
create mode 100644 src/components/Template/StepComponents/swypfx/zyfc.vue
diff --git a/src/components/Template/Step.vue b/src/components/Template/Step.vue
index 8f274e4..8328014 100644
--- a/src/components/Template/Step.vue
+++ b/src/components/Template/Step.vue
@@ -103,6 +103,24 @@ import cl from './StepComponents/b/cl.vue';//表配置-称量
//表配置-孵育:使用溶液-孵育
//表配置-复溶:使用溶液-复溶
+
+//生物样品分析
+//生物样品分析-解冻:使用溶液-解冻
+//生物样品分析-涡旋混匀:使用溶液-涡旋混匀
+//生物样品分析-选择容器:使用溶液-选择容器
+import jryp from './StepComponents/swypfx/jryp.vue';//生物样品分析-加入样品
+//生物样品分析-衍生反应:使用溶液-离心
+import hhspe from './StepComponents/swypfx/hhspe.vue';//生物样品分析-活化(SPE)
+//生物样品分析-平衡(SPE):使用溶液-活化(SPE)
+//生物样品分析-上样(SPE):使用溶液-活化(SPE)
+//生物样品分析-淋洗(SPE):使用溶液-活化(SPE)
+//生物样品分析-洗脱(SPE):使用溶液-活化(SPE)
+import zyfc from './StepComponents/swypfx/zyfc.vue';//生物样品分析-转移(分层)
+//生物样品分析-氮吹:使用溶液-氮吹
+//生物样品分析-正压:使用溶液-正压
+//生物样品分析-孵育:使用溶液-孵育
+//生物样品分析-复溶:使用溶液-复溶
+
import { public_templateStepList } from '@/api/business/public/public';
@@ -223,6 +241,11 @@ export default {
//表配置
jrry_b,
cl,
+
+ //生物样品分析
+ jryp,
+ hhspe,
+ zyfc
},
computed: {
stepComponentMap() {
@@ -280,8 +303,8 @@ export default {
//标配配置
'jrry_b': 'jrry_b',
'cl': 'cl',
- 'lx_b': 'lx',
- 'cs_b': 'cs',
+ 'lx_b': 'Lx',
+ 'cs_b': 'Cs',
'hwhy_b': 'Hwhy',
'zyhy_b': 'Zyhy',
'wxhy_b': 'Wxhy',
@@ -298,6 +321,19 @@ export default {
'jd_b': 'Jd',
'fy_b': 'Fy',
'fr_b': 'Fr',
+
+ //生物样品分析
+ 'jd_swypfx': 'Jd',
+ 'jryp': 'jryp',
+ 'ysfy': 'Lx',
+ 'hhspe': 'hhspe',
+
+ 'phspe': 'hhspe',
+ 'syspe': 'hhspe',
+ 'lxspe': 'hhspe',
+ 'xtspe': 'hhspe',
+ 'zyfc': 'zyfc',
+
}
}
return this.componentMap
@@ -339,6 +375,7 @@ export default {
},
methods: {
getStepList(){
+ debugger
public_templateStepList({templateId:this.templateData.templateId}).then(response => {
let options = []
_.forEach(response.data,(item)=>{
diff --git a/src/components/Template/StepComponents/ry/fy.vue b/src/components/Template/StepComponents/ry/fy.vue
index da8de0a..e893c5f 100644
--- a/src/components/Template/StepComponents/ry/fy.vue
+++ b/src/components/Template/StepComponents/ry/fy.vue
@@ -40,7 +40,7 @@ export default {
fillType: "preFill",
},
text3: {
- label: "实际条件为",
+ label: "实际设置条件为",
type: "text",
},
sjtj: {
diff --git a/src/components/Template/StepComponents/ry/jd.vue b/src/components/Template/StepComponents/ry/jd.vue
index 40b1ca1..f9fc081 100644
--- a/src/components/Template/StepComponents/ry/jd.vue
+++ b/src/components/Template/StepComponents/ry/jd.vue
@@ -21,7 +21,107 @@ export default {
},
computed: {
formConfig() {
- let config = [{
+ let config = this.sn==='jd_swypfx'?
+ [{
+ config: {
+ text1: {
+ label: "将上述样品预计放置于",
+ type: "text",
+ },
+ ccwz: {
+ type: "select",
+ options: this.getDictOptions("business_ccwz"),
+ fillType: "preFill",
+ otherCode: "ccwzOther",
+ },
+ text3: {
+ label: "实际放置于",
+ type: "text",
+ },
+ sjccwz: {
+ type: "select",
+ options: this.getDictOptions("business_ccwz"),
+ fillType: "actFill",
+ otherCode: "sjccwzOther",
+ compareTo: "ccwz",
+ },
+ text4: {
+ label: "位置,其环境条件预计为",
+ type: "text",
+ },
+ yjwd: {
+ type: "select",
+ options: this.getDictOptions("business_wddw"),
+ fillType: "preFill",
+ otherCode: "yjwdOther",
+ },
+ yjhj: {
+ type: "select",
+ options: this.getDictOptions("business_hjxx"),
+ fillType: "preFill",
+ otherCode: "yjhjOther",
+ },
+ text5: {
+ label: ",实际条件为",
+ type: "text",
+ },
+ sjwd: {
+ type: "select",
+ options: this.getDictOptions("business_wddw"),
+ fillType: "actFill",
+ otherCode: "sjwdOther",
+ compareTo: "yjwd",
+ },
+ sjhj: {
+ type: "select",
+ options: this.getDictOptions("business_hjxx"),
+ fillType: "actFill",
+ otherCode: "sjhjOther",
+ compareTo: "yjhj",
+ },
+ text6: {
+ label: ",放置",
+ type: "text",
+ },
+ sr1:{
+ type: "input",
+ fillType: "preFill",
+ },
+ text7:{
+ type:"text",
+ label:",解冻",
+ },
+ startDate: {
+ type: "input",
+ fillType: "actFill",
+ disabled: true,
+ },
+ button1:{
+ type:"button",
+ buttonName:"开始",
+ },
+ text8:{
+ type:"text",
+ label:",解冻",
+ },
+ endDate: {
+ type: "input",
+ fillType: "actFill",
+ disabled: true,
+ },
+ button2:{
+ type:"button",
+ buttonName:"结束",
+ },
+ text9: {
+ type: "text",
+ label: "。",
+ },
+
+
+ }
+ }]:
+ [{
config: {
text1: {
label: "将",
diff --git a/src/components/Template/StepComponents/ry/lx.vue b/src/components/Template/StepComponents/ry/lx.vue
index 4bb113d..86e0fa9 100644
--- a/src/components/Template/StepComponents/ry/lx.vue
+++ b/src/components/Template/StepComponents/ry/lx.vue
@@ -23,7 +23,7 @@ export default {
let config = [{
config: {
text1: {
- label: "使用离心机",
+ label: this.sn==='ysfy'?"使用恒温混匀仪":"使用离心机",
type: "text",
},
yq: {
@@ -110,7 +110,7 @@ export default {
fillType: "preFill",
},
text8: {
- label: ",进行离心。离心",
+ label: this.sn==='ysfy'?",进行衍生反应,反应":",进行离心。离心",
type: "text",
},
startDate: {
diff --git a/src/components/Template/StepComponents/swypfx/hhspe.vue b/src/components/Template/StepComponents/swypfx/hhspe.vue
new file mode 100644
index 0000000..b6d686e
--- /dev/null
+++ b/src/components/Template/StepComponents/swypfx/hhspe.vue
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Template/StepComponents/swypfx/jryp.vue b/src/components/Template/StepComponents/swypfx/jryp.vue
new file mode 100644
index 0000000..8d9ada2
--- /dev/null
+++ b/src/components/Template/StepComponents/swypfx/jryp.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Template/StepComponents/swypfx/zyfc.vue b/src/components/Template/StepComponents/swypfx/zyfc.vue
new file mode 100644
index 0000000..016a9c5
--- /dev/null
+++ b/src/components/Template/StepComponents/swypfx/zyfc.vue
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
From e3bf06c323daff8b4420dc30554978427767c3ac Mon Sep 17 00:00:00 2001
From: luojie <125330818@qq.com>
Date: Tue, 3 Mar 2026 22:09:08 +0800
Subject: [PATCH 11/12] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1?=
=?UTF-8?q?=E7=90=86][checkbox-tree]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Template/HandleFormItem.vue | 322 +++++++++++----------
src/components/Template/Step.vue | 2 +-
src/components/Template/StepFormPackage.vue | 12 +-
src/utils/index.js | 19 +-
.../template/dialog/SelectMixReagentDialog.vue | 1 -
5 files changed, 200 insertions(+), 156 deletions(-)
diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue
index d1ca91a..ca72044 100644
--- a/src/components/Template/HandleFormItem.vue
+++ b/src/components/Template/HandleFormItem.vue
@@ -42,8 +42,9 @@
+ :class="{ 'error-border': isOtherInputError(option.otherCode) }"
+ :placeholder="option.otherPlaceholder || '请输入'"
+ @blur="onCheckboxListOtherBlur($event, option.otherCode)" />
@@ -51,28 +52,23 @@
-
{{ group.label }}
@@ -117,7 +113,8 @@
支持扩展名:.rar .zip .doc .docx .pdf .jpg,文件大小不超过2MB
-
+
+ @blur="onTagBlur(tagIndex)" @keyup.enter.native="onTagBlur(tagIndex)" placeholder="请输入"
+ size="mini" class="tag-input" />
{{ tag.tagValue }}
@@ -140,13 +137,16 @@
-
+
是
-
+
是否在规定时间完成
-
+
@@ -227,7 +227,7 @@ import moment from "moment";
import { deepClone } from "@/utils/index";
import { getuuid } from "@/utils/index.js";
import { getToken } from "@/utils/auth"
-import { isValueEmpty } from '@/utils/index.js';
+import { isValueEmpty, getDefaultValueByOptions } from '@/utils/index.js';
export default {
inject: ['templateData', 'templateFillType', "getZdxgjl", "getFhyjjl", "updateZdxgjl", "replaceFhyjjl", "updateFhyjjl", "getFieldCheckObj", "updateFieldCheckObj"],
@@ -286,14 +286,15 @@ export default {
},
data() {
let initialValue = this.value;
+ console.log(this.value, "check value");
let initialOtherValues = {}, checkboxTagList = [];
- if(this.type === 'checkboxList' && !this.value) {
+ if (this.type === 'checkboxList' && !this.value) {
initialValue = {
checkboxValues: [],
otherValues: {}
};
-
+
} else if (this.type === 'checkboxTag' && Array.isArray(this.value)) {
// checkboxTag类型,value是数组格式
checkboxTagList = this.value.map(tag => ({
@@ -301,11 +302,14 @@ export default {
tagValue: tag.tagValue || ''
}));
} else if (this.type === 'fqyq' && !this.value) {
- initialValue = {mainRadio: '', subRadio: '',inputValue:""};
+ initialValue = { mainRadio: '', subRadio: '', inputValue: "" };
+ } else if (this.type === 'checkboxTree' && !this.value) {
+ const defaultCheckedValue = getDefaultValueByOptions(this.item.options || []);
+ initialValue = { checkedValues: defaultCheckedValue, otherValues: {} };
}
return {
inputValue: initialValue,
- oldValue: initialValue, // 记录上一次的值
+ oldValue: typeof initialValue === 'object' ? JSON.parse(JSON.stringify(initialValue)) : initialValue, // 记录上一次的值
showModal: false, // 控制模态框显示
modificationRecords: [], // 存储修改记录
modalTimer: null, // 用于延迟隐藏模态框
@@ -318,12 +322,9 @@ export default {
checkboxTagList: checkboxTagList, // checkboxTag类型的列表数据
oldCheckboxTagList: JSON.parse(JSON.stringify(checkboxTagList)), // 记录上一次的checkboxTagList
fqyqValue: initialValue, // fqyq类型的值
- oldFqyqValue: {...initialValue}, // 记录上一次的fqyq值
+ oldFqyqValue: { ...initialValue }, // 记录上一次的fqyq值
checkboxListValue: initialValue, // checkboxList类型的值
oldCheckboxListValue: JSON.parse(JSON.stringify(initialValue)), // 记录上一次的checkboxList值
- checkboxTreeValue: this.type === 'checkboxTree' ? (this.value || { checkedValues: [], otherValues: {} }) : {}, // checkboxTree类型的值
- oldCheckboxTreeValue: this.type === 'checkboxTree' ? JSON.parse(JSON.stringify(this.value || { checkedValues: [], otherValues: {} })) : {}, // 记录上一次的checkboxTree值
- checkboxTreeFirstCheck: this.type === 'checkboxTree' ? {} : {}, // 记录第一次勾选的状态
uuid: getuuid(), // 唯一标识符,用于EventBus事件匹配
regentType: ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq', 'jcb', 'qxbd'], //试剂/仪器/供试品等类型
selectRegentInfo: {},//选择的试剂/仪器/供试品等信息
@@ -334,14 +335,16 @@ export default {
},
pendingUploadFile: null, // 用于存储待上传的文件
pendingRemoveFile: null, // 用于存储待删除的文件
- currentTagIndex:-1,//当前选中的checkboxTag索引
- currentHandleType:'',//当前操作的类型
- currentOtherCode:'',//当前操作的otherCode
+ currentTagIndex: -1,//当前选中的checkboxTag索引
+ currentHandleType: '',//当前操作的类型
+ currentOtherCode: '',//当前操作的otherCode
currentCheckboxTreeValue: '',//当前操作的checkboxTree值
}
},
watch: {
value(newVal) {
+ console.log(newVal, "newVal")
+
if (this.type === 'checkboxList' && newVal && typeof newVal === 'object') {
this.checkboxListValue = JSON.parse(JSON.stringify(newVal));
} else if (this.type === 'checkboxTag' && Array.isArray(newVal)) {
@@ -357,12 +360,8 @@ export default {
inputValue: newVal.inputValue || '',
subRadio: newVal.subRadio || ''
};
- } else if (this.type === 'checkboxTree' && newVal && typeof newVal === 'object') {
- // checkboxTree类型
- this.checkboxTreeValue = JSON.parse(JSON.stringify(newVal));
- this.oldCheckboxTreeValue = JSON.parse(JSON.stringify(newVal));
} else {
- this.inputValue = newVal;
+ this.inputValue = typeof newVal === 'object' ? JSON.parse(JSON.stringify(newVal)) : newVal;
}
}
},
@@ -398,7 +397,7 @@ export default {
},
methods: {
getFlexClass() {
- const noFlexArr = ["radio", "checkboxTag","fqyq"]
+ const noFlexArr = ["radio", "checkboxTag", "fqyq"]
return noFlexArr.includes(this.type) ? '' : 'flex1'
},
getDecimalDigits() {
@@ -636,7 +635,7 @@ export default {
};
if (type === "mix") {
params.mixType = true;
- }else if(item.qxbdType){
+ } else if (item.qxbdType) {
params.qxbdType = item.qxbdType;
}
}
@@ -719,7 +718,7 @@ export default {
},
getFillTypeStyle(type) {
const { fillType } = this.item;
- const filterType = ["attachment","checkboxTag","fqyq","checkboxTree"]
+ const filterType = ["attachment", "checkboxTag", "fqyq", "checkboxTree"]
const typeObj = {
actFill: "orange-border",//实际填写的边框颜色
green: "green-border",
@@ -861,7 +860,7 @@ export default {
},
// 检查是否显示显示checkboxList的其他输入框
isShowCheckboxListOther(option) {
- const {checkboxValues } = this.checkboxListValue
+ const { checkboxValues } = this.checkboxListValue
if (!checkboxValues) {
return false;
}
@@ -920,80 +919,85 @@ export default {
this.checkboxListValue.otherValues[otherCode] = e.target.value;
this.onCommonHandleSaveRecord(e.target.value);
},
-
+
// 检查checkboxTree的某个值是否被选中
isCheckboxTreeChecked(value) {
- return this.checkboxTreeValue.checkedValues && this.checkboxTreeValue.checkedValues.includes(value);
+ if (!this.inputValue || !this.inputValue.checkedValues) {
+ return false;
+ }
+ const checkedItem = this.inputValue.checkedValues.find(item => item.label === value);
+ return checkedItem && checkedItem.checked;
},
-
+
// 检查checkboxTree的其他输入框是否有错误
isCheckboxTreeOtherInputError(value) {
if (!this.error) {
return false;
}
- return isValueEmpty(this.checkboxTreeValue.otherValues[value]);
+ return isValueEmpty(this.inputValue.otherValues[value]);
},
-
+
+ // 获取checkboxTree的选中值
+ getCheckboxTreeChecked(value) {
+ const { checkedValues } = this.inputValue
+ const o = checkedValues.find(item => item.label === value) || {};
+ return !!o.checked;
+ },
+
// checkboxTree的复选框变化处理
onCheckboxTreeChange(value, checked) {
- this.currentHandleType = 'checkboxTree';
+ this.currentHandleType = 'checkboxTreeCheckbox';
this.currentCheckboxTreeValue = value;
-
- // 初始化checkedValues数组
- if (!this.checkboxTreeValue.checkedValues) {
- this.checkboxTreeValue.checkedValues = [];
- }
-
- // 初始化otherValues对象
- if (!this.checkboxTreeValue.otherValues) {
- this.checkboxTreeValue.otherValues = {};
- }
-
- // 处理选中状态
+ // 查找或创建对应的checkedValues项
+ let checkedItem = this.inputValue.checkedValues.find(item => item.label === value);
+
if (checked) {
- if (!this.checkboxTreeValue.checkedValues.includes(value)) {
- this.checkboxTreeValue.checkedValues.push(value);
- }
+ checkedItem.checked = true;
+ // 如果勾选子级,默认勾选父级
+ this.checkParentIfNeeded(value);
} else {
- const index = this.checkboxTreeValue.checkedValues.indexOf(value);
- if (index > -1) {
- this.checkboxTreeValue.checkedValues.splice(index, 1);
- // 清除对应的otherValues
- delete this.checkboxTreeValue.otherValues[value];
- }
+ // 如果取消勾选,移除该项或设置为false
+ checkedItem.checked = false;
+ // 清除对应的otherValues
+ delete this.inputValue.otherValues[value];
}
-
- // 检查是否是第一次勾选
- const isFirstCheck = !this.checkboxTreeFirstCheck[value];
- if (isFirstCheck) {
- this.checkboxTreeFirstCheck[value] = true;
- // 第一次勾选不需要验签
- this.emitCheckboxTreeValue();
- this.updateCheckboxTreeOldValue();
- } else {
- // 非第一次勾选需要验签
- this.onCommonHandleSaveRecord();
+ this.onCommonHandleSaveRecord();
+ },
+
+ // 如果勾选子级,默认勾选父级
+ checkParentIfNeeded(childValue) {
+ // 遍历所有选项组,找到子级对应的父级
+ if (this.item && this.item.options) {
+ for (const group of this.item.options) {
+ if (group.children && group.children.length > 0) {
+ // 检查当前childValue是否在这个group的children中
+ const childExists = group.children.some(child => child.value === childValue);
+ if (childExists) {
+ // 找到父级,确保父级被勾选
+ let parentItem = this.inputValue.checkedValues.find(item => item.label === group.value);
+ if (!parentItem) {
+ // 父级不存在,添加父级
+ parentItem = { label: group.value, checked: true };
+ this.inputValue.checkedValues.push(parentItem);
+ } else if (!parentItem.checked) {
+ // 父级存在但未勾选,设置为勾选
+ parentItem.checked = true;
+ }
+ break;
+ }
+ }
+ }
}
},
-
+
// checkboxTree的其他输入框失去焦点处理
onCheckboxTreeOtherBlur(value, e) {
this.currentHandleType = "checkboxTreeOther";
this.currentCheckboxTreeValue = value;
- this.checkboxTreeValue.otherValues[value] = e.target.value;
+ this.inputValue.otherValues[value] = e.target.value;
this.onCommonHandleSaveRecord(e.target.value);
},
-
- // 发送checkboxTree的值
- emitCheckboxTreeValue() {
- this.$emit('input', JSON.parse(JSON.stringify(this.checkboxTreeValue)));
- this.$emit('change', JSON.parse(JSON.stringify(this.checkboxTreeValue)));
- },
-
- // 更新checkboxTree的旧值
- updateCheckboxTreeOldValue() {
- this.oldCheckboxTreeValue = JSON.parse(JSON.stringify(this.checkboxTreeValue));
- },
+
// 点击question图标
onClickQuestion() {
const { templateFillType } = this;
@@ -1022,25 +1026,37 @@ export default {
this.visible = true;
}
},
- getCheckboxListInfo(){
- const { otherValues,checkboxValues } = this.checkboxListValue;
- const { otherValues: oldOtherValues,checkboxValues: oldCheckboxValues } = this.oldCheckboxListValue;
+ getCheckboxListInfo() {
+ const { otherValues, checkboxValues } = this.checkboxListValue;
+ const { otherValues: oldOtherValues, checkboxValues: oldCheckboxValues } = this.oldCheckboxListValue;
const o = {
- "checkboxListValue":{oldValue:oldCheckboxValues,newValue:checkboxValues,des:""},
- "checkboxListOther":{oldValue:oldOtherValues[this.currentOtherCode],newValue:otherValues[this.currentOtherCode],des:"样品信息:"},
+ "checkboxListValue": { oldValue: oldCheckboxValues, newValue: checkboxValues, des: "" },
+ "checkboxListOther": { oldValue: oldOtherValues[this.currentOtherCode], newValue: otherValues[this.currentOtherCode], des: "样品信息:" },
}
return o[this.currentHandleType];
},
- getFqyqInfo(){
- const { mainRadio,inputValue,subRadio } = this.fqyqValue;
- const { mainRadio: oldMainRadio,inputValue: oldInputValue,subRadio: oldSubRadio } = this.oldFqyqValue;
- const o ={
- "mainRadio":{oldValue:oldMainRadio,newValue:mainRadio,des:""},
- "inputValue":{oldValue:oldInputValue,newValue:inputValue,des:""},
- "subRadio":{oldValue:oldSubRadio,newValue:subRadio,des:"是否在规定时间完成:"}
+ getFqyqInfo() {
+ const { mainRadio, inputValue, subRadio } = this.fqyqValue;
+ const { mainRadio: oldMainRadio, inputValue: oldInputValue, subRadio: oldSubRadio } = this.oldFqyqValue;
+ const o = {
+ "mainRadio": { oldValue: oldMainRadio, newValue: mainRadio, des: "" },
+ "inputValue": { oldValue: oldInputValue, newValue: inputValue, des: "" },
+ "subRadio": { oldValue: oldSubRadio, newValue: subRadio, des: "是否在规定时间完成:" }
}
return o[this.currentHandleType];
},
+ getCheckboxTreeInfo() {
+ const { checkedValues, otherValues } = this.inputValue;
+ const { checkedValues: oldCheckedValues, otherValues: oldOtherValues } = this.oldValue;
+ const { currentHandleType, currentCheckboxTreeValue } = this;
+ const newItem = checkedValues.find(item => item.label === currentCheckboxTreeValue);
+ const oldItem = oldCheckedValues.find(item => item.label === currentCheckboxTreeValue);
+ const o = {
+ "checkboxTreeCheckbox": { oldValue: oldItem, newValue: newItem, des: "" },
+ "checkboxTreeOther": { oldValue: oldOtherValues[currentCheckboxTreeValue], newValue: otherValues[currentCheckboxTreeValue], des: "样品信息:" },
+ }
+ return o[currentHandleType];
+ },
async onCommonHandleSaveRecord(val) {
const isEmpty = isValueEmpty(this.inputValue);
if (this.error && !isEmpty) {
@@ -1084,14 +1100,13 @@ export default {
this.$emit("change", this.inputValue);
return;
}
-
// 值发生了变化,需要弹出密码输入框
let isSame = true, isOldValueEmpty = true;
const { currentHandleType } = this;
// 如果是checkboxList类型,需要同时比较otherValues
if (this.type === 'checkboxList') {
const current = this.getCheckboxListInfo();
- isSame = this.isEqual(current.oldValue,current.newValue);
+ isSame = this.isEqual(current.oldValue, current.newValue);
isOldValueEmpty = isValueEmpty(current.oldValue);
} else if (this.type === "checkboxTag") {
// checkboxTag类型,只比较当前tagIndex的数据
@@ -1101,17 +1116,25 @@ export default {
isOldValueEmpty = isValueEmpty(oldTag.checked);
} else if (this.type === "fqyq") {
const current = this.getFqyqInfo();
- isSame = this.isEqual(current.oldValue,current.newValue);
+ isSame = this.isEqual(current.oldValue, current.newValue);
isOldValueEmpty = isValueEmpty(current.oldValue);
} else if (this.type === "checkboxTree") {
- // checkboxTree类型,比较checkedValues
- isSame = this.isEqual(this.oldCheckboxTreeValue.checkedValues, this.checkboxTreeValue.checkedValues);
- isOldValueEmpty = isValueEmpty(this.oldCheckboxTreeValue.checkedValues);
+ const current = this.getCheckboxTreeInfo();
+ const { oldValue, newValue } = current;
+ if (this.currentHandleType === "checkboxTreeCheckbox") {
+ isSame = this.isEqual(oldValue.checked, newValue.checked);
+ isOldValueEmpty = isValueEmpty(oldValue.checked);
+ } else {
+ isSame = this.isEqual(current.oldValue, current.newValue);
+ isOldValueEmpty = isValueEmpty(current.oldValue);
+ }
+
+
} else {
isSame = this.isEqual(this.oldValue, this.inputValue)
isOldValueEmpty = isValueEmpty(this.oldValue);
}
- console.log(isSame,isOldValueEmpty,this.fqyqValue,this.oldFqyqValue,"isSame")
+ console.log(isSame, isOldValueEmpty, this.currentCheckboxTreeValue, this.oldValue, this.inputValue, "isSame")
if (isSame) {
return;
}
@@ -1147,18 +1170,11 @@ export default {
// 如果没有指定字段,回退整个对象
this.fqyqValue = JSON.parse(JSON.stringify(this.oldFqyqValue));
oldValue = { ...this.fqyqValue };
- } else if (this.type === "checkboxTree") {
- // checkboxTree类型,回退整个对象
- this.checkboxTreeValue = JSON.parse(JSON.stringify(this.oldCheckboxTreeValue));
- oldValue = JSON.parse(JSON.stringify(this.oldCheckboxTreeValue));
}
- this.inputValue = this.oldValue;
+ this.inputValue = typeof oldValue === 'object' ? JSON.parse(JSON.stringify(oldValue)) : oldValue;
this.$emit('input', oldValue); // 触发 v-model 更新
// this.$emit("blur", this.oldValue);
this.$emit("change", oldValue, "cancel");
- if (this.item.type === "clickable") {
- this.$emit("resetRecord");
- }
},
//处理更新记录
@@ -1181,22 +1197,27 @@ export default {
isModify = oldTag.checked !== undefined;
} else if (this.type === "fqyq") {
const current = this.getFqyqInfo();
- recordOldVlaue = `${current.des+current.oldValue}`;
- recordValue = `${current.des+current.newValue}`;
- isModify = !!this.oldFqyqValue.mainRadio
- }else if(this.type === "checkboxList"){
+ recordOldVlaue = `${current.des + current.oldValue}`;
+ recordValue = `${current.des + current.newValue}`;
+ isModify = !!this.oldFqyqValue.mainRadio
+ } else if (this.type === "checkboxList") {
const current = this.getCheckboxListInfo();
- recordOldVlaue = `${current.des+(current.oldValue || '')}`;
- recordValue = `${current.des+(current.newValue || '')}`;
+ recordOldVlaue = `${current.des + (current.oldValue || '')}`;
+ recordValue = `${current.des + (current.newValue || '')}`;
isModify = !!current.oldValue;
} else if (this.type === "checkboxTree") {
// checkboxTree类型,记录当前操作的值变化
- const value = this.currentCheckboxTreeValue;
- const oldChecked = this.oldCheckboxTreeValue.checkedValues && this.oldCheckboxTreeValue.checkedValues.includes(value);
- const currentChecked = this.checkboxTreeValue.checkedValues && this.checkboxTreeValue.checkedValues.includes(value);
- recordOldVlaue = `${value}:${oldChecked ? '勾选' : '未勾选'}`;
- recordValue = `${value}:${currentChecked ? '勾选' : '未勾选'}`;
- isModify = oldChecked !== undefined;
+ const current = this.getCheckboxTreeInfo();
+ if (this.currentHandleType === "checkboxTreeCheckbox") {
+ const { oldValue, newValue } = current;
+ recordOldVlaue = `${oldValue.label || ''}:${oldValue.checked ? '勾选' : '未勾选'}`;
+ recordValue = `${newValue.label || ''}:${newValue.checked ? '勾选' : '未勾选'}`;
+ isModify = newValue.checked !== undefined;
+ } else {
+ recordOldVlaue = current.oldValue;
+ recordValue = current.newValue;
+ isModify = !!current.oldValue;
+ }
}
const record = {
...baseInfo,
@@ -1229,9 +1250,6 @@ export default {
} else if (this.type === "fqyq") {
// 如果没有指定字段,更新整个对象
this.oldFqyqValue = JSON.parse(JSON.stringify(this.fqyqValue));
- } else if (this.type === "checkboxTree") {
- // checkboxTree类型,更新整个对象
- this.oldCheckboxTreeValue = JSON.parse(JSON.stringify(this.checkboxTreeValue));
}
let value = this.inputValue;
if (this.type === 'checkboxList') {
@@ -1243,8 +1261,6 @@ export default {
value = [...this.checkboxTagList];
} else if (this.type === "fqyq") {
value = { ...this.fqyqValue };
- } else if (this.type === "checkboxTree") {
- value = JSON.parse(JSON.stringify(this.checkboxTreeValue));
}
if (this.type === "button") {
this.$emit('clickButton', this.item, this.inputValue, data);
@@ -1253,7 +1269,7 @@ export default {
}
}
//用户输入密码并点击确定,保存修改
- this.oldValue = value; // 更新旧值
+ this.oldValue = typeof value === 'object' ? JSON.parse(JSON.stringify(value)) : value; // 更新旧值
this.$emit("blur", value);
this.$emit('input', value);
this.$emit("change", value, data ? "save" : "");
@@ -1891,6 +1907,7 @@ export default {
border-color: #f9c588;
}
}
+
.el-radio__inner {
border-color: #f9c588;
}
@@ -1948,28 +1965,39 @@ export default {
}
}
}
-.fqyq-input{
+
+.fqyq-input {
width: 500px;
- margin-right:10px;
+ margin-right: 10px;
}
-.mb-10{
+
+.mb-10 {
margin-bottom: 10px;
}
-.fs-14{
+
+.fs-14 {
font-size: 14px;
}
-.mr-10{
+
+.mr-10 {
margin-right: 10px;
}
-.checkbox-tree-children{
+
+.checkbox-tree-children {
margin-left: 30px;
- padding:16px 0;
+ padding: 16px 0;
gap: 16px;
display: grid;
grid-template-columns: repeat(4, 1fr);
}
-.checkbox-tree-item{
+.checkbox-tree-item {
box-sizing: border-box;
+ display: flex;
+ align-items: center;
+}
+.checkbox-tree-input-container{
+ margin-left: 10px;
+ width: 500px;
}
\ No newline at end of file
diff --git a/src/components/Template/Step.vue b/src/components/Template/Step.vue
index 8f274e4..328a47d 100644
--- a/src/components/Template/Step.vue
+++ b/src/components/Template/Step.vue
@@ -13,7 +13,7 @@
+ @update="onFormUpdate(index, $event)" :stepIndex = "index" :ref="'stepCompRef_' + index">