未知(继上次中断)
This commit is contained in:
@@ -300,14 +300,26 @@ const handleLock = async () => {
|
||||
type: "warning",
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
const { value } = await ElMessageBox.prompt(TEXT.modules.adminProjects.lockConfirmPrompt, TEXT.modules.adminProjects.lockConfirmTitle, {
|
||||
confirmButtonText: TEXT.common.actions.confirm,
|
||||
cancelButtonText: TEXT.common.actions.cancel,
|
||||
inputPlaceholder: TEXT.modules.adminProjects.lockConfirmPlaceholder,
|
||||
inputValidator: (input: string) => input === "确认锁定" || TEXT.modules.adminProjects.lockConfirmMismatch,
|
||||
type: "warning",
|
||||
});
|
||||
if (value !== "确认锁定") {
|
||||
ElMessage.warning(TEXT.modules.adminProjects.lockConfirmMismatchWarning);
|
||||
return;
|
||||
}
|
||||
const { data } = await lockStudy(project.value.id);
|
||||
project.value = data as Study;
|
||||
syncForm(project.value);
|
||||
ElMessage.success("项目已锁定");
|
||||
} catch (err) {
|
||||
if (err !== "cancel") {
|
||||
ElMessage.error("锁定项目失败");
|
||||
if (err !== "cancel" && err !== "close") {
|
||||
const detail = (err as any)?.response?.data?.detail || "锁定项目失败";
|
||||
ElMessage.error(detail);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user