From 7ec97967197d3cf1ad347db944b459404b6eb029 Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Wed, 21 Jan 2026 16:44:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=20=E9=80=89=E6=8B=A9=E8=AF=95=E5=89=82=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=A1=A8=E5=8D=95id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Template/SelectTable.vue | 7 ++++++- .../template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue | 4 ++-- .../comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue | 4 ++-- .../template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue | 2 +- .../template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue | 4 ++-- .../template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue | 4 ++-- .../template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue | 4 ++-- .../template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue | 4 ++-- .../template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue | 4 ++-- .../template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue | 4 ++-- .../template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue | 4 ++-- .../comps/template/dialog/SelectReagentDialog.vue | 7 +++++-- .../comps/template/mixins/templateMixin.js | 22 ++++++++++++++-------- 13 files changed, 44 insertions(+), 30 deletions(-) diff --git a/src/components/Template/SelectTable.vue b/src/components/Template/SelectTable.vue index 3eb7097..b425c6c 100644 --- a/src/components/Template/SelectTable.vue +++ b/src/components/Template/SelectTable.vue @@ -66,7 +66,11 @@ export default { listApi:{ type: Function, default: () => {}, - } + }, + studyFormId: { + type: String, + default: "", + }, }, data() { return { @@ -106,6 +110,7 @@ export default { this.listParams[key] = ""; } this.listParams = {...this.listParams} + this.listParams.studyFormId = this.studyFormId || '' }, async getList() { const res = await this.listApi(this.listParams); diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue index d83a0c6..f9154ec 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYDB.vue @@ -268,7 +268,7 @@ export default { handleJzClickable(obj){ this.reagentType = 1//本表单特殊字段 this.currentSubKey = obj.subKey; - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) }, //选择试剂提交事件 onSelectReagentSubmit(code,row){ @@ -291,7 +291,7 @@ export default { console.log("clickable",rowIndex, col) if(col.prop === "sjry"){ //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) } }, //获取目标溶液编号 diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue index be2ac2e..f6962bc 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue @@ -268,7 +268,7 @@ export default { handleJzClickable(obj){ this.reagentType = 1//本表单特殊字段 this.currentSubKey = obj.subKey; - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) }, //选择试剂提交事件 onSelectReagentSubmit(code,row){ @@ -291,7 +291,7 @@ export default { console.log("clickable",rowIndex, col) if(col.prop === "sjry"){ //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) } }, //获取目标溶液编号 diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue index b26716b..db0ddea 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue @@ -279,7 +279,7 @@ export default { console.log("clickable",rowIndex, col) if(col.prop === "sjry" || col.prop === "kbjzbh"){ //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) } }, //获取目标溶液编号 diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue index a652321..c8cc6db 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/QXWDX.vue @@ -268,7 +268,7 @@ export default { handleJzClickable(obj){ this.reagentType = 1//本表单特殊字段 this.currentSubKey = obj.subKey; - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) }, //选择试剂提交事件 onSelectReagentSubmit(code,row){ @@ -291,7 +291,7 @@ export default { console.log("clickable",rowIndex, col) if(col.prop === "sjry"){ //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) } }, //获取目标溶液编号 diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue index 51c5dfb..962866d 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue @@ -268,7 +268,7 @@ export default { handleJzClickable(obj){ this.reagentType = 1//本表单特殊字段 this.currentSubKey = obj.subKey; - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) }, //选择试剂提交事件 onSelectReagentSubmit(code,row){ @@ -291,7 +291,7 @@ export default { console.log("clickable",rowIndex, col) if(col.prop === "sjry"){ //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) } }, //获取目标溶液编号 diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue index f9379de..231fda8 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue @@ -301,12 +301,12 @@ export default { handleJzClickable(obj) { this.reagentType = 1//本表单特殊字段 this.currentSubKey = obj.subKey; - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) }, handleRongyeClickable(obj) { this.reagentType = 2//本表单特殊字段 this.currentSubKey = obj.subKey; - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) }, //选择试剂提交事件 onSelectReagentSubmit(code, row) { diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue index 6bdf436..5350236 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XSKKX.vue @@ -268,7 +268,7 @@ export default { handleJzClickable(obj){ this.reagentType = 1//本表单特殊字段 this.currentSubKey = obj.subKey; - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) }, //选择试剂提交事件 onSelectReagentSubmit(code,row){ @@ -291,7 +291,7 @@ export default { console.log("clickable",rowIndex, col) if(col.prop === "sjry"){ //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) } }, //获取目标溶液编号 diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue index d21a8e0..0cac362 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue @@ -268,7 +268,7 @@ export default { handleJzClickable(obj){ this.reagentType = 1//本表单特殊字段 this.currentSubKey = obj.subKey; - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) }, //选择试剂提交事件 onSelectReagentSubmit(code,row){ @@ -291,7 +291,7 @@ export default { console.log("clickable",rowIndex, col) if(col.prop === "sjry"){ //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) } }, //获取目标溶液编号 diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue index 28dea0d..b51085d 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue @@ -268,7 +268,7 @@ export default { handleJzClickable(obj){ this.reagentType = 1//本表单特殊字段 this.currentSubKey = obj.subKey; - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) }, //选择试剂提交事件 onSelectReagentSubmit(code,row){ @@ -291,7 +291,7 @@ export default { console.log("clickable",rowIndex, col) if(col.prop === "sjry"){ //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) } }, //获取目标溶液编号 diff --git a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue index 12e7f87..6e9b1c4 100644 --- a/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue +++ b/src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue @@ -268,7 +268,7 @@ export default { handleJzClickable(obj){ this.reagentType = 1//本表单特殊字段 this.currentSubKey = obj.subKey; - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) }, //选择试剂提交事件 onSelectReagentSubmit(code,row){ @@ -291,7 +291,7 @@ export default { console.log("clickable",rowIndex, col) if(col.prop === "sjry"){ //调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 - this.$refs.selectReagentDialogRef.show() + this.$refs.selectReagentDialogRef.show(this.formData.id) } }, //获取目标溶液编号 diff --git a/src/views/business/comps/template/dialog/SelectReagentDialog.vue b/src/views/business/comps/template/dialog/SelectReagentDialog.vue index ba36ea6..a98688e 100644 --- a/src/views/business/comps/template/dialog/SelectReagentDialog.vue +++ b/src/views/business/comps/template/dialog/SelectReagentDialog.vue @@ -14,6 +14,7 @@ @@ -106,6 +107,7 @@ export default { bzList:[], depart:"", + studyFormId:''//有个studyFormId需要从外面动态传过来 } }, computed: { @@ -127,15 +129,16 @@ export default { } }, methods: { - show(){ + show(studyFormId){ this.visible = true + this.studyFormId = studyFormId this.showTableData() if(this.type === 'MJYLQSQD'){ this.getBzList() } }, getBzList(){ - public_bzList(this.searchForm).then(response => { + public_bzList().then(response => { this.bzList = response.data }); }, diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js index edd2fe0..995bd85 100644 --- a/src/views/business/comps/template/mixins/templateMixin.js +++ b/src/views/business/comps/template/mixins/templateMixin.js @@ -43,7 +43,8 @@ export default { templateSn, startDate, bdmc, - endDate + endDate, + id } = v if (v.resource) { //试验试剂信息 @@ -59,7 +60,8 @@ export default { templateSn, startDate, bdmc, - endDate + endDate, + id } } else { this.formData = { @@ -70,7 +72,8 @@ export default { templateSn, startDate, bdmc, - endDate + endDate, + id } } const { effectivePeriod, effectivePeriodUnit, expireDate } = @@ -156,15 +159,18 @@ export default { if (validFormData) { validFormData.forEach((item) => { for (const [key, value] of Object.entries(item)) { - let index = 0; + let index = 0 // 如果当前键是可能重复的字段,且结果对象中已经存在该键,则添加索引后缀 - if ((key === 'headerSelectFields' || key === 'stepTableFormData') && result.hasOwnProperty(key)) { + if ( + (key === 'headerSelectFields' || key === 'stepTableFormData') && + result.hasOwnProperty(key) + ) { // 为重复字段生成带索引的键名,从1开始(因为第一个组件不需要后缀) - const newKey = `${key}_${++index}`; - result[newKey] = value; + const newKey = `${key}_${++index}` + result[newKey] = value } else { // 正常合并其他字段 - result[key] = value; + result[key] = value } } })