123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- 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
- let delFlag = e.currentTarget.dataset.delflag
- if (delFlag != null && delFlag != '') {
- wx.showToast({
- title: '该巡更点已废弃',
- icon: 'none'
- })
- } else {
- wx.navigateTo({
- url: '../xungengdetails/xungengdetails?id=' + id,
- })
- }
- }
- })
|