luojie 1 month ago
parent
commit
33ca2729b0
12 changed files with 509 additions and 50 deletions
  1. +31
    -0
      src/components/Template/Step.vue
  2. +9
    -1
      src/components/Template/StepComponents/qxwdx/qxjz.vue
  3. +120
    -0
      src/components/Template/StepComponents/ypfq/fq2.vue
  4. +67
    -0
      src/components/Template/StepComponents/ypfq/hh.vue
  5. +59
    -0
      src/components/Template/StepComponents/zzqx/qx.vue
  6. +47
    -0
      src/components/Template/StepComponents/zzqx/qy.vue
  7. +68
    -0
      src/components/Template/StepComponents/zzqx/zc.vue
  8. +1
    -1
      src/components/Template/mixins/stepMixins.js
  9. +1
    -1
      src/lang/en/template/pcr.js
  10. +2
    -2
      src/lang/zh/template/pcr.js
  11. +99
    -41
      src/views/business/comps/template/comps/pcr/PCR008.vue
  12. +5
    -4
      src/views/business/comps/template/formConfig/PCRTableConfig.js

+ 31
- 0
src/components/Template/Step.vue View File

@ -149,6 +149,18 @@ import qxlx from './StepComponents/qxwdx/qxlx.vue';//全血稳定性-全血离
//-使-
//-使-
//
import fq2 from './StepComponents/ypfq/fq2.vue';//-2
//-3使-2
import hh from './StepComponents/ypfq/hh.vue';//-
//
import qx from './StepComponents/zzqx/qx.vue';//-
import zc from './StepComponents/zzqx/zc.vue';//-
import qy from './StepComponents/zzqx/qy.vue';//-
import { public_templateStepList } from '@/api/business/public/public';
@ -289,6 +301,15 @@ export default {
qxfz,
qxjz,
qxlx,
//
fq2,
hh,
//
qx,
zc,
qy,
},
computed: {
stepComponentMap() {
@ -399,6 +420,16 @@ export default {
'qxlx':'qxlx',
'qxqy':'qxjz',
'jzhlx':'qxlx',
//
'fq2':'fq2',
'fq3':'fq2',
'hh':'hh',
//
'qx':'qx',
'zc':'zc',
'qy':'qy',
}
}

+ 9
- 1
src/components/Template/StepComponents/qxwdx/qxjz.vue View File

@ -66,7 +66,7 @@ export default {
compareTo: "yjhj",
},
text6: {
label: this.sn==='qxqy'?"条件下暂存,作为":"条件下静置,即稳定性",
label: this.sn==='qxqy'?"条件下暂存":"条件下静置,即稳定性",
type: "text",
},
}
@ -93,6 +93,14 @@ export default {
fillType: "actFill",
otherCode: "ccwzOther",
}
config[0].config.text8 = {
type: "text",
label: "作为",
}
config[0].config.yp = {
type: "input",
fillType: "actFill",
}
config[0].config.text9 = {
type: "text",
label: "样品。",

+ 120
- 0
src/components/Template/StepComponents/ypfq/fq2.vue View File

@ -0,0 +1,120 @@
<!-- 分取2 -->
<template>
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ypfq_fq2'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'fq2',
},
},
components: {
StepFormPackage
},
computed: {
formConfig() {
let config = [{
config: {
text1: {
label: "使用移液器",
type: "text",
},
yq: {
type: "yq",
fillType: "actFill",
},
text2: {
label: "将",
type: "text",
},
xqxj: {
type: "input",
fillType: "preFill",
},
text3: {
label: this.sn==='fq2'?"分为2管,第1管预计放入":this.sn==='fq3'?"分为3管,第1管预计放入":'',
type: "text",
},
yjfr: {
type: "inputNumber",
fillType: "preFill",
},
yjfrdw:{
type:"select",
options:this.getDictOptions("business_tjdw"),
selectTo:"sjfrdw",
fillType:"preFill",
},
text4: {
label: ",实际放入",
type: "text",
},
sjfr: {
type: "inputNumber",
fillType: "actFill",
compareTo:"yjfr",
copyFrom:"yjfr"
},
sjfrdw:{
type:"select",
options:this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
}
}]
if(this.sn==='fq2'){
config[0].config.text5 = {
label: ",剩余放入第2管。",
type: "text",
}
}
if(this.sn==='fq3'){
config[0].config.text5 = {
label: ",2管预计放入",
type: "text",
}
config[0].config.yjfr2 = {
type: "inputNumber",
fillType: "preFill",
}
config[0].config.yjfrdw2 = {
type:"select",
options:this.getDictOptions("business_tjdw"),
selectTo:"sjfrdw2",
fillType:"preFill",
}
config[0].config.text6 = {
label: ",实际放入",
type: "text",
}
config[0].config.sjfr2 = {
type: "inputNumber",
fillType: "actFill",
compareTo:"yjfr2",
copyFrom:"yjfr2"
}
config[0].config.sjfrdw2 = {
type:"select",
options:this.getDictOptions("business_tjdw"),
fillType:"preFill",
}
config[0].config.text7 = {
label: ",剩余放入第3管。",
type: "text",
}
}
return config
}
},
}
</script>
<style lang="scss" scoped></style>

