Browse Source

feat:[模板管理]xb001

ouqian
ZHANGTENG\张腾 1 month ago
parent
commit
8de94cdaa3
8 changed files with 742 additions and 2 deletions
  1. +4
    -1
      src/lang/en.js
  2. +14
    -0
      src/lang/en/template/xb.js
  3. +4
    -1
      src/lang/zh.js
  4. +14
    -0
      src/lang/zh/template/xb.js
  5. +7
    -0
      src/views/business/comps/template/TemplateTable.vue
  6. +336
    -0
      src/views/business/comps/template/comps/xb/XB001.vue
  7. +361
    -0
      src/views/business/comps/template/formConfig/xb/xb001.js
  8. +2
    -0
      src/views/business/comps/template/mixins/templateMixin.js

+ 4
- 1
src/lang/en.js View File

@ -29,6 +29,8 @@ import yp from './en/template/yp'
import ada from './en/template/ada' import ada from './en/template/ada'
//毒理模板 //毒理模板
import dl from './en/template/dl' import dl from './en/template/dl'
//细胞模板
import xb from './zh/template/xb'
// 试验管理 // 试验管理
import study from './en/business/study/study' import study from './en/business/study/study'
@ -202,6 +204,7 @@ export default {
lba: lba, lba: lba,
yp: yp, yp: yp,
ada: ada, ada: ada,
dl: dl
dl: dl,
xb: xb,
} }
} }

+ 14
- 0
src/lang/en/template/xb.js View File

@ -0,0 +1,14 @@
//细胞
export default {
xb001: {
jcsj: '检测时间',
czbz: 'Operation Workflow',
qtbz: '其他步骤',
fj: 'Attachment',
fpc: '分批次',
zb: '组别',
lx: '类型',
fysc: '孵育时长(hr: min)'
},
}

+ 4
- 1
src/lang/zh.js View File

@ -29,6 +29,8 @@ import yp from './zh/template/yp'
import ada from './zh/template/ada' import ada from './zh/template/ada'
//毒理模板 //毒理模板
import dl from './zh/template/dl' import dl from './zh/template/dl'
//细胞模板
import xb from './zh/template/xb'
// 试验管理 // 试验管理
import study from './zh/business/study/study' import study from './zh/business/study/study'
@ -197,6 +199,7 @@ export default {
lba: lba, lba: lba,
yp: yp, yp: yp,
ada: ada, ada: ada,
dl: dl
dl: dl,
xb: xb,
} }
} }

+ 14
- 0
src/lang/zh/template/xb.js View File

@ -0,0 +1,14 @@
//细胞
export default {
xb001: {
jcsj: '检测时间',
czbz: '操作步骤',
qtbz: '其他步骤',
fj: '附件',
fpc: '分批次',
zb: '组别',
lx: '类型',
fysc: '孵育时长(hr: min)'
},
}

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

