Browse Source

查看诊疗详情一进来调用同步人体成分数据并提交保存

new
lzp 4 days ago
parent
commit
3b1f96e2e1
  1. 13
      acupuncture-前台/src/views/medicalFile/details.vue

13
acupuncture-前台/src/views/medicalFile/details.vue

@ -1414,13 +1414,14 @@ export default {
humanBodyOpen: false, humanBodyOpen: false,
}; };
}, },
created() { async created() {
this.form = JSON.parse(this.$route.query.data); this.form = JSON.parse(this.$route.query.data);
let treatmentId = this.$route.query.treatmentId; let treatmentId = this.$route.query.treatmentId;
this.treatmentId = treatmentId; this.treatmentId = treatmentId;
this.handleDetails(treatmentId); this.handleDetails(treatmentId);
this.getFollowupQuery(); // 访 this.getFollowupQuery(); // 访
await this.getHumanBody(); //
await this.submitDetailsForm(); //
this.userInfo = JSON.parse(localStorage.getItem("user")); this.userInfo = JSON.parse(localStorage.getItem("user"));
}, },
methods: { methods: {
@ -1476,8 +1477,8 @@ export default {
}); });
}, },
// //
getHumanBody() { async getHumanBody() {
selectByMemberId({ await selectByMemberId({
id: this.form.id, id: this.form.id,
}).then((res) => { }).then((res) => {
if (!res.data.id) { if (!res.data.id) {
@ -1689,7 +1690,7 @@ export default {
}, },
submitDetailsForm: function () { submitDetailsForm: function () {
this.$refs["detailsForm"].validate((valid) => { this.$refs["detailsForm"].validate(async (valid) => {
if (valid) { if (valid) {
let codeAndAnswerList = []; let codeAndAnswerList = [];
for (let key in this.detailsForm) { for (let key in this.detailsForm) {
@ -1705,7 +1706,7 @@ export default {
codeAndAnswerList.push(data); codeAndAnswerList.push(data);
} }
saveAidRecord({ await saveAidRecord({
treatmentId: this.form.id, treatmentId: this.form.id,
codeAndAnswerList, codeAndAnswerList,
}).then((response) => { }).then((response) => {

Loading…
Cancel
Save