Commit c621aab8 by zhuxiaomei

打卡 删除

parent 1951fb86
......@@ -65,8 +65,8 @@
</van-list>
</van-pull-refresh>
</div>
<div class="bottom-btn">
<div v-if="showCheck" @click="_checkAll">{{checkAll?'取消全选':'全选'}}</div>
<div class="bottom-btn bottom-btn-two" v-if="showCheck">
<van-button square @click="_checkAll">{{checkAll?'取消全选':'全选'}}</van-button>
<van-button square type="info" @click="_del(checkListValue)">删除</van-button>
</div>
</template>
......@@ -222,7 +222,7 @@
if (ids.length === 0) {
this.$toast('请至少选择一条数据!')
} else {
this._delOk()
this._delOk(ids)
}
},
_delOk: async function (ids) {
......
......@@ -11,7 +11,7 @@
<div class="result-item" @click="_goto(item)">
<div>地点:{{item.name}}</div>
<div>地址:{{item.address}}</div>
<div>打卡时间:{{item.attendanceTime}}</div>
<div>打卡时间:{{item.attendanceTime?$dateformat(item.attendanceTime,'yyyy-mm-dd'):''}}</div>
<div>打卡地点:{{item.attendanceAddress}}</div>
</div>
<template #right>
......@@ -97,16 +97,17 @@
this.$refs.allLoc._open(this.planId)
})
},
_getWebLoc() {
_getWebLoc(id) {
let that = this
that.$nextTick(() => {
BaiduMap.init().then(BMap => {
var geolocation = new BMap.Geolocation()
geolocation.getCurrentPosition(function (r) {
/* eslint-disable */
if (this.getStatus() == BMAP_STATUS_SUCCESS) {
that.latitude = that.$changeToDFM(r.point.lat, 'N')
that.longitude = that.$changeToDFM(r.point.lng, 'E')
that._action()
that._action(id)
} else {
alert('获取不到位置信息')
}
......@@ -115,9 +116,9 @@
})
},
// 打卡
_action: async function () {
_action: async function (id) {
let result = await attendanceRecord.add({
planId: this.planId,
placeId: id,
attendanceAddress: this.latitude + ',' + this.longitude
})
if (result) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment