Browse Source

feat:[模板管理]新增-生物样品分析方法学质控配制表

lkf
15881625488@163.com 3 months ago
parent
commit
518347fed4
12 changed files with 919 additions and 563 deletions
  1. +13
    -0
      src/lang/en/template/gsp.js
  2. +5
    -0
      src/lang/en/template/sp.js
  3. +12
    -0
      src/lang/zh/template/gsp.js
  4. +5
    -0
      src/lang/zh/template/sp.js
  5. +10
    -7
      src/views/business/comps/template/TemplateTable.vue
  6. +1
    -1
      src/views/business/comps/template/comps/gsp/MJYLQSQD.vue
  7. +1
    -1
      src/views/business/comps/template/comps/gsp/SYWZPZJHB.vue
  8. +0
    -70
      src/views/business/comps/template/comps/sp/SP001.vue
  9. +387
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXZKPZB.vue
  10. +1
    -0
      src/views/business/template/list.vue

+ 13
- 0
src/lang/en/template/gsp.js View File

@ -0,0 +1,13 @@
//供试品
export default {
// 试验物质配制计划表
SYWZPZJHB: {
title:
'试验物质配制计划表',
},
// 麻醉/精神药品配制/领取申请单
MJYLQSQD: {
title: '麻醉/精神药品配制/领取申请单',
},
}

+ 5
- 0
src/lang/en/template/sp.js View File

@ -79,5 +79,10 @@ export default {
sp017: {
title:
'Bioanalytical Methods Sample Preparation Record (Stock Solution Comparison)'
},
//生物样品分析方法学质控配制表
sp018: {
title: 'Bioanalytical Methods Quality Control Solution Preparation Record',
xzxsy: 'Select Diluent'
}
}

+ 12
- 0
src/lang/zh/template/gsp.js View File

@ -0,0 +1,12 @@
//供试品
export default {
// 试验物质配制计划表
SYWZPZJHB: {
title: '试验物质配制计划表',
},
// 麻醉/精神药品配制/领取申请单
MJYLQSQD: {
title: '麻醉/精神药品配制/领取申请单',
},
}

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

@ -73,5 +73,10 @@ export default {
//生物样品分析方法学样品制备表(Stock solution comparison)- 生物样品分析方法学样品制备表(储备液对比)
sp017: {
title: '生物样品分析方法学样品制备表(储备液对比)'
},
//生物样品分析方法学质控配制表
sp018: {
title: '生物样品分析方法学质控配制表',
xzxsy: '选择稀释液'
}
}

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

