xunjianmore.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. enterpriseId:null,
  18. },
  19. onLoad(e) {
  20. this.data.buslogid = e.buslogid
  21. this.data.enterpriseId=e.busEnterpriseId
  22. let obj = new Object()
  23. obj.busLogId = this.data.buslogid
  24. http.post("/system/AppXunjianimgController/getXunjianimgList", obj, this.getXunjianMoreListSuccess)
  25. },
  26. onShow(){
  27. let pages = getCurrentPages();
  28. let currPage = pages[pages.length - 1];
  29. this.data.isRefresh = currPage.data.isRefresh;
  30. if (this.data.isRefresh) {
  31. let obj = new Object()
  32. obj.busLogId = this.data.buslogid
  33. http.post("/system/AppXunjianimgController/getXunjianimgList", obj, this.getXunjianMoreListSuccess)
  34. }
  35. },
  36. getXunjianMoreListSuccess(res){
  37. console.log("!!",res)
  38. this.setData({
  39. pictureBasePath: res.data.pictureBasePath + "/",
  40. mapdata: res.data.xunjianimgMap,
  41. isHave_xqzgtzs: res.data.isHave_xqzgtzs,
  42. isHave_fcyjtzs: res.data.isHave_fcyjtzs,
  43. })
  44. },
  45. bindViewZhengGaiJinDu(e) {
  46. let businspectionid = e.currentTarget.dataset.businspectionid
  47. let itemsTypeValue=e.currentTarget.dataset.typevalue
  48. if(itemsTypeValue==null){
  49. wx.showToast({
  50. title: '没有发现安全隐患,请放心!!',
  51. icon: "none"
  52. })
  53. }else{
  54. wx.navigateTo({
  55. url: '../zhenggaijindu/zhenggaijindu?busInspectionId=' + businspectionid + "&buslogId=" + this.data.buslogid,
  56. })
  57. }
  58. },
  59. // 按钮显示隐藏
  60. shghnn: function () {
  61. this.setData({
  62. hiddenName: !this.data.hiddenName
  63. })
  64. },
  65. bindViewXqzgDetail(){
  66. wx.navigateTo({
  67. url: '../xqzgdetail/xqzgdetail?logId='+this.data.buslogid,
  68. })
  69. },
  70. bindViewFcDetail(){
  71. wx.navigateTo({
  72. url: '../fcdetail/fcdetail?logId='+this.data.buslogid,
  73. })
  74. },
  75. // 跳转限期整改告知书
  76. bindViewXqZgGzS() {
  77. wx.navigateTo({
  78. url: '../xqzggzs/xqzggzs?logId=' + this.data.buslogid,
  79. })
  80. },
  81. //补充告知书
  82. bindViewAddGzs(){
  83. //有限期整改的东西,去通知书页面
  84. wx.navigateTo({
  85. url: '../xqzggzs2/xqzggzs2?logId=' + this.data.buslogid + "&busEnterpriseId=" + this.data.enterpriseId,
  86. })
  87. }
  88. })