Browse Source

Merge branch 'data-page' of http://120.46.222.128:10021/elink-star/epmet-work-mp into work_tab_bar

# Conflicts:
#	subpages/searchResult/pages/resiInfo/resiInfo.js
#	subpages/searchResult/pages/resiInfo/resiInfo.wxml
work_tab_bar
是小王呀\24601 2 years ago
parent
commit
10b251e1a3
  1. BIN
      images/house/czMax.png
  2. BIN
      images/house/czMin.png
  3. BIN
      images/house/wcsMax.png
  4. BIN
      images/house/wcsMin.png
  5. BIN
      images/house/xzMax.png
  6. BIN
      images/house/xzMin.png
  7. BIN
      images/house/zzMax.png
  8. BIN
      images/house/zzMin.png
  9. 711
      pages/resiAndHouse/resiAndHouse.js
  10. 61
      pages/resiAndHouse/resiAndHouse.wxml
  11. 861
      pages/resiAndHouse/resiAndHouse.wxss
  12. 3
      project.config.json
  13. 178
      subpages/addResi/pages/addResi/addResi.js
  14. 1
      subpages/addResi/pages/addResi/addResi.json
  15. 93
      subpages/addResi/pages/addResi/addResi.wxml
  16. 259
      subpages/searchResult/pages/resiInfo/component/graph/graph.js
  17. 6
      subpages/searchResult/pages/resiInfo/component/graph/graph.json
  18. 4
      subpages/searchResult/pages/resiInfo/component/graph/graph.wxml
  19. 9
      subpages/searchResult/pages/resiInfo/component/graph/graph.wxss
  20. 863
      subpages/searchResult/pages/resiInfo/resiInfo.js
  21. 7
      subpages/searchResult/pages/resiInfo/resiInfo.json
  22. 130
      subpages/searchResult/pages/resiInfo/resiInfo.wxml
  23. 241
      subpages/searchResult/pages/resiInfo/resiInfo.wxss
  24. 36
      utils/api.js
  25. 1
      utils/config.js

BIN
images/house/czMax.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

BIN
images/house/czMin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

BIN
images/house/wcsMax.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

BIN
images/house/wcsMin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

BIN
images/house/xzMax.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

BIN
images/house/xzMin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

BIN
images/house/zzMax.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

BIN
images/house/zzMin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

711
pages/resiAndHouse/resiAndHouse.js

