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. 145
      subpages/communitySelfInsp/pages/followUpList/followUpList.js
  4. 8
      subpages/communitySelfInsp/pages/followUpList/followUpList.json
  5. 52
      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',
})
},
onAddHouse(){
onAddHouseLL(){
wx.navigateTo({
url: '../../subpages/addhouse/pages/addhouse/addhouse',
})
@ -85,9 +85,14 @@ Page({
},
onFollowUpList(){
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(){
wx.navigateTo({
url: '../../subpages/myTroubleshootDemand/pages/index/index',

4
pages/work2/work2.wxml

@ -31,10 +31,10 @@
</view>
<view class="content_1">
<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>
</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>
</view>
</view>

145
subpages/communitySelfInsp/pages/followUpList/followUpList.js

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

52
subpages/communitySelfInsp/pages/followUpList/followUpList.wxml

@ -1,19 +1,45 @@
<!--subpages/communitySelfInsp/pages/dissatisfactionDetails/dissatisfactionDetails.wxml-->
<view class="content">
<!--subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml-->
<view class="search" >
<view class="filter" bind:tap="handelShow">
{{typeVal =='resi'?'居民信息采集':typeVal=='house'?'房屋信息采集':'全部信息'}} <text wx:if="{{collectTypeVal != ''}}"></text>
<!-- {{collectTypeVal =='add'?'新增':collectTypeVal =='edit'?'修改':collectTypeVal == 'del'?'删除':''}} -->
<image src="../images/down.png" mode=""/>
</view>
<view class="box">
<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>
<image src="../image/downG.png" mode="" wx:if="{{!form.collectEndDate}}"/>
<image src="../image/del.png" catch:tap="handelDel" style="width: 35rpx;height: 35rpx;" mode="" wx:else />
</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="card" wx:for="{{tableData}}" wx:key="index" data-item="{{item}}" bind:tap="toFollowUpDetail">
<view class="title" >
<view>
<text class="{{item.followUpWay == '1'?'blue_small':'red_small'}}">{{item.followUpWayName}}</text>
{{item.reporterName}} {{item.reporterMobile}}
</view>
</view>
<view class="bottom">
<view style="color: #999999 ;">{{item.addressDetail != null?item.addressDetail:'--'}}</view>
<view style="color: #C1C1C1;">{{item.followUpTime}}</view>
<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>
<load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}" ></load-more>
<no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data>
</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 {
width: 100%;
min-height: 100vh;
overflow-y: scroll;
background-color: #f7f7f7;
}
.red,
.blue{
font-size: 28rpx;
color: #fff;
padding: 8rpx 20rpx ;
border-radius: 40rpx;
box-sizing: border-box;
margin-right: 16rpx;
}
.red{
background-color: #ff783c;
}
.blue{
background-color: #4f94ff;
}
.blue_small,
.red_small{
font-size: 26rpx;
width: fit-content;
padding: 8rpx 16rpx;
border-radius: 40rpx;
box-sizing: border-box;
height: 40rpx;
line-height: 20rpx;
margin: 24rpx 0 ;
/* subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxss */
page{
height: 100vh;
overflow: hidden;
background-color:#f7f7f7 ;
}
.edit{
background-color: #def7f6;
color:#04B8AD;
}
.add{
background-color: #e6f0ff;
color: #4F94FF;
}
.del{
color: #FF783C;
background-color: #ffece3;
}
.gray{
background: rgba(245, 245, 245) !important;
border: 1px solid #c1c1c1 !important;
color: #c1c1c1 !important;
}
.search{
height: 110rpx;
width: 100%;
padding:0 22rpx;
box-sizing: border-box;
background-color: #fff;
display: flex;
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;
}
}
.blue_small{
background-color: #eef4fd;
color: #5693EE;
}
.red_small{
background-color: #fff1eb;
color: #FF783C;
}
.content{
width: 100%;
padding:0 20rpx ;
margin-top: 20rpx;
box-sizing: border-box;
}
.content .scroll {
height: calc(100vh - 50rpx);
overflow-y: scroll;
}
.content .card{
width: 100%;
background-color: #fff;
display: flex;
height: 180rpx;
flex-direction: column;
border-radius: 20rpx;
padding: 30rpx 30rpx;
box-sizing: border-box;
overflow: hidden;
color: #333;
}
.content .card .title{
display: flex;
justify-content: space-between;
}
.content .card .bottom{
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30rpx;
border-bottom: 2rpx #EAEAEA solid;
padding-bottom: 20rpx;
}
.body .scroll {
height: calc(100vh - 130rpx);
overflow-y: scroll;
}
.body .scroll .content{
border-radius: 20rpx;
background-color: #fff;
height: auto;
}
.body .scroll .content .item{
height: 150rpx;
display: flex;
box-sizing: border-box;
flex-direction: column;
justify-content: space-between;
padding: 30rpx;
border-bottom:1px solid #EAEAEA;
}
.body .scroll .content .item .top{
display: flex;
align-items: center;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
.body .scroll .content .item .top text{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.body .scroll .content .item .top .tag{
width: 80rpx;
height: 36rpx;
line-height: 36rpx;
border-radius: 18rpx;
font-size: 26rpx;
text-align: center;
margin-right: 20rpx;
}
.body .scroll .content .item .bto{
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