+ 67
- 0
src/components/Template/StepComponents/ypfq/hh.vue View File

@ -0,0 +1,67 @@
<!-- 混合 -->
<template>
<StepFormPackage ref="stepFormPackageRef" :prefixKey="stepIndex+'_'+'ypfq_hh'" @resetRecord = "resetRecord" :form-config="formConfig" :formData="formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'hh',
},
},
components: {
StepFormPackage
},
computed: {
formConfig() {
let config = [{
config: {
text1: {
label: "将同一动物的胎仔血预计各取",
type: "text",
},
yjfr: {
type: "inputNumber",
fillType: "preFill",
},
yjfrdw:{
type:"select",
options:this.getDictOptions("business_tjdw"),
selectTo:"sjfrdw",
fillType:"preFill",
},
text4: {
label: ",实际各取",
type: "text",
},
sjfr: {
type: "inputNumber",
fillType: "actFill",
compareTo:"yjfr",
copyFrom:"yjfr"
},
sjfrdw:{
type:"select",
options:this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text5: {
label: "混匀。",
type: "text",
},
}
}]
return config
}
},
}
</script>
<style lang="scss" scoped></style>

+ 59
- 0
src/components/Template/StepComponents/zzqx/qx.vue View File

@ -0,0 +1,59 @@
<!-- 清洗 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'zzqx_qx'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'qx',
},
},
components: {
StepFormPackage
},
computed: {
formConfig() {
let config = [{
config:{
text1:{
label:"使用",
type:"text",
},
ry:{
type:"input",
fillType:"preFill",
},
sj:{
type:"sj",
fillType:"actFill",
},
text3:{
label:"冲洗,吸干水分,放置",
type:"text",
},
yq:{
type:"input",
fillType:"preFill",
},
text4:{
label:"。",
type:"text",
},
}
}]
return config
}
},
}
</script>
<style lang="scss" scoped>
</style>

+ 47
- 0
src/components/Template/StepComponents/zzqx/qy.vue View File

@ -0,0 +1,47 @@
<!-- 弃液 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'zzqx_qy'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'qy',
},
},
components: {
StepFormPackage
},
computed: {
formConfig() {
let config = [{
config:{
text1:{
label:"使用移液器",
type:"text",
},
sj:{
type:"yq",
fillType:"actFill",
},
text3:{
label:"仪器,将溶液移除。",
type:"text",
},
}
}]
return config
}
},
}
</script>
<style lang="scss" scoped>
</style>

+ 68
- 0
src/components/Template/StepComponents/zzqx/zc.vue View File

@ -0,0 +1,68 @@
<!-- 暂存 -->
<template>
<StepFormPackage ref = "stepFormPackageRef" :prefixKey="stepIndex+'_'+'zzqx_zc'" @resetRecord = "resetRecord" :form-config="formConfig" :formData = "formData" />
</template>
<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';
export default {
mixins: [stepMixins],
props: {
sn: {
type: String,
default: 'zc',
},
},
components: {
StepFormPackage
},
computed: {
formConfig() {
let config = [{
config:{
text1:{
label:"预计在",
type:"text",
},
yjzc:{
type:"select",
options:this.getDictOptions("business_zzzc"),
fillType:"preFill",
otherCode: "yjzcOther",
},
text3:{
label:"条件下暂存,实际在",
type:"text",
},
sjzc:{
type:"select",
options:this.getDictOptions("business_zzzc"),
fillType:"actFill",
otherCode: "sjzcOther",
compareTo: "yjzc",
},
text3:{
label:"条件下暂存,暂存至放入",
type:"text",
},
yq:{
type:"input",
fillType:"preFill",
},
text4:{
label:"。",
type:"text",
},
}
}]
return config
}
},
}
</script>
<style lang="scss" scoped>
</style>

