Browse Source

feat:[模板管理][sp021]

ouqian
luojie 1 month ago
parent
commit
62ca9e54c9
4 changed files with 48 additions and 11 deletions
  1. +1
    -1
      src/components/Template/CustomTable.vue
  2. +15
    -7
      src/views/business/comps/template/comps/sp/SP00456.vue
  3. +27
    -1
      src/views/business/comps/template/comps/sp/comps/LadderConfig.vue
  4. +5
    -2
      src/views/business/comps/template/formConfig/paralleAndLadderConfig.js

+ 1
- 1
src/components/Template/CustomTable.vue View File

@ -1060,7 +1060,7 @@ export default {
}, },
onAddRow() { onAddRow() {
if (this.$listeners && this.$listeners['onAddRow']) { if (this.$listeners && this.$listeners['onAddRow']) {
this.$emit('onAddRow');
this.$emit('onAddRow',{dataSource:this.localDataSource});
return; return;
} }
this.addRow({ this.addRow({

+ 15
- 7
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -47,7 +47,9 @@
:showOperation="fillType === 'actFill' || fillType === 'preFill'" :showOperation="fillType === 'actFill' || fillType === 'preFill'"
:tableColumns="ladderStepColumns" :prefixKey="'ladder_' + ladderIndex" :tableColumns="ladderStepColumns" :prefixKey="'ladder_' + ladderIndex"
:configType="'ladder'" :ref="`ladderRef_${ladderIndex}`" :configType="'ladder'" :ref="`ladderRef_${ladderIndex}`"
:fieldItemLabel="'template.common.jtpz'"
:sn = "sn"
ladderType = "bq"
:fieldItemLabel="getOperationStepsLabel()"
:showHeader="!isPcr234" :showHeader="!isPcr234"
@deleteConfig="deleteConfig('ladderConfigs', ladderConfig)" :fillType="fillType" /> @deleteConfig="deleteConfig('ladderConfigs', ladderConfig)" :fillType="fillType" />
</div> </div>
@ -59,12 +61,12 @@
:showOperation="fillType === 'actFill' || fillType === 'preFill'" :showOperation="fillType === 'actFill' || fillType === 'preFill'"
:tableColumns="paralleStepColumns" :prefixKey="'paralle_' + paralleIndex" :tableColumns="paralleStepColumns" :prefixKey="'paralle_' + paralleIndex"
:configType="'paralle'" :ref="`paralleRef_${paralleIndex}`" :configType="'paralle'" :ref="`paralleRef_${paralleIndex}`"
:fieldItemLabel="'template.common.pxpz'"
:fieldItemLabel="getOperationStepsLabel()"
:showHeader="!isPcr234" :showHeader="!isPcr234"
:showHeaderLabel="!isGsp" :showHeaderLabel="!isGsp"
@deleteConfig="deleteConfig('paralleConfigs', paralleConfig)" :fillType="fillType" /> @deleteConfig="deleteConfig('paralleConfigs', paralleConfig)" :fillType="fillType" />
</div> </div>
<template v-if="sn === 'LBA005' || sn === 'ADA005'">
<template v-if="sn === 'LBA005'">
<LineLabel :label="$t('template.lba.lba005.zkpz')" /> <LineLabel :label="$t('template.lba.lba005.zkpz')" />
<div v-if="fillType === 'preFill'" class="mt-20"> <div v-if="fillType === 'preFill'" class="mt-20">
<el-button type="primary" @click="handleAddConfig('paralleConfigs_1')">{{ <el-button type="primary" @click="handleAddConfig('paralleConfigs_1')">{{
@ -81,7 +83,7 @@
:showOperation="fillType === 'actFill' || fillType === 'preFill'" :showOperation="fillType === 'actFill' || fillType === 'preFill'"
:tableColumns="ladderStepColumns" :prefixKey="'ladder_1_' + ladderIndex" :tableColumns="ladderStepColumns" :prefixKey="'ladder_1_' + ladderIndex"
:configType="'ladder'" :ref="`ladderRef_1_${ladderIndex}`" :configType="'ladder'" :ref="`ladderRef_1_${ladderIndex}`"
:fieldItemLabel="'template.common.jtpz'"
:fieldItemLabel="'template.lba.lba005.zkpz'"
@deleteConfig="deleteConfig('ladderConfigs_1', ladderConfig)" :fillType="fillType" /> @deleteConfig="deleteConfig('ladderConfigs_1', ladderConfig)" :fillType="fillType" />
</div> </div>
@ -90,9 +92,9 @@
:key="'paralle_1_' + paralleConfig.id"> :key="'paralle_1_' + paralleConfig.id">
<LadderConfig :currentFormConfig="paralleStepFormConfig" :currentFormData="paralleConfig" <LadderConfig :currentFormConfig="paralleStepFormConfig" :currentFormData="paralleConfig"
:showOperation="fillType === 'actFill' || fillType === 'preFill'" :showOperation="fillType === 'actFill' || fillType === 'preFill'"
:tableColumns="paralleStepColumns" :prefixKey="'paralle_1_' + paralleIndex"
:tableColumns="paralleStepColumns1" :prefixKey="'paralle_1_' + paralleIndex"
:configType="'paralle'" :ref="`paralleRef_1_${paralleIndex}`" :configType="'paralle'" :ref="`paralleRef_1_${paralleIndex}`"
:fieldItemLabel="'template.common.pxpz'"
:fieldItemLabel="'template.lba.lba005.zkpz'"
@deleteConfig="deleteConfig('paralleConfigs_1', paralleConfig)" :fillType="fillType" /> @deleteConfig="deleteConfig('paralleConfigs_1', paralleConfig)" :fillType="fillType" />
</div> </div>
</template> </template>
@ -189,11 +191,17 @@ export default {
paralleStepFormConfig() { paralleStepFormConfig() {
return getParalleStepFormConfig(this); return getParalleStepFormConfig(this);
}, },
paralleStepFormConfig1() {
return getParalleStepFormConfig(this);
},
// //
ladderStepFormConfig() { ladderStepFormConfig() {
return getLadderFormConfig(this); return getLadderFormConfig(this);
}, },
paralleStepColumns() { paralleStepColumns() {
return getParallelColumnsConfig(this,this.sn);
},
paralleStepColumns1() {
return getParallelColumnsConfig(this); return getParallelColumnsConfig(this);
}, },
// //
@ -238,7 +246,7 @@ export default {
getOperationStepsLabel() { getOperationStepsLabel() {
const obj = { const obj = {
"LBA005": "template.lba.lba005.bzqxpz",//线 "LBA005": "template.lba.lba005.bzqxpz",//线
"ADA005": "template.lba.lba005.bzqxpz",//线
"ADA005": "template.lba.lba005.zkpz",//
"GSP007": "template.gsp.gsp007.bzqx",//线 "GSP007": "template.gsp.gsp007.bzqx",//线
// "LBA007": "template.lba.lba005.bzqxpz",// // "LBA007": "template.lba.lba005.bzqxpz",//
} }

+ 27
- 1
src/views/business/comps/template/comps/sp/comps/LadderConfig.vue View File

@ -19,6 +19,7 @@
:columns="tableColumns" :formData="currentFormData" @bodySelectChange="bodySelectChange" :columns="tableColumns" :formData="currentFormData" @bodySelectChange="bodySelectChange"
@beforeSaveRecord="(data) => onBeforeSaveRecord(data)" @beforeSaveRecord="(data) => onBeforeSaveRecord(data)"
@headerSelectChange="(data) => onHeaderSelectChange(data)" @headerSelectChange="(data) => onHeaderSelectChange(data)"
@onAddRow="(e) => onAddRow(e)"
@beforeReagentSubmit="(data) => onTableBeforeReagentSubmit(data)" @beforeReagentSubmit="(data) => onTableBeforeReagentSubmit(data)"
@onRegentSubmit="(data) => onTableRegentSubmit(data)" :prefixKey="prefixKey" @onRegentSubmit="(data) => onTableRegentSubmit(data)" :prefixKey="prefixKey"
:fieldItemLabel="fieldItemLabel"> :fieldItemLabel="fieldItemLabel">
@ -44,6 +45,7 @@ import BaseInfoFormPackage from '@/components/Template/BaseInfoFormPackage.vue';
import templateMixin from "../../../mixins/templateMixin.js"; import templateMixin from "../../../mixins/templateMixin.js";
import { addTj } from "@/utils/calUnitTools"; import { addTj } from "@/utils/calUnitTools";
import { isCommonUnit } from "@/utils/conTools"; import { isCommonUnit } from "@/utils/conTools";
import {getuuid,justUpdateFilledFormData} from "@/utils/index.js"
export default { export default {
components: { components: {
@ -94,9 +96,33 @@ export default {
configType: { configType: {
type: String, type: String,
default: 'ladder', default: 'ladder',
}
},
sn: {
type: String,
default: '',
},
ladderType: {
type: String,
default: '',
},
}, },
methods: { methods: {
//
onAddRow(e) {
const {dataSource} = e;
const rowInfo = {
actSolutionVolumePrecision: 3,//3
actSolutionConcentrationPrecision: 3,//3
targetDiluentVolumePrecision: 3,//3
targetStartSolutionVolumePrecision: 3,//3
id:getuuid(),
};
if(this.ladderType === 'bq' && this.sn =="LBA005"){
rowInfo.targetSolutionCode = `LBA-STD${dataSource.length + 1}`;
}
this.$refs.tableRef?.addRow(rowInfo);
justUpdateFilledFormData()
},
deleteConfig() { deleteConfig() {
this.$emit('deleteConfig', this.configType); this.$emit('deleteConfig', this.configType);
}, },

+ 5
- 2
src/views/business/comps/template/formConfig/paralleAndLadderConfig.js View File

@ -224,8 +224,11 @@ export const getLadderColumnsConfig = ($this) => {
] ]
} }
// 平行配置表格列配置 // 平行配置表格列配置
export const getParallelColumnsConfig = ($this) => {
const dic = optionsCode[$this.sn] || 'business_sp_nbgzy'
export const getParallelColumnsConfig = ($this,sn) => {
let dic = optionsCode[$this.sn] || 'business_sp_nbgzy';
if(sn === "LBA005"){
dic = "business_lba_bqpx";
}
return [ return [
{ {
label: 'template.sp.sp00456.mbrybh', label: 'template.sp.sp00456.mbrybh',

Loading…
Cancel
Save