hookehuyr

fix

...@@ -489,14 +489,14 @@ ...@@ -489,14 +489,14 @@
489 :onRef="onRef" 489 :onRef="onRef"
490 :multipleSelect="showMultipleSelect" 490 :multipleSelect="showMultipleSelect"
491 :loading="state.editorLoading" 491 :loading="state.editorLoading"
492 + @click-canvas="onClickCanvasPreview"
492 @click-node="onClickNodePreview" 493 @click-node="onClickNodePreview"
493 :controlConfig="state.controlConfig" 494 :controlConfig="state.controlConfig"
494 :toolbarButtonHandler="toolbarButtonHandler" 495 :toolbarButtonHandler="toolbarButtonHandler"
495 ></vue-flow-editor-form> 496 ></vue-flow-editor-form>
496 </div> 497 </div>
497 <div class="preview-detail-container"> 498 <div class="preview-detail-container">
498 - {{ state.detailModel }} 499 + <iframe :src="state.preview_form_url" width="100%" height="100%" style="border: 0;"></iframe>
499 - <iframe src="https://oa-dev.onwall.cn/f/custom_form/front/index.html#/?code=fboupg&model=preview" width="100%" height="100%" style="border: 0;"></iframe>
500 </div> 500 </div>
501 <template #footer> 501 <template #footer>
502 <span class="dialog-footer"> 502 <span class="dialog-footer">
...@@ -674,7 +674,8 @@ export default { ...@@ -674,7 +674,8 @@ export default {
674 node_attr: {}, 674 node_attr: {},
675 node_tree: {}, 675 node_tree: {},
676 show_preview: false, 676 show_preview: false,
677 - window_height: '500px' 677 + window_height: '500px',
678 + preview_form_url: '',
678 }); 679 });
679 680
680 const setNodeTree = (id: string, data: object) => { 681 const setNodeTree = (id: string, data: object) => {
...@@ -2268,6 +2269,20 @@ export default { ...@@ -2268,6 +2269,20 @@ export default {
2268 model.data = model.data ? model.data : {}; 2269 model.data = model.data ? model.data : {};
2269 2270
2270 state.detailModel = model; 2271 state.detailModel = model;
2272 + console.warn(model);
2273 + if (model.id !== 'start-node') {
2274 + state.preview_form_url = 'https://oa-dev.onwall.cn/f/custom_form/front/index.html#/?code=fboupg&model=preview'
2275 + } else {
2276 + state.preview_form_url = null;
2277 + }
2278 + }
2279 +
2280 + /**
2281 + * 单击画布预览回调
2282 + * @param {Event} e - The event object representing the click event.
2283 + */
2284 + const onClickCanvasPreview = () => {
2285 + state.preview_form_url = null;
2271 } 2286 }
2272 2287
2273 return { 2288 return {
...@@ -2326,8 +2341,10 @@ export default { ...@@ -2326,8 +2341,10 @@ export default {
2326 saveData, 2341 saveData,
2327 startFlow, 2342 startFlow,
2328 toolbarButtonHandler, 2343 toolbarButtonHandler,
2344 +
2329 openPreview, 2345 openPreview,
2330 onClickNodePreview, 2346 onClickNodePreview,
2347 + onClickCanvasPreview,
2331 2348
2332 onRef: (e: any) => (editor = e), 2349 onRef: (e: any) => (editor = e),
2333 staticPath, 2350 staticPath,
......