roose 4 年之前
父節點
當前提交
e069b63a1c

+ 1 - 4
app.json

@@ -2,17 +2,14 @@
   "pages": [
     "pages/index/index",
     "pages/visitandinfo/visitandinfo",
-    
+    "pages/idCard/idCard",
     "pages/updatepassword/updatepassword",
- 
     "pages/notice/notice",
     "pages/login/login",
-  
     "pages/card/card",
     "pages/paiming/paiming",
     "pages/personInfo/personInfo",
     "pages/finishInfo/finishInfo",
-   
     "pages/collectInfo/collectInfo"
   ],
   "window": {

+ 17 - 2
pages/personInfo/personInfo.js

@@ -1,7 +1,7 @@
 const app = require('../../utils/util.js');
 Page({
   data: {
-
+    info:{},
   },
   wanshan() {
     wx.navigateTo({
@@ -10,7 +10,7 @@ Page({
   },
   shenfen() {
     wx.navigateTo({
-      url: '/pages/card/card',
+      url: '/pages/idCard/idCard',
     })
   },
   xiugai() {
@@ -43,6 +43,21 @@ Page({
         url: '/pages/login/login',
       })
     }
+  },
+  onLoad() {
+    wx.request({
+      url: app.globalData.publicUrl + '/sys/login/session',
+      method: "GET",
+      header: {
+        appletsId: wx.getStorageSync('openId')
+      },
+      success: (res) => {
+        console.log(res, "000");
+        this.setData({
+          info: res.data.data
+        })
+      }
+    })
   }
 
 })

+ 3 - 2
pages/personInfo/personInfo.wxml

@@ -5,10 +5,11 @@
 			<open-data type="userAvatarUrl"></open-data>
 		</view>
 		<view class="nc">
-			<open-data type="userNickName" lang="zh_CN"></open-data>
+			<!-- <open-data type="userNickName" lang="zh_CN"></open-data> -->
+			{{info.userName}}
 		</view>
 		<view class="nc" style="">
-			账号:sdsdsds
+			账号:{{info.loginName}}
 		</view>
 	</view>
 	<view class="title"  bindtap="wanshan">

+ 2 - 2
pages/personInfo/personInfo.wxss

@@ -18,7 +18,7 @@ page {
 }
 .title {
   color: #a7a7a7;
-  font-size: 26rpx;
+  font-size: 30rpx;
 }
 
 .tx {
@@ -26,7 +26,7 @@ page {
   height: 220rpx;
   border-radius: 50%;
   overflow: hidden;
-  margin-left: 40rpx;
+  margin-left: 46rpx;
 }
 
 .nc {

+ 1 - 1
pages/updatepassword/updatepassword.wxml

@@ -1,7 +1,7 @@
 <view>
 	<image src="/images/bg_main_new2.jpg" style="width: 100%; height: 380rpx;"> </image>
 	<view class="home">
-		账号:{{info.loginName}}({{info.dept5}})
+		账号:{{info.loginName}}({{info.dept5.name}})
 	</view>
 	<view class="home">
 		姓名:{{info.userName}} 手机: {{info.phone}}

+ 23 - 3
pages/visitandinfo/visitandinfo.js

@@ -2,7 +2,7 @@ const app = require('../../utils/util.js');
 Page({
   data: {
     logs: [],
-    currentTabIndex: 0,
+    currentTabIndex: 1,
     select_all: false,
     listData: [{
         code: "1",
@@ -18,7 +18,10 @@ Page({
       }
     ],
     batchIds: '', //选中的ids,
-    active: 0
+    active: 0,
+    show: false,
+    infos: {},
+    photos: []
   },
   onTabsItemTap: function (event) {
     let index = event.currentTarget.dataset.index;
@@ -53,19 +56,36 @@ Page({
 
     }
   },
+  // 探访的记录详情页面
+  visitJilu(e) {
+    console.log(e.currentTarget.dataset.infos, "000");
+    let photos = e.currentTarget.dataset.infos.visitPhoto.split(",");
+    this.setData({
+      show: true,
+      infos: e.currentTarget.dataset.infos,
+      photos: photos
+    })
+  },
+  onClickHide() {
+    this.setData({
+      show: false
+    });
+  },
 
   //全选与反全选
   selectall: function (e) {
     console.log(e)
     var that = this;
     var arr = []; //存放选中id的数组
+    console.log(that.data.listData);
+
     for (let i = 0; i < that.data.listData.length; i++) {
 
       that.data.listData[i].checked = (!that.data.select_all)
 
       if (that.data.listData[i].checked == true) {
         // 全选获取选中的值
-        arr = arr.concat(that.data.listData[i].id.split(','));
+        arr = arr.concat(that.data.listData[i]._id.split(','));
       }
     }
     console.log(arr)

+ 45 - 10
pages/visitandinfo/visitandinfo.wxml

@@ -13,7 +13,7 @@
 			</view>
 			<view class='ordert-detail'>
 				<view hidden='{{currentTabIndex != 0}}'>
-					<van-tabs active="{{ active }}" bind:change="tabsChange" color='red'>
+					<van-tabs active="{{ active }}" bind:change="tabsChange" color='#2087F7'>
 						<van-tab title="全部"></van-tab>
 						<van-tab title="填全未审"></van-tab>
 						<van-tab title="未完成"></van-tab>
@@ -23,7 +23,7 @@
 					</van-tabs>
 					<view class="zizi">共<text class="number">{{listData.length}}</text>条采集数据</view>
 					<view class="tr" style=" border-bottom: 1px solid #dadada; padding-bottom: 15rpx;">
-						<view class="th td22">
+						<view class="th td22" style="border-bottom: unset; ">
 							<checkbox bindtap="selectall" />
 						</view>
 						<view class="th" style="border-bottom: unset;">姓名</view>
@@ -31,11 +31,11 @@
 						<view class="th" style="border-bottom: unset;">状态</view>
 					</view>
 					<checkbox-group bindchange="checkboxChange">
-						<view class="tr" wx:for="{{listData}}" wx:key="" bindtap="cellClick" data-infos='{{item}}'>
+						<view class="tr" wx:for="{{listData}}" wx:key="">
 							<view class="td td22">
-								<checkbox value="{{item.id}}" checked="{{item.checked}}" />
+								<checkbox disabled="{{item.status == '3'}}" value="{{item.id}}" checked="{{item.checked}}" />
 							</view>
-							<view class="td idcard" value="{{item.text}}">
+							<view class="td idcard" value="{{item.text}}" bindtap="cellClick" data-infos='{{item}}'>
 								<view>{{item.name}}</view>
 								<view wx:if='{{item.idNumber}}' class="oldzi">({{subqian.subqian(item.idNumber)}}</view>
 								<view wx:if='{{item.idNumber}}' class="oldzi">{{subhou.subhou(item.idNumber)}})</view>
@@ -50,19 +50,54 @@
 					</checkbox-group>
 				</view>
 				<view hidden='{{currentTabIndex != 1}}'>
-					<view>共<text class="number">{{list.length}}</text>条探访数据</view>
+					<view class="zizi">共<text class="number">{{list.length}}</text>条探访数据</view>
 					<view class="table0">
-						<view class="tr0 bg-w0">
+						<view class="tr0 bg-w0" style="padding:0">
 							<view class="th0">老人姓名</view>
 							<view class="th0">探访时间</view>
 						</view>
 						<block wx:for="{{list}}" wx:key="unique">
-							<view class="tr0" bindtap="bindtap" id="{{item._id}}">
-								<view class="td0"><text>{{item.oldInfo}}</text></view>
-								<view class="td0"><text> {{time.formatDate(item.visitTime)}}</text></view>
+							<view class="tr0" bindtap="bindtap" data-infos="{{item}}" bindtap="visitJilu">
+								<view class="td0"><text>{{item.oldInfo}}<text class="oldzi">({{item.oldIdNumber}})</text></text></view>
+								<view class="td0 td11"><text> {{time.formatDate(item.visitTime)}}</text></view>
 							</view>
 						</block>
 					</view>
+					<van-overlay show="{{ show }}" bind:click="onClickHide">
+						<view class="wrapper">
+							<view class="block">
+								<view>
+									探访位置
+								</view>
+								<view class="wai-box">
+									<view>{{infos.visitLocation}}</view>
+									<view class="flex-box">
+										<view>经度:<text>{{infos.lng}}</text></view>
+										<view>纬度:<text>{{infos.lat}}</text></view>
+									</view>
+								</view>
+								<view>
+									老人姓名
+								</view>
+								<view class="pop-oldtitle">{{infos.oldInfo}}<text class="oldzi">({{infos.oldIdNumber}})</text></view>
+								<view>
+									探访情况
+								</view>
+								<view class="tanfang">
+									{{infos.visitMessage}}
+								</view>
+								<view wx:for='{{photos}}'>
+									<view class="tanfang">
+										照片{{index+1}}
+									</view>
+									<image :src="'https://info.windd.cn/collection/'+{{item}}" style="width: 150px; height: 150px;margin-top: 4%" />
+								</view>
+
+							</view>
+						</view>
+					</van-overlay>
+
+
 				</view>
 
 			</view>

+ 51 - 19
pages/visitandinfo/visitandinfo.wxss

@@ -36,7 +36,7 @@
   width: 1200rpx;
   margin-left: 0rpx;
   color: #606266;
- 
+
 }
 
 .tr {
@@ -44,10 +44,10 @@
   /* white-space: nowrap; */
   width: 100%;
   display: flex;
-  font-size: 30rpx;
+  font-size: 29rpx;
   /* text-align: center;
   justify-content: center; */
-  
+
 }
 
 .th {
@@ -56,8 +56,8 @@
   justify-content: center;
   width: 100%;
   border-bottom: 1px solid #dadada;
-  font-size: 30rpx;
-  
+  font-size: 28rpx;
+
 }
 
 
@@ -77,28 +77,20 @@
 
 
 .table0 {
-  height: 200px;
 
+  font-size: 28rpx;
 }
 
 .tr0 {
   display: flex;
   width: 100%;
   justify-content: space-between;
-
-}
-
-.td0 {
-  width: 20%;
-  justify-content: center;
-  text-align: center;
-  font-size: 26rpx;
+  border-bottom: 1px solid #dadada;
+  padding: 20rpx 0;
 }
 
 .bg-w0 {
-  /* background: snow; */
-  border-radius: 20rpx;
-  height: 130rpx;
+  border-bottom: 1rpx solid #dadada;
 }
 
 .bg-g0 {
@@ -111,7 +103,7 @@
   display: flex;
   height: 3rem;
   align-items: center;
-  font-size: 26rpx;
+
 }
 
 .number {
@@ -138,6 +130,46 @@ checkbox .wx-checkbox-input {
 }
 
 .zizi {
-  font-size: 28rpx;
+  font-size: 30rpx;
   margin: 15rpx 0;
+}
+
+.wrapper {
+  display: flex;
+  /* align-items: center;
+  justify-content: center; */
+  align-items: flex-end;
+  height: 100%;
+  font-size: 28rpx;
+}
+
+.block {
+  width: 100%;
+  height: 70%;
+  padding: 40rpx 20rpx;
+  background-color: #fff;
+  font-size: 26rpx;
+}
+
+.flex-box {
+  display: flex;
+}
+
+.pop-oldtitle {
+  background-color: #F0F9EB;
+  color: #84CD5F;
+  width: 60%;
+  box-sizing: border-box;
+  padding: 8rpx 0 8rpx 10rpx;
+  text-align: center;
+  font-size: 26rpx;
+  margin: 30rpx 0;
+}
+
+.wai-box {
+  margin: 50rpx 0;
+}
+
+.tanfang {
+  margin: 30rpx 0;
 }