@ -1,272 +1,493 @@
// pages/resiAndHouse/resiAndHouse.js
import api, {
getAllOrgCategoryCount,
getResidentBaseInfo,
getCommunityHouse
getAllOrgCategoryCount,
getResidentBaseInfo,
getTopTree,
getNextTree,
houseSearch,
allOrgHouseInfo,
getCommunityHouse
} from "../../utils/api"
const App = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
activeType: 0,
tabList: [],
tableData: [],
resiList: [{
name: '',
resiTags: [''],
nationalityName: '',
nationName: '',
mobile: '',
idNum: '',
agencyName: '',
homeName: '',
updatedTime: ''
}
/**
* 页面的初始数据
*/
data: {
activeType: 0,
tabList: [],
tableData: [],
tableFwData: [],
resiList: [{
name: '',
resiTags: [''],
nationalityName: '',
nationName: '',
mobile: '',
idNum: '',
agencyName: '',
homeName: '',
updatedTime: ''
}
],
pageNo: 1,
pageSize: 10,
lowerThreshold: '10',
loadMoreVisible: false,
loadMoreType: "none",
nodata:false,
selectVale: 'resi',
keyWord: '',
angencyId: null,
category: null,
searchOrgIdPath: '',
angencyList: [], //组织树
showAngenCascader: false,
agencyName:'',
fieldName: {
text: 'agencyName',
value: 'agencyId',
children: 'subAgencyList'
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
searchOrgIdPath: App.globalData.user.agencyId,
cascaderName: App.globalData.user.agencyName,
agencyName: App.globalData.user.agencyName
})
this.getAgencygridtree()
this.getAllOrgCategoryCount()
this.getTableData()
},
//
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
],
pageNo: 1,
pageSize: 10,
lowerThreshold: '10',
loadMoreVisible: false,
loadFwMoreVisible: false,
loadMoreType: "none",
loadFwMoreType: "none",
nodata: false,
selectVale: 'resi',
keyWord: '1',
angencyId: null,
category: null,
searchOrgIdPath: '',
cascaderFwValue: '',
angencyList: [], //组织树
angencyFwList: [], //房屋组织树
showAngenCascader: false,
agencyName: '',
fieldName: {
text: 'agencyName',
value: 'agencyId',
children: 'subAgencyList'
},
fieldNameFw: {
text: 'label',
value: 'id',
children: 'children'
},
cascaderNameFw: null,
showFw: false,
params: {
agencyId: '',
orgId: '',
level: 'district',
orgInfo:''
},
params1: {
"searchKey": "",
"pageSize": 50,
"pageNo": 1,
"searchOrgIdPath": "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
},
activeFwType: 0,
fwTypes: [
{ name: '房屋', num: 0, value: '' },
{ name: '自住', num: 0, value: '0' },
{ name: '出租', num: 0, value: '1' },
{ name: '闲置', num: 0, value: '2' },
{ name: '未出售', num: 0, value: '3' },
]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
searchOrgIdPath: App.globalData.user.agencyId,
cascaderName: App.globalData.user.agencyName,
cascaderNameFw: App.globalData.user.agencyName,
agencyName: App.globalData.user.agencyName,
params: {
...this.data.params,
agencyId:App.globalData.user.agencyId,
orgId:App.globalData.user.agencyId
},
params1: {
...this.data.params1,
searchOrgIdPath:App.globalData.user.agencyId,
}
})
this.getTableFwData()
this.getAgencygridtree()
this.getAllOrgCategoryCount()
this.getTableData()
this.getTopTreeData()
},
//
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
this.getIntelligentMessage()
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
this.getIntelligentMessage()
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
toOCRCard() {
wx.navigateTo({
url: '/subpages/OCRCard/pages/index/index',
})
},
handelClickTab(e) {
this.setData({
activeType: e.currentTarget.dataset.index,
category: e.currentTarget.dataset.category,
tableData:[]
})
this.getTableData()
},
handelBlurKeyWord(e) {
this.setData({
keyWord: e.detail.value
})
},
handelClickSearchType(e) {
this.setData({
selectVale: e.currentTarget.dataset.type
})
},
handelClickShowTree() {
this.setData({
showAngenCascader: true
})
},
// 组织树
getAgencygridtree() {
api.getAgencygridtree().then(res => {
this.setData({
angencyList: [res.data],
})
}).catch(err => {
console.log(err);
})
},
async handelClickSearch() {
this.setData({
pageNo:1,
tableData:[]
})
this.getAllOrgCategoryCount()
this.getTableData()
},
handelClickToOcr() {
wx.navigateTo({
url: '/subpages/OCRCard/pages/index/index',
})
},
// 获取居民概览
getAllOrgCategoryCount() {
let parm = {
residentInfo: this.data.keyWord,
agencyId:App.globalData.user.agencyId,
orgId: this.data.searchOrgIdPath,
level: 'agency'
}
api.getAllOrgCategoryCount(parm).then(res => {
if (res.code == 0) {
res.data.forEach(item => {
if (item.categoryName === '党员') {
item.category = 'party'
} else if (item.categoryName === '关注人群') {
item.category = 'attention'
} else if (item.categoryName === '特殊人群') {
item.category = 'special'
} else if (item.categoryName === '非健康人群') {
item.category = 'health'
}
},
toOCRCard() {
wx.navigateTo({
url: '/subpages/OCRCard/pages/index/index',
})
},
handelClickTab(e) {
this.setData({
activeType: e.currentTarget.dataset.index,
category: e.currentTarget.dataset.category,
tableData: []
})
this.getTableData()
},
handelClickTabFw(e) {
this.setData({
tabList: res.data.filter(item => item.categoryName == '党员' || item.categoryName == '关注人群' || item.categoryName == '特殊人群' || item.categoryName == '非健康人群' || item.categoryName == '居民').reverse()
activeFwType: e.currentTarget.dataset.index,
// category: e.currentTarget.dataset.category,
tableFwData: [],
params1: {
...this.data.params1,
pageNo: 1,
"category": e.currentTarget.dataset.category,
},
})
}
}).catch(err => {
console.log(err);
})
},
toResiDetail(e) {
// '1765976717767618562'
console.log(e);
wx.navigateTo({
url: `/subpages/searchResult/pages/resiInfo/resiInfo?resiId=${e.currentTarget.dataset.resiid}`,
})
},
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:[]
})
this.getAllOrgCategoryCount()
this.getTableData()
},
onClose() {
this.setData({
showAngenCascader: false
})
},
this.getTableFwData()
},
handelBlurKeyWord(e) {
this.setData({
keyWord: e.detail.value
})
},
getTopTreeData() {
getTopTree().then(res => {
const arr = res.data.children.map(item => {
return {
...item,
children: []
}
})
this.setData({
angencyFwList: [{ ...res.data, children: arr }],
})
})
},
getTreeFun(id, arr, data) {
return arr.map(item => {
if (id == item.id) {
return {
...item,
children: data,
}
}
if (item.children && item.children.length > 0) {
return {
...item,
children: this.getTreeFun(id, item.children, data),
}
}
return item
})
},
onChangeFw(e) {
const { value, tabIndex, selectedOptions } = e.detail;
if (tabIndex > 0 && selectedOptions[selectedOptions.length - 1].level != 'building') {
const level = selectedOptions[selectedOptions.length - 1].level
getNextTree({ level, id: value }).then(res => {
if (res.data.length > 0) {
const data = res.data.map(item => {
if (item.level != 'building') {
return {
...item,
children: []
}
}
return {
...item,
children: null
}
});
const arr = this.getTreeFun(value, this.data.angencyFwList, data);
this.setData({
angencyFwList: arr,
})
} else {
const arr = this.getTreeFun(value, this.data.angencyFwList, null);
this.setData({
angencyFwList: arr,
})
}
})
}
},
onCloseFw() {
this.setData({
showFw: false,
});
},
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 = {
searchKey: this.data.keyWord,
pageSize: this.data.pageSize,
pageNo: this.data.pageNo,
category:this.data.category,
searchOrgIdPath:this.data.searchOrgIdPath
}
let {
data,
code,
msg
} = await getResidentBaseInfo(parm)
if (code == 0) {
onFinishFw(e) {
const { selectedOptions, value } = e.detail;
// const fieldNameFw = selectedOptions
// .map((option) => option.text || option.name)
// .join('/');
const level = selectedOptions[selectedOptions.length - 1].level
this.setData({
cascaderNameFw: e.detail.selectedOptions.map(item => item.label).join(' '),
showFw: false,
cascaderFwValue: value,
params: {
...this.data.params,
orgId: value,
level,
},
params1: {
...this.data.params1,
searchOrgIdPath: value,
orgId: value,
level,
},
});
this.getTableFwData()
},
handelClickSearchType(e) {
this.setData({
selectVale: e.currentTarget.dataset.type
})
},
handelClickShowTree() {
this.setData({
loadMoreType: data.list.length === this.data.pageSize ? 'more' : 'none',
tableData: this.data.tableData.concat(data.list),
showAngenCascader: true
})
if (this.data.tableData.length == 0) {
this.setData({
loadMoreVisible: false,
nodata: true
})
},
handelClickShowTreeFw() {
this.setData({
showFw: true
})
},
// 组织树
getAgencygridtree() {
api.getAgencygridtree().then(res => {
this.setData({
angencyList: [res.data],
})
}).catch(err => {
console.log(err);
})
},
async handelClickSearch() {
if (this.data.selectVale === 'resi') {
this.setData({
pageNo: 1,
tableData: []
})
this.getTableData()
}else{
this.setData({
pageNo: 1,
tableFwData: []
})
this.getTableFwData()
}
},
handelClickToOcr() {
wx.navigateTo({
url: '/subpages/OCRCard/pages/index/index',
})
},
// 获取居民概览
getAllOrgCategoryCount() {
let parm = {
residentInfo: this.data.keyWord,
agencyId: App.globalData.user.agencyId,
orgId: this.data.searchOrgIdPath,
level: 'agency'
}
} else {
api.getAllOrgCategoryCount(parm).then(res => {
if (res.code == 0) {
res.data.forEach(item => {
if (item.categoryName === '党员') {
item.category = 'party'
} else if (item.categoryName === '关注人群') {
item.category = 'attention'
} else if (item.categoryName === '特殊人群') {
item.category = 'special'
} else if (item.categoryName === '非健康人群') {
item.category = 'health'
}
})
this.setData({
tabList: res.data.filter(item => item.categoryName == '党员' || item.categoryName == '关注人群' || item.categoryName == '特殊人群' || item.categoryName == '非健康人群' || item.categoryName == '居民').reverse()
})
}
}).catch(err => {
console.log(err);
})
},
toResiDetail(e) {
// '1765976717767618562'
console.log(e);
wx.navigateTo({
url: `/subpages/searchResult/pages/punchCard/punchCard?resiId=${e.currentTarget.dataset.resiid}`,
})
},
onClickJump(e) {
console.log('e::', e)
// '1765976717767618562'?resiId=${e.currentTarget.dataset.resiid}
wx.navigateTo({
url: `/subpages/house/pages/housePortrait/housePortrait?resiId=${e.currentTarget.dataset.resiid}`,
})
},
onFinish(e) {
this.setData({
loadMoreVisible: false,
nodata: true,
loadMoreType:'none'
pageNo: 1,
searchOrgIdPath: e.detail.selectedOptions[e.detail.selectedOptions.length - 1].agencyId,
cascaderName: e.detail.selectedOptions.map(item => item.agencyName).join(','),
tableData: []
})
}
} catch(err) {
console.log(err);
this.setData({
loadMoreVisible: false,
nodata: true,
loadMoreType:'none'
})
}
},
this.getTableData()
},
onClose() {
this.setData({
showAngenCascader: false
})
},
onScrollToLower(e) {
})
if (this.data.loadMoreType === 'more') {
this.setData({
loadMoreVisible: true,
})
this.data.pageNo += 1
this.getTableData()
}
},
onScrollFwToLower(e) {
console.log('this.data.loadFwMoreType::','zoule', this.data.loadFwMoreType)
if (this.data.loadFwMoreType === 'more') {
this.setData({
loadFwMoreVisible: true,
})
this.data.params1.pageNo += 1
this.getTableFwData()
}
},
getTableData: async function () {
try {
this.setData({
loadMoreVisible: true,
nodata: false,
loadMoreType: "more",
})
let parm = {
searchKey: this.data.keyWord,
pageSize: this.data.pageSize,
pageNo: this.data.pageNo,
category: this.data.category,
searchOrgIdPath: this.data.searchOrgIdPath
}
let {
data,
code,
msg
} = await getResidentBaseInfo(parm)
if (code == 0) {
this.setData({
loadMoreType: data.list.length === this.data.pageSize ? 'more' : 'none',
tableData: this.data.tableData.concat(data.list),
})
if (this.data.tableData.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'
})
}
},
getTableFwData: async function () {
this.setData({
loadMoreVisible: true,
nodata: false,
loadMoreType: "more",
})
await allOrgHouseInfo({ ...this.data.params }).then(res => {
const data = [];
let num = 0;
res.data.forEach((item, index) => {
if (index < 4) {
let value = item.name == '自住' ? '0' : item.name == '出租' ? '1' : item.name == '闲置' ? '2' : item.name == '未出售' ? '3' : '';
data.push({ ...item, value });
num = num + parseInt(item.num);
}
})
const arr = [{ name: '房屋', num, value: '' }, ...data];
this.setData({
fwTypes: arr
})
})
await houseSearch({ ...this.data.params1, searchKey: this.data.keyWord }).then(res => {
const { code, data } = res;
if (code == 0) {
this.setData({
loadFwMoreType: data.list.length === this.data.params1.pageSize ? 'more' : 'none',
tableFwData: this.data.tableFwData.concat(data.list),
})
if (this.data.tableData.length == 0) {
this.setData({
loadMoreVisible: false,
nodata: true
})
}
} else {
this.setData({
loadMoreVisible: false,
nodata: true,
loadMoreType: 'none'
})
}
})
}
})

61
pages/resiAndHouse/resiAndHouse.wxml

