Browse Source

我的页面,采集信息

jw-featrue-zhanlibiao
mk 2 years ago
parent
commit
3e7f3330f3
  1. 8
      app.json
  2. 2
      components/dist/calendar/index.wxml
  3. BIN
      images/mine/avater.png
  4. BIN
      images/mine/cj.png
  5. BIN
      images/mine/gy.png
  6. BIN
      images/mine/hf.png
  7. BIN
      images/mine/lz.png
  8. BIN
      images/mine/password.png
  9. BIN
      images/mine/wgz.png
  10. 8
      pages/index/index.js
  11. 25
      pages/mine/mine.js
  12. 2
      pages/mine/mine.json
  13. 48
      pages/mine/mine.wxml
  14. 118
      pages/mine/mine.wxss
  15. 14
      project.private.config.json
  16. 11
      subpages/addResi/pages/addResi/addResi.wxml
  17. 181
      subpages/gatherInformation/pages/gatherInformation/gatherInformation.js
  18. 9
      subpages/gatherInformation/pages/gatherInformation/gatherInformation.json
  19. 44
      subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml
  20. 146
      subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxss
  21. BIN
      subpages/gatherInformation/pages/images/del.png
  22. BIN
      subpages/gatherInformation/pages/images/down.png
  23. 8
      utils/api.js
  24. 7
      utils/config.js

8
app.json

@ -30,7 +30,15 @@
"pages": [
"pages/addResi/addResi"
]
},
{
"root": "subpages/gatherInformation",
"name": "gatherInformation",
"pages": [
"pages/gatherInformation/gatherInformation"
]
}
],
"window": {
"backgroundTextStyle": "light",

2
components/dist/calendar/index.wxml

@ -1,4 +1,4 @@
<wux-popup position="bottom" visible="{{ in }}" zIndex="1010" safeArea="bottom" bind:close="close">
<wux-popup position="bottom" visible="{{ in }}" zIndex="0" safeArea="bottom" bind:close="close">
<view class="wux-class {{ classes.wrap }}">
<view class="{{ classes.content }}">
<view class="{{ classes.hd }}" wx:if="{{ toolbar }}">

BIN
images/mine/avater.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
images/mine/cj.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
images/mine/gy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
images/mine/hf.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
images/mine/lz.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
images/mine/password.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
images/mine/wgz.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

8
pages/index/index.js

@ -16,15 +16,15 @@ Page({
},
// 事件处理函数
onLoad() {
onLoad: async function () {
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
share:app.globalData.share
})
this.getToken()
this.getIntelligentMessage()
this.getStaffbasicinfo()
await this.getToken()
await this.getIntelligentMessage()
await this.getStaffbasicinfo()
},
onScrollToLower(e){

25
pages/mine/mine.js

@ -1,18 +1,29 @@
// pages/mine/mine.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
statusHeight:'',
navigationHeight:'',
agencyName:'',
userName:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
share:app.globalData.share,
agencyName:app.globalData.user.agencyName,
userName:app.globalData.user.realName
})
},
/**
@ -26,7 +37,10 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
agencyName:app.globalData.user.agencyName,
userName:app.globalData.user.realName
})
},
/**
@ -62,5 +76,10 @@ Page({
*/
onShareAppMessage() {
},
handelInformation(){
wx.navigateTo({
url: '/subpages/gatherInformation/pages/gatherInformation/gatherInformation',
})
}
})

2
pages/mine/mine.json

@ -1,4 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "我的"
"navigationStyle": "custom"
}

48
pages/mine/mine.wxml

@ -1,2 +1,48 @@
<!--pages/mine/mine.wxml-->
<text>pages/mine/mine.wxml</text>
<view class="header">
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
我的
</view>
<view class="content">
<view class="left"><image src="../../images/mine/avater.png" mode=""/></view>
<view class="right">
<view class="top"> <b>{{userName}}</b> <text>{{agencyName}}</text></view>
<view class="bto">
<view> <image src="../../images/mine/wgz.png" mode=""/> 网格长 </view>
<view> <image src="../../images/mine/lz.png" mode=""/> 楼长 </view>
</view>
</view>
</view>
</view>
<view class="body">
<view class="card">
<view class="item" bind:tap="handelInformation">
<view class="left">
<image src="../../images/mine/cj.png" mode=""/>
<view>我采集的信息</view>
</view>
<view class="right"> <image src="../../images/right.png" mode=""/></view>
</view>
<view class="item">
<view class="left">
<image src="../../images/mine/hf.png" mode=""/>
<view>我的回访记录</view>
</view>
<view class="right"> <image src="../../images/right.png" mode=""/></view>
</view>
<view class="item">
<view class="left">
<image src="../../images/mine/password.png" mode=""/>
<view>修改密码</view>
</view>
<view class="right"> <image src="../../images/right.png" mode=""/></view>
</view>
<view class="item">
<view class="left">
<image src="../../images/mine/gy.png" mode=""/>
<view>关于</view>
</view>
<view class="right"> <image src="../../images/right.png" mode=""/></view>
</view>
</view>
</view>

