| | |
| | | <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" |
| | |
| | | }, |
| | | // 处理图表数据更改的事件 |
| | | 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); // 移除原有的节点 |
| | |
| | | } |
| | | } |
| | | } catch (err) { |
| | | console.log(err) |
| | | // 处理节点 ID 冲突错误 |
| | | if ( |
| | | err.message === |
| | |
| | | this.currentSelectedLine = currentEdge; |
| | | } |
| | | }, |
| | | |
| | | // 下载图片 |
| | | _downloadImage(data, filename = "flowchart.png") { |
| | | const a = document.createElement("a"); |
| | |
| | | margin: 0; |
| | | } |
| | | } |
| | | .mask{ |
| | | opacity: 0.3; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | left: 0; |
| | | top:0; |
| | | } |
| | | } |
| | | |
| | | .vfe-chart-sidebar { |