Commit 4f4557f7 authored by 徐一鸣's avatar 徐一鸣

流程概览

parent 4aadfa9f
<template> <template>
<div class="workflows-view"> <div class="workflows-view" ref="flowContainer">
<super-flow <super-flow
ref="superFlow" ref="superFlow"
:node-list="nodeList" :node-list="nodeList"
...@@ -35,11 +35,7 @@ ...@@ -35,11 +35,7 @@
<p>节点插件:</p> <p>节点插件:</p>
<div class="plug-in-list"> <div class="plug-in-list">
<span v-for="(plugin, index) in meta.plugins" :key="index"> <span v-for="(plugin, index) in meta.plugins" :key="index">
{{ {{ getTypeText(plugin.plugin_type) }}
["-", "接口插件", "流程插件", "超时插件"][
plugin.plugin_type || 0
]
}}
</span> </span>
</div> </div>
</div> </div>
...@@ -67,7 +63,7 @@ export default { ...@@ -67,7 +63,7 @@ export default {
}, },
data() { data() {
return { return {
origin: [0, 0], origin: [],
nodeList: [], nodeList: [],
linkList: [], linkList: [],
}; };
...@@ -113,8 +109,18 @@ export default { ...@@ -113,8 +109,18 @@ export default {
console.log(error); console.log(error);
}); });
}, },
setOrigin() {
this.$nextTick(() => {
this.origin = [this.$refs.flowContainer.clientWidth / 2, 0];
console.log(this.origin);
});
},
getTypeText(type) {
return ["-", "接口插件", "流程插件", "超时插件"][type || 0];
},
}, },
created() { created() {
this.setOrigin();
this.init(); this.init();
}, },
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment