Bläddra i källkod

Merge branch 'master' of http://121.37.83.100:3000/sooka_edyj/sooka_edyj_minapp

menc 2 år sedan
förälder
incheckning
b97c21946d

+ 24 - 4
pages/xunjianimg/xunjianimg.js

@@ -13,21 +13,28 @@ Page({
   },
   },
   getXunjianimgListSuccess(res){
   getXunjianimgListSuccess(res){
     console.log("@@@@@",res)
     console.log("@@@@@",res)
+   
     this.setData({
     this.setData({
       pictureBasePath : res.data.pictureBasePath+"/",
       pictureBasePath : res.data.pictureBasePath+"/",
-      mapdata : res.data.xunjianimgMap
+      mapdata : res.data.xunjianimgMap,
+    
     })
     })
   },
   },
   bindViewZhengGaiJinDu(e){
   bindViewZhengGaiJinDu(e){
+   
     let businspectionid = e.currentTarget.dataset.businspectionid
     let businspectionid = e.currentTarget.dataset.businspectionid
+    let logId=e.currentTarget.dataset.buslogid
+    console.log("@@@@",logId)
     wx.navigateTo({
     wx.navigateTo({
-      url: '../zhenggaijindu/zhenggaijindu?busInspectionId='+businspectionid,
+      url: '../zhenggaijindu/zhenggaijindu?busInspectionId='+businspectionid+ "&buslogId=" + logId,
     })
     })
   },
   },
   data: {
   data: {
     host: app.globalData.host,
     host: app.globalData.host,
     mapdata : null,
     mapdata : null,
-    pictureBasePath : null
+    pictureBasePath : null,
+    isRefresh: false,
+    buslogid:''
   },
   },
 
 
   /**
   /**
@@ -48,7 +55,20 @@ Page({
    * 生命周期函数--监听页面显示
    * 生命周期函数--监听页面显示
    */
    */
   onShow() {
   onShow() {
-
+    
+    let pages = getCurrentPages();
+    let currPage = pages[pages.length - 1];
+    this.data.isRefresh = currPage.data.isRefresh;
+    console.log("!@!@!@", this.data.isRefresh)
+    if (this.data.isRefresh) {
+
+      this.setData({
+        mapdata : null,
+        pictureBasePath : null,
+        isRefresh: false
+      })
+      this.getXunjianimgList()
+    }
   },
   },
 
 
   /**
   /**

+ 1 - 1
pages/xunjianimg/xunjianimg.wxml

@@ -6,7 +6,7 @@
       <text class="iconfont icon-dian"></text>
       <text class="iconfont icon-dian"></text>
       <text class="nav_text2">{{value[0][1]}}</text>
       <text class="nav_text2">{{value[0][1]}}</text>
     </view>
     </view>
-    <view class="txt_vi" bindtap="bindViewZhengGaiJinDu" wx:for="{{value[1]}}" data-businspectionid="{{item.busInspectionId}}">
+    <view class="txt_vi" bindtap="bindViewZhengGaiJinDu" wx:for="{{value[1]}}" data-businspectionid="{{item.busInspectionId}}" data-buslogId="{{item.busLogId}}">
       <view class="txt flex_row">
       <view class="txt flex_row">
         <image src="{{pictureBasePath+item.attachUrl}}" />
         <image src="{{pictureBasePath+item.attachUrl}}" />
         <view class="txt_wz">
         <view class="txt_wz">

+ 13 - 16
pages/zhenggaijindu/zhenggaijindu.js

@@ -23,34 +23,29 @@ Page({
       pictureBasePath: res.pictureBasePath,
       pictureBasePath: res.pictureBasePath,
       zgjdList: res.zgjdList
       zgjdList: res.zgjdList
     })
     })
+    if (res.zgjdList.length > 0 && res.zgjdList[0].riskStatus == "risk_status_2") {
+
+      this.setData({
+        hidden: false
+      })
+    }
   },
   },
 
 
   bindPickerChange: function (e) {
   bindPickerChange: function (e) {
-    //let nume=e.detail.value
-    console.log('picker发送选择改变,携带值为',parseInt(nume)+1)
+    let nume = e.detail.value
+    console.log('picker发送选择改变,携带值为', parseInt(nume) + 1)
 
 
     let obj = new Object();
     let obj = new Object();
     obj.busInspectionId = this.data.busInspectionId
     obj.busInspectionId = this.data.busInspectionId
     obj.logId = this.data.buslogId
     obj.logId = this.data.buslogId
-    obj.lat_day = parseInt(nume)+1
+    obj.lat_day = parseInt(nume) + 1
+
     http.send_post("/system/AppXunjianController/changeInspection", obj, this.getChangeSuccess);
     http.send_post("/system/AppXunjianController/changeInspection", obj, this.getChangeSuccess);
   },
   },
   getChangeSuccess(res) {
   getChangeSuccess(res) {
     console.log("&&&&", res)
     console.log("&&&&", res)
     if (res.code == 200) {
     if (res.code == 200) {
       this.setData({
       this.setData({
-        index: e.detail.value,
-        // isRefreshUP: true
-      })
-
-      this.getZhenggaijindu(this.data.busInspectionId)
-
-    }
-  },
-  getChangeSuccess2(res) {
-    console.log("&&&&", res)
-    if (res.code == 200) {
-      this.setData({
         //index: e.detail.value,
         //index: e.detail.value,
         isRefreshUP: true
         isRefreshUP: true
       })
       })
@@ -59,11 +54,13 @@ Page({
 
 
     }
     }
   },
   },
+
   /**
   /**
    * 页面的初始数据
    * 页面的初始数据
    */
    */
   data: {
   data: {
     host: app.globalData.host,
     host: app.globalData.host,
+    hidden: true,
     pictureBasePath: null,
     pictureBasePath: null,
     zgjdList: null,
     zgjdList: null,
     isRefreshUP: false,
     isRefreshUP: false,
@@ -154,7 +151,7 @@ Page({
           obj.busInspectionId = this.data.busInspectionId
           obj.busInspectionId = this.data.busInspectionId
           obj.logId = this.data.buslogId
           obj.logId = this.data.buslogId
           obj.riskStatus = "risk_status_2"
           obj.riskStatus = "risk_status_2"
-          http.send_post("/system/AppXunjianController/changeInspection", obj, this.getChangeSuccess2);
+          http.send_post("/system/AppXunjianController/changeInspection", obj, this.getChangeSuccess);
         }
         }
       }
       }
     })
     })

+ 1 - 1
pages/zhenggaijindu/zhenggaijindu.wxml

@@ -16,7 +16,7 @@
       </view>
       </view>
     </view>
     </view>
   </view>
   </view>
-  <view class="btm_btn">
+  <view class="btm_btn" hidden='{{!hidden}}'>
     <view class="time_qx">
     <view class="time_qx">
     
     
       <view class="ttbtn">
       <view class="ttbtn">