|
@@ -9,7 +9,8 @@
|
|
|
>
|
|
|
<div style="position: relative;">
|
|
|
<div class="point" ref="point" />
|
|
|
- <img @click="handleSelect" :src="opcImg" width="100%" alt="">
|
|
|
+ <img v-if="opcImg" @click="handleSelect" :src="opcImg" width="100%" alt="">
|
|
|
+ <a-empty v-else description="暂无底图,请上传" />
|
|
|
</div>
|
|
|
</a-modal>
|
|
|
</template>
|
|
@@ -36,12 +37,11 @@ export default {
|
|
|
positionX: 0,
|
|
|
positionY: 0
|
|
|
}
|
|
|
- // calc(~"50% - 5px")
|
|
|
+ // calc(50% - 5px)
|
|
|
if (record.positionX && record.positionY) this.position = { ...record }
|
|
|
this.$nextTick(() => {
|
|
|
- console.log(this.$refs.point.style, this.position)
|
|
|
- this.$refs.point.style.left = `calc(~"${this.position.positionX}% - 5px")`
|
|
|
- this.$refs.point.style.top = `calc(~"${this.position.positionY}% - 5px")`
|
|
|
+ this.$refs.point.style.left = `calc(${this.position.positionX}% - 5px)`
|
|
|
+ this.$refs.point.style.top = `calc(${this.position.positionY}% - 5px)`
|
|
|
})
|
|
|
},
|
|
|
handleSelect (e) {
|