@ -23,7 +23,7 @@
<text>搜索</text>
</view>
</view>
</view>
</view>
</view>
<view class="group_2" wx:if="{{selectVale === 'resi'}}">
@ -56,8 +56,6 @@
</view>
<view class="text-wrapper_9">
<!-- <text lines="1" class="text_19">信息完整度:</text>
<text lines="1" class="text_20">40%</text> -->
</view>
</view>
<view class="box_19">
@ -93,7 +91,64 @@
</scroll-view>
</view>
</view>
<view class="group_2" wx:if="{{selectVale === 'house'}}">
<view class="section_2">
<view class="box_16">
<text lines="1" class="text_4" bind:tap="handelClickShowTreeFw">{{cascaderNameFw}}</text>
<view class="image-text_9">
<view class="image-text_qh">
<text lines="1" class="text_5" bind:tap="handelClickShowTreeFw">切换</text>
<image src="../../images/swapHorizontal.png" class="image_8"></image>
</view>
</view>
</view>
<view class="box_17">
<view class="tabs">
<view class="tab_item_fw {{activeFwType === index ? 'border_bto' : ''}}" wx:for="{{fwTypes}}" bind:tap="handelClickTabFw" data-index="{{index}}" data-category="{{item.value}}">
<view class="num">{{item.num}}</view>
<view class="name" style="color:{{activeFwType === index?'#3974f6':'#666666'}}">{{item.name}}</view>
</view>
</view>
</view>
<view style="margin-left: 24rpx;">
<text class="text_51">注:</text>
<image src="../../images/house/zzMin.png" class="image_81"></image>
<text lines="1" class="text_51" bind:tap="handelClickShowTreeFw">自住</text>
<image src="../../images/house/czMin.png" class="image_81 image_82"></image>
<text style="margin-left:1" lines="1" class="text_51" bind:tap="handelClickShowTreeFw">出租</text>
<image src="../../images/house/xzMin.png" class="image_81 image_82"></image>
<text lines="1" class="text_51" bind:tap="handelClickShowTreeFw">闲置</text>
<image src="../../images/house/wcsMin.png" class="image_81 image_82"></image>
<text lines="1" class="text_51" bind:tap="handelClickShowTreeFw">未出售</text>
</view>
<scroll-view class="scroll_fw form_item_fw" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollFwToLower">
<view class="form_item_fw">
<view wx:for="{{tableFwData}}" :wx:key="{{index}}" bind:tap="onClickJump" data-resiId="{{item.id}}" class="form_item_fw_item">
<view class="item_fw">
<view class="item_imgs_fw">
<image class="item_img_fw_img" wx:if="{{item.rentFlagName=='自住'}}" src="../../images/house/zzMax.png"></image>
<image class="item_img_fw_img" wx:if="{{item.rentFlagName=='出租'}}" src="../../images/house/czMax.png"></image>
<image class="item_img_fw_img" wx:if="{{item.rentFlagName=='闲置'}}" src="../../images/house/xzMax.png"></image>
<image class="item_img_fw_img" wx:if="{{item.rentFlagName=='未出售'}}" src="../../images/house/wcsMax.png"></image>
</view>
<view class="item_texts_fw">
<view class="item_text_hh">{{item.houseName}}</view>
<view class="item_text_rs">
{{item.resiTotal}}人
</view>
</view>
</view>
</view>
</view>
<load-more loadVisible="{{loadFwMoreVisible}}" loadType="{{loadFwMoreType}}"></load-more>
<no-data isShow="{{nodata}}" wx:if="{{tableFwData.length==0}}"></no-data>
</scroll-view>
</view>
</view>
<custom-tab-bar></custom-tab-bar>
<van-popup show="{{ showAngenCascader }}" round position="bottom">
<van-cascader field-names="{{fieldName}}" wx:if="{{showAngenCascader}}" value="{{ searchOrgIdPath }}" title="请选择" options="{{ angencyList }}" bind:close="onClose" bind:finish="onFinish" />
</van-popup>
<van-popup show="{{ showFw }}" round position="bottom">
<van-cascader wx:if="{{ showFw }}" field-names="{{ fieldNameFw }}" value="{{ cascaderFwValue }}" title="请选择所在地区" options="{{ angencyFwList }}" bind:close="onCloseFw" bind:change="onChangeFw" bind:finish="onFinishFw" />
</van-popup>

861
pages/resiAndHouse/resiAndHouse.wxss

File diff suppressed because it is too large

3
project.config.json

@ -45,7 +45,8 @@
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false
"useCompilerPlugins": false,
"condition": false
},
"compileType": "miniprogram",
"libVersion": "2.19.4",

178
subpages/addResi/pages/addResi/addResi.js

