hookehuyr

fix 优化预览节点流程的背景图显示

......@@ -484,7 +484,6 @@
ref="editor1"
:height="state.window_height"
:data="flowData"
:grid="showGrid"
:miniMap="showMiniMap"
:onRef="onRef1"
:multipleSelect="showMultipleSelect"
......@@ -500,8 +499,8 @@
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="state.dialogPreviewVisible = false">取消</el-button>
<el-button color="#009688" @click="state.dialogPreviewVisible = false">确认</el-button>
<!-- <el-button @click="state.dialogPreviewVisible = false">取消</el-button> -->
<el-button color="#009688" @click="state.dialogPreviewVisible = false">关闭</el-button>
</span>
</template>
</el-dialog>
......@@ -2249,6 +2248,14 @@ export default {
// 触发resize事件
window.dispatchEvent(resizeEvent);
setTimeout(() => {
nextTick(() => {
// 预览流程图的背景
$('.preview-container').find('.g6-grid').parent().css('zIndex', '0');
$('.preview-container').find('canvas').css('zIndex', '1').css('position', 'relative');
})
}, 500);
}
/**
......@@ -2619,6 +2626,7 @@ body {
}
.preview-detail-container {
position: fixed;
z-index: 9;
width: 30vw;
height: 80vh;
top: 10vh;
......
......@@ -5,7 +5,6 @@ import {useBehavior} from "@/behavior";
import {GraphStyle} from "@/utils/styles";
import {registerShape} from "@/shape";
import {formatNodeModel,formatNodeModel_control} from "@/utils/utils";
import $ from "jquery";
registerShape(G6)
export default {
......@@ -25,16 +24,14 @@ export default {
function onMouseout(e: MouseEvent) {commander.destroyEvent()}
function refresh() {
if (!!editorState.graph) {
editorState.graph.destroy()
}
nextTick(() => {
if (!!editorState.graph) {
editorState.graph.destroy()
}
const target = proxy.$refs.target as HTMLElement
const {offsetHeight: height, offsetWidth: width} = proxy.$refs.root as HTMLElement
const behaviors = useBehavior({
multipleSelect: editorState.props.multipleSelect,
dragEdge: {
......
......@@ -38,7 +38,6 @@ export default {
const canvasProps = useCanvasProps(props)
const modelBodyStyle = computed(() => ({
width: suffixSize(props.modelWidth)
}))
......
......@@ -76,7 +76,7 @@ export default {
},*/
{
key: 'zoomIn',
tip: '放大 CTRL+=',
tip: '放大',
label: '放大',
icon: 'zoomIn',
handler: () => {
......@@ -86,7 +86,7 @@ export default {
},
{
key: 'zoomOut',
tip: '缩小 CTRL+-',
tip: '缩小',
label: '缩小',
icon: 'zoomOut',
handler: () => {
......@@ -104,7 +104,7 @@ export default {
},
{
key: 'delete',
tip: '删除 DELETE , CTRL+D',
tip: '删除',
label: '删除',
icon: 'delete',
handler: () => {
......@@ -121,7 +121,7 @@ export default {
buttons.splice(8, 0, ...[
{
key: 'undo',
tip: '撤销 CTRL+Z',
tip: '撤销',
label: '撤销',
icon: 'undo',
handler: () => {
......@@ -131,7 +131,7 @@ export default {
},
{
key: 'redo',
tip: '重做 CTRL+SHIFT+Z',
tip: '重做',
label: '重做',
icon: 'redo',
handler: () => {
......