<el-button type="primary" :disabled="isDisable" @click="doctorAutograph">医生签字</el-button>
export default {
data() {
return {
isDisable:false,//防止医生签名多次提交
};
},
methods:{
async doctorAutograph(){
this.isDisable = true;//点击后禁用该按钮;
this.changeMedicinal = this.inferenceData[this.deductionIndex].prescData;
const response = await autograph(this,this.disease,this.diseaseElement,this.drugState,this.inferenceTransferId,this.patientId,this.changeMedicinal,this.treat,this.visitId);
const data = response.data;
var that = this;
if(response.code == 0){
this.$message({
message: '签名成功,继续开方即将切换的患者列表!',
type: "success",
duration: 2000
});
setTimeout(function () {
that.$router.push({
name: "PatientManagement",
});
},2000)
}
setTimeout(() => {
this.isDisable = false;//响应后延迟几秒回复正常;
}, 3000)
}
}
}