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', //当前活动的tab
      activeNameAttr: 'first', //变量中的当前活动tab
@@ -638,6 +644,12 @@
      ],
    };
  },
  watch: {
      // 监听父组件传的窗口显示隐藏的值
      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%;