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

Loading…
Cancel
Save