2 Commits

6 changed files with 683 additions and 265 deletions
Split View
  1. +39
    -0
      src/lang/en/template/dl.js
  2. +39
    -0
      src/lang/zh/template/dl.js
  3. +2
    -2
      src/views/business/comps/template/comps/dl/DL021.vue
  4. +207
    -83
      src/views/business/comps/template/comps/dl/DL022.vue
  5. +219
    -97
      src/views/business/comps/template/comps/dl/DL023.vue
  6. +177
    -83
      src/views/business/comps/template/comps/dl/DL024.vue

+ 39
- 0
src/lang/en/template/dl.js View File

@ -229,4 +229,43 @@ export default {
gcxps:'观察细胞数目',
zqxxbs:'中期相细胞数',
},
dl022: {
czsj:'操作时间',
dlbz: '备注',
gcqk: '观察情况',
xbmc:'细胞名称',
xwj:'显微镜',
bpbh:'玻片编号',
gcxps:'观察细胞数目',
jgjxjbs:'结构畸形畸变数',
lxjbs:'裂隙畸变数',
dbtjbs:'多倍体畸变数',
nfzjbs:'内复制畸变数',
jblx:'畸变类型'
},
dl023: {
czsj:'操作时间',
dlbz: '备注',
yqsyxx: '仪器使用信息',
czjl: '操作记录',
yqbh:'仪器编号',
yqmc:'仪器名称',
yqxh:'仪器型号',
xcrq:'下次测试/校准/检定日期',
dwzshxbx:'动物种属或细胞系',
dwzs:'动物种属',
xbx:'细胞系',
sydd:'试验地点',
zwbh:'动物编号/细胞培养板名称',
uvazsjl:'UVA照射剂量',
zszsj:'照射总时间(分:秒)',
zskssj:'照射开始时间',
zsjssj:'照射结束时间',
ksButton:'开始',
jsButton:'结束',
},
}

+ 39
- 0
src/lang/zh/template/dl.js View File

@ -229,4 +229,43 @@ export default {
gcxps:'观察细胞数目',
zqxxbs:'中期相细胞数',
},
dl022: {
czsj:'操作时间',
dlbz: '备注',
gcqk: '观察情况',
xbmc:'细胞名称',
xwj:'显微镜',
bpbh:'玻片编号',
gcxps:'观察细胞数目',
jgjxjbs:'结构畸形畸变数',
lxjbs:'裂隙畸变数',
dbtjbs:'多倍体畸变数',
nfzjbs:'内复制畸变数',
jblx:'畸变类型'
},
dl023: {
czsj:'操作时间',
dlbz: '备注',
yqsyxx: '仪器使用信息',
czjl: '操作记录',
yqbh:'仪器编号',
yqmc:'仪器名称',
yqxh:'仪器型号',
xcrq:'下次测试/校准/检定日期',
dwzshxbx:'动物种属或细胞系',
dwzs:'动物种属',
xbx:'细胞系',
sydd:'试验地点',
zwbh:'动物编号/细胞培养板名称',
uvazsjl:'UVA照射剂量',
zszsj:'照射总时间(分:秒)',
zskssj:'照射开始时间',
zsjssj:'照射结束时间',
ksButton:'开始',
jsButton:'结束',
},
}

+ 2
- 2
src/views/business/comps/template/comps/dl/DL021.vue View File

@ -24,8 +24,8 @@
operationWidth = "80px"
:prefixKey = "`table`"
fieldItemLabel = "template.dl.dl021.gcqk"
:showAddRow="fillType === 'preFill'"
:showOperation="fillType === 'preFill'"
:showAddRow="fillType === 'actFill'"
:showOperation="fillType === 'actFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>

+ 207
- 83
src/views/business/comps/template/comps/dl/DL022.vue View File