118
pages/mine/mine.wxss

@ -1 +1,117 @@
/* pages/mine/mine.wxss */
/* pages/mine/mine.wxss */
page{
height: 100vh;
width: 100%;
background-color: #f7f7f7;
}
.header {
width: 100%;
height: 470rpx;
/* position: fixed;
top: 0;
left: 0;
z-index: 1000; */
background: linear-gradient(180deg, #7DB5FF 0%, #F7F7F7 100%);
overflow: hidden;
}
.header .navigation {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #333333;
font-size: 32rpx;
position: relative;
z-index: 100;
}
.header .navigation image{
width: 34rpx;
height: 34rpx;
margin-right: 17rpx;
}
.header .content{
margin:80rpx 0 0;
height: 130rpx;
width: 100%;
padding: 0 30rpx;
box-sizing: border-box;
display: flex;
justify-content: space-around;
}
.header .content .left image{
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
.header .content .right{
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
padding-left: 30rpx;
}
.header .content .right .top b{
font-size: 36rpx;
font-family: PingFang SC;
color: #000000;
}
.header .content .right .top text{
margin-left: 19rpx;
padding-left: 19rpx;
height: 31rpx;
font-size: 30rpx;
border-left: 1rpx solid #333333 ;
}
.header .content .right .bto{
display: flex;
margin-top: 20rpx;
}
.header .content .right .bto view{
width: fit-content;
padding:7rpx 24rpx 7rpx 17rpx;
height: 46rpx;
display: flex;
align-items: center;
background: #FFFFFF;
border-radius: 46rpx;
font-size: 28rpx;
color: #999;
margin-right: 10rpx;
}
.header .content .right .bto image{
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.body{
padding: 0 20rpx;
height: auto;
position: relative;
top: -100rpx;
}
.body .card {
background-color: #ffffff;
border-radius: 20rpx;
height: auto;
}
.body .card .item{
height: 100rpx;
display: flex;
align-items: center;
padding: 0 30rpx;
box-sizing: border-box;
}
.body .card .item .left {
flex: 1;
display: flex;
}
.body .card .item .left image{
width: 40rpx;
height: 40rpx;
margin-right: 22rpx;
}
.body .card .item .right image{
width: 20rpx;
height: 20rpx;
}

14
project.private.config.json

@ -56,6 +56,20 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "我的",
"pathName": "pages/mine/mine",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "采集信息",
"pathName": "subpages/gatherInformation/pages/gatherInformation/gatherInformation",
"query": "",
"launchMode": "default",
"scene": null
}
]
}

11
subpages/addResi/pages/addResi/addResi.wxml

@ -115,12 +115,11 @@
<view class="title">出生日期</view>
</view>
<view class="input">
<picker mode="date" value="{{form.birthday}}" end="{{day}}" bindchange="bindDateChange">
<view class="{{form.birthday?'':'gray'}}">
{{form.birthday?form.birthday:'请选择'}}
</view>
</picker>
<picker mode="date" value="{{form.birthday}}" end="{{day}}" bindchange="bindDateChange">
<view class="{{form.birthday?'':'gray'}}">
{{form.birthday?form.birthday:'请选择'}}
</view>
</picker>
<image src="../../../../images/right.png" mode=""/>
</view>
</view>

181
subpages/gatherInformation/pages/gatherInformation/gatherInformation.js

