|
|
|
@ -101,14 +101,8 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
EventBus.$on("onReagentSubmit",this.onReagentSubmit) |
|
|
|
// EventBus.$on("onInstrumentSubmit",this.onInstrumentSubmit) |
|
|
|
// EventBus.$on("onMixReagentSubmit",this.onMixReagentSubmit) |
|
|
|
}, |
|
|
|
unmounted() { |
|
|
|
EventBus.$off("onReagentSubmit",this.onReagentSubmit) |
|
|
|
// EventBus.$off("onInstrumentSubmit",this.onInstrumentSubmit) |
|
|
|
// EventBus.$off("onMixReagentSubmit",this.onMixReagentSubmit) |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
@ -131,7 +125,6 @@ export default { |
|
|
|
this.allFieldsConfig[key].sjSelectType = data.selectType; |
|
|
|
} |
|
|
|
this.formFields[`selectInfo_${key}`] = data.selectInfo; |
|
|
|
console.log(this.formFields,"mmm") |
|
|
|
// this.$emit("onRegentSubmit", {selectInfo:data,key,config:item}); |
|
|
|
}, |
|
|
|
getRegentItem(item,fieldCode="type"){ |
|
|
|
@ -209,7 +202,6 @@ console.log(this.formFields,"mmm") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(sjResource,yqResource,"sjResource,yqResource") |
|
|
|
return { |
|
|
|
sjResource, |
|
|
|
yqResource, |
|
|
|
@ -233,28 +225,6 @@ console.log(this.formFields,"mmm") |
|
|
|
fillType:sItem.fillType || "actFill", |
|
|
|
} |
|
|
|
}, |
|
|
|
// 处理选择试剂/供试品/给药制剂提交 |
|
|
|
onMixReagentSubmit(data){ |
|
|
|
if(data.uuid !== this.uuid) return; |
|
|
|
this.updateFormData(this.currentClickKey,data.selectedId) |
|
|
|
if(data.selectType){ |
|
|
|
this.allFieldsConfig[this.currentClickKey].sjSelectType = data.selectType; |
|
|
|
this.formFields[`selectInfo_${this.currentClickKey}`] = data.selectInfo; |
|
|
|
} |
|
|
|
this.$emit("onDialogSubmit",data,this.currentClickKey) |
|
|
|
}, |
|
|
|
// 处理选择试剂提交 |
|
|
|
onReagentSubmit(data){ |
|
|
|
if(data.uuid !== this.uuid) return; |
|
|
|
this.updateFormData(this.currentClickKey,data.selectedId) |
|
|
|
}, |
|
|
|
// 处理选择仪器提交,不确定后续还会不会有其他操作,所以和选择试剂提交区分开。 |
|
|
|
onInstrumentSubmit(data){ |
|
|
|
if(data.uuid !== this.uuid) return; |
|
|
|
this.updateFormData(this.currentClickKey,data.selectedId) |
|
|
|
// this.formFields[this.currentClickKey] = data.selectedId; |
|
|
|
this.formFields[`selectInfo_${this.currentClickKey}`] = data.selectInfo; |
|
|
|
}, |
|
|
|
getClickableItem(sItem) { |
|
|
|
return { |
|
|
|
...sItem, |
|
|
|
@ -262,67 +232,6 @@ console.log(this.formFields,"mmm") |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
handleClickInstrument(key,type) { |
|
|
|
this.currentClickKey = key; |
|
|
|
if(type === 'sj'){//试剂 |
|
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
|
studyFormId:this.templateData.id, |
|
|
|
uuid:this.uuid, |
|
|
|
sourceFrom:'step', |
|
|
|
type:"1" |
|
|
|
}) |
|
|
|
}else if(type === 'gyzj'){//给药制剂 |
|
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
|
studyFormId:this.templateData.id, |
|
|
|
uuid:this.uuid, |
|
|
|
sourceFrom:'step', |
|
|
|
type:"3" |
|
|
|
}) |
|
|
|
}else if(type === 'mjy'){//麻精药 |
|
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
|
studyFormId:this.templateData.id, |
|
|
|
uuid:this.uuid, |
|
|
|
sourceFrom:'step', |
|
|
|
type:"5" |
|
|
|
}) |
|
|
|
}else if(type === 'gsp'){//供试品 |
|
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
|
studyFormId:this.templateData.id, |
|
|
|
uuid:this.uuid, |
|
|
|
sourceFrom:'step', |
|
|
|
type:"7" |
|
|
|
}) |
|
|
|
}else if(type === 'mix'){ |
|
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
|
studyFormId:this.templateData.id, |
|
|
|
uuid:this.uuid, |
|
|
|
sourceFrom:'step', |
|
|
|
type:"1", |
|
|
|
mixType:true, |
|
|
|
}) |
|
|
|
}else if(type === 'xj'){//细菌 |
|
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
|
studyFormId:this.templateData.id, |
|
|
|
uuid:this.uuid, |
|
|
|
sourceFrom:'step', |
|
|
|
type:"9", |
|
|
|
}) |
|
|
|
}else if(type === 'xb'){//细胞 |
|
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
|
studyFormId:this.templateData.id, |
|
|
|
uuid:this.uuid, |
|
|
|
sourceFrom:'step', |
|
|
|
type:"11", |
|
|
|
}) |
|
|
|
}else if(type === 'yq'){ |
|
|
|
EventBus.$emit("showSelectInstrumentDialog",{ |
|
|
|
studyFormId:this.templateData.id, |
|
|
|
uuid:this.uuid, |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|