hookehuyr

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

...@@ -484,7 +484,6 @@ ...@@ -484,7 +484,6 @@
484 ref="editor1" 484 ref="editor1"
485 :height="state.window_height" 485 :height="state.window_height"
486 :data="flowData" 486 :data="flowData"
487 - :grid="showGrid"
488 :miniMap="showMiniMap" 487 :miniMap="showMiniMap"
489 :onRef="onRef1" 488 :onRef="onRef1"
490 :multipleSelect="showMultipleSelect" 489 :multipleSelect="showMultipleSelect"
...@@ -500,8 +499,8 @@ ...@@ -500,8 +499,8 @@
500 </div> 499 </div>
501 <template #footer> 500 <template #footer>
502 <span class="dialog-footer"> 501 <span class="dialog-footer">
503 - <el-button @click="state.dialogPreviewVisible = false">取消</el-button> 502 + <!-- <el-button @click="state.dialogPreviewVisible = false">取消</el-button> -->
504 - <el-button color="#009688" @click="state.dialogPreviewVisible = false">确认</el-button> 503 + <el-button color="#009688" @click="state.dialogPreviewVisible = false">关闭</el-button>
505 </span> 504 </span>
506 </template> 505 </template>
507 </el-dialog> 506 </el-dialog>
...@@ -2249,6 +2248,14 @@ export default { ...@@ -2249,6 +2248,14 @@ export default {
2249 2248
2250 // 触发resize事件 2249 // 触发resize事件
2251 window.dispatchEvent(resizeEvent); 2250 window.dispatchEvent(resizeEvent);
2251 +
2252 + setTimeout(() => {
2253 + nextTick(() => {
2254 + // 预览流程图的背景
2255 + $('.preview-container').find('.g6-grid').parent().css('zIndex', '0');
2256 + $('.preview-container').find('canvas').css('zIndex', '1').css('position', 'relative');
2257 + })
2258 + }, 500);
2252 } 2259 }
2253 2260
2254 /** 2261 /**
...@@ -2619,6 +2626,7 @@ body { ...@@ -2619,6 +2626,7 @@ body {
2619 } 2626 }
2620 .preview-detail-container { 2627 .preview-detail-container {
2621 position: fixed; 2628 position: fixed;
2629 + z-index: 9;
2622 width: 30vw; 2630 width: 30vw;
2623 height: 80vh; 2631 height: 80vh;
2624 top: 10vh; 2632 top: 10vh;
......
...@@ -5,7 +5,6 @@ import {useBehavior} from "@/behavior"; ...@@ -5,7 +5,6 @@ import {useBehavior} from "@/behavior";
5 import {GraphStyle} from "@/utils/styles"; 5 import {GraphStyle} from "@/utils/styles";
6 import {registerShape} from "@/shape"; 6 import {registerShape} from "@/shape";
7 import {formatNodeModel,formatNodeModel_control} from "@/utils/utils"; 7 import {formatNodeModel,formatNodeModel_control} from "@/utils/utils";
8 -import $ from "jquery";
9 registerShape(G6) 8 registerShape(G6)
10 9
11 export default { 10 export default {
...@@ -25,16 +24,14 @@ export default { ...@@ -25,16 +24,14 @@ export default {
25 function onMouseout(e: MouseEvent) {commander.destroyEvent()} 24 function onMouseout(e: MouseEvent) {commander.destroyEvent()}
26 25
27 function refresh() { 26 function refresh() {
27 + nextTick(() => {
28 if (!!editorState.graph) { 28 if (!!editorState.graph) {
29 editorState.graph.destroy() 29 editorState.graph.destroy()
30 } 30 }
31 - nextTick(() => {
32 const target = proxy.$refs.target as HTMLElement 31 const target = proxy.$refs.target as HTMLElement
33 32
34 const {offsetHeight: height, offsetWidth: width} = proxy.$refs.root as HTMLElement 33 const {offsetHeight: height, offsetWidth: width} = proxy.$refs.root as HTMLElement
35 34
36 -
37 -
38 const behaviors = useBehavior({ 35 const behaviors = useBehavior({
39 multipleSelect: editorState.props.multipleSelect, 36 multipleSelect: editorState.props.multipleSelect,
40 dragEdge: { 37 dragEdge: {
......
...@@ -38,7 +38,6 @@ export default { ...@@ -38,7 +38,6 @@ export default {
38 38
39 const canvasProps = useCanvasProps(props) 39 const canvasProps = useCanvasProps(props)
40 40
41 -
42 const modelBodyStyle = computed(() => ({ 41 const modelBodyStyle = computed(() => ({
43 width: suffixSize(props.modelWidth) 42 width: suffixSize(props.modelWidth)
44 })) 43 }))
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
76 },*/ 76 },*/
77 { 77 {
78 key: 'zoomIn', 78 key: 'zoomIn',
79 - tip: '放大 CTRL+=', 79 + tip: '放大',
80 label: '放大', 80 label: '放大',
81 icon: 'zoomIn', 81 icon: 'zoomIn',
82 handler: () => { 82 handler: () => {
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
86 }, 86 },
87 { 87 {
88 key: 'zoomOut', 88 key: 'zoomOut',
89 - tip: '缩小 CTRL+-', 89 + tip: '缩小',
90 label: '缩小', 90 label: '缩小',
91 icon: 'zoomOut', 91 icon: 'zoomOut',
92 handler: () => { 92 handler: () => {
...@@ -104,7 +104,7 @@ export default { ...@@ -104,7 +104,7 @@ export default {
104 }, 104 },
105 { 105 {
106 key: 'delete', 106 key: 'delete',
107 - tip: '删除 DELETE , CTRL+D', 107 + tip: '删除',
108 label: '删除', 108 label: '删除',
109 icon: 'delete', 109 icon: 'delete',
110 handler: () => { 110 handler: () => {
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
121 buttons.splice(8, 0, ...[ 121 buttons.splice(8, 0, ...[
122 { 122 {
123 key: 'undo', 123 key: 'undo',
124 - tip: '撤销 CTRL+Z', 124 + tip: '撤销',
125 label: '撤销', 125 label: '撤销',
126 icon: 'undo', 126 icon: 'undo',
127 handler: () => { 127 handler: () => {
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
131 }, 131 },
132 { 132 {
133 key: 'redo', 133 key: 'redo',
134 - tip: '重做 CTRL+SHIFT+Z', 134 + tip: '重做',
135 label: '重做', 135 label: '重做',
136 icon: 'redo', 136 icon: 'redo',
137 handler: () => { 137 handler: () => {
......