zhanghongrui 2 năm trước cách đây
mục cha
commit
fd87c8bc20

+ 1 - 1
pages/denglu/denglu.wxml

@@ -21,5 +21,5 @@
       <!-- <button type="" class="qx_btn">取消</button> -->
     </view>
   </view>
-  <view class="btm_tit">长春市二道应急局</view>
+  <!-- <view class="btm_tit">长春市二道应急局</view> -->
 </view>

+ 3 - 3
pages/details/details.js

@@ -71,9 +71,9 @@ Page({
   },
   //巡更点跳转
   xungengList(){
-wx.showToast({
-  title: '巡更点跳转',
-})
+    wx.navigateTo({
+      url: '../patrol_list/patrol_list',
+    })
   },
   //导航
   navRoad(event) {

+ 97 - 1
pages/new_patrol_point/new_patrol_point.js

@@ -1,10 +1,27 @@
+
 // pages/new_patrol_point/new_patrol_point.js
+
+import http from '../../base/httputil'
+const app = getApp()
+
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
+    host: app.globalData.host,
+    enterpriseId: null,
+    details: {
+      id: null,
+      longitude: Number,
+      latitude: Number,
+      name: null,
+      code: null,
+      address: null,
+    },
+
+
 
   },
 
@@ -13,8 +30,71 @@ Page({
    */
   onLoad(options) {
 
+
+
+    this.enterpriseId = options.id
+    // this.getDetails()
   },
 
+  // getDetails() {
+  //   let obj = new Object();
+  //   obj.id = this.id
+  //   http.post("/system/AppEnterpriseController/getEnterpriseDetails", obj, this.getEnterpriseDetailsSuccess)
+  // },
+  // getEnterpriseDetailsSuccess(res) {
+  //   this.setData({
+  //     enterpriseDetails: res.enterpriseDetails,
+  //   })
+  // },
+  //-----------------------------------------
+  bindInputName(e) {
+    this.data.details.name = e.detail.value
+  },
+  bindInputAddress(e) {
+    this.data.details.address = e.detail.value
+  },
+  bindInputCode(e) {
+    this.data.details.code = e.detail.value
+  },
+
+  //------------------------------------------
+
+  updateDetails() {
+    let obj = new Object();
+    obj.enterpriseId = this.data.details.enterpriseId
+    obj.name = this.data.details.name
+    obj.address = this.data.details.address
+    obj.code = this.data.details.code
+    
+    // http.post("/system/AppEnterpriseController/updateEnterprise", obj, this.updateDetailsSuccess)
+  },
+  updateDetailsSuccess(res) {
+    wx.showToast({
+      title: res.msg,
+    })
+    if(res.code == 200){
+      wx.navigateBack()
+      // wx.navigateTo({
+        // url: '../details/details?busEnterpriseId=' + this.busEnterpriseId,
+      // })
+    }
+  },
+  deletePatrolPoint() {
+    // let obj = new Object();
+    // obj.busEnterpriseId = this.data.enterpriseDetails.busEnterpriseId
+    // http.post("/system/AppEnterpriseController/deleteEnterprise", obj, this.deleteEnterpriseSuccess)
+  },
+  // deleteEnterpriseSuccess(res) {
+  //   wx.showToast({
+  //     title: res.msg,
+  //   })
+  //   if(res.code == 200){
+  //     wx.navigateTo({
+  //       url: '../qiye/qiye'
+  //     })
+  //   }
+  // },
+
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
@@ -62,5 +142,21 @@ Page({
    */
   onShareAppMessage() {
 
-  }
+
+  },
+  
+  getLocation() {
+    let that = this
+    wx.getLocation({
+      type: 'wgs84', //返回可以用于wx.openLocation的经纬度
+      success: function (res) {
+        that.setData({
+          details: {
+            longitude: res.longitude,
+            latitude: res.latitude
+          }
+        })
+      },
+    })
+  },
 })

+ 9 - 1
pages/new_patrol_point/new_patrol_point.json

@@ -1,3 +1,11 @@
 {
-  "usingComponents": {}
+
+  
+  "usingComponents": {},
+
+
+  "navigationBarBackgroundColor": "#f94b0e",
+  "navigationBarTextStyle": "white",
+  "navigationBarTitleText": "新增巡更点"
+
 }

+ 33 - 1
pages/new_patrol_point/new_patrol_point.wxml

@@ -1,2 +1,34 @@
+
 <!--pages/new_patrol_point/new_patrol_point.wxml-->
-<text>pages/new_patrol_point/new_patrol_point.wxml</text>
+
+<!-- 巡更点新增页面 -->
+<view class="container">
+  <view class="page-section">
+    <!-- <view class="input_vi">
+      <view class="input_title">经度</view>
+      <input class="inp_txt" bindtap="getLocation" value="{{details.longitude}}" auto-focus placeholder="点击获取当前位置" disabled="true" />
+    </view>
+    <view class="input_vi">
+      <view class="input_title">纬度</view>
+      <input class="inp_txt" value="{{details.latitude}}" placeholder="点击获取当前位置"disabled="true" />
+    </view> -->
+    <view class="input_vi">
+      <view class="input_title">巡更点名称</view>
+      <input class="inp_txt" bindinput="bindInputName" value="{{details.name}}"  placeholder="请输入巡更点名称"/>
+    </view>
+    <view class="input_vi">
+      <view class="input_title">巡更点编号</view>
+      <input class="inp_txt" bindinput="bindInputCode" value="{{details.code}}"  placeholder="请输入巡更点编号"/>
+    </view>
+    <view class="input_vi">
+      <view class="input_title">巡更点地址</view>
+      <input class="inp_txt" bindinput="bindInputAddress" value="{{details.address}}"  placeholder="请输入巡更点地址"/>
+    </view>
+  </view>
+
+  <view class="table_btn">
+    <button type="primary" class="tj_btn" bindtap="updateDetails">提交</button>
+  </view>
+
+</view>
+

+ 53 - 1
pages/new_patrol_point/new_patrol_point.wxss

@@ -1 +1,53 @@
-/* pages/new_patrol_point/new_patrol_point.wxss */
+
+/* pages/new_patrol_point/new_patrol_point.wxss */
+
+.container{
+  padding: 30rpx 30rpx;
+}
+.page-section{
+  display: flex;
+  flex-direction: column;
+}
+.input_vi{
+  display: block;
+  border-bottom: 1px solid #f3f3f3;
+  height: 100rpx;
+  margin-bottom: 20rpx;
+}
+.input_vi .input_title{
+  font-size: 34rpx;
+  height: 100rpx;
+  line-height: 100rpx;
+  color: #181818;
+  float: left;
+}
+.input_vi input{
+  border:0px;
+  height: 100rpx;
+  line-height: 100rpx;
+ padding-left: 20rpx;
+ border-radius: 10rpx;
+ font-size: 34rpx;
+ color: #555;
+ text-align: right;
+}
+.input-placeholder, .input-placeholder-dark{
+ color: #c5c5c5!important;
+}
+.table_btn{
+  display: flex;
+  flex-direction: row;
+}
+.sc_btn{
+  width: 30%!important;
+  font-size: 32rpx;
+  margin: 60rpx auto;
+padding: 24rpx 0px!important;
+}
+.tj_btn{
+  width: 60%!important;
+  font-size: 32rpx;
+  margin: 60rpx auto;
+  padding: 24rpx 0px!important;
+}
+

+ 57 - 47
pages/patrol_list/patrol_list.js

@@ -1,66 +1,76 @@
-// pages/patrol_list/patrol_list.js
-Page({
 
-  /**
-   * 页面的初始数据
-   */
-  data: {
+// pages/patrol_list/patrol_list.js
 
-  },
 
+import http from '../../base/httputil'
+const app = getApp()
+Page({
   /**
-   * 生命周期函数--监听页面加载
+   * 组件的初始数据
    */
-  onLoad(options) {
-
+  data: {
+    host: app.globalData.host,
+    mList: null,
   },
 
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
+  onLoad() {
+    this.getPatrolPointList()
   },
 
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
+  getPatrolPointList() {
+    let obj = new Object()
+    obj.pageNum = this.data.pageNum
+    obj.busEnterpriseName = ""
+    obj.pageSize = 10
+    obj.reasonable = true
+    // http.send_get("/system/AppXunchaController/getXunchaList", obj, this.getPatrolPointListSuccess)
   },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
+  getPatrolPointListSuccess(res) {
+    console.log("@@@@",res)
+    if(res.code==200){
+       this.setData({
+        mList: res.data.rows
+       })
+    }
+   
   },
 
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
 
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
 
+  // 搜索结果跳页
+  bindViewSearchEnd() {
+    // wx.navigateTo({
+      // url: '../xunchawu/xunchawu'
+    // })
   },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
+  // 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'
+    })
   },
+  bindViewToDetails(e){
+    let id = e.currentTarget.dataset.id
 
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
+    wx.navigateTo({
+      url: '../xungengdetails/xungengdetails?id='+ id,
+    })
   }
+ 
+
 })

+ 10 - 1
pages/patrol_list/patrol_list.json

@@ -1,3 +1,12 @@
 {
-  "usingComponents": {}
+
+
+
+  "component": true, 
+  "usingComponents": {},
+  "navigationBarBackgroundColor": "#f94b0e",
+  "navigationBarTextStyle": "white",
+  "navigationBarTitleText": "巡更点列表"
+ 
+
 }

+ 42 - 1
pages/patrol_list/patrol_list.wxml

@@ -1,2 +1,43 @@
+
 <!--pages/patrol_list/patrol_list.wxml-->
-<text>pages/patrol_list/patrol_list.wxml</text>
+
+<view class="container">
+  <!-- 搜索 -->
+  <view class="search-container" bindtap="bindViewSearchEnd" >
+    <view class="search-left">
+      <input type="text" placeholder="搜索"  />
+    </view>
+    <button class="search-right">
+      <text class="iconfont icon-sousuo"></text>
+    </button>
+  </view>
+  
+  <!-- 列表 -->
+  <view class="list_vi">
+    <!--循环本行-->
+    <!-- <i class="iconfont icon-wushuju zwsj"></i>
+  <text class="zwsj_text">暂无数据</text> -->
+    <view class="list_li flex-c"  wx:for="{{xunchaList}}" wx:key="index"
+    bindtap="bindViewToDetails" data-buslogid="{{item.id}}">
+      <view class="list_li_1">
+        <!-- <i class="list_icon iconfont icon-queding" wx:if="{{item.isRisk != 1}}"></i> -->
+        <!-- <i class="list_icon iconfont icon-yingjipingtai" wx:if="{{item.isRisk == 1}}"></i> -->
+        <text>[{{item.busLogTypeLabel}}]{{item.busEnterpriseName}}</text>
+        <i class="iconfont icon-xiangyou list_right"></i>
+      </view>
+      <view class="list_li_2">
+        <text class="time-text">{{item.deptName}}</text>
+        <text class="time-text">{{item.nickName}}</text>
+        <text class="time-text">{{item.createTime}}</text>
+      </view>
+      <!-- <view class="line2"></view> -->
+    </view>
+    <!--bindmenuItemClick为按钮点击的时候的回调方法  mainmodel是显示的按钮,menulist为折叠的菜单的数组数据-->
+    <!-- <menu bindmenuItemClick="menuItemClick" mainmodel="{{mainmodel}}" menulist="{{menulist}}"></menu> -->
+
+  </view>
+
+  <!-- 巡检悬浮按钮 -->
+  <view class="float_btn iconfont icon-jiahao" bindtap="bindViewAddPatrol"></view>
+</view>
+

+ 61 - 1
pages/patrol_list/patrol_list.wxss

@@ -1 +1,61 @@
-/* pages/patrol_list/patrol_list.wxss */
+
+/* pages/patrol_list/patrol_list.wxss */
+
+
+.qy_con{
+  display: flex;
+  flex-direction: row;
+  justify-content:space-around;
+  text-align: center;
+  margin: 30rpx 30rpx;
+}
+.qy_con view{
+height: 140rpx;
+color: #fff;
+display: flex;
+flex-direction: column;
+padding: 15rpx 40rpx;
+position: relative;
+}
+.qy_con view image{
+  position: absolute;
+  top:0px;
+  left: 0px;
+  width: 100%;
+  height: 100%;
+  z-index: -1;
+  }
+.qy_con view h2{
+  font-size: 58rpx;
+  font-weight: bolder;
+  padding-top: 10rpx;
+  }
+  .qy_con view p{
+    font-size: 35rpx;
+    }
+
+  .flex-c{
+    display: flex;
+    flex-direction: column !important;
+  }
+  .list_li_1, .list_li_2{
+    display: flex;
+  }
+  .list_li_2 .time-text{
+    display: block;
+    font-size: 28rpx !important;
+    color: rgb(168, 168, 168) !important;
+    margin-right: 20rpx;
+}
+.list_li_2 .time-text:nth-child(1){
+    margin-left: 55rpx;
+}
+.list_vi .list_li{
+  display: flex;
+  flex-direction: row;
+  height: auto !important;
+  line-height: 60rpx;
+  padding-bottom: 10rpx;
+}
+  
+

+ 1 - 1
project.private.config.json

@@ -1,7 +1,7 @@
 {
   "projectname": "sooka_edyj_minapp",
   "setting": {
-    "compileHotReLoad": false,
+    "compileHotReLoad": true,
     "urlCheck": false
   },
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",