|
@@ -13,10 +13,11 @@ Page({
|
|
//店铺经纬度
|
|
//店铺经纬度
|
|
latitude: 43.8691319,
|
|
latitude: 43.8691319,
|
|
longitude: 125.3504459,
|
|
longitude: 125.3504459,
|
|
- businessName:null,
|
|
|
|
- busEnterpriseId:null,
|
|
|
|
- busPatrolstationId:null,
|
|
|
|
- orgCode:null,
|
|
|
|
|
|
+ businessName: null,
|
|
|
|
+ busEnterpriseId: null,
|
|
|
|
+ busPatrolstationId: null,
|
|
|
|
+ busPatrolstationName: null,
|
|
|
|
+ orgCode: null,
|
|
//标记点
|
|
//标记点
|
|
markers: [{
|
|
markers: [{
|
|
id: 0,
|
|
id: 0,
|
|
@@ -64,16 +65,17 @@ Page({
|
|
} else {
|
|
} else {
|
|
|
|
|
|
this.setData({
|
|
this.setData({
|
|
- businessName:res.data[0].busEnterpriseName,
|
|
|
|
- orgCode:res.data[0].busPatrolstationCode,
|
|
|
|
- busEnterpriseId:res.data[0].busEnterpriseId,
|
|
|
|
- busPatrolstationId:res.data[0].busPatrolstationId,
|
|
|
|
|
|
+ businessName: res.data[0].busEnterpriseName,
|
|
|
|
+ orgCode: res.data[0].busPatrolstationCode,
|
|
|
|
+ busEnterpriseId: res.data[0].busEnterpriseId,
|
|
|
|
+ busPatrolstationId: res.data[0].busPatrolstationId,
|
|
|
|
+ busPatrolstationName: res.data[0].busPatrolstationName,
|
|
latitude: res.data[0].latitude,
|
|
latitude: res.data[0].latitude,
|
|
longitude: res.data[0].longitude,
|
|
longitude: res.data[0].longitude,
|
|
markers: [{
|
|
markers: [{
|
|
id: Number(res.data[0].busPatrolstationId),
|
|
id: Number(res.data[0].busPatrolstationId),
|
|
name: res.data[0].busPatrolstationName,
|
|
name: res.data[0].busPatrolstationName,
|
|
-
|
|
|
|
|
|
+
|
|
latitude: res.data[0].latitude,
|
|
latitude: res.data[0].latitude,
|
|
longitude: res.data[0].longitude,
|
|
longitude: res.data[0].longitude,
|
|
width: 35,
|
|
width: 35,
|
|
@@ -83,12 +85,66 @@ Page({
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- bindViewEdit(){
|
|
|
|
- console.log("@@@",this.data.busEnterpriseId)
|
|
|
|
- console.log("@@@",this.data.busPatrolstationId)
|
|
|
|
|
|
+ bindViewEdit() {
|
|
|
|
+ console.log("@@@", this.data.busEnterpriseId)
|
|
|
|
+ console.log("@@@", this.data.busPatrolstationId)
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
- url: '../new_patrol_point/new_patrol_point?enterpriseId='+this.data.busEnterpriseId +"&busPatrolstationId="+this.data.busPatrolstationId+"&isEdit=y",
|
|
|
|
|
|
+ url: '../new_patrol_point/new_patrol_point?enterpriseId=' + this.data.busEnterpriseId + "&busPatrolstationId=" + this.data.busPatrolstationId + "&isEdit=y",
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ bindViewXungeng() {
|
|
|
|
+ // this.data.lasttime=util.formatDate(new Date(e.data.zgtzs.lastTime),'yyyy年MM月dd日') ;
|
|
|
|
+ wx.showLoading()
|
|
|
|
+ let obj = new Object();
|
|
|
|
+ obj.busPatrolstationId = this.data.busPatrolstationId
|
|
|
|
+ http.post("/system/AppXungengController/doXungeng", obj, this.getXunGengSuccess)
|
|
|
|
+ },
|
|
|
|
+ getXunGengSuccess(res) {
|
|
|
|
+ console.log("@@@", res)
|
|
|
|
+ wx.hideLoading()
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: res.msg,
|
|
|
|
+ icon: 'none'
|
|
})
|
|
})
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ wx.navigateBack()
|
|
|
|
+ }
|
|
|
|
+ }, 1000);
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ bindViewXunGengJiLu() {
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url: '../xungengjilu/xungengjilu?busPatrolstationId=' + this.data.busPatrolstationId,
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ bindViewQiYeDelete() {
|
|
|
|
+ let that = this
|
|
|
|
+ wx.showModal({
|
|
|
|
+ title: "提示",
|
|
|
|
+ content: "确定要删除编号为" + this.data.orgCode + "的巡更点吗?",
|
|
|
|
+ success: function (sm) {
|
|
|
|
+ if (sm.confirm) {
|
|
|
|
+ let obj = new Object()
|
|
|
|
+ obj.busPatrolstationId = that.data.busPatrolstationId
|
|
|
|
+ http.post("/system/AppPatrolstationController/deletePatrolstationList", obj, that.deleteSuccess)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ deleteSuccess(res) {
|
|
|
|
+
|
|
|
|
+ console.log("@@", res)
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: res.msg,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ wx.navigateBack()
|
|
|
|
+ }
|
|
|
|
+ }, 1000);
|
|
|
|
+
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
* 生命周期函数--监听页面初次渲染完成
|