From f6b61a485501f326debe52d77ea65d87fb34b37f Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期三, 05 三月 2025 17:57:09 +0800
Subject: [PATCH] 完善集成日志查询

---
 Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue |   89 +++++++++++++++++++++++++++-----------------
 1 files changed, 55 insertions(+), 34 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue b/Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue
index d78462b..2f380b6 100644
--- a/Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue
+++ b/Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue
@@ -3,18 +3,19 @@
   <el-dialog
     title="鍏紡缂栬緫妗�"
     append-to-body
+    :close-on-click-modal="false"
     :visible.sync="isShowformulaEdit"
     @close="closeFormulaEdit"
-    width="78%"
-    style="height: 150vh; margin-top: -13vh; overflow: hidden">
-
-    <div style="overflow-y: auto; height: 80vh">
+    width="75%"
+    class="avue-dialog avue-dialog--top" top="-3%"
+    style="height: 100vh;">
+    <div>
       <el-row>
         <!-- 宸︿晶鍏紡鍐呭 -->
         <el-col :span="14" style="overflow: hidden">
           <el-card
             class="box-card"
-            style="height: 33vh; overflow-y: auto; overflow-x: auto">
+            style="height: 29.5vh; overflow-y: auto; overflow-x: auto;margin-right: 10px">
             <div slot="header" class="clearfix">
               <span style="font-size: medium">鍏紡鍐呭</span>
               <el-button
@@ -35,8 +36,8 @@
             <div class="text item">
               <el-input
                 type="textarea"
-                :rows="5"
-                style="width: 560px"
+                :rows="6"
+                style="width: 100%"
                 v-model="formulaContent"
               ></el-input>
             </div>
@@ -46,7 +47,8 @@
         <el-col :span="10">
           <el-card
             class="box-card formula-box-card"
-            style="height: 35vh;">
+            data-v-49729759
+            style="height: 29.5vh;">
             <div slot="header" class="clearfix">
               <span style="font-size: medium">杩愮畻绗�</span>
             </div>
@@ -215,11 +217,10 @@
       </el-row>
       <el-row>
         <!-- 宸︿晶鍏紡閫夋嫨鍖哄煙 -->
-        <el-col :span="14" style="overflow: hidden">
+        <el-col :span="14" style="overflow: hidden;">
           <el-card
             class="box-card"
-            style="height: 40vh; overflow-y: auto; overflow-x: auto"
-          >
+            style="height: 35vh; overflow-y: auto; overflow-x: auto;margin-right: 10px">
             <div slot="header" class="clearfix">
               <span style="font-size: medium">鍏紡閫夋嫨</span>
             </div>
@@ -234,7 +235,7 @@
                   >
                     <el-table-column prop="formula" width="300">
                     </el-table-column>
-                    <el-table-column prop="desc" width="300"> </el-table-column>
+                    <el-table-column prop="desc"> </el-table-column>
                   </el-table>
                 </el-tab-pane>
 
@@ -247,7 +248,7 @@
                   >
                     <el-table-column prop="formula" width="300">
                     </el-table-column>
-                    <el-table-column prop="desc" width="300"> </el-table-column>
+                    <el-table-column prop="desc"> </el-table-column>
                   </el-table>
                 </el-tab-pane>
 
@@ -260,7 +261,7 @@
                   >
                     <el-table-column prop="formula" width="300">
                     </el-table-column>
-                    <el-table-column prop="desc" width="300"> </el-table-column>
+                    <el-table-column prop="desc"> </el-table-column>
                   </el-table>
                 </el-tab-pane>
 
@@ -273,7 +274,7 @@
                   >
                     <el-table-column prop="formula" width="300">
                     </el-table-column>
-                    <el-table-column prop="desc" width="300"> </el-table-column>
+                    <el-table-column prop="desc"> </el-table-column>
                   </el-table>
                 </el-tab-pane>
 
@@ -286,7 +287,7 @@
                   >
                     <el-table-column prop="formula" width="300">
                     </el-table-column>
-                    <el-table-column prop="desc" width="300"> </el-table-column>
+                    <el-table-column prop="desc" > </el-table-column>
                   </el-table>
                 </el-tab-pane>
               </el-tabs>
@@ -297,7 +298,7 @@
         <el-col :span="10" style="overflow: hidden">
           <el-card
             class="box-card"
