From a502dc5a81d42a70e2ba2ad9e4cce97fea2b7669 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期三, 14 一月 2026 15:42:02 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/index.html |   39 ++++++++++++++++++++++++++++++++++++---
 1 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 86a8ab5..6c52b6f 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -208,7 +208,8 @@
     }
 
     let fakeRunning = false
-    setInterval(function () {
+    let fakeStatusInterval = null
+    function checkFakeStatus() {
       $.ajax({
         url: baseUrl + "/openapi/getFakeSystemRunStatus",
         headers: {'token': localStorage.getItem('token')},
@@ -224,15 +225,23 @@
                 $("#fakeShowText").text("浠跨湡妯℃嫙鏈繍琛�")
               }
               fakeRunning = running
+              if (!fakeStatusInterval) {
+                fakeStatusInterval = setInterval(checkFakeStatus, 1000);
+              }
             }else {
               $("#fakeShow").hide()
+              if (fakeStatusInterval) {
+                clearInterval(fakeStatusInterval);
+                fakeStatusInterval = null;
+              }
             }
           }else {
             top.location.href = baseUrl + "/login";
           }
         }
       });
-    }, 1000);
+    }
+    checkFakeStatus();
 
     $("#fakeShow").on("click", function () {
       if (fakeRunning) {
@@ -335,6 +344,9 @@
     var url = logout.getAttribute('href');
     logout.setAttribute('href', baseUrl + "/login");
 
+    // AI鍔╂墜寮圭獥绱㈠紩
+    var aiLayerIndex = null;
+
     // AI鍔╂墜鍥炬爣鎮诞鎻愮ず
     $('#ai-assistant-btn').on('mouseenter', function(){
         this.index = layer.tips('AI鍔╂墜', this, {
@@ -344,6 +356,23 @@
     }).on('mouseleave', function(){
         layer.close(this.index);
     }).on('click', function () {
+        // 濡傛灉宸茬粡鎵撳紑杩囦笖鏈攢姣侊紝鐩存帴鏄剧ず
+        if (aiLayerIndex !== null && $('#layui-layer' + aiLayerIndex).length > 0) {
+            var $layero = $('#layui-layer' + aiLayerIndex);
+            var $shade = $('#layui-layer-shade' + aiLayerIndex);
+
+            // 鏄剧ず骞堕噸缃姸鎬�
+            $shade.show().css('opacity', 0.1);
+            $layero.show();
+            
+            // 閲嶆柊瑙﹀彂杩涘叆鍔ㄧ敾
+            $layero.removeClass('ai-drawer-layer-close');
+            $layero.removeClass('ai-drawer-layer');
+            void $layero.get(0).offsetWidth; // 瑙﹀彂閲嶇粯
+            $layero.addClass('ai-drawer-layer');
+            return;
+        }
+
         layer.open({
             type: 2,
             title: false, // 闅愯棌榛樿鏍囬鏍忥紝鏇寸畝娲�
@@ -357,6 +386,8 @@
             skin: 'ai-drawer-layer', // 鑷畾涔夌毊鑲�
             content: 'ai/diagnosis.html',
             success: function(layero, index){
+                aiLayerIndex = index; // 璁板綍绱㈠紩
+                
                 // 鑳屾櫙妯$硦鏁堟灉
                 var shadeId = layero.attr('id').replace('layui-layer', 'layui-layer-shade');
                 var $shade = $('#' + shadeId);
@@ -370,7 +401,9 @@
                     layero.addClass('ai-drawer-layer-close');
                     $shade.css('opacity', 0);
                     setTimeout(function(){
-                        layer.close(index);
+                        // layer.close(index); // 涓嶉攢姣侊紝鏀逛负闅愯棌
+                        layero.hide();
+                        $shade.hide();
                     }, 400);
                 });
             }

--
Gitblit v1.9.1