From 7602a824e39e19260ae32bb45e799e6ce43300ac Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 14 七月 2023 21:15:29 +0800
Subject: [PATCH] 参照配置组件修改

---
 Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue |   48 ++++++++++++++++++++++++++++++++++--------------
 1 files changed, 34 insertions(+), 14 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..ff11590 100644
--- a/Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue
+++ b/Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue
@@ -46,6 +46,7 @@
         <el-col :span="10">
           <el-card
             class="box-card formula-box-card"
+            data-v-49729759
             style="height: 35vh;">
             <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="120">
                     </el-table-column>
-                    <el-table-column prop="desc" width="100"> </el-table-column>
+                    <el-table-column prop="desc" width="200"> </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="200">
                     </el-table-column>
-                    <el-table-column prop="desc" width="150"> </el-table-column>
+                    <el-table-column prop="desc" width="200"> </el-table-column>
                   </el-table>
                 </el-tab-pane>
               </el-tabs>
@@ -337,11 +338,20 @@
 
   </el-dialog>
 </template>
-  
+
   <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,15 @@
       ],
     };
   },
+  watch: {
+      // 鐩戝惉鐖剁粍浠朵紶鐨勭獥鍙f樉绀洪殣钘忕殑鍊�
+      visible (){
+          this.isShowformulaEdit = this.visible;
+      }
+  },
+  mounted() {
+    this.formulaContent=this.componentRuleText
+  },
   methods: {
 
     //鍙屽嚮娣诲姞鍏紡鍐呭
@@ -652,6 +671,7 @@
     //鍏抽棴鏃舵竻绌轰笂娆″叕寮忓唴瀹�
     closeFormulaEdit(){
       this.resetFormulaContent();
+      this.$emit('update:visible',false);
     },
     //缂栬緫瀹屾垚鍏紡鍐呭鍥炴樉骞跺叧闂璇濇
     saveFormulaContent(){
@@ -661,22 +681,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,7 +725,7 @@
     height: auto;
     justify-content: space-between;
     align-items: center;
-	}    
+	}
 
   .formula-editor-btn-sm {
     width: 4.5vw;
@@ -718,4 +739,3 @@
   }
 
 </style>
-  
\ No newline at end of file

--
Gitblit v1.9.3