From cb4e11b19446843188cf628ac8f6be5fe1fa68c7 Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期二, 06 六月 2023 18:01:52 +0800
Subject: [PATCH] 配置

---
 Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 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..dc5648d 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>
@@ -342,6 +343,11 @@
 export default {
   name: "formulaEditor",
   props: {
+     // 瀵硅瘽妗嗘樉绀洪殣钘忔帶鍒�
+    visible: {
+        type: "Boolean",
+        default: false,
+    },
     //鏈満鏅彉閲�
     thisSceneTableData: {
       type: Array,
@@ -353,7 +359,7 @@
   },
   data() {
     return {
-      isShowformulaEdit: false, //鍏紡缂栬緫妗嗗璇濇鏄剧ず鎺у埗
+      isShowformulaEdit: this.visible, //鍏紡缂栬緫妗嗗璇濇鏄剧ず鎺у埗
       formulaContent: '', //鍏紡缂栬緫妗嗗唴瀹�,鏂逛究鍊肩殑鍥炰紶
       activeName: 'first', //褰撳墠娲诲姩鐨則ab
       activeNameAttr: 'first', //鍙橀噺涓殑褰撳墠娲诲姩tab
@@ -638,6 +644,12 @@
       ],
     };
   },
+  watch: {
+      // 鐩戝惉鐖剁粍浠朵紶鐨勭獥鍙f樉绀洪殣钘忕殑鍊�
+      visible (){
+          this.isShowformulaEdit = this.visible;
+      }
+  },
   methods: {
 
     //鍙屽嚮娣诲姞鍏紡鍐呭
@@ -652,6 +664,7 @@
     //鍏抽棴鏃舵竻绌轰笂娆″叕寮忓唴瀹�
     closeFormulaEdit(){
       this.resetFormulaContent();
+      this.$emit('update:visible',false);
     },
     //缂栬緫瀹屾垚鍏紡鍐呭鍥炴樉骞跺叧闂璇濇
     saveFormulaContent(){
@@ -661,7 +674,8 @@
           return;
       }
       //鍏紡鍐呭鍥炴樉
-      this.$emit('updateFormulaContent', this.formulaContent) // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠�
+      // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠�
+      this.$emit('updateFormulaContent', this.formulaContent) 
       this.isShowformulaEdit = false;  
     },
 
@@ -669,9 +683,9 @@
 };
 </script>
   
-<style>
+<style scoped>
 
-  .formula-box-card > .el-card__body {
+  .formula-box-card >>> .el-card__body {
     padding: 0px;
     height: 85%;
     width: 100%;

--
Gitblit v1.9.3