@ -690,7 +690,8 @@ Page({
],
},
],
popupTitle: '新增'
popupTitle: '新增',
formType:null
},
/**
@ -699,9 +700,17 @@ Page({
onLoad: async function (options) {
if(options.type === 'edit'){
this.setData({
resiId:options.resiId
resiId:options.resiId,
formType:options.type
})
this.userXiangQ(options)
wx.setNavigationBarTitle({
title: '编辑居民',
})
}else{
wx.setNavigationBarTitle({
title: '新增居民',
})
}
this.setData({
agencyId: app.globalData.user.agencyId,
@ -817,51 +826,6 @@ Page({
activeForm: 3
})
}
// const parm = {
// ...this.data.form,
// }
// if (this.data.formType == 'edit') {
// parm.resiId = this.data.resiId
// try {
// const res = await api.resiEdit(parm)
// if (res.code === 0) {
// wx.showToast({
// title: '编辑成功',
// duration: 3000,
// success: function () {
// setTimeout(() => {
// wx.navigateBack({
// delta: 1
// })
// }, 3000)
// }
// })
// }
// } catch (err) {
// console.log(err);
// }
// } else {
// try {
// const res = await api.resiAdd(parm)
// if (res.code === 0) {
// wx.showToast({
// title: '新增成功',
// duration: 3000,
// success: function () {
// setTimeout(() => {
// wx.navigateBack({
// delta: 1
// })
// }, 3000)
// }
// })
// }
// } catch (err) {
// console.log(err);
// }
// }
},
showToast(title) {
wx.showToast({
@ -1000,7 +964,7 @@ Page({
const selectedIndex = e.detail.value;
const selectedVillage = this.data.form.resideInfoDtos[indexP].optionsB[selectedIndex];
this.setData({
['form.resideInfoDtos[' + indexP + '].buildingName']: selectedVillage.label,
['form.resideInfoDtos[' + indexP + '].buildName']: selectedVillage.label,
['form.resideInfoDtos[' + indexP + '].buildId']: selectedVillage.value,
['form.resideInfoDtos[' + indexP + '].unitId']: null,
['form.resideInfoDtos[' + indexP + '].unitName']: null,
@ -1029,7 +993,7 @@ Page({
const selectedIndex = e.detail.value;
const selectedVillage = this.data.form.resideInfoDtos[indexP].optionsH[selectedIndex];
this.setData({
['form.resideInfoDtos[' + indexP + '].houseName']: selectedVillage.label,
['form.resideInfoDtos[' + indexP + '].doorName']: selectedVillage.label,
['form.resideInfoDtos[' + indexP + '].homeId']: selectedVillage.value
});
},
@ -1194,12 +1158,15 @@ Page({
bindPickerChangeNation(e) {
this.setData({
"form.baseInfoDto.nation": this.data.dicts.nationList[e.detail.value].value
"form.baseInfoDto.nation": this.data.dicts.nationList[e.detail.value].value,
"form.baseInfoDto.nationName": this.data.dicts.nationList[e.detail.value].label
})
},
bindPickerChangeEducation(e) {
this.setData({
"form.eduInfoDto.cultureLevel": this.data.dicts.educationList[e.detail.value].value
"form.eduInfoDto.cultureLevel": this.data.dicts.educationList[e.detail.value].value,
"form.eduInfoDto.cultureLevelName": this.data.dicts.educationList[e.detail.value].label,
})
},
bindPickerChangeMarriage(e) {
@ -1328,7 +1295,6 @@ Page({
})
},
bindSpecialCategory(e){
console.log(e);
if(e.detail.value == '1'){
let specialCategoryCodes = this.data.form.specialDto.specialCategoryCodes;
@ -1435,36 +1401,94 @@ Page({
delete item.optionsH
delete item.optionsV
})
api.submitResi(form).then(res=>{
if(res.code === 0){
wx.showToast({
title: '新增成功',
duration: 3000,
success: function () {
setTimeout(() => {
wx.navigateBack({
delta: 1
})
}, 3000)
}
if(this.data.formType === 'edit'){
api.updatetResi(form).then(res=>{
if(res.code === 0){
wx.showToast({
title: '修改成功',
duration: 3000,
success: function () {
setTimeout(() => {
wx.navigateBack({
delta: 1
})
}, 3000)
}
})
}else{
wx.showToast({
title: res.msg,
})
}else{
wx.showToast({
title: res.msg,
})
}
})
console.log(this.data.form);
}
})
}else{
api.submitResi(form).then(res=>{
if(res.code === 0){
wx.showToast({
title: '新增成功',
duration: 3000,
success: function () {
setTimeout(() => {
wx.navigateBack({
delta: 1
})
}, 3000)
}
})
}else{
wx.showToast({
title: res.msg,
})
}
})
}
console.log(this.data.form,'提交表单');
},
//**编辑回填逻辑 start*/
userXiangQ(option){
api.userXiangQ(this.data.resiId).then(res=>{
this.setData({
form:res.data,
"form.baseInfoDto.name":option.name,
"form.baseInfoDto.idNum":option.idNum,
"form.baseInfoDto.mobile":option.mobile,
})
if(res.code == 0){
// 特殊人群类别
let specialResidentCategory = this.data.dicts.specialResidentCategory
let marriageName, careerStatusName,idTypeName,resideInfoDtos = null;
if(res.data.specialDto && res.data.specialDto.specialCategoryCodes){
specialResidentCategory.forEach(item=>{
if(res.data.specialDto.specialCategoryCodes.indexOf(item.value) !== -1){
item.radioValue = 1
}else{
item.radioValue = 0
}
})
}
if(res.data.familyInfoDto && res.data.familyInfoDto.marriage){
marriageName = this.data.dicts.marriageList.find(item=>item.value == res.data.familyInfoDto.marriage).label
}
if(res.data.workInfoDto && res.data.workInfoDto.careerStatus){
careerStatusName = this.data.dicts.careerStatusList.find(item=>item.value == res.data.workInfoDto.careerStatus).label
}
if(res.data.baseInfoDto && res.data.baseInfoDto.idType){
idTypeName = this.data.dicts.idTypeList.find(item=>item.value == res.data.workInfoDto.careerStatus).label
}
if(res.data.resideInfoDtos){
for(let i in res.data.resideInfoDtos){
this.getQuartersOptions(res.data.resideInfoDtos[i].gridId,i)
this.getBuildingoption(res.data.resideInfoDtos[i].villageId,i)
this.getUnitoption(res.data.resideInfoDtos[i].buildId,i)
this.getHouseoption(res.data.resideInfoDtos[i].unitId,i)
}
}
this.setData({
form:res.data,
"form.baseInfoDto.name":option.name,
"form.baseInfoDto.idNum":option.idNum,
"form.baseInfoDto.mobile":option.mobile,
"dicts.specialResidentCategory":specialResidentCategory,
marriageName:marriageName,
careerStatusName:careerStatusName,
idTypeName:idTypeName
})
}
}).catch(err=>{
console.log(err);
})

1
subpages/addResi/pages/addResi/addResi.json

@ -1,5 +1,4 @@
{
"navigationBarTitleText": "新增居民",
"usingComponents": {
"wux-select": "../../../../components/dist/select",
"DynamicForms": "../../../../components/DynamicForms/DynamicForms",

93
subpages/addResi/pages/addResi/addResi.wxml

@ -42,8 +42,8 @@
</view>
<view class="input">
<picker bindchange="bindPickerChangebuilding" range-key="label" value="{{index}}" range="{{form.resideInfoDtos[indexP].optionsB}}" data-indexP="{{indexP}}">
<view class="{{form.resideInfoDtos[indexP].buildingName?'':'gray'}}">
{{form.resideInfoDtos[indexP].buildingName ? form.resideInfoDtos[indexP].buildingName : '请选择'}}
<view class="{{form.resideInfoDtos[indexP].buildName?'':'gray'}}">
{{form.resideInfoDtos[indexP].buildName ? form.resideInfoDtos[indexP].buildName : '请选择'}}
</view>
</picker>
<image src="../../../../images/right.png" mode="" />
@ -70,8 +70,8 @@
</view>
<view class="input">
<picker bindchange="bindPickerChangeHouse" range-key="label" value="{{index}}" range="{{form.resideInfoDtos[indexP].optionsH}}" data-indexP="{{indexP}}">
<view class="{{form.resideInfoDtos[indexP].houseName?'':'gray'}}">
{{form.resideInfoDtos[indexP].houseName ? form.resideInfoDtos[indexP].houseName : '请选择'}}
<view class="{{form.resideInfoDtos[indexP].doorName?'':'gray'}}">
{{form.resideInfoDtos[indexP].doorName ? form.resideInfoDtos[indexP].doorName : '请选择'}}
</view>
</picker>
<image src="../../../../images/right.png" mode="" />
@ -265,7 +265,7 @@
<view class="input">
<picker bindchange="bindPickerChangeNation" range-key="label" value="{{index}}" range="{{dicts.nationList}}">
<view class="{{form.baseInfoDto.nation?'':'gray'}}">
{{form.baseInfoDto.nation ? dicts.nationList[form.baseInfoDto.nation].label : '请选择'}}
{{form.baseInfoDto.nationName? form.baseInfoDto.nationName : '请选择'}}
</view>
</picker>
<image src="../../../../images/right.png" mode="" />
@ -278,7 +278,7 @@
<view class="input">
<picker bindchange="bindPickerChangeEducation" range-key="label" value="{{index}}" range="{{dicts.educationList}}">
<view class="{{form.eduInfoDto.cultureLevel?'':'gray'}}">
{{form.eduInfoDto.cultureLevel ? dicts.educationList[form.eduInfoDto.cultureLevel].label : '请选择'}}
{{form.eduInfoDto.cultureLevelName ? form.eduInfoDto.cultureLevelName : '请选择'}}
</view>
</picker>
<image src="../../../../images/right.png" mode="" />
@ -460,8 +460,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindUnempCompensationFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.unemployedDto.unempCompensationFlag==1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.unemployedDto.unempCompensationFlag==0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -472,8 +472,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindEmploymentHardFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.unemployedDto.employmentHardFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.unemployedDto.employmentHardFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -498,8 +498,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindElderlyFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.familyInfoDto.elderlyFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.familyInfoDto.elderlyFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -537,9 +537,9 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindPartyFlag">
<radio value="0" checked="true" color="#3974f6" />群众
<radio value="1" color="#3974f6" />党员
<radio value="2"color="#3974f6" />共青团员
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.partyFlag==0?true:false}}" color="#3974f6" />群众
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.partyFlag==1?true:false}}" color="#3974f6" />党员
<radio value="2" checked="{{form.baseInfoDto.categoryInfo.partyFlag==2?true:false}}" color="#3974f6" />共青团员
</radio-group>
</view>
</view>
@ -560,8 +560,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="disabilityFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.disabilityFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.disabilityFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -579,8 +579,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="seriousIllnessFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.seriousIllnessFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.seriousIllnessFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
@ -599,8 +599,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="chronicDiseaseFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.chronicDiseaseFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.chronicDiseaseFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
@ -619,8 +619,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="deathFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.deathFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.deathFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
@ -644,8 +644,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="oldPeopleFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.oldPeopleFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.oldPeopleFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -662,8 +662,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="subsistenceAllowanceFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.subsistenceAllowanceFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.subsistenceAllowanceFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -680,8 +680,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="veteranFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.veteranFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.veteranFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -698,8 +698,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="form.attentionResiDto.ensureHouseFlag" data-category="ensureHouseFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.ensureHouseFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.ensureHouseFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -716,8 +716,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="fertileWomanFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.fertileWomanFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.fertileWomanFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -728,8 +728,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="specialSupportFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.specialSupportFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.specialSupportFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -751,11 +751,12 @@
<view class="label">
<view class="title">{{radioItem.label}}</view>
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindSpecialCategory" data-category="{{radioItem.value}}">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
</radio-group>
<radio value="{{radioItem.radioValue}}" checked="{{radioItem.radioValue==1?true:false}}" color="#3974f6" />是
<radio value="{{radioItem.radioValue}}" checked="{{radioItem.radioValue == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
</view>
@ -770,8 +771,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="volunteerFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.volunteerFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.volunteerFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
@ -789,8 +790,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="buildingChiefFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.buildingChiefFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.buildingChiefFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
@ -802,8 +803,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="unitChiefFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.unitChiefFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.unitChiefFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>
</view>
@ -814,8 +815,8 @@
</view>
<view class="input">
<radio-group class="radio_group" bindchange="bindResiLabelFlag" data-category="publicWelfareFlag">
<radio value="1" checked="true" color="#3974f6" />是
<radio value="0" checked="true" color="#3974f6" />否
<radio value="1" checked="{{form.baseInfoDto.categoryInfo.publicWelfareFlag == 1?true:false}}" color="#3974f6" />是
<radio value="0" checked="{{form.baseInfoDto.categoryInfo.publicWelfareFlag == 0?true:false}}" color="#3974f6" />否
</radio-group>
</view>

259
subpages/searchResult/pages/resiInfo/component/graph/graph.js

