Update profile.vue

This commit is contained in:
huxuejian 2026-10-15 17:27:06 +08:00
parent 265dc9381d
commit 25925c1969

View File

@ -232,7 +232,10 @@ async function save() {
) { ) {
return toast("请输入姓名"); return toast("请输入姓名");
} }
if (type.value === "cert" && !jobStr.value) { if (
type.value === "cert" &&
(!Array.isArray(formData.value.job) || formData.value.job.length === 0)
) {
return toast("请选择岗位信息"); return toast("请选择岗位信息");
} }
const apiName = doctorInfo.value const apiName = doctorInfo.value
@ -255,11 +258,16 @@ async function save() {
await getDoctorInfo({ withHlwDeptInfo: true }); await getDoctorInfo({ withHlwDeptInfo: true });
form.value = {}; form.value = {};
if (type.value === "cert") { if (type.value === "cert") {
if (["医生", "医生助理"].includes(jobStr.value)) {
toCert(); toCert();
} else { } else {
await toast("保存成功"); await toast("保存成功");
back(); back();
} }
} else {
await toast("保存成功");
back();
}
} else { } else {
await toast(res?.message || "保存失败"); await toast(res?.message || "保存失败");
} }