|
|
@ -11,24 +11,23 @@ |
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> |
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> |
|
|
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> |
|
|
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> |
|
|
|
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.dl.dl018.xbxx" label="template.dl.dl018.xbxx" |
|
|
|
|
|
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" @onRegentSubmit="onRegentSubmit" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.dl.dl018.xbxx" label="template.dl.dl018.xbxx" |
|
|
|
|
|
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData" |
|
|
|
|
|
@onRegentSubmit="onRegentSubmit" /> |
|
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl018.xbczqk" /> |
|
|
|
|
|
<CustomTable |
|
|
|
|
|
@headerSelectChange="onHeaderSelectChange" |
|
|
|
|
|
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur" |
|
|
|
|
|
@beforeSaveRecord = "beforeSaveRecord" |
|
|
|
|
|
:showAddRow="false" :showOperation="false" |
|
|
|
|
|
ref="stepTableRef" :columns="stepColumns" :formData="tableFormData"> |
|
|
|
|
|
<!-- <template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl018.xbczqk" /> |
|
|
|
|
|
<CustomTable @headerSelectChange="onHeaderSelectChange" |
|
|
|
|
|
fieldItemLabel="template.common.operationSteps" @blur="onHandleTableBlur" |
|
|
|
|
|
@beforeSaveRecord="beforeSaveRecord" :showAddRow="false" :showOperation="false" |
|
|
|
|
|
@clickButton="clickButton" |
|
|
|
|
|
ref="stepTableRef" :columns="stepColumns" :formData="tableFormData"> |
|
|
|
|
|
<!-- <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" |
|
|
:row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow"> |
|
|
:row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow"> |
|
|
</TableOpertaion> |
|
|
</TableOpertaion> |
|
|
</template> --> |
|
|
</template> --> |
|
|
</CustomTable> |
|
|
|
|
|
|
|
|
</CustomTable> |
|
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl018.czbz" /> |
|
|
<LineLabel label="template.dl.dl018.czbz" /> |
|
|
<Step ref="stepRef" :formData="formData.stepData"></Step> |
|
|
<Step ref="stepRef" :formData="formData.stepData"></Step> |
|
|
@ -56,10 +55,10 @@ import TableOpertaionDelete from "@/components/Template/operation/TableOpertaion |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "DL018", |
|
|
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], |
|
|
mixins: [templateMixin], |
|
|
props: { |
|
|
props: { |
|
|
fillType: { |
|
|
fillType: { |
|
|
@ -68,13 +67,13 @@ export default { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
// 表格数据 |
|
|
|
|
|
tableFormData() { |
|
|
|
|
|
return { |
|
|
|
|
|
stepTableFormData: this.formData.stepTableFormData || [], |
|
|
|
|
|
headerSelectFields: {} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 表格数据 |
|
|
|
|
|
tableFormData() { |
|
|
|
|
|
return { |
|
|
|
|
|
stepTableFormData: [{}], |
|
|
|
|
|
headerSelectFields: {} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
// 备注表单配置 |
|
|
// 备注表单配置 |
|
|
remarkConig() { |
|
|
remarkConig() { |
|
|
return [ |
|
|
return [ |
|
|
@ -139,7 +138,7 @@ export default { |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
// 细胞信息 |
|
|
|
|
|
|
|
|
// 细胞信息 |
|
|
swypyjInfoFormConfig() { |
|
|
swypyjInfoFormConfig() { |
|
|
return [ |
|
|
return [ |
|
|
{ |
|
|
{ |
|
|
@ -150,16 +149,16 @@ export default { |
|
|
label: 'template.dl.dl018.qxbd', |
|
|
label: 'template.dl.dl018.qxbd', |
|
|
type: 'qxbd', |
|
|
type: 'qxbd', |
|
|
fillType: 'actFill', |
|
|
fillType: 'actFill', |
|
|
qxbdType:'DL014', |
|
|
|
|
|
filledCodes:['bdmc','bdbh'], |
|
|
|
|
|
|
|
|
qxbdType: 'DL014', |
|
|
|
|
|
filledCodes: ['bdmc', 'bdbh'], |
|
|
}, |
|
|
}, |
|
|
bltj: { |
|
|
|
|
|
|
|
|
bltj: { |
|
|
label: 'template.dl.dl018.bltj', |
|
|
label: 'template.dl.dl018.bltj', |
|
|
type: 'select', |
|
|
type: 'select', |
|
|
fillType: 'preFill', |
|
|
fillType: 'preFill', |
|
|
options: this.getDictOptions('business_dl_qsxjbltj'), |
|
|
options: this.getDictOptions('business_dl_qsxjbltj'), |
|
|
otherCode: 'bltjOther', |
|
|
otherCode: 'bltjOther', |
|
|
showOtherLabel:false |
|
|
|
|
|
|
|
|
showOtherLabel: false |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -174,7 +173,7 @@ export default { |
|
|
width: 180, |
|
|
width: 180, |
|
|
bodyType: "input", |
|
|
bodyType: "input", |
|
|
bodyFillType: "actFill", |
|
|
bodyFillType: "actFill", |
|
|
disabled: true, |
|
|
|
|
|
|
|
|
disabled: true, |
|
|
bodyDisabled: true, |
|
|
bodyDisabled: true, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
@ -183,7 +182,7 @@ export default { |
|
|
width: 180, |
|
|
width: 180, |
|
|
bodyType: "input", |
|
|
bodyType: "input", |
|
|
bodyFillType: "actFill", |
|
|
bodyFillType: "actFill", |
|
|
disabled: true, |
|
|
|
|
|
|
|
|
disabled: true, |
|
|
bodyDisabled: true, |
|
|
bodyDisabled: true, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
@ -192,10 +191,14 @@ export default { |
|
|
width: 180, |
|
|
width: 180, |
|
|
bodyType: "input", |
|
|
bodyType: "input", |
|
|
bodyFillType: "actFill", |
|
|
bodyFillType: "actFill", |
|
|
disabled: true, |
|
|
|
|
|
subType: 'button', |
|
|
|
|
|
subKey: 'rsks', |
|
|
|
|
|
buttonName: 'template.dl.dl018.ksButton', |
|
|
|
|
|
|
|
|
// disabled: true, |
|
|
|
|
|
// showOtherLabel: false, |
|
|
|
|
|
|
|
|
|
|
|
bodySubType: 'button', |
|
|
|
|
|
bodySubFillType: 'actFill', |
|
|
|
|
|
bodySubKey: 'rsks', |
|
|
|
|
|
bodySubButtonName: 'template.dl.dl018.ksButton', |
|
|
|
|
|
showBodySub: this.fillType === "actFill", |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: "template.dl.dl018.rsjs", |
|
|
label: "template.dl.dl018.rsjs", |
|
|
@ -203,10 +206,14 @@ export default { |
|
|
width: 180, |
|
|
width: 180, |
|
|
bodyType: "input", |
|
|
bodyType: "input", |
|
|
bodyFillType: "actFill", |
|
|
bodyFillType: "actFill", |
|
|
disabled: true, |
|
|
|
|
|
subType: 'button', |
|
|
|
|
|
subKey: 'rsjs', |
|
|
|
|
|
buttonName: 'template.dl.dl018.jsButton', |
|
|
|
|
|
|
|
|
// disabled: true, |
|
|
|
|
|
// showOtherLabel: false, |
|
|
|
|
|
|
|
|
|
|
|
bodySubType: 'button', |
|
|
|
|
|
bodySubFillType: 'actFill', |
|
|
|
|
|
bodySubKey: 'rsjs', |
|
|
|
|
|
bodySubButtonName: 'template.dl.dl018.jsButton', |
|
|
|
|
|
showBodySub: this.fillType === "actFill", |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: "template.dl.dl018.zs", |
|
|
label: "template.dl.dl018.zs", |
|
|
@ -254,69 +261,72 @@ export default { |
|
|
mounted() { |
|
|
mounted() { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
onRegentSubmit(e) { |
|
|
|
|
|
const { selectInfo, key, rowIndex } = e |
|
|
|
|
|
const { row } = selectInfo |
|
|
|
|
|
if (key === 'qxbd') { |
|
|
|
|
|
try { |
|
|
|
|
|
// 解析前序表单的内容 |
|
|
|
|
|
const bdnr = JSON.parse(row.bdnr) |
|
|
|
|
|
// 获取剂量组列表数据 |
|
|
|
|
|
const stepTableFormData = bdnr.jlzTableData || [] |
|
|
|
|
|
|
|
|
clickButton(e,rowIndex) { |
|
|
|
|
|
console.log(e,rowIndex) |
|
|
|
|
|
}, |
|
|
|
|
|
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 = [ |
|
|
const keys = [ |
|
|
'targetStartSolutionVolumeUnit', |
|
|
'targetStartSolutionVolumeUnit', |
|
|
'targetDiluentVolumeUnit', |
|
|
'targetDiluentVolumeUnit', |
|
|
'targetSolutionConcentrationUnit', |
|
|
'targetSolutionConcentrationUnit', |
|
|
'targetSolutionVolumeUnit', |
|
|
'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 = { |
|
|
const params = { |
|
|
subTargetStartSolution, |
|
|
subTargetStartSolution, |
|
|
headerSelectFields |
|
|
headerSelectFields |
|
|
} |
|
|
} |
|
|
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params) |
|
|
|
|
|
|
|
|
this.batchUpdateTargetStartSolutionVolume(dataSource, targetStartSolution, params) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
beforeSaveRecord(data){ |
|
|
|
|
|
|
|
|
beforeSaveRecord(data) { |
|
|
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData(); |
|
|
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData(); |
|
|
this.onCommonVerifyNdException(formFields,data); |
|
|
|
|
|
|
|
|
this.onCommonVerifyNdException(formFields, data); |
|
|
}, |
|
|
}, |
|
|
configComplete(val) { |
|
|
|
|
|
|
|
|
configComplete(val) { |
|
|
const { rowData, headerSelectFields } = val; |
|
|
const { rowData, headerSelectFields } = val; |
|
|
//计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积) |
|
|
//计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积) |
|
|
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit]) |
|
|
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit]) |
|
|
@ -326,8 +336,8 @@ export default { |
|
|
nd: rowData.actSolutionConcentration,//实际目标溶液浓度 |
|
|
nd: rowData.actSolutionConcentration,//实际目标溶液浓度 |
|
|
nddw: headerSelectFields.actSolutionConcentrationUnit, |
|
|
nddw: headerSelectFields.actSolutionConcentrationUnit, |
|
|
studySubjectId: this.formData.studySubjectId, |
|
|
studySubjectId: this.formData.studySubjectId, |
|
|
studyFormId:this.formData.id, |
|
|
|
|
|
studyId:this.formData.studyId, |
|
|
|
|
|
|
|
|
studyFormId: this.formData.id, |
|
|
|
|
|
studyId: this.formData.studyId, |
|
|
kc: total, |
|
|
kc: total, |
|
|
kcdw: unit, |
|
|
kcdw: unit, |
|
|
} |
|
|
} |
|
|
@ -336,30 +346,30 @@ export default { |
|
|
|
|
|
|
|
|
//获取已填写的表单数据 |
|
|
//获取已填写的表单数据 |
|
|
getFilledFormData() { |
|
|
getFilledFormData() { |
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]) |
|
|
|
|
|
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef", "remarkRef"]) |
|
|
}, |
|
|
}, |
|
|
//获取填写完成的表单数据 |
|
|
//获取填写完成的表单数据 |
|
|
async getFormData() { |
|
|
async getFormData() { |
|
|
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"]); |
|
|
|
|
|
|
|
|
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef", "remarkRef"]); |
|
|
return content; |
|
|
return content; |
|
|
}, |
|
|
}, |
|
|
getResource() { |
|
|
getResource() { |
|
|
//使用的试剂、仪器 |
|
|
//使用的试剂、仪器 |
|
|
const stepResource = this.$refs.stepRef.getStepResource() |
|
|
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.resourceTmp = stepResource.sjResource || [] |
|
|
this.yqResourceTmp = stepResource.yqResource || [] |
|
|
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; |
|
|
return this.resourceTmp; |
|
|
}, |
|
|
}, |
|
|
//保存 |
|
|
//保存 |
|
|
@ -377,5 +387,4 @@ export default { |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
<style rel="stylesheet/scss" lang="scss"> |
|
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss"></style> |