@ -0,0 +1,259 @@
import * as echarts from '../../../../../../ec-canvas/ec-canvas';
import api from "../../../../../../utils/api";
var chart;
var listdata = [];
var links = [];
var legendes = ["手机IMSI", "人脸ID", "车牌号码", "人脸ID"];
var texts = [];
// function initChart(canvas, width, height, dpr) {
// chart = echarts.init(canvas, null, {
// width: width,
// height: height,
// devicePixelRatio: dpr // 像素比
// });
// canvas.setChart(chart);
// return chart;
// }
Component({
properties: {
resid: {
type: String,
value: '',
observer(val) {
this.getData()
}
}
},
data: {
ec: {
lazyLoad: true
},
},
lifetimes: {
ready() {
console.log(this.data.resid);
this.getData()
}
},
methods: {
getData() {
this.selectComponent('#hotlineComplaints').init((canvas, width, height, dpr) => {
// chart = echarts.init(canvas, null, {
// width: width,
// height: height,
// devicePixelRatio: dpr // 像素比
// });
// canvas.setChart(chart);
let params = {
type: 0,
resid: this.data.resiId
}
api.getFamilyRelationshipList(params).then(({
data
}) => {
console.log(data);
var phoneNum = {
"手机号:13856978256": "13856978256",
"手机号:13998745632": "13998745632",
"手机号:18812345678": "18812345678",
"手机号:16812345678": "16812345678",
"手机号:13856971111": "13856978256",
"手机号:13998742222": "13998745632",
"手机号:18812344444": "18812345678",
"手机号:16812343333": "16812345678",
"手机号:13878978256": "13856978256",
"手机号:137895632": "13998745632",
};
var phoneIMSI = ["次数:1,匹配度:6%", "次数:3,匹配度:30%", "次数:2,匹配度:26%",
"次数:2,匹配度:26%", "次数:2,匹配度:26%", "次数:2,匹配度:26%",
"匹配手机号码", "匹配手机号码", "匹配手机号码", "匹配手机号码"
]
var carNum = {
"车牌号码:豫AJ9685": "豫AJ9685",
"车牌号码:豫AG5123": "豫AG5123",
"车牌号码:豫AG6822": "豫AG6822",
"车牌号码:豫CJ9685": "豫AJ9685",
"车牌号码:豫AD5123": "豫AG5123",
"车牌号码:豫AT6822": "豫AG6822",
"车牌号码:豫AG6622": "豫AG6822",
"车牌号码:豫CJ9885": "豫AJ9685",
}
const relationShipCar = ["匹配车牌号码", "匹配车牌号码", "匹配车牌号码", "匹配车牌号码", "匹配车牌号码", "匹配车牌号码", "匹配车牌号码", "匹配车牌号码", "匹配车牌号码"]
this.setDataPhone(phoneNum, 0);
this.setDataCar(carNum, 2);
this.setDataPerson(mainRelationShip, 3);
this.setLinkData(phoneNum, phoneIMSI, legendes[3]);
this.setLinkData(carNum, relationShipCar, legendes[3]);
let option = {
title: {
text: "关系图绑定点击事件",
top: "top",
left: "left",
textStyle: {
color: '#000000'
}
},
tooltip: {
formatter: '{b}'
},
backgroundColor: '#f7f7f7',
legend: {
data: legendes,
textStyle: {
color: '#000000'
},
icon: 'circle',
type: 'scroll',
orient: 'vertical',
left: 10,
top: 20,
bottom: 20,
itemWidth: 10,
itemHeight: 10
},
animationDuration: 1000,
animationEasingUpdate: 'quinticInOut',
series: [{
type: 'graph',
layout: 'force',
force: {
repulsion: 80,
gravity: 0,
edgeLength: 150,
layoutAnimation: true,
},
data: listdata,
links: links,
categories: texts,
roam: false,
nodeScaleRatio: 0,
focusNodeAdjacency: false,
lineStyle: {
normal: {
opacity: 0.5,
width: 1.5,
curveness: 0
}
},
label: {
normal: {
show: true,
position: 'inside',
textStyle: {
color: '#000000',
fontWeight: 'normal',
fontSize: "12" //字体大小
},
formatter: function (params) {
return params.data.showName
},
fontSize: 18,
fontStyle: '600',
}
},
edgeLabel: {
normal: {
show: true,
textStyle: {
fontSize: 12
},
formatter: "{c}"
}
}
}],
color: ['#e8b842', '#41b1ef', '#667aed', '#347fbb', '#772cdc',
'#ff69b4', '#ba55d3', '#cd5c5c', '#ffa500', '#40e0d0'
]
}
chart.setOption(option);
})
return chart;
});
},
setDataPhone(json, n) {
var i = 0;
for (var p in json) {
listdata.push({
x: i * 50,
y: size + i * 10,
"name": p,
"showName": json[p],
"symbol": 'image://' + "/asset/get/s/data-1561621386236-0IGCc48l6.png",
"symbolSize": size,
"category": n,
"draggable": "false",
formatter: function (params) {
return params.data.showName
},
label: {
position: 'bottom'
}
});
i++;
}
},
setDataCar(json, n) {
var i = 0;
for (var p in json) {
listdata.push({
x: i * 50,
y: size + i * 10,
"name": p,
"showName": json[p],
"symbol": 'image://' + "/asset/get/s/data-1561621379686-rZHoryrBV.png",
"symbolSize": size,
"category": n,
"draggable": "false",
formatter: function (params) {
return params.data.showName
},
label: {
position: 'bottom'
}
});
i++;
}
},
setLinkData(json, relarr, title) {
if (relarr !== "") {
var i = 0;
for (var p in json) {
links.push({
"source": p,
"target": title,
"value": relarr[i],
lineStyle: {
normal: {
// text: relarr[i],
color: 'source'
}
}
});
i++;
}
} else {
for (var p2 in json) {
links.push({
"source": p2,
"target": title,
"value": "",
lineStyle: {
normal: {
color: 'source'
}
}
});
}
}
}
}
});

6
subpages/searchResult/pages/resiInfo/component/graph/graph.json

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"ec-canvas": "../../../../../../ec-canvas/ec-canvas"
}
}

4
subpages/searchResult/pages/resiInfo/component/graph/graph.wxml

@ -0,0 +1,4 @@
<!--subpages/searchResult/pages/resiInfo/modules/graph/graph.wxml-->
<view class="hotlineComplaints">
<ec-canvas id="hotlineComplaints" canvas-id="hotlineComplaints" ec="{{ ec }}"></ec-canvas>
</view>

9
subpages/searchResult/pages/resiInfo/component/graph/graph.wxss

@ -0,0 +1,9 @@
/* subpages/searchResult/pages/resiInfo/modules/graph/graph.wxss */
ec-canvas {
width: 100%;
height: 100%;
}
.hotlineComplaints {
width: 100%;
height: 318rpx;
}

863
subpages/searchResult/pages/resiInfo/resiInfo.js

