Browse Source

Merge branch 'meaer' into data-page

work_tab_bar
mk 2 years ago
parent
commit
b0a1c4145c
  1. 9
      pages/work2/work2.js
  2. 4
      pages/work2/work2.wxml
  3. 143
      subpages/communitySelfInsp/pages/followUpList/followUpList.js
  4. 8
      subpages/communitySelfInsp/pages/followUpList/followUpList.json
  5. 50
      subpages/communitySelfInsp/pages/followUpList/followUpList.wxml
  6. 227
      subpages/communitySelfInsp/pages/followUpList/followUpList.wxss
  7. BIN
      subpages/communitySelfInsp/pages/image/del.png
  8. BIN
      subpages/communitySelfInsp/pages/image/downG.png

9
pages/work2/work2.js

@ -68,7 +68,7 @@ Page({
url: '../../subpages/addResi/pages/addResi/addResi', url: '../../subpages/addResi/pages/addResi/addResi',
}) })
}, },
onAddHouse(){ onAddHouseLL(){
wx.navigateTo({ wx.navigateTo({
url: '../../subpages/addhouse/pages/addhouse/addhouse', url: '../../subpages/addhouse/pages/addhouse/addhouse',
}) })
@ -85,9 +85,14 @@ Page({
}, },
onFollowUpList(){ onFollowUpList(){
wx.navigateTo({ wx.navigateTo({
url: '../../subpages/communitySelfInsp/pages/followUpList/followUpList', url: '../../subpages/communitySelfInsp/pages/followUpList/followUpList?key1=resi',
}) })
}, },
onFollowUpLi(){
wx.navigateTo({
url: '../../subpages/communitySelfInsp/pages/followUpList/followUpList?key1=house',
})
},
onMyTroubleshootDemand(){ onMyTroubleshootDemand(){
wx.navigateTo({ wx.navigateTo({
url: '../../subpages/myTroubleshootDemand/pages/index/index', url: '../../subpages/myTroubleshootDemand/pages/index/index',

4
pages/work2/work2.wxml

@ -31,10 +31,10 @@
</view> </view>
<view class="content_1"> <view class="content_1">
<view> <view>
<image src="/images/work2/add_houses.png" class="image_12-1" bind:tap="onAddHouse"></image> <image src="/images/work2/add_houses.png" class="image_12-1" bind:tap="onAddHouseLL"></image>
<text lines="1" class="text_3-0">新增房屋信息</text> <text lines="1" class="text_3-0">新增房屋信息</text>
</view> </view>
<view> <image src="/images/work2/add_record.png" class="image_13-1" bind:tap="onFollowUpList"></image> <view> <image src="/images/work2/add_record.png" class="image_13-1" bind:tap="onFollowUpLi"></image>
<text lines="1" class="text_4-0">新增记录</text> <text lines="1" class="text_4-0">新增记录</text>
</view> </view>
</view> </view>

143
subpages/communitySelfInsp/pages/followUpList/followUpList.js

@ -1,28 +1,47 @@
import {getFollowUpList} from "../../../../utils/api" // subpages/gatherInformation/pages/gatherInformation/gatherInformation.js
const app = getApp() import { $wuxCalendar } from '../../../../components/dist/index'
import {getCollect} from '../../../../utils/api'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
tableData:[], selectList:[['全部信息','居民信息采集','房屋信息采集']],
selectValue:['全部信息',''],
pageSize:10,
pageNo:1, pageNo:1,
pageSize:7, tableData:[],
lowerThreshold:'10', lowerThreshold:'10',
loadMoreVisible:false, loadMoreVisible:false,
loadMoreType: "none", loadMoreType: "none",
nodata:false nodata:false,
visible:false,
typeVal:'',
collectType:'',
newType:'',
form:{
type: "",
collectType: "",
collectStartDate: "",
collectEndDate: ""
}
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.setData({ console.log("123123",options.key1)
satisfactionCategory:options.category, this.setData({
inspRecordId:options.inspRecordId, newType: options.key1
createdBy:app.globalData.user.id });
let title = options.key1 == 'resi'?'新增居民记录':'新增房屋记录'
wx.setNavigationBarTitle({
title: title
}) })
this.getCollect()
}, },
/** /**
@ -36,11 +55,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.setData({
pageNo:1,
tableData:[]
})
this.getFollowUpList()
}, },
/** /**
@ -70,29 +85,43 @@ Page({
onReachBottom() { onReachBottom() {
}, },
onScrollToLower(e){
if (this.data.loadMoreType === 'more') { /**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
openCalendar2() {
console.log(123)
$wuxCalendar().open({
value: this.data.value2,
multiple: true,
onChange: (values, displayValues) => {
console.log('onChange', values, displayValues)
this.setData({ this.setData({
loadMoreVisible: true, 'form.collectStartDate': displayValues[0],
'form.collectEndDate': displayValues[1],
}) })
this.data.pageNo += 1 },
this.getFollowUpList() })
}
}, },
getFollowUpList(){ getCollect(){
this.setData({ this.setData({
loadMoreVisible: true, loadMoreVisible: true,
nodata: false, nodata: false,
loadMoreType: "more", loadMoreType: "more",
}) })
let parm = { const parm = {
inspRecordId:'', type:this.data.newType,
createdBy:this.data.createdBy, pageSize:this.data.pageSize,
pageNo:this.data.pageNo, pageNo:this.data.pageNo,
pageSize:this.data.pageSize collectType:'add',
collectStartDate:this.data.form.collectStartDate,
collectEndDate:this.data.form.collectEndDate
} }
if(!parm.type) delete parm.type console.log(parm);
getFollowUpList(parm).then(res=>{ getCollect(parm).then(res=>{
this.setData({ this.setData({
loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none', loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none',
tableData: this.data.tableData.concat(res.data.list), tableData: this.data.tableData.concat(res.data.list),
@ -111,21 +140,53 @@ Page({
}) })
}) })
}, },
handleClickPhone(e){ onScrollToLower(e){
wx.makePhoneCall({ if (this.data.loadMoreType === 'more') {
phoneNumber: e.currentTarget.dataset.mobile, this.setData({
}) loadMoreVisible: true,
})
this.data.pageNo += 1
this.getCollect()
}
}, },
toFollowUpDetail(e){ onValueChange(e){
wx.navigateTo({ this.setData({
url: `/subpages/communitySelfInsp/pages/followUpDetail/followUpDetail?resiInfo=${JSON.stringify(e.currentTarget.dataset.item)}&type=edit`, typeVal: e.detail.selectedIndex[0] === 1 ? 'resi' : e.detail.selectedIndex[0] === 2 ? 'house' : '',
}) collectTypeVal: e.detail.selectedIndex[1] === 1 ? 'add' : e.detail.selectedIndex[1] === 2 ? 'edit' : e.detail.selectedIndex[1] === 3 ? 'del' : '',
})
}, },
/** onConfirm(e) {
* 用户点击右上角分享 this.setData({
*/ typeVal: e.detail.selectedIndex[0] === 1 ? 'resi' : e.detail.selectedIndex[0] === 2 ? 'house' : '',
onShareAppMessage() { collectTypeVal: e.detail.selectedIndex[1] === 1 ? 'add' : e.detail.selectedIndex[1] === 2 ? 'edit' : e.detail.selectedIndex[1] === 3 ? 'del' : '',
'form.type': e.detail.selectedIndex[0] === 1 ? 'resi' : e.detail.selectedIndex[0] === 2 ? 'house' : '',
'form.collectType':e.detail.selectedIndex[1] === 1 ? 'add' : e.detail.selectedIndex[1] === 2 ? 'edit' : e.detail.selectedIndex[1] === 3 ? 'del' : '',
visible:false,
selectValue:e.detail.selectedValue
})
},
handelShow(){
this.setData({
visible:true
})
},
handelHidden(){
this.setData({
visible:false
})
},
handleClickfilter(){
this.setData({
tableData:[],
pageNo:1
})
this.getCollect()
} },
handelDel(){
this.setData({
'form.collectStartDate':'',
'form.collectEndDate':''
})
}
}) })