@ -0,0 +1,181 @@
// subpages/gatherInformation/pages/gatherInformation/gatherInformation.js
import { $wuxCalendar } from '../../../../components/dist/index'
import {getCollect} from '../../../../utils/api'
Page({
/**
* 页面的初始数据
*/
data: {
selectList:[['全部信息','居民信息采集','房屋信息采集'],['','新增','修改','删除']],
selectValue:['全部信息',''],
pageSize:10,
pageNo:1,
tableData:[],
lowerThreshold:'10',
loadMoreVisible:false,
loadMoreType: "none",
nodata:false,
visible:false,
typeVal:'',
collectType:'',
form:{
type: "",
collectType: "",
collectStartDate: "",
collectEndDate: ""
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getCollect()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
openCalendar2() {
$wuxCalendar().open({
value: this.data.value2,
multiple: true,
onChange: (values, displayValues) => {
console.log('onChange', values, displayValues)
this.setData({
'form.collectStartDate': displayValues[0],
'form.collectEndDate': displayValues[1],
})
},
})
},
getCollect(){
this.setData({
loadMoreVisible: true,
nodata: false,
loadMoreType: "more",
})
const parm = {
type:this.data.form.type,
pageSize:this.data.pageSize,
pageNo:this.data.pageNo,
collectType:this.data.form.collectType,
collectStartDate:this.data.form.collectStartDate,
collectEndDate:this.data.form.collectEndDate
}
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),
})
if (this.data.tableData.length == 0) {
this.setData({
loadMoreVisible: false,
nodata: true
})
}
}).catch(err=>{
console.log(err);
this.setData({
loadMoreVisible: false,
nodata: true,
})
})
},
onScrollToLower(e){
if (this.data.loadMoreType === 'more') {
this.setData({
loadMoreVisible: true,
})
this.data.pageNo += 1
this.getCollect()
}
},
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' : '',
})
},
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':''
})
}
})

9
subpages/gatherInformation/pages/gatherInformation/gatherInformation.json

@ -0,0 +1,9 @@
{
"usingComponents": {
"wux-calendar":"../../../../components/dist/calendar",
"load-more": "../../../../components/loadMore/loadMore",
"no-data": "../../../../components/noData/nodata",
"wux-picker":"../../../../components/dist/picker/index"
},
"navigationBarTitleText": "我采集的信息"
}

44
subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml

@ -0,0 +1,44 @@
<!--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" bind:tap="openCalendar2">
<view class="text">
<text wx:if="{{form.collectEndDate}}">{{form.collectStartDate}} {{form.collectEndDate}}</text>
<text wx:else>请选择时间</text>
</view>
<image src="../images/down.png" mode="" wx:if="{{!form.collectEndDate}}"/>
<image src="../images/del.png" bind: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="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>
<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>

146
subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxss

@ -0,0 +1,146 @@
/* 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;
}
.search{
height: 90rpx;
width: 100%;
padding:0 22rpx;
box-sizing: border-box;
background-color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
}
.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 {
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;
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/gatherInformation/pages/images/del.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

BIN
subpages/gatherInformation/pages/images/down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

8
utils/api.js

@ -25,7 +25,8 @@ module.exports = {
getHouseCoding,
saveCommunityHouse,
updateCommunityHouse,
getClearHouseDeatilById
getClearHouseDeatilById,
getCollect
}
// 消息列表
function getIntelligentMessage(param){
@ -130,4 +131,7 @@ function getClearHouseDeatilById (id) {
// 房屋编辑
function updateCommunityHouse (parm) {
return fly.post(`actual/base/communityHouse/updateCommunityHouse`,parm)
}
}
function getCollect (parm) {
return fly.post(`message/intelligentMessage/collect/page`,parm)
}

7
utils/config.js

@ -7,16 +7,11 @@ module.exports = {
function BASEURL() {
// return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 正式环境
// return 'http://10.10.10.66:9094/epdc-api/api/' // 王童本地环境地址
// http://219.146.91.110:30801/api //线上测试
return 'http://192.168.1.144/api/' // 测试环境
}
function WEBROOT() {
// return 'https://epdc-shibei.elinkservice.cn/epidemic/appraise.html#/cadre-list' // 街道干部评价h5地址
// return 'http://lihenian.gitee.io/epidemic/appraise.html#/cadre-list' // 街道干部评价h5地址测试环境
// https://lyljdgs.qingdaoshibei.cn/app/mobileapp/qlsb/index.aspx
return 'https://lyljdgs.qingdaoshibei.cn/app/mobileapp/qlsb/index.aspx'// 2020-05-20
return 'https://lyljdgs.qingdaoshibei.cn/app/mobileapp/qlsb/index.aspx'
}
function getToken() {

Loading…
Cancel
Save