diff --git a/src/components/Template/BaseInfoFormPackage.vue b/src/components/Template/BaseInfoFormPackage.vue index 7017a5a..83a752b 100644 --- a/src/components/Template/BaseInfoFormPackage.vue +++ b/src/components/Template/BaseInfoFormPackage.vue @@ -53,6 +53,22 @@ + + diff --git a/src/lang/en/template/sp.js b/src/lang/en/template/sp.js index 49b0611..15114ec 100644 --- a/src/lang/en/template/sp.js +++ b/src/lang/en/template/sp.js @@ -63,6 +63,9 @@ export default { rqcz: 'Container Material', cctj:'Storage Condition', }, + sp007:{ + title: '生物样品分析样本处理表', + }, // 生物样品分析方法学样品制备表-准确度与精密度 sp008: { title: diff --git a/src/lang/zh/template/sp.js b/src/lang/zh/template/sp.js index 276bbde..4736a3e 100644 --- a/src/lang/zh/template/sp.js +++ b/src/lang/zh/template/sp.js @@ -63,6 +63,9 @@ export default { rqcz: '容器材质', cctj:'存储条件', }, + sp007:{ + title: '生物样品分析样本处理表', + }, // 生物样品分析方法学样品制备表-准确度与精密度 sp008: { title: '生物样品分析方法学样品制备表(准确度与精密度)', diff --git a/src/views/business/comps/template/TemplateTable.vue b/src/views/business/comps/template/TemplateTable.vue index f8ac4da..36fdb55 100644 --- a/src/views/business/comps/template/TemplateTable.vue +++ b/src/views/business/comps/template/TemplateTable.vue @@ -27,6 +27,7 @@ import SP001 from "./comps/sp/SP001.vue"; import SP002 from "./comps/sp/SP002.vue"; import SP003 from "./comps/sp/SP003.vue"; import SP00456 from "./comps/sp/SP00456.vue"; +import SP007 from "./comps/sp/SP007.vue"; //色谱生物样品分析方法学样品制备表-10个类似 import SP008 from "./comps/sp/SWYPFXFFXYPZBB/SP008.vue"; import SP009 from "./comps/sp/SWYPFXFFXYPZBB/SP009.vue"; @@ -56,7 +57,7 @@ export default { //供试品 MJYLQSQD, SYWZPZJHB, //色谱 - SP001, SP002, SP003, SP00456, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018, + SP001, SP002, SP003, SP00456,SP007, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018, // PCR PCR001, PCR002 }, @@ -90,6 +91,7 @@ export default { 'SP004': 'SP00456', 'SP005': 'SP00456', 'SP006': 'SP00456', + 'SP007': 'SP007', 'SP008': 'SP008', 'SP009': 'SP009', 'SP010': 'SP010', diff --git a/src/views/business/comps/template/comps/sp/SP003.vue b/src/views/business/comps/template/comps/sp/SP003.vue index 45ff8de..3752862 100644 --- a/src/views/business/comps/template/comps/sp/SP003.vue +++ b/src/views/business/comps/template/comps/sp/SP003.vue @@ -280,6 +280,7 @@ export default { bodyType: "input", bodyFillType: "actFill", bodyMaxlength: 10, + bodyDisabled: true, }, { label: "template.sp.sp003.ysqsrytj", @@ -552,15 +553,17 @@ export default { // 遍历数据,按要求更新起始溶液编号 for (let i = 0; i < newStepTableData.length; i++) { const item = newStepTableData[i]; + let initNd = row.nd;//起始浓度是上一条记录的实际目标溶液浓度 if (i === 0) { // 第一条记录的起始溶液编号是确认弹框带出来的,也就是row.code字段 newStepTableData[i].startSolutionCode = row.bh; } else { // 第二条的起始溶液编号是第一条数据里面的targetSolutionCode字段, // 第三条的起始溶液编号是第二条数据里面的targetSolutionCode字段,以此类推 - newStepTableData[i].startSolutionCode = newStepTableData[i - 1].targetSolutionCode; + newStepTableData[i].startSolutionCode = newStepTableData[i - 1].targetSolutionCode+newStepTableData[i - 1].subTargetSolutionCode; + initNd = newStepTableData[i - 1].actSolutionConcentration; } - const volResult = this.updateSjmbrynd(item, row.nd); + const volResult = this.updateSjmbrynd(item, initNd); if (!volResult) { continue } diff --git a/src/views/business/comps/template/comps/sp/SP00456.vue b/src/views/business/comps/template/comps/sp/SP00456.vue index d8a5816..5c6f0df 100644 --- a/src/views/business/comps/template/comps/sp/SP00456.vue +++ b/src/views/business/comps/template/comps/sp/SP00456.vue @@ -504,13 +504,19 @@ export default { const newData = JSON.parse(JSON.stringify(stepTableFormData)); // 遍历数据,按要求更新起始溶液编号 newData.forEach((item, index) => { - const volResult = this.updateSjmbrynd(item, row.nd); + let initNd = row.nd;//起始浓度是上一条记录的实际目标溶液浓度 + if(index ===0){ + item.startSolutionCode = row.bh; + }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 } - console.log(volResult.actNd, "actNd") + item.actSolutionVolume = volResult.actVol; - debugger item.actSolutionConcentration = volResult.actNd; // 更新stepTableRef组件的数据 }) diff --git a/src/views/business/comps/template/comps/sp/SP007.vue b/src/views/business/comps/template/comps/sp/SP007.vue new file mode 100644 index 0000000..4f2da8d --- /dev/null +++ b/src/views/business/comps/template/comps/sp/SP007.vue @@ -0,0 +1,158 @@ + + + + + \ No newline at end of file diff --git a/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js b/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js index 066bfc9..535bca0 100644 --- a/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js +++ b/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js @@ -21,7 +21,7 @@ export const getLadderColumnsConfig = ($this) => { showWidth: 180, bodyType: 'input', bodyFillType: 'actFill', - bodyMaxlength: 10 + bodyDisabled: true, }, { label: 'template.sp.sp00456.ysqsrytj', diff --git a/src/views/business/comps/template/formConfig/sp/SP007.js b/src/views/business/comps/template/formConfig/sp/SP007.js new file mode 100644 index 0000000..a9f1afb --- /dev/null +++ b/src/views/business/comps/template/formConfig/sp/SP007.js @@ -0,0 +1,144 @@ +export const getBaseInfoFormConfig = ($this) => { + return [ + { + type: "cardItem", + config: { + studyMc: { + label: 'template.common.testName', + type: "input", + disabled: true, + }, + studySn: { + label: 'template.common.testNumber', + type: "input", + disabled: true, + }, + methodCode: { + label: 'template.common.methodCode', + type: "input", + fillType: "preFill", + maxlength: 50 + }, + versionNum: { + label: 'template.common.versionNumber', + type: "inputNumber", + fillType: "actFill", + prepend: "V", + maxlength: 50 + }, + clpbh: { + label: '处理批编号', + type: "input", + fillType: "actFill", + maxlength: 50 + }, + + } + }, + { + type: "conditionItem", + label: 'template.common.testConfigurationConditions', + config: { + pre: { + label: 'template.common.preFill', + type: "select", + multiple: true, + fillType: "preFill", + options: $this.getDictOptions('business_pztj'), + otherCode: "preOther", + }, + act: { + label: 'template.common.actualFill', + type: "select", + fillType: "actFill", + otherCode: "actOther", + multiple: true, + compareTo: "pre", + options: $this.getDictOptions('business_pztj') + } + } + }, + { + type: "cellItem", + config: { + containerMaterial: { + label: "template.sp.sp003.rqcz", + type: "select", + options: $this.getDictOptions('business_rqcz'), + fillType: "actFill", + otherCode: "containerMaterialOther", + } + } + }, + { + type: "cellItem", + label: 'template.sp.sp008.clsj', + config: { + startDate: { + label: 'template.common.startTime', + type: "input", + }, + endDate: { + label: 'template.common.endTime', + type: "input", + }, + } + } + ] +} +//备注 +export const getRemarkFormConfig = () => { + return [ + { + type: "cellItem", + config: { + remark: { + label: "", + type: "textarea", + fillType: "actFill", + span: 1, + placeholder: 'template.common.remarkPlaceholder', + maxlength: 1000, + rows: 5 + } + } + } + ] +} +//样本说明 +export const getYbFormConfig = () => { + return [ + { + type: "cellItem", + config: { + remark: { + label: "", + type: "textarea", + fillType: "actFill", + span: 1, + placeholder: '样本说明', + maxlength: 1000, + rows: 5 + } + } + } + ] +} + +//存储条件 +export const getStorageFormConfig = ($this) => { + return [ + { + type: "conditionItem", + config: { + storageCondition: { + label: 'template.common.storageConditionLabel', + type: "select", + fillType: "preFill", + options: $this.getDictOptions("business_cctj"), + otherCode: "storageConditionOther", + }, + } + } + ] +} \ No newline at end of file diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js index 5bea18c..571347a 100644 --- a/src/views/business/comps/template/mixins/templateMixin.js +++ b/src/views/business/comps/template/mixins/templateMixin.js @@ -347,6 +347,7 @@ export default { //统一处理table失焦事件 onHandleTableBlur(params) { const { rowIndex, colKey, value, item } = params + console.log(params,"params"); if ( colKey === 'targetSolutionVolume' || colKey === 'targetSolutionConcentration' || @@ -381,11 +382,11 @@ export default { //计算并更新实际目标溶液浓度 先计算实际目标溶液体积再计算实际目标溶液浓度 updateSjmbrynd(item, targetAcSolution) { //实际源溶液浓度÷(实际终体积÷源溶液加入体积); - const precision = item.actSolutionConcentrationPrecision || 0 + const precision = item.actSolutionConcentrationPrecision const volPrecision = item.actSolutionVolumePrecision || 0 //实际稀释液体积 - const actDiluentVolume = item.actDiluentVolume || 0 - const actStartSolutionVolume = item.actStartSolutionVolume || 0 + const actDiluentVolume = item.actDiluentVolume + const actStartSolutionVolume = item.actStartSolutionVolume //实际高源溶液加入体积+实际稀释液加入体积 const actVol = ( Number(actStartSolutionVolume) + Number(actDiluentVolume) @@ -396,10 +397,12 @@ export default { if(isValueEmpty(actDiluentVolume) && isValueEmpty(actStartSolutionVolume)){ return false } + // 实际目标溶液浓度 = 实际源溶液浓度÷(实际终体积÷源溶液加入体积); const actNd = ( - parseFloat(targetAcSolution) / - parseFloat(actStartSolutionVolume) / - parseFloat(actVol) + parseFloat(targetAcSolution) /( + parseFloat(actStartSolutionVolume) / + parseFloat(actVol) + ) ).toFixed(precision) const nd = actNd === 'Infinity' ? 0 : Number(actNd) console.log(actNd, targetAcSolution, actStartSolutionVolume, actVol, "actNd")