8
subpages/communitySelfInsp/pages/followUpList/followUpList.json

@ -1,7 +1,9 @@
{ {
"usingComponents": { "usingComponents": {
"load-more": "../../../../components/loadMore/loadMore", "load-more": "../../../../components/loadMore/loadMore",
"no-data": "../../../../components/noData/nodata" "no-data": "../../../../components/noData/nodata",
}, "wux-calendar":"../../../../components/dist/calendar",
"navigationBarTitleText": "我的回访记录" "wux-picker":"../../../../components/dist/picker/index"
}
} }

50
subpages/communitySelfInsp/pages/followUpList/followUpList.wxml

@ -1,19 +1,45 @@
<!--subpages/communitySelfInsp/pages/dissatisfactionDetails/dissatisfactionDetails.wxml--> <!--subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml-->
<view class="content"> <view class="search" >
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower"> <view class="filter" bind:tap="handelShow">
<view class="card" wx:for="{{tableData}}" wx:key="index" data-item="{{item}}" bind:tap="toFollowUpDetail"> {{typeVal =='resi'?'居民信息采集':typeVal=='house'?'房屋信息采集':'全部信息'}} <text wx:if="{{collectTypeVal != ''}}"></text>
<view class="title" > <!-- {{collectTypeVal =='add'?'新增':collectTypeVal =='edit'?'修改':collectTypeVal == 'del'?'删除':''}} -->
<view> <image src="../images/down.png" mode=""/>
<text class="{{item.followUpWay == '1'?'blue_small':'red_small'}}">{{item.followUpWayName}}</text> </view>
{{item.reporterName}} {{item.reporterMobile}} <view class="box">
</view> <view class="date {{form.collectEndDate?'':'gray'}}" bind:tap="openCalendar2">
<view class="text">
<text wx:if="{{form.collectEndDate}}">{{form.collectStartDate}} {{form.collectEndDate}}</text>
<text wx:else>请选择时间</text>
</view> </view>
<view class="bottom"> <image src="../image/downG.png" mode="" wx:if="{{!form.collectEndDate}}"/>
<view style="color: #999999 ;">{{item.addressDetail != null?item.addressDetail:'--'}}</view> <image src="../image/del.png" catch:tap="handelDel" style="width: 35rpx;height: 35rpx;" mode="" wx:else />
<view style="color: #C1C1C1;">{{item.followUpTime}}</view> </view>
</view>
<view class="btn" bind:tap="handleClickfilter">筛选</view>
</view>
<view class="body">
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="content">
<view class="item" wx:for="{{tableData}}" wx:key="index">
<view class="top"> <text class="tag {{item.collectType == 'edit'?'edit':item.collectType == 'add'?'add':'del'}}">{{item.collectType == 'edit'?'修改':item.collectType == 'add'?'新增':'删除'}}</text> <text>{{item.houseName?item.houseName:'--'}}</text></view>
<view class="bto"> <view class="address">{{item.orgName}}</view> <view class="date">{{item.collectTime}}</view>
</view> </view>
</view>
</view> </view>
<load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}" ></load-more> <load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}" ></load-more>
<no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data> <no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data>
</scroll-view> </scroll-view>
</view> </view>
<wux-calendar id="wux-calendar" />
<wux-picker
options="{{ selectList }}"
value="{{ selectValue }}"
bind:confirm="onConfirm"
bind:valueChange="onValueChange"
visible="{{visible}}"
bind:cancel="handelHidden"
controlled
cols="2"
>
</wux-picker>

