|
|
@ -122,16 +122,15 @@ export default { |
|
|
const item = allFieldsConfig[key]; |
|
|
const item = allFieldsConfig[key]; |
|
|
if(item.type === "xb" || item.type === "regent" || item.type === "gsp" || item.type === "mix"){ |
|
|
if(item.type === "xb" || item.type === "regent" || item.type === "gsp" || item.type === "mix"){ |
|
|
if(formFields[key]){ |
|
|
if(formFields[key]){ |
|
|
this.formFields[`selectType_${key}`] = item.sjSelectType; |
|
|
|
|
|
let o = { |
|
|
let o = { |
|
|
type:item.sjSelectType || formFields[`selectType_${key}`] , |
|
|
|
|
|
|
|
|
...formFields[`selectInfo_${key}`], |
|
|
value:formFields[key], |
|
|
value:formFields[key], |
|
|
} |
|
|
} |
|
|
if(item.ylCode){ |
|
|
if(item.ylCode){ |
|
|
o.yl = formFields[item.ylCode];//用量 |
|
|
|
|
|
|
|
|
o.syl = formFields[item.ylCode];//用量 |
|
|
} |
|
|
} |
|
|
if(item.dwCode){ |
|
|
if(item.dwCode){ |
|
|
o.dw = formFields[item.dwCode];//单位 |
|
|
|
|
|
|
|
|
o.syldw = formFields[item.dwCode];//单位 |
|
|
} |
|
|
} |
|
|
sjResource.push(o); |
|
|
sjResource.push(o); |
|
|
} |
|
|
} |
|
|
@ -140,11 +139,11 @@ export default { |
|
|
yqResource.push({ |
|
|
yqResource.push({ |
|
|
type:item.type, |
|
|
type:item.type, |
|
|
value:formFields[key], |
|
|
value:formFields[key], |
|
|
|
|
|
...formFields[`selectInfo_${key}`], |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
console.log(sjResource,"sjResource") |
|
|
|
|
|
return { |
|
|
return { |
|
|
sjResource, |
|
|
sjResource, |
|
|
yqResource, |
|
|
yqResource, |
|
|
@ -171,21 +170,24 @@ export default { |
|
|
// 处理选择试剂/供试品/给药制剂提交 |
|
|
// 处理选择试剂/供试品/给药制剂提交 |
|
|
onMixReagentSubmit(data){ |
|
|
onMixReagentSubmit(data){ |
|
|
if(data.uuid !== this.uuid) return; |
|
|
if(data.uuid !== this.uuid) return; |
|
|
this.formFields[this.currentClickKey] = data.selectedId; |
|
|
|
|
|
|
|
|
this.updateFormData(this.currentClickKey,data.selectedId) |
|
|
if(data.selectType){ |
|
|
if(data.selectType){ |
|
|
this.allFieldsConfig[this.currentClickKey].sjSelectType = data.selectType; |
|
|
this.allFieldsConfig[this.currentClickKey].sjSelectType = data.selectType; |
|
|
|
|
|
this.formFields[`selectInfo_${this.currentClickKey}`] = data.selectInfo; |
|
|
} |
|
|
} |
|
|
this.$emit("onDialogSubmit",data) |
|
|
this.$emit("onDialogSubmit",data) |
|
|
}, |
|
|
}, |
|
|
// 处理选择试剂提交 |
|
|
// 处理选择试剂提交 |
|
|
onReagentSubmit(data){ |
|
|
onReagentSubmit(data){ |
|
|
if(data.uuid !== this.uuid) return; |
|
|
if(data.uuid !== this.uuid) return; |
|
|
this.formFields[this.currentClickKey] = data.selectedId; |
|
|
|
|
|
|
|
|
this.updateFormData(this.currentClickKey,data.selectedId) |
|
|
}, |
|
|
}, |
|
|
// 处理选择仪器提交,不确定后续还会不会有其他操作,所以和选择试剂提交区分开。 |
|
|
// 处理选择仪器提交,不确定后续还会不会有其他操作,所以和选择试剂提交区分开。 |
|
|
onInstrumentSubmit(data){ |
|
|
onInstrumentSubmit(data){ |
|
|
if(data.uuid !== this.uuid) return; |
|
|
if(data.uuid !== this.uuid) return; |
|
|
this.formFields[this.currentClickKey] = data.selectedId; |
|
|
|
|
|
|
|
|
this.updateFormData(this.currentClickKey,data.selectedId) |
|
|
|
|
|
// this.formFields[this.currentClickKey] = data.selectedId; |
|
|
|
|
|
this.formFields[`selectInfo_${this.currentClickKey}`] = data.selectInfo; |
|
|
}, |
|
|
}, |
|
|
getClickableItem(sItem) { |
|
|
getClickableItem(sItem) { |
|
|
return { |
|
|
return { |
|
|
@ -196,34 +198,55 @@ export default { |
|
|
}, |
|
|
}, |
|
|
handleClickInstrument(key,type) { |
|
|
handleClickInstrument(key,type) { |
|
|
this.currentClickKey = key; |
|
|
this.currentClickKey = key; |
|
|
if(type === 'regent'){ |
|
|
|
|
|
|
|
|
if(type === 'regent'){//试剂 |
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
studyFormId:this.templateData.id, |
|
|
studyFormId:this.templateData.id, |
|
|
uuid:this.uuid, |
|
|
uuid:this.uuid, |
|
|
sourceFrom:'step', |
|
|
sourceFrom:'step', |
|
|
type:"sj" |
|
|
|
|
|
|
|
|
type:"1" |
|
|
}) |
|
|
}) |
|
|
}else if(type === 'gsp'){ |
|
|
|
|
|
|
|
|
}else if(type === 'gyzj'){//给药制剂 |
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
studyFormId:this.templateData.id, |
|
|
studyFormId:this.templateData.id, |
|
|
uuid:this.uuid, |
|
|
uuid:this.uuid, |
|
|
sourceFrom:'step', |
|
|
sourceFrom:'step', |
|
|
type:"gsp" |
|
|
|
|
|
|
|
|
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'){ |
|
|
}else if(type === 'mix'){ |
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
studyFormId:this.templateData.id, |
|
|
studyFormId:this.templateData.id, |
|
|
uuid:this.uuid, |
|
|
uuid:this.uuid, |
|
|
sourceFrom:'step', |
|
|
sourceFrom:'step', |
|
|
type:"sj", |
|
|
|
|
|
|
|
|
type:"1", |
|
|
mixType:true, |
|
|
mixType:true, |
|
|
}) |
|
|
}) |
|
|
}else if(type === 'xb'){ |
|
|
|
|
|
|
|
|
}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",{ |
|
|
EventBus.$emit("showSelectMixReagentDialog",{ |
|
|
studyFormId:this.templateData.id, |
|
|
studyFormId:this.templateData.id, |
|
|
uuid:this.uuid, |
|
|
uuid:this.uuid, |
|
|
sourceFrom:'step', |
|
|
sourceFrom:'step', |
|
|
type:"xb", |
|
|
|
|
|
|
|
|
type:"11", |
|
|
}) |
|
|
}) |
|
|
}else if(type === 'instrument'){ |
|
|
}else if(type === 'instrument'){ |
|
|
EventBus.$emit("showSelectInstrumentDialog",{ |
|
|
EventBus.$emit("showSelectInstrumentDialog",{ |
|
|
|