校准线的改为动态显示隐藏

This commit is contained in:
yyy 2025-07-18 18:16:23 +08:00
parent d8f6929190
commit 606a735aa5
3 changed files with 38 additions and 24 deletions

View File

@ -4,9 +4,9 @@ NODE_ENV=development
VITE_DEV=true
# 请求路径
VITE_BASE_URL='http://10.10.7.132:48080'
# VITE_BASE_URL='http://10.10.7.132:48080'
# VITE_BASE_URL='http://10.10.100.15:48080'
# VITE_BASE_URL='http://10.10.5.5:48080'
VITE_BASE_URL='http://10.10.5.5:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传,仅支持 S3 服务
VITE_UPLOAD_TYPE=server

View File

@ -53,6 +53,11 @@ const list = ref([
category: 'nodeImage',
name: '库位图片',
isShow: true
},
{
category: 'checkLine',
name: '校准线',
isShow: false
}
])

View File

@ -676,27 +676,30 @@
{{ item.text }}
</div>
</VueDragResizeRotate>
<span
class="ref-line v-line"
v-for="(item, index) in state.vLine"
:key="'v_' + index"
v-show="item.display"
:style="{
left: item.position,
top: item.origin,
height: item.lineLength
}"
></span>
<span
class="ref-line h-line"
v-for="(item, index) in state.hLine"
:key="'h_' + index"
:style="{
top: item.position,
left: item.origin,
width: item.lineLength
}"
></span>
<template v-if="state.mapCheckLineShow">
<span
class="ref-line v-line"
v-for="(item, index) in state.vLine"
:key="'v_' + index"
v-show="item.display"
:style="{
left: item.position,
top: item.origin,
height: item.lineLength
}"
></span>
<span
class="ref-line h-line"
v-for="(item, index) in state.hLine"
:key="'h_' + index"
:style="{
top: item.position,
left: item.origin,
width: item.lineLength
}"
></span>
</template>
<div v-if="imgBgObj.width && imgBgObj.height">
<svg
@ -2051,10 +2054,14 @@ const state = reactive({
currentIndex: -1
},
checkPointDistance: 0,
curveOffsetValue: 0
curveOffsetValue: 0,
mapCheckLineShow: false // 线
})
const getRefLineParams = (params) => {
if (!state.mapCheckLineShow) {
return
}
const { vLine, hLine } = params
state.vLine = vLine
state.hLine = hLine
@ -4613,6 +4620,8 @@ const isCurveDisplayChange = (category, show) => {
}
})
}
} else if (category === 'checkLine') {
state.mapCheckLineShow = show
}
}