|
|
@ -17,11 +17,9 @@ |
|
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl019.xbczqk" /> |
|
|
<LineLabel label="template.dl.dl019.xbczqk" /> |
|
|
<CustomTable |
|
|
<CustomTable |
|
|
@headerSelectChange="onHeaderSelectChange" |
|
|
|
|
|
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur" |
|
|
|
|
|
@beforeSaveRecord = "beforeSaveRecord" |
|
|
|
|
|
|
|
|
fieldItemLabel="template.dl.dl019.xbczqk" |
|
|
:showAddRow="false" :showOperation="false" |
|
|
:showAddRow="false" :showOperation="false" |
|
|
ref="stepTableRef" :columns="stepColumns" :formData="tableFormData"> |
|
|
|
|
|
|
|
|
ref="stepTableRef" :columns="stepColumns" :formData="formData"> |
|
|
<!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
<!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete" |
|
|
<TableOpertaion @startConfig="startConfig" @configComplete="configComplete" |
|
|
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType" |
|
|
@printTag="printTag" @subPackageSubmit="subPackageSubmit" :fillType="fillType" |
|
|
@ -68,13 +66,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
// 表格数据 |
|
|
|
|
|
tableFormData() { |
|
|
|
|
|
return { |
|
|
|
|
|
stepTableFormData: this.formData.stepTableFormData || [], |
|
|
|
|
|
headerSelectFields: {} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 备注表单配制 |
|
|
// 备注表单配制 |
|
|
remarkConig() { |
|
|
remarkConig() { |
|
|
return [ |
|
|
return [ |
|
|
@ -221,70 +212,21 @@ export default { |
|
|
// 获取剂量组列表数据 |
|
|
// 获取剂量组列表数据 |
|
|
const stepTableFormData = bdnr.jlzTableData || [] |
|
|
const stepTableFormData = bdnr.jlzTableData || [] |
|
|
|
|
|
|
|
|
if (stepTableFormData.length === 0) { |
|
|
|
|
|
// 清空当前的换液情况列表数据 |
|
|
|
|
|
this.$set(this.formData, 'stepTableFormData', []) |
|
|
|
|
|
this.$message.warning('前序表单中没有剂量组数据') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 从剂量组数据中提取剂量组别和悬液编号 |
|
|
// 从剂量组数据中提取剂量组别和悬液编号 |
|
|
const itemData = stepTableFormData.map(item => ({ |
|
|
const itemData = stepTableFormData.map(item => ({ |
|
|
jlzb: item.jlzb || '', // 剂量组别 |
|
|
jlzb: item.jlzb || '', // 剂量组别 |
|
|
xybh: item.xybh || '', // 悬液编号 |
|
|
xybh: item.xybh || '', // 悬液编号 |
|
|
bplsh1: '', // |
|
|
bplsh1: '', // |
|
|
bplsh2: '', // |
|
|
bplsh2: '', // |
|
|
|
|
|
id:this.getuuid(), |
|
|
})) |
|
|
})) |
|
|
// 使用 $set 更新 formData,触发 CustomTable 的响应式更新 |
|
|
|
|
|
this.$set(this.formData, 'stepTableFormData', itemData) |
|
|
|
|
|
|
|
|
|
|
|
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`) |
|
|
|
|
|
|
|
|
this.$refs.stepTableRef.updateDataSource(itemData); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('解析前序表单数据失败:', error) |
|
|
console.error('解析前序表单数据失败:', error) |
|
|
this.$message.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(); |
|
|
|
|
|
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.configCompleteRequest(postData); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//获取已填写的表单数据 |
|
|
//获取已填写的表单数据 |
|
|
getFilledFormData() { |
|
|
getFilledFormData() { |
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]) |
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]) |
|
|
|