@ -1,20 +1,843 @@
// subpages/searchResult/pages/resiInfo/resiInfo.js
<<<<<<< HEAD
=======
import api from "../../../../utils/api"
var http = require('../../../../utils/request.js')
const QQMapWX = require('../../../../utils/qqmap-wx-jssdk')
const app = getApp()
var timerId = null;
>>>>>>> dfe56009a6df6ddb9f15a1825578dabd99db092e
Page({
/**
* 页面的初始数据
*/
data: {
<<<<<<< HEAD
=======
checkPassword:false,
form: {},
resiId: "",
punchFlag: null,
currentTime: '',
address: '',
longitude: '',
latitude: '',
agencyLevel: '',
recentTime: '',
lastLog: {},
tabList: [],
originalExpandList: [{
id: "healthDto",
title: "残疾信息",
scrollId: "disability",
children: [{
label: "残疾类别",
itemType: "select1",
formName: "disabilityCategoryCode",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "disability_category_code"
},
opction: [],
},
{
label: "残疾等级",
itemType: "select1",
formName: "disabilityLevel",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "disability_level"
},
opction: [],
},
{
label: "残疾证号",
itemType: "input1",
formName: "disabilityNum",
},
{
label: "残疾说明",
itemType: "input1",
formName: "disabilityDesc",
},
{
label: "监护人",
itemType: "radio1",
formName: "guardianFlag",
opction: [{
label: "有",
formName: "",
value: 1
},
{
label: "无",
formName: "",
value: 0
},
],
},
{
label: "监护人姓名",
itemType: "input1",
formName: "guardianName",
},
{
label: "监护人联系电话",
itemType: "input1",
formName: "guardianMobile",
},
{
label: "技能特长",
itemType: "radio1",
formName: "specialSkillFlag",
opction: [{
label: "有",
formName: "",
value: 1
},
{
label: "无",
formName: "",
value: 0
},
],
},
{
label: "劳动能力",
itemType: "radio1",
formName: "workCapacityFlag",
opction: [{
label: "有",
formName: "",
value: 1
},
{
label: "无",
formName: "",
value: 0
},
],
},
],
},
{
id: "seriousIllnessDto",
title: "大病信息",
scrollId: "serious_illness",
children: [{
label: "所患大病",
itemType: "checkbox",
formName: "illnessCodes",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "illness_code"
},
opction: [],
}, ],
},
{
id: "chronicDiseaseDto",
title: "慢病信息",
scrollId: "chronic_disease",
children: [{
label: "所患慢病",
itemType: "checkbox",
formName: "chronicDiseaseCodes",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "chronic_disease_code"
},
opction: [],
}, ],
},
{
id: "deathDto",
title: "死亡信息",
scrollId: "death",
children: [{
label: "死亡时间",
itemType: "datepicker1",
formName: "deathTime",
}, ],
},
{
id: "oldPeopleDto",
title: "老年人信息",
scrollId: "old_people",
children: [{
label: "老年人分类",
itemType: "checkbox",
multiple: true,
formName: "oldPeopleCategories",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "oldPeople_categories"
},
},
{
label: "居住情况",
itemType: "select1",
formName: "resideSituation",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "reside_situation"
},
},
{
label: "高龄补助",
itemType: "inputNum",
formName: "oldSubsidy",
},
],
},
{
id: "subsistenceAllowanceDto",
title: "低保信息",
scrollId: "subsistence_allowance",
children: [{
label: "低保类别",
itemType: "select1",
formName: "category",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "subsistence_allowance_category"
},
},
{
label: "低保享受原因",
itemType: "checkbox",
formName: "reasons",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "subsistence_allowance_reasons"
},
opction: [],
},
],
},
{
id: "parymemberInfoDto",
title: "党员信息",
scrollId: "party_member",
children: [{
label: "入党时间",
itemType: "datepicker1",
formName: "joinTime",
opction: [],
},
{
label: "转正时间",
itemType: "datepicker1",
formName: "positiveTime",
opction: [],
},
{
label: "所属党组织",
itemType: "cascader1",
formName: "partyOrgId",
opction: [],
},
{
label: "流动党员",
itemType: "radio1",
formName: "flowFlag",
opction: [{
label: "是",
value: 1
},
{
label: "否",
value: 0
},
],
},
{
label: "流动党员活动证号",
itemType: "input1",
formName: "flowActNum",
},
{
label: "职务",
itemType: "select1",
formName: "partyJob",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "party_job"
},
opction: [],
},
{
label: "工作职责",
itemType: "input1",
formName: "duty",
},
{
label: "是否退休",
itemType: "radio1",
formName: "retiredFlag",
opction: [{
label: "是",
value: 1
},
{
label: "否",
value: 0
},
],
},
{
label: "党员中心户",
itemType: "radio1",
formName: "centerFlag",
opction: [{
label: "是",
value: 1
},
{
label: "否",
value: 0
},
],
},
{
label: "免学习",
itemType: "radio1",
formName: "studyNotNeed",
opction: [{
label: "是",
value: 1
},
{
label: "否",
value: 0
},
],
},
{
label: "入党时所在党支部",
itemType: "input1",
formName: "joinBranchName",
},
{
label: "组织关系转入社区时间",
itemType: "datepicker1",
formName: "joinCommunityTime",
opction: [],
},
],
},
{
id: "ensureHouseDto",
title: "保障房信息",
scrollId: "ensure_house",
children: [{
label: "所在社区",
itemType: "input1",
formName: "liveCommunity",
},
{
label: "住房性质",
itemType: "select1",
formName: "housingNature",
opctionUrl: "sys/dict/data/house",
opctionParams: {
formCode: "resi_base_info"
},
opction: [],
},
],
},
{
id: "veteranDto",
title: "退役军人信息",
scrollId: "veteran",
children: [{
label: "入伍时间",
itemType: "datepicker1",
formName: "joinArmyTime",
opction: [],
},
{
label: "退伍时间",
itemType: "datepicker1",
formName: "leaveArmyTime",
opction: [],
},
{
label: "服役单位",
itemType: "input1",
formName: "serviceUnit",
},
{
label: "接收单位",
itemType: "input1",
formName: "receiveUnit",
},
{
label: "待安置补助金",
itemType: "inputNum",
formName: "settlementAmount",
opction: [],
},
{
label: "培训状况",
itemType: "input1",
formName: "trainDesc",
},
{
label: "现就业情况",
itemType: "input1",
formName: "employmentSituation",
},
{
label: "是否办理公益性岗位",
itemType: "radio1",
formName: "pubWelfareJobFlag",
opction: [{
label: "是",
value: 1
},
{
label: "否",
value: 0
},
],
},
],
},
{
id: "unitedFrontDto",
title: "统战人员信息",
scrollId: "united_front",
children: [{
label: "统战类型",
itemType: "input1",
formName: "unitedFrontType",
}, ],
},
{
id: "volunteerDto",
title: "志愿者信息",
children: [{
label: "志愿者类别",
itemType: "checkbox",
formName: "volunteerCategory",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "VOLUNTEER_CATEGORY"
},
opction: [],
}, ],
},
{
id: "specialSupportDto",
title: "特扶人员信息",
scrollId: "special_support",
children: [{
//0
label: "特扶类别",
itemType: "select1",
formName: "specialSupportType",
opction: [{
value: "1",
label: "失独",
},
{
value: "2",
label: "伤残",
},
],
},
{
//1
label: "子女姓名",
itemType: "input1",
formName: "childName",
opction: [],
},
{
//2
label: "子女性别",
itemType: "select1",
formName: "childGender",
opction: [{
value: "1",
label: "男",
},
{
value: "2",
label: "女",
},
],
},
{
label: "子女死亡日期",
itemType: "datepicker1",
formName: "childDeathDate",
opction: [],
},
{
label: "子女伤残类别",
itemType: "select1",
formName: "childDisabilityCategoryCode",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "disability_category_code"
},
opction: [],
},
{
label: "子女伤残等级",
itemType: "select1",
formName: "childDisabilityLevel",
opctionUrl: "sys/dict/data/dictlist",
opctionParams: {
dictType: "disability_level"
},
opction: [],
},
],
},
],
expandList: [],
activeType: 0,
tagList: [],
idTypeList: [{
label: '其他',
value: 0
},
{
label: '身份证',
value: 1
},
{
label: '护照',
value: 2
},
{
label: '港澳通行证',
value: 3
},
{
label: '军人证',
value: 4
},
{
label: '台胞证',
value: 5
}
],
marriageList:[
{
label:"未婚",
value:'weihun'
},
{
label:"初婚",
value:'chuhun'
},
{
label:"离婚",
value:'lihun'
},
{
label:"再婚",
value:'zaihun'
},
{
label:"复婚",
value:'fuhun'
}
],
password:''
>>>>>>> dfe56009a6df6ddb9f15a1825578dabd99db092e
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
<<<<<<< HEAD
},
=======
this.updateTime();
timerId = setInterval(this.updateTime, 1000);
if (options.resiId) {
this.setData({
resiId: options.resiId,
'form.baseInfoDto.name':options.name,
'form.baseInfoDto.idNum':options.idNum,
'form.baseInfoDto.mobile':options.mobile,
})
this.getResiInfo()
}
// this.data.qqMapWX = new QQMapWX({
// key: 'CMJBZ-4DECI-JXGGN-5B4WU-QLV2H-B5BEJ'
// })
// this.reverseLocation()
this.setData({
agencyLevel: app.globalData.user.level
})
// this.getLastLogs()
},
updateTime() {
let date = new Date();
let hours = date.getHours().toString().padStart(2, '0');
let minutes = date.getMinutes().toString().padStart(2, '0');
let seconds = date.getSeconds().toString().padStart(2, '0');
this.setData({
currentTime: `${hours}:${minutes}:${seconds}`
});
},
getResiInfo: async function () {
try {
let res = await api.getResiInfo(this.data.resiId);
let marriageName = '--'
if (res.data.residentCategoryStr) {
res.data.baseInfoDto.categoryInfo.categoryNames = res.data.residentCategoryStr.split(',')
}
if(res.data.familyInfoDto&&res.data.familyInfoDto.marriage){
marriageName = this.data.marriageList.filter(item=>item.value == res.data.familyInfoDto.marriage)[0].label
}
// 处理tab
this.setData({
form: res.data,
marriageName:marriageName
});
await this.updateTabList(res.data.integrityData.integrityQtyMap)
} catch (err) {
console.log(err);
}
},
updateTabList: async function (value) {
const nameMap = {
reside: "居住信息",
ext: "拓展信息",
united_front: "统战人员信息",
party_member: "党员信息",
death: "死亡信息",
disability: "残疾信息",
subsistence_allowance: "低保信息",
serious_illness: "大病信息",
veteran: "退役军人信息",
special_support: "特扶人员信息",
old_people: "老年人信息",
ensure_house: "保障房信息",
chronic_disease: "慢病信息",
base: "基本信息",
graph:"关系图谱"
};
let list = Object.entries(
value
)
.map(([key, value]) => ({
name: nameMap[key],
id: key,
filledQty: value.filledQty,
totalQty: value.totalQty,
}))
.reverse();
list.push({
name:'关系图谱',
id:"graph"
})
this.setData({
tabList: list
})
let arr = this.data.tabList.filter(
(item) =>
item.filledQty > 0 || (
item.name == "拓展信息" ||
item.name == "基本信息")
);
let arrs = []
arrs = this.data.originalExpandList.filter((itemA) => {
return arr.some((itemB) => itemB.name === itemA.title);
});
await Promise.all(
arrs.map(async (item) => {
await Promise.all(
item.children.map(async (child) => {
const key = child.formName;
if (this.data.form[item.id].hasOwnProperty(key)) {
child.value = await this.getDictName(
child.opctionUrl,
child.opctionParams,
this.data.form[item.id][
key == "partyOrgId" ? "branchId" : key
],
child.itemType,
child.opction
);
}
})
);
})
);
this.setData({
expandList: arrs
})
},
getDictName: async function (url, params, value, itemType, opction) {
try {
if (url) {
const {
data
} = await http.post(url, params);
if (itemType == "checkbox") {
const matchedLabels = value
.map((item) => {
const matchedItems = data.filter(
(obj) => obj.value === item
);
if (matchedItems.length > 0) {
return matchedItems
.map((matchedItem) => matchedItem.label)
.join(",");
} else {
return "";
}
})
.join(",");
return matchedLabels ? matchedLabels : "--";
} else if (itemType == "select1") {
const matchedItem = data.find((item) => item.value === value);
return matchedItem ? matchedItem.label : "--";
}
} else {
if (itemType == "radio1") {
const matchedItem = opction.find((item) => item.value === value);
return matchedItem ? matchedItem.label : "--";
} else if (
itemType == "input1" ||
itemType == "datepicker1" ||
itemType == "cascader1"
) {
return value ? value : "--";
}
}
} catch (error) {
console.log(error);
}
},
handlePunch() {
this.setData({
// punchFlag:!this.data.punchFlag,
animationClass: 'animate'
})
setTimeout(() => {
this.setData({
animationClass: ''
});
this.clockRecords()
}, 1500);
},
clockRecords() {
let currentDate = new Date().toISOString().split('T')[0]; // 会得到形如 "2023-09-27" 的日期
let obj = {
resiId: this.data.resiId,
clockTime: currentDate + " " + this.data.currentTime,
clockAddress: this.data.address,
longitude: this.data.longitude,
latitude: this.data.latitude
}
api.clockRecords(obj).then(res => {
wx.showToast({
// title: this.data.punchFlag?'打卡成功':'更新成功',
title: '打卡成功',
icon: 'none'
})
}).catch(err => {
console.log(err);
})
},
toAddResi() {
this.setData({
checkPassword:true
})
},
bindPassword(e){
this.setData({
password:e.detail.value
})
},
onClosePassword(){
this.setData({
checkPassword:false
})
},
onConfirmassword(){
let parm = {
password:this.data.password
}
api.getResiUserInfo(this.data.resiId,parm).then(res=>{
if(res.code === 0){
wx.navigateTo({
url: `/subpages/addResi/pages/addResi/addResi?type=edit&resiId=${this.data.resiId}&name=${res.data.name}&mobile=${res.data.mobile}&idNum=${res.data.idNum}`,
})
this.setData({
password:null
})
}else{
this.setData({
password:null
})
this.showToast(res.msg)
}
}).catch(err=>{
console.log(err);
})
},
toWebView() {
console.log(app.globalData);
if (app.globalData.questionnaireUrl) {
wx.navigateTo({
url: '/pages/webView/webView?url=' + app.globalData.questionnaireUrl,
})
} else {
wx.showToast({
icon: "none",
title: '未创建满意度调查问卷',
})
}
},
toEvent() {
let obj = {
resiId: this.data.resiId,
resiMobile: this.data.form.mobile,
resiName: this.data.form.name
}
wx.setStorageSync('resiDetail', obj)
wx.navigateTo({
url: '/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck',
})
},
reverseLocation() {
const _this = this
this.data.qqMapWX.reverseGeocoder({
success(res) {
_this.setData({
addressContent: res.result.address,
address: res.result.address,
longitude: res.result.location.lng,
latitude: res.result.location.lat,
})
},
fail(err) {
console.debug(err)
}
})
},
>>>>>>> dfe56009a6df6ddb9f15a1825578dabd99db092e
/**
* 生命周期函数--监听页面初次渲染完成
*/
@ -40,9 +863,17 @@ Page({
* 生命周期函数--监听页面卸载
*/
onUnload() {
<<<<<<< HEAD
},
=======
if (timerId) {
clearInterval(timerId);
timerId = null;
}
},
>>>>>>> dfe56009a6df6ddb9f15a1825578dabd99db092e
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
@ -62,5 +893,37 @@ Page({
*/
onShareAppMessage() {
<<<<<<< HEAD
=======
},
gotopage(e) {
wx.navigateTo({
url: e.currentTarget.dataset.url,
})
},
// getLastLogs() {
// api.getLastLog({
// resiId: this.data.resiId
// }).then(res => {
// this.setData({
// lastLog: res.data
// })
// })
// },
goResidentPortrait2() {
wx.navigateTo({
url: '/subpages/statistics/pages/residentPortrait2/residentPortrait?id=' + this.data.resiId,
})
},
handelClickTab: function(e) {
wx.pageScrollTo({
selector: `#${e.currentTarget.dataset.item.id}`,
duration:300
});
this.setData({
activeType: e.currentTarget.dataset.index
})
>>>>>>> dfe56009a6df6ddb9f15a1825578dabd99db092e
}
})

7
subpages/searchResult/pages/resiInfo/resiInfo.json

@ -0,0 +1,7 @@
{
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index",
"resi-graph":"./component/graph/graph"
},
"navigationBarTitleText": "详情"
}

