From 45c6f80215d0a86bd4e7c4147db5b84d844aad1a Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期一, 15 十二月 2025 12:39:24 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/index.html                                      |   26 +++++++++++++++++++++++++-
 src/main/java/com/zy/ai/timer/MakeMainProcessPseudocodeScheduler.java |    2 +-
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/zy/core/task/MakeMainProcessPseudocodeScheduler.java b/src/main/java/com/zy/ai/timer/MakeMainProcessPseudocodeScheduler.java
similarity index 99%
rename from src/main/java/com/zy/core/task/MakeMainProcessPseudocodeScheduler.java
rename to src/main/java/com/zy/ai/timer/MakeMainProcessPseudocodeScheduler.java
index 6643279..3d36e33 100644
--- a/src/main/java/com/zy/core/task/MakeMainProcessPseudocodeScheduler.java
+++ b/src/main/java/com/zy/ai/timer/MakeMainProcessPseudocodeScheduler.java
@@ -1,4 +1,4 @@
-package com.zy.core.task;
+package com.zy.ai.timer;
 
 import com.zy.ai.entity.ChatCompletionRequest;
 import com.zy.ai.service.LlmChatService;
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 86a8ab5..90597c8 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -335,6 +335,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 +347,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 +377,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 +392,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