Browse Source

feat:[模板管理]DL004、DL005

ouqian
ZHANGTENG\张腾 1 month ago
parent
commit
89c5b11c6e
11 changed files with 631 additions and 49 deletions
  1. +3
    -0
      src/components/Template/BaseInfoFormPackage.vue
  2. +5
    -0
      src/lang/en/template/dl.js
  3. +2
    -0
      src/lang/en/template/xb.js
  4. +5
    -0
      src/lang/zh/template/dl.js
  5. +2
    -0
      src/lang/zh/template/xb.js
  6. +6
    -0
      src/views/business/comps/template/TemplateTable.vue
  7. +1
    -1
      src/views/business/comps/template/comps/dl/DL003.vue
  8. +327
    -0
      src/views/business/comps/template/comps/dl/DL004.vue
  9. +271
    -0
      src/views/business/comps/template/comps/dl/DL005.vue
  10. +0
    -48
      src/views/business/comps/template/comps/dl/DL006.vue
  11. +9
    -0
      src/views/business/comps/template/comps/xb/XB001.vue

+ 3
- 0
src/components/Template/BaseInfoFormPackage.vue View File

@ -207,6 +207,9 @@
<div class="ml-10 item-span" v-else-if="sItem.subType === 'span'">{{
formFields[sItem.subKey] }}</div>
<span v-else-if="sItem.subType === 'text'" class="sub-text">{{ $t(sItem.subText) }}</span>
<HandleFormItem class="ml-10" v-else-if="sItem.subType === 'button'" type="button"
:item="getButtonItem(sItem)" :value="formFields[sItem.subKey]"
@clickButton="(e, val, data) => handleClickButton(e, sItem, val, data)" />
<HandleFormItem :field-item-label="fieldItemLabel"
:field-key="prefixKey + '_' + sItem.subKey" class="ml-10"
v-else-if="sItem.subType === 'clickable'" type="clickable"

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

@ -45,6 +45,11 @@ export default {
ksButton: 'Start',
jsButton: 'End'
},
dl004: {
...common,
zjjgqr: '增菌结果确认',
ccwz: 'Storage Location',
},
dl006: {
...common,
jlzpzxx: '剂量组配制信息',

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

@ -8,6 +8,8 @@ export default {
fpc: '分批次',
zb: '组别',
lx: '类型',
ks: 'Start',
js: 'End',
fysc: '孵育时长(hr: min)'
},

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

@ -46,6 +46,11 @@ export default {
ksButton: '开始',
jsButton: '结束'
},
dl004: {
...common,
zjjgqr: '增菌结果确认',
ccwz: '存储位置',
},
dl006: {
...common,
jlzpzxx: '剂量组配制信息',

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

@ -8,6 +8,8 @@ export default {
fpc: '分批次',
zb: '组别',
lx: '类型',
ks: '开始',
js: '结束',
fysc: '孵育时长(hr: min)'
},

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

@ -92,6 +92,8 @@ import DJ001 from "./comps/dj/DJ001.vue";
// DL001-SYWZPZJHB
// DL002-使SP001
import DL003 from './comps/dl/DL003.vue'
import DL004 from './comps/dl/DL004.vue'
import DL005 from './comps/dl/DL005.vue'
import DL006 from './comps/dl/DL006.vue'
import DL007 from './comps/dl/DL007.vue'
import DL008 from './comps/dl/DL008.vue'
@ -140,6 +142,8 @@ export default {
YP005,
//
DL003,
DL004,
DL005,
DL006,
DL007,
DL008,
@ -281,6 +285,8 @@ export default {
//DL001-SYWZPZJHB
'DL002': 'SP001',
'DL003': 'DL003',
'DL004': 'DL004',
'DL005': 'DL005',
'DL006': 'DL006',
'DL007': 'DL007',
'DL008': 'DL008',

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

@ -326,7 +326,7 @@ export default {
{
label: 'template.dl.dl003.jzlybh',
prop: 'jzlybh',
bodyType: 'sj',
bodyType: 'xj',
bodyFillType: 'actFill',
},
{

+ 327
- 0
src/views/business/comps/template/comps/dl/DL004.vue View File

@ -0,0 +1,327 @@
<!-- 增菌结果记录表 -->
<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"
/>
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel="template.common.operationSteps"
:ref="refConf.czInfo"
:formConfig="czInfoFormConfig"
:formData="formData"
@clickButton="handleClickButton"
@beforeReagentSubmit="onBeforeReagentSubmit"
/>
<CustomTable
fieldItemLabel="template.common.operationSteps"
:columns="jzjzColumns"
:ref="'jzjzTableRef'"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="false"
:formData="formData"
: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',
czInfo: 'czInfoRef',
remark: 'remarkRef',
jzjz: 'jzjzTableRef'
}
const refNames = Object.values(refConf)
export default {
name: 'DL004',
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: {
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
}
}
}
]
},
//
czInfoFormConfig() {
return [
{
type: 'cellItem',
config: {
qxbd: {
label: 'template.dl.dl007.qxbd',
type: 'qxbd',
fillType: 'actFill',
qxbdType:'DL003',
filledCodes: ['bdmc', 'bdbh']
},
pykssj: {
label: 'template.dl.dl007.pykssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'pykssj',
buttonName: 'template.dl.dl003.ksButton',
},
pyjssj: {
label: 'template.dl.dl007.pyjssj',
type: 'input',
fillType: 'actFill',
maxlength: 200,
subType: 'button',
subKey: 'pyjssj',
buttonName: 'template.dl.dl003.jsButton',
},
}
}
]
},
//
jzjzColumns() {
return [
{
label: 'template.dl.dl003.jzjzhbh',
prop: "targetSolutionCode",
bodyType: 'span',
bodySubType: "span",
bodySubKey: "subTargetSolutionCode",
myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//
bodyFillType: 'actFill'
},
{
label: 'template.dl.dl004.zjjgqr',
prop: 'zjjgqr',
bodyType: 'select',
bodyOptions: [
{value:1,label:'符合'},
{value:0,label:'不符合'},
],
bodyFillType: 'actFill',
},
{
label: 'template.dl.dl004.ccwz',
prop: 'ccwz',
bodyType: 'select',
bodyOptions: this.getDictOptions('business_sydd'),
otherCode: 'ccwzOther',
bodyFillType: 'actFill',
},
]
},
},
data() {
return {
formData: {},
refConf
}
},
methods: {
//
async deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
},
//
handleClickButton(_item, signData) {
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 === 'qxbd') {
this.$refs.czInfoRef.updateFormData('pykssj', row.startDate)
}
},
//
async onSave() {
const formData = this.getStepResource()
console.log(formData, 'formData')
},
//
onBeforeReagentSubmit(e) {
let { selectData = {} } = e
let { stepTableFormData_1 = [] } = JSON.parse(selectData?.row?.bdnr)
stepTableFormData_1?.map((item,index)=>{
this.$refs.jzjzTableRef.updateDataSourceByRowIndex(index, item);
})
}
}
}
</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>