130
subpages/searchResult/pages/resiInfo/resiInfo.wxml

@ -1,2 +1,130 @@
<!--subpages/searchResult/pages/resiInfo/resiInfo.wxml-->
<text>subpages/searchResult/pages/resiInfo/resiInfo.wxml</text>
<<<<<<< HEAD
<text>subpages/searchResult/pages/resiInfo/resiInfo.wxml</text>
=======
<!-- 基本信息 -->
<resi-graph resiId="{{resiId}}"></resi-graph>
<view class="card">
<view class="top">
<view class="left">
<view class="name">
<view style="font-size: 32rpx;margin-right: 35rpx;">{{form.baseInfoDto.name}}</view>
<view style="font-size: 28rpx;color:#999999 ;">信息完整度:</view>
<view style="color:#04b8ad;">{{form.integrityData.score}}%</view>
</view>
<view class="tags">
<view class="tag" wx:for="{{form.baseInfoDto.categoryInfo.categoryNames}}" wx:key="index">{{item}}</view>
</view>
</view>
<view class="right">
<view class="jm-btn" bind:tap="toAddResi">编辑</view>
</view>
</view>
<view class="form">
<view class="form_label">地址:</view>
<view class="form_value"><text >{{form
.resideInfoDtos[0].agencyName}}</text>{{form.resideInfoDtos[0].homeName}}</view>
</view>
<view class="form">
<view class="form_label">创建时间:</view>
<view class="form_value">{{form.baseInfoDto.createdTime}}</view>
</view>
<view class="form">
<view class="form_label">最近更新时间:</view>
<view class="form_value">{{form.baseInfoDto.updatedTime}}</view>
</view>
<view class="tabs">
<view class="tab_item {{activeType === index ? 'border_bto' : ''}}" wx:for="{{tabList}}" bind:tap="handelClickTab" data-item="{{item}}" data-index="{{index}}" wx:key="index" wx:if="{{item.filledQty!=0}}">
{{item.name}} <text style="color:{{item.filledQty!==item.totalQty?'#f27225':'#1ebfb5'}}" wx:if="{{item.filledQty}}">({{ item.filledQty }}/{{ item.totalQty }})</text>
</view>
</view>
</view>
<view class="card">
<view class="title">基础信息</view>
<view class="info">
<view class="item">
<view class="label">国籍:</view>
<View class="value">{{form.baseInfoDto.nationalityName|| '--' }}</View>
</view>
<view class="item">
<view class="label">证件类型:</view>
<View class="value">{{idTypeList[form.baseInfoDto.idType].label}}</View>
</view>
<view class="item">
<view class="label">证件号:</view>
<View class="value">{{form.baseInfoDto.idNum}}</View>
</view>
<view class="item">
<view class="label">联系电话:</view>
<View class="value">{{form.baseInfoDto.mobile}}</View>
</view>
<view class="item">
<view class="label">文化程度:</view>
<View class="value">{{form.eduInfoDto.cultureLevelName}}</View>
</view>
<view class="item">
<view class="label">性别:</view>
<View class="value">{{form.baseInfoDto.genderName}}</View>
</view>
<view class="item">
<view class="label">出生日期:</view>
<View class="value">{{form.baseInfoDto.birthday}}</View>
</view>
<view class="item">
<view class="label">民族:</view>
<View class="value">{{form.baseInfoDto.nationName}}</View>
</view>
<view class="item">
<view class="label">婚姻状况:</view>
<View class="value"> {{marriageName}}</View>
</view>
<view class="item">
<view class="label">籍贯:</view>
<View class="value">{{form.baseInfoDto.nativePlace}}</View>
</view>
</view>
</view>
<view class="card" wx:for="{{expandList}}" wx:key="index" id="{{item.scrollId}}">
<view class="title">{{item.title}}</view>
<view class="info" wx:for="{{item.children}}" wx:for-index="indexC" wx:key="indexC" wx:for-item="itemC">
<view class="item">
<view class="label">{{itemC.label}}:</view>
<View class="value">{{itemC.value|| '--' }}</View>
</view>
</view>
</view>
<view class="card">
<view class="title">居民图谱</view>
</view>
<!-- 走访打卡 -->
<!-- <view class="card ">
<view class="flex-sb">
<view class="title">走访打卡</view>
<view class="view" bind:tap="gotopage" data-url="/subpages/searchResult/pages/checkLog/checkLog?resiId={{resiId}}">打卡记录</view>
</view>
<view class="punch {{animationClass}}" bind:tap="handlePunch">
<view class="{{animationClass}}" style="font-size: 36rpx;">打卡</view>
<view class="{{animationClass}}" style="font-family:PingFang-SC-Regular;font-size: 28rpx;opacity: 0.72;">{{currentTime}}</view>
</view>
<view class="address">当前位置:{{addressContent}}</view>
<view class="address" style="margin-top: 0;" wx:if="{{lastLog.clockInTime}}">最近打卡时间:{{lastLog.clockInTime}}</view>
</view> -->
<view class="bto_btn">
<button class="btn" hover-class="blue" bind:tap="toEvent">上报诉求</button>
<button class="btn" hover-class="blue" bind:tap="toWebView" wx:if="{{agencyLevel!=='street'}}">
满意度调查</button>
<!-- -->
<button class="btn blue">走访打卡</button>
</view>
<van-dialog use-slot title="密码验证" show="{{ checkPassword }}" show-cancel-button bind:close="onClosePassword" bind:confirm="onConfirmassword" custom-class="dialog" confirm-button-color="#3974f6">
<view>
<input type="text" bind:input="bindPassword" bind:blur="bindPassword" value="{{password}}" placeholder="请输入密码" password />
</view>
</van-dialog>
>>>>>>> dfe56009a6df6ddb9f15a1825578dabd99db092e

