From f5052fa7d4e73c0df5a02a6ad8987f35df42b8f8 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 07 十一月 2024 17:23:50 +0800
Subject: [PATCH] 1. 完成场景报告模块 2. 日报管理模块添加时间范围选择以及word报告生成

---
 src/views/fysp/data-product/components/CompProblemTable.vue |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/views/fysp/data-product/components/CompProblemTable.vue b/src/views/fysp/data-product/components/CompProblemTable.vue
index 3f145ce..0d6d3d8 100644
--- a/src/views/fysp/data-product/components/CompProblemTable.vue
+++ b/src/views/fysp/data-product/components/CompProblemTable.vue
@@ -74,6 +74,7 @@
   </table>
   <CompProblemPicSelect
     v-if="pics.length > 0"
+    title="闂鍥剧墖"
     v-model:dialog-visible="proDialog"
     mode="problem"
     :pics="pics[0].path"
@@ -82,6 +83,7 @@
   ></CompProblemPicSelect>
   <CompProblemPicSelect
     v-if="pics.length > 1"
+    title="鏁存敼鍥剧墖"
     v-model:dialog-visible="changeDialog"
     mode="change"
     :pics="pics[1].path"
@@ -138,13 +140,26 @@
 function handleProPicSelect(imgList) {
   if (imgList && imgList.length > 0) {
     seletcedProblemPic.value = imgList[0].url;
+    onChange();
   }
 }
 
 function handleChangePicSelect(imgList) {
   if (imgList && imgList.length > 0) {
     seletcedChangePic.value = imgList[0].url;
+    onChange();
   }
+}
+
+function onChange() {
+  const value = {
+    proPic: seletcedProblemPic.value,
+    changePic: seletcedChangePic.value ? seletcedChangePic.value : unchangeImg,
+    location: props.problem.location,
+    problemDes,
+    changeDes
+  };
+  emit('change', value);
 }
 
 watch(
@@ -154,10 +169,23 @@
       getPics();
       problemDes.value = nV.problemname;
       changeDes.value = nV.ischanged ? '宸叉暣鏀�' : '鏈暣鏀�';
+      
+      onChange();
     }
   },
   { immediate: true }
 );
+
+watch(problemDes, (nV, oV) => {
+  if (nV != oV) {
+    onChange();
+  }
+});
+watch(changeDes, (nV, oV) => {
+  if (nV != oV) {
+    onChange();
+  }
+});
 </script>
 <style scoped>
 .image {

--
Gitblit v1.9.3