From 30748ea70f14c675743c7ea54e5c162d4a5e2839 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 21 四月 2025 17:31:15 +0800
Subject: [PATCH] 修改多个组件的展示样式

---
 src/views/overlay-clue/report/components/QuestionDetail.vue |   32 ++++++++++++++++++--------------
 1 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/src/views/overlay-clue/report/components/QuestionDetail.vue b/src/views/overlay-clue/report/components/QuestionDetail.vue
index 2ab04e7..f0f6603 100644
--- a/src/views/overlay-clue/report/components/QuestionDetail.vue
+++ b/src/views/overlay-clue/report/components/QuestionDetail.vue
@@ -112,8 +112,18 @@
 
 const props = defineProps({
   clueId: Number,
+  clueData: {
+    type: Object,
+    default: () => {
+      return {};
+    }
+  },
   show: Boolean,
-  question: Object
+  question: Object,
+  create: {
+    type: Boolean,
+    default: true
+  }
 });
 
 const emit = defineEmits(['update:show', 'onSubmit', 'onClose']);
@@ -222,7 +232,7 @@
 function submit() {
   const coor = formObj.value.coordinate.split(',');
   const q = {
-    cId: parseInt(props.clueId),
+    cid: parseInt(props.clueData.cid),
     cqName: formObj.value.cqName,
     cqDescription: formObj.value.cqDescription,
     cqStreet: formObj.value.cqStreet,
@@ -236,7 +246,7 @@
       files.push(f.raw);
     });
   }
-  return uploadQuestion(q, files);
+  return props.create ? uploadQuestion(q, files) : updateQuestion(q, );
 }
 
 function cancel() {
@@ -272,6 +282,10 @@
     });
 }
 
+function updateQuestion(question, newFiles, deleteFiles) {
+  
+}
+
 function parseFormObj(question) {
   question.coordinate =
     question.cqLongitude + ',' + question.cqLatitude;
@@ -299,17 +313,7 @@
     }
   }
 );
-// watch(
-//   () => props.question,
-//   (val) => {
-//     fileList.value = [];
-//     if (val) {
-//       formObj.value = parseFormObj(val);
-//     } else {
-//       formObj.value = {};
-//     }
-//   }
-// );
+
 watch(dialogShow, (val) => {
   emit('update:show', val);
 });

--
Gitblit v1.9.3