+ 1
- 1
src/components/Template/mixins/stepMixins.js View File

@ -2,7 +2,7 @@ export default {
dicts:[
"business_tjdw","business_czhj","business_rqcz","business_zldw",
"business_yqscdw","business_zsdw","business_wddw","business_ccwz","business_ggdw",
"business_hjxx"
"business_hjxx","business_zzzc"
],
props: {
formData: {

+ 1
- 1
src/lang/en/template/pcr.js View File

@ -52,7 +52,7 @@ export default {
ypmc: '样品名称',
cyqypgsjyjtjtj: '采样前样品管试剂预计添加体积',
cyqypgsjsjtjtj: '采样前样品管试剂实际添加体积',
cygzl: '采集管重量',
cjgzl: '采集管重量',
czsj: '称重时间',
clpbh: 'Analysis Batch Number',
ypmc: '样品名称',

+ 2
- 2
src/lang/zh/template/pcr.js View File

@ -51,7 +51,7 @@ export default {
ypmc: '样品名称',
cyqypgsjyjtjtj: '采样前样品管试剂预计添加体积',
cyqypgsjsjtjtj: '采样前样品管试剂实际添加体积',
cygzl: '采集管重量',
cjgzl: '采集管重量',
czsj: '称重时间',
clpbh: 'Analysis Batch Number',
ypmc: '样品名称',
@ -66,7 +66,7 @@ export default {
},
pcr008: {
czb: '称重表',
clsj: 'Work Time',
clsj: '处理时间',
yjry: '匀浆溶液',
bs: '倍数',
yjyjry: '已加匀浆溶液',

+ 99
- 41
src/views/business/comps/template/comps/pcr/PCR008.vue View File

@ -15,7 +15,8 @@
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" @onRegentSubmit="onRegentSubmit" />
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData"
@beforeReagentSubmit="onBeforeReagentSubmit" @onRegentSubmit="onRegentSubmit" />
<div v-if="fillType == 'preFill'">
<el-button :disabled="deleteRows.length === 0" type="danger" @click="onClickDelete">{{
$t('form.delete') }}</el-button>
@ -230,16 +231,66 @@ export default {
this.onHandleTableBlur()
},
methods: {
onRegentSubmit(data){
console.log(data,"回调")
onBeforeReagentSubmit(data) {
const { selectData, callback } = data;
let selectedRows = selectData.selectedRows
let cjgzlUnit;
let error = false;
if (selectedRows) {
selectedRows.forEach(item => {
let bdnr = JSON.parse(item.bdnr)
if (!cjgzlUnit) {
cjgzlUnit = bdnr.headerSelectFields.cjgzlUnit
}
if (cjgzlUnit != bdnr.headerSelectFields.cjgzlUnit) {
error = true
}
})
}
if (error) {
callback.prevent("所选表单单位不一致,请重新选择")
}
},
onRegentSubmit(data) {
let addRows = []
let selectedRows = data.selectInfo.selectedRows
let cjgzlUnit;
if (selectedRows) {
selectedRows.forEach(item => {
let bdnr = JSON.parse(item.bdnr)
if (!cjgzlUnit) {
cjgzlUnit = bdnr.headerSelectFields.cjgzlUnit
}
if (bdnr.stepTableFormData) {
bdnr.stepTableFormData.forEach(row => {
addRows.push({
ypmc: row.ypmc,
cjgz: row.cjgzl,
targetStartSolutionVolumePrecision: 3,
targetDiluentVolumePrecision: 3
})
})
}
})
if (addRows) {
this.$refs.stepTableRef.addRows(addRows)
let content = this.getFilledFormData();
setTimeout(() => {
this.justUpdateFilledFormData();
}, 100);
}
}
},
onClickDelete() {
this.$modal.confirm(this.$t('form.confirmDelete')).then(() => {
this.$refs.stepTableRef.deleteSelectedRows(this.deleteRows)
this.$refs.stepTableRef.justUpdateFilledFormData();
setTimeout(() => {
this.justUpdateFilledFormData();
}, 100);
}).catch(() => { });
},
handleSelectionChange(row) {
this.deleteRows = []
@ -259,17 +310,35 @@ export default {
let content = this.getFilledFormData();
let bs = content.bs
content
let yjyjry = content.yjyjry
let yjyjryUnit = content.yjyjryUnit
if (this.fillType === "actFill") {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
let item = tableList[i]
let cqzl = item.cqzl * bs
//
console.log(item)
let lzzcz = item.lzzcz
let cjgz = item.cjgz
let tabZzzl;
// =
if(lzzcz && cjgz) {
let temp = subTj([lzzcz, cjgz], [content.headerSelectFields.lzzczUnit, content.headerSelectFields.cjgzUnit])
let zzzl = temp.total
let zzzlUnit = temp.unit
tabZzzl = volumeConverter.convert(zzzl + zzzlUnit, content.headerSelectFields.zzzlUnit)
tableList[i].zzzl = tabZzzl
}
// =
let ysyjrybjrl = volumeConverter.convert(cqzl + content.headerSelectFields.cqzlUnit, content.headerSelectFields.ysyjrybjrlUnit)
tableList[i].ysyjrybjrl = ysyjrybjrl
if(tabZzzl && bs && yjyjry) {
let temp = subTj([tabZzzl * bs, yjyjry], [content.headerSelectFields.zzzlUnit, yjyjryUnit])
let ysyjrybjrl = temp.total
let ysyjrybjrlUnit = temp.unit
ysyjrybjrl = volumeConverter.convert(ysyjrybjrl + ysyjrybjrlUnit, content.headerSelectFields.ysyjrybjrlUnit)
tableList[i].ysyjrybjrl = ysyjrybjrl
}
}
}
this.$refs.stepTableRef.updateDataSource(tableList);
@ -289,36 +358,25 @@ export default {
//resource
let tmpResource = []
if (this.fillType === "actFill") {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
//
let item = tableList[i]
console.log('表格item:' + JSON.stringify(item))
//使
tmpResource.push({
mc: null,
bh: content.subSolution,
ph: null,
ndz: null,
nd: null,
nddw: null,
ly: 'ELN配制',
sxrq: null,
kc: null,
kcdw: null,
syl: item.ysxsyxytj,
type: 1,
elnType: this.product,
syldw: content.headerSelectFields.sjxsyxytjUnit,
yxzq: null,
yxzqdw: null,
})
}
}
//使
tmpResource.push({
mc: null,
bh: content.yjrybh,
ph: null,
ndz: null,
nd: null,
nddw: null,
ly: null,
sxrq: null,
kc: null,
kcdw: null,
syl: content.yjyjry,
type: 1,
elnType: this.product,
syldw: content.yjyjryUnit,
yxzq: null,
yxzqdw: null,
})
}
if (tmpResource.length > 0) {
tmpResource = uniqeResourceOne(tmpResource)

+ 5
- 4
src/views/business/comps/template/formConfig/PCRTableConfig.js View File

@ -735,12 +735,12 @@ export const getPCR007Config = ($this) => {
bodyMaxlength: 10,
},
{
label: 'template.pcr.pcr007.cygzl',
prop: 'cygzl',
label: 'template.pcr.pcr007.cjgzl',
prop: 'cjgzl',
width: 280,
showWidth: 180,
fillType: 'preFill',
headerSelectKey: 'cygzlUnit',
headerSelectKey: 'cjgzlUnit',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
@ -794,10 +794,11 @@ export const getPCR008Config = ($this) => {
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
bodySubType: 'inputNumber',
bodyFillType: 'actFill',
bodySubType: 'button',
bodySubButtonName: 'form.hqz',
bodySubFillType: 'actFill',
showBodySub: $this.fillType === 'actFill',
},
{
label: 'template.pcr.pcr008.zzzl',

Loading…
Cancel
Save