|
|
|
@ -17,10 +17,10 @@ |
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl018.xbczqk" /> |
|
|
|
<CustomTable |
|
|
|
fieldItemLabel="template.common.operationSteps" |
|
|
|
fieldItemLabel="template.dl.dl018.xbczqk" |
|
|
|
@clickButton="handleClickButton" |
|
|
|
:showAddRow="false" :showOperation="false" |
|
|
|
ref="stepTableRef" :prefixKey = "`tableSecond`" :columns="stepColumns" :formData="tableFormData"> |
|
|
|
ref="stepTableRef" :prefixKey = "`tableSecond`" :columns="stepColumns" :formData="formData"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow(rowIndex,'secondTable')" ></TableOpertaionDelete> |
|
|
|
</template> |
|
|
|
@ -65,13 +65,6 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
// 表格数据 |
|
|
|
tableFormData() { |
|
|
|
return { |
|
|
|
stepTableFormData: this.formData.stepTableFormData || [], |
|
|
|
headerSelectFields: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 备注表单配制 |
|
|
|
remarkConig() { |
|
|
|
return [ |
|
|
|
@ -193,6 +186,7 @@ export default { |
|
|
|
bodySubFillType: 'actFill', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
bodyDisabled: true, |
|
|
|
bodySubDisabled:this.fillType !== 'actFill', |
|
|
|
width: 280, |
|
|
|
bodyMaxlength: 50, |
|
|
|
}, |
|
|
|
@ -205,6 +199,7 @@ export default { |
|
|
|
bodySubKey: 'rsjs1', |
|
|
|
bodySubFillType: 'actFill', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
bodySubDisabled:this.fillType !== 'actFill', |
|
|
|
bodyDisabled: true, |
|
|
|
width: 280, |
|
|
|
bodyMaxlength: 50, |
|
|
|
@ -256,11 +251,10 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//开始介绍按钮回调 |
|
|
|
handleClickButton(e, rowIndex) { |
|
|
|
handleClickButton(e, rowIndex,colIndex,key,data) { |
|
|
|
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()) |
|
|
|
this.$refs.stepTableRef?.updateDataSourceByRowIndex(rowIndex, updateData,{signData:data,updateFields:[arrStr]}); |
|
|
|
}, |
|
|
|
onRegentSubmit(e) { |
|
|
|
const { selectInfo, key, rowIndex } = e |
|
|
|
@ -272,13 +266,6 @@ export default { |
|
|
|
// 获取剂量组列表数据 |
|
|
|
const stepTableFormData = bdnr.jlzTableData || [] |
|
|
|
|
|
|
|
if (stepTableFormData.length === 0) { |
|
|
|
// 清空当前的换液情况列表数据 |
|
|
|
this.$set(this.formData, 'stepTableFormData', []) |
|
|
|
this.$message.warning('前序表单中没有剂量组数据') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 从剂量组数据中提取剂量组别和悬液编号 |
|
|
|
const itemData = stepTableFormData.map(item => ({ |
|
|
|
jlzb: item.jlzb || '', // 剂量组别 |
|
|
|
@ -290,37 +277,15 @@ export default { |
|
|
|
zy: '', // |
|
|
|
yx: '', // |
|
|
|
tj: '', // |
|
|
|
id:this.getuuid(), |
|
|
|
})) |
|
|
|
// 使用 $set 更新 formData,触发 CustomTable 的响应式更新 |
|
|
|
this.$set(this.formData, 'stepTableFormData', itemData) |
|
|
|
|
|
|
|
this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`) |
|
|
|
this.$refs.stepTableRef.updateDataSource(itemData); |
|
|
|
} 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(); |
|
|
|
const params = { |
|
|
|
subTargetStartSolution, |
|
|
|
headerSelectFields |
|
|
|
} |
|
|
|
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//获取已填写的表单数据 |
|
|
|
getFilledFormData() { |
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]) |
|
|
|
|