xunjianmore.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // pages/xunjianmore/xunjianmore.js
  2. import http from '../../base/httputil'
  3. const app = getApp()
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. host: app.globalData.host,
  10. buslogid: null,
  11. mapdata: null,
  12. pictureBasePath: null,
  13. hiddenName: true,
  14. isHave_xqzgtzs: false,
  15. isHave_fcyjtzs: false,
  16. isRefresh: false,
  17. },
  18. onLoad(e) {
  19. this.initData(e)
  20. },
  21. onShow() {
  22. console.log("!!!!", this.data.buslogid)
  23. let pages = getCurrentPages();
  24. let currPage = pages[pages.length - 1];
  25. this.data.isRefresh = currPage.data.isRefresh;
  26. console.log("!@!@!@", this.data.isRefresh)
  27. if (this.data.isRefresh) {
  28. this.setData({
  29. mapdata: null,
  30. pictureBasePath: null,
  31. hiddenName: true,
  32. isHave_xqzgtzs: false,
  33. isHave_fcyjtzs: false,
  34. isRefresh: false,
  35. })
  36. let obj = new Object()
  37. obj.busLogId = this.data.buslogid
  38. http.post("/system/AppXunjianimgController/getXunjianimgList", obj, this.getXunjianMoreListSuccess)
  39. }
  40. },
  41. initData(e) {
  42. let buslogid = e.buslogid
  43. this.data.buslogid = buslogid
  44. console.log("####", this.data.buslogid)
  45. let obj = new Object()
  46. obj.busLogId = this.data.buslogid
  47. http.post("/system/AppXunjianimgController/getXunjianimgList", obj, this.getXunjianMoreListSuccess)
  48. },
  49. getXunjianMoreListSuccess(res) {
  50. console.log("@@@@@", res)
  51. this.setData({
  52. pictureBasePath: res.data.pictureBasePath + "/",
  53. mapdata: res.data.xunjianimgMap,
  54. isHave_xqzgtzs: res.data.isHave_xqzgtzs,
  55. isHave_fcyjtzs: res.data.isHave_fcyjtzs,
  56. })
  57. },
  58. bindViewZhengGaiJinDu(e) {
  59. let businspectionid = e.currentTarget.dataset.businspectionid
  60. console.log("more:", businspectionid)
  61. console.log("more:", this.data.buslogid)
  62. wx.navigateTo({
  63. url: '../zhenggaijindu/zhenggaijindu?busInspectionId=' + businspectionid + "&buslogId=" + this.data.buslogid,
  64. })
  65. },
  66. // 按钮显示隐藏
  67. shghnn: function () {
  68. this.setData({
  69. hiddenName: !this.data.hiddenName
  70. })
  71. },
  72. // 跳转整改进度
  73. bindViewXqZgGzS() {
  74. wx.navigateTo({
  75. url: '../xqzggzs/xqzggzs?logId=' + this.data.buslogid,
  76. })
  77. },
  78. })