签章loading状态

This commit is contained in:
2026-06-30 15:03:16 +08:00
parent 731a46e9e5
commit 6dc1c80320
@@ -15,6 +15,9 @@
wrap-class-name="seal-full-modal" wrap-class-name="seal-full-modal"
> >
<div class="sign-platform" @click="hideCtxMenu"> <div class="sign-platform" @click="hideCtxMenu">
<div v-if="modalLoading" class="platform-loading-mask">
<a-spin size="large" />
</div>
<div v-if="!contractId" class="platform-layout platform-layout-empty"> <div v-if="!contractId" class="platform-layout platform-layout-empty">
<div class="preview-area empty-preview"> <div class="preview-area empty-preview">
<div class="preview-placeholder"> <div class="preview-placeholder">
@@ -688,6 +691,7 @@ function getResponseMessage(res, fallback = "操作失败") {
} }
const visible = ref(false); const visible = ref(false);
const modalLoading = ref(false);
const businessRecord = ref(null); const businessRecord = ref(null);
const emit = defineEmits(["business-updated"]); const emit = defineEmits(["business-updated"]);
const completeSignDate = ref(""); const completeSignDate = ref("");
@@ -1018,6 +1022,7 @@ function resetModalState(record = null) {
} }
async function showModal(contractIdParam, businessRecordParam) { async function showModal(contractIdParam, businessRecordParam) {
modalLoading.value = true;
let contractIdToLoad = ""; let contractIdToLoad = "";
let contextRecord = null; let contextRecord = null;
@@ -1040,6 +1045,7 @@ async function showModal(contractIdParam, businessRecordParam) {
await loadContract(contractIdToLoad); await loadContract(contractIdToLoad);
await nextTick(); await nextTick();
calcDisplaySize(); calcDisplaySize();
modalLoading.value = false;
return; return;
} }
@@ -1060,6 +1066,7 @@ async function showModal(contractIdParam, businessRecordParam) {
} }
} catch {} } catch {}
} }
modalLoading.value = false;
} }
defineExpose({ showModal }); defineExpose({ showModal });
@@ -1866,6 +1873,17 @@ watch(visible, (value) => {
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative;
}
.platform-loading-mask {
position: absolute;
inset: 0;
z-index: 999;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.7);
} }
.platform-layout { .platform-layout {