|
|
|
@ -2,7 +2,8 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div class="detail-container"> |
|
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img src="@/assets/images/detail-title.png" /></div> |
|
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img |
|
|
|
src="@/assets/images/detail-title.png" /></div> |
|
|
|
<div class="detail-content"> |
|
|
|
<div class="content"> |
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" |
|
|
|
@ -15,8 +16,10 @@ |
|
|
|
:formConfig="storageFormConfig" :formData="formData" /> |
|
|
|
<LineLabel label="template.common.operationSteps" /> |
|
|
|
<div v-if="fillType === 'preFill'" class="mt-20"> |
|
|
|
<el-button type="primary" @click="handleAddParalle">{{ $t('template.common.xzpxpz') }}</el-button> |
|
|
|
<el-button type="primary" @click="handleAddLadder">{{ $t('template.common.xzjtpz') }}</el-button> |
|
|
|
<el-button type="primary" @click="handleAddParalle">{{ $t('template.common.xzpxpz') |
|
|
|
}}</el-button> |
|
|
|
<el-button type="primary" @click="handleAddLadder">{{ $t('template.common.xzjtpz') |
|
|
|
}}</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 阶梯配制区域 --> |
|
|
|
@ -26,15 +29,17 @@ |
|
|
|
<div class="config-header"> |
|
|
|
<div>{{ $t('template.common.jtpz') }}</div> |
|
|
|
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete" |
|
|
|
@click="deleteLadderConfig(ladderIndex)">{{ $t('template.common.deleteBtn') }}</el-button> |
|
|
|
@click="deleteLadderConfig(ladderIndex)">{{ $t('template.common.deleteBtn') |
|
|
|
}}</el-button> |
|
|
|
</div> |
|
|
|
<BaseInfoFormPackage |
|
|
|
@onRegentSubmit="(e) => onRegentSubmit('ladder', ladderIndex, e)" |
|
|
|
<BaseInfoFormPackage @onRegentSubmit="(e) => onRegentSubmit('ladder', ladderIndex, e)" |
|
|
|
:ref="`ladderStepFormPackageRef_${ladderIndex}`" :formConfig="ladderStepFormConfig" |
|
|
|
:formData="ladderConfig" :fieldItemLabel="$t('template.common.jtpz')" :prefixKey="'ladder_' + ladderIndex" /> |
|
|
|
:formData="ladderConfig" :fieldItemLabel="$t('template.common.jtpz')" |
|
|
|
:prefixKey="'ladder_' + ladderIndex" /> |
|
|
|
<CustomTable @blur="(e) => onHandleTableBlur('ladder', ladderIndex, e)" |
|
|
|
:ref="`ladderStepTableRef_${ladderIndex}`" :showOperation="fillType === 'actFill'" :columns="ladderStepColumns" |
|
|
|
:formData="ladderConfig" :prefixKey="'ladder_' + ladderIndex" :fieldItemLabel="$t('template.common.jtpz')"> |
|
|
|
:ref="`ladderStepTableRef_${ladderIndex}`" :showOperation="fillType === 'actFill'" |
|
|
|
:columns="ladderStepColumns" :formData="ladderConfig" |
|
|
|
:prefixKey="'ladder_' + ladderIndex" :fieldItemLabel="$t('template.common.jtpz')"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaion @printTag="(e) => printTag(e, 'ladderConfigs', ladderIndex)" |
|
|
|
@startConfig="(val) => startConfig(val, 'ladderConfigs', ladderIndex)" |
|
|
|
@ -53,22 +58,27 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 平行配制区域 --> |
|
|
|
<div :label="$t('template.common.pxpz')" v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs" |
|
|
|
<div :label="$t('template.common.pxpz')" |
|
|
|
v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs" |
|
|
|
:key="'paralle_' + paralleIndex"> |
|
|
|
|
|
|
|
<div class="template-form-item"> |
|
|
|
<div class="config-header"> |
|
|
|
<div>{{ $t('template.common.pxpz') }}</div> |
|
|
|
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete" |
|
|
|
@click="deleteParalleConfig(paralleIndex)">{{ $t('template.common.deleteBtn') }}</el-button> |
|
|
|
@click="deleteParalleConfig(paralleIndex)">{{ $t('template.common.deleteBtn') |
|
|
|
}}</el-button> |
|
|
|
</div> |
|
|
|
<BaseInfoFormPackage @clickable="(e) => handleClickable('paralle', paralleIndex, e)" |
|
|
|
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig" |
|
|
|
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" :fieldItemLabel="$t('template.common.pxpz')" /> |
|
|
|
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" |
|
|
|
:fieldItemLabel="$t('template.common.pxpz')" /> |
|
|
|
<CustomTable @blur="(e) => onHandleTableBlur('paralle', paralleIndex, e)" |
|
|
|
:ref="`paralleStepTableRef_${paralleIndex}`" :showOperation="fillType === 'actFill'" :columns="paralleStepColumns" |
|
|
|
:ref="`paralleStepTableRef_${paralleIndex}`" :showOperation="fillType === 'actFill'" |
|
|
|
:columns="paralleStepColumns" |
|
|
|
@onRegentSubmit="(data) => onTableRegentSubmit('paralle', paralleIndex, data)" |
|
|
|
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" :fieldItemLabel="$t('template.common.pxpz')"> |
|
|
|
:formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" |
|
|
|
:fieldItemLabel="$t('template.common.pxpz')"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaion @printTag="(e) => printTag(e, 'paralleConfigs', paralleIndex)" |
|
|
|
@startConfig="(val) => startConfig(val, 'paralleConfigs', paralleIndex)" |
|
|
|
@ -181,7 +191,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
//分装 |
|
|
|
subPackageSubmit(data, configType, index) { |
|
|
|
const { fzsj, rowData, headerSelectFields } = data; |
|
|
|
@ -202,8 +212,8 @@ export default { |
|
|
|
nd: rowData.actSolutionConcentration || 0, |
|
|
|
nddw: headerSelectFields.actSolutionConcentrationUnit, |
|
|
|
studySubjectId: this.formData.studySubjectId, |
|
|
|
studyId:this.formData.studyId, |
|
|
|
studyFormId:this.formData.id, |
|
|
|
studyId: this.formData.studyId, |
|
|
|
studyFormId: this.formData.id, |
|
|
|
list: list |
|
|
|
} |
|
|
|
this.subPackageRequest(postData); |
|
|
|
@ -215,8 +225,8 @@ export default { |
|
|
|
let postData = { |
|
|
|
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode, |
|
|
|
studySubjectId: this.formData.studySubjectId, |
|
|
|
studyId:this.formData.studyId, |
|
|
|
studyFormId:this.formData.id, |
|
|
|
studyId: this.formData.studyId, |
|
|
|
studyFormId: this.formData.id, |
|
|
|
} |
|
|
|
this.startConfigRequest(postData); |
|
|
|
}, |
|
|
|
@ -231,8 +241,8 @@ export default { |
|
|
|
nd: rowData.actSolutionConcentration,//实际目标溶液浓度 |
|
|
|
nddw: headerSelectFields.actSolutionConcentrationUnit, |
|
|
|
studySubjectId: this.formData.studySubjectId, |
|
|
|
studyId:this.formData.studyId, |
|
|
|
studyFormId:this.formData.id, |
|
|
|
studyId: this.formData.studyId, |
|
|
|
studyFormId: this.formData.id, |
|
|
|
kc: total, |
|
|
|
kcdw: unit, |
|
|
|
} |
|
|
|
@ -422,10 +432,10 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//平行配置 table选择试剂确定弹窗 |
|
|
|
onTableRegentSubmit(type, configIndex, data){ |
|
|
|
const { selectInfo,rowIndex,key,rowData } = data; |
|
|
|
const { row,selectedId } = selectInfo; |
|
|
|
if (key === "actStartSolutionCode") {//实际原始溶液编号点击事件 |
|
|
|
onTableRegentSubmit(type, configIndex, data) { |
|
|
|
const { selectInfo, rowIndex, key, rowData } = data; |
|
|
|
const { row, selectedId } = selectInfo; |
|
|
|
if (key === "actStartSolutionCode") {//实际原始溶液编号点击事件 |
|
|
|
const tableRef = this.$refs[`paralleStepTableRef_${configIndex}`][0]; |
|
|
|
if (tableRef) { |
|
|
|
const volResult = this.updateSjmbrynd(rowData, row.nd); |
|
|
|
@ -441,10 +451,10 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//选择试剂提交事件 |
|
|
|
onRegentSubmit(type,rowIndex,data) { |
|
|
|
const { selectInfo,key} = data; |
|
|
|
onRegentSubmit(type, rowIndex, data) { |
|
|
|
const { selectInfo, key } = data; |
|
|
|
const { row } = selectInfo; |
|
|
|
if (key) { |
|
|
|
const ref = type === "ladder" ? "ladderStepFormPackageRef_" : "paralleStepFormPackageRef_" |
|
|
|
@ -452,9 +462,9 @@ export default { |
|
|
|
if (key === "subStartSolution") { |
|
|
|
packageRef.updateFormData("targetAcSolution", row.nd); |
|
|
|
packageRef.onValueChangeCompareTo("targetAcSolution", row.nd, "targetStartSolution"); |
|
|
|
this.updateTableNd(row,rowIndex); |
|
|
|
this.updateTableNd(row, rowIndex); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
updateRecord() { |
|
|
|
this.$nextTick(() => { |
|
|
|
@ -466,23 +476,23 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
//选择实际的时候更新table的浓度 |
|
|
|
updateTableNd(row,rowIndex) { |
|
|
|
updateTableNd(row, rowIndex) { |
|
|
|
const { stepTableFormData = [] } = this.$refs[`ladderStepTableRef_${rowIndex}`][0].getFilledFormData(); |
|
|
|
const newData = JSON.parse(JSON.stringify(stepTableFormData)); |
|
|
|
// 遍历数据,按要求更新起始溶液编号 |
|
|
|
newData.forEach((item, index) => { |
|
|
|
let initNd = row.nd;//起始浓度是上一条记录的实际目标溶液浓度 |
|
|
|
if(index ===0){ |
|
|
|
if (index === 0) { |
|
|
|
item.startSolutionCode = row.bh; |
|
|
|
}else{ |
|
|
|
item.startSolutionCode = newData[index - 1].targetSolutionCode+ newData[index - 1].subTargetSolutionCode; |
|
|
|
} else { |
|
|
|
item.startSolutionCode = newData[index - 1].targetSolutionCode + newData[index - 1].subTargetSolutionCode; |
|
|
|
initNd = newData[i - 1].actSolutionConcentration; |
|
|
|
} |
|
|
|
const volResult = this.updateSjmbrynd(item, initNd); |
|
|
|
if (!volResult) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
item.actSolutionVolume = volResult.actVol; |
|
|
|
item.actSolutionConcentration = volResult.actNd; |
|
|
|
// 更新stepTableRef组件的数据 |
|
|
|
@ -570,11 +580,12 @@ export default { |
|
|
|
let content = this.getFilledFormData(); |
|
|
|
return content; |
|
|
|
}, |
|
|
|
getResource(){ |
|
|
|
getResource() { |
|
|
|
let content = this.getFilledFormData(); |
|
|
|
//生成resource |
|
|
|
//生成resource |
|
|
|
let tmpResource = [] |
|
|
|
if (this.fillType === "actFill") { |
|
|
|
debugger |
|
|
|
//阶梯配置 |
|
|
|
if (content.ladderConfigs && content.ladderConfigs.length > 0) { |
|
|
|
for (let i = 0; i < content.ladderConfigs.length; i++) { |
|
|
|
|