-            style="height: 40vh; overflow-y: auto; overflow-x: auto"
+            style="height: 35vh; overflow-y: auto; overflow-x: auto"
           >
             <div slot="header" class="clearfix">
               <span style="font-size: medium">鍙橀噺</span>
@@ -311,9 +312,9 @@
                     :show-header="false"
                     style="width: 100%"
                   >
-                    <el-table-column prop="formula" width="40">
+                    <el-table-column prop="formula" width="300">
                     </el-table-column>
-                    <el-table-column prop="desc" width="100"> </el-table-column>
+                    <el-table-column prop="desc"> </el-table-column>
                   </el-table>
                 </el-tab-pane>
                 <el-tab-pane label="绯荤粺鍙橀噺" name="second">
@@ -323,9 +324,9 @@
                     :show-header="false"
                     style="width: 100%"
                   >
-                    <el-table-column prop="formula" width="150">
+                    <el-table-column prop="formula" width="300">
                     </el-table-column>
-                    <el-table-column prop="desc" width="150"> </el-table-column>
+                    <el-table-column prop="desc"> </el-table-column>
                   </el-table>
                 </el-tab-pane>
               </el-tabs>
@@ -337,11 +338,20 @@
 
   </el-dialog>
 </template>
-  
-  <script>
+
+<script>
 export default {
   name: "formulaEditor",
   props: {
+    // 瀵硅瘽妗嗘樉绀洪殣钘忔帶鍒�
+    visible: {
+        type: "Boolean",
+        default: false,
+    },
+    componentRuleText:{
+      type:String,
+      default: ""
+    },
     //鏈満鏅彉閲�
     thisSceneTableData: {
       type: Array,
@@ -353,7 +363,7 @@
   },
   data() {
     return {
-      isShowformulaEdit: false, //鍏紡缂栬緫妗嗗璇濇鏄剧ず鎺у埗
+      isShowformulaEdit: this.visible, //鍏紡缂栬緫妗嗗璇濇鏄剧ず鎺у埗
       formulaContent: '', //鍏紡缂栬緫妗嗗唴瀹�,鏂逛究鍊肩殑鍥炰紶
       activeName: 'first', //褰撳墠娲诲姩鐨則ab
       activeNameAttr: 'first', //鍙橀噺涓殑褰撳墠娲诲姩tab
@@ -638,6 +648,16 @@
       ],
     };
   },
+  watch: {
+      // 鐩戝惉鐖剁粍浠朵紶鐨勭獥鍙f樉绀洪殣钘忕殑鍊硷紝浠ュ強鍊肩殑鍥炲~
+      visible() {
+        this.isShowformulaEdit = this.visible;
+        this.formulaContent=this.componentRuleText || '';
+      },
+  },
+  mounted() {
+
+  },
   methods: {
 
     //鍙屽嚮娣诲姞鍏紡鍐呭
@@ -652,6 +672,7 @@
     //鍏抽棴鏃舵竻绌轰笂娆″叕寮忓唴瀹�
     closeFormulaEdit(){
       this.resetFormulaContent();
+      this.$emit('update:visible',false);
     },
     //缂栬緫瀹屾垚鍏紡鍐呭鍥炴樉骞跺叧闂璇濇
     saveFormulaContent(){
@@ -661,22 +682,23 @@
           return;
       }
       //鍏紡鍐呭鍥炴樉
-      this.$emit('updateFormulaContent', this.formulaContent) // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠�
-      this.isShowformulaEdit = false;  
+      // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠�
+      this.$emit('updateFormulaContent', this.formulaContent)
+      this.isShowformulaEdit = false;
     },
 
   },
 };
 </script>
-  
-<style>
 
-  .formula-box-card > .el-card__body {
+<style scoped>
+
+  .formula-box-card >>> .el-card__body {
     padding: 0px;
     height: 85%;
     width: 100%;
   }
-  
+
   .formula-editor-total {
     /* margin-top: 3px; */
     height: 100%;
@@ -704,11 +726,11 @@
     height: auto;
     justify-content: space-between;
     align-items: center;
-	}    
+	}
 
   .formula-editor-btn-sm {
-    width: 4.5vw;
-    height: 4vh;
+    width: 68px;
+    height: 34px;
     margin-left: 10px;
     text-align: center;
     line-height: 0;
@@ -718,4 +740,3 @@
   }
 
 </style>
-  
\ No newline at end of file

--
Gitblit v1.9.3