hookehuyr

fix

......@@ -489,14 +489,14 @@
:onRef="onRef"
:multipleSelect="showMultipleSelect"
:loading="state.editorLoading"
@click-canvas="onClickCanvasPreview"
@click-node="onClickNodePreview"
:controlConfig="state.controlConfig"
:toolbarButtonHandler="toolbarButtonHandler"
></vue-flow-editor-form>
</div>
<div class="preview-detail-container">
{{ state.detailModel }}
<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>
<iframe :src="state.preview_form_url" width="100%" height="100%" style="border: 0;"></iframe>
</div>
<template #footer>
<span class="dialog-footer">
......@@ -674,7 +674,8 @@ export default {
node_attr: {},
node_tree: {},
show_preview: false,
window_height: '500px'
window_height: '500px',
preview_form_url: '',
});
const setNodeTree = (id: string, data: object) => {
......@@ -2268,6 +2269,20 @@ export default {
model.data = model.data ? model.data : {};
state.detailModel = model;
console.warn(model);
if (model.id !== 'start-node') {
state.preview_form_url = 'https://oa-dev.onwall.cn/f/custom_form/front/index.html#/?code=fboupg&model=preview'
} else {
state.preview_form_url = null;
}
}
/**
* 单击画布预览回调
* @param {Event} e - The event object representing the click event.
*/
const onClickCanvasPreview = () => {
state.preview_form_url = null;
}
return {
......@@ -2326,8 +2341,10 @@ export default {
saveData,
startFlow,
toolbarButtonHandler,
openPreview,
onClickNodePreview,
onClickCanvasPreview,
onRef: (e: any) => (editor = e),
staticPath,
......