@ -74,6 +74,9 @@ import YP003 from "./comps/yp/YP003.vue";
import YP004 from "./comps/yp/YP004.vue"; import YP004 from "./comps/yp/YP004.vue";
import YP005 from "./comps/yp/YP005.vue"; import YP005 from "./comps/yp/YP005.vue";
//
import XB001 from "./comps/xb/XB001.vue";
// //
// DL001-SYWZPZJHB // DL001-SYWZPZJHB
// DL002-使SP001 // DL002-使SP001
@ -103,6 +106,8 @@ export default {
YP003, YP003,
YP004, YP004,
YP005, YP005,
//
XB001,
}, },
props: { props: {
sn: { sn: {
@ -191,6 +196,8 @@ export default {
'YP003': 'YP003', 'YP003': 'YP003',
'YP004': 'YP004', 'YP004': 'YP004',
'YP005': 'YP005', 'YP005': 'YP005',
//
'XB001': 'XB001',
// //
//DL001-SYWZPZJHB //DL001-SYWZPZJHB
'DL002': 'SP001', 'DL002': 'SP001',

+ 336
- 0
src/views/business/comps/template/comps/xb/XB001.vue View File

@ -0,0 +1,336 @@
<!-- 细胞CIC配制记录表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo"
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<!-- 操作步骤 -->
<LineLabel label="template.xb.xb001.czbz" />
<div class="template-form-item">
<div>第1步准备分析批</div>
<CustomTable
:ref="`tableFirstRef`"
:columns="tableFirstColumns"
:formData="formData"
:prefixKey = "`tableFirst`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow(rowIndex,'firstTable')" ></TableOpertaionDelete>
</template>
</CustomTable>
<div class="mb10">
<div>第2步</div>
<StepFormPackage ref = "stepFormPackageSecondRef" prefixKey="xb_czdsb" :form-config="stepSecondConfig" :formData = "formData" />
</div>
<div class="mb10">
<div>第3步</div>
<StepFormPackage ref = "stepFormPackageThirdRef" prefixKey="xb_czdtb" :form-config="stepThirdConfig" :formData = "formData" />
</div>
<div class="mb10">
<div>第4步</div>
<StepFormPackage ref = "stepFormPackageFourthRef" prefixKey="xb_czdfb" :form-config="stepFourthConfig" :formData = "formData" />
</div>
<div>
<div>第5步</div>
<StepFormPackage ref = "stepFormPackageFivthRef" prefixKey="xb_czdwb" :form-config="stepFivthConfig" :formData = "formData" />
<CustomTable
:ref="`tableSecondRef`"
:columns="tableSecondColumns"
:formData="formData"
:prefixKey = "`tableSecond`"
fieldItemLabel = "template.common.operationSteps"
:showOperation="fillType === 'preFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow(rowIndex,'secondTable')" ></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<div class="mb10">
<div>第6步</div>
<StepFormPackage ref = "stepFormPackageSixthRef" prefixKey="xb_czdlb" :form-config="stepSixthConfig" :formData = "formData" />
</div>
</div>
<LineLabel label="template.xb.xb001.qtbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.xb.xb001.fj" label="template.xb.xb001.fj"
ref="fjRef" :formConfig="getFjFormConfig" :formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click="onSave">保存</button> -->
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import stepMixins from '@/components/Template/mixins/stepMixins.js';
import CustomTable from '@/components/Template/CustomTable.vue';
import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue"
import StepFormPackage from "@/components/Template/StepFormPackage.vue"
import { getStepSecond, getStepThird, getStepFourth, getStepFivth, getStepSixth} from "../../formConfig/xb/xb001.js";
export default {
name: "XB001",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete, StepFormPackage },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
stepSecondConfig() {
return getStepSecond(this);
},
stepThirdConfig() {
return getStepThird(this);
},
stepFourthConfig() {
return getStepFourth(this);
},
stepFivthConfig() {
return getStepFivth(this);
},
stepSixthConfig() {
return getStepSixth(this);
},
stepFormConfig() {
return [
{
type: "step",
config: {
jz: {
label: 'template.sp.sp008.xzjz',
type: "input",
fillType: "preFill",
subType: "sj",
subKey: "subJz",
subFillType: "actFill",
maxlength: 20,
labelWidth: 80,
},
}
}
]
},
//
remarkConig() {
return [
{
type: "cellItem",
config: {
remark: {
label: "",
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
return [
{
type: "cardItem",
config: {
studyMc: {
label: 'template.common.testName',
type: "input",
disabled: true,
},
studySn: {
label: 'template.common.testNumber',
type: "input",
disabled: true,
},
}
},
{
type: "cellItem",
label: 'template.xb.xb001.jcsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
getFjFormConfig() {
return [
{
type: "attachment",
config: {
attTitle: {
label: 'template.xb.xb001.fj',
type: "attachment",
fillType: "actFill",
},
}
}
]
},
//
tableFirstColumns() {
return [{
label: 'template.xb.xb001.fpc',
prop: 'fpc',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 50,
},{
label: 'template.xb.xb001.zb',
prop: 'yjzbs',
bodyType: 'select',
bodyOptions: this.getDictOptions('business_xbzb'),
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 10,
otherCode: "preOther1",
},{
label: 'template.xb.xb001.lx',
prop: 'sjzbs',
bodyType: 'select',
bodyOptions: this.getDictOptions('business_xblx'),
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 10,
otherCode: "preOther2",
}]
},
//
tableSecondColumns() {
return [
{
label: 'template.xb.xb001.fpc',
prop: 'fpc',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280,
bodyMaxlength: 50,
},
{
label: 'template.common.startTime',
prop: 'startTime',
bodyType: 'input',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 50,
},
{
label: 'template.common.endTime',
prop: 'endTime',
bodyType: 'input',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 50,
},
{
label: 'template.xb.xb001.fysc',
prop: 'fysc',
bodyType: 'input',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 50,
},
]
},
},
data() {
return {
formData: {},
};
},
mounted() {
},
methods: {
//
getFilledFormData() {
return this.getFilledFormDataByRefs(
[
"baseInfoRef", "stepRef", "remarkRef",
"fjRef", "tableFirstRef", "stepFormPackageSecondRef",
"stepFormPackageThirdRef", "stepFormPackageFourthRef",
"stepFormPackageFivthRef", "tableSecondRef", "stepFormPackageSixthRef"
]
)
},
//
async getFormData() {
let content = await this.validFormFields([
"baseInfoRef", "stepRef", "remarkRef",
"fjRef", "tableFirstRef", "stepFormPackageSecondRef",
"stepFormPackageThirdRef", "stepFormPackageFourthRef",
"stepFormPackageFivthRef", "tableSecondRef", "stepFormPackageSixthRef"
]);
return content;
},
getResource() {
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
let content = await this.$refs.stepRef.getFormData();
console.log(content);
},
//
deleteRow(rowIndex,type) {
const tableRef1 = this.$refs['tableFirstRef'];
const tableRef2 = this.$refs['tableSecondRef'];
if (type == 'firstTable' && tableRef1) {
tableRef1.deleteRow(rowIndex);
}
if (type == 'secondTable' && tableRef2) {
tableRef2.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
</style>

+ 361
- 0
src/views/business/comps/template/formConfig/xb/xb001.js View File

@ -0,0 +1,361 @@
//操作第二步配置
export const getStepSecond = ($this) => {
return [{
config:{
text1:{
label:"待测样品于",
type:"text",
},
dcyb:{
type:"input",
fillType:"preFill",
},
text2:{
label:"解冻完成后,分别使用移液器",
type:"text",
},
yyqfirst:{
type:"yq",
fillType:"actFill",
},
text3:{
label:"取待测血清预计",
type:"text",
},
dcxqyj:{
type:"inputNumber",
fillType:"preFill",
},
dcxqyjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text4:{
label:"实际",
type:"text",
},
dcxqsj:{
type:"inputNumber",
fillType:"actFill",
compareTo:"dcxqyj",
copyFrom:"dcxqyj"
},
dcxqsjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"actFill",
compareTo:"dcxqyjdw",
copyFrom:"dcxqyjdw"
},
text5:{
label:"加入稀释深孔板,再分别使用移液器",
type:"text",
},
yyqsecond:{
type:"yq",
fillType:"actFill",
},
text6:{
label:"取BBS",
type:"text",
},
bbs:{
type:"sj",
fillType:"actFill",
},
text7:{
label:"预计",
type:"text",
},
bbsyj:{
type:"inputNumber",
fillType:"preFill",
},
bbsyjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text8:{
label:"实际",
type:"text",
},
bbssj:{
type:"inputNumber",
fillType:"actFill",
compareTo:"bbsyj",
copyFrom:"bbsyj"
},
bbssjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"actFill",
compareTo:"bbsyjdw",
copyFrom:"bbsyjdw"
},
text9:{
label:"加入稀释深孔板,放在摇床上",
type:"text",
},
yc:{
type:"yq",
fillType:"actFill",
},
text10:{
label:"充分摇匀。",
type:"text",
},
}
}]
}
//操作第三步配置
export const getStepThird = ($this) => {
return [{
config:{
text1:{
label:"分别使用移液器",
type:"text",
},
yyqfirst:{
type:"yq",
fillType:"actFill",
},
text2:{
label:"取BBS",
type:"text",
},
bbs:{
type:"sj",
fillType:"actFill",
},
text3:{
label:"预计",
type:"text",
},
bbsyj:{
type:"inputNumber",
fillType:"preFill",
},
bbsyjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text4:{
label:"实际",
type:"text",
},
bbssj:{
type:"inputNumber",
fillType:"actFill",
compareTo:"bbsyj",
copyFrom:"bbsyj"
},
bbssjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"actFill",
compareTo:"bbsyjdw",
copyFrom:"bbsyjdw"
},
text5:{
label:"加入对照管中,再分别使用移液器",
type:"text",
},
yyqsecond:{
type:"yq",
fillType:"actFill",
},
text6:{
label:"取PEG-NaF",
type:"text",
},
pegnaf:{
type:"sj",
fillType:"actFill",
},
text7:{
label:"预计",
type:"text",
},
pegnafyj:{
type:"inputNumber",
fillType:"preFill",
},
pegnafyjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text8:{
label:"实际",
type:"text",
},
pegnafsj:{
type:"inputNumber",
fillType:"actFill",
compareTo:"pegnafyj",
copyFrom:"pegnafyj"
},
pegnafsjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"actFill",
compareTo:"pegnafyjdw",
copyFrom:"pegnafyjdw"
},
text9:{
label:"加入测试管中。",
type:"text",
},
}
}]
}
//操作第四步配置
export const getStepFourth = ($this) => {
return [{
config:{
text1:{
label:"使用移液器",
type:"text",
},
yyq:{
type:"yq",
fillType:"actFill",
},
text2:{
label:"分别往对照管和测试管中各加入已稀释的待测血清预计",
type:"text",
},
dcxqyj:{
type:"inputNumber",
fillType:"preFill",
},
dcxqyjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"preFill",
},
text3:{
label:"实际",
type:"text",
},
dcxqsj:{
type:"inputNumber",
fillType:"actFill",
compareTo:"dcxqyj",
copyFrom:"dcxqyj"
},
dcxqsjdw:{
type:"select",
options:$this.getDictOptions("business_tjdw"),
fillType:"actFill",
compareTo:"dcxqyjdw",
copyFrom:"dcxqyjdw"
}
}
}]
}
//操作第五步配置
export const getStepFivth = ($this) => {
return [{
config:{
text1:{
label:"将以上缓冲液与血清放在摇床",
type:"text",
},
yc:{
type:"yq",
fillType:"actFill",
},
text2:{
label:"上充分混匀,置于孵育箱",
type:"text",
},
fyx:{
type:"yq",
fillType:"actFill",
},
text3:{
label:"中,设置预计温度",
type:"text",
},
yjwd:{
type:"inputNumber",
fillType:"preFill",
},
text4:{
label:"℃,实际温度",
type:"text",
},
sjwd:{
type:"inputNumber",
fillType:"actFill",
compareTo:"yjwd",
copyFrom:"yjwd"
},
text5:{
label:"℃,孵育",
type:"text",
},
fysj:{
type:"inputNumber",
fillType:"preFill",
},
text6:{
label:"小时。",
type:"text",
},
}
}]
}
//操作第六步配置
export const getStepSixth = ($this) => {
return [{
config:{
text1:{
label:"孵育完成后,使用移液器",
type:"text",
},
yyq:{
type:"yq",
fillType:"actFill",
},
text2:{
label:"将对照管和测试管的溶液转移至对应的比色皿,用紫外分光光度计",
type:"text",
},
zwfggdj:{
type:"yq",
fillType:"actFill",
},
text3:{
label:",设置预计波长",
type:"text",
},
yjbc:{
type:"inputNumber",
fillType:"preFill",
},
text4:{
label:"nm,实际波长",
type:"text",
},
sjbc:{
type:"inputNumber",
fillType:"actFill",
compareTo:"yjbc",
copyFrom:"yjbc"
},
text5:{
label:"nm,测定其OD值。",
type:"text",
},
}
}]
}

+ 2
- 0
src/views/business/comps/template/mixins/templateMixin.js View File

@ -33,6 +33,8 @@ export default {
'business_lba_jg', // LBA006-结果 'business_lba_jg', // LBA006-结果
'business_cftj', // 存放条件 'business_cftj', // 存放条件
'business_yplx', // 样品类型 'business_yplx', // 样品类型
'business_xbzb', // 细胞组别
'business_xblx', // 细胞类型
], ],
props: { props: {
templateData: { templateData: {

Loading…
Cancel
Save