Browse Source

新增打卡记录

新增居民详情
dev
战立标 2 years ago
parent
commit
7ab87f525c
  1. 6
      app.json
  2. BIN
      images/work/sqmp.png
  3. 120
      subpages/addResi/pages/addResi/addResi.js
  4. 3
      subpages/addResi/pages/addResi/addResi.json
  5. 100
      subpages/addResi/pages/addResi/addResi.wxml
  6. BIN
      subpages/statistics/images/man.png
  7. BIN
      subpages/statistics/images/woman.png
  8. 71
      subpages/statistics/pages/residentPortrait2/residentPortrait.js
  9. 4
      subpages/statistics/pages/residentPortrait2/residentPortrait.json
  10. 164
      subpages/statistics/pages/residentPortrait2/residentPortrait.wxml
  11. 299
      subpages/statistics/pages/residentPortrait2/residentPortrait.wxss
  12. 21
      utils/api.js
  13. 7
      utils/util.js

6
app.json

@ -24,7 +24,8 @@
"pages": [ "pages": [
"pages/searchResult/searchResult", "pages/searchResult/searchResult",
"pages/searchRecords/searchRecords", "pages/searchRecords/searchRecords",
"pages/punchCard/punchCard" "pages/punchCard/punchCard",
"pages/checkLog/checkLog"
] ]
}, },
{ {
@ -60,6 +61,7 @@
"pages/dissatisfied/detial/detail", "pages/dissatisfied/detial/detail",
"pages/crowdPortrait/crowdPortrait", "pages/crowdPortrait/crowdPortrait",
"pages/residentPortrait/residentPortrait", "pages/residentPortrait/residentPortrait",
"pages/residentPortrait2/residentPortrait",
"pages/qzbmy/qzbmy", "pages/qzbmy/qzbmy",
"pages/sjwjj/sjwjj", "pages/sjwjj/sjwjj",
"pages/xqwmz/xqwmz", "pages/xqwmz/xqwmz",
@ -78,7 +80,6 @@
"pages": [ "pages": [
"pages/dissatisfied/demandCheck/demandCheck", "pages/dissatisfied/demandCheck/demandCheck",
"pages/dissatisfied/searchResi/searchResi" "pages/dissatisfied/searchResi/searchResi"
] ]
}, },
{ {
@ -103,7 +104,6 @@
"navigationBarTitleText": "WeChat", "navigationBarTitleText": "WeChat",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
}, },
"tabBar": { "tabBar": {
"color": "#333333", "color": "#333333",
"selectedColor": "#3A80E7", "selectedColor": "#3A80E7",

BIN
images/work/sqmp.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 91 KiB

120
subpages/addResi/pages/addResi/addResi.js

@ -1,6 +1,9 @@
// subpages/addResi/pages/addResi/addResi.js // subpages/addResi/pages/addResi/addResi.js
import api from "../../../../utils/api" import api from "../../../../utils/api"
import {$wuxSelect} from '../../../../components/dist/index' import { cardHide } from "../../../../utils/util"
import { $wuxSelect } from '../../../../components/dist/index'
import { import {
dictlist, dictlist,
getHouseType, getOldPeopleDetailById, getHouseType, getOldPeopleDetailById,
@ -12,6 +15,9 @@ import {
const app = getApp() const app = getApp()
Page({ Page({
data: { data: {
hideData: {},
isShowIdNum: true,
isShowIdTel: true,
formController: [], formController: [],
ensureHouseFlagOpen: false, ensureHouseFlagOpen: false,
unemployedFlagOpen: false, unemployedFlagOpen: false,
@ -23,6 +29,7 @@ Page({
specialCrowdFlagOpen: false, specialCrowdFlagOpen: false,
oldPeopleFlagOpen: false, oldPeopleFlagOpen: false,
publicWelfareFlagOpen: false, publicWelfareFlagOpen: false,
residentTypeForm: { residentTypeForm: {
ensureHouseFlag: [ ensureHouseFlag: [
{ {
@ -425,33 +432,33 @@ Page({
unitName: '', unitName: '',
houseList: [], houseList: [],
houseName: '', houseName: '',
genderList: [{label: '男', value: '1'}, {label: '女', value: '2'}], genderList: [{ label: '男', value: '1' }, { label: '女', value: '2' }],
genderName: '', genderName: '',
day: '', day: '',
value3: [], value3: [],
residentCategory: [ residentCategory: [
{title: '党员', value: 'partyFlag'}, { title: '党员', value: 'partyFlag' },
{title: '低保人员', value: 'subsistenceAllowanceFlag'}, { title: '低保人员', value: 'subsistenceAllowanceFlag' },
{title: '保障房人员', value: 'ensureHouseFlag', isForm: true}, { title: '保障房人员', value: 'ensureHouseFlag', isForm: true },
{title: '失业人员', value: 'unemployedFlag', isForm: true}, { title: '失业人员', value: 'unemployedFlag', isForm: true },
{title: '育龄妇女', value: 'fertileWomanFlag'}, { title: '育龄妇女', value: 'fertileWomanFlag' },
{title: '退役军人', value: 'veteranFlag', isForm: true}, { title: '退役军人', value: 'veteranFlag', isForm: true },
{title: '统战人员', value: 'unitedFrontFlag', isForm: true}, { title: '统战人员', value: 'unitedFrontFlag', isForm: true },
{title: '信访人员', value: 'petitionOfficerFlag'}, { title: '信访人员', value: 'petitionOfficerFlag' },
{title: '志愿者', value: 'volunteerFlag', isForm: true}, { title: '志愿者', value: 'volunteerFlag', isForm: true },
{title: '特扶人员', value: 'specialSupportFlag', isForm: true}, { title: '特扶人员', value: 'specialSupportFlag', isForm: true },
{title: '租户', value: 'tenantFlag', isForm: true}, { title: '租户', value: 'tenantFlag', isForm: true },
{title: '流动人口', value: 'floatingFlag'}, { title: '流动人口', value: 'floatingFlag' },
{title: '特殊人群', value: 'specialCrowdFlag', isForm: true}, { title: '特殊人群', value: 'specialCrowdFlag', isForm: true },
{title: '老年人', value: 'oldPeopleFlag', isForm: true}, { title: '老年人', value: 'oldPeopleFlag', isForm: true },
{title: '空巢老人', value: 'emptyNesterFlag'}, { title: '空巢老人', value: 'emptyNesterFlag' },
{title: '独居老人', value: 'liveAloneFlag'}, { title: '独居老人', value: 'liveAloneFlag' },
{title: '失能老人', value: 'disabledFlag'}, { title: '失能老人', value: 'disabledFlag' },
{title: '失智老人', value: 'dementedFlag'}, { title: '失智老人', value: 'dementedFlag' },
{title: '残疾', value: 'disabilityFlag'}, { title: '残疾', value: 'disabilityFlag' },
{title: '大病', value: 'seriousIllnessFlag'}, { title: '大病', value: 'seriousIllnessFlag' },
{title: '慢病', value: 'chronicDiseaseFlag'}, { title: '慢病', value: 'chronicDiseaseFlag' },
{title: '公益岗人员', value: 'publicWelfareFlag', isForm: true} { title: '公益岗人员', value: 'publicWelfareFlag', isForm: true }
], ],
residentCategorySty: '', residentCategorySty: '',
categoryInfo: '', categoryInfo: '',
@ -545,7 +552,7 @@ Page({
'form.name': name, 'form.name': name,
'form.birthday': birthday, 'form.birthday': birthday,
'form.gender': gender, 'form.gender': gender,
'form.idNum': idNum, 'form.idNum': cardHide(idNum),
'form.mobile': mobile, 'form.mobile': mobile,
'form.nation': nation, 'form.nation': nation,
'form.gridId': houseInfo?.gridId || '', // 使用了可选链 'form.gridId': houseInfo?.gridId || '', // 使用了可选链
@ -972,12 +979,14 @@ Page({
}, },
bindidNumInput(e) { bindidNumInput(e) {
this.setData({ this.setData({
isShowIdNum: false,
'form.idNum': e.detail.value 'form.idNum': e.detail.value
}) })
console.log(this.data.form) console.log(this.data.form)
}, },
bindMobileInput(e) { bindMobileInput(e) {
this.setData({ this.setData({
isShowIdTel: false,
'form.mobile': e.detail.value 'form.mobile': e.detail.value
}) })
console.log(this.data.form) console.log(this.data.form)
@ -1044,7 +1053,7 @@ Page({
}, },
onConfirm: (value, index, options) => { onConfirm: (value, index, options) => {
console.log('onConfirm', value, index, options) console.log('onConfirm', value, index, options)
let updatedForm = {...this.data.form}; let updatedForm = { ...this.data.form };
than.data.residentCategory.forEach(option => { than.data.residentCategory.forEach(option => {
if (value.includes(option.value)) { if (value.includes(option.value)) {
updatedForm[option.value] = 1; updatedForm[option.value] = 1;
@ -1114,8 +1123,11 @@ Page({
this.showToast('请填写联系电话') this.showToast('请填写联系电话')
return return
} }
console.log(this.data.isShowIdNum,this.data.formType != 'edit')
const parm = { const parm = {
...this.data.form, ...this.data.form,
// idNum: this.data.isShowIdNum&&this.data.formType === 'edit'?undefined:this.data.form.idNum,
// mobile: this.data.isShowIdTel&&this.data.formType === 'edit'?undefined:this.data.form.mobile,
ensureHouseDto: this.data.ensureHouseFlagOpen ? this.getValue(this.data.residentTypeForm.ensureHouseFlag) : undefined, ensureHouseDto: this.data.ensureHouseFlagOpen ? this.getValue(this.data.residentTypeForm.ensureHouseFlag) : undefined,
unemployedDto: this.data.unemployedFlagOpen ? this.getValue(this.data.residentTypeForm.unemployedFlag) : undefined, unemployedDto: this.data.unemployedFlagOpen ? this.getValue(this.data.residentTypeForm.unemployedFlag) : undefined,
veteranDto: this.data.veteranFlagOpen ? this.getValue(this.data.residentTypeForm.veteranFlag) : undefined, veteranDto: this.data.veteranFlagOpen ? this.getValue(this.data.residentTypeForm.veteranFlag) : undefined,
@ -1232,7 +1244,7 @@ Page({
} }
this.setData({residentTypeFormCell}) this.setData({ residentTypeFormCell })
// residentTypeForm // residentTypeForm
}, },
async openDynamicForms(e) { async openDynamicForms(e) {
@ -1281,7 +1293,7 @@ Page({
} }
let residentTypeForm = this.data.residentTypeForm let residentTypeForm = this.data.residentTypeForm
residentTypeForm[formtype].forEach(item => { residentTypeForm[formtype].forEach(item => {
if(item.key === 'userId') { if (item.key === 'userId') {
item.value = id item.value = id
} }
for (let i in data) { for (let i in data) {
@ -1333,14 +1345,14 @@ Page({
}, },
// 获取住房性质 // 获取住房性质
getHouseTypes() { getHouseTypes() {
getHouseType({formCode: "resi_base_info"}).then(res => { getHouseType({ formCode: "resi_base_info" }).then(res => {
console.log(res.data) console.log(res.data)
this.setPickerOptions('housingNature', res.data) this.setPickerOptions('housingNature', res.data)
}) })
}, },
getDictData(dictType, formName) { getDictData(dictType, formName) {
dictlist({'dictType': dictType}).then(res => { dictlist({ 'dictType': dictType }).then(res => {
this.setPickerOptions(formName, res.data) this.setPickerOptions(formName, res.data)
}); });
}, },
@ -1353,7 +1365,7 @@ Page({
} }
}) })
} }
this.setData({residentTypeForm}) this.setData({ residentTypeForm })
}, },
getValue(arry) { getValue(arry) {
let obj = {} let obj = {}
@ -1365,4 +1377,50 @@ Page({
}) })
return obj return obj
}, },
hideData(e) {
let key = e.currentTarget.dataset.key
let form = this.data.form
form[key] = this.data.hideData[key]
if(key === 'idNum') {
this.setData({
isShowIdNum: !this.data.isShowIdNum
})
}
if(key === 'mobile') {
this.setData({
isShowIdTel: !this.data.isShowIdTel
})
}
this.setData({
form
})
},
showData(e) {
let key = e.currentTarget.dataset.key
let form = this.data.form;
let hideData = this.data.hideData
hideData[key] = form[key]
this.setData({
hideData
})
api.getResiUserInfo(this.data.resiId).then(res => {
if(key === 'idNum') {
this.setData({
isShowIdNum: !this.data.isShowIdNum
})
}
if(key === 'mobile') {
this.setData({
isShowIdTel: !this.data.isShowIdTel
})
}
form[key] = res.data[key]
this.setData({
form
})
console.log(res.data[key], this.data.form[key])
})
}
}) })

3
subpages/addResi/pages/addResi/addResi.json

@ -1,7 +1,8 @@
{ {
"usingComponents": { "usingComponents": {
"wux-select": "../../../../components/dist/select", "wux-select": "../../../../components/dist/select",
"DynamicForms": "../../../../components/DynamicForms/DynamicForms" "DynamicForms": "../../../../components/DynamicForms/DynamicForms",
"van-icon": "@vant/weapp/icon/index"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }

100
subpages/addResi/pages/addResi/addResi.wxml

@ -1,8 +1,7 @@
<!--subpages/addResi/pages/addResi/addResi.wxml--> <!--subpages/addResi/pages/addResi/addResi.wxml-->
<view class="header"> <view class="header">
<image src="../../../../images/back.png" class="back" style=" top: {{statusHeight}}px;width: 50rpx;height: 50rpx;" <image src="../../../../images/back.png" class="back" style=" top: {{statusHeight}}px;width: 50rpx;height: 50rpx;" bindtap="back" mode="" />
bindtap="back" mode=""/> <image class="header-bg" src="../images/header.png" mode="widthFix" />
<image class="header-bg" src="../images/header.png" mode="widthFix"/>
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;"> <view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
{{formType == 'edit' ? '修改人口信息' : '新增人口信息'}} {{formType == 'edit' ? '修改人口信息' : '新增人口信息'}}
</view> </view>
@ -28,7 +27,7 @@
{{form.gridName ? form.gridName : '请选择'}} {{form.gridName ? form.gridName : '请选择'}}
</view> </view>
</picker> </picker>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -37,13 +36,12 @@
<view class="title">所在小区</view> <view class="title">所在小区</view>
</view> </view>
<view class="input"> <view class="input">
<picker bindchange="bindPickerChangevillageId" range-key="label" value="{{index}}" <picker bindchange="bindPickerChangevillageId" range-key="label" value="{{index}}" range="{{villageList}}">
range="{{villageList}}">
<view class="{{villageName?'':'gray'}}"> <view class="{{villageName?'':'gray'}}">
{{villageName ? villageName : '请选择'}} {{villageName ? villageName : '请选择'}}
</view> </view>
</picker> </picker>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -52,13 +50,12 @@
<view class="title">所在楼栋</view> <view class="title">所在楼栋</view>
</view> </view>
<view class="input"> <view class="input">
<picker bindchange="bindPickerChangebuilding" range-key="label" value="{{index}}" <picker bindchange="bindPickerChangebuilding" range-key="label" value="{{index}}" range="{{buildingList}}">
range="{{buildingList}}">
<view class="{{buildingName?'':'gray'}}"> <view class="{{buildingName?'':'gray'}}">
{{buildingName ? buildingName : '请选择'}} {{buildingName ? buildingName : '请选择'}}
</view> </view>
</picker> </picker>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -72,7 +69,7 @@
{{unitName ? unitName : '请选择'}} {{unitName ? unitName : '请选择'}}
</view> </view>
</picker> </picker>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_house"> <view class="form_house">
@ -82,13 +79,12 @@
<view class="title">所在房屋</view> <view class="title">所在房屋</view>
</view> </view>
<view class="input"> <view class="input">
<picker bindchange="bindPickerChangeHouse" range-key="label" value="{{index}}" <picker bindchange="bindPickerChangeHouse" range-key="label" value="{{index}}" range="{{houseList}}">
range="{{houseList}}">
<view class="{{houseName?'':'gray'}}"> <view class="{{houseName?'':'gray'}}">
{{houseName ? houseName : '请选择'}} {{houseName ? houseName : '请选择'}}
</view> </view>
</picker> </picker>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_bottom">选项中如无该房屋,请先 <view class="form_bottom">选项中如无该房屋,请先
@ -101,8 +97,7 @@
<view class="title">姓名</view> <view class="title">姓名</view>
</view> </view>
<view class="input"> <view class="input">
<input confirm-type="next" bindblur="bindNameInput" bindinput="bindNameInput" value="{{form.name}}" <input confirm-type="next" bindblur="bindNameInput" bindinput="bindNameInput" value="{{form.name}}" placeholder-class="gray" placeholder="请输入" />
placeholder-class="gray" placeholder="请输入"/>
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -116,7 +111,7 @@
{{genderName ? genderName : '请选择'}} {{genderName ? genderName : '请选择'}}
</view> </view>
</picker> </picker>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -130,7 +125,7 @@
{{form.birthday ? form.birthday : '请选择'}} {{form.birthday ? form.birthday : '请选择'}}
</view> </view>
</picker> </picker>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -139,8 +134,16 @@
<view class="title">证件号</view> <view class="title">证件号</view>
</view> </view>
<view class="input"> <view class="input">
<input confirm-type="next" bindblur="bindIdNumInput" bindinput="bindidNumInput" value="{{form.idNum}}" <input confirm-type="next" bindblur="bindIdNumInput" bindinput="bindidNumInput" value="{{form.idNum}}" placeholder-class="gray" placeholder="请输入" />
placeholder-class="gray" placeholder="请输入"/> <block wx:if="{{resiId}}">
<view bind:tap="showData" wx:if="{{isShowIdNum}}" data-key='idNum'>
<van-icon name="closed-eye" />
</view>
<view bind:tap="hideData" wx:else data-key='idNum'>
<van-icon name="eye-o" />
</view>
</block>
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -149,8 +152,15 @@
<view class="title">联系电话</view> <view class="title">联系电话</view>
</view> </view>
<view class="input"> <view class="input">
<input confirm-type="next" bindblur="bindMobileInput" bindinput="bindmobileInput" <input confirm-type="next" bindblur="bindMobileInput" bindinput="bindmobileInput" value="{{form.mobile}}" placeholder-class="gray" placeholder="请输入" />
value="{{form.mobile}}" placeholder-class="gray" placeholder="请输入"/> <block wx:if="{{resiId}}">
<view bind:tap="showData" wx:if="{{isShowIdTel}}" data-key='mobile'>
<van-icon name="closed-eye" />
</view>
<view bind:tap="hideData" wx:else data-key='mobile'>
<van-icon name="eye-o" />
</view>
</block>
</view> </view>
</view> </view>
</view> </view>
@ -163,8 +173,7 @@
<view class="title">户籍地</view> <view class="title">户籍地</view>
</view> </view>
<view class="input"> <view class="input">
<input confirm-type="next" bindblur="bindPlaceOfDomicileInput" bindinput="bindPlaceOfDomicileInput" <input confirm-type="next" bindblur="bindPlaceOfDomicileInput" bindinput="bindPlaceOfDomicileInput" value="{{form.resideInfoDto.placeOfDomicile}}" placeholder-class="gray" placeholder="请输入" />
value="{{form.resideInfoDto.placeOfDomicile}}" placeholder-class="gray" placeholder="请输入"/>
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -172,8 +181,7 @@
<view class="title">现居地</view> <view class="title">现居地</view>
</view> </view>
<view class="input"> <view class="input">
<input confirm-type="next" bindblur="bindCurrentResidenceInput" bindinput="bindCurrentResidenceInput" <input confirm-type="next" bindblur="bindCurrentResidenceInput" bindinput="bindCurrentResidenceInput" value="{{form.resideInfoDto.currentResidence}}" placeholder-class="gray" placeholder="请输入" />
value="{{form.resideInfoDto.currentResidence}}" placeholder-class="gray" placeholder="请输入"/>
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -186,7 +194,7 @@
{{form.nation ? nation[form.nation].label : '请选择'}} {{form.nation ? nation[form.nation].label : '请选择'}}
</view> </view>
</picker> </picker>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -194,8 +202,7 @@
<view class="title">籍贯</view> <view class="title">籍贯</view>
</view> </view>
<view class="input"> <view class="input">
<input confirm-type="next" bindblur="bindNativePlaceInput" bindinput="bindNativePlaceInput" <input confirm-type="next" bindblur="bindNativePlaceInput" bindinput="bindNativePlaceInput" value="{{form.resideInfoDto.nativePlace}}" placeholder-class="gray" placeholder="请输入" />
value="{{form.resideInfoDto.nativePlace}}" placeholder-class="gray" placeholder="请输入"/>
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -203,13 +210,12 @@
<view class="title">文化程度</view> <view class="title">文化程度</view>
</view> </view>
<view class="input"> <view class="input">
<picker bindchange="bindPickerChangeEducation" range-key="label" value="{{index}}" <picker bindchange="bindPickerChangeEducation" range-key="label" value="{{index}}" range="{{education}}">
range="{{education}}">
<view class="{{form.eduInfoDto.cultureLevel?'':'gray'}}"> <view class="{{form.eduInfoDto.cultureLevel?'':'gray'}}">
{{form.eduInfoDto.cultureLevel ? education[form.eduInfoDto.cultureLevel].label : '请选择'}} {{form.eduInfoDto.cultureLevel ? education[form.eduInfoDto.cultureLevel].label : '请选择'}}
</view> </view>
</picker> </picker>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
@ -217,13 +223,12 @@
<view class="title">婚姻状况</view> <view class="title">婚姻状况</view>
</view> </view>
<view class="input"> <view class="input">
<picker bindchange="bindPickerChangemarriage" range-key="label" value="{{index}}" <picker bindchange="bindPickerChangemarriage" range-key="label" value="{{index}}" range="{{marriageList}}">
range="{{marriageList}}">
<view class="{{form.familyInfoDto.marriage?'':'gray'}}"> <view class="{{form.familyInfoDto.marriage?'':'gray'}}">
{{marriageName ? marriageName : '请选择'}} {{marriageName ? marriageName : '请选择'}}
</view> </view>
</picker> </picker>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_item "> <view class="form_item ">
@ -231,8 +236,7 @@
<view class="title">宗教信仰</view> <view class="title">宗教信仰</view>
</view> </view>
<view class="input"> <view class="input">
<input confirm-type="next" bindblur="bindReligionInput" bindinput="bindReligionInput" <input confirm-type="next" bindblur="bindReligionInput" bindinput="bindReligionInput" value="{{form.religionDto.religion}}" placeholder-class="gray" placeholder="请输入" />
value="{{form.religionDto.religion}}" placeholder-class="gray" placeholder="请输入"/>
</view> </view>
</view> </view>
</view> </view>
@ -248,32 +252,20 @@
<view class="residentCategorySty {{residentCategorySty?'':'gray'}}" style="text-align: left;"> <view class="residentCategorySty {{residentCategorySty?'':'gray'}}" style="text-align: left;">
{{residentCategorySty ? residentCategorySty : '请选择'}} {{residentCategorySty ? residentCategorySty : '请选择'}}
</view> </view>
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
<view class="form_item" <view class="form_item" wx:for="{{residentTypeFormCell}}" :key="index" bind:tap="openDynamicForms" data-title="{{item.title}}" data-formtype="{{item.value}}">
wx:for="{{residentTypeFormCell}}"
:key="index"
bind:tap="openDynamicForms"
data-title="{{item.title}}"
data-formtype="{{item.value}}"
>
<view class="label"> <view class="label">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
</view> </view>
<view class="input text-right"> <view class="input text-right">
<image src="../../../../images/right.png" mode=""/> <image src="../../../../images/right.png" mode="" />
</view> </view>
</view> </view>
</view> </view>
<view class="bottom_btn" bind:tap="submit">提交</view> <view class="bottom_btn" bind:tap="submit">提交</view>
</view> </view>
<wux-select id="wux-select3"/> <wux-select id="wux-select3" />
<DynamicForms <DynamicForms show="{{isShowDynamicForms}}" title="{{dynamicFormsTitle}}" bind:close="closeDynamicForms" bind:ok="okDynamicForms" formController="{{formController}}" />
show="{{isShowDynamicForms}}"
title="{{dynamicFormsTitle}}"
bind:close="closeDynamicForms"
bind:ok="okDynamicForms"
formController="{{formController}}"
/>

BIN
subpages/statistics/images/man.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
subpages/statistics/images/woman.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

71
subpages/statistics/pages/residentPortrait2/residentPortrait.js

@ -0,0 +1,71 @@
import {
getFamilyRelationshipList, getPersonalFeature,
getPersonalFile, potentialSatisfactionForResident, queryResidentFollowRecord
} from "../../../../utils/statisticsApi";
Page({
data: {
id: 0,
userInfo: {},
relationship: {},
unSolvedNum: 0,
unFinishNum: 0,
noServiceNum: 0,
event12345Num: 0,
provinceSatisfactionNum: 0,
selfInspectNum: 0,
logList: [],
tags: {}
},
onLoad(options) {
this.setData({
id: options.id
})
this.getUser()
this.getNum()
this.getlog()
},
getUser() {
getPersonalFile({resid: this.data.id}).then(({data}) => {
this.setData({
userInfo: data
})
})
getFamilyRelationshipList({resid: this.data.id, type: 0}).then(({data}) => {
this.setData({
relationship: data
})
})
getPersonalFeature({resid: this.data.id}).then(({data}) => {
this.setData({
tags: data
})
})
},
getNum() {
let params = {
resiId: this.data.id,
};
potentialSatisfactionForResident(params).then(({data}) => {
this.setData({
unSolvedNum: data.unSolvedNum,
unFinishNum: data.unFinishNum,
noServiceNum: data.noServiceNum,
event12345Num: data.event12345Num,
provinceSatisfactionNum: data.provinceSatisfactionNum,
selfInspectNum: data.selfInspectNum
})
});
},
getlog() {
let params = {
resiId: this.data.id,
};
queryResidentFollowRecord(params).then(({data}) => {
this.setData({
logList: data
})
})
}
})

4
subpages/statistics/pages/residentPortrait2/residentPortrait.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "居民画像",
"usingComponents": {}
}

164
subpages/statistics/pages/residentPortrait2/residentPortrait.wxml

@ -0,0 +1,164 @@
<view class="resident-container">
<view class="card">
<view class="title">居民档案</view>
<view class="user-info">
<image src="../../images/woman.png" class="img" mode="widthFix" />
<view class="name">
张三 125468745410
</view>
</view>
<view class="user-infos">
<view class="label">
居住地址:
</view>
<view class="value">
四季景园1号楼1单元101
</view>
</view>
<view class="user-infos">
<view class="label">
所属网格:
</view>
<view class="value">
第三网格
</view>
</view>
<view class="user-infos">
<view class="label">
入户状况:
</view>
<view class="value">
入户一致
</view>
</view>
<view class="user-infos">
<view class="label">
居住类型:
</view>
<view class="value">
与子女同住
</view>
</view>
<view class="user-infos">
<view class="label">
家庭预警:
</view>
<view class="value">
满意度风险家庭
</view>
</view>
<view class="table">
<view class="tr">
<view class="th">姓名</view>
<view class="th" style="flex:2">与本人关系</view>
<view class="th">性别</view>
<view class="th">年龄</view>
</view>
<view class="tr" wx:for="{{relationship}}" wx:key="{{index}}">
<view class="td">{{item.name}}</view>
<view class="td" style="flex:2">{{item.houseHolderRel ? item.houseHolderRel : ''}}</view>
<view class="td">{{item.gender == 2?'男':item.gender == 1?'女':item.gender === '0'?'未知':''}}</view>
<view class="td">{{item.age}}
<image mode="widthFix" class="table-right-icon" src="../../images/right2.png" />
</view>
</view>
</view>
</view>
<view class="card">
<view class="title">居民画像</view>
<view class="portrait">
<view class="bg">
<image src="../../images/jmhx_center.png" mode="widthFix" />
</view>
<view class="tags">
<view class="tag" wx-if="{{tags.age}}">
<view class="text">{{tags.age}}岁</view>
</view>
<view class="tag" wx-if="{{tags.category1}}">
<view class="text">{{tags.category1}}</view>
</view>
<view class="tag" wx-if="{{tags.category2}}">
<view class="text">{{tags.category2}}</view>
</view>
<view class="tag" wx-if="{{tags.monthIncomeLevel}}">
<view class="text">{{tags.monthIncomeLevel}}</view>
</view>
<view class="tag" wx-if="{{tags.cultureLevel}}">
<view class="text">{{tags.cultureLevel}}</view>
</view>
<view class="tag" wx-if="{{tags.marriage}}">
<view class="text">{{tags.marriage}}</view>
</view>
<view class="tag" wx-if="{{tags.gender || tags.gender === '0'}}">
<view class="text">{{tags.gender == 2?'男':tags.gender == 1?'女':tags.gender === '0'?'未知':''}}</view>
</view>
</view>
</view>
</view>
<view class="card">
<view class="title">历史及潜在不满意事项</view>
<view class="num-list">
<view class="num-item">
<view class="txt">
<text>12345投诉</text>
</view>
<view class="num">{{event12345Num}}</view>
</view>
<view class="num-item">
<view class="txt">
<text>省满意度调查</text>
</view>
<view class="num">{{provinceSatisfactionNum}}</view>
</view>
<view class="num-item">
<view class="txt">
<text>社区满意度自查</text>
</view>
<view class="num">{{selfInspectNum}}</view>
</view>
<view class="num-item">
<view class="txt">
<text>事件未解决
的次数</text>
</view>
<view class="num">{{unSolvedNum}}</view>
</view>
<view class="num-item">
<view class="txt">
<text>需求未满足
的次数</text>
</view>
<view class="num">{{unFinishNum}}</view>
</view>
<view class="num-item">
<view class="txt">
<text>应享未享服务
的次数</text>
</view>
<view class="num">{{noServiceNum}}</view>
</view>
</view>
</view>
<view class="card">
<view class="title">回访记录</view>
<view class="log-list">
<view class="log-item" wx:for="{{logList}}" wx:key="{{index}}">
<view>
<view class="user">
<view class="tag blue">{{item.followUpWay}}</view>
<view class="name">{{item.followPersonName}}({{item.roleNames}})</view>
</view>
<view class="date">{{item.followTime}}</view>
</view>
<image src="../../../images/right.png" mode="widthFix" class="icon" />
</view>
</view>
</view>
</view>

299
subpages/statistics/pages/residentPortrait2/residentPortrait.wxss

@ -0,0 +1,299 @@
.resident-container {
padding: 20rpx;
}
page {
background-color: #f7f7f7;
}
.card {
background: #fff;
border-radius: 20rpx;
padding: 30rpx;
margin-top: 20rpx;
}
.card .title {
font-size: 34rpx;
font-weight: bold;
color: #333333;
display: flex;
align-items: center;
margin-left: -30rpx;
margin-bottom: 39rpx;
position: relative;
}
.card .title:before {
content: '';
display: block;
width: 10rpx;
height: 28rpx;
background: #3A80E7;
border-radius: 4rpx;
margin-right: 20rpx;
}
.user-info .name {
font-size: 32rpx;
font-weight: bold;
color: #333333;
margin-bottom: 30rpx;
}
.user-info .address {
font-size: 28rpx;
font-weight: 400;
color: #666666;
padding-bottom: 30rpx;
}
.table .tr {
display: flex;
padding: 0 20rpx;
}
.table .tr .th {
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.table .tr .td {
font-size: 30rpx;
font-weight: 500;
color: #666666;
}
.table .tr .th,
.table .tr .td {
flex: 1;
position: relative;
height: 100rpx;
line-height: 100rpx;
}
.table .tr:nth-of-type(2n) {
background: rgba(58, 128, 231, 0.08);
}
.table-right-icon {
width: 24rpx;
height: 24rpx;
position: absolute;
right: 0;
top: calc(50% - 12rpx);
}
.portrait {
position: relative;
width: 633rpx;
height: 542rpx;
font-size: 30rpx;
font-weight: bold;
color: #3A80E7;
line-height: 36rpx;
}
.portrait .tag {
position: absolute;
background: #f4f8fe;
padding: 30rpx;
width: 129rpx;
height: 129rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
text-align: center;
}
.portrait .tag:after {
content: "";
display: block;
width: calc(100% - 28rpx);
height: calc(100% - 28rpx);
position: absolute;
left: 14rpx;
top: 14rpx;
background: #d3e3fa;
border-radius: 50%;
}
.portrait .tag .text {
position: relative;
z-index: 2;
}
.portrait .tag:nth-of-type(1) {
padding: 38rpx;
width: 163rpx;
height: 163rpx;
left: 227rpx;
top: 0;
}
.portrait .tag:nth-of-type(2) {
padding: 24rpx;
width: 121rpx;
height: 121rpx;
right: 58rpx;
top: 101rpx;
}
.portrait .tag:nth-of-type(3) {
width: 145rpx;
height: 145rpx;
right: 0rpx;
top: 249rpx;
}
.portrait .tag:nth-of-type(4) {
width: 163rpx;
height: 163rpx;
right: 100rpx;
bottom: 0;
}
.portrait .tag:nth-of-type(5) {
left: 99rpx;
bottom: 10rpx;
}
.portrait .tag:nth-of-type(6) {
left: 0rpx;
top: 251rpx;
}
.portrait .tag:nth-of-type(7) {
left: 53rpx;
top: 101rpx;
}
.bg {
width: 238rpx;
height: 238rpx;
position: absolute;
left: calc(50% - 119rpx);
top: calc(50% - 100rpx);
}
.bg image {
width: 100%;
height: 100%;
}
.num-list {
display: flex;
width: 100%;
justify-content: space-between;
position: relative;
flex-wrap: wrap;
}
.num-list .num-item {
flex: 0 0 33.333333%;
position: relative;
margin-bottom: 20rpx;
}
.num-list .num-item:after {
content: '';
display: block;
position: absolute;
right: 25rpx;
top: calc(50% - 45rpx);
width: 1rpx;
height: 90rpx;
background: #C1C1C1;
opacity: 0.66;
}
.num-list .num-item:nth-of-type(3n):after {
display: none;
}
.num-list .num-item:last-child:after {
display: none;
}
.num-list .num-item .txt {
font-size: 28rpx;
font-weight: 500;
color: #999999;
margin-bottom: 10rpx;
}
.num-list .num-item .num {
font-size: 42rpx;
font-weight: bold;
color: #333333;
}
.tag {
display: inline-block;
line-height: 40rpx;
height: 40rpx;
border-radius: 20rpx;
font-size: 26rpx;
font-weight: 500;
padding: 0 20rpx;
margin-right: 30rpx;
}
.blue {
background: rgba(79, 148, 255, 0.14);
color: #4F94FF;
}
.orange {
background: rgba(255, 120, 60, 0.14);
color: #FF783C;
}
.green {
background: rgba(4, 184, 173, 0.14);
color: #04B8AD;
}
.red {
color: #FA1919;
background: rgba(255, 48, 27, 0.14);
}
.log-item {
border-bottom: 1px solid #EAEAEA;
padding: 30rpx 0;
}
.log-item .user {
display: flex;
align-items: center;
}
.log-item .tag {
margin-right: 17px;
}
.log-item .icon {
width: 48rpx;
height: 48rpx;
}
.log-item .name {
font-size: 32rpx;
font-weight: 500;
color: #333333;
}
.log-item .date {
font-size: 28rpx;
font-weight: 500;
color: #C1C1C1;
margin-top: 17rpx;
}
.log-item {
display: flex;
justify-content: space-between;
align-items: center;
}
.img {
width: 128rpx;
height: 128rpx
}
.user-info {
display: flex;
}

21
utils/api.js

@ -44,7 +44,10 @@ module.exports = {
clockRecords, clockRecords,
clearOneMessage, clearOneMessage,
getPubKey, getPubKey,
changePassword changePassword,
getCheckLogList,
getLastLog,
getResiUserInfo
} }
// 获取公钥 // 获取公钥
@ -205,7 +208,7 @@ function getAgencygridtree () {
} }
// 上报事件 // 上报事件
function addEvent (parm) { function addEvent (parm) {
return fly.post(`governance/icEvent/add-event-resi`,parm) return fly.post(`governance/icEventOld/add-event-resi`,parm)
} }
// 上报诉求中选择居民 // 上报诉求中选择居民
function getResidentBaseInfoPage (parm) { function getResidentBaseInfoPage (parm) {
@ -227,3 +230,17 @@ function getFollowUpDetail(id) {
function clockRecords(parm) { function clockRecords(parm) {
return fly.post(`actual/base/clockRecords/save`,parm) return fly.post(`actual/base/clockRecords/save`,parm)
} }
// 打卡记录
function getCheckLogList(parm) {
return fly.get(`actual/base/clockRecords/logList`,parm)
}
// 打卡记录
function getLastLog(parm) {
return fly.get(`actual/base/clockRecords/lastLog`,parm)
}
// 获取居民敏感信息
function getResiUserInfo(id) {
return fly.post(`actual/base/residentBaseInfo/getResiUserInfo/${id}`)
}

7
utils/util.js

@ -18,7 +18,14 @@ const formatTime = date => {
let newContent= html.replace(/\<img/gi, '<img style="width:100%;height:auto;display:block;"'); let newContent= html.replace(/\<img/gi, '<img style="width:100%;height:auto;display:block;"');
return newContent return newContent
} }
function cardHide(card) {
const reg = /^(.{10})(?:\d+)(.{2})$/;
const maskedIdCard = card.replace(reg, '$1******$2');
return maskedIdCard;
}
module.exports = { module.exports = {
cardHide: cardHide,
formatTime: formatTime, formatTime: formatTime,
formatRichText: formatRichText formatRichText: formatRichText
} }

Loading…
Cancel
Save