|
@@ -15,8 +15,9 @@
|
|
|
</row-list>
|
|
|
</a-form>
|
|
|
<div @click="handleSelectPoint" style="position: relative;">
|
|
|
- <div class="point" ref="point"></div>
|
|
|
- <img src="@/assets/a/a.png" width="100%" alt="">
|
|
|
+ <div v-show="x" class="point" ref="point"></div>
|
|
|
+ <img v-if="url" :src="url" width="100%" alt="">
|
|
|
+ <a-empty v-else description="暂无底图,请上传" />
|
|
|
</div>
|
|
|
<template slot="footer">
|
|
|
<a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
|
|
@@ -25,6 +26,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { fetchSbPosition } from '@/api/sb/position'
|
|
|
export default {
|
|
|
name: 'PointModal',
|
|
|
data() {
|
|
@@ -35,6 +37,7 @@ export default {
|
|
|
y: null,
|
|
|
visible: false,
|
|
|
record: {},
|
|
|
+ url: null,
|
|
|
}
|
|
|
},
|
|
|
props: {},
|
|
@@ -52,6 +55,9 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.point.style.left = this.x + 'px'
|
|
|
this.$refs.point.style.top = this.y + 'px'
|
|
|
+ fetchSbPosition({ id: record.positionId }).then((res) => {
|
|
|
+ this.url = res.data.opcImg
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
save() {
|
|
@@ -72,6 +78,7 @@ export default {
|
|
|
this.$emit('ok')
|
|
|
this.x = null
|
|
|
this.y = null
|
|
|
+ this.record = null
|
|
|
this.confirmLoading = false
|
|
|
},
|
|
|
},
|