allen 1 lună în urmă
părinte
comite
d038ee62dd

+ 8 - 4
ips-ui/src/components/LogViewer/index.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog
     :title="dialogTitle"
-    :visible.sync="logDialogVisible"
+    :visible.sync="visible"
     width="70%"
     :before-close="handleClose"
   >
@@ -53,6 +53,7 @@ export default {
 
   data() {
     return {
+      visible: false,
       logContent: "",
       autoRefresh: false,
       intervalId: null,
@@ -62,6 +63,7 @@ export default {
 
   watch: {
     logDialogVisible(newVal) {
+      this.visible = newVal;
       if (newVal) {
         this.fetchLog();
         this.startAutoRefresh();
@@ -73,12 +75,14 @@ export default {
 
   methods: {
     handleClose(done) {
-      this.$emit("update:logDialogVisible", false);
-      done();
+      console.log("handleClose");
+      this.$emit("updateLogDiaLlogVisible", false);
+      this.visible = false;
+      // done();
     },
 
     close() {
-      this.$emit("update:logDialogVisible", false);
+      this.$emit("updateLogDiaLlogVisible", false);
     },
 
     toggleAutoRefresh() {

+ 5 - 0
ips-ui/src/views/biz/preprocessed/index.vue

@@ -455,6 +455,7 @@
       :currentLogUrl="currentLogUrl"
       :dialogTitle="dialogTitle"
       :logDialogVisible="logDialogVisible"
+      @updateLogDiaLlogVisible="updateLogDiaLlogVisible"
     />
   </div>
 </template>
@@ -695,6 +696,10 @@ export default {
       // 这里可以添加处理配置更新的逻辑
       console.log("更新后的配置:", JSON.parse(modifiedJson));
     },
+    updateLogDiaLlogVisible(visiible) {
+      console.log("updateLogDiaLlogVisible", visiible);
+      this.logDialogVisible = visiible;
+    },
   },
 };
 </script>