@ -1,7 +1,5 @@
<template>
<div class="template-table">
<!-- <SP001 v-if="sn == 'SP0012'" />
<SWYPFXRYPZB v-if="sn == 'SP001'" /> -->
<component ref="templateComponent" :is="getTemplateComponent()" :templateData="templateData" :fillType="fillType">
</component>
</div>
@ -10,7 +8,6 @@
<script>
import { EventBus } from "@/utils/eventBus"
//
import SP001 from './comps/sp/SP001';
import SWYPFXRYPZB from "./comps/sp/SWYPFXRYPZB.vue";
import SWYPFXCBYPZB from "./comps/sp/SWYPFXCBYPZB.vue";
import SWYPBQGZYZBB from "./comps/sp/SWYPBQGZYZBB.vue";
@ -26,16 +23,19 @@ import XZXHTYX from "./comps/sp/SWYPFXFFXYPZBB/XZXHTYX.vue";
import ZDYBS from "./comps/sp/SWYPFXFFXYPZBB/ZDYBS.vue";
import XSKKX from "./comps/sp/SWYPFXFFXYPZBB/XSKKX.vue";
import CBYDB from "./comps/sp/SWYPFXFFXYPZBB/CBYDB.vue";
import SWYPFXFFXZKPZB from "./comps/sp/SWYPFXFFXZKPZB.vue";
import Demo from "./comps/sp/Demo.vue";
//
import SYWZPZJHB from "./comps/gy/SYWZPZJHB.vue";
import MJYLQSQD from "./comps/gy/MJYLQSQD.vue";
//
import SYWZPZJHB from "./comps/gsp/SYWZPZJHB.vue";
import MJYLQSQD from "./comps/gsp/MJYLQSQD.vue";
export default {
name: "TemplateTable",
components: {
//
MJYLQSQD, SYWZPZJHB,
SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB,ZQDYJMD,QXWDX,CBYHGZYWDX,Recovery,RXJZXY,JZXY,XZXHTYX,ZDYBS,XSKKX,CBYDB
//
SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB,ZQDYJMD,QXWDX,CBYHGZYWDX,Recovery,RXJZXY,JZXY,XZXHTYX,ZDYBS,XSKKX,CBYDB,SWYPFXFFXZKPZB
},
props: {
sn: {
@ -60,6 +60,7 @@ export default {
templateComponentMap() {
if (!this.componentMap) {
this.componentMap = {
//
'SP001': 'SWYPFXRYPZB',
'SP002': 'SWYPFXCBYPZB',
'SP003': 'SWYPBQGZYZBB',
@ -74,6 +75,8 @@ export default {
'SP015': 'ZDYBS',
'SP016': 'XSKKX',
'SP017': 'CBYDB',
'SP018': 'SWYPFXFFXZKPZB',
//
'SYWZPZJHB': 'SYWZPZJHB',
'MJYLQSQD': 'MJYLQSQD',
}

src/views/business/comps/template/comps/gy/MJYLQSQD.vue → src/views/business/comps/template/comps/gsp/MJYLQSQD.vue View File

@ -3,7 +3,7 @@
<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>
$t('template.gsp.SYWZPZJHB.title') }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<LineLabel label="基本信息" />

src/views/business/comps/template/comps/gy/SYWZPZJHB.vue → src/views/business/comps/template/comps/gsp/SYWZPZJHB.vue View File

@ -2,7 +2,7 @@
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{formData.bdmc || "试验物质配制计划表"}}<img
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{formData.bdmc || $t('template.gsp.SYWZPZJHB.title')}}<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">

+ 0
- 70
src/views/business/comps/template/comps/sp/SP001.vue View File

@ -1,70 +0,0 @@
<template>
<div class="sp001">
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">生物样品分析溶液配制表<img
src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<div class="content-title">
<div class="line"></div>
<div class="subtitle"> 试验基本信息</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">试验名称</div>
<el-input type="text" :value="form.mc" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">试验编号</div>
<el-input type="text" :value="form.bh" maxlength="50" disabled />
</div>
</div>
<div class="pal">
<div class="left">
<div class="left-title">方法编号</div>
<el-input type="text" :value="form.nd" maxlength="50" disabled />
</div>
<div class="right">
<div class="right-title">版本号</div>
<el-input type="text" :value="form.kc" maxlength="50" disabled />
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "SP001",
components: {},
props: {
value: {
type: {},
default: () => { },
}
},
watch: {
value: {
immediate: true,
handler(v) {
}
}
},
data() {
return {
form: {}
};
},
mounted() {
},
methods: {
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.sp001 {}
</style>

+ 387
- 0
src/views/business/comps/template/comps/sp/SWYPFXFFXZKPZB.vue View File

@ -0,0 +1,387 @@
<!-- 生物样品分析方法学质控配制表-->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc ||
$t('template.sp.sp018.title') }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPcakge 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="yqsColumns"
:dataSource="resource" />
<BaseInfoFormPcakge fieldItemLabel="template.common.storageCondition" label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig"
:formData="formData" @clickable="handleJzClickable" />
<CustomTable
@blur="onHandleTableBlur"
:ref="`tableRef`"
:columns="tableStepColumns"
:formData="formData"
:prefixKey = "`table`"
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
<template slot="operation" slot-scope="{ row, rowIndex}">
<TableOpertaion
:fillType="fillType"
:row="row"
:rowIndex="rowIndex"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"
></TableOpertaion>
</template>
</CustomTable>
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPcakge fieldItemLabel="template.common.remark" label="template.common.remark" ref="remarkRef" :formConfig="remarkConig"
:formData="formData" />
</div>
</div>
</div>
<!-- <button @click = "onSave">保存</button> -->
<SelectReagentDialog
@submit="onSelectReagentSubmit"
ref="selectReagentDialogRef" >
</SelectReagentDialog>
</div>
</template>
<script>
import BaseInfoFormPcakge from "@/components/Template/BaseInfoFormPcakge";
import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin.js";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import {getSWYPFXFFXYPZBBTableConfig} from "../../formConfig/SWYPFXFFXYPZBBTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import { EventBus } from "@/utils/eventBus";
export default {
name: "CBYDB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion,SelectReagentDialog },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
storageFormConfig() {
return [
{
type: "conditionItem",
config: {
storageCondition: {
label: 'template.common.storageConditionLabel',
type: "select",
fillType: "preFill",
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
}
}
];
},
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,
},
methodCode: {
label: 'template.common.methodCode',
type: "input",
fillType: "preFill",
maxlength: 50
},
versionNum: {
label: 'template.common.versionNumber',
type: "input",
fillType: "actFill",
maxlength: 50
},
//
clpbg: {
label: 'template.sp.sp008.clpbh',
type: "input",
fillType: "actFill",
maxlength: 50
},
}
},
{
type: "conditionItem",
label: 'template.common.testConfigurationConditions',
config: {
pre: {
label: 'template.common.preFill',
type: "select",
multiple: true,
fillType: "preFill",
options: this.getDictOptions('business_pztj'),
otherCode: "preOther",
},
act: {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.sp.sp008.rqcz',
config: {
rqcz: {
type: "select",
multiple: true,
fillType: "actFill",
options: this.getDictOptions('business_rqcz'),
otherCode: "rqczOther",
},
}
},
{
type: "cellItem",
label: 'template.sp.sp008.clsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
stepFormConfig() {
return [
{
type: "step",
config: {
jz: {
label: 'template.sp.sp018.xzxsy',
type: "input",
fillType: "preFill",
subType: "clickable",
subKey: "subJz",
subFillType: "actFill",
maxlength: 20,
labelWidth: 80,
},
}
}
]
},
tableStepColumns() {
return getSWYPFXFFXYPZBBTableConfig(this,'business_sp_cbydb');
},
},
data() {
return {
reagentType: "",//12
currentSubKey: "",//key
rowIndex:0,//
resource: [],
sysjColumns: [
{ label: 'template.common.reagentName', prop: "mc" },//
{ label: 'template.common.reagentCode', prop: "bh" },//
{ label: 'template.common.reagentNo', prop: "ph" },//
{ label: 'template.common.concentration', prop: "nd" },//
{ label: 'template.common.source', prop: "source" },//
{ label: 'template.common.reagentExpireDate', prop: "sxrq" },//
],
yqsColumns: [
{ label: 'template.common.instrumentName', prop: "instrumentName" },
{ label: 'template.common.instrumentModel', prop: "instrumentModel" },
{ label: 'template.common.instrumentCode', prop: "instrumentCode" },
{ label: 'template.common.nextTestDate', prop: "nextTestDate" },
],
formData: {}
};
},
mounted() {
},
watch: {
formData: {
immediate: true,
handler(v) {
if(this.fillType === "actFill"){
this.getCode(v);
}
}
}
},
methods: {
//
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
},
//
onSelectReagentSubmit(code,row){
if(this.reagentType===1){
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code);
}else{
this.$refs.tableRef.updateDataSourceByRowIndex(this.rowIndex,{
[this.currentSubKey]: code,
})
}
this.$refs.selectReagentDialogRef.onCancel()
},
//
handleClickable(col, rowIndex) {
//
this.reagentType = 2
this.rowIndex = rowIndex
this.currentSubKey = col.prop;
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
}
},
//
async getCode(v){
const {stepTableFormData = []} = v;
if(stepTableFormData && stepTableFormData.length>0 && !stepTableFormData[0].bhCode){
const result = await getLatestSn({
count: stepTableFormData.length,
})
if(result.code == 200){
if(stepTableFormData.length===1){
this.$refs.tableRef.updateDataSourceByRowIndex(0,{
bhCode: result.data,
})
}else{
for(let i=0;i<stepTableFormData.length;i++){
this.$refs.tableRef.updateDataSourceByRowIndex(i,{
bhCode: result.data[i],
})
}
}
const params = {
type: "fieldChanged",
newRecord: null,
resourceList: null,
}
setTimeout(() => {
debugger
EventBus.$emit('onModifyRecord', params,)
}, 10);
}
}
},
//
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef","stepRef", "remarkRef"])
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef","tableRef" ,"stepRef", "remarkRef"]);
//resource
let tmpResource = []
let tableList = content.stepTableFormData
if(tableList && tableList.length>0){
for(let i=0;i<tableList.length;i++){
//
let item = tableList[i]
tmpResource.push({
mc: null,
bh: item.bh+item.bhCode,
ph: null,
nd: item.hhwznd + content.headerSelectFields.hhwzndUnit,
source: 'ELN配制',
sxrq: null,
ndz: item.hhwznd,
nddw: content.headerSelectFields.hhwzndUnit,
kc: item.sjjzxql+item.sjryxql,//todo -
kcdw: content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --
syl: null,
syldw:content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --,
yxzq:null,
yxzqdw:null,
})
}
}
//使
this.resource=tmpResource
return content;
},
async onSave() {
const formData = await this.getFilledFormData();
console.log(formData, "formData")
},
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
</style>

+ 1
- 0
src/views/business/template/list.vue View File

@ -104,6 +104,7 @@
<el-option label="试剂" :value="1" />
<el-option label="给药制剂" :value="5" />
<el-option label="麻精药" :value="7" />
<el-option label="无" :value="9" />
</el-select>
</el-form-item>
</el-col>

Loading…
Cancel
Save