ludc
2024-10-18 0e818b766656ea54f516c1bb3b5987c985de80a9
Source/plt-web/plt-web-ui/src/components/flow-cycle/flowchartEditor.vue
@@ -23,9 +23,10 @@
              <p>{{ item.name }}: {{ item.value }}</p>
            </template>
          </div>
          <div v-if="!disabledBtn" class="mask"></div>
        </div>
        <div v-if="type !== 'detail'" class="vfe-chart-panel">
        <div  class="vfe-chart-panel">
          <div class="vfe-chart-panel-detail">
            <editor-detail-panel
              ref="EditorDetailPanel"
@@ -129,15 +130,14 @@
    },
    // 处理图表数据更改的事件
    onAfterChange(e) {
      console.log(e)
      try {
        if('edit' === this.$store.state.flow.type){
          this.$refs.flowChart.propsAPI.remove(e.item);
          if(e.action === 'remove'){
            this.$message.error('编辑状态下不能切换选中项!');
          }
          return;
        }
        // if('edit' === this.$store.state.flow.type){
        //   this.$refs.flowChart.propsAPI.remove(e.item);
        //   if(e.action === 'remove'){
        //     this.$message.error('编辑状态下不能切换选中项!');
        //   }
        //   return;
        // }
        // 如果添加了节点且节点没有被更改过
        if (e.action === "add" && e.model.type === "node") {
          if (!e.model.change) {
@@ -148,7 +148,6 @@
          }
        }
      } catch (err) {
        console.log(err)
        // 处理节点 ID 冲突错误
        if (
          err.message ===
@@ -173,7 +172,6 @@
        this.currentSelectedLine = currentEdge;
      }
    },
    // 下载图片
    _downloadImage(data, filename = "flowchart.png") {
      const a = document.createElement("a");
@@ -265,6 +263,14 @@
          margin: 0;
        }
      }
      .mask{
        opacity: 0.3;
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top:0;
      }
    }
    .vfe-chart-sidebar {