Browse Source

提交成功隐藏提交按钮

newMaster
liuzhipeng 3 months ago
parent
commit
5b082e7971
  1. 43
      acupuncture-前台/src/views/screening/h5.vue

43
acupuncture-前台/src/views/screening/h5.vue

@ -1,5 +1,5 @@
<template>
<div class="app-container">
<div class="app-container" v-loading="loading">
<div class="hospital">{{ tenantName || "- - - -" }}</div>
<el-form
v-if="stepNum == 1"
@ -157,7 +157,7 @@
下一步
</el-button>
</div>
<div class="submit-box" v-if="stepNum == 2">
<div class="submit-box" v-if="stepNum == 2 && disabled">
<el-button type="primary" class="submit-box-but" @click="scaleSubmitForm">
提交
</el-button>
@ -177,9 +177,12 @@ export default {
name: "Notice",
data() {
return {
loading: false,
disabled: true,
hospitalId: "",
tenantName: "",
stepNum: 1, //
stepNum: 2, //
uploadFileUrl: process.env.VUE_APP_BASE_URL + "/baidu/ocr/idcardInfo", //
fileList: [],
@ -331,15 +334,15 @@ export default {
},
], //
form: {
"SCWJ-NAME": "",
"SCWJ-SEX": "",
"SCWJ-BIRTH": "",
"SCWJ-AGE": "",
"SCWJ-PHONE": "",
"SCWJ-HEIGHT": "",
"SCWJ-WEIGHT": "",
"SCWJ-BMI": "",
"SCWJ-JL": "",
"SCWJ-NAME": "测试患者",
"SCWJ-SEX": "",
"SCWJ-BIRTH": "1945-01-01",
"SCWJ-AGE": "70",
"SCWJ-PHONE": "18534353638",
"SCWJ-HEIGHT": "170",
"SCWJ-WEIGHT": "80",
"SCWJ-BMI": "24.56",
"SCWJ-JL": "正常",
"SCWJ-ZLFS": [],
},
//
@ -542,6 +545,7 @@ export default {
},
//
async scaleSubmitForm() {
try {
// ------ ------
let score = 0;
// , topic${i}
@ -559,6 +563,7 @@ export default {
},
};
create(params).then(async (res) => {
this.loading = true;
this.detailId = res.data.detailId;
this.id = res.data.id;
// ------ ------
@ -579,12 +584,16 @@ export default {
// ------ ------
const submitParams = { param: { detailId: this.detailId } };
await screenSubmit(submitParams).then((response) => {
this.loading = false;
this.disabled = false;
this.$modal.msgSuccess("提交成功");
// setTimeout(() => {
// location.reload();
// }, 3000);
});
});
} catch (error) {
this.loading = false;
console.log("提交失败:", error);
this.$message.error("提交失败,请稍后重试!");
}
},
//
async saveAnswer(value, str) {
@ -598,8 +607,8 @@ export default {
};
await screenSave(params).then((response) => {});
} catch (error) {
console.log("error", error);
this.$message.error("网络异常,请检查您的网络!");
console.log("保存失败:", error);
this.$message.error("保存失败,请稍后重试!");
}
},
},

Loading…
Cancel
Save