@ -1,23 +1,42 @@
<!-- 生物样品接收记录 -->
<!-- 生物分析生物样品采集管制备 -->
<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-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" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl022.gcqk" />
<!-- 观察情况 -->
<div class="template-form-item">
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
@onRegentSubmit="onRegentSubmit"
:formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<div style="color:#999;font-size:14px;">畸变类型以代号填写断片(b)裂隙(g)互换及射体(t)环状染色体(r)多倍体(p)双着丝点染色体(d)内复制(e)染色体碎化(z)缺失(l)粘着(s)微小体(m)</div>
<CustomTable
:ref="`tableRef`"
:columns="tableColumns"
:formData="formData"
operationWidth = "80px"
:prefixKey = "`table`"
fieldItemLabel = "template.dl.dl022.gcqk"
:showAddRow="fillType === 'actFill'"
:showOperation="fillType === 'actFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
@ -32,11 +51,18 @@ import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import moment from "moment";
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"
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
name: "DL022",
dicts: [
'business_dl_xbmc'
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
@ -84,18 +110,7 @@ export default {
},
{
type: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
label: 'template.dl.dl022.czsj',
config: {
startDate: {
label: 'template.common.startTime',
@ -109,23 +124,86 @@ export default {
}
]
},
//
swypyjInfoFormConfig() {
//
stepFormConfig() {
return [
{
type: "cellItem",
type: "step",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
xbmc: {
label: 'template.dl.dl022.xbmc',
type: 'select',
fillType: 'actFill',
options: this.getDictOptions('business_dl_xbmc'),
otherCode: 'xbmcOther',
showOtherLabel:false
},
xwj: {
// span:1,
label: 'template.dl.dl022.xwj',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
}
},
}
]
},
//
tableColumns() {
return [{
label: 'template.dl.dl022.bpbh',
prop: 'bpbh',
bodyType: 'input',
bodyFillType: 'actFill',
width: 100,
bodyMaxlength: 50,
},{
label: 'template.dl.dl022.gcxps',
prop: 'gcxps',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 100,
bodyMaxlength: 10,
},{
label: 'template.dl.dl022.jgjxjbs',
prop: 'jgjxjbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 80,
disabled: true
},{
label: 'template.dl.dl022.lxjbs',
prop: 'lxjbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 100,
disabled: true
},{
label: 'template.dl.dl022.dbtjbs',
prop: 'dbtjbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 100,
disabled: true
},{
label: 'template.dl.dl022.nfzjbs',
prop: 'nfzjbs',
bodyType: 'inputNumber',
bodyFillType: 'actFill',
width: 80,
disabled: true
},{
label: 'template.dl.dl022.jblx',
prop: 'jblx',
bodyType: 'input',
bodyFillType: 'actFill',
width: 100,
bodyMaxlength: 50,
}]
},
},
data() {
return {
@ -135,71 +213,117 @@ export default {
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('选择显微镜预留===',row)
// if (key === 'yqbh' && this.$refs.yqsyTableRef) {
// const params = {
// yqmc: row.mc,
// yqxh: row.xh,
// xccsjzjdrq: row.jzrq
// }
// this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
// }
},
onFormSelect(fields){
this.onHandleBlur(fields)
},
//table header
onHeaderSelectChange(data){
const {key, headerSelectFields,dataSource=[]} = data;
const keys = [
'targetStartSolutionVolumeUnit',
'targetDiluentVolumeUnit',
'targetSolutionConcentrationUnit',
'targetSolutionVolumeUnit',
]
if(keys.includes(key)){
const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
}
},
beforeSaveRecord(data){
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields,data);
},
configComplete(val) {
const { rowData, headerSelectFields } = val;
//(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
let postData = {
mc: null,
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
nd: rowData.actSolutionConcentration,//
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
studyId:this.formData.studyId,
kc: total,
kcdw: unit,
}
this.configCompleteRequest(postData);
},
//
subPackageSubmit(data) {
const { fzsj, rowData, headerSelectFields } = data;
const { fzList = [], dw = "", mybh } = fzsj;
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
bh: mybh,
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
list: list
}
this.subPackageRequest(postData);
}
},
//
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"])
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"]);
return content;
},
getResource() {
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
// stepRef
this.resourceTmp = []
this.yqResourceTmp = []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
// stepRef
console.log({});
},
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 219
- 97
src/views/business/comps/template/comps/dl/DL023.vue View File

