From 42feb0af0ae1d486d0474c76711fdb67c778bcf3 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期六, 28 六月 2025 10:04:30 +0800
Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory

---
 culture/src/components/confirm-storage-dialog/index.vue |   57 ++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 32 insertions(+), 25 deletions(-)

diff --git a/culture/src/components/confirm-storage-dialog/index.vue b/culture/src/components/confirm-storage-dialog/index.vue
index f174fea..3d2a0e4 100644
--- a/culture/src/components/confirm-storage-dialog/index.vue
+++ b/culture/src/components/confirm-storage-dialog/index.vue
@@ -1,13 +1,6 @@
 <template>
-  <el-dialog
-    :visible.sync="visible"
-    title="签字确认"
-    width="520px"
-    @open="handleOpen"
-    :close-on-click-modal="false"
-    custom-class="record-detail-dialog"
-    @close="handleClose"
-  >
+  <el-dialog :visible.sync="visible" title="签字确认" width="520px" @open="handleOpen" :close-on-click-modal="false"
+    custom-class="record-detail-dialog" @close="handleClose">
     <div class="dialog-content">
       <div class="confirm-tip">
         {{ text }}
@@ -17,16 +10,11 @@
         <el-form-item required>
           <template #label>
             <span>{{ name }}</span>
-            <el-button
-              type="primary"
-              class="sign-btn"
-              @click="showSignature = true"
-              >签名</el-button
-            >
+            <el-button type="primary" class="sign-btn" @click="showSignature = true">签名</el-button>
           </template>
           <div class="signature-area" :class="{ waiting: !form.signature }">
             <template v-if="form.signature">
-              <img :src="form.signature" :alt="name" />
+              <el-image :src="getFullUrl(form.signature)"  :preview-src-list="[getFullUrl(form.signature)]"  :alt="name" />
             </template>
             <template v-else>
               <span class="waiting-text">等待确认</span>
@@ -36,20 +24,17 @@
       </el-form>
     </div>
     <div class="footer-btns">
-      <el-button @click="handleClose" style="margin-right: 16px"
-        >取消</el-button
-      >
+      <el-button @click="handleClose" style="margin-right: 16px">取消</el-button>
       <el-button type="primary" @click="handleConfirm" :disabled="!form.signature">确认</el-button>
     </div>
-    <signature-canvas
-      :visible.sync="showSignature"
-      @confirm="handleSignatureConfirm"
-    />
+    <signature-canvas :visible.sync="showSignature" @confirm="handleSignatureConfirm" />
   </el-dialog>
 </template>
 
 <script>
 import SignatureCanvas from "@/components/SignatureCanvas.vue";
+import { getFullUrl } from '@/utils/utils'
+import { queryDetail } from '../service'
 export default {
   name: "ConfirmStorageDialog",
   components: { SignatureCanvas },
@@ -68,7 +53,7 @@
     },
     handleSignature: {
       type: String,
-      default:"", 
+      default: "",
     }
   },
   data() {
@@ -83,8 +68,22 @@
     };
   },
   methods: {
+
+    getFullUrl(url) {
+      if (url) {
+        return getFullUrl(url);
+      }
+    },
+
     handleOpen() {
-       this.form.signature = this.handleSignature;
+      if (!this.handleSignature) {
+        queryDetail().then(res => {
+          console.log('///////////////////////');
+          this.form.signature = res.signPicture
+        })
+      } else {
+        this.form.signature = this.handleSignature;
+      }
     },
     handleClose() {
       this.$emit("update:visible", false);
@@ -109,10 +108,12 @@
   color: #f5222d;
   font-size: 16px;
   margin-bottom: 24px;
+
   .danger {
     margin-left: 12px;
   }
 }
+
 .signature-area {
   height: 120px;
   width: 100%;
@@ -125,20 +126,24 @@
   overflow: hidden;
   padding: 0;
 }
+
 .signature-area.waiting {
   border-style: dashed;
   background: #fafafa;
 }
+
 .signature-area img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
 }
+
 .waiting-text {
   color: #909399;
   font-size: 14px;
 }
+
 .sign-btn {
   height: 32px;
   border-radius: 4px;
@@ -147,11 +152,13 @@
   font-weight: 400;
   margin-left: 12px;
 }
+
 .footer-btns {
   display: flex;
   justify-content: center;
   padding: 24px;
   padding-top: 0;
+
   .el-button {
     width: 150px;
   }

--
Gitblit v1.7.1