app bug修改
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': sCode === '' || nCode === ''}" :disabled="disabled" @tap="_callTask('2')">分切换轴</button>
|
||||
<button class="zd-col-6 button-primary" :class="{'button-info': sCode === '' || nCode === ''}" :disabled="disabled" @tap="_callTask('3')">搬运任务</button>
|
||||
</view>
|
||||
<view ref="pointIcon" class="pop_point_wrap">
|
||||
<view class="pop_point_wrap" :style="{top: distanceToTop + 'px',left: distanceToLeft + 'px'}">
|
||||
<view class="zd-row jccenter">
|
||||
<uni-icons type="map-pin-ellipse" size="18" color="#fff"></uni-icons>
|
||||
</view>
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import {queryArea, queryPointByArea, callTask} from '@/utils/getData2.js'
|
||||
import {queryArea, queryPointByArea, callTask} from '@/utils/mork2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar
|
||||
@@ -73,7 +73,9 @@
|
||||
code: '',
|
||||
sCode: '',
|
||||
nCode: '',
|
||||
show: false
|
||||
show: false,
|
||||
distanceToTop: -300,
|
||||
distanceToLeft: -300
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -102,27 +104,23 @@
|
||||
this.pointArr = [...res.data]
|
||||
},
|
||||
setcode (el,index) {
|
||||
let distanceToTop = ''
|
||||
let distanceToLeft = ''
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
const query = uni.createSelectorQuery().in(this)
|
||||
query
|
||||
.select(`#site_item_box_${index}`)
|
||||
.boundingClientRect(data => {
|
||||
if (data) {
|
||||
distanceToTop = data.top + (data.height / 2) - 9
|
||||
distanceToLeft = data.left
|
||||
this.distanceToTop = data.top + (data.height / 2) - 9
|
||||
this.distanceToLeft = data.left
|
||||
}
|
||||
}).exec()
|
||||
this.show = true
|
||||
this.$refs.pointIcon.$el.style.top = distanceToTop + 'px'
|
||||
this.$refs.pointIcon.$el.style.left = distanceToLeft + 'px'
|
||||
this.$refs.pointIcon.$el.style.transform = 'scale(100%)'
|
||||
this.code = el.device_code
|
||||
},
|
||||
colsePop () {
|
||||
this.show = !this.show
|
||||
if (!this.show) {
|
||||
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||
this.distanceToTop = -300
|
||||
this.distanceToLeft = -300
|
||||
}
|
||||
},
|
||||
getstartcode () {
|
||||
@@ -131,7 +129,8 @@
|
||||
}
|
||||
this.sCode = this.code
|
||||
this.show = false
|
||||
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||
this.distanceToTop = -300
|
||||
this.distanceToLeft = -300
|
||||
},
|
||||
getnextcode () {
|
||||
if (this.sCode !== '' && this.sCode === this.code) {
|
||||
@@ -139,7 +138,8 @@
|
||||
}
|
||||
this.nCode = this.code
|
||||
this.show = false
|
||||
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||
this.distanceToTop = -300
|
||||
this.distanceToLeft = -300
|
||||
},
|
||||
/** 清空点位选择 */
|
||||
cancle () {
|
||||
|
||||
Reference in New Issue
Block a user