|
|
@ -153,6 +153,8 @@ const nodeName = ref(""); |
|
|
|
const csedNode = ref<any>(null); |
|
|
|
const csedNode = ref<any>(null); |
|
|
|
const operations = []; |
|
|
|
const operations = []; |
|
|
|
onMounted(() => { |
|
|
|
onMounted(() => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
preWork(); |
|
|
|
preWork(); |
|
|
|
|
|
|
|
|
|
|
|
// #region 初始化画布 |
|
|
|
// #region 初始化画布 |
|
|
@ -254,7 +256,8 @@ onMounted(() => { |
|
|
|
console.log(cell); |
|
|
|
console.log(cell); |
|
|
|
if (!useSettingStore.saveRoute) { |
|
|
|
if (!useSettingStore.saveRoute) { |
|
|
|
ElMessage({ |
|
|
|
ElMessage({ |
|
|
|
message: "请先完成配置", |
|
|
|
message: |
|
|
|
|
|
|
|
"第二步只需把模块拖放的相应的位置即可,下一步完成后可以填写数据", |
|
|
|
type: "warning", |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -400,6 +403,12 @@ onMounted(() => { |
|
|
|
graph.zoom(0.1); |
|
|
|
graph.zoom(0.1); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
const zoom = window.outerWidth / window.innerWidth; |
|
|
|
|
|
|
|
console.log("缩放比例为:", zoom); |
|
|
|
|
|
|
|
if(zoom > 1) { |
|
|
|
|
|
|
|
ElMessage.error("当前浏览器缩放比例过大,通过Ctrl+滚轮调整比例"); |
|
|
|
|
|
|
|
graph.zoom(-0.5); |
|
|
|
|
|
|
|
} |
|
|
|
graph.bindKey(["ctrl+2", "meta+2"], () => { |
|
|
|
graph.bindKey(["ctrl+2", "meta+2"], () => { |
|
|
|
const zoom = graph.zoom(); |
|
|
|
const zoom = graph.zoom(); |
|
|
|
if (zoom > 0.5) { |
|
|
|
if (zoom > 0.5) { |
|
|
@ -1213,12 +1222,13 @@ function preWork() { |
|
|
|
bord |
|
|
|
bord |
|
|
|
} |
|
|
|
} |
|
|
|
#stencil { |
|
|
|
#stencil { |
|
|
|
width: 0.9375rem; |
|
|
|
width: 200px; |
|
|
|
height: 3.125rem; |
|
|
|
height: 3.125rem; |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
#graph-container { |
|
|
|
#graph-container { |
|
|
|
|
|
|
|
flex:1; |
|
|
|
width: 8.3333rem; |
|
|
|
width: 8.3333rem; |
|
|
|
height: 3.125rem; |
|
|
|
height: 3.125rem; |
|
|
|
} |
|
|
|
} |
|
|
|