|
|
|
@ -17,7 +17,7 @@ |
|
|
|
<LineLabel label="template.common.operationSteps" /> |
|
|
|
<div class="template-form-item"> |
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur" |
|
|
|
:formData="formData" /> |
|
|
|
:formData="formData" @clickable="handleJzClickable" /> |
|
|
|
|
|
|
|
<CustomTable |
|
|
|
@blur="onHandleTableBlur" |
|
|
|
@ -46,6 +46,11 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <button @click = "onSave">保存</button> --> |
|
|
|
|
|
|
|
<SelectReagentDialog |
|
|
|
@submit="onSelectReagentSubmit" |
|
|
|
ref="selectReagentDialogRef" > |
|
|
|
</SelectReagentDialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -59,10 +64,11 @@ import CustomTable from '@/components/Template/CustomTable.vue'; |
|
|
|
import { getLatestSn } from '@/api/template'; |
|
|
|
import {getSWYPFXFFXYPZBBTableConfig} from "../../../formConfig/SWYPFXFFXYPZBBTableConfig.js"; |
|
|
|
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" |
|
|
|
import SelectReagentDialog from '../../../dialog/SelectReagentDialog.vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "SWYPFXRYPZB", |
|
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion }, |
|
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion,SelectReagentDialog }, |
|
|
|
mixins: [templateMixin], |
|
|
|
props: { |
|
|
|
fillType: { |
|
|
|
@ -203,7 +209,7 @@ export default { |
|
|
|
type: "input", |
|
|
|
fillType: "preFill", |
|
|
|
subType: "clickable", |
|
|
|
subKey: "subSolution", |
|
|
|
subKey: "subJz", |
|
|
|
subFillType: "actFill", |
|
|
|
maxlength: 20, |
|
|
|
}, |
|
|
|
@ -217,8 +223,12 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
reagentType: "",//本表单特殊字段:选择试剂的类型1选择基质,2表格里面选择试剂 |
|
|
|
|
|
|
|
currentSubKey: "",//当前点击的子项key |
|
|
|
rowIndex:0,//当前表格点击的行数 |
|
|
|
|
|
|
|
resource: [], |
|
|
|
resourceData1: [], |
|
|
|
sysjColumns: [ |
|
|
|
{ label: 'template.common.reagentName', prop: "mc" },//名称 |
|
|
|
{ label: 'template.common.reagentCode', prop: "bh" },//编号 |
|
|
|
@ -250,15 +260,35 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//点击基质选择 |
|
|
|
handleJzClickable(obj){ |
|
|
|
this.reagentType = 1//本表单特殊字段 |
|
|
|
this.currentSubKey = obj.subKey; |
|
|
|
this.$refs.selectReagentDialogRef.show() |
|
|
|
}, |
|
|
|
//选择试剂提交事件 |
|
|
|
onSelectReagentSubmit(code,row){ |
|
|
|
if(this.reagentType===1){ |
|
|
|
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code); |
|
|
|
}else{ |
|
|
|
this.$refs.tableRef.updateDataSourceByRowIndex(this.rowIndex,{ |
|
|
|
[this.currentSubKey]: code, |
|
|
|
}) |
|
|
|
} |
|
|
|
this.$refs.selectReagentDialogRef.onCancel() |
|
|
|
}, |
|
|
|
//点击表格单元格 |
|
|
|
handleClickable(col, rowIndex) { |
|
|
|
//本表单特殊字段 |
|
|
|
this.reagentType = 2 |
|
|
|
|
|
|
|
this.rowIndex = rowIndex |
|
|
|
this.currentSubKey = col.prop; |
|
|
|
console.log("clickable",rowIndex, col) |
|
|
|
if(col.prop === "sjry"){ |
|
|
|
//调用对应弹窗的方法; |
|
|
|
//调用对应弹窗的方法-多个点击的需要判断是哪个字段点击 |
|
|
|
this.$refs.selectReagentDialogRef.show() |
|
|
|
} |
|
|
|
this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex,{ |
|
|
|
sjry: "我是填充进来的数据", |
|
|
|
}) |
|
|
|
}, |
|
|
|
//获取目标溶液编号 |
|
|
|
async getCode(){ |
|
|
|
@ -312,6 +342,7 @@ export default { |
|
|
|
tableRef.deleteRow(rowIndex); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
|