ludc
2024-12-13 457425bbe73ea270fe7ebd8b76b443efa8eab949
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,16 +130,16 @@
    },
    // 处理图表数据更改的事件
    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) {
            this.$refs.flowChart.propsAPI.remove(e.item); // 移除原有的节点
@@ -148,7 +149,6 @@
          }
        }
      } catch (err) {
        console.log(err)
        // 处理节点 ID 冲突错误
        if (
          err.message ===
@@ -173,7 +173,6 @@
        this.currentSelectedLine = currentEdge;
      }
    },
    // 下载图片
    _downloadImage(data, filename = "flowchart.png") {
      const a = document.createElement("a");
@@ -265,6 +264,14 @@
          margin: 0;
        }
      }
      .mask{
        opacity: 0.3;
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top:0;
      }
    }
    .vfe-chart-sidebar {