From 06e4c8c1bad514992186d94a65c0dc6250e34716 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期四, 28 八月 2025 13:33:32 +0800
Subject: [PATCH] '解决招标文件pdf无法加载问题'

---
 src/components/ReDialog/index.vue |   49 +++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/src/components/ReDialog/index.vue b/src/components/ReDialog/index.vue
index fb3abaf..ec9143d 100644
--- a/src/components/ReDialog/index.vue
+++ b/src/components/ReDialog/index.vue
@@ -17,11 +17,56 @@
 
 const sureBtnMap = ref({});
 const fullscreen = ref(false);
-
+const isPush = (footerButtons, options) => {
+  let arr = [
+    {
+      label: "鍙栨秷",
+      text: true,
+      bg: true,
+      btnClick: ({ dialog: { options, index } }) => {
+        const done = () => closeDialog(options, index, { command: "cancel" });
+        if (options?.beforeCancel && isFunction(options?.beforeCancel)) {
+          options.beforeCancel(done, { options, index });
+        } else {
+          done();
+        }
+      }
+    },
+    {
+      label: "纭畾",
+      type: "primary",
+      text: true,
+      bg: true,
+      popconfirm: options?.popconfirm,
+      btnClick: ({ dialog: { options, index } }) => {
+        if (options?.sureBtnLoading) {
+          sureBtnMap.value[index] = Object.assign({}, sureBtnMap.value[index], {
+            loading: true
+          });
+        }
+        const closeLoading = () => {
+          if (options?.sureBtnLoading) {
+            sureBtnMap.value[index].loading = false;
+          }
+        };
+        const done = () => {
+          closeLoading();
+          closeDialog(options, index, { command: "sure" });
+        };
+        if (options?.beforeSure && isFunction(options?.beforeSure)) {
+          options.beforeSure(done, { options, index, closeLoading });
+        } else {
+          done();
+        }
+      }
+    }
+  ];
+  return [...footerButtons, ...arr];
+};
 const footerButtons = computed(() => {
   return (options: DialogOptions) => {
     return options?.footerButtons?.length > 0
-      ? options.footerButtons
+      ? isPush(options.footerButtons, options)
       : ([
           {
             label: "鍙栨秷",

--
Gitblit v1.9.1