| @ -1,31 +1,106 @@ | |||||
| //毒理 | //毒理 | ||||
| // DL007~DL015通用字段 | |||||
| const common = { | |||||
| sydd: 'Test Location', | |||||
| syddOther: 'Test Location (Other)', | |||||
| czsj: 'Operation Time', | |||||
| kssj: 'Start Time', | |||||
| jssj: 'End Time', | |||||
| sysj: 'Test Reagent Information', | |||||
| sjmc: 'Reagent Name', | |||||
| bh: 'Number', | |||||
| ph: 'Batch Number', | |||||
| ndhlcd: 'Concentration/Content/Purity', | |||||
| ly: 'Source', | |||||
| sxr: 'Expiration Date', | |||||
| yqsyxx: 'Instrument Usage Information', | |||||
| yqmc: 'Instrument Name', | |||||
| yqxh: 'Instrument Model', | |||||
| yqbh: 'Instrument Number', | |||||
| xccsjzjdrq: 'Next Test/Calibration/Verification Date', | |||||
| xbxx: 'Cell Information', | |||||
| qxbd: 'Previous Form', | |||||
| bltj: 'Exposure Conditions', | |||||
| czbz: 'Operation Steps', | |||||
| bz: 'Remarks', | |||||
| mc: 'Name', | |||||
| nd: 'Concentration' | |||||
| } | |||||
| export default { | export default { | ||||
| dl001: {}, | dl001: {}, | ||||
| common, | |||||
| dl007: { | dl007: { | ||||
| sydd: 'Test Location', | |||||
| yqsyxx: 'Instrument Usage Information', | |||||
| yqbh: 'Instrument Number', | |||||
| yqmc: 'Instrument Name', | |||||
| yqxh: 'Instrument Model', | |||||
| xccsjzjdrq: 'Next Test/Calibration/Verification Date', | |||||
| ...common, | |||||
| czxx: 'Operation Information', | czxx: 'Operation Information', | ||||
| qxbd: 'Previous Form', | |||||
| pykssj: 'Cultivation Start Time', | pykssj: 'Cultivation Start Time', | ||||
| pyjssj: 'Cultivation End Time', | pyjssj: 'Cultivation End Time', | ||||
| jsButton: 'End', | |||||
| bz: 'Remarks' | |||||
| jsButton: 'End' | |||||
| }, | }, | ||||
| dl008: { | dl008: { | ||||
| ...common, | |||||
| cxqk: 'Imaging Status', | cxqk: 'Imaging Status', | ||||
| wrqk: 'Contamination Status' | wrqk: 'Contamination Status' | ||||
| }, | }, | ||||
| dl009: { | |||||
| ...common, | |||||
| clxx: 'Processing Information', | |||||
| clbh: 'Processing Number', | |||||
| cltj: 'Processing Conditions', | |||||
| jgxx: 'Result Information' | |||||
| }, | |||||
| dl010: { | |||||
| ...common, | |||||
| dwzs: 'Animal Species', | |||||
| cjdd: 'Collection Location', | |||||
| zpdd: 'Slide Preparation Location', | |||||
| cjbw: 'Collection Site', | |||||
| jprq: 'Dissection Date', | |||||
| jprqKssj: 'Start Time', | |||||
| jprqJssj: 'End Time', | |||||
| yqsybh: 'Instrument Usage Number', | |||||
| zcqk: 'Status/Condition/Performance', | |||||
| sjxx: 'Collection Information', | |||||
| xzmb: 'Download Template', | |||||
| dr: 'Import', | |||||
| dwbh: 'Animal Number', | |||||
| dwxb: 'Gender', | |||||
| dwzl: 'Animal Species', | |||||
| xcqkxzjd: 'Next Test/Calibration/Verification Date', | |||||
| sjsj: 'Collection Time' | |||||
| }, | |||||
| dl011: { | |||||
| ...common, | |||||
| fxbz: 'Resuscitation Steps', | |||||
| pyxx: 'Culture Information' | |||||
| }, | |||||
| dl012: { | |||||
| ...common, | |||||
| zbbz: 'Preparation Steps', | |||||
| pyxx: 'Culture Information' | |||||
| }, | |||||
| dl013: { | |||||
| ...common, | |||||
| cdxx: 'Measurement Information' | |||||
| }, | |||||
| dl014: { | |||||
| ...common, | |||||
| gyzjxx: 'Drug Administration Information', | |||||
| wzly: 'Material Source', | |||||
| xbmc: 'Cell Name', | |||||
| jlzpzxx: 'Dose Group Preparation Information' | |||||
| }, | |||||
| dl015: { | |||||
| ...common, | |||||
| hyqk: 'Medium Change Status' | |||||
| }, | |||||
| dl020: { | dl020: { | ||||
| swdljlbxx: '毒理记录表信息', | |||||
| xbxx:'细胞信息', | |||||
| sydd:'实验地点', | |||||
| czsj:'操作时间', | |||||
| qxbd: '前序表单', | |||||
| dlbz: '备注', | |||||
| czbz: '操作步骤', | |||||
| swdljlbxx: 'Toxicology Record Information', | |||||
| xbxx:'Cell Information', | |||||
| sydd:'Test Location', | |||||
| czsj:'Operation Time', | |||||
| qxbd: 'Previous Form', | |||||
| dlbz: 'Remarks', | |||||
| czbz: 'Operation Steps', | |||||
| } | } | ||||
| } | } | ||||
| @ -1,16 +1,313 @@ | |||||
| <!-- Ames试验(掺入法)观察结果记录表 --> | <!-- Ames试验(掺入法)观察结果记录表 --> | ||||
| <template> | <template> | ||||
| <div></div> | |||||
| <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" | |||||
| /> | |||||
| <BaseInfoFormPackage | |||||
| :ref="refConf.cltj" | |||||
| :formConfig="cltjFormConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| <BaseInfoFormPackage | |||||
| :ref="refConf.czsj" | |||||
| :formConfig="czsjFormConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| <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.dl.dl009.jgxx" /> | |||||
| <CustomTable | |||||
| :columns="jgxxColumns" | |||||
| :ref="refConf.jgxx" | |||||
| :showOperation="false" | |||||
| :showAddRow="false" | |||||
| :formData="formData" | |||||
| :prefixKey="`jgxxTable`" | |||||
| > | |||||
| </CustomTable> | |||||
| <BaseInfoFormPackage | |||||
| fieldItemLabel="template.dl.dl007.bz" | |||||
| label="template.dl.dl007.bz" | |||||
| :ref="refConf.remark" | |||||
| :formConfig="remarkConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </template> | </template> | ||||
| <script> | <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', | |||||
| cltj: 'cltjRef', | |||||
| czsj: 'czsjRef', | |||||
| yqsy: 'yqsyTableRef', | |||||
| jgxx: 'jgxxTableRef', | |||||
| remark: 'remarkRef' | |||||
| } | |||||
| const refNames = Object.values(refConf) | |||||
| export default { | export default { | ||||
| name: 'DL009', | name: 'DL009', | ||||
| components: { | |||||
| BaseInfoFormPackage, | |||||
| LineLabel, | |||||
| TableList, | |||||
| Step, | |||||
| CustomTable, | |||||
| TableOpertaionDelete | |||||
| }, | |||||
| mixins: [templateMixin], | |||||
| props: { | |||||
| fillType: { | |||||
| type: String, | |||||
| default: 'preFill' | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| // 备注表单配置 | |||||
| remarkConfig() { | |||||
| 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 | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 处理条件表单配置 | |||||
| cltjFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: 'conditionItem', | |||||
| config: { | |||||
| cltj: { | |||||
| span: 1, | |||||
| label: 'template.dl.dl009.cltj', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_dl_amescltj'), | |||||
| fillType: 'actFill', | |||||
| otherCode: 'cltjOther' | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: 'conditionItem', | |||||
| config: { | |||||
| sydd: { | |||||
| span: 1, | |||||
| label: 'template.dl.dl009.sydd', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_sydd'), | |||||
| fillType: 'actFill', | |||||
| otherCode: 'syddOther' | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 操作时间表单配置 | |||||
| czsjFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: 'cellItem', | |||||
| config: { | |||||
| kssj: { | |||||
| label: 'template.dl.dl009.kssj', | |||||
| type: 'input', | |||||
| disabled: true | |||||
| }, | |||||
| jssj: { | |||||
| label: 'template.dl.dl009.jssj', | |||||
| type: 'input', | |||||
| fillType: 'actFill', | |||||
| maxlength: 200 | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 仪器使用信息 | |||||
| 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 | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 结果信息列表 - 预留模块,暂不实现 | |||||
| jgxxColumns() { | |||||
| return [] | |||||
| } | |||||
| }, | |||||
| data() { | data() { | ||||
| return {} | |||||
| return { | |||||
| formData: {}, | |||||
| refConf | |||||
| } | |||||
| }, | }, | ||||
| mounted() {}, | |||||
| methods: {} | |||||
| methods: { | |||||
| // 删除表格行 | |||||
| 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 | |||||
| }, | |||||
| 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) | |||||
| } | |||||
| }, | |||||
| // 保存 | |||||
| async onSave() { | |||||
| const formData = this.getStepResource() | |||||
| console.log(formData, 'formData') | |||||
| } | |||||
| } | |||||
| } | } | ||||
| </script> | </script> | ||||
| <style rel="stylesheet/scss" lang="scss"></style> | |||||
| <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> | |||||
| @ -1,16 +1,446 @@ | |||||
| <!-- 骨髓收集记录表 --> | <!-- 骨髓收集记录表 --> | ||||
| <template> | <template> | ||||
| <div></div> | |||||
| <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.dl010.sysj" /> | |||||
| <CustomTable | |||||
| :columns="sysjColumns" | |||||
| :ref="refConf.sysj" | |||||
| :showOperation="fillType === 'actFill'" | |||||
| :showAddRow="fillType === 'actFill'" | |||||
| :formData="formData" | |||||
| :prefixKey="`sysjTable`" | |||||
| > | |||||
| <template slot="operation" slot-scope="{ row, rowIndex, columns }"> | |||||
| <TableOpertaionDelete | |||||
| :row="row" | |||||
| :rowIndex="rowIndex" | |||||
| :columns="columns" | |||||
| @deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')" | |||||
| ></TableOpertaionDelete> | |||||
| </template> | |||||
| </CustomTable> | |||||
| <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.dl.dl010.sjxx" /> | |||||
| <div class="sj-operation-btns"> | |||||
| <el-button size="small" type="primary">{{ | |||||
| $t('template.dl.dl010.xzmb') | |||||
| }}</el-button> | |||||
| <el-button size="small" type="success">{{ | |||||
| $t('template.dl.dl010.dr') | |||||
| }}</el-button> | |||||
| </div> | |||||
| <CustomTable | |||||
| :columns="sjxxColumns" | |||||
| :ref="refConf.sjxx" | |||||
| :showOperation="fillType === 'actFill'" | |||||
| :showAddRow="fillType === 'actFill'" | |||||
| :formData="formData" | |||||
| :prefixKey="`sjxxTable`" | |||||
| > | |||||
| <template slot="operation" slot-scope="{ row, rowIndex, columns }"> | |||||
| <TableOpertaionDelete | |||||
| :row="row" | |||||
| :rowIndex="rowIndex" | |||||
| :columns="columns" | |||||
| @deleteRow="() => deleteTableRow(rowIndex, 'sjxxTableRef')" | |||||
| ></TableOpertaionDelete> | |||||
| </template> | |||||
| </CustomTable> | |||||
| <BaseInfoFormPackage | |||||
| fieldItemLabel="template.dl.dl007.bz" | |||||
| label="template.dl.dl007.bz" | |||||
| :ref="refConf.remark" | |||||
| :formConfig="remarkConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </template> | </template> | ||||
| <script> | <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', | |||||
| sysj: 'sysjTableRef', | |||||
| yqsy: 'yqsyTableRef', | |||||
| sjxx: 'sjxxTableRef', | |||||
| remark: 'remarkRef' | |||||
| } | |||||
| const refNames = Object.values(refConf) | |||||
| export default { | export default { | ||||
| name: 'DL010', | name: 'DL010', | ||||
| components: { | |||||
| BaseInfoFormPackage, | |||||
| LineLabel, | |||||
| TableList, | |||||
| Step, | |||||
| CustomTable, | |||||
| TableOpertaionDelete | |||||
| }, | |||||
| mixins: [templateMixin], | |||||
| props: { | |||||
| fillType: { | |||||
| type: String, | |||||
| default: 'preFill' | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| // 备注表单配置 | |||||
| remarkConfig() { | |||||
| 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.dl.dl010.dwzs', | |||||
| config: { | |||||
| dwzs: { | |||||
| span: 1, | |||||
| label: 'template.dl.dl010.dwzs', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_dwzs'), | |||||
| fillType: 'preFill', | |||||
| otherCode: 'dwzsOther' | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: 'cellItem', | |||||
| label: 'template.dl.dl010.cjdd', | |||||
| config: { | |||||
| cjdd: { | |||||
| label: 'template.dl.dl010.cjdd', | |||||
| type: 'input', | |||||
| fillType: 'actFill', | |||||
| maxlength: 200 | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: 'cellItem', | |||||
| label: 'template.dl.dl010.zpdd', | |||||
| config: { | |||||
| zpdd: { | |||||
| label: 'template.dl.dl010.zpdd', | |||||
| type: 'input', | |||||
| fillType: 'actFill', | |||||
| maxlength: 200 | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: 'conditionItem', | |||||
| label: 'template.dl.dl010.cjbw', | |||||
| config: { | |||||
| cjbw: { | |||||
| span: 1, | |||||
| label: 'template.dl.dl010.cjbw', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_cjbw'), | |||||
| fillType: 'preFill', | |||||
| otherCode: 'cjbwOther' | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: 'cellItem', | |||||
| label: 'template.dl.dl010.jprq', | |||||
| config: { | |||||
| jprqKssj: { | |||||
| label: 'template.dl.dl010.jprqKssj', | |||||
| type: 'input', | |||||
| disabled: true | |||||
| }, | |||||
| jprqJssj: { | |||||
| label: 'template.dl.dl010.jprqJssj', | |||||
| type: 'input', | |||||
| fillType: 'actFill', | |||||
| maxlength: 200 | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 试验试剂信息 | |||||
| sysjColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl010.sjmc', | |||||
| prop: 'sjmc', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.bh', | |||||
| prop: 'bh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.ph', | |||||
| prop: 'ph', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.ndhlcd', | |||||
| prop: 'ndhlcd', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.ly', | |||||
| prop: 'ly', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.sxr', | |||||
| prop: 'sxr', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 仪器使用信息 | |||||
| yqsyColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl010.yqsybh', | |||||
| prop: 'yqbh', | |||||
| bodyType: 'yq', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.mc', | |||||
| prop: 'mc', | |||||
| bodyType: 'input', | |||||
| bodyDisabled: true, | |||||
| bodyFillType: 'actFill', | |||||
| disabled: true | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.bh', | |||||
| prop: 'bh', | |||||
| bodyType: 'input', | |||||
| bodyDisabled: true, | |||||
| bodyFillType: 'actFill', | |||||
| disabled: true | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.zcqk', | |||||
| prop: 'zcqk', | |||||
| bodyType: 'input', | |||||
| bodyDisabled: true, | |||||
| bodyFillType: 'actFill', | |||||
| disabled: true | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.bz', | |||||
| prop: 'bz', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 受集信息列表 | |||||
| sjxxColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl010.dwbh', | |||||
| prop: 'dwbh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.dwxb', | |||||
| prop: 'dwxb', | |||||
| bodyType: 'select', | |||||
| bodyFillType: 'actFill', | |||||
| options: this.getDictOptions('sys_user_sex') | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.dwzl', | |||||
| prop: 'dwzl', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.xcqkxzjd', | |||||
| prop: 'xcqk', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.bz', | |||||
| prop: 'bz', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl010.sjsj', | |||||
| prop: 'sjsj', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| } | |||||
| ] | |||||
| } | |||||
| }, | |||||
| data() { | data() { | ||||
| return {} | |||||
| return { | |||||
| formData: {}, | |||||
| refConf | |||||
| } | |||||
| }, | }, | ||||
| mounted() {}, | |||||
| methods: {} | |||||
| methods: { | |||||
| // 删除表格行 | |||||
| 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 sysjStepResource = this.$refs.sysjTableRef.getStepResource() | |||||
| const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource() | |||||
| // 使用的试剂、仪器 | |||||
| this.resourceTmp = [ | |||||
| ...(sysjStepResource.sjResource || []), | |||||
| ...(yqsyStepResource.sjResource || []) | |||||
| ] | |||||
| this.yqResourceTmp = yqsyStepResource.yqResource || [] | |||||
| return this.resourceTmp | |||||
| }, | |||||
| onRegentSubmit(e) { | |||||
| const { selectInfo, key, rowIndex } = e | |||||
| const { row } = selectInfo | |||||
| if (key === 'yqbh') { | |||||
| const params = { | |||||
| mc: row.mc, | |||||
| bh: row.xh, | |||||
| zcqk: row.jzrq | |||||
| } | |||||
| this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) | |||||
| } | |||||
| }, | |||||
| // 保存 | |||||
| async onSave() { | |||||
| const formData = this.getStepResource() | |||||
| console.log(formData, 'formData') | |||||
| } | |||||
| } | |||||
| } | } | ||||
| </script> | </script> | ||||
| <style rel="stylesheet/scss" lang="scss"></style> | |||||
| <style rel="stylesheet/scss" lang="scss"> | |||||
| .sj-operation-btns { | |||||
| margin-bottom: 15px; | |||||
| display: flex; | |||||
| gap: 10px; | |||||
| } | |||||
| .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> | |||||
| @ -1,16 +1,341 @@ | |||||
| <!-- 细胞复苏记录表 --> | <!-- 细胞复苏记录表 --> | ||||
| <template> | <template> | ||||
| <div></div> | |||||
| <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.dl011.sysj" /> | |||||
| <CustomTable | |||||
| :columns="sysjColumns" | |||||
| :ref="refConf.sysj" | |||||
| :showOperation="fillType === 'actFill'" | |||||
| :showAddRow="fillType === 'actFill'" | |||||
| :formData="formData" | |||||
| :prefixKey="`sysjTable`" | |||||
| > | |||||
| <template slot="operation" slot-scope="{ row, rowIndex, columns }"> | |||||
| <TableOpertaionDelete | |||||
| :row="row" | |||||
| :rowIndex="rowIndex" | |||||
| :columns="columns" | |||||
| @deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')" | |||||
| ></TableOpertaionDelete> | |||||
| </template> | |||||
| </CustomTable> | |||||
| <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.dl.dl011.xbxx" /> | |||||
| <LineLabel label="template.dl.dl011.fxbz" /> | |||||
| <Step :ref="refConf.step" :formData="formData.stepData" /> | |||||
| <!-- 预留区域 - 培养信息 --> | |||||
| <LineLabel label="template.dl.dl011.pyxx" /> | |||||
| <BaseInfoFormPackage | |||||
| fieldItemLabel="template.dl.dl007.bz" | |||||
| label="template.dl.dl007.bz" | |||||
| :ref="refConf.remark" | |||||
| :formConfig="remarkConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </template> | </template> | ||||
| <script> | <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', | |||||
| sysj: 'sysjTableRef', | |||||
| yqsy: 'yqsyTableRef', | |||||
| step: 'stepRef', | |||||
| remark: 'remarkRef' | |||||
| } | |||||
| const refNames = Object.values(refConf) | |||||
| export default { | export default { | ||||
| name: 'DL011', | name: 'DL011', | ||||
| components: { | |||||
| BaseInfoFormPackage, | |||||
| LineLabel, | |||||
| TableList, | |||||
| Step, | |||||
| CustomTable, | |||||
| TableOpertaionDelete | |||||
| }, | |||||
| mixins: [templateMixin], | |||||
| props: { | |||||
| fillType: { | |||||
| type: String, | |||||
| default: 'preFill' | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| // 备注表单配置 | |||||
| remarkConfig() { | |||||
| 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: 'cellItem', | |||||
| label: 'template.dl.dl011.sydd', | |||||
| config: { | |||||
| sydd: { | |||||
| label: 'template.dl.dl011.sydd', | |||||
| type: 'input', | |||||
| fillType: 'actFill', | |||||
| maxlength: 200 | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: 'cellItem', | |||||
| label:'操作时间', | |||||
| config: { | |||||
| kssj: { | |||||
| label: 'template.dl.dl011.kssj', | |||||
| type: 'input', | |||||
| disabled: true | |||||
| }, | |||||
| jssj: { | |||||
| label: 'template.dl.dl011.jssj', | |||||
| type: 'input', | |||||
| fillType: 'actFill', | |||||
| maxlength: 200 | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 试验试剂信息 | |||||
| sysjColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl011.sjmc', | |||||
| prop: 'sjmc', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl011.bh', | |||||
| prop: 'bh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl011.ph', | |||||
| prop: 'ph', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl011.ndhlcd', | |||||
| prop: 'ndhlcd', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl011.ly', | |||||
| prop: 'ly', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl011.sxr', | |||||
| prop: 'sxr', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 仪器使用信息 | |||||
| yqsyColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl011.yqmc', | |||||
| prop: 'yqmc', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl011.yqxh', | |||||
| prop: 'yqxh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl011.yqbh', | |||||
| prop: 'yqbh', | |||||
| bodyType: 'yq', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl011.xccsjzjdrq', | |||||
| prop: 'xccsjzjdrq', | |||||
| bodyType: 'input', | |||||
| bodyDisabled: true, | |||||
| bodyFillType: 'actFill', | |||||
| disabled: true | |||||
| } | |||||
| ] | |||||
| } | |||||
| }, | |||||
| data() { | data() { | ||||
| return {} | |||||
| return { | |||||
| formData: {}, | |||||
| refConf | |||||
| } | |||||
| }, | }, | ||||
| mounted() {}, | |||||
| methods: {} | |||||
| methods: { | |||||
| // 删除表格行 | |||||
| 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 sysjStepResource = this.$refs.sysjTableRef.getStepResource() | |||||
| const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource() | |||||
| const stepResource = this.$refs.stepRef.getStepResource() | |||||
| // 使用的试剂、仪器 | |||||
| this.resourceTmp = [ | |||||
| ...(sysjStepResource.sjResource || []), | |||||
| ...(yqsyStepResource.sjResource || []), | |||||
| ...(stepResource.sjResource || []) | |||||
| ] | |||||
| this.yqResourceTmp = [ | |||||
| ...(yqsyStepResource.yqResource || []), | |||||
| ...(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, | |||||
| xccsjzjdrq: row.jzrq | |||||
| } | |||||
| this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) | |||||
| } | |||||
| }, | |||||
| // 保存 | |||||
| async onSave() { | |||||
| const formData = this.getStepResource() | |||||
| console.log(formData, 'formData') | |||||
| } | |||||
| } | |||||
| } | } | ||||
| </script> | </script> | ||||
| <style rel="stylesheet/scss" lang="scss"></style> | |||||
| <style rel="stylesheet/scss" lang="scss"> | |||||
| .fx-operation-btns { | |||||
| margin-bottom: 15px; | |||||
| display: flex; | |||||
| gap: 10px; | |||||
| } | |||||
| .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> | |||||
| @ -1,16 +1,336 @@ | |||||
| <!-- 细胞制备记录表 --> | <!-- 细胞制备记录表 --> | ||||
| <template> | <template> | ||||
| <div></div> | |||||
| <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.dl012.sysj" /> | |||||
| <CustomTable | |||||
| :columns="sysjColumns" | |||||
| :ref="refConf.sysj" | |||||
| :showOperation="fillType === 'actFill'" | |||||
| :showAddRow="fillType === 'actFill'" | |||||
| :formData="formData" | |||||
| :prefixKey="`sysjTable`" | |||||
| > | |||||
| <template slot="operation" slot-scope="{ row, rowIndex, columns }"> | |||||
| <TableOpertaionDelete | |||||
| :row="row" | |||||
| :rowIndex="rowIndex" | |||||
| :columns="columns" | |||||
| @deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')" | |||||
| ></TableOpertaionDelete> | |||||
| </template> | |||||
| </CustomTable> | |||||
| <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.dl.dl012.xbxx" /> | |||||
| <LineLabel label="template.dl.dl012.zbbz" /> | |||||
| <Step :ref="refConf.step" :formData="formData.stepData" /> | |||||
| <!-- 预留区域 - 培养信息 --> | |||||
| <LineLabel label="template.dl.dl012.pyxx" /> | |||||
| <BaseInfoFormPackage | |||||
| fieldItemLabel="template.dl.dl007.bz" | |||||
| label="template.dl.dl007.bz" | |||||
| :ref="refConf.remark" | |||||
| :formConfig="remarkConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </template> | </template> | ||||
| <script> | <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', | |||||
| sysj: 'sysjTableRef', | |||||
| yqsy: 'yqsyTableRef', | |||||
| step: 'stepRef', | |||||
| remark: 'remarkRef' | |||||
| } | |||||
| const refNames = Object.values(refConf) | |||||
| export default { | export default { | ||||
| name: 'DL012', | name: 'DL012', | ||||
| components: { | |||||
| BaseInfoFormPackage, | |||||
| LineLabel, | |||||
| TableList, | |||||
| Step, | |||||
| CustomTable, | |||||
| TableOpertaionDelete | |||||
| }, | |||||
| mixins: [templateMixin], | |||||
| props: { | |||||
| fillType: { | |||||
| type: String, | |||||
| default: 'preFill' | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| // 备注表单配置 | |||||
| remarkConfig() { | |||||
| 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', | |||||
| config: { | |||||
| sydd: { | |||||
| span: 1, | |||||
| label: 'template.dl.dl012.sydd', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_sydd'), | |||||
| fillType: 'actFill', | |||||
| otherCode: 'syddOther' | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: 'cellItem', | |||||
| label: 'template.dl.dl012.czsj', | |||||
| config: { | |||||
| kssj: { | |||||
| label: 'template.dl.dl012.kssj', | |||||
| type: 'input', | |||||
| disabled: true | |||||
| }, | |||||
| jssj: { | |||||
| label: 'template.dl.dl012.jssj', | |||||
| type: 'input', | |||||
| fillType: 'actFill', | |||||
| maxlength: 200 | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 试验试剂信息 | |||||
| sysjColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl012.sjmc', | |||||
| prop: 'sjmc', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl012.bh', | |||||
| prop: 'bh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl012.ph', | |||||
| prop: 'ph', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl012.ndhlcd', | |||||
| prop: 'ndhlcd', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl012.ly', | |||||
| prop: 'ly', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl012.sxr', | |||||
| prop: 'sxr', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 仪器使用信息 | |||||
| yqsyColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl012.yqmc', | |||||
| prop: 'yqmc', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl012.yqxh', | |||||
| prop: 'yqxh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl012.yqbh', | |||||
| prop: 'yqbh', | |||||
| bodyType: 'yq', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl012.xccsjzjdrq', | |||||
| prop: 'xccsjzjdrq', | |||||
| bodyType: 'input', | |||||
| bodyDisabled: true, | |||||
| bodyFillType: 'actFill', | |||||
| disabled: true | |||||
| } | |||||
| ] | |||||
| } | |||||
| }, | |||||
| data() { | data() { | ||||
| return {} | |||||
| return { | |||||
| formData: {}, | |||||
| refConf | |||||
| } | |||||
| }, | }, | ||||
| mounted() {}, | |||||
| methods: {} | |||||
| methods: { | |||||
| // 删除表格行 | |||||
| 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 sysjStepResource = this.$refs.sysjTableRef.getStepResource() | |||||
| const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource() | |||||
| const stepResource = this.$refs.stepRef.getStepResource() | |||||
| // 使用的试剂、仪器 | |||||
| this.resourceTmp = [ | |||||
| ...(sysjStepResource.sjResource || []), | |||||
| ...(yqsyStepResource.sjResource || []), | |||||
| ...(stepResource.sjResource || []) | |||||
| ] | |||||
| this.yqResourceTmp = [ | |||||
| ...(yqsyStepResource.yqResource || []), | |||||
| ...(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, | |||||
| xccsjzjdrq: row.jzrq | |||||
| } | |||||
| this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) | |||||
| } | |||||
| }, | |||||
| // 保存 | |||||
| async onSave() { | |||||
| const formData = this.getStepResource() | |||||
| console.log(formData, 'formData') | |||||
| } | |||||
| } | |||||
| } | } | ||||
| </script> | </script> | ||||
| <style rel="stylesheet/scss" lang="scss"></style> | |||||
| <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> | |||||
| @ -1,16 +1,267 @@ | |||||
| <!-- 细胞密度测定记录表 --> | <!-- 细胞密度测定记录表 --> | ||||
| <template> | <template> | ||||
| <div></div> | |||||
| <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.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.dl.dl013.xbxx" /> | |||||
| <!-- 预留区域 - 测定信息 --> | |||||
| <LineLabel label="template.dl.dl013.cdxx" /> | |||||
| <BaseInfoFormPackage | |||||
| fieldItemLabel="template.dl.dl007.bz" | |||||
| label="template.dl.dl007.bz" | |||||
| :ref="refConf.remark" | |||||
| :formConfig="remarkConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </template> | </template> | ||||
| <script> | <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', | |||||
| remark: 'remarkRef' | |||||
| } | |||||
| const refNames = Object.values(refConf) | |||||
| export default { | export default { | ||||
| name: 'DL013', | name: 'DL013', | ||||
| components: { | |||||
| BaseInfoFormPackage, | |||||
| LineLabel, | |||||
| TableList, | |||||
| Step, | |||||
| CustomTable, | |||||
| TableOpertaionDelete | |||||
| }, | |||||
| mixins: [templateMixin], | |||||
| props: { | |||||
| fillType: { | |||||
| type: String, | |||||
| default: 'preFill' | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| // 备注表单配置 | |||||
| remarkConfig() { | |||||
| 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.dl.dl013.sydd', | |||||
| config: { | |||||
| sydd: { | |||||
| span: 1, | |||||
| label: 'template.dl.dl013.sydd', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_sydd'), | |||||
| fillType: 'actFill', | |||||
| otherCode: 'syddOther' | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: 'cellItem', | |||||
| label: 'template.dl.dl013.czsj', | |||||
| config: { | |||||
| kssj: { | |||||
| label: 'template.dl.dl013.kssj', | |||||
| type: 'input', | |||||
| disabled: true | |||||
| }, | |||||
| jssj: { | |||||
| label: 'template.dl.dl013.jssj', | |||||
| type: 'input', | |||||
| fillType: 'actFill', | |||||
| maxlength: 200 | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 仪器使用信息 | |||||
| yqsyColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl013.yqbh', | |||||
| prop: 'yqbh', | |||||
| bodyType: 'yq', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl013.yqmc', | |||||
| prop: 'yqmc', | |||||
| bodyType: 'input', | |||||
| bodyDisabled: true, | |||||
| bodyFillType: 'actFill', | |||||
| disabled: true | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl013.yqxh', | |||||
| prop: 'yqxh', | |||||
| bodyType: 'input', | |||||
| bodyDisabled: true, | |||||
| bodyFillType: 'actFill', | |||||
| disabled: true | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl013.xccsjzjdrq', | |||||
| prop: 'xccsjzjdrq', | |||||
| bodyType: 'input', | |||||
| bodyDisabled: true, | |||||
| bodyFillType: 'actFill', | |||||
| disabled: true | |||||
| } | |||||
| ] | |||||
| } | |||||
| }, | |||||
| data() { | data() { | ||||
| return {} | |||||
| return { | |||||
| formData: {}, | |||||
| refConf | |||||
| } | |||||
| }, | }, | ||||
| mounted() {}, | |||||
| methods: {} | |||||
| methods: { | |||||
| // 删除表格行 | |||||
| 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 | |||||
| }, | |||||
| onRegentSubmit(e) { | |||||
| const { selectInfo, key, rowIndex } = e | |||||
| const { row } = selectInfo | |||||
| if (key === 'yqbh') { | |||||
| const params = { | |||||
| yqmc: row.mc, | |||||
| yqxh: row.xh, | |||||
| xccsjzjdrq: row.jzrq | |||||
| } | |||||
| this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) | |||||
| } | |||||
| }, | |||||
| // 保存 | |||||
| async onSave() { | |||||
| const formData = this.getStepResource() | |||||
| console.log(formData, 'formData') | |||||
| } | |||||
| } | |||||
| } | } | ||||
| </script> | </script> | ||||
| <style rel="stylesheet/scss" lang="scss"></style> | |||||
| <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> | |||||
| @ -1,16 +1,411 @@ | |||||
| <!-- 细胞给药/观察记录表 --> | <!-- 细胞给药/观察记录表 --> | ||||
| <template> | <template> | ||||
| <div></div> | |||||
| <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.dl014.gyzjxx" /> | |||||
| <CustomTable | |||||
| :columns="gyzjColumns" | |||||
| :ref="refConf.gyzj" | |||||
| :showOperation="fillType === 'actFill'" | |||||
| :showAddRow="fillType === 'actFill'" | |||||
| :formData="formData" | |||||
| :prefixKey="`gyzjTable`" | |||||
| > | |||||
| <template slot="operation" slot-scope="{ row, rowIndex, columns }"> | |||||
| <TableOpertaionDelete | |||||
| :row="row" | |||||
| :rowIndex="rowIndex" | |||||
| :columns="columns" | |||||
| @deleteRow="() => deleteTableRow(rowIndex, 'gyzjTableRef')" | |||||
| ></TableOpertaionDelete> | |||||
| </template> | |||||
| </CustomTable> | |||||
| <LineLabel label="template.dl.dl014.sysj" /> | |||||
| <CustomTable | |||||
| :columns="sysjColumns" | |||||
| :ref="refConf.sysj" | |||||
| :showOperation="fillType === 'actFill'" | |||||
| :showAddRow="fillType === 'actFill'" | |||||
| :formData="formData" | |||||
| :prefixKey="`sysjTable`" | |||||
| > | |||||
| <template slot="operation" slot-scope="{ row, rowIndex, columns }"> | |||||
| <TableOpertaionDelete | |||||
| :row="row" | |||||
| :rowIndex="rowIndex" | |||||
| :columns="columns" | |||||
| @deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')" | |||||
| ></TableOpertaionDelete> | |||||
| </template> | |||||
| </CustomTable> | |||||
| <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.dl.dl014.xbxx" /> | |||||
| <BaseInfoFormPackage | |||||
| :ref="refConf.xbInfo" | |||||
| :formConfig="xbInfoFormConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| <!-- 预留区域 - 剂量组配制信息 --> | |||||
| <LineLabel label="template.dl.dl014.jlzpzxx" /> | |||||
| <BaseInfoFormPackage | |||||
| fieldItemLabel="template.dl.dl007.bz" | |||||
| label="template.dl.dl007.bz" | |||||
| :ref="refConf.remark" | |||||
| :formConfig="remarkConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </template> | </template> | ||||
| <script> | <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', | |||||
| gyzj: 'gyzjTableRef', | |||||
| sysj: 'sysjTableRef', | |||||
| yqsy: 'yqsyTableRef', | |||||
| xbInfo: 'xbInfoRef', | |||||
| remark: 'remarkRef' | |||||
| } | |||||
| const refNames = Object.values(refConf) | |||||
| export default { | export default { | ||||
| name: 'DL014', | name: 'DL014', | ||||
| components: { | |||||
| BaseInfoFormPackage, | |||||
| LineLabel, | |||||
| TableList, | |||||
| Step, | |||||
| CustomTable, | |||||
| TableOpertaionDelete | |||||
| }, | |||||
| mixins: [templateMixin], | |||||
| props: { | |||||
| fillType: { | |||||
| type: String, | |||||
| default: 'preFill' | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| // 备注表单配置 | |||||
| remarkConfig() { | |||||
| 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.dl.dl014.sydd', | |||||
| config: { | |||||
| sydd: { | |||||
| span: 1, | |||||
| label: 'template.dl.dl014.sydd', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_sydd'), | |||||
| fillType: 'actFill', | |||||
| otherCode: 'syddOther' | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: 'cellItem', | |||||
| label: 'template.dl.dl014.czsj', | |||||
| config: { | |||||
| kssj: { | |||||
| label: 'template.dl.dl014.kssj', | |||||
| type: 'input', | |||||
| disabled: true | |||||
| }, | |||||
| jssj: { | |||||
| label: 'template.dl.dl014.jssj', | |||||
| type: 'input', | |||||
| disabled: true | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 给药制剂信息 | |||||
| gyzjColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl014.mc', | |||||
| prop: 'mc', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.bh', | |||||
| prop: 'bh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.wzly', | |||||
| prop: 'wzly', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.nd', | |||||
| prop: 'nd', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.sxr', | |||||
| prop: 'sxr', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 试验试剂信息 | |||||
| sysjColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl014.sjmc', | |||||
| prop: 'sjmc', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.bh', | |||||
| prop: 'bh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.ph', | |||||
| prop: 'ph', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.ndhlcd', | |||||
| prop: 'ndhlcd', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.ly', | |||||
| prop: 'ly', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.sxr', | |||||
| prop: 'sxr', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 仪器使用信息 | |||||
| yqsyColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl014.yqmc', | |||||
| prop: 'yqmc', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.yqxh', | |||||
| prop: 'yqxh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.yqbh', | |||||
| prop: 'yqbh', | |||||
| bodyType: 'yq', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl014.xccsjzjdrq', | |||||
| prop: 'xccsjzjdrq', | |||||
| bodyType: 'input', | |||||
| bodyDisabled: true, | |||||
| bodyFillType: 'actFill', | |||||
| disabled: true | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 细胞信息表单配置 | |||||
| xbInfoFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: 'cellItem', | |||||
| config: { | |||||
| bltj: { | |||||
| label: 'template.dl.dl014.bltj', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_bltj'), | |||||
| fillType: 'preFill', | |||||
| otherCode: 'bltjOther' | |||||
| }, | |||||
| xbmc: { | |||||
| label: 'template.dl.dl014.xbmc', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_xbmc'), | |||||
| fillType: 'preFill', | |||||
| otherCode: 'xbmcOther' | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| } | |||||
| }, | |||||
| data() { | data() { | ||||
| return {} | |||||
| return { | |||||
| formData: {}, | |||||
| refConf | |||||
| } | |||||
| }, | }, | ||||
| mounted() {}, | |||||
| methods: {} | |||||
| methods: { | |||||
| // 删除表格行 | |||||
| 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 sysjStepResource = this.$refs.sysjTableRef.getStepResource() | |||||
| const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource() | |||||
| // 使用的试剂、仪器 | |||||
| this.resourceTmp = [ | |||||
| ...(sysjStepResource.sjResource || []), | |||||
| ...(yqsyStepResource.sjResource || []) | |||||
| ] | |||||
| this.yqResourceTmp = yqsyStepResource.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, | |||||
| xccsjzjdrq: row.jzrq | |||||
| } | |||||
| this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) | |||||
| } | |||||
| }, | |||||
| // 保存 | |||||
| async onSave() { | |||||
| const formData = this.getStepResource() | |||||
| console.log(formData, 'formData') | |||||
| } | |||||
| } | |||||
| } | } | ||||
| </script> | </script> | ||||
| <style rel="stylesheet/scss" lang="scss"></style> | |||||
| <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> | |||||
| @ -1,16 +1,364 @@ | |||||
| <!-- 细胞换液/观察记录表 --> | <!-- 细胞换液/观察记录表 --> | ||||
| <template> | <template> | ||||
| <div></div> | |||||
| <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.dl015.sysj" /> | |||||
| <CustomTable | |||||
| :columns="sysjColumns" | |||||
| :ref="refConf.sysj" | |||||
| :showOperation="fillType === 'actFill'" | |||||
| :showAddRow="fillType === 'actFill'" | |||||
| :formData="formData" | |||||
| :prefixKey="`sysjTable`" | |||||
| > | |||||
| <template slot="operation" slot-scope="{ row, rowIndex, columns }"> | |||||
| <TableOpertaionDelete | |||||
| :row="row" | |||||
| :rowIndex="rowIndex" | |||||
| :columns="columns" | |||||
| @deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')" | |||||
| ></TableOpertaionDelete> | |||||
| </template> | |||||
| </CustomTable> | |||||
| <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.dl.dl015.xbxx" /> | |||||
| <BaseInfoFormPackage | |||||
| :ref="refConf.xbInfo" | |||||
| :formConfig="xbInfoFormConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| <!-- 预留区域 - 换液情况 --> | |||||
| <LineLabel label="template.dl.dl015.hyqk" /> | |||||
| <LineLabel label="template.dl.dl015.czbz" /> | |||||
| <Step :ref="refConf.step" :formData="formData.stepData" /> | |||||
| <BaseInfoFormPackage | |||||
| fieldItemLabel="template.dl.dl007.bz" | |||||
| label="template.dl.dl007.bz" | |||||
| :ref="refConf.remark" | |||||
| :formConfig="remarkConfig" | |||||
| :formData="formData" | |||||
| /> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| </template> | </template> | ||||
| <script> | <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', | |||||
| sysj: 'sysjTableRef', | |||||
| yqsy: 'yqsyTableRef', | |||||
| xbInfo: 'xbInfoRef', | |||||
| step: 'stepRef', | |||||
| remark: 'remarkRef' | |||||
| } | |||||
| const refNames = Object.values(refConf) | |||||
| export default { | export default { | ||||
| name: 'DL015', | name: 'DL015', | ||||
| components: { | |||||
| BaseInfoFormPackage, | |||||
| LineLabel, | |||||
| TableList, | |||||
| Step, | |||||
| CustomTable, | |||||
| TableOpertaionDelete | |||||
| }, | |||||
| mixins: [templateMixin], | |||||
| props: { | |||||
| fillType: { | |||||
| type: String, | |||||
| default: 'preFill' | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| // 备注表单配置 | |||||
| remarkConfig() { | |||||
| 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.dl.dl015.sydd', | |||||
| config: { | |||||
| sydd: { | |||||
| span: 1, | |||||
| label: 'template.dl.dl015.sydd', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_sydd'), | |||||
| fillType: 'actFill', | |||||
| otherCode: 'syddOther' | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: 'cellItem', | |||||
| label: 'template.dl.dl015.czsj', | |||||
| config: { | |||||
| kssj: { | |||||
| label: 'template.dl.dl015.kssj', | |||||
| type: 'input', | |||||
| disabled: true | |||||
| }, | |||||
| jssj: { | |||||
| label: 'template.dl.dl015.jssj', | |||||
| type: 'input', | |||||
| disabled: true | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 试验试剂信息 | |||||
| sysjColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl015.sjmc', | |||||
| prop: 'sjmc', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl015.bh', | |||||
| prop: 'bh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl015.ph', | |||||
| prop: 'ph', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl015.ndhlcd', | |||||
| prop: 'ndhlcd', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl015.ly', | |||||
| prop: 'ly', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl015.sxr', | |||||
| prop: 'sxr', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 仪器使用信息 | |||||
| yqsyColumns() { | |||||
| return [ | |||||
| { | |||||
| label: 'template.dl.dl015.yqmc', | |||||
| prop: 'yqmc', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl015.yqxh', | |||||
| prop: 'yqxh', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl015.yqbh', | |||||
| prop: 'yqbh', | |||||
| bodyType: 'yq', | |||||
| bodyFillType: 'actFill' | |||||
| }, | |||||
| { | |||||
| label: 'template.dl.dl015.xccsjzjdrq', | |||||
| prop: 'xccsjzjdrq', | |||||
| bodyType: 'input', | |||||
| bodyDisabled: true, | |||||
| bodyFillType: 'actFill', | |||||
| disabled: true | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 细胞信息表单配置 | |||||
| xbInfoFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: 'cellItem', | |||||
| config: { | |||||
| qxbd: { | |||||
| label: 'template.dl.dl015.qxbd', | |||||
| type: 'qxbd', | |||||
| fillType: 'actFill', | |||||
| filledCodes: ['bdmc', 'bdbh'] | |||||
| }, | |||||
| bltj: { | |||||
| label: 'template.dl.dl015.bltj', | |||||
| type: 'select', | |||||
| options: this.getDictOptions('business_bltj'), | |||||
| fillType: 'preFill', | |||||
| otherCode: 'bltjOther' | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| } | |||||
| }, | |||||
| data() { | data() { | ||||
| return {} | |||||
| return { | |||||
| formData: {}, | |||||
| refConf | |||||
| } | |||||
| }, | }, | ||||
| mounted() {}, | |||||
| methods: {} | |||||
| methods: { | |||||
| // 删除表格行 | |||||
| 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 sysjStepResource = this.$refs.sysjTableRef.getStepResource() | |||||
| const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource() | |||||
| const stepResource = this.$refs.stepRef.getStepResource() | |||||
| // 使用的试剂、仪器 | |||||
| this.resourceTmp = [ | |||||
| ...(sysjStepResource.sjResource || []), | |||||
| ...(yqsyStepResource.sjResource || []), | |||||
| ...(stepResource.sjResource || []) | |||||
| ] | |||||
| this.yqResourceTmp = [ | |||||
| ...(yqsyStepResource.yqResource || []), | |||||
| ...(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, | |||||
| xccsjzjdrq: row.jzrq | |||||
| } | |||||
| this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) | |||||
| } | |||||
| }, | |||||
| // 保存 | |||||
| async onSave() { | |||||
| const formData = this.getStepResource() | |||||
| console.log(formData, 'formData') | |||||
| } | |||||
| } | |||||
| } | } | ||||
| </script> | </script> | ||||
| <style rel="stylesheet/scss" lang="scss"></style> | |||||
| <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> | |||||