From cd3c5e597ad75051941dab65119b510fb16485e1 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期四, 28 八月 2025 15:10:29 +0800
Subject: [PATCH] 文件修改增加对比

---
 src/views/wel/gongkong.vue |   29 +++++++++++++++++++++++++++--
 1 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/src/views/wel/gongkong.vue b/src/views/wel/gongkong.vue
index 401651f..311ea3e 100644
--- a/src/views/wel/gongkong.vue
+++ b/src/views/wel/gongkong.vue
@@ -59,6 +59,12 @@
      
     </avue-crud>
     </el-dialog>
+
+    <el-drawer title="鏂囦欢瀵规瘮" append-to-body v-model="diffBox" size="100%" class="code-box">
+        <div>
+            <code-diff :old-string="this.content1" :new-string="this.content2" output-format="side-by-side" :hideStat="true" :filename="codeDiffFileName1" :newFilename="codeDiffFileName2"/>
+        </div>
+    </el-drawer>
 </template>
 <script>
 import {
@@ -133,7 +139,11 @@
         currentPage: 1,
         total: 0,
       },
-      
+      diffBox: false,
+      content1: "",
+      content2: "",
+      codeDiffFileName1: "",
+      codeDiffFileName2: "",
     }
   },
   computed: {},
@@ -198,8 +208,23 @@
     refreshChangeHis() {
       this.onLoadHis();
     },
-    hisCompare(){
+    hisCompare(row){
         //鏂囦欢姣斿
+        this.loading = true;
+      axios({
+        url: '/blade-mdm/gkw/node/his-compare',
+        method: 'get',
+        params: {id: row.id},
+      }).then(
+        res => {
+          this.loading = false;
+          this.content1 = res.data.data.content1;
+          this.content2 = res.data.data.content2;
+          this.codeDiffFileName1 = "淇敼鍓�";
+          this.codeDiffFileName2 = "淇敼鍚�";
+          this.diffBox = true;
+        }
+      );
     },
     getFileContent(row) {
       this.loading = true;

--
Gitblit v1.9.3