|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="FlowChartComponent">
|
|
<div class="FlowChartComponent">
|
|
- <Alert show-icon closable v-if="currentSteps === 1">双击空白区域即可直接新增一个中间节点,双击节点可编辑</Alert>
|
|
|
|
|
|
+ <!-- <Alert show-icon closable v-if="currentSteps === 1">双击空白区域即可直接新增一个中间节点,双击节点可编辑</Alert> -->
|
|
<div class="chartContent">
|
|
<div class="chartContent">
|
|
<div id="paletteDiv" v-show="currentSteps === 1"></div>
|
|
<div id="paletteDiv" v-show="currentSteps === 1"></div>
|
|
<div id="goChart" v-show="currentSteps === 1">
|
|
<div id="goChart" v-show="currentSteps === 1">
|
|
@@ -38,15 +38,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import '@/utils/go'
|
|
|
|
-import FlowDesinger from '@/utils/flow-desinger';
|
|
|
|
-import startNodeInfo from '@/components/startNodeInfo'
|
|
|
|
-import endNodeInfo from '@/components/endNodeInfo'
|
|
|
|
-import linkInfo from '@/components/linkInfo'
|
|
|
|
-import ProcessNodeConfig from '@/components/ProcessNodeConfig'
|
|
|
|
-import DynamicProcessNodeConfig from '@/components/DynamicProcessNodeConfig'
|
|
|
|
-import ServiceNodeConfig from '@/components/ServiceNodeConfig'
|
|
|
|
-import FlowDisplay from '@/utils/flow-display';
|
|
|
|
|
|
+import '@/utils/go'
import FlowDesinger from '@/utils/flow-desinger';
import startNodeInfo from '@/components/startNodeInfo'
import endNodeInfo from '@/components/endNodeInfo'
import linkInfo from '@/components/linkInfo'
import ProcessNodeConfig from '@/components/ProcessNodeConfig'
import DynamicProcessNodeConfig from '@/components/DynamicProcessNodeConfig'
import ServiceNodeConfig from '@/components/ServiceNodeConfig'
import FlowDisplay from '@/utils/flow-display';
|
|
export default {
|
|
export default {
|
|
components:{
|
|
components:{
|
|
startNodeInfo, endNodeInfo, linkInfo, ProcessNodeConfig, DynamicProcessNodeConfig, ServiceNodeConfig
|
|
startNodeInfo, endNodeInfo, linkInfo, ProcessNodeConfig, DynamicProcessNodeConfig, ServiceNodeConfig
|
|
@@ -104,7 +96,6 @@ export default {
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
init () {
|
|
init () {
|
|
- console.log(333333)
|
|
|
|
if(!Array.isArray(this.data.nodeMsg)){
|
|
if(!Array.isArray(this.data.nodeMsg)){
|
|
let nodeMsg = []
|
|
let nodeMsg = []
|
|
Object.keys(this.data.nodeMsg).map(item => {
|
|
Object.keys(this.data.nodeMsg).map(item => {
|
|
@@ -124,7 +115,6 @@ export default {
|
|
|
|
|
|
this.dataProcessing()
|
|
this.dataProcessing()
|
|
if(this.currentSteps === 1){
|
|
if(this.currentSteps === 1){
|
|
- console.log(1111)
|
|
|
|
// 流程图设计器
|
|
// 流程图设计器
|
|
if(!this.myDesigner){
|
|
if(!this.myDesigner){
|
|
this.myDesigner= new FlowDesinger('goChart',{
|
|
this.myDesigner= new FlowDesinger('goChart',{
|
|
@@ -136,11 +126,11 @@ export default {
|
|
});
|
|
});
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
this.initToolbar = this.myDesigner.initToolbar('paletteDiv',this.data.moduleType)
|
|
this.initToolbar = this.myDesigner.initToolbar('paletteDiv',this.data.moduleType)
|
|
this.myDesigner.displayFlow(JSON.parse(JSON.stringify(this.data.guiStyle)));// 在设计面板中显示流程图
|
|
this.myDesigner.displayFlow(JSON.parse(JSON.stringify(this.data.guiStyle)));// 在设计面板中显示流程图
|
|
this.data.myDisplay = this.myDesigner.diagram
|
|
this.data.myDisplay = this.myDesigner.diagram
|
|
}else{
|
|
}else{
|
|
- console.log(2222)
|
|
|
|
if(this.myDisplay){
|
|
if(this.myDisplay){
|
|
this.myDisplay.loadFlow(JSON.parse(JSON.stringify(this.data.guiStyle)))
|
|
this.myDisplay.loadFlow(JSON.parse(JSON.stringify(this.data.guiStyle)))
|
|
}else{
|
|
}else{
|
|
@@ -165,7 +155,6 @@ export default {
|
|
},
|
|
},
|
|
dataProcessing () { //处理后端返回节点数据和路径数据
|
|
dataProcessing () { //处理后端返回节点数据和路径数据
|
|
if(this.data.nodeMsg){
|
|
if(this.data.nodeMsg){
|
|
-
|
|
|
|
this.data.nodeMsg.forEach(item => {
|
|
this.data.nodeMsg.forEach(item => {
|
|
this.nodeMsg[item.key] = item
|
|
this.nodeMsg[item.key] = item
|
|
if(item.type === 2){ //结束节点对数据排序,区分执行程序还是抄送人
|
|
if(item.type === 2){ //结束节点对数据排序,区分执行程序还是抄送人
|
|
@@ -521,7 +510,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
-<style lang="scss" >
|
|
|
|
|
|
+<style lang="less" >
|
|
.FlowChartComponent{
|
|
.FlowChartComponent{
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|