12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- import http from '../../base/httputil'
- const app = getApp()
- Page({
- /**
- * 组件的初始数据
- */
- data: {
- host: app.globalData.host,
- enterpriseId:null,
- mList: null,
- keyword:'',
- },
- onLoad(options) {
- this.data.enterpriseId=options.enterpriseId
- },
- onShow(){
- this.getPatrolPointList()
- },
- getPatrolPointList() {
- let obj = new Object()
- // obj.pageNum = this.data.pageNum
- // obj.busEnterpriseName = ""
- // obj.pageSize = 10
- // obj.reasonable = true
- obj.busEnterpriseId=this.data.enterpriseId
- obj.searchValue=this.data.keyword
- // obj.searchFrom='app'
- http.send_get("/system/AppPatrolstationController/getPatrolstationList", obj, this.getPatrolPointListSuccess)
- },
- getPatrolPointListSuccess(res) {
- if(res.code==200){
- this.setData({
- mList: res.data
- })
- }
- },
- // 搜索结果跳页
- bindViewSearchEnd() {
- // wx.navigateTo({
- // url: '../xunchawu/xunchawu'
- // })
- this.getPatrolPointList();
- },
- bindViewInputSearch(e){
- this.data.keyword= e.detail.value
- },
- // bindViewSearchEnd(e){
- // let isrisk = e.currentTarget.dataset.isrisk
- // let buslogid = e.currentTarget.dataset.buslogid
- // if(isrisk == 0){
- // wx.showToast({
- // title: '没有发现安全隐患,请放心!!',
- // icon: "none"
- // })
- // }else{
- // console.log(isrisk,"####",buslogid)
- // wx.navigateTo({
- // url: '../xunjianmore/xunjianmore?buslogid='+buslogid
- // })
- // }
-
- // },
- bindViewAddPatrol(){
- wx.navigateTo({
- url: '../new_patrol_point/new_patrol_point?enterpriseId='+this.data.enterpriseId
- })
- },
- bindViewToDetails(e){
- let id = e.currentTarget.dataset.id
-
- wx.navigateTo({
- url: '../xungengdetails/xungengdetails?id='+ id,
- })
- }
-
- })
|