+ 271
- 0
src/views/business/comps/template/comps/dl/DL005.vue View File

@ -0,0 +1,271 @@
<!-- 灭菌操作记录表 -->
<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"
/>
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel="template.common.operationSteps"
:ref="refConf.czInfo"
:formConfig="czInfoFormConfig"
:formData="formData"
/>
<StepFormPackage class="mt20" ref="stepFormPackageRef" prefixKey="dl_step1" :form-config="stepConfig" :formData = "formData" />
</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 StepFormPackage from "@/components/Template/StepFormPackage.vue"
const refConf = {
base: 'baseInfoRef',
czInfo: 'czInfoRef',
remark: 'remarkRef',
step:'stepFormPackageRef'
}
const refNames = Object.values(refConf)
export default {
name: 'DL005',
components: {
BaseInfoFormPackage,
LineLabel,
TableList,
Step,
CustomTable,
TableOpertaionDelete,
StepFormPackage
},
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: {
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
}
}
}
]
},
//
czInfoFormConfig() {
return [
{
type: 'cellItem',
config: {
qxbd: {
label: 'template.dl.dl007.qxbd',
type: 'qxbd',
qxbdType:'DL003',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
// checkType:"checkbox",
},
}
}
]
},
stepConfig() {
return [{
config:{
text1:{
label:"步骤1:使用",
type:"text",
},
mqq:{
type:"yq",
fillType:"actFill",
},
text2:{
label:"灭菌器,设置温层",
type:"text",
},
wc:{
type:"input",
maxlength:'10',
fillType:"actFill",
},
text3:{
label:",设置灭菌时间",
type:"text",
},
dcxqyj:{
type:"input",
fillType:"actFill",
},
text4:{
label:"进行灭菌。",
type:"text",
},
}
}]
},
},
data() {
return {
formData: {},
refConf
}
},
methods: {
//
async deleteTableRow(rowIndex, refName) {
this.$refs[refName].deleteRow(rowIndex)
},
//
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
},
//
async onSave() {
const formData = this.getStepResource()
console.log(formData, 'formData')
},
}
}
</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>

+ 0
- 48
src/views/business/comps/template/comps/dl/DL006.vue View File

@ -38,7 +38,6 @@
<CustomTable
fieldItemLabel="template.common.operationSteps"
:columns="jlzpzxxColumns"
@blur="operateBlur"
:ref="'jlzpzxxTableRef'"
@onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="false"
@ -409,53 +408,6 @@ export default {
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.jlzpzxxTableRef) {
this.$refs.jlzpzxxTableRef.updateDataSourceByRowIndex(rowIndex, { ...currentItem });
}
} catch (error) {
// 8.
this.$message.error('子码生成失败,请重试');
} finally {
// 9.
isGeneratingSubCode = false;
}
},
//S9
onCzChange(e) {

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

@ -254,6 +254,10 @@ export default {
label: 'template.common.startTime',
prop: 'startTime',
bodyType: 'input',
bodySubType: 'button',
bodySubButtonName: 'template.xb.xb001.ks',
bodySubKey: 'startTime',
bodySubFillType: 'actFill',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 50,
@ -262,6 +266,10 @@ export default {
label: 'template.common.endTime',
prop: 'endTime',
bodyType: 'input',
bodySubType: 'button',
bodySubButtonName: 'template.xb.xb001.js',
bodySubKey: 'endTime',
bodySubFillType: 'actFill',
bodyFillType: 'actFill',
width: 280,
bodyMaxlength: 50,
@ -271,6 +279,7 @@ export default {
prop: 'fysc',
bodyType: 'input',
bodyFillType: 'actFill',
bodyDisabled: true,
width: 280,
bodyMaxlength: 50,
},

Loading…
Cancel
Save