编辑地图 节点信息展示优化

This commit is contained in:
yyy 2025-03-28 16:50:23 +08:00
parent a8fed4a258
commit b2d31a2f5e
2 changed files with 3164 additions and 6 deletions

File diff suppressed because it is too large Load Diff

View File

@ -340,12 +340,27 @@
:style="{ width: item.locationWidePx + 'px', height: item.locationDeepPx + 'px' }" :style="{ width: item.locationWidePx + 'px', height: item.locationDeepPx + 'px' }"
> >
<!-- 1 路径点 --> <!-- 1 路径点 -->
<el-tooltip <el-tooltip effect="dark" placement="top" trigger="click">
effect="dark" <template #content>
:content="item.sortNum || '节点未保存'" <div v-if="item.type === 2">
placement="top" <div>序号{{ item.sortNum || '节点未保存' }}</div>
trigger="click" <div class="item-tooltip-name" v-if="item.laneId && item.laneName">
> 所属线库{{ item.laneName }}
</div>
<div class="item-tooltip-name" v-if="item.areaId && item.areaName">
所属线库{{ item.areaName }}
</div>
</div>
<div v-else-if="item.type === 3">
<div>序号{{ item.sortNum || '节点未保存' }}</div>
<div class="item-tooltip-name" v-if="item.deviceNo">
设备编号{{ item.deviceNo }}
</div>
</div>
<div v-else>
<div>序号{{ item.sortNum || '节点未保存' }}</div>
</div>
</template>
<div <div
v-if="item.type === 1 && item.layerSelectionShow" v-if="item.type === 1 && item.layerSelectionShow"
:style="{ :style="{
@ -2525,6 +2540,8 @@ const getAllNodeList = async () => {
item.dataList = JSONBigInt({ storeAsString: true }).parse(item.dataJson) item.dataList = JSONBigInt({ storeAsString: true }).parse(item.dataJson)
item.locationDeep = item.dataList[0].locationDeep item.locationDeep = item.dataList[0].locationDeep
item.locationWide = item.dataList[0].locationWide item.locationWide = item.dataList[0].locationWide
item.areaName = item.dataList[0].areaName || undefined
item.laneName = item.dataList[0].laneName || undefined
item.draggable = true item.draggable = true
item.resizable = true item.resizable = true
item.rotatable = false item.rotatable = false
@ -2950,6 +2967,13 @@ onUnmounted(() => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.item-tooltip-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 200px;
}
.edit-map-page { .edit-map-page {
.map-container { .map-container {
position: relative; position: relative;