Browse Source

feat:[模板管理][update]

luojie
luojie 6 days ago
parent
commit
1e555e600d
6 changed files with 62 additions and 22 deletions
  1. +4
    -0
      src/lang/en/template/commonTemplate.js
  2. +5
    -0
      src/lang/zh/template/commonTemplate.js
  3. +1
    -1
      src/views/business/comps/template/TemplateTable.vue
  4. +40
    -15
      src/views/business/comps/template/comps/sp/SP00456.vue
  5. +12
    -0
      src/views/business/comps/template/formConfig/paralleAndLadderConfig.js
  6. +0
    -6
      src/views/business/comps/template/mixins/paralleAndladderMixin.js

+ 4
- 0
src/lang/en/template/commonTemplate.js View File

@ -18,6 +18,10 @@ export default {
pxpz:'平行配制',
xzjtpz:'新增阶梯配制',
jtpz:'阶梯配制',
xztdxs:'新增梯度稀释',
tdxs:'梯度稀释',
xzzlpx:'新增质量平行',
zlpx:'质量平行',
// 字段标签
sjInfo:'Reagent Info',

+ 5
- 0
src/lang/zh/template/commonTemplate.js View File

@ -24,6 +24,11 @@ export default {
pxpz:'平行配制',
xzjtpz:'新增阶梯配制',
jtpz:'阶梯配制',
xztdxs:'新增梯度稀释',
tdxs:'梯度稀释',
xzzlpx:'新增质量平行',
zlpx:'质量平行',
// 字段标签
storageConditionLabel: '存储条件',

+ 1
- 1
src/views/business/comps/template/TemplateTable.vue View File

@ -248,7 +248,7 @@ export default {
'GSP001': 'GSP001',
'GSP002': 'GSP002',
'GSP003': 'GSP003',
'GSP004': 'GSP004',
'GSP004': 'SP00456',
'GSP005': 'GSP005',
'GSP006': 'GSP002',
'GSP007': 'SP00456',

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

@ -27,7 +27,7 @@
</CustomTable>
</div>
<LineLabel :label="getOperationStepsLabel()" />
<div v-if="fillType === 'preFill' && !isPcr234" class="mt-20">
<div v-if="fillType === 'preFill' && !isPcr234 && !isGsp4" class="mt-20">
<el-button type="primary" @click="handleAddConfig('paralleConfigs')">{{
$t('template.common.xzpxpz')
}}</el-button>
@ -35,21 +35,39 @@
$t('template.common.xzjtpz')
}}</el-button>
</div>
<div v-if="isGsp4">
<el-button type="primary" @click="handleAddConfig('paralleConfigs')">{{
$t('template.common.xzpxpz')
}}</el-button>
<el-button type="primary" @click="handleAddConfig('paralleMassConfigs')">{{
$t('template.common.xzzlpx')
}}</el-button>
<el-button type="primary" @click="handleAddConfig('ladderConfigs')">{{
$t('template.common.xztdxs')
}}</el-button>
</div>
<!-- 阶梯配制区域 -->
<div v-for="(ladderConfig, ladderIndex) in formData.ladderConfigs"
:key="'ladder_' + ladderConfig.id">
<LadderConfig :currentFormConfig="ladderStepFormConfig" :currentFormData="ladderConfig"
:showOperation="fillType === 'actFill' || fillType === 'preFill'"
:tableColumns="ladderStepColumns" :prefixKey="'ladder_' + ladderIndex"
:configType="'ladder'" :ref="`ladderRef_${ladderIndex}`"
:sn = "sn"
ladderType = "bq"
:fieldItemLabel="getTableLabel('ladder')"
:showHeader="!isPcr234"
:configType="'ladder'" :ref="`ladderRef_${ladderIndex}`" :sn="sn" ladderType="bq"
:fieldItemLabel="getTableLabel('ladder')" :showHeader="!isPcr234"
@deleteConfig="deleteConfig('ladderConfigs', ladderConfig)" :fillType="fillType" />
</div>
<!-- 质量平行配制区域 -->
<div v-for="(paralleConfig, paralleIndex) in formData.paralleMassConfigs"
:key="'zl_paralle_' + paralleConfig.id">
<LadderConfig :currentFormConfig="paralleStepFormConfig" :currentFormData="paralleConfig"
:showOperation="fillType === 'actFill' || fillType === 'preFill'"
:tableColumns="paralleStepColumns" :prefixKey="'zl_paralle_' + paralleIndex"
:configType="'paralle'" :ref="`zl_paralleRef_${paralleIndex}`"
:fieldItemLabel="getTableLabel('zl_paralle')" :showHeader="!isPcr234"
@deleteConfig="deleteConfig('paralleMassConfigs', paralleConfig)" :fillType="fillType" />
</div>
<!-- 平行配制区域 -->
<div v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs"
:key="'paralle_' + paralleConfig.id">
@ -57,8 +75,7 @@
:showOperation="fillType === 'actFill' || fillType === 'preFill'"
:tableColumns="paralleStepColumns" :prefixKey="'paralle_' + paralleIndex"
:configType="'paralle'" :ref="`paralleRef_${paralleIndex}`"
:fieldItemLabel="getTableLabel('paralle')"
:showHeader="!isPcr234"
:fieldItemLabel="getTableLabel('paralle')" :showHeader="!isPcr234"
@deleteConfig="deleteConfig('paralleConfigs', paralleConfig)" :fillType="fillType" />
</div>
<template v-if="sn === 'LBA005'">
@ -194,7 +211,7 @@ export default {
return getLadderFormConfig(this);
},
paralleStepColumns() {
return getParallelColumnsConfig(this,this.sn);
return getParallelColumnsConfig(this, this.sn);
},
paralleStepColumns1() {
return getParallelColumnsConfig(this);
@ -205,7 +222,7 @@ export default {
},
},
data() {
const labArr = ["LBA005", "LBA007","ADA005","ADA007"];
const labArr = ["LBA005", "LBA007", "ADA005", "ADA007"];
const pcr234Arr = ["PCR002", "PCR003", "PCR004"];
const pcr34Arr = ["PCR003", "PCR004"];
const sn = this.sn || '';
@ -223,6 +240,7 @@ export default {
isSp: sn.startsWith('SP'),//
isPcr: sn.startsWith('PCR'),//PCR
isGsp: sn.startsWith('GSP'),//
isGsp4: sn === "GSP004",//
isPcr234: pcr234Arr.includes(this.sn),//PCR234
isPcr34: pcr34Arr.includes(this.sn),//PCR34
};
@ -235,7 +253,7 @@ export default {
}, 0);
}
// PCR234
if(this.isPcr234 &&!this.formData.ladderConfigs){
if (this.isPcr234 && !this.formData.ladderConfigs) {
this.handleAddConfig("ladderConfigs");
}
},
@ -252,10 +270,17 @@ export default {
},
//
getTableLabel(type) {
const obj = {
let obj = {
"paralle": "template.common.pxpz",//线
"ladder": "template.common.jtpz",//
}
if(this.isGsp4){
obj = {
"paralle": "template.common.pxpz",//
"ladder": "template.common.tdxs",//
"zl_paralle": "template.common.zlpx",//
}
}
return obj[type] || '';//
},
//
@ -390,7 +415,7 @@ export default {
let conditionData = {}, jcbData = [];
if (this.isSp) {
conditionData = this.$refs.storageConditionRef?.getFilledFormData();
} else if(this.isLba) {
} else if (this.isLba) {
jcbData = this.$refs.jcbRef.getFilledFormData();
}
const remarkData = this.$refs.remarkRef.getFilledFormData();
@ -638,7 +663,7 @@ export default {
const stepResource = this.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
console.log(this.resourceTmp,"resourceTmp")
console.log(this.resourceTmp, "resourceTmp")
return this.resourceTmp;
},
getStepResource() {

+ 12
- 0
src/views/business/comps/template/formConfig/paralleAndLadderConfig.js View File

@ -35,6 +35,18 @@ const explainConfig = {
}
}
const config1 = {
sfxyzjfx: {
label: 'template.gsp.GSP003.sfxyzjfx',
type: "select",
fillType: "actFill",
options: [
{ label: '是', value: '是' },
{ label: '否', value: '否' }
]
},
}
//编号对应的数据字典code
const optionsCode = {
SP004: 'business_sp_nbgzy',

+ 0
- 6
src/views/business/comps/template/mixins/paralleAndladderMixin.js View File

@ -1,6 +0,0 @@
import moment from "moment";
export default {
methods: {
},
}

Loading…
Cancel
Save