Browse Source

feat:[模板管理]DL003

ouqian
ZHANGTENG\张腾 1 month ago
parent
commit
44eaa8c947
6 changed files with 544 additions and 1 deletions
  1. +15
    -0
      src/lang/en/template/dl.js
  2. +16
    -0
      src/lang/zh/template/dl.js
  3. +3
    -0
      src/views/business/comps/template/TemplateTable.vue
  4. +1
    -1
      src/views/business/comps/template/comps/dj/DJ001.vue
  5. +507
    -0
      src/views/business/comps/template/comps/dl/DL003.vue
  6. +2
    -0
      src/views/business/comps/template/mixins/templateMixin.js

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

@ -30,6 +30,21 @@ const common = {
export default {
dl001: {},
common,
dl003: {
...common,
pytj: '培养条件',
jzkssj: '接种开始时间',
jzjssj: '接种结束时间',
fssygbh: '复苏水浴锅编号',
pyx: '培养箱',
fstj: '复苏条件',
jzjzhbh: '菌种接种后编号',
jzlybh: '菌种来源编号',
rtbh: '肉汤编号',
jzjrtj: '菌种加入体积',
ksButton: 'Start',
jsButton: 'End'
},
dl007: {
...common,
czxx: 'Operation Information',

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

@ -30,6 +30,22 @@ const common = {
export default {
dl001: {},
common,
dl003: {
...common,
pytj: '培养条件',
jzkssj: '接种开始时间',
jzjssj: '接种结束时间',
fssygbh: '复苏水浴锅编号',
pyx: '培养箱',
fstj: '复苏条件',
frswd: '放入时温度',
jzjzhbh: '菌种接种后编号',
jzlybh: '菌种来源编号',
rtbh: '肉汤编号',
jzjrtj: '菌种加入体积',
ksButton: '开始',
jsButton: '结束'
},
dl007: {
...common,
czxx: '操作信息',

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

@ -84,6 +84,7 @@ import DJ001 from "./comps/dj/DJ001.vue";
//
// DL001-SYWZPZJHB
// DL002-使SP001
import DL003 from './comps/dl/DL003.vue'
import DL007 from './comps/dl/DL007.vue'
import DL008 from './comps/dl/DL008.vue'
import DL009 from './comps/dl/DL009.vue'
@ -130,6 +131,7 @@ export default {
YP004,
YP005,
//
DL003,
DL007,
DL008,
DL009,
@ -263,6 +265,7 @@ export default {
//
//DL001-SYWZPZJHB
'DL002': 'SP001',
'DL003': 'DL003',
'DL007': 'DL007',
'DL008': 'DL008',
'DL009': 'DL009',

+ 1
- 1
src/views/business/comps/template/comps/dj/DJ001.vue View File

@ -1,4 +1,4 @@
<!-- 细胞CIC配制记录表 -->
<!-- 试验操作复核记录表 -->
<template>
<div>
<div class="detail-container">

+ 507
- 0
src/views/business/comps/template/comps/dl/DL003.vue View File

@ -0,0 +1,507 @@
<!-- Ames实验掺入法平皿培养记录表 -->
<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="refConf.base"
:formConfig="baseInfoFormConfig"
:formData="formData"
/>
<!-- <LineLabel label="template.dl.dl003.sysj" /> -->
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
:columns="yqsyColumns"
:ref="refConf.yqsy"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`yqsyTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel="template.common.operationSteps"
:ref="refConf.czInfo"
:formConfig="czInfoFormConfig"
:formData="formData"
@clickButton="handleClickButton"
@onRegentSubmit="onRegentSubmit"
/>
<CustomTable
fieldItemLabel="template.common.operationSteps"
:columns="jzjzColumns"
@blur="operateBlur"
:ref="'jzjzTableRef'"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="{stepTableFormData:formData.stepTableFormData_1,headerSelectFields:{}}"
:showHeaderSelect="fillType === 'actFill'"
:prefixKey="`jzjzTable`"
>
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete
:row="row"
:rowIndex="rowIndex"
:columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'jzjzTableRef')"
></TableOpertaionDelete>
</template>
</CustomTable>
</div>
<BaseInfoFormPackage
fieldItemLabel="template.dl.dl007.bz"
label="template.dl.dl007.bz"
:ref="refConf.remark"
:formConfig="remarkConig"
:formData="formData"
/>
</div>
</div>
</div>
</div>
</template>
<script>
import BaseInfoFormPackage from '@/components/Template/BaseInfoFormPackage'
import TableOpertaionDelete from '@/components/Template/operation/TableOpertaionDelete.vue'
import CustomTable from '@/components/Template/CustomTable.vue'
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'
const refConf = {
base: 'baseInfoRef',
yqsy: 'yqsyTableRef',
czInfo: 'czInfoRef',
remark: 'remarkRef',
jzjz: 'jzjzTableRef'
}
const refNames = Object.values(refConf)
export default {
name: 'DL003',
components: {
BaseInfoFormPackage,
LineLabel,
TableList,
Step,
CustomTable,
TableOpertaionDelete
},
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill'
}
},
computed: {
//
remarkConig() {
return [
{
type: 'cellItem',
config: {
remark: {
label: '',
type: 'textarea',
fillType: 'actFill',
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
mounted() {
// if (this.fillType === "actFill") {
// this.handleUpdateCode(formData);
// }
// const re = convertConcentration.convert('100mg/mL',"ng/mL")
},
//
baseInfoFormConfig() {
return [
{
type: 'cardItem',
config: {
studyMc: {
label: 'template.common.testName',
type: 'input',
disabled: true
},
studySn: {
label: 'template.common.testNumber',
type: 'input',
disabled: true
}
}
},
{
type: 'conditionItem',
label: 'template.dl.dl007.sydd',
config: {
pytj: {
span: 1,
label: 'template.dl.dl003.pytj',
type: 'select',
options: this.getDictOptions('business_pytj'),
fillType: 'actFill',
otherCode: 'pytjOther'
},
sydd: {
span: 1,
label: 'template.dl.dl007.sydd',
type: 'select',
options: this.getDictOptions('business_sydd'),
fillType: 'actFill',
otherCode: 'syddOther'
}
}
},
{
type: 'cellItem',
label: 'template.dl.dl003.czsj',
config: {
startDate: {
label: 'template.common.startTime',
type: 'input',
disabled: true
},
endDate: {
label: 'template.common.endTime',
type: 'input',
disabled: true
}
}
}
]
},
// 使
yqsyColumns() {
return [
{
label: 'template.dl.dl007.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl007.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl007.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
},
{
label: 'template.dl.dl007.xccsjzjdrq',
prop: 'jzrq',
bodyType: 'input',
bodyDisabled: true,
bodyFillType: 'actFill',
disabled: true
}
]
},
//
czInfoFormConfig() {
return [
{
type: 'cellItem',
config: {
jzkssj: {
label: 'template.dl.dl003.jzkssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'jzkssj',
buttonName: 'template.dl.dl003.ksButton',
},
jzjssj: {
label: 'template.dl.dl003.jzjssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'jzjssj',
buttonName: 'template.dl.dl003.jsButton',
},
fssygbh: {
label: 'template.dl.dl003.fssygbh',
type: 'yq',
fillType: 'actFill',
},
pyx: {
label: 'template.dl.dl003.pyx',
type: 'yq',
fillType: 'actFill',
},
fstj: {
label: 'template.dl.dl003.fstj',
type: 'select',
options: this.getDictOptions('business_fstj'),
fillType: 'actFill',
otherCode: 'fstjOther'
},
czpytj: {
label: 'template.dl.dl003.pytj',
type: 'select',
options: this.getDictOptions('business_pytj'),
fillType: 'actFill',
otherCode: 'czpytjOther'
},
frswd: {
label: 'template.dl.dl003.frswd',
type: 'input',
fillType: 'actFill',
maxlength: 50,
},
pykssj: {
label: 'template.dl.dl007.pykssj',
fillType: 'actFill',
type: 'input',
subType: 'button',
subKey: 'pykssj',
buttonName: 'template.dl.dl003.ksButton',
},
}
}
]
},
//
jzjzColumns() {
return [
{
label: 'template.dl.dl003.jzjzhbh',
prop: "targetSolutionCode",
bodyType: 'input',
bodySubType: "span",
bodySubKey: "subTargetSolutionCode",
myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl003.jzlybh',
prop: 'jzlybh',
bodyType: 'sj',
bodyFillType: 'actFill',
},
{
label: 'template.dl.dl003.rtbh',
prop: 'rtbh',
bodyType: 'sj',
bodyFillType: 'actFill',
},
{
label: 'template.dl.dl003.jzjrtj',
prop: 'jzjrtj',
headerSelectKey: "targetDiluentVolumeUnit",
headerOptions: this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyMaxlength: 10,
bodyFillType: 'actFill',
fillType: 'actFill',
}
// {
// label: "template.sp.sp003.ysmbrynd",
// prop: "targetSolutionConcentration",
// width: 210,
// showWidth: 120,
// headerSelectKey: "targetSolutionConcentrationUnit",
// fillType: "preFill",
// headerOptions: this.getDictOptions('business_nddw'),
// bodyType: "inputNumber",
// bodyFillType: "preFill",
// bodyMaxlength: 10,
// headerSelectTo:"actSolutionConcentrationUnit",
// },
]
},
},
data() {
return {
formData: {},
refConf
}
},
methods: {
//
async deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
},
//
handleClickButton(_item, signData) {
console.log(this.refConf,888)
this.$refs.czInfoRef.updateFormData(
_item.subKey,
moment().format('YYYY/MM/DD HH:mm'),
{ isUpdateRecord: true, signData }
)
},
//
getFilledFormData() {
return this.getFilledFormDataByRefs(refNames)
},
//
async getFormData() {
return await this.validFormFields(refNames)
},
//
async validFields() {
return await this.validFormFields(refNames)
},
getResource() {
const stepResource = this.$refs.yqsyTableRef.getStepResource()
// 使
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp
},
onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { row } = selectInfo
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
jzrq: row.jzrq
}
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
}
if (key === 'qxbd') {
this.$refs.czInfoRef.updateFormData('pykssj', row.startDate)
}
},
//
async onSave() {
const formData = this.getStepResource()
console.log(formData, 'formData')
},
//table
async operateBlur(params) {
let isGeneratingSubCode = false;
const { dataSource = [], rowIndex } = params; // rowIndex
// 1. /
if (dataSource.length === 0 || isGeneratingSubCode) {
return;
}
// 2.
const currentItem = dataSource[rowIndex];
if (!currentItem) {
return;
}
// 3. targetSolutionCode subTargetSolutionCode
const hasTargetCode = !!currentItem.targetSolutionCode;
const noSubTargetCode = !currentItem.subTargetSolutionCode;
if (!hasTargetCode || !noSubTargetCode) {
return; //
}
try {
// 4.
isGeneratingSubCode = true;
// 5.
const subCode = await this.getLatestSnArr([{
pre: currentItem.targetSolutionCode,
type: 1
}]);
// 6.
currentItem.subTargetSolutionCode = subCode[0] || '';
// 7.
if (this.$refs.jzjzTableRef) {
this.$refs.jzjzTableRef.updateDataSourceByRowIndex(rowIndex, { ...currentItem });
}
} catch (error) {
// 8.
this.$message.error('子码生成失败,请重试');
} finally {
// 9.
isGeneratingSubCode = false;
}
}
//table header
// onHeaderSelectChange(data){
// const {key, headerSelectFields,dataSource=[]} = data;
// const keys = [
// 'targetDiluentVolumeUnit',
// ]
// if(keys.includes(key)){
// const {targetStartSolution,subTargetStartSolution} = this.$refs.stepFormPackageRef?.getFilledFormData();
// const params = {
// subTargetStartSolution,
// headerSelectFields
// }
// this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params)
// }
// },
}
}
</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>

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

@ -42,6 +42,8 @@ export default {
'business_rylx', // 溶液类型
'business_xbzb', // 细胞组别
'business_xblx', // 细胞类型
'business_pytj', // 毒理-培养条件
'business_fstj', // 毒理-复苏条件
],
props: {
templateData: {

Loading…
Cancel
Save