241
subpages/searchResult/pages/resiInfo/resiInfo.wxss

@ -0,0 +1,241 @@
/* subpages/searchResult/pages/resiInfo/resiInfo.wxss */
/**index.wxss**/
page {
background-color: #f7f7f7;
height: auto;
overflow-y: scroll;
padding: 0 20rpx 160rpx ;
box-sizing: border-box;
}
.form {
display: flex;
margin-top: 20rpx;
}
.form .form_label {
font-size: 30rpx;
color: #999999;
}
.form .form_value {
color: #333333;
text-align: left;
font-weight: 500;
flex: 1;
}
.card {
background-color: #fff;
border-radius: 20rpx;
display: flex;
flex-direction: column;
margin-top: 20rpx;
padding: 30rpx 30rpx 40rpx;
box-sizing: border-box;
position: relative;
overflow: hidden;
}
.card .title {
position: relative;
font-size: 34rpx;
}
.card .title::after {
position: absolute;
left: -30rpx;
top: 8rpx;
content: " ";
width: 10rpx;
height: 28rpx;
background-color: #3A80E7;
}
.info {
margin-top: 6rpx;
}
.info .item {
display: flex;
margin-top: 28rpx;
}
.info .item .label {
width: fit-content;
}
.punch {
width: 260rpx;
height: 260rpx;
background: linear-gradient(180deg, #5E9FFF, #3A80E7);
box-shadow: 0rpx 4rpx 35rpx 0rpx rgba(61, 139, 248, 0.48);
color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 50%;
margin: 50rpx auto 0;
}
.address {
color: #666666;
font-size: 28rpx;
margin: 0 auto;
margin: 40rpx auto 30rpx;
}
@keyframes rotateAnimation {
0% {
transform: rotateY(0deg);
}
100% {
transform: rotateY(180deg);
}
}
.animate {
animation: rotateAnimation 2s forwards;
}
.btn {
box-sizing: border-box;
text-align: center;
height: 76rpx;
border-radius: 38rpx;
margin: 30rpx 0;
line-height: 76rpx;
border-radius: 76rpx;
border: 2rpx solid #999999;
}
.blue{
background-color:#3974f6;
color: #fff;
border-color: #3974f6;
}
.flex-sb {
display: flex;
justify-content: space-between;
}
.view {
color: #999;
font-size: 24rpx;
}
.jm-btn {
position: absolute;
top: 30rpx;
right: 20rpx;
width: fit-content;
height: 56rpx;
padding: 0 20rpx;
box-sizing: border-box;
line-height: 56rpx;
background: #3974f6;
border-radius: 28rpx;
color: #fff;
text-align: center;
font-size: 28rpx;
}
.tabs {
display: flex;
justify-content: start;
flex-wrap: wrap;
border-top: 1px solid #EAEAEA;
margin-top: 30rpx;
}
.tabs .tab_item {
display: flex;
margin-right: 20rpx;
padding-bottom: 10rpx;
width: auto;
margin-top: 20rpx;
justify-content: center;
}
.tabs .tab_item .num {
font-weight: 400;
font-size: 36rpx;
}
.tabs .tab_item .name {
font-size: 26rpx;
padding-bottom: 6rpx;
box-sizing: border-box;
color: #666666;
}
.top {
display: flex;
align-items: center;
}
.top .left {
flex: 1;
}
.top .right {
width: 130rpx;
}
.top .left .name {
display: flex;
}
.top .left .tags {
display: flex;
flex-grow: 0;
justify-content: start;
max-width: 645rpx;
overflow-x: scroll;
margin-top: 20rpx;
box-sizing: border-box;
}
.top .left .tags::-webkit-scrollbar {
display: none;
}
.top .left .tags .tag {
background-color: rgba(236, 236, 236, 0.500000);
border-radius: 4rpx;
margin-right: 6rpx;
white-space: nowrap;
padding: 7rpx 8rpx;
width: auto;
box-sizing: border-box;
font-weight: 500;
font-size: 24rpx;
color: #999999;
}
.border_bto{
color: #3974f6 !important;
border-bottom: solid 6rpx #3974f6;
}
.bto_btn{
position: fixed;
bottom: 0;
display: flex;
justify-content: space-between;
align-items: center;
left: 0;
right: 0;
padding:0 20rpx;
box-sizing: border-box;
background: #fff;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.dialog{
padding: 0 20rpx;
box-sizing: border-box;
}

36
utils/api.js

@ -65,7 +65,13 @@ module.exports = {
submitResi,
getAllOrgCategoryCount,
getResiInfo,
userXiangQ
userXiangQ,
getTopTree,
getNextTree,
houseSearch,
allOrgHouseInfo,
getLogList,
updatetResi
}
// 获取公钥
@ -335,12 +341,38 @@ function icEventOldDelete(parm) {
function updateEvent(parm) {
return fly.post(`governance/icEventOld/update`,parm)
}
// 居民新增
function submitResi(parm) {
return fly.post(`actual/base/residentBaseInfo/save`,parm)
}
function getAllOrgCategoryCount(parm) {
return fly.get(`actual/base/streetOverview/allOrgCategoryCount`,parm)
}
// 居民编辑
function updatetResi(parm) {
return fly.post(`actual/base/residentBaseInfo/update`,parm)
}
// 社区查询-房屋查询
function houseSearch(parm) {
console.log('parmparm:', parm)
return fly.post(`actual/base/communityHouse/houseSearch`,parm)
}
// 社区查询-房屋概览查询
function allOrgHouseInfo(parm) {
return fly.get(`actual/base/streetOverview/allOrgHouseInfo`,parm)
}
// 懒加载树状一级
function getTopTree(parm) {
return fly.get(`actual/base/communityBuilding/tree/initTree`,parm)
}
// 懒加载树状多层下级
function getNextTree(parm) {
return fly.get(`actual/base/communityBuilding/tree/nextTreeNode`,parm)
}
// 获取打卡记录
function getLogList(parm) {
return fly.get(`actual/base/clockRecords/logList`,parm)
}

1
utils/config.js

@ -8,7 +8,6 @@ module.exports = {
// return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境
// return 'http://192.168.1.144/api/' //测试环境
return 'http://219.146.91.110:30801/api/'
//return http://219.146.91.110:30801/api //外网
}

Loading…
Cancel
Save