Browse Source

feat:[模板管理][update]

ouqian
luojie 1 month ago
parent
commit
eea35e2f48
4 changed files with 45 additions and 18 deletions
  1. +4
    -3
      src/views/business/comps/template/TemplateTable.vue
  2. +12
    -3
      src/views/business/comps/template/comps/sp/SP00456.vue
  3. +5
    -1
      src/views/business/comps/template/comps/sp/comps/LadderConfig.vue
  4. +24
    -11
      src/views/business/comps/template/formConfig/paralleAndLadderConfig.js

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

@ -253,6 +253,7 @@ export default {
'GSP004': 'GSP004',
'GSP005': 'GSP005',
'GSP006': 'GSP002',
'GSP007': 'SP00456',
'GSP008': 'GSP002',
'GSP009': 'GSP009',
'GSP010': 'GSP010',
@ -266,9 +267,9 @@ export default {
'DMYPPZJLB': 'DMYPPZJLB',
//PCR
'PCR001': 'SP001',
'PCR002': 'PCR002',
'PCR003': 'PCR003',
'PCR004': 'PCR004',
'PCR002': 'SP00456',
'PCR003': 'SP00456',
'PCR004': 'SP00456',
'PCR005': 'PCR005',
'PCR006': 'SP0020',
'PCR007': 'PCR007',

+ 12
- 3
src/views/business/comps/template/comps/sp/SP00456.vue View File

@ -25,7 +25,7 @@
</CustomTable>
</div>
<LineLabel :label="getOperationStepsLabel()" />
<div v-if="fillType === 'preFill'" class="mt-20">
<div v-if="fillType === 'preFill' && !isPcr234" class="mt-20">
<el-button type="primary" @click="handleAddConfig('paralleConfigs')">{{
$t('template.common.xzpxpz')
}}</el-button>
@ -41,6 +41,7 @@
:tableColumns="ladderStepColumns" :prefixKey="'ladder_' + ladderIndex"
:configType="'ladder'" :ref="`ladderRef_${ladderIndex}`"
:fieldItemLabel="'template.common.jtpz'"
:showHeader="!isPcr234"
@deleteConfig="deleteConfig('ladderConfigs', ladderConfig)" :fillType="fillType" />
</div>
@ -52,9 +53,10 @@
:tableColumns="paralleStepColumns" :prefixKey="'paralle_' + paralleIndex"
:configType="'paralle'" :ref="`paralleRef_${paralleIndex}`"
:fieldItemLabel="'template.common.pxpz'"
:showHeader="!isPcr234"
@deleteConfig="deleteConfig('paralleConfigs', paralleConfig)" :fillType="fillType" />
</div>
<template v-if="sn === 'LBA005'">
<template v-if="sn === 'LBA005' || sn === 'ADA005'">
<LineLabel :label="$t('template.lba.lba005.zkpz')" />
<div v-if="fillType === 'preFill'" class="mt-20">
<el-button type="primary" @click="handleAddConfig('paralleConfigs_1')">{{
@ -192,7 +194,8 @@ export default {
},
},
data() {
const labArr = ["LBA005", "LBA007"];
const labArr = ["LBA005", "LBA007","ADA005","ADA007"];
const pcr234Arr = ["PCR002", "PCR003", "PCR004"];
const sn = this.sn || '';
return {
subSolutionVisible: false,
@ -206,6 +209,7 @@ export default {
currentRowData: {},//
isLba: labArr.includes(this.sn),
isSp: sn.includes('SP'),//
isPcr234: pcr234Arr.includes(this.sn),//PCR234
};
},
mounted() {
@ -215,12 +219,17 @@ export default {
this.handleUpdateCode(formData);
}, 0);
}
// PCR234
if(this.isPcr234 &&!this.formData.ladderConfigs){
this.handleAddConfig("ladderConfigs");
}
},
methods: {
//
getOperationStepsLabel() {
const obj = {
"LBA005": "template.lba.lba005.bzqxpz",//线
"ADA005": "template.lba.lba005.bzqxpz",//线
// "LBA007": "template.lba.lba005.bzqxpz",//
}
return obj[this.sn] || 'template.common.operationSteps';//

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

@ -1,6 +1,6 @@
<template>
<div class="template-form-item">
<div class="config-header">
<div class="config-header" v-if="showHeader">
<div>{{ $t(fieldItemLabel) }}</div>
<el-popconfirm title="确认删除当前配置?" @confirm="deleteConfig">
<el-button slot="reference" v-if="fillType === 'preFill'" type="text" icon="el-icon-delete" >{{
@ -53,6 +53,10 @@ export default {
name: "LadderConfig",
mixins: [templateMixin],
props: {
showHeader: {//
type: Boolean,
default: true,
},
fillType: {
type: String,
default: '',

+ 24
- 11
src/views/business/comps/template/formConfig/paralleAndLadderConfig.js View File

@ -34,13 +34,32 @@ const explainConfig = {
}
}
}
//编号对应的数据字典code
const optionsCode = {
SP004: 'business_sp_nbgzy',
SP005: 'business_sp_zkgzy',
SP006: 'business_sp_bzqxzkypzbb',
PCR002: 'business_pcr_gzy',
PCR003: 'business_pcr_fxbzqxzbb',
PCR004: 'business_pcr_fxzkypzbb',
GSP007:"",
PCR013:"",
LBA005:"",
LBA007:"",
ADA005:"",
ADA007:"",
}
// 阶梯配置表格列配置
export const getLadderColumnsConfig = ($this) => {
const dic = optionsCode[$this.sn] || 'business_sp_nbgzy'
return [
{
label: 'template.sp.sp00456.mbrybh',
prop: 'targetSolutionCode',
bodyType: 'input',
bodyType: 'select',
bodyOptions: $this.getDictOptions(dic),
bodySubType: 'span',
bodySubKey: 'subTargetSolutionCode',
bodyFillType: 'preFill',
@ -205,13 +224,7 @@ export const getLadderColumnsConfig = ($this) => {
}
// 平行配置表格列配置
export const getParallelColumnsConfig = ($this) => {
const sn = $this.sn
let o = {
SP004: 'business_sp_nbgzy',
SP005: 'business_sp_zkgzy',
SP006: 'business_sp_bzqxzkypzbb'
}
const dic = o[sn] || 'business_sp_nbgzy'
const dic = optionsCode[$this.sn] || 'business_sp_nbgzy'
return [
{
label: 'template.sp.sp00456.mbrybh',
@ -510,7 +523,7 @@ export const getLadderFormConfig = ($this) => {
}
}
]
if (sn === 'LBA007') {
if (sn === 'LBA007' || sn === 'ADA007') {
defaultConfig.unshift(explainConfig)
}
return defaultConfig
@ -519,7 +532,7 @@ export const getLadderFormConfig = ($this) => {
//试验基本信息
export const getBaseInfoFormConfig = ($this) => {
const sn = $this.sn
const labArr = ['LBA005', 'LBA007']
const labArr = ['LBA005', 'LBA007','ADA005','ADA007']
const isLba = labArr.includes(sn)
const isSp = sn.includes('SP')//是否是色谱
return [
@ -679,7 +692,7 @@ export const getParalleStepFormConfig = ($this) => {
}
]
const sn = $this.sn
if (sn === 'LBA007') {
if (sn === 'LBA007' || sn === 'ADA007') {
defaultConfig.unshift(explainConfig)
}
return defaultConfig

Loading…
Cancel
Save