| @ -0,0 +1,314 @@ | |||
| <!-- 生物样品全血移交记录表 --> | |||
| <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.dj.dj003.yjczxx" /> | |||
| <CustomTable | |||
| fieldItemLabel="template.dj.dj003.yjczxx" | |||
| :columns="ypyjColumns" | |||
| :ref="'ypyjTableRef'" | |||
| :showOperation="fillType === 'actFill'" | |||
| :showAddRow="fillType === 'actFill'" | |||
| :formData="formData" | |||
| :prefixKey="`ypyjTable`" | |||
| > | |||
| <template slot="operation" slot-scope="{ row, rowIndex, columns }"> | |||
| <TableOpertaionDelete | |||
| :row="row" | |||
| :rowIndex="rowIndex" | |||
| :columns="columns" | |||
| @deleteRow="() => deleteTableRow(rowIndex, 'ypyjTableRef')" | |||
| ></TableOpertaionDelete> | |||
| </template> | |||
| </CustomTable> | |||
| <BaseInfoFormPackage | |||
| fieldItemLabel="template.dj.dj003.yjczxx" | |||
| :ref="refConf.yjczxx" | |||
| :formConfig="yjczxxFormConfig" | |||
| :formData="formData" | |||
| @clickButton="handleClickButton" | |||
| /> | |||
| <BaseInfoFormPackage | |||
| fieldItemLabel="template.common.remark" | |||
| label="template.common.remark" | |||
| :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' | |||
| import StepFormPackage from "@/components/Template/StepFormPackage.vue" | |||
| const refConf = { | |||
| base: 'baseInfoRef', | |||
| remark: 'remarkRef', | |||
| ypyj:'ypyjTableRef', | |||
| yjczxx: 'yjczxxRef' | |||
| } | |||
| const refNames = Object.values(refConf) | |||
| export default { | |||
| name: 'DJ003', | |||
| 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 | |||
| } | |||
| } | |||
| } | |||
| ] | |||
| }, | |||
| // 试验基本信息表单配置 | |||
| 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.dj.dj003.yplx', | |||
| config: { | |||
| yplx: { | |||
| span: 1, | |||
| label: 'template.dj.dj003.yplx', | |||
| type: 'select', | |||
| options: this.getDictOptions('business_yplx'), | |||
| fillType: 'actFill', | |||
| otherCode: 'yplxOther' | |||
| } | |||
| } | |||
| }, | |||
| { | |||
| type: 'conditionItem', | |||
| label: 'template.dj.dj003.knj', | |||
| config: { | |||
| knj: { | |||
| span: 1, | |||
| label: 'template.dj.dj003.knj', | |||
| type: 'select', | |||
| options: this.getDictOptions('business_knj'), | |||
| fillType: 'actFill', | |||
| otherCode: 'knjOther' | |||
| } | |||
| } | |||
| }, | |||
| { | |||
| type: 'conditionItem', | |||
| label: 'template.dj.dj003.cyhcftj', | |||
| config: { | |||
| cyhcftj: { | |||
| span: 1, | |||
| label: 'template.common.actualFill', | |||
| multiple: true, | |||
| type: 'select', | |||
| options: this.getDictOptions('business_cftj'), | |||
| fillType: 'actFill', | |||
| otherCode: 'cftjOther' | |||
| } | |||
| } | |||
| }, | |||
| ] | |||
| }, | |||
| // 样品移交信息列表 | |||
| ypyjColumns() { | |||
| return [ | |||
| { | |||
| label: 'template.dj.dj003.cyd', | |||
| prop: "cyd", | |||
| bodyType: 'input', | |||
| bodyFillType: 'actFill' | |||
| }, | |||
| { | |||
| label: 'template.dj.dj003.dwbh', | |||
| prop: "dwbh", | |||
| bodyType: 'input', | |||
| bodyFillType: 'actFill' | |||
| }, | |||
| { | |||
| label: 'template.dj.dj003.cysj', | |||
| prop: "cysj", | |||
| bodyType: 'input', | |||
| bodyFillType: 'actFill' | |||
| }, | |||
| { | |||
| label: 'template.dj.dj003.sjbd', | |||
| prop: "sjbd", | |||
| bodyType: 'select', | |||
| bodyOptions: [ | |||
| {value:1,label:'正常'}, | |||
| {value:0,label:'偏离'}, | |||
| ], | |||
| bodyFillType: 'actFill' | |||
| }, | |||
| { | |||
| label: 'template.dj.dj003.yps', | |||
| prop: "yps", | |||
| bodyType: 'inputNumber', | |||
| bodyFillType: 'actFill' | |||
| }, | |||
| ] | |||
| }, | |||
| // 移交处置信息 | |||
| yjczxxFormConfig() { | |||
| return [ | |||
| { | |||
| type: 'cellItem', | |||
| config: { | |||
| yjsj: { | |||
| label: 'template.dj.dj003.yjsj', | |||
| type: 'input', | |||
| fillType: 'actFill', | |||
| maxlength: 200, | |||
| subType: 'button', | |||
| subKey: 'yjsj', | |||
| buttonName: 'template.dj.dj003.hqsj', | |||
| }, | |||
| dsfs: { | |||
| label: 'template.dj.dj003.dsfs', | |||
| type: 'select', | |||
| options: this.getDictOptions('business_dsfs'), | |||
| fillType: 'actFill', | |||
| }, | |||
| } | |||
| } | |||
| ] | |||
| } | |||
| }, | |||
| 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') | |||
| }, | |||
| // 点击按钮 | |||
| handleClickButton(_item, signData) { | |||
| this.$refs.yjczxxRef.updateFormData( | |||
| _item.subKey, | |||
| moment().format('YYYY/MM/DD HH:mm'), | |||
| { isUpdateRecord: true, signData } | |||
| ) | |||
| }, | |||
| } | |||
| } | |||
| </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> | |||