From 0fe4e7d2e81146a5bfb8cbd977765362d26310fe Mon Sep 17 00:00:00 2001
From: lslaiwy <1209768238@qq.com>
Date: Fri, 13 Mar 2026 23:37:55 +0800
Subject: [PATCH] =?UTF-8?q?FIx[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]DL018-?=
=?UTF-8?q?22-23-24=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../business/comps/template/comps/dl/DL018.vue | 236 ++++++++++-----------
.../business/comps/template/comps/dl/DL022.vue | 44 +---
.../business/comps/template/comps/dl/DL023.vue | 10 +-
.../business/comps/template/comps/dl/DL024.vue | 31 +--
4 files changed, 136 insertions(+), 185 deletions(-)
diff --git a/src/views/business/comps/template/comps/dl/DL018.vue b/src/views/business/comps/template/comps/dl/DL018.vue
index 39704e3..770704c 100644
--- a/src/views/business/comps/template/comps/dl/DL018.vue
+++ b/src/views/business/comps/template/comps/dl/DL018.vue
@@ -11,23 +11,20 @@
-
+
-
-
-
-
+
+
+
+
+
+
@@ -52,13 +49,14 @@ import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
+import moment from 'moment'
export default {
name: "DL018",
- dicts: [
- 'business_dl_qsxjbltj', 'business_tjdw'
- ],
- components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete },
+ dicts: [
+ 'business_dl_qsxjbltj','business_tjdw'
+ ],
+ components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
@@ -67,13 +65,13 @@ export default {
},
},
computed: {
- // 表格数据
- tableFormData() {
- return {
- stepTableFormData: [{}],
- headerSelectFields: {}
- }
- },
+ // 表格数据
+ tableFormData() {
+ return {
+ stepTableFormData: this.formData.stepTableFormData || [],
+ headerSelectFields: {}
+ }
+ },
// 备注表单配置
remarkConig() {
return [
@@ -138,7 +136,7 @@ export default {
}
]
},
- // 细胞信息
+ // 细胞信息
swypyjInfoFormConfig() {
return [
{
@@ -149,16 +147,16 @@ export default {
label: 'template.dl.dl018.qxbd',
type: 'qxbd',
fillType: 'actFill',
- qxbdType: 'DL014',
- filledCodes: ['bdmc', 'bdbh'],
+ qxbdType:'DL014',
+ filledCodes:['bdmc','bdbh'],
},
- bltj: {
+ bltj: {
label: 'template.dl.dl018.bltj',
type: 'select',
fillType: 'preFill',
options: this.getDictOptions('business_dl_qsxjbltj'),
otherCode: 'bltjOther',
- showOtherLabel: false
+ showOtherLabel:false
},
}
}
@@ -173,7 +171,7 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
- disabled: true,
+ disabled: true,
bodyDisabled: true,
},
{
@@ -182,38 +180,34 @@ export default {
width: 180,
bodyType: "input",
bodyFillType: "actFill",
- disabled: true,
+ disabled: true,
bodyDisabled: true,
},
{
label: "template.dl.dl018.rsks",
prop: "rsks",
- width: 180,
bodyType: "input",
- bodyFillType: "actFill",
- // disabled: true,
- // showOtherLabel: false,
-
- bodySubType: 'button',
- bodySubFillType: 'actFill',
- bodySubKey: 'rsks',
+ bodySubType: 'button',
bodySubButtonName: 'template.dl.dl018.ksButton',
- showBodySub: this.fillType === "actFill",
+ bodySubKey: 'rsks1',
+ bodySubFillType: 'actFill',
+ bodyFillType: 'actFill',
+ bodyDisabled: true,
+ width: 280,
+ bodyMaxlength: 50,
},
{
label: "template.dl.dl018.rsjs",
prop: "rsjs",
- width: 180,
bodyType: "input",
- bodyFillType: "actFill",
- // disabled: true,
- // showOtherLabel: false,
-
- bodySubType: 'button',
+ bodySubType: 'button',
+ bodySubButtonName: 'template.dl.dl018.jsButton',
+ bodySubKey: 'rsjs1',
bodySubFillType: 'actFill',
- bodySubKey: 'rsjs',
- bodySubButtonName: 'template.dl.dl018.jsButton',
- showBodySub: this.fillType === "actFill",
+ bodyFillType: 'actFill',
+ bodyDisabled: true,
+ width: 280,
+ bodyMaxlength: 50,
},
{
label: "template.dl.dl018.zs",
@@ -261,115 +255,98 @@ export default {
mounted() {
},
methods: {
- clickButton(e,rowIndex) {
- console.log(e,rowIndex)
+ //开始介绍按钮回调
+ handleClickButton(e, rowIndex) {
+ const arrStr = typeof e === 'string' ? e.slice(0, -1) : '';
+ const updateData = { [arrStr]: moment().format('YYYY/MM/DD HH:mm') };
+ this.$refs.stepTableRef?.updateDataSourceByRowIndex(rowIndex, updateData);
+ // console.log(this.getFilledFormData())
},
- onRegentSubmit(e) {
- const { selectInfo, key, rowIndex } = e
- const { row } = selectInfo
- if (key === 'qxbd') {
- try {
- // 解析前序表单的内容
- const bdnr = JSON.parse(row.bdnr)
- // 获取剂量组列表数据
- const stepTableFormData = bdnr.jlzTableData || []
+ onRegentSubmit(e) {
+ const { selectInfo, key, rowIndex } = e
+ const { row } = selectInfo
+ if (key === 'qxbd') {
+ try {
+ // 解析前序表单的内容
+ const bdnr = JSON.parse(row.bdnr)
+ // 获取剂量组列表数据
+ const stepTableFormData = bdnr.jlzTableData || []
- if (stepTableFormData.length === 0) {
- // 清空当前的换液情况列表数据
- this.$set(this.formData, 'stepTableFormData', [])
- this.$message.warning('前序表单中没有剂量组数据')
- return
- }
+ if (stepTableFormData.length === 0) {
+ // 清空当前的换液情况列表数据
+ this.$set(this.formData, 'stepTableFormData', [])
+ this.$message.warning('前序表单中没有剂量组数据')
+ return
+ }
- // 从剂量组数据中提取剂量组别和悬液编号
- const itemData = stepTableFormData.map(item => ({
- jlzb: item.jlzb || '', // 剂量组别
- xybh: item.xybh || '', // 悬液编号
- rsks: '', //
- rsjs: '', //
- zs: '', //
- ys: '', //
- zy: '', //
- yx: '', //
- tj: '', //
- }))
- // 使用 $set 更新 formData,触发 CustomTable 的响应式更新
- this.$set(this.formData, 'stepTableFormData', itemData)
+ // 从剂量组数据中提取剂量组别和悬液编号
+ const itemData = stepTableFormData.map(item => ({
+ jlzb: item.jlzb || '', // 剂量组别
+ xybh: item.xybh || '', // 悬液编号
+ rsks: '', //
+ rsjs: '', //
+ zs: '', //
+ ys: '', //
+ zy: '', //
+ yx: '', //
+ tj: '', //
+ }))
+ // 使用 $set 更新 formData,触发 CustomTable 的响应式更新
+ this.$set(this.formData, 'stepTableFormData', itemData)
- this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
- } catch (error) {
- this.$set(this.formData, 'stepTableFormData', [])
- console.error('解析前序表单数据失败:', error)
- this.$message.error('解析前序表单数据失败')
- }
- }
- },
- //选择table header下拉框也要更新体积
- onHeaderSelectChange(data) {
- const { key, headerSelectFields, dataSource = [] } = data;
+ this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`)
+ } catch (error) {
+ this.$set(this.formData, 'stepTableFormData', [])
+ console.error('解析前序表单数据失败:', error)
+ this.$message.error('解析前序表单数据失败')
+ }
+ }
+ },
+ //选择table header下拉框也要更新体积
+ onHeaderSelectChange(data){
+ const {key, headerSelectFields,dataSource=[]} = data;
const keys = [
'targetStartSolutionVolumeUnit',
'targetDiluentVolumeUnit',
'targetSolutionConcentrationUnit',
'targetSolutionVolumeUnit',
]
- if (keys.includes(key)) {
- const { targetStartSolution, subTargetStartSolution } = this.$refs.swypyjInfoRef?.getFilledFormData();
+ if(keys.includes(key)){
+ const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
- this.batchUpdateTargetStartSolutionVolume(dataSource, targetStartSolution, params)
- }
- },
- beforeSaveRecord(data) {
- const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
- this.onCommonVerifyNdException(formFields, data);
- },
- configComplete(val) {
- const { rowData, headerSelectFields } = val;
- //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积)
- const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
- let postData = {
- mc: null,
- bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
- nd: rowData.actSolutionConcentration,//实际目标溶液浓度
- nddw: headerSelectFields.actSolutionConcentrationUnit,
- studySubjectId: this.formData.studySubjectId,
- studyFormId: this.formData.id,
- studyId: this.formData.studyId,
- kc: total,
- kcdw: unit,
+ this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
}
- this.configCompleteRequest(postData);
},
//获取已填写的表单数据
getFilledFormData() {
- return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef", "remarkRef"])
+ return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])
},
//获取填写完成的表单数据
async getFormData() {
- let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef", "remarkRef"]);
+ let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]);
return content;
},
getResource() {
//使用的试剂、仪器
const stepResource = this.$refs.stepRef.getStepResource()
- const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || []
+ const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || []
// 从操作步骤中提取试剂和仪器资源
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
- const tableFromHyqk = tableList
- .filter(item => item.xybh)
- .map(item => ({
- bh: item.xybh,
- type: 'cell'
- }))
+ const tableFromHyqk = tableList
+ .filter(item => item.xybh)
+ .map(item => ({
+ bh: item.xybh,
+ type: 'cell'
+ }))
- this.resourceTmp = [...this.resourceTmp, ...tableFromHyqk]
+ this.resourceTmp = [...this.resourceTmp, ...tableFromHyqk]
return this.resourceTmp;
},
//保存
@@ -387,4 +364,5 @@ export default {
}
};
-
+
diff --git a/src/views/business/comps/template/comps/dl/DL022.vue b/src/views/business/comps/template/comps/dl/DL022.vue
index a5b6c0c..9343d8c 100644
--- a/src/views/business/comps/template/comps/dl/DL022.vue
+++ b/src/views/business/comps/template/comps/dl/DL022.vue
@@ -244,7 +244,6 @@ export default {
onAddRow() {
this.$refs.tableRef.addRow({
jblx: [{value: undefined}],
- id: getuuid(),
})
},
onFormSelect(fields) {
@@ -272,48 +271,7 @@ export default {
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields, data);
},
- configComplete(val) {
- const { rowData, headerSelectFields } = val;
- //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积)
- const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
- let postData = {
- mc: null,
- bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
- nd: rowData.actSolutionConcentration,//实际目标溶液浓度
- nddw: headerSelectFields.actSolutionConcentrationUnit,
- studySubjectId: this.formData.studySubjectId,
- studyFormId: this.formData.id,
- studyId: this.formData.studyId,
- kc: total,
- kcdw: unit,
- }
- this.configCompleteRequest(postData);
- },
- //分装回调
- subPackageSubmit(data) {
- const { fzsj, rowData, headerSelectFields } = data;
- const { fzList = [], dw = "", mybh } = fzsj;
- if (fzList && fzList.length > 0) {
- const list = fzList.map((item) => {
- return {
- bh: mybh + item.preCode + item.subCode,
- kc: item.num,
- kcdw: dw,
- }
- })
- let postData = {
- studyId: this.formData.studyId,
- studyFormId: this.formData.id,
- bh: mybh,
- nd: rowData.actSolutionConcentration || 0,
- nddw: headerSelectFields.actSolutionConcentrationUnit,
- studySubjectId: this.formData.studySubjectId,
- studyFormId: this.formData.id,
- list: list
- }
- this.subPackageRequest(postData);
- }
- },
+
//获取已填写的表单数据
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "remarkRef", "tableRef"])
diff --git a/src/views/business/comps/template/comps/dl/DL023.vue b/src/views/business/comps/template/comps/dl/DL023.vue
index d92c87f..ada231e 100644
--- a/src/views/business/comps/template/comps/dl/DL023.vue
+++ b/src/views/business/comps/template/comps/dl/DL023.vue
@@ -22,7 +22,7 @@
+ @select="onSelect" @clickButton="handleClickButton" :formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
@@ -43,6 +43,7 @@ import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
+import moment from 'moment'
export default {
name: "dl023",
@@ -210,6 +211,13 @@ export default {
mounted() {
},
methods: {
+ //开始介绍按钮回调
+ handleClickButton(item,signData) {
+ const arrStr = item.subKey;
+ const value = moment().format('YYYY/MM/DD HH:mm');
+ this.$refs.swypyjInfoRef.updateFormData(arrStr, value,{isUpdateRecord:true,signData});
+ // console.log(this.getFilledFormData())
+ },
onSelect(e) {
const { key, value } = e
if (key === "dwzshxbx") {//动物种属或细胞系
diff --git a/src/views/business/comps/template/comps/dl/DL024.vue b/src/views/business/comps/template/comps/dl/DL024.vue
index 06f4d26..2cc98b0 100644
--- a/src/views/business/comps/template/comps/dl/DL024.vue
+++ b/src/views/business/comps/template/comps/dl/DL024.vue
@@ -15,12 +15,15 @@
({
- xbbh: item.jlzb || '', // 细胞编号
+ xbbh: item.jzlybh || '', // 细胞编号
}))
// 使用 $set 更新 formData,触发 CustomTable 的响应式更新
+ console.log('选择仪器编号预留=3==',itemData)
this.$set(this.formData, 'stepTableFormData', itemData)
this.$message.success(`已从前序表单加载 ${itemData.length} 条细胞编号数据`)
@@ -249,19 +261,14 @@ export default {
return content;
},
getResource() {
- //使用的试剂、仪器
- const stepResource = this.$refs.stepRef.getStepResource()
const tableList = this.$refs.qcxjjyqkTableRef?.getFilledFormData()?.stepTableFormData || []
// 从操作步骤中提取试剂和仪器资源
- this.resourceTmp = stepResource.sjResource || []
- const tableFromHyqk = tableList
+ this.resourceTmp = tableList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
-
- this.resourceTmp = [...this.resourceTmp, ...tableFromHyqk]
return this.resourceTmp;
},
//保存