Browse Source

列表文件补充,新增文件监听不到

lisu
mk 1 year ago
parent
commit
092beefe2c
  1. 139
      subpages/residentCategory/pages/residentCategory/residentCategory.js
  2. 6
      subpages/residentCategory/pages/residentCategory/residentCategory.json
  3. 50
      subpages/residentCategory/pages/residentCategory/residentCategory.wxml
  4. 674
      subpages/residentCategory/pages/residentCategory/residentCategory.wxss

139
subpages/residentCategory/pages/residentCategory/residentCategory.js

@ -0,0 +1,139 @@
// subpages/resnoinformation/pages/resnoinformation/resnoinformation.js
import api, {
getResidentBaseInfo,
} from "../../../../utils/api"
var http = require('../../../../utils/request.js')
const App = getApp()
// var fly = require('../../../../utils/request')
Page({
data: {
showResident:false,
//查询参数
lowerThreshold:8,//
pageNo: 1,//当前页码
loadMoreType: "more",//more的出发加载更多数据
waitList:[],//数据列表
pageSize: 10,//每页的条数
loadMoreVisible:false,//显示更多
nodata:false,
orgId:'',
resiCategory:'',
resiCategories: [],
searchKey:'',
orgObj: {
PARTY_FLAG: '党员分类信息',
SUBSISTENCE_ALLOWANCE_FLAG: '低保人员分类信息',
ENSURE_HOUSE_FLAG: '保障房人员分类信息',
VETERAN_FLAG: '退役军人分类信息',
OLD_PEOPLE_FLAG: '老年人分类信息',
SPECIAL_SUPPORT_FLAG: '特扶人员分类信息',
DISABILITY_FLAG: '残疾分类信息',
SERIOUS_ILLNESS_FLAG: '大病分类信息',
CHRONIC_DISEASE_FLAG: '慢病分类信息',
SPECIAL_CROWD_FLAG: '特殊人群分类信息',
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if(options.category){
this.setData({
orgId:App.globalData.user.agencyId,
resiCategory:options.category
})
wx.setNavigationBarTitle({
title: this.data.orgObj[options.category],
})
}
this.getTableData()
},
// 当到达底部时,触发事件
onScrollToLower(e) {
if (this.data.loadMoreType === 'more') {
this.setData({
// 显示更多加载
loadMoreVisible: true,
})
this.data.pageNo += 1
this.getTableData()
}
},
// 向下分页下来
getTableData: async function () {
try {
this.setData({
loadMoreVisible: true,
nodata: false,
loadMoreType: "more",
})
let parm = {
searchOrgIdPath:this.data.orgId,
pageSize: this.data.pageSize,
pageNo: this.data.pageNo,
searchKey:this.data.keyWord,
resiCategory:this.data.resiCategory,
}
// 从waitCollectHouseList取返回的值
let {
data,
code,
msg
} = await getResidentBaseInfo(parm)
if (code == 0) {
this.setData({
// 获取数据的长度等于页面的显示的长度
loadMoreType: data.list.length === this.data.pageSize ? 'more' : 'none',
// 将返回的值,合并到waitList中
waitList: this.data.waitList.concat(data.list.map(item=>({...item,categoryNameStr:item.categoryNameStr?item.categoryNameStr.split(','):null}))),
})
if (this.data.waitList.length == 0) {
this.setData({
loadMoreVisible: false,
nodata: true
})
}
} else {
this.setData({
loadMoreVisible: false,
nodata: true,
loadMoreType: 'none'
})
}
} catch (err) {
console.log(err);
this.setData({
loadMoreVisible: false,
nodata: true,
loadMoreType: 'none'
})
}
},
//筛选按钮
handelClickSearch(){
this.setData({
waitList:[],
pageNo:1,
loadMoreType:'more'
})
this.getTableData()
},
handelBlurKeyWord(e) {
this.setData({
keyWord: e.detail.value
})
},
toResiDetail(e) {
wx.navigateTo({
url: `/subpages/searchResult/pages/resiInfo/resiInfo?resiId=${e.currentTarget.dataset.resiid}`,
})
}
})

6
subpages/residentCategory/pages/residentCategory/residentCategory.json

@ -0,0 +1,6 @@
{
"usingComponents": {
"load-more": "../../components/loadMore/loadMore",
"no-data": "../../components/noData/nodata"
}
}

50
subpages/residentCategory/pages/residentCategory/residentCategory.wxml

@ -0,0 +1,50 @@
<!--subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxml-->
<view class="header">
<view class="inout_box">
<image src="../../../../images/work/search.png" mode="" class="search_img" />
<input type="text" placeholder="姓名/手机/身份证" bindinput="handelBlurKeyWord" bindblur="handelBlurKeyWord" value="{{keyWord}}" />
<view class="btn_box" bind:tap="handelClickSearch">
<image src="../../../../images/cardIcon.png" mode="" wx:if="{{selectVale == 'resi'}}" class="OCR_img" bind:tap="handelClickToOcr" />
<text>搜索</text>
</view>
</view>
</view>
<view class="context">
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{lowerThreshold}}" bindscrolltolower="onScrollToLower">
<view class="form_item" wx:for="{{waitList}}" :wx:key="{{index}}" bind:tap="toResiDetail" data-resiId="{{item.resiId}}">
<view class="box_18">
<view style="display: flex;align-items: center;">
<view style="display: flex;">
<image style="width: 40rpx;height: 40rpx;margin-right: 16rpx;" wx:if="{{item.gender=='1'&&item.age>18 &&item.age<60}}" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/1e21790833b04e9abe61e2a8f40446cb.png" mode="" />
<image style="width: 40rpx;height: 40rpx;margin-right: 16rpx;" wx:if="{{item.gender=='1'&& item.age<18 }}" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/62c2b6a1ce834f8dae081b562b2579b9.png" mode="" />
<image style="width: 40rpx;height: 40rpx;margin-right: 16rpx;" wx:if="{{item.gender=='1'&&item.age>=60}}" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/bd586a4e7d0f4b3aa68c79067dfe1428.png" mode="" />
<image style="width: 40rpx;height: 40rpx;margin-right: 16rpx;" wx:if="{{item.gender=='2'&&item.age>18 &&item.age<60}}" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/3b44e3495dcd4d96a3c07baad1bd7c5e.png" mode="" />
<image style="width: 40rpx;height: 40rpx;margin-right: 16rpx;" wx:if="{{item.gender=='2'&&item.age<18 }}" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/0c38251bba644a6b8e4a925aea74c9a7.png" mode="" />
<image style="width: 40rpx;height: 40rpx;margin-right: 16rpx;" wx:if="{{item.gender=='2'&&item.age>=60}}" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/2465ff7633a94413bf4ed2aa778c2765.png" mode="" />
<image style="width: 40rpx;height: 40rpx;margin-right: 16rpx;" wx:if="{{item.gender == '0'}}" src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240402/1e21790833b04e9abe61e2a8f40446cb.png" mode="" />
<text lines="1" class="text_16"> {{item.name}}</text>
</view>
<view class="resi_tag " wx:if="{{item.categoryNameStr}}">
<view wx:for="{{item.categoryNameStr}}" wx:for-item="itemC" wx:for-index="indexxxxxxxx" wx:key="indexxxxxxxx" class="{{itemC === '党员'?'hong':itemC==='群众'?'lan':itemC === '共青团员'?'ju':itemC ==='残疾人员'?'qing':itemC =='慢病'?'zi':itemC ==='死亡'?'hui':itemC=='老年人'?'lan':itemC=='低保人员'?'lv':itemC =='退役军人'?'hong':itemC === '保障房人员'?'huang':itemC =='育龄妇女'?'fen':itemC=='特扶人员'?'zi':itemC=='安置帮教'?'zi':itemC=='吸毒人员'?'hong':itemC =='社区矫正'?'qing':itemC=='不良青少年'?'huang':itemC=='肇事肇祸精神病'?'zi':itemC =='邪教人员'?'ju':itemC=='统战人员'?'lv':itemC=='信访人员'?'honsg':itemC=='志愿者'?'fen':itemC == '楼长'?'lan':itemC=='单元长'?'qing':itemC=='公益岗'?'fen':itemC==='大病'?'hong':'lan'}}">{{itemC}}</view>
</view>
</view>
<view class="text-wrapper_9">
<view class="label">信息完整度:</view><view class="value">{{item.synthesizeScore}}</view>
</view>
</view>
<view class="text-wrapper_13">
<text lines="1" class="text_27">证件号</text>
<text lines="1" class="text_28">:</text>
<text lines="1" class="text_29">{{item.idNum}}</text>
</view>
<view class="text-wrapper_12">
<text lines="1" class="text_25">电话:</text>
<text lines="1" class="text_26">{{item.mobile||'--'}}</text>
</view>
<view class="text-wrapper_14">
<text lines="1" class="text_30">地址:</text>
<text lines="1" class="text_31">{{item.agencyName || ''}} {{item.homeName || ''}}</text>
</view>
</view>
</scroll-view>
</view>

674
subpages/residentCategory/pages/residentCategory/residentCategory.wxss

@ -0,0 +1,674 @@
/* subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxss */
page{
width: 100%;
min-height: 100vh;
overflow-y: auto;
overflow-x: hidden;
background: #F7F7F7;
}
.header{
display: flex;
flex-direction: row;
width: 100%;
height: 90rpx;
background-color: #FFFFFF;
}
.card{
display: flex;
align-items: center;
justify-content: center;
}
.inout_box {
position: relative;
margin: 20rpx 0 20rpx;
padding: 0 20rpx;
box-sizing: border-box;
width: 100%;
}
.inout_box input {
width: auto;
background: #F5F5FA;
border-radius: 47rpx;
padding: 0 100rpx 0 69rpx;
height: 76rpx;
font-size: 26rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.inout_box .search_img {
position: absolute;
left: 37rpx;
top: 24rpx;
width: 30rpx;
height: 30rpx;
}
.inout_box .btn_box {
width: 110rpx;
height: 50rpx;
position: absolute;
top: 15rpx;
right: 4rpx;
display: flex;
align-items: center;
}
.inout_box .btn_box text {
width: 80rpx;
height: 30rpx;
line-height: 30rpx;
font-size: 28rpx;
box-sizing: border-box;
color: #3A80E7;
padding-left: 15rpx;
border-left: 2rpx #3A80E7 solid;
}
/* subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxss */
page{
width: 100%;
min-height: 100vh;
overflow-y: auto;
overflow-x: hidden;
background: #F7F7F7;
}
.header{
display: flex;
flex-direction: row;
width: 100%;
height: 90rpx;
background-color: #FFFFFF;
}
.card{
display: flex;
align-items: center;
justify-content: center;
}
.card_one{
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(57,116,246,0.160000);
border-radius: 28rpx;
width: 273rpx;
height: 57rpx;
border: 1px solid rgba(57,116,246,1);
flex-direction: row;
display: flex;
margin: 16rpx 0 0 20rpx;
}
.text1{
overflow-wrap: break-word;
color: rgba(57,116,246,1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 52rpx;
}
.another_class{
overflow-wrap: break-word;
color: rgb(0, 0, 0);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 52rpx;
}
.card_two{
display: flex;
align-items: center;
justify-content: center;
background-color: #F5F5F5;
border-radius: 28rpx;
width: 273rpx;
height: 57rpx;
border: 1px solid #C1C1C1;
flex-direction: row;
display: flex;
margin: 16rpx 0 0 20rpx;
}
.text2{
overflow-wrap: break-word;
color: rgba(193,193,193,1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 46rpx;
}
.card_three{
background-color: rgba(57,116,246,1.000000);
border-radius: 28rpx;
height: 56rpx;
display: flex;
flex-direction: column;
width: 120rpx;
margin: 18rpx 22rpx 0 28rpx;
align-items: center;
justify-content: center;
}
.test3{
overflow-wrap: break-word;
color: rgba(255,255,255,1);
font-size: 28rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 46rpx;
}
.context{
width: auto;
height:auto ;
display: flex;
flex-direction: column;
background: rgb(255, 255, 255);
margin: 25rpx;
}
.scroll {
height: 1300rpx;
}
.card_top{
display: flex;
flex-direction: column;
margin: 20rpx;
}
.line {
width: 533rpx;
height: 29rpx;
flex-direction: row;
display: flex;
justify-content: space-between;
margin: 27rpx 0 0 0;
}
.information{
display: flex;
flex-direction: row;
width: 400rpx;
}
.name{
width: auto;
height: 29rpx;
overflow-wrap: break-word;
font-size: 0rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: center;
white-space: nowrap;
line-height: 40rpx;
margin-right: 20rpx;
}
.lable{
display: block;
width:auto;
height: 40rpx;
/* background: #f6f6f6; */
margin-left: 20rpx;
/* color:red; */
}
.red-style{
display: block;
width:auto;
height: 40rpx;
background: #FFE3E3;
margin-left: 20rpx;
color:red;
}
.yellow-style{
display: block;
width:auto;
height: 40rpx;
background: yellow;
margin-left: 20rpx;
color:yellow;
}
.text_2{
display: table;
width: 45rpx;
height: 30rpx;
overflow-wrap: break-word;
font-size: 24rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: center;
white-space: nowrap;
line-height: 42rpx;
margin-right: 20rpx;
margin-left: 10rpx;
}
.text_1 {
width: 83rpx;
height: 32rpx;
overflow-wrap: break-word;
color: rgba(51,51,51,1);
font-size: 34rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 41rpx;
margin-top: 2rpx;
}
.hd_lable{
display: flex;
width: 300rpx;
height:50rpx;
overflow-x: scroll;
}
.information_1 {
display: flex;
width: 90rpx;
height: 28rpx;
overflow-wrap: break-word;
font-size: 0rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text_3{
width: 243rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 26rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text_4{
width: 243rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(4, 184, 173, 1);
font-size: 28rpx;
font-family: PingFang-SC-Bold;
font-weight: 700;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.phone{
width: 533rpx;
height: 29rpx;
flex-direction: row;
display: flex;
margin: 27rpx 0 0
}
.test_5{
width: auto;
height: auto;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.test_6{
width: 263rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.idCard{
display: flex;
flex-direction: row;
margin: 27rpx 0 0 ;
}
.text_7{
width: auto;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text_8{
width: auto;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.address{
display: flex;
flex-direction: row;
margin: 27rpx 0 0 ;
}
.text_9{
width: auto;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text_10{
width: 639rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text_23 {
width: 145rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text_24 {
width: 145rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text-wrapper_12 {
width: 263rpx;
height: 28rpx;
overflow-wrap: break-word;
font-size: 0rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
margin: 19rpx 0 0 0;
}
.text_25 {
width: 263rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text_26 {
width: 263rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text-wrapper_13 {
width: 415rpx;
height: 28rpx;
overflow-wrap: break-word;
font-size: 0rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
margin: 20rpx 0 0 0;
}
.resi_tag {
display: flex;
flex-grow: 0;
/* justify-content: start; */
/* max-width: 302rpx; */
overflow-x: scroll;
padding: 10rpx 0 0;
box-sizing: border-box;
margin-left: 16rpx;
font-size: 24rpx;
}
.resi_tag view{
padding: 7rpx 9rpx;
box-sizing: border-box;
white-space:nowrap;
margin-right:5rpx;
border-radius: 6rpx;
}
.box_18 {
width: 649rpx;
/* height: 36rpx; */
flex-direction: row;
align-items: center;
justify-content: space-between;
display: flex;
margin: 20rpx 0 0 0;
}
.text-wrapper_9 {
display: flex;
width: 243rpx;
overflow-wrap: break-word;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
margin: 4rpx 0 0 0;
}
.text-wrapper_9 .label{
color: #999999;
}
.text-wrapper_9 .value{
color: #04b8ad;
}
.text_16 {
width: fit-content;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
font-size: 34rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 41rpx;
margin-top: 2rpx;
}
.form_item {
margin-top: 10rpx;
padding: 0 30rpx 30rpx;
box-sizing: border-box;
border-bottom: 1rpx #EAEAEA solid;
}
.text_27 {
width: 415rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text_28 {
width: 415rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text_29 {
width: 415rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text-wrapper_14 {
width: 639rpx;
height: 28rpx;
overflow-wrap: break-word;
font-size: 0rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
margin: 20rpx 0 0 0;
}
.text_30 {
width: 639rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text_31 {
width: 639rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(51, 51, 51, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.text-wrapper_15 {
width: 537rpx;
height: 28rpx;
overflow-wrap: break-word;
font-size: 0rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
margin: 20rpx 0 0 0;
}
.text_32 {
width: 537rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 40rpx;
}
.hong{
color:#ff3c3c;
background-color:#ffe3e3 ;
}
.lan{
color:#4f94ff;
background-color:#e6f0ff ;
}
.ju{
color:#fe840d;
background-color:#ffeedd ;
}
.qing{
color: #04b8ad;
background-color:#dcf5f3 ;
}
.zi{
color: #b462e8;
background-color:#f4e9fc ;
}
.hui{
color: #959495;
background-color:#f1f1f1 ;
}
.lv{
color: #52ba74;
background-color:#e7f5ec ;
}
.fen{
color: #ff688f;
background-color:#ffeaef ;
}
.huang{
color: #fcac00;
background-color: #fff3db;
}
Loading…
Cancel
Save