| @ -0,0 +1,364 @@ | |||||
| <!-- 配体结合分析组织匀浆表 --> | |||||
| <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="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> | |||||
| <TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> | |||||
| <TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" /> | |||||
| <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="stepFormPackageRef" | |||||
| :formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" /> | |||||
| <div v-if="fillType == 'preFill'"> | |||||
| <el-button type="primary" @click="downloadExcelTemplate">{{ | |||||
| $t('template.common.downloadTemplate') }}</el-button> | |||||
| <el-button type="primary" @click="showImportExcelDialog">{{ | |||||
| $t('template.common.importTemplate') | |||||
| }}</el-button> | |||||
| </div> | |||||
| <CustomTable @blur="onHandleTableBlur" @headerSelectChange="onHandleTableBlur" | |||||
| :ref="`stepTableRef`" :columns="tableStepColumns" :formData="formData" :prefixKey="`table`" | |||||
| :showOperation="fillType === 'preFill'" fieldItemLabel="template.common.operationSteps"> | |||||
| <template slot="operation" slot-scope="{ row, rowIndex, columns }"> | |||||
| <TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns" | |||||
| @deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion> | |||||
| </template> | |||||
| </CustomTable> | |||||
| </div> | |||||
| <Step ref="stepRef" :formData="formData.stepData"></Step> | |||||
| <BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" | |||||
| ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <!-- <button @click="onSave">保存</button> --> | |||||
| <ImportExcelDialog ref="ImportExcelDialog" @onLoadData="onLoadExcelData" /> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage"; | |||||
| import LineLabel from "@/components/Template/LineLabel"; | |||||
| import TableList from "@/components/Template/Table"; | |||||
| import Step from "@/components/Template/Step"; | |||||
| import templateMixin from "../../mixins/templateMixin.js"; | |||||
| import CustomTable from '@/components/Template/CustomTable.vue'; | |||||
| import { isValueEmpty } from '@/utils/index'; | |||||
| import { getLatestSnArr } from '@/api/template'; | |||||
| import { EventBus } from "@/utils/eventBus"; | |||||
| import { volumeConverter } from "@/utils/volConverter";//体积单位转换 | |||||
| import { convertConcentration } from "@/utils/conConverter";//浓度单位转换 | |||||
| import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; | |||||
| import { getLBA008Config } from "../../formConfig/lba/lba008.js"; | |||||
| import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" | |||||
| import { addTj, subTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools"; | |||||
| import ImportExcelDialog from '../../dialog/ImportExcelDialog' | |||||
| export default { | |||||
| name: "LBA008", | |||||
| components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog, ImportExcelDialog }, | |||||
| mixins: [templateMixin], | |||||
| props: { | |||||
| fillType: { | |||||
| type: String, | |||||
| default: 'preFill', | |||||
| }, | |||||
| }, | |||||
| computed: { | |||||
| tableStepColumns() { | |||||
| return getLBA008Config(this); | |||||
| }, | |||||
| // 附件表单配置 | |||||
| getFjFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: "attachment", | |||||
| config: { | |||||
| attTitle: { | |||||
| label: 'template.pcr.pcr005.fj', | |||||
| type: "attachment", | |||||
| fillType: "actFill", | |||||
| }, | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 配置条件 | |||||
| storageFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: "conditionItem", | |||||
| config: { | |||||
| storageCondition: { | |||||
| label: 'template.common.storageConditionLabel', | |||||
| type: "select", | |||||
| fillType: "preFill", | |||||
| options: this.getDictOptions("business_cctj"), | |||||
| otherCode: "storageConditionOther", | |||||
| }, | |||||
| } | |||||
| } | |||||
| ]; | |||||
| }, | |||||
| // 备注表单配置 | |||||
| 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.lba.lba008.yjtj', | |||||
| config: { | |||||
| pre: { | |||||
| label: 'template.common.preFill', | |||||
| type: "select", | |||||
| multiple: true, | |||||
| fillType: "preFill", | |||||
| options: this.getDictOptions('business_pztj'), | |||||
| otherCode: "preOther", | |||||
| }, | |||||
| act: { | |||||
| label: 'template.common.actualFill', | |||||
| type: "select", | |||||
| fillType: "actFill", | |||||
| otherCode: "actOther", | |||||
| multiple: true, | |||||
| compareTo: "pre", | |||||
| options: this.getDictOptions('business_pztj') | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: "cellItem", | |||||
| label: 'template.lba.lba008.yjsj', | |||||
| config: { | |||||
| startDate: { | |||||
| label: 'template.common.startTime', | |||||
| type: "input", | |||||
| }, | |||||
| endDate: { | |||||
| label: 'template.common.endTime', | |||||
| type: "input", | |||||
| }, | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 操作步骤表单配置 | |||||
| stepFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: 'step', | |||||
| config: { | |||||
| yjry: { | |||||
| label: 'template.lba.lba008.yjry', | |||||
| type: 'input', | |||||
| fillType: 'preFill', | |||||
| subType: 'sj', | |||||
| subKey: 'yjrybh', | |||||
| subFillType: 'actFill', | |||||
| maxlength: 20 | |||||
| }, | |||||
| bs: { | |||||
| label: 'template.lba.lba008.bs', | |||||
| type: 'inputNumber', | |||||
| fillType: 'actFill', | |||||
| maxlength: 20 | |||||
| }, | |||||
| dztpbh: { | |||||
| label: 'template.lba.lba008.dztpbh', | |||||
| type: 'yq', | |||||
| fillType: 'actFill', | |||||
| }, | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| }, | |||||
| data() { | |||||
| return { | |||||
| reagentType: null, // 1-表单 2-表格 | |||||
| formData: {}, | |||||
| currentSubKey: "",//当前点击的子项key | |||||
| currentType: "",//当前点击的类型 | |||||
| currentRowIndex: "",//当前点击的行索引 | |||||
| }; | |||||
| }, | |||||
| mounted() { | |||||
| const formData = this.getFormDataByTemplateData(); | |||||
| this.onHandleTableBlur() | |||||
| }, | |||||
| methods: { | |||||
| downloadExcelTemplate() { | |||||
| this.exportExcel(['动物编号', '组织类型'], '配体结合分析组织匀浆表导入模板') | |||||
| }, | |||||
| //选择试剂提交事件 | |||||
| onSelectReagentSubmit(code, row) { | |||||
| }, | |||||
| showImportExcelDialog() { | |||||
| this.$refs.ImportExcelDialog.show() | |||||
| }, | |||||
| onLoadExcelData(excelData) { | |||||
| excelData.shift() | |||||
| let list = [] | |||||
| excelData.forEach(item => { | |||||
| list.push({ | |||||
| dwbh: item[0], | |||||
| zzlx: item[1], | |||||
| targetStartSolutionVolumePrecision: 3 | |||||
| }) | |||||
| }) | |||||
| this.$refs.stepTableRef.addRows(list) | |||||
| this.$refs.ImportExcelDialog.cancel() | |||||
| setTimeout(() => { | |||||
| this.justUpdateFilledFormData(); | |||||
| }, 100); | |||||
| }, | |||||
| // 失去焦点,计算 | |||||
| onHandleTableBlur() { | |||||
| this.updateTable() | |||||
| }, | |||||
| onHandleBlur(fields) { | |||||
| this.updateTable() | |||||
| }, | |||||
| // 计算表格 预设匀浆溶液补加入量 | |||||
| updateTable() { | |||||
| let content = this.getFilledFormData(); | |||||
| let bs = content.bs | |||||
| if (this.fillType === "actFill") { | |||||
| let tableList = content.stepTableFormData | |||||
| if (tableList && tableList.length > 0) { | |||||
| for (let i = 0; i < tableList.length; i++) { | |||||
| let item = tableList[i] | |||||
| if(item.cqzl && bs) { | |||||
| tableList[i].ysyjrybjrl = item.cqzl * bs | |||||
| } | |||||
| } | |||||
| } | |||||
| this.$refs.stepTableRef.updateDataSource(tableList); | |||||
| } | |||||
| }, | |||||
| //获取已填写的表单数据 | |||||
| getFilledFormData() { | |||||
| return this.getFilledFormDataByRefs(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]) | |||||
| }, | |||||
| async getFormData() { | |||||
| let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); | |||||
| return content; | |||||
| }, | |||||
| getResource() { | |||||
| let content = this.getFilledFormData(); | |||||
| //生成resource | |||||
| let tmpResource = [] | |||||
| if (this.fillType === "actFill") { | |||||
| let tableList = content.stepTableFormData | |||||
| if (tableList && tableList.length > 0) { | |||||
| for (let i = 0; i < tableList.length; i++) { | |||||
| //配置的试剂 | |||||
| let item = tableList[i] | |||||
| console.log('表格item:' + JSON.stringify(item)) | |||||
| //使用的 | |||||
| tmpResource.push({ | |||||
| mc: null, | |||||
| bh: content.subSolution, | |||||
| ph: null, | |||||
| ndz: null, | |||||
| nd: null, | |||||
| nddw: null, | |||||
| ly: 'ELN配制', | |||||
| sxrq: null, | |||||
| kc: null, | |||||
| kcdw: null, | |||||
| syl: item.ysxsyxytj, | |||||
| type: 1, | |||||
| elnType: this.product, | |||||
| syldw: content.headerSelectFields.sjxsyxytjUnit, | |||||
| yxzq: null, | |||||
| yxzqdw: null, | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| if (tmpResource.length > 0) { | |||||
| tmpResource = uniqeResourceOne(tmpResource) | |||||
| } | |||||
| //使用的试剂、仪器 | |||||
| const stepResource = this.$refs.stepRef.getStepResource() | |||||
| this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || []) | |||||
| this.yqResourceTmp = stepResource.yqResource || [] | |||||
| return this.resourceTmp; | |||||
| }, | |||||
| //保存 | |||||
| async onSave() { | |||||
| let content = this.$refs.stepRef.getStepResource(); | |||||
| console.log(content); | |||||
| }, | |||||
| // 删除表格行 | |||||
| deleteRow(rowIndex) { | |||||
| const stepTableRef = this.$refs['stepTableRef']; | |||||
| if (stepTableRef) { | |||||
| stepTableRef.deleteRow(rowIndex); | |||||
| } | |||||
| }, | |||||
| } | |||||
| }; | |||||
| </script> | |||||
| <style rel="stylesheet/scss" lang="scss"> | |||||
| .mt-20 { | |||||
| margin-top: 20px; | |||||
| } | |||||
| .print-btn { | |||||
| margin-bottom: 20px; | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,313 @@ | |||||
| <!-- PCR分析核酸提前浓度测定表 --> | |||||
| <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="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" /> | |||||
| <TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> | |||||
| <TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> | |||||
| <LineLabel label="template.common.operationSteps" /> | |||||
| <Step ref="stepRef" :formData="formData.stepData"></Step> | |||||
| <BaseInfoFormPackage fieldItemLabel="template.pcr.pcr005.fj" label="template.pcr.pcr005.fj" | |||||
| ref="fjRef" :formConfig="getFjFormConfig" :formData="formData" /> | |||||
| <BaseInfoFormPackage fieldItemLabel="template.pcr.pcr012.sjwj" label="template.pcr.pcr012.sjwj" | |||||
| ref="dataFileRef" :formConfig="dataFormConfig" :formData="formData" /> | |||||
| <BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" | |||||
| ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> | |||||
| </div> | |||||
| </div> | |||||
| </div> | |||||
| <!-- <button @click="onSave">保存</button> --> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage"; | |||||
| import LineLabel from "@/components/Template/LineLabel"; | |||||
| import TableList from "@/components/Template/Table"; | |||||
| import Step from "@/components/Template/Step"; | |||||
| import templateMixin from "../../mixins/templateMixin.js"; | |||||
| import CustomTable from '@/components/Template/CustomTable.vue'; | |||||
| import { isValueEmpty } from '@/utils/index'; | |||||
| import { getLatestSnArr } from '@/api/template'; | |||||
| import { EventBus } from "@/utils/eventBus"; | |||||
| import { volumeConverter } from "@/utils/volConverter";//体积单位转换 | |||||
| import { convertConcentration } from "@/utils/conConverter";//浓度单位转换 | |||||
| import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; | |||||
| import { getPCR010Config } from "../../formConfig/PCRTableConfig.js"; | |||||
| import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" | |||||
| import { addTj, subTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools"; | |||||
| import ImportExcelDialog from '../../dialog/ImportExcelDialog' | |||||
| export default { | |||||
| name: "PCR011", | |||||
| components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog, ImportExcelDialog }, | |||||
| mixins: [templateMixin], | |||||
| props: { | |||||
| fillType: { | |||||
| type: String, | |||||
| default: 'preFill', | |||||
| }, | |||||
| }, | |||||
| computed: { | |||||
| tableStepColumns() { | |||||
| return getPCR010Config(this); | |||||
| }, | |||||
| // 配置条件 | |||||
| storageFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: "conditionItem", | |||||
| config: { | |||||
| storageCondition: { | |||||
| label: 'template.common.storageConditionLabel', | |||||
| type: "select", | |||||
| fillType: "preFill", | |||||
| options: this.getDictOptions("business_cctj"), | |||||
| otherCode: "storageConditionOther", | |||||
| }, | |||||
| } | |||||
| } | |||||
| ]; | |||||
| }, | |||||
| // 备注表单配置 | |||||
| remarkConig() { | |||||
| return [ | |||||
| { | |||||
| type: "cellItem", | |||||
| config: { | |||||
| remark: { | |||||
| label: "", | |||||
| type: "textarea", | |||||
| fillType: "actFill", | |||||
| span: 1, | |||||
| placeholder: 'template.common.remarkPlaceholder', | |||||
| maxlength: 1000, | |||||
| rows: 5 | |||||
| } | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 附件表单配置 | |||||
| getFjFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: "attachment", | |||||
| config: { | |||||
| attTitle: { | |||||
| label: 'template.pcr.pcr005.fj', | |||||
| type: "attachment", | |||||
| fillType: "actFill", | |||||
| }, | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 试验基本信息表单配置 | |||||
| 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.common.processCondition', | |||||
| config: { | |||||
| pre: { | |||||
| label: 'template.common.preFill', | |||||
| type: "select", | |||||
| multiple: true, | |||||
| fillType: "preFill", | |||||
| options: this.getDictOptions('business_pztj'), | |||||
| otherCode: "preOther", | |||||
| }, | |||||
| act: { | |||||
| label: 'template.common.actualFill', | |||||
| type: "select", | |||||
| fillType: "actFill", | |||||
| otherCode: "actOther", | |||||
| multiple: true, | |||||
| compareTo: "pre", | |||||
| options: this.getDictOptions('business_pztj') | |||||
| } | |||||
| } | |||||
| }, | |||||
| { | |||||
| type: "cellItem", | |||||
| label: 'template.pcr.pcr010.clsj', | |||||
| config: { | |||||
| startDate: { | |||||
| label: 'template.common.startTime', | |||||
| type: "input", | |||||
| }, | |||||
| endDate: { | |||||
| label: 'template.common.endTime', | |||||
| type: "input", | |||||
| }, | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 数据文件表单配置 | |||||
| dataFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: "cellItem", | |||||
| label: '', | |||||
| config: { | |||||
| hsndcdwjm: { | |||||
| label: 'template.pcr.pcr012.hsndcdwjm', | |||||
| type: "input", | |||||
| fillType: "actFill", | |||||
| }, | |||||
| hsndcdwjlj: { | |||||
| label: 'template.pcr.pcr012.hsndcdwjlj', | |||||
| type: "input", | |||||
| fillType: "actFill", | |||||
| }, | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| // 操作步骤表单配置 | |||||
| stepFormConfig() { | |||||
| return [ | |||||
| { | |||||
| type: 'step', | |||||
| config: { | |||||
| yjry: { | |||||
| label: 'template.pcr.pcr010.yjry', | |||||
| type: 'input', | |||||
| fillType: 'preFill', | |||||
| subType: 'sj', | |||||
| subKey: 'yjrybh', | |||||
| subFillType: 'actFill', | |||||
| maxlength: 20 | |||||
| }, | |||||
| bs: { | |||||
| label: 'template.pcr.pcr010.bs', | |||||
| type: 'inputNumber', | |||||
| fillType: 'actFill', | |||||
| maxlength: 20 | |||||
| }, | |||||
| dztpbh: { | |||||
| label: 'template.pcr.pcr010.dztpbh', | |||||
| type: 'yq', | |||||
| fillType: 'actFill', | |||||
| }, | |||||
| } | |||||
| } | |||||
| ] | |||||
| }, | |||||
| }, | |||||
| data() { | |||||
| return { | |||||
| reagentType: null, // 1-表单 2-表格 | |||||
| formData: {}, | |||||
| currentSubKey: "",//当前点击的子项key | |||||
| currentType: "",//当前点击的类型 | |||||
| currentRowIndex: "",//当前点击的行索引 | |||||
| }; | |||||
| }, | |||||
| mounted() { | |||||
| const formData = this.getFormDataByTemplateData(); | |||||
| }, | |||||
| methods: { | |||||
| //获取已填写的表单数据 | |||||
| getFilledFormData() { | |||||
| return this.getFilledFormDataByRefs(["baseInfoRef", "stepRef", "fjRef", "remarkRef"]) | |||||
| }, | |||||
| async getFormData() { | |||||
| let content = await this.validFormFields(["baseInfoRef", "stepRef", "fjRef", "remarkRef"]); | |||||
| return content; | |||||
| }, | |||||
| getResource() { | |||||
| let content = this.getFilledFormData(); | |||||
| //生成resource | |||||
| let tmpResource = [] | |||||
| if (this.fillType === "actFill") { | |||||
| let tableList = content.stepTableFormData | |||||
| if (tableList && tableList.length > 0) { | |||||
| for (let i = 0; i < tableList.length; i++) { | |||||
| //配置的试剂 | |||||
| let item = tableList[i] | |||||
| console.log('表格item:' + JSON.stringify(item)) | |||||
| //使用的 | |||||
| tmpResource.push({ | |||||
| mc: null, | |||||
| bh: content.subSolution, | |||||
| ph: null, | |||||
| ndz: null, | |||||
| nd: null, | |||||
| nddw: null, | |||||
| ly: 'ELN配制', | |||||
| sxrq: null, | |||||
| kc: null, | |||||
| kcdw: null, | |||||
| syl: item.ysxsyxytj, | |||||
| type: 1, | |||||
| elnType: this.product, | |||||
| syldw: content.headerSelectFields.sjxsyxytjUnit, | |||||
| yxzq: null, | |||||
| yxzqdw: null, | |||||
| }) | |||||
| } | |||||
| } | |||||
| } | |||||
| if (tmpResource.length > 0) { | |||||
| tmpResource = uniqeResourceOne(tmpResource) | |||||
| } | |||||
| //使用的试剂、仪器 | |||||
| const stepResource = this.$refs.stepRef.getStepResource() | |||||
| this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || []) | |||||
| this.yqResourceTmp = stepResource.yqResource || [] | |||||
| return this.resourceTmp; | |||||
| }, | |||||
| //保存 | |||||
| async onSave() { | |||||
| let content = this.$refs.stepRef.getStepResource(); | |||||
| console.log(content); | |||||
| }, | |||||
| } | |||||
| }; | |||||
| </script> | |||||
| <style rel="stylesheet/scss" lang="scss"> | |||||
| .mt-20 { | |||||
| margin-top: 20px; | |||||
| } | |||||
| .print-btn { | |||||
| margin-bottom: 20px; | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,77 @@ | |||||
| // LBA008 | |||||
| export const getLBA008Config = ($this) => { | |||||
| return [ | |||||
| { | |||||
| label: 'template.lba.lba008.dwbh', | |||||
| prop: 'dwbh', | |||||
| width: 280, | |||||
| bodyType: 'input', | |||||
| fillType: 'preFill', | |||||
| otherCode: 'bhOther', | |||||
| bodyFillType: 'preFill', | |||||
| }, | |||||
| { | |||||
| label: 'template.lba.lba008.zzlx', | |||||
| prop: 'zzlx', | |||||
| width: 280, | |||||
| showWidth: 180, | |||||
| fillType: 'preFill', | |||||
| bodyType: 'input', | |||||
| bodyFillType: 'preFill', | |||||
| bodyMaxlength: 10, | |||||
| }, | |||||
| { | |||||
| label: 'template.lba.lba008.cqzl', | |||||
| prop: 'cqzl', | |||||
| width: 280, | |||||
| showWidth: 180, | |||||
| fillType: 'preFill', | |||||
| headerSelectKey: 'cqzlUnit', | |||||
| headerOptions: $this.getDictOptions('business_zldw'), | |||||
| bodyType: 'inputNumber', | |||||
| bodyFillType: 'actFill', | |||||
| bodySubType: 'button', | |||||
| bodySubButtonName: 'form.hqz', | |||||
| bodyMaxlength: 10, | |||||
| bodySubFillType: 'actFill', | |||||
| subPrecision: 0, | |||||
| showBodySub: $this.fillType === 'actFill', | |||||
| bodyMaxlength: 10, | |||||
| bodySubPlaceholder: 'template.common.xswsPlaceholder', | |||||
| }, | |||||
| { | |||||
| label: 'template.lba.lba008.ysyjrybjrl', | |||||
| prop: 'ysyjrybjrl', | |||||
| width: 280, | |||||
| showWidth: 180, | |||||
| fillType: 'preFill', | |||||
| headerSelectKey: 'ysyjrybjrlUnit', | |||||
| headerOptions: $this.getDictOptions('business_tjdw'), | |||||
| bodyType: 'inputNumber', | |||||
| bodyFillType: 'actFill', | |||||
| bodyMaxlength: 10, | |||||
| bodySubType: 'inputNumber', | |||||
| bodySubKey: 'targetStartSolutionVolumePrecision', | |||||
| bodySubFillType: 'preFill', | |||||
| showBodySub: $this.fillType === 'preFill', | |||||
| bodyPrecisionKey: 'targetStartSolutionVolumePrecision', | |||||
| bodyMaxlength: 10, | |||||
| bodyDisabled: $this.fillType === 'preFill', | |||||
| bodySubPlaceholder: 'template.common.xswsPlaceholder', | |||||
| headerSelectTo:"actStartSolutionVolumeUnit", | |||||
| }, | |||||
| { | |||||
| label: 'template.lba.lba008.sjyjrybjrl', | |||||
| prop: 'sjyjrybjrl', | |||||
| width: 280, | |||||
| showWidth: 180, | |||||
| fillType: 'preFill', | |||||
| headerSelectKey: 'sjyjrybjrlUnit', | |||||
| headerOptions: $this.getDictOptions('business_tjdw'), | |||||
| bodyType: 'inputNumber', | |||||
| bodyFillType: 'actFill', | |||||
| copyFrom: 'ysyjrybjrl', //复制哪个字段 | |||||
| bodyMaxlength: 10, | |||||
| } | |||||
| ] | |||||
| } | |||||