File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 </el-button >
1010 <el-button
1111 @click =" changeCursor(false)"
12- style =" border : none ; padding : 4px ; height : 24px ;margin-left : 8px ; "
12+ style =" border : none ; padding : 4px ; height : 24px ; margin-left : 8px "
1313 :class =" { 'is-drag-active': !isDrag }"
1414 >
1515 <AppIcon iconName =" app-raisehand" :size =" 16" ></AppIcon >
@@ -113,6 +113,12 @@ function fitView() {
113113}
114114const layout = () => {
115115 props .lf ?.extension .dagre .layout ()
116+ console .log (props .lf )
117+ props .lf ?.graphModel .nodes .forEach ((node : any ) => {
118+ if (node .type === ' loop-body-node' ) {
119+ node ?.loopLayout ?.()
120+ }
121+ })
116122}
117123const retract = () => {
118124 props .lf ?.graphModel .nodes .forEach ((element : any ) => {
Original file line number Diff line number Diff line change @@ -108,8 +108,6 @@ const renderGraphData = (data?: any) => {
108108 // 清除当前节点下面的子节点的所有缓存
109109 data .nodeModel .clear_next_node_field (false )
110110 })
111- // lf.value.openSelectionSelect()
112- // lf.value.extension.selectionSelect.setSelectionSense(true, false)
113111 setTimeout (() => {
114112 lf .value ?.fitView ()
115113 }, 500 )
Original file line number Diff line number Diff line change 1616 />
1717 <h4 class =" ellipsis-1 break-all" >{{ nodeModel.properties.stepName }}</h4 >
1818 </div >
19+
1920 <!-- 放大缩小按钮 -->
2021 <el-button link @click =" enlargeHandle" >
2122 <AppIcon
@@ -121,6 +122,10 @@ import { WorkflowMode } from '@/enums/application'
121122
122123provide (' workflowMode' , WorkflowMode .ApplicationLoop )
123124
125+ const props = defineProps <{
126+ nodeModel: any
127+ }>()
128+
124129const titleFormRef = ref ()
125130const nodeNameDialogVisible = ref <boolean >(false )
126131const form = ref <any >({
@@ -176,9 +181,6 @@ const showicon = ref<number | null>(null)
176181
177182const height = ref <number >(600 )
178183
179- const props = defineProps <{
180- nodeModel: any
181- }>()
182184const nodeFields = computed (() => {
183185 if (props .nodeModel .properties .config .fields ) {
184186 const fields = props .nodeModel .properties .config .fields ?.map ((field : any ) => {
Original file line number Diff line number Diff line change @@ -156,14 +156,27 @@ const renderGraphData = (data?: any) => {
156156 }, 500 )
157157 }
158158}
159+
160+ const loopLayout = () => {
161+ lf .value ?.extension ?.dagre .layout ()
162+ }
159163onMounted (() => {
160164 renderGraphData (cloneDeep (props .nodeModel .properties .workflow ))
161165 set (props .nodeModel , ' validate' , validate )
162166 set (props .nodeModel , ' set_loop_body' , set_loop_body )
167+ set (props .nodeModel , ' loopLayout' , loopLayout )
163168})
164169onUnmounted (() => {
165170 disconnectByFlow (lf .value .graphModel .flowId )
166171 lf .value = null
167172})
168173 </script >
169- <style lang="scss" scoped></style >
174+ <style lang="scss" scoped>
175+ .loop-beautify-button {
176+ position : absolute ;
177+ top : 35px ;
178+ right : 70px ;
179+ border : none ;
180+ z-index : 10 ;
181+ }
182+ </style >
You can’t perform that action at this time.
0 commit comments