From 63fea2990e587837ed3dde2b9ac8f2b4ef729672 Mon Sep 17 00:00:00 2001
From: yearning <10538594+wangweifeng1999@user.noreply.gitee.com>
Date: 星期四, 28 五月 2026 10:02:01 +0800
Subject: [PATCH] 考点核验+签到

---
 src/views/components/Signature.vue |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/views/components/Signature.vue b/src/views/components/Signature.vue
index 7d1bf71..a205cf1 100644
--- a/src/views/components/Signature.vue
+++ b/src/views/components/Signature.vue
@@ -2,10 +2,12 @@
   <div class="signature">
     <el-row justify="space-between">
       <el-text>绛惧悕</el-text>
-      <el-text v-if="imageUrl" @click="imageUrl=''">娓呴櫎绛惧悕</el-text>
-      <el-text v-else @click="signatureDialog=true">鐐瑰嚮绛惧悕</el-text>
+      <template v-if="!disabled">
+        <el-text v-if="imageUrl" @click="imageUrl=''">娓呴櫎绛惧悕</el-text>
+        <el-text v-else @click="signatureDialog=true">鐐瑰嚮绛惧悕</el-text>
+      </template>
     </el-row>
-    <el-image v-if="imageUrl" :src="imageUrl"></el-image>
+    <el-image v-if="imageUrl" :src="imageUrl.includes('data:image/png') ? imageUrl : $qxueyou.qxyRes + imageUrl"></el-image>
     <div v-else class="image-slot"></div>
 
     <el-dialog 
@@ -68,6 +70,10 @@
     modelValue: {
       type: String,
       default: ''
+    },
+    disabled: {
+      type: Boolean,
+      default: false
     }
   },
   computed: {
@@ -193,9 +199,11 @@
       }
       let base64 = this.editCanvas.toDataURL('image/png', 1)
       let smallBase64 = await this.resizedataURL(base64, 240, 80)
-      // let url = await uploadByBase64(smallBase64, '绛惧悕')
-      // if (!url) return false
-      this.imageUrl = smallBase64
+      // this.imageUrl = smallBase64
+      let url = await uploadByBase64(smallBase64, '绛惧悕')
+      if (!url) return false
+      this.imageUrl = url
+      this.$emit('update:modelValue', url)
       this.signatureDialog = false
     },
     resizedataURL: function(base64, wantedWidth, wantedHeight){

--
Gitblit v1.8.0