55 :class =" { isSelected: props.nodeModel.isSelected, error: node_status !== 200 }"
66 style =" overflow : visible ; background : #fff "
77 >
8- <div v-resize = " resizeStepContainer " >
8+ <div >
99 <div class =" flex-between" >
1010 <div class =" flex align-center" >
1111 <component
1717 <h4 class =" ellipsis-1 break-all" >{{ nodeModel.properties.stepName }}</h4 >
1818 </div >
1919 <!-- 放大缩小按钮 -->
20- <!-- < el-button link @click="enlargeHandle">
20+ <el-button link @click =" enlargeHandle" >
2121 <AppIcon
2222 :iconName =" enlarge ? 'app-minify' : 'app-magnify'"
2323 class =" color-secondary"
2424 style =" font-size : 20px "
2525 >
2626 </AppIcon >
27- </el-button> -->
27+ </el-button >
2828 </div >
2929 <el-collapse-transition >
3030 <div @mousedown.stop @keydown.stop @click.stop v-show =" showNode" class =" mt-16" >
4040 show-icon
4141 :closable =" false"
4242 />
43- <slot ></slot >
43+ <div :style =" `height:${height}px`" >
44+ <slot ></slot >
45+ </div >
46+
4447 <template v-if =" nodeFields .length > 0 " >
4548 <h5 class =" title-decoration-1 mb-8 mt-8" >
4649 {{ $t('common.param.outputParam') }}
@@ -115,16 +118,8 @@ import { ElMessage } from 'element-plus'
115118import type { FormInstance } from ' element-plus'
116119import { t } from ' @/locales'
117120import { WorkflowMode } from ' @/enums/application'
121+
118122provide (' workflowMode' , WorkflowMode .ApplicationLoop )
119- const height = ref <{
120- stepContainerHeight: number
121- inputContainerHeight: number
122- outputContainerHeight: number
123- }>({
124- stepContainerHeight: 0 ,
125- inputContainerHeight: 0 ,
126- outputContainerHeight: 0 ,
127- })
128123
129124const titleFormRef = ref ()
130125const nodeNameDialogVisible = ref <boolean >(false )
@@ -179,14 +174,7 @@ const mousedown = () => {
179174}
180175const showicon = ref <number | null >(null )
181176
182- const resizeStepContainer = (wh : any ) => {
183- if (wh .height ) {
184- if (! props .nodeModel .virtual ) {
185- height .value .stepContainerHeight = wh .height
186- props .nodeModel .setHeight (height .value .stepContainerHeight )
187- }
188- }
189- }
177+ const height = ref <number >(600 )
190178
191179const props = defineProps <{
192180 nodeModel: any
@@ -211,9 +199,22 @@ const enlarge = ref(false)
211199function enlargeHandle() {
212200 enlarge .value = ! enlarge .value
213201 if (enlarge .value ) {
214- // ...
202+ props .nodeModel .graphModel .transformModel .focusOn (
203+ props .nodeModel .x ,
204+ props .nodeModel .y ,
205+ props .nodeModel .width + 470 ,
206+ props .nodeModel .height - 30 ,
207+ )
208+ height .value =
209+ (props .nodeModel .graphModel .height - 100 ) / props .nodeModel .graphModel .transformModel .SCALE_Y
210+ const width = window .innerWidth / props .nodeModel .graphModel .transformModel .SCALE_X
211+ props .nodeModel .width = width
212+ props .nodeModel .setHeight (height .value )
215213 } else {
216- // ...
214+ height .value = 600
215+ const width = 1920
216+ props .nodeModel .width = width
217+ props .nodeModel .setHeight (height .value )
217218 }
218219}
219220 </script >
0 commit comments