|
|
@ -83,7 +83,7 @@ |
|
|
|
</el-form> |
|
|
|
<template slot="footer"> |
|
|
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
|
|
|
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
|
|
|
<el-button :disabled="disabled" type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
</template> |
|
|
@ -103,6 +103,7 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
disabled: false, |
|
|
|
visible: false, |
|
|
|
dataForm: { |
|
|
|
platform: 3, |
|
|
@ -198,12 +199,15 @@ export default { |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle: debounce(function() { |
|
|
|
this.disabled = true |
|
|
|
this.$refs.dataForm.validate((valid) => { |
|
|
|
if (!valid) { |
|
|
|
this.disabled = false |
|
|
|
return false |
|
|
|
} |
|
|
|
this.dataForm.zlProjectCode = this.dataForm.zlProjectCode.length && this.dataForm.zlProjectCode.join(',') |
|
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/patient/savePatient', this.dataForm).then(({ data: res }) => { |
|
|
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/patient/savePatient', this.dataForm) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
@ -216,7 +220,9 @@ export default { |
|
|
|
this.$emit('refreshDataList') |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => {}) |
|
|
|
}) |
|
|
|
.catch(() => {}) |
|
|
|
.finally(() => { this.disabled = false }) |
|
|
|
}) |
|
|
|
}, 1000, { leading: true, trailing: false }), |
|
|
|
// 关闭弹框 |
|
|
|