@ -1,23 +1,35 @@
<!-- 生物样品接收记录 -->
<!-- 生物分析生物样品采集管制备 -->
<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-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" />
<!-- 仪器使用信息 -->
<LineLabel label="template.dl.dl023.yqsyxx" />
<CustomTable
:ref="`tableRef`"
:columns="yqsyxxColumns"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:formData="formData"
operationWidth = "80px"
:showAddRow="fillType === 'actFill'"
:showOperation="fillType === 'actFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
<LineLabel label="template.dl.dl023.czjl" />
<!-- 操作记录 -->
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
:formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
@ -32,11 +44,18 @@ import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import moment from "moment";
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"
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
name: "dl023",
dicts: [
'business_dl_xbmc'
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
@ -81,49 +100,106 @@ export default {
disabled: true,
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
swypyjInfoFormConfig() {
//yqsyxxColumns使
yqsyxxColumns() {
return [{
label: 'template.dl.dl023.yqbh',
prop: 'yqbh',
bodyType: 'input',
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
},{
label: 'template.dl.dl023.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
},{
label: 'template.dl.dl023.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
},{
label: 'template.dl.dl023.xcrq',
prop: 'xcrq',
bodyType: 'input',
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
}]
},
//
stepFormConfig() {
return [
{
type: "cellItem",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
dwzshxbx: {
// span:1,
label: 'template.dl.dl023.dwzshxbx',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
sydd: {
label: 'template.dl.dl023.sydd',
type: 'select',
fillType: 'actFill',
options: this.getDictOptions('business_dl_sydd'),
otherCode: 'syddOther',
showOtherLabel:false
},
zwbh:{
label: 'template.dl.dl023.zwbh',
type: 'input',
fillType: 'actFill',
bodyMaxlength: 50,
},
uvazsjl: {
label: "template.dl.dl023.uvazsjl",
type: "input",
fillType: "actFill",
subType: "sj",
subKey: "subUvazsjl",
subFillType: "actFill",
maxlength: 20,
},
zszsj:{
span:1,
label: 'template.dl.dl023.zszsj',
type: 'input',
with:100,
fillType: 'actFill',
bodyMaxlength: 50,
},
zskssj: {
label: 'template.dl.dl023.zskssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'zskssj',
buttonName: 'template.dl.dl023.ksButton',
},
zsjssj: {
label: 'template.dl.dl023.zsjssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'zsjssj',
buttonName: 'template.dl.dl023.jsButton',
},
}
},
}
]
},
},
@ -135,71 +211,117 @@ export default {
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('选择仪器编号预留===',row)
// if (key === 'yqbh' && this.$refs.yqsyTableRef) {
// const params = {
// yqmc: row.mc,
// yqxh: row.xh,
// xccsjzjdrq: row.jzrq
// }
// this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
// }
},
onFormSelect(fields){
this.onHandleBlur(fields)
},
//table header
onHeaderSelectChange(data){
const {key, headerSelectFields,dataSource=[]} = data;
const keys = [
'targetStartSolutionVolumeUnit',
'targetDiluentVolumeUnit',
'targetSolutionConcentrationUnit',
'targetSolutionVolumeUnit',
]
if(keys.includes(key)){
const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
}
},
beforeSaveRecord(data){
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields,data);
},
configComplete(val) {
const { rowData, headerSelectFields } = val;
//(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
let postData = {
mc: null,
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
nd: rowData.actSolutionConcentration,//
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
studyId:this.formData.studyId,
kc: total,
kcdw: unit,
}
this.configCompleteRequest(postData);
},
//
subPackageSubmit(data) {
const { fzsj, rowData, headerSelectFields } = data;
const { fzList = [], dw = "", mybh } = fzsj;
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
bh: mybh,
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
list: list
}
this.subPackageRequest(postData);
}
},
//
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"])
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"]);
return content;
},
getResource() {
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
// stepRef
this.resourceTmp = []
this.yqResourceTmp = []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
// stepRef
console.log({});
},
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

+ 177
- 83
src/views/business/comps/template/comps/dl/DL024.vue View File

@ -1,23 +1,41 @@
<!-- 生物样品接收记录 -->
<!-- 生物分析生物样品采集管制备 -->
<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-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" />
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.xbxx" label="template.dl.dl020.xbxx"
ref="swypyjInfoRef" :formConfig="swypyjInfoFormConfig" :formData="formData"
/>
<LineLabel label="template.dl.dl021.gcqk" />
<!-- 观察情况 -->
<div class="template-form-item">
<BaseInfoFormPackage ref="swypyjInfoRef" fieldItemLabel="template.common.operationSteps"
@onRegentSubmit="onRegentSubmit"
:formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable
:ref="`tableRef`"
:columns="tableColumns"
:formData="formData"
operationWidth = "80px"
:prefixKey = "`table`"
fieldItemLabel = "template.dl.dl021.gcqk"
:showAddRow="fillType === 'actFill'"
:showOperation="fillType === 'actFill'"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete :row="row" :rowIndex="rowIndex" :columns="columns" @deleteRow="deleteRow" ></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<LineLabel label="template.dl.dl020.czbz" />
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.dl.dl020.dlbz" label="template.dl.dl020.dlbz"
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
@ -32,11 +50,18 @@ import LineLabel from "@/components/Template/LineLabel";
import TableList from "@/components/Template/Table";
import Step from "@/components/Template/Step";
import templateMixin from "../../mixins/templateMixin";
import moment from "moment";
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"
export default {
name: "DL020",
components: { BaseInfoFormPackage, LineLabel, TableList, Step },
name: "DL024",
dicts: [
'business_dl_xbmc'
],
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
@ -84,18 +109,7 @@ export default {
},
{
type: "cellItem",
label: 'template.dl.dl020.sydd',
config: {
pre: {
label: 'template.dl.dl020.sydd',
type: "input",
fillType: "actFill",
},
}
},
{
type: "cellItem",
label: 'template.dl.dl020.czsj',
label: 'template.dl.dl021.czsj',
config: {
startDate: {
label: 'template.common.startTime',
@ -109,21 +123,55 @@ export default {
}
]
},
//
swypyjInfoFormConfig() {
//
tableColumns() {
return [{
label: 'template.dl.dl021.bpbh',
prop: 'bpbh',
bodyType: 'input',
bodyFillType: 'actFill',
width: 100,
bodyMaxlength: 50,
},{
label: 'template.dl.dl021.gcxps',
prop: 'gcxps',
bodyType: 'input',
bodyFillType: 'actFill',
width: 100,
bodyMaxlength: 50,
},{
label: 'template.dl.dl021.zqxxbs',
prop: 'zqxxbs',
bodyType: 'input',
bodyFillType: 'actFill',
width: 80,
bodyMaxlength: 50,
}]
},
//
stepFormConfig() {
return [
{
type: "cellItem",
type: "step",
config: {
qxbd: {
span:1,
label: 'template.dl.dl020.qxbd',
xbmc: {
label: 'template.dl.dl021.xbmc',
type: 'select',
fillType: 'actFill',
options: this.getDictOptions('business_dl_xbmc'),
otherCode: 'xbmcOther',
showOtherLabel:false
},
xwj: {
// span:1,
label: 'template.dl.dl021.xwj',
type: 'qxbd',
fillType: 'actFill',
filledCodes:['bdmc','bdbh'],
},
}
},
}
]
},
},
@ -135,71 +183,117 @@ export default {
mounted() {
},
methods: {
//
// handleClickButton(item,signData){
// this.$refs.ypjsInfoRef.updateFormData("jssj", moment().format("YYYY/MM/DD HH:mm"),{isUpdateRecord:true,signData});
// },
//
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
console.log('选择显微镜预留===',row)
// if (key === 'yqbh' && this.$refs.yqsyTableRef) {
// const params = {
// yqmc: row.mc,
// yqxh: row.xh,
// xccsjzjdrq: row.jzrq
// }
// this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
// }
},
onFormSelect(fields){
this.onHandleBlur(fields)
},
//table header
onHeaderSelectChange(data){
const {key, headerSelectFields,dataSource=[]} = data;
const keys = [
'targetStartSolutionVolumeUnit',
'targetDiluentVolumeUnit',
'targetSolutionConcentrationUnit',
'targetSolutionVolumeUnit',
]
if(keys.includes(key)){
const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData();
const params = {
subTargetStartSolution,
headerSelectFields
}
this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
}
},
beforeSaveRecord(data){
const formFields = this.$refs.swypyjInfoRef?.getFilledFormData();
this.onCommonVerifyNdException(formFields,data);
},
configComplete(val) {
const { rowData, headerSelectFields } = val;
//(+)
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit])
let postData = {
mc: null,
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode,
nd: rowData.actSolutionConcentration,//
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
studyId:this.formData.studyId,
kc: total,
kcdw: unit,
}
this.configCompleteRequest(postData);
},
//
subPackageSubmit(data) {
const { fzsj, rowData, headerSelectFields } = data;
const { fzList = [], dw = "", mybh } = fzsj;
if (fzList && fzList.length > 0) {
const list = fzList.map((item) => {
return {
bh: mybh + item.preCode + item.subCode,
kc: item.num,
kcdw: dw,
}
})
let postData = {
studyId: this.formData.studyId,
studyFormId: this.formData.id,
bh: mybh,
nd: rowData.actSolutionConcentration || 0,
nddw: headerSelectFields.actSolutionConcentrationUnit,
studySubjectId: this.formData.studySubjectId,
studyFormId:this.formData.id,
list: list
}
this.subPackageRequest(postData);
}
},
//
async getFilledFormData() {
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"]);
return content;
// const baseData = this.$refs.baseInfoRef.getFilledFormData();
// const swypyjData = this.$refs.swypyjInfoRef.getFilledFormData();
// const remarkData = this.$refs.remarkRef.getFilledFormData();
// return {
// ...baseData,
// ...swypyjData,
// ...remarkData,
// }
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"])
},
//
async getFormData() {
//
const validFlag = await this.validFields();
if (!validFlag) {
return false;
}
let content = this.getFilledFormData();
return content
},
//
async validFields() {
//
let refsToValidate = ["baseInfoRef", "swypyjInfoRef", "stepRef", "remarkRef"];
return await this.validFormFields(refsToValidate);
let content = await this.validFormFields(["baseInfoRef", "swypyjInfoRef","remarkRef","tableRef"]);
return content;
},
getResource() {
// let content = this.getFilledFormData();
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
// stepRef
this.resourceTmp = []
this.yqResourceTmp = []
return this.resourceTmp;
},
//
async onSave() {
const formData = this.getStepResource();
console.log(formData, "formData")
// stepRef
console.log({});
},
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
.config-header-end {
display: flex;
justify-content: flex-end;
align-items: center;
margin-bottom: 15px;
font-weight: bold;
font-size: 16px;
color: #303133;
}
</style>

Loading…
Cancel
Save