roose 4 anni fa
parent
commit
b2615f0a4a

+ 2 - 1
app.json

@@ -1,7 +1,8 @@
 {
   "pages": [
-    "pages/index/index",
     "pages/visitandinfo/visitandinfo",
+    "pages/index/index",
+   
     "pages/idCard/idCard",
     "pages/updatepassword/updatepassword",
     "pages/notice/notice",

+ 4 - 4
pages/finishInfo/finishInfo.wxml

@@ -1,4 +1,4 @@
-<view>
+<view class="home">
 	<view class="title" bindtap="goOcr">
 		<image src="/images/saoma.png" style="width: 40rpx; height: 40rpx;"></image>
 		<view class="saoma">
@@ -34,7 +34,7 @@
 				<view class="small-box">职务</view>
 				<picker bindchange="postListChange" name="ensure_id" value="{{postList[postindex].name}}" range-key="{{'name'}}" range="{{postList}}">
 					<view class="picker">
-						{{postList[postindex].name}} <text >{{posttext}}</text>
+						{{postList[postindex].name}} <text class="wenzi">{{posttext}}</text>
 					</view>
 				</picker>
 			</view>
@@ -42,7 +42,7 @@
 				<view class="small-box">收入</view>
 				<picker bindchange="incomeListChange" name="ensure_id" value="{{incomeList[incomeindex].name}}" range-key="{{'name'}}" range="{{incomeList}}">
 					<view class="picker">
-						{{incomeList[incomeindex].name}} <text >{{incometext}}</text>
+						{{incomeList[incomeindex].name}} <text class="wenzi">{{incometext}}</text>
 					</view>
 				</picker>
 			</view>
@@ -51,7 +51,7 @@
 				<view class="small-box">学历</view>
 				<picker bindchange="educationListChange" name="ensure_id" value="{{educationList[educationindex].name}}" range-key="{{'name'}}" range="{{educationList}}">
 					<view class="picker">
-						{{educationList[educationindex].name}} <text >{{educationtext}}</text>
+						{{educationList[educationindex].name}} <text class="wenzi">{{educationtext}}</text>
 					</view>
 				</picker>
 			</view>

+ 8 - 1
pages/finishInfo/finishInfo.wxss

@@ -57,4 +57,11 @@ button:not([size='mini']) {
 }
 radio:last-child {
   margin-left: 20rpx;
-}
+}
+
+.wenzi {
+  color: #808080;
+}
+.home {
+  font-size: 28rpx;
+}

+ 27 - 3
pages/visitandinfo/visitandinfo.js

@@ -2,7 +2,7 @@ const app = require('../../utils/util.js');
 Page({
   data: {
     logs: [],
-    currentTabIndex: 1,
+    currentTabIndex: 0,
     select_all: false,
     listData: [{
         code: "1",
@@ -21,7 +21,8 @@ Page({
     active: 0,
     show: false,
     infos: {},
-    photos: []
+    photos: [],
+    scrollHeight:'',
   },
   onTabsItemTap: function (event) {
     let index = event.currentTarget.dataset.index;
@@ -71,7 +72,11 @@ Page({
       show: false
     });
   },
-
+  //删除
+  deletes(){
+   console.log("ssss");
+   
+  },
   //全选与反全选
   selectall: function (e) {
     console.log(e)
@@ -176,10 +181,29 @@ Page({
       }
     })
   },
+  computeScrollViewHeight() {
+    let that = this
+    let query = wx.createSelectorQuery().in(this)
+    query.select('.zizi').boundingClientRect()
+    query.select('.delete-box').boundingClientRect()
+    query.exec(res => {
+      let searchHeight = res[0].height
+      let titleHeight = res[1].height
+      let windowHeight = wx.getSystemInfoSync().windowHeight
+      let scrollHeight = windowHeight - searchHeight - titleHeight - 30 - 5 - 50 
+     
+      console.log(titleHeight,"高度0");
+      console.log(searchHeight,"高度1");
+      console.log(windowHeight,"高度222");
+      console.log(scrollHeight,"最重高度");
+      this.setData({ scrollHeight: scrollHeight})
+    })
+  },
 
   onLoad() {
     this.oldInfo();
     this.visitInfo();
+    this.computeScrollViewHeight();
   },
   onShow() {
     console.log(wx.getStorageSync('user'), "打印");

+ 27 - 25
pages/visitandinfo/visitandinfo.wxml

@@ -22,32 +22,34 @@
 						<van-tab title="审核失败"></van-tab>
 					</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" style="border-bottom: unset; ">
-							<checkbox bindtap="selectall" />
-						</view>
-						<view class="th" style="border-bottom: unset;">姓名</view>
-						<view class="th " style="border-bottom: unset;  margin-left: 100rpx;">保存时间</view>
-						<view class="th" style="border-bottom: unset;">状态</view>
-					</view>
-					<checkbox-group bindchange="checkboxChange">
-						<view class="tr" wx:for="{{listData}}" wx:key="">
-							<view class="td td22">
-								<checkbox disabled="{{item.status == '3'}}" value="{{item.id}}" checked="{{item.checked}}" />
+					<scroll-view class="center" scroll-y="true" style='height: {{scrollHeight + "rpx"}}'>
+						<view class="tr" style=" border-bottom: 1px solid #dadada; padding-bottom: 15rpx;">
+							<view class="td td22" style="border-bottom: unset; ">
+								<checkbox bindtap="selectall" />
 							</view>
-							<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>
-							</view>
-							<view class="td" value="{{item.text}}">{{time.formatDate(item.time)}}</view>
-							<view class="td status" wx:if="{{item.status == '1'}}" style="color: #67C23A">填全未审</view>
-							<view class="td status" wx:if="{{item.status == '0'}}" style="color: #F56C6C">未完成</view>
-							<view class="td status" wx:if="{{item.status == '2'}}" style="color: #909399">审核中</view>
-							<view class="td status" wx:if="{{item.status == '3'}}" style="color: #409EFF">审核完成</view>
-							<view class="td status" wx:if="{{item.status == '4'}}" style="color: #E6A23C">审核失败</view>
+							<view class="th" style="border-bottom: unset;">姓名</view>
+							<view class="th " style="border-bottom: unset;  margin-left: 100rpx;">保存时间</view>
+							<view class="th" style="border-bottom: unset;">状态</view>
 						</view>
-					</checkbox-group>
+						<checkbox-group bindchange="checkboxChange">
+							<view class="tr" wx:for="{{listData}}" wx:key="">
+								<view class="td td22">
+									<checkbox disabled="{{item.status == '3'}}" value="{{item.id}}" checked="{{item.checked}}" />
+								</view>
+								<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>
+								</view>
+								<view class="td" value="{{item.text}}">{{time.formatDate(item.time)}}</view>
+								<view class="td status" wx:if="{{item.status == '1'}}" style="color: #67C23A">填全未审</view>
+								<view class="td status" wx:if="{{item.status == '0'}}" style="color: #F56C6C">未完成</view>
+								<view class="td status" wx:if="{{item.status == '2'}}" style="color: #909399">审核中</view>
+								<view class="td status" wx:if="{{item.status == '3'}}" style="color: #409EFF">审核完成</view>
+								<view class="td status" wx:if="{{item.status == '4'}}" style="color: #E6A23C">审核失败</view>
+							</view>
+						</checkbox-group>
+					</scroll-view>
 				</view>
 				<view hidden='{{currentTabIndex != 1}}'>
 					<view class="zizi">共<text class="number">{{list.length}}</text>条探访数据</view>
@@ -99,7 +101,7 @@
 
 
 				</view>
-
+				<view wx:if='{{currentTabIndex != 1}}' class="delete-box" bindtap="deletes">删除</view>
 			</view>
 		</view>
 

+ 18 - 0
pages/visitandinfo/visitandinfo.wxss

@@ -172,4 +172,22 @@ checkbox .wx-checkbox-input {
 
 .tanfang {
   margin: 30rpx 0;
+}
+
+.delete-box {
+   margin-top: 10rpx;
+    background-color: #F56C6C;
+    width: 100%;
+    text-align: center;
+    color:white;
+    padding: 10rpx 0;
+}
+.scroll {
+  flex: 1;
+  overflow: scroll;
+}
+
+.center {
+  text-align: center;
+  height: 100%;
 }