Commit c621aab8 by zhuxiaomei

打卡 删除

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