227
subpages/communitySelfInsp/pages/followUpList/followUpList.wxss

@ -1,75 +1,154 @@
page { /* subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxss */
width: 100%; page{
min-height: 100vh; height: 100vh;
overflow-y: scroll; overflow: hidden;
background-color: #f7f7f7; background-color:#f7f7f7 ;
} }
.red, .edit{
.blue{ background-color: #def7f6;
font-size: 28rpx; color:#04B8AD;
color: #fff; }
padding: 8rpx 20rpx ; .add{
border-radius: 40rpx; background-color: #e6f0ff;
box-sizing: border-box; color: #4F94FF;
margin-right: 16rpx; }
} .del{
.red{ color: #FF783C;
background-color: #ff783c; background-color: #ffece3;
} }
.blue{ .gray{
background-color: #4f94ff; background: rgba(245, 245, 245) !important;
} border: 1px solid #c1c1c1 !important;
.blue_small, color: #c1c1c1 !important;
.red_small{ }
font-size: 26rpx; .search{
width: fit-content; height: 110rpx;
padding: 8rpx 16rpx; width: 100%;
border-radius: 40rpx; padding:0 22rpx;
box-sizing: border-box; box-sizing: border-box;
height: 40rpx; background-color: #fff;
line-height: 20rpx; display: flex;
margin: 24rpx 0 ; align-items: center;
justify-content: space-between;
padding-top: 20rpx;
box-sizing: border-box;
}
.search image{
width: 16rpx;
height: 16rpx;
}
.search .filter{
max-width: 300rpx;
height: 40rpx;
background: rgba(58,128,231,0.16);
border: 1px solid #3A80E7;
border-radius: 40rpx;
display: flex;
align-items: center;
color: #3A80E7 ;
justify-content: space-between;
padding: 13rpx 24rpx 13rpx 20rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.search .box {
flex: 1;
padding: 0 29rpx 0 15rpx;
overflow: hidden;
}
.search .box .date{
height: 40rpx;
background: rgba(58,128,231,0.16);
border: 1px solid #3A80E7;
border-radius: 40rpx;
padding: 13rpx 24rpx 13rpx 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
color: #3A80E7;
}
.search .box .date .text{
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* */
.search .btn {
width: 120rpx;
height: 66rpx;
line-height: 66rpx;
background: #3A80E7;
border-radius: 33rpx;
color: #fff;
text-align: center;
}
.body{
padding: 20rpx;
box-sizing: border-box;
overflow: hidden;
}
} .body .scroll {
.blue_small{ height: calc(100vh - 130rpx);
background-color: #eef4fd; overflow-y: scroll;
color: #5693EE; }
} .body .scroll .content{
.red_small{ border-radius: 20rpx;
background-color: #fff1eb; background-color: #fff;
color: #FF783C; height: auto;
} }
.content{ .body .scroll .content .item{
width: 100%; height: 150rpx;
padding:0 20rpx ; display: flex;
margin-top: 20rpx; box-sizing: border-box;
box-sizing: border-box; flex-direction: column;
} justify-content: space-between;
.content .scroll { padding: 30rpx;
height: calc(100vh - 50rpx); border-bottom:1px solid #EAEAEA;
overflow-y: scroll; }
} .body .scroll .content .item .top{
.content .card{ display: flex;
width: 100%; align-items: center;
background-color: #fff; font-size: 32rpx;
display: flex; font-family: PingFang SC;
height: 180rpx; font-weight: 500;
flex-direction: column; color: #333333;
border-radius: 20rpx; }
padding: 30rpx 30rpx; .body .scroll .content .item .top text{
box-sizing: border-box; overflow: hidden;
overflow: hidden; text-overflow: ellipsis;
color: #333; white-space: nowrap;
} }
.content .card .title{ .body .scroll .content .item .top .tag{
display: flex; width: 80rpx;
justify-content: space-between; height: 36rpx;
} line-height: 36rpx;
.content .card .bottom{ border-radius: 18rpx;
display: flex; font-size: 26rpx;
justify-content: space-between; text-align: center;
align-items: center; margin-right: 20rpx;
margin-top: 30rpx; }
border-bottom: 2rpx #EAEAEA solid; .body .scroll .content .item .bto{
padding-bottom: 20rpx; display: flex;
} justify-content: space-between;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
}
.body .scroll .content .item .bto .address{
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.body .scroll .content .item .bto .date{
width: 265rpx;
height: 20rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: #C1C1C1;
}

BIN
subpages/communitySelfInsp/pages/image/del.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

BIN
subpages/communitySelfInsp/pages/image/downG.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Loading…
Cancel
Save