Source/UBCS-WEB/src/components/code-dialog-page/formulaEditor.vue
@@ -343,6 +343,11 @@
export default {
  name: "formulaEditor",
  props: {
     // 对话框显示隐藏控制
    visible: {
        type: "Boolean",
        default: false,
    },
    //本场景变量
    thisSceneTableData: {
      type: Array,
@@ -354,7 +359,7 @@
  },
  data() {
    return {
      isShowformulaEdit: false, //公式编辑框对话框显示控制
      isShowformulaEdit: this.visible, //公式编辑框对话框显示控制
      formulaContent: '', //公式编辑框内容,方便值的回传
      activeName: 'first', //当前活动的tab
      activeNameAttr: 'first', //变量中的当前活动tab
@@ -639,6 +644,12 @@
      ],
    };
  },
  watch: {
      // 监听父组件传的窗口显示隐藏的值
      visible (){
          this.isShowformulaEdit = this.visible;
      }
  },
  methods: {
    //双击添加公式内容
@@ -653,6 +664,7 @@
    //关闭时清空上次公式内容
    closeFormulaEdit(){
      this.resetFormulaContent();
      this.$emit('update:visible',false);
    },
    //编辑完成公式内容回显并关闭对话框
    saveFormulaContent(){
@@ -662,7 +674,8 @@
          return;
      }
      //公式内容回显
      this.$emit('updateFormulaContent', this.formulaContent) // 触发update:data将子组件值传递给父组件
      // 触发update:data将子组件值传递给父组件
      this.$emit('updateFormulaContent', this.formulaContent)
      this.isShowformulaEdit = false;  
    },