Browse Source

页面基本完成,只剩下调用接口传参

work_tab_bar
是小王呀\24601 2 years ago
parent
commit
ab242d5570
  1. BIN
      images/Dropdownbutton.png
  2. 4
      pages/resiAndHouse/resiAndHouse.wxss
  3. 74
      subpages/nohouse/pages/nohouse/nohouse.js
  4. 12
      subpages/nohouse/pages/nohouse/nohouse.json
  5. 15
      subpages/nohouse/pages/nohouse/nohouse.wxml
  6. 38
      subpages/nohouse/pages/nohouse/nohouse.wxss
  7. 145
      subpages/resnoinformation/pages/resnoinformation/resnoinformation.js
  8. 10
      subpages/resnoinformation/pages/resnoinformation/resnoinformation.json
  9. 70
      subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxml
  10. 177
      subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxss

BIN
images/Dropdownbutton.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

4
pages/resiAndHouse/resiAndHouse.wxss

@ -201,9 +201,7 @@ page {
justify-content: space-between;
}
.image-text_qh {
/* margin: 0 auto; */
}
.text_51{
font-size: 26rpx;

74
subpages/nohouse/pages/nohouse/nohouse.js

@ -1,25 +1,40 @@
// subpages/nohouse/pages/nohouse/nohouse.js
import api, {
getAllOrgCategoryCount,
getResidentBaseInfo,
getTopTree,
getNextTree,
houseSearch,
allOrgHouseInfo,
getCommunityHouse,
getAgencygridtree
} from "../../../../utils/api"
Page({
/**
* 页面的初始数据
*/
visible: false,
data: {
selectedItem:'',
itemList : [
{ value: '1', label: '选项一' },
{ value: '2', label: '选项二' },
{ value: '3', label: '选项三' }
],
cascaderName:'海伦路街道',
ShowTree: false,
searchOrgIdPath:'',
angencyList:[],
fieldName: {
text: 'agencyName',
value: 'agencyId',
children: 'subAgencyList'
},
cascaderFwValue: '',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getAgencygridtree();
},
/**
@ -70,12 +85,43 @@ Page({
onShareAppMessage() {
},
handelShow(){
handelClickShowTree() {
this.setData({
visible:true
})
},
bindPickerChange(){
ShowTree: true
});
console.log("1111",this.data.ShowTree)
},
//获取地理位置
getAgencygridtree() {
api.getAgencygridtree().then(res => {
console.log([res.data]),
this.setData({
angencyList: [res.data]
});
if (this.data.angencyList && this.data.angencyList.length > 0) {
console.log('angencyList 已经被赋值:', this.data.angencyList);
// 执行 angencyList 被赋值后的操作
} else {
console.log('angencyList 尚未被赋值');
// 执行 angencyList 未被赋值时的操作
}
}).catch(err => {
console.log,(err);
})
},
onClose() {
this.setData({
ShowTree: false
})
},
onFinish(e) {
this.setData({
pageNo: 1,
searchOrgIdPath: e.detail.selectedOptions[e.detail.selectedOptions.length - 1].agencyId,
cascaderName: e.detail.selectedOptions.map(item => item.agencyName).join(','),
tableData: []
})
},
}
})

12
subpages/nohouse/pages/nohouse/nohouse.json

@ -1,4 +1,14 @@
{
"usingComponents": {},
"usingComponents": {
"custom-tab-bar":"../../components/custom-tab-bar",
"load-more": "../../components/loadMore/loadMore",
"no-data": "../../components/noData/nodata",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-cascader": "@vant/weapp/cascader/index",
"van-popup": "@vant/weapp/popup/index"
},
"navigationBarTitleText": "待采集居民房屋列表"
}

15
subpages/nohouse/pages/nohouse/nohouse.wxml

@ -1,14 +1,8 @@
<!--subpages/nohouse/pages/nohouse/nohouse.wxml-->
<view class="header">
<view class="input" >
<picker range="{{serviceOptions}}" range-key="label" >
<view class="items">
<view class=" {{serviceIndex >= 0 ? '' : 'gray'}}">
{{serviceIndex >= 0 ? serviceOptions[serviceIndex].label : '按管辖范围'}}
</view>
</view>
</picker>
<view class="header_left" bind:tap="handelClickShowTree">
<test class="left_test">{{cascaderName}}</test>
<image class="left_image" src="/images/Dropdownbutton.png"></image>
</view>
<view class="button">
<test class="button_text">筛选</test></view>
@ -19,3 +13,6 @@
<test class="from_test2">></test>
</view>
</view>
<van-popup show="{{ ShowTree }}" round position="bottom">
<van-cascader field-names="{{fieldName}}" wx:if="{{ShowTree}}" value="{{ searchOrgIdPath }}" title="请选择" options="{{ angencyList }}" bind:close="onClose" bind:finish="onFinish" />
</van-popup>

38
subpages/nohouse/pages/nohouse/nohouse.wxss

@ -1,10 +1,10 @@
/* subpages/nohouse/pages/nohouse/nohouse.wxss */
page{
width: 100%;
width: 100%;
min-height: 100vh;
overflow-y: auto;
overflow-x: hidden;
overflow: hidden;
background: #F7F7F7;
}
.header{
display: flex;
@ -13,6 +13,36 @@ page{
height: 90rpx;
background-color: #FFFFFF;
}
.header_left{
display: flex;
flex-direction: row;
background-color: rgba(193,193,193,0.160000);
border-radius: 28rpx;
/* width: 559rpx;*/
height: 57rpx;
border: 1px solid rgba(219,219,219,1);
flex-direction: row;
display: flex;
margin: 17rpx 0 0 19rpx;
justify-content: space-between;
}
.left_test{
width: 149rpx;
height: 29rpx;
overflow-wrap: break-word;
color: rgba(193,193,193,1);
font-size: 30rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
white-space: nowrap;
line-height: 46rpx;
margin: 5rpx 0 0 27rpx;
}
.left_image{
width: 16rpx;
height: 10rpx;
margin: 25rpx 22rpx 0 345rpx;
}
.input{
background-color: rgba(193,193,193,0.160000);
border-radius: 28rpx;
@ -24,7 +54,7 @@ page{
margin: 17rpx 0 0 19rpx;
}
.gray{
color: #C1C1C1;
color: #C1C1C1;
padding-left: 30rpx;
}
.button{

145
subpages/resnoinformation/pages/resnoinformation/resnoinformation.js

@ -1,17 +1,45 @@
// subpages/resnoinformation/pages/resnoinformation/resnoinformation.js
import api, {
getAllOrgCategoryCount,
getResidentBaseInfo,
getTopTree,
getNextTree,
houseSearch,
allOrgHouseInfo,
getCommunityHouse,
getAgencygridtree
} from "../../../../utils/api"
var http = require('../../../../utils/request.js')
var fly = require('../../../../utils/request')
Page({
/**
* 页面的初始数据
*/
data: {
dictType:[],
showResident:false,
cascaderName:'海伦路街道',
showStreet:false,
searchOrgIdPath:'',
angencyList:[],
fieldName: {
text: 'agencyName',
value: 'agencyId',
children: 'subAgencyList'
},
cascaderFwValue: '',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getAgencygridtree();
this.getDicts()
},
@ -62,5 +90,120 @@ Page({
*/
onShareAppMessage() {
}
},
onShowPoint(){
this.setData({
showStreet:true
})
},
onClose() {
this.setData({
showStreet: false,
showResident:false
})
},
onFinish(e) {
this.setData({
pageNo: 1,
searchOrgIdPath: e.detail.selectedOptions[e.detail.selectedOptions.length - 1].agencyId,
cascaderName: e.detail.selectedOptions.map(item => item.agencyName).join(','),
tableData: []
})
},
getAgencygridtree() {
api.getAgencygridtree().then(res => {
console.log([res.data]),
this.setData({
angencyList: [res.data]
});
if (this.data.angencyList && this.data.angencyList.length > 0) {
console.log('angencyList 已经被赋值:', this.data.angencyList);
// 执行 angencyList 被赋值后的操作
} else {
console.log('angencyList 尚未被赋值');
// 执行 angencyList 未被赋值时的操作
}
}).catch(err => {
console.log,(err);
})
},
onclickResident(){
this.setData({
showResident:true,
})
},
async getDicts() {
try {
const requests = [
http.post("sys/dict/data/dictlist", {
dictType: "nationality",
}),
http.post("sys/dict/data/nation", {
formCode: "resi_base_info",
}),
http.post("sys/dict/data/education", {
formCode: "resi_base_info",
}),
http.post("sys/dict/data/dictlist", {
dictType: "marriage",
}),
http.post("sys/dict/data/dictlist", {
dictType: "household_situation",
}),
http.post("sys/dict/data/relationship", {
formCode: "resi_base_info",
}),
http.post("sys/dict/data/dictlist", {
dictType: "career_status",
}),
http.post("sys/dict/data/dictlist", {
dictType: "spouse_situation",
}),
http.post("sys/dict/data/dictlist", {
dictType: "unemployment_reason",
}),
http.post("sys/dict/data/dictlist", {
dictType: "career_goals",
}),
http.post("sys/dict/data/dictlist", {
dictType: "special_resident_category",
}),
http.post("sys/dict/data/dictlist", {
dictType: "attention_crowd",
}),
];
const dictKeys = [
"nationalityList",
"nationList",
"educationList",
"marriageList",
"householdSituationList",
"houseHolderRelList",
"careerStatusList",
"spouseSituationList",
"unemploymentReasonList",
"employmentWishList",
"specialResidentCategory",
"attentioncrowdList"
]; // 对应的键名
const results = await Promise.all(requests);
results.forEach((result, index) => {
if (result.code === 0) {
this.setData({
[`dicts.${dictKeys[index]}`]: [...result.data]
})
console.log(result.data)
} else {
console.log(`获取${dictKeys[index]}失败: ${result.data.msg}`);
}
});
} catch (error) {
console.log("获取字典失败: ", error);
}
},
})

10
subpages/resnoinformation/pages/resnoinformation/resnoinformation.json

@ -1,4 +1,12 @@
{
"usingComponents": {},
"usingComponents": {
"custom-tab-bar":"../../components/custom-tab-bar",
"load-more": "../../components/loadMore/loadMore",
"no-data": "../../components/noData/nodata",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-cascader": "@vant/weapp/cascader/index",
"van-popup": "@vant/weapp/popup/index"
},
"navigationBarTitleText": "居民信息不完整列表"
}

70
subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxml

@ -1,54 +1,60 @@
<!--subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxml-->
<view class="header">
<view class="card">
<picker range="{{serviceOptions}}" range-key="label" bind:change="getServiceuserList" class="card_one">
<view class="items">
<view class="text1">海伦路街道</view>
</view>
</picker>
<view class="card_one" bind:tap="onShowPoint">
<view class="items" >
<view class="text1" >{{cascaderName}}</view>
</view>
</view>
<view>
<picker range="{{serviceOptiondList}}" bind:change="serviceOptiondListChange" range-key="label" class="card_two">
<view class="card_two" bind:tap="onclickResident">
<view class="items">
<view class="text2">按照居民分类</view>
</view>
</picker>
</view>
</view>
<view class="card_three">
<text class="test3">筛选</text>
</view>
</view>
</view>
<view class="context">
<scroll-view lass="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="card_top">
<view class="box_19">
<view class="text-wrapper_10">
<text lines="1" class="text_21">国籍:</text>
<text lines="1" class="text_22">{{item.nationalityName || "--"}}</text>
</view>
<view class="text-wrapper_11">
<text lines="1" class="text_23">民族:</text>
<text lines="1" class="text_24">{{item.nationName || '--'}}</text>
<view class="line">
<view class="information">
<view class="name">
<text lines="1" class="text_1">杨*冬</text>
</view>
<view class="lable">
<text class="text_2">失眠</text>
</view>
</view>
<view class="information_1">
<text lines="1" class="text_3">信息完整度:</text>
<text lines="1" class="text_4">50%</text>
</view>
</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_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 class="phone">
<text lines="1" class="test_5">电话:</text>
<text lines="1" class="text_6">123456</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 class="idCard">
<text lines="1" class="text_7">证件号:</text>
<text lines="1" class="text_8">1717</text>
</view>
<view class="text-wrapper_15">
<text lines="1" class="text_32">最新更新时间:</text>
<text lines="1" decode="true" class="text_33">{{item.updatedTime|| '--'}}</text>
<view class="address">
<text lines="1" class="text_9">地址:</text>
<text lines="1" class="text_10">{{item.agencyName || ''}} {{item.homeName || ''}}</text>
</view>
</view>
</scroll-view>
</view>
<van-popup show="{{ showStreet }}" round position="bottom">
<van-cascader field-names="{{fieldName}}" wx:if="{{showStreet}}" value="{{ searchOrgIdPath }}" title="请选择" options="{{ angencyList }}" bind:close="onClose" bind:finish="onFinish" />
</van-popup>
<van-popup show="{{ showResident }}" round position="bottom">
<van-cascader field-names="{{fieldNames}}" wx:if="{{showResident}}" value="{{ searchOrgIdPath }}" title="请选择" options="{{ dicts.nationalityList }}" bind:close="onClose" bind:finish="onFinish" />
</van-popup>

177
subpages/resnoinformation/pages/resnoinformation/resnoinformation.wxss

@ -9,7 +9,6 @@ page{
.header{
display: flex;
flex-direction: row;
width: 100%;
height: 90rpx;
background-color: #FFFFFF;
@ -96,8 +95,13 @@ page{
margin: 20rpx;
}
.
.box_19 {
.card_top{
display: flex;
flex-direction: column;
margin: 20rpx;
}
.line {
width: 533rpx;
height: 29rpx;
flex-direction: row;
@ -105,9 +109,13 @@ page{
justify-content: space-between;
margin: 27rpx 0 0 0;
}
.information{
display: flex;
flex-direction: row;
.text-wrapper_10 {
width: 146rpx;
}
.name{
width: auto;
height: 29rpx;
overflow-wrap: break-word;
font-size: 0rpx;
@ -116,11 +124,70 @@ page{
text-align: left;
white-space: nowrap;
line-height: 40rpx;
margin-right: 20rpx;
}
.lable{
display: flex;
width: 100rpx;
height: 36rpx;
flex-direction: row;
justify-content: center;
.text_21 {
width: 146rpx;
height: 29rpx;
background: #f6f6f6;
}
.text_2{
width: 45rpx;
height: 23rpx;
overflow-wrap: break-word;
color: rgba(153,153,153,1);
font-size: 24rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
}
.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;
}
.text_2{
width: 45rpx;
height: 23rpx;
overflow-wrap: break-word;
color: rgba(153,153,153,1);
font-size: 24rpx;
font-family: PingFang-SC-Medium;
font-weight: 500;
text-align: left;
white-space: nowrap;
line-height: 42rpx;
}
.information_1 {
width: 145rpx;
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: 30rpx;
@ -130,10 +197,41 @@ page{
white-space: nowrap;
line-height: 40rpx;
}
.text_22 {
width: 146rpx;
.text_4{
width: 243rpx;
height: 28rpx;
overflow-wrap: break-word;
color: rgba(4, 184, 173, 1);
font-size: 30rpx;
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;
@ -143,12 +241,58 @@ page{
white-space: nowrap;
line-height: 40rpx;
}
.text-wrapper_11 {
width: 145rpx;
.idCard{
display: flex;
flex-direction: row;
margin: 27rpx 0 0 ;
}
.text_7{
width: auto;
height: 28rpx;
overflow-wrap: break-word;
font-size: 0rpx;
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;
@ -337,7 +481,4 @@ page{
white-space: nowrap;
line-height: 40rpx;
}
.card_top{
display: flex;
}

Loading…
Cancel
Save