From 1142e5cced0d3a8a47414133161b919339b15b91 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Tue, 9 Apr 2024 20:40:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4,?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E8=AF=A6=E6=83=85=E4=BF=AE=E6=94=B9,?= =?UTF-8?q?=E5=85=B3=E7=B3=BB=E5=9B=BE=E8=B0=B1=E5=8A=A0=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/resiAndHouse/resiAndHouse.wxml | 27 +-- pages/resiAndHouse/resiAndHouse.wxss | 25 +- .../housePortrait/component/graph/graph.js | 7 - .../pages/housePortrait/housePortrait.wxss | 9 +- .../pages/resiInfo/component/graph/graph.js | 18 +- .../searchResult/pages/resiInfo/resiInfo.js | 98 +++++--- .../searchResult/pages/resiInfo/resiInfo.wxml | 216 +++++++++++++++++- .../searchResult/pages/resiInfo/resiInfo.wxss | 20 +- 8 files changed, 328 insertions(+), 92 deletions(-) diff --git a/pages/resiAndHouse/resiAndHouse.wxml b/pages/resiAndHouse/resiAndHouse.wxml index 0f7de26..a59a3e4 100644 --- a/pages/resiAndHouse/resiAndHouse.wxml +++ b/pages/resiAndHouse/resiAndHouse.wxml @@ -31,8 +31,8 @@ {{cascaderName}} - 切换 + 切换 @@ -55,35 +55,22 @@ + 信息完整度:{{item.synthesizeScore}} - - - 国籍: - {{item.nationalityName || "--"}} - - - 民族: - {{item.nationName || '--'}} - - - - 电话: - {{item.mobile}} - 证件号 {{item.idNum}} + + 电话: + {{item.mobile}} + 地址: {{item.agencyName || ''}} {{item.homeName || ''}} - - 最新更新时间: - {{item.updatedTime|| '--'}} - @@ -96,8 +83,8 @@ {{cascaderNameFw}} - 切换 + 切换 diff --git a/pages/resiAndHouse/resiAndHouse.wxss b/pages/resiAndHouse/resiAndHouse.wxss index 3109a11..e28701b 100644 --- a/pages/resiAndHouse/resiAndHouse.wxss +++ b/pages/resiAndHouse/resiAndHouse.wxss @@ -27,7 +27,7 @@ page { border-radius: 20rpx; position: absolute; left: 0rpx; - top: 360rpx; + top: 340rpx; width: 750rpx; height: calc(100vh - 460rpx); overflow: hidden; @@ -84,6 +84,8 @@ page { justify-content: center; margin-top: 39rpx; position: relative; + padding: 0 50rpx; + box-sizing: border-box; } .text-wrapper_30>view { @@ -161,7 +163,6 @@ page { display: flex; justify-content: center; align-items: center; - margin-top: 20rpx; padding-left: 20rpx; box-sizing: border-box; } @@ -179,8 +180,8 @@ page { overflow-wrap: break-word; color: rgba(51, 51, 51, 1); font-size: 36rpx; - font-family: PingFang-SC-Bold; - font-weight: 700; + font-family: FZTanHeiS-B-GB; + font-weight: 800; text-align: left; white-space: nowrap; line-height: 52rpx; @@ -188,7 +189,6 @@ page { flex: 1; margin-right: 20rpx; overflow-x: scroll; - } .image-text_9 { @@ -250,7 +250,7 @@ page { .box_17 { width: 649rpx; - margin: 20rpx 0 0 30rpx; + margin: 0rpx 0 0 30rpx; } .list_2 { @@ -480,9 +480,9 @@ page { } .text-wrapper_9 { + display: flex; width: 243rpx; overflow-wrap: break-word; - font-size: 0rpx; font-family: PingFang-SC-Medium; font-weight: 500; text-align: left; @@ -490,7 +490,12 @@ page { line-height: 40rpx; margin: 4rpx 0 0 0; } - +.text-wrapper_9 .label{ + color: #999999; +} +.text-wrapper_9 .value{ + color: #04b8ad; +} .text_19 { width: 243rpx; height: 28rpx; @@ -1297,8 +1302,8 @@ page { .box_17 .tabs { display: flex; - justify-content: start; - + justify-content: space-between; + height: 100rpx; } .box_17 .tabs .tab_item { diff --git a/subpages/house/pages/housePortrait/component/graph/graph.js b/subpages/house/pages/housePortrait/component/graph/graph.js index be400ab..41d34f6 100644 --- a/subpages/house/pages/housePortrait/component/graph/graph.js +++ b/subpages/house/pages/housePortrait/component/graph/graph.js @@ -57,12 +57,6 @@ Component({ getFamilyRelationshipList(params).then(({ data }) => { - // let index = data.findIndex(item => item.id == this.data.houseId); - // if (index !== -1) { - // const [item] = data.splice(index, 1); - // data.unshift(item); - // } - const rootNode = {}; rootNode["id"] = this.data.houseId; rootNode["name"] = this.data.houseName; @@ -128,7 +122,6 @@ Component({ }, })) - console.log(nodeList,links,categories); var option = { diff --git a/subpages/house/pages/housePortrait/housePortrait.wxss b/subpages/house/pages/housePortrait/housePortrait.wxss index b33e8a3..8a4735b 100644 --- a/subpages/house/pages/housePortrait/housePortrait.wxss +++ b/subpages/house/pages/housePortrait/housePortrait.wxss @@ -127,12 +127,15 @@ .item-dian { position: relative; left: -28rpx; - width: 20rpx; - height: 20rpx; + width: 32rpx; + height: 32rpx; + box-sizing: border-box; background: #FFFFFF; border-radius: 50%; border: 1px solid #3A80E7; - padding: 2rpx; + display: flex; + align-items: center; + justify-content: center; } .neidian { diff --git a/subpages/searchResult/pages/resiInfo/component/graph/graph.js b/subpages/searchResult/pages/resiInfo/component/graph/graph.js index da6b480..df9d897 100644 --- a/subpages/searchResult/pages/resiInfo/component/graph/graph.js +++ b/subpages/searchResult/pages/resiInfo/component/graph/graph.js @@ -43,6 +43,15 @@ Component({ height: height, devicePixelRatio: dpr // 像素比 }); + let than = this + chart.on('click', function (param) { + if (param.dataType == 'node') { + console.log('点击了节点',param) + than.triggerEvent('clickGraphNode', {data: param.data.data }); + } else { + console.log('点击了边',param) + } + }) canvas.setChart(chart); let params = { type: "0", @@ -91,9 +100,13 @@ Component({ 'category': 0, 'symbolSize': item.id == this.data.resiId ? 50 : 30, 'symbol': symbolUrl, - label: { + 'label': { "position": "bottom" - } + }, + 'data':{ + type:item.type, + id:item.id + }, }; }); @@ -119,7 +132,6 @@ Component({ }, })) - console.log(nodeList,links,categories); var option = { diff --git a/subpages/searchResult/pages/resiInfo/resiInfo.js b/subpages/searchResult/pages/resiInfo/resiInfo.js index 5174906..45feb71 100644 --- a/subpages/searchResult/pages/resiInfo/resiInfo.js +++ b/subpages/searchResult/pages/resiInfo/resiInfo.js @@ -523,37 +523,21 @@ Page({ value: 5 } ], - marriageList:[ - { - label:"未婚", - value:'weihun' - }, - { - label:"初婚", - value:'chuhun' - }, - { - label:"离婚", - value:'lihun' - }, - { - label:"再婚", - value:'zaihun' - }, - { - label:"复婚", - value:'fuhun' - } - ], + + dicts:{ + careerStatusArr:[], + marriageArr:[], + householdSituationArr:[], + houseHolderRelArr:[] + }, password:'' }, /** * 生命周期函数--监听页面加载 */ - onLoad(options) { - // this.updateTime(); - // timerId = setInterval(this.updateTime, 1000); + onLoad:async function(options) { + await this.getDicts() if (options.resiId) { this.setData({ resiId: options.resiId, @@ -562,7 +546,7 @@ Page({ 'form.baseInfoDto.mobile':options.mobile, }) - this.getResiInfo() + await this.getResiInfo() } // this.data.qqMapWX = new QQMapWX({ // key: 'CMJBZ-4DECI-JXGGN-5B4WU-QLV2H-B5BEJ' @@ -573,15 +557,43 @@ Page({ }) // 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}` - // }); - // }, + getDicts:async function() { + try { + const requests = [ + http.post("sys/dict/data/dictlist", { + dictType: "career_status", + }), + http.post("sys/dict/data/dictlist", { + dictType: "marriage", + }), + http.post("sys/dict/data/dictlist", { + dictType: "household_situation", + }), + http.post("sys/dict/data/relationship", { + formCode: "resi_base_info", + }), + ]; + const dictKeys = [ + "careerStatusArr", + "marriageArr", + "householdSituationArr", + "houseHolderRelArr" + ]; // 对应的键名 + + const results = await Promise.all(requests); + results.forEach((result, index) => { + if (result.code === 0) { + this.setData({ + [`dicts.${dictKeys[index]}`]: [...result.data] + }) + } else { + console.log(`获取${dictKeys[index]}失败: ${result.data.msg}`); + } + }); + } catch (error) { + console.log("获取字典失败: ", error); + } + }, getResiInfo: async function () { try { let res = await api.getResiInfo(this.data.resiId); @@ -590,7 +602,7 @@ Page({ 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 + marriageName = this.data.dicts.marriageArr.filter(item=>item.value == res.data.familyInfoDto.marriage)[0].label } // 处理tab this.setData({ @@ -641,7 +653,7 @@ Page({ let arr = this.data.tabList.filter( (item) => item.filledQty > 0 || ( - item.name == "拓展信息" || + item.name == "拓展信息" ||item.name == "居住信息" || item.name == "基本信息") ); @@ -673,6 +685,18 @@ Page({ expandList: arrs }) }, + clickGraphNode(parm){ + if(parm.detail.data.type === 0){ + this.setData({ + resiId:parm.detail.data.id + }) + this.getResiInfo() + }else{ + wx.navigateTo({ + url: `/subpages/house/pages/housePortrait/housePortrait?resiId=${parm.detail.data.id}`, + }) + } + }, getDictName: async function (url, params, value, itemType, opction) { try { if (url) { diff --git a/subpages/searchResult/pages/resiInfo/resiInfo.wxml b/subpages/searchResult/pages/resiInfo/resiInfo.wxml index 91a0283..5ed9b94 100644 --- a/subpages/searchResult/pages/resiInfo/resiInfo.wxml +++ b/subpages/searchResult/pages/resiInfo/resiInfo.wxml @@ -6,7 +6,7 @@ {{form.baseInfoDto.name}} 信息完整度: - {{form.integrityData.score}}% + {{form.integrityData.score}} {{item}} @@ -18,7 +18,7 @@ 地址: - {{form + {{form .resideInfoDtos[0].agencyName}}{{form.resideInfoDtos[0].homeName}} @@ -40,18 +40,22 @@ 基础信息 + * 国籍: {{form.baseInfoDto.nationalityName|| '--' }} + * 证件类型: {{idTypeList[form.baseInfoDto.idType].label}} + * 证件号: {{form.baseInfoDto.idNum}} + * 联系电话: {{form.baseInfoDto.mobile}} @@ -74,12 +78,206 @@ 婚姻状况: - {{marriageName}} + {{marriageName||'--'}} 籍贯: - {{form.baseInfoDto.nativePlace}} + {{form.baseInfoDto.nativePlace||'--'}} + + + + + + 居住信息 + + + * + 所属网格: + {{item.gridName|| '--' }} + + + * + 所属房屋: + {{item.agencyName}}{{item.homeName }} + + + * + 人房关系: + {{ + item.resiHouseRel != null + ? item.resiHouseRel === 0 + ? "自住" + : item.resiHouseRel === 1 + ? "租住" + : "--" + : "--" + }} + + + * + 人房状况: + {{item.agencyName}}{{item.homeName }} + + + * + 户籍所在地: + {{ item.placeOfDomicile || "--" }} + + + * + 与户主关系: + {{dicts.houseHolderRelArr[item.houseHolderRel].label || "--" }} + + + + + + 拓展信息 + + + 宗教信仰: + {{ + form.religionDto && form.religionDto.religion + ? form.religionDto.religion + : "--" + }} + + + * + 就业状态: + {{dicts.careerStatusArr[form.workInfoDto.careerStatus].label || '--'}} + + + 工作单位: + {{ + form.workInfoDto + ? form.workInfoDto.workUnit + ? form.workInfoDto.workUnit + : "--" + : "--" + }} + + + 原工作单位: + {{ + form.unemployedDto + ? form.unemployedDto.originWorkUnit + ? form.unemployedDto.originWorkUnit + : "--" + : "--" + }} + + + 职业: + {{ + form.workInfoDto + ? form.workInfoDto.occupation + ? form.workInfoDto.occupation + : "--" + : "--" + }} + + + 失业时间: + {{ + form.unemployedDto + ? form.unemployedDto.unemploymentTime + ? form.unemployedDto.unemploymentTime + : "--" + : "--" + }} + + + 月收入: + {{ + form.economyDto + ? form.economyDto.monthIncome + ? form.economyDto.monthIncome + : "--" + : "--" + }} + + + 失业证号: + {{ + form.unemployedDto + ? form.unemployedDto.unemploymentNum + ? form.unemployedDto.unemploymentNum + : "--" + : "--" + }} + + + 失业原因: + {{ + form.unemployedDto + ? form.unemployedDto.unemploymentReason + ? form.unemployedDto.unemploymentReason + : "--" + : "--" + }} + + + 失业原因: + {{ + form.unemployedDto + ? form.unemployedDto.employmentNum + ? form.unemployedDto.employmentNum + : "--" + : "--" + }} + + + 技术特长: + {{ + form.unemployedDto + ? form.unemployedDto.specialSkill + ? form.unemployedDto.specialSkill + : "--" + : "--" + }} + + + 是否领取失业金: + {{ + form.unemployedDto.unempCompensationFlag != null + ? form.unemployedDto.unempCompensationFlag === 0 + ? "否" + : form.unemployedDto.unempCompensationFlag === 1 + ? "是" + : "--" + : "--"}} + + + 是否就业困难对象: + {{ + form.unemployedDto.employmentHardFlag != null + ? form.unemployedDto.employmentHardFlag === 0 + ? "否" + : form.unemployedDto.employmentHardFlag === 1 + ? "是" + : "--" + : "--"}} + + + 劳动就业愿望: + {{ + form.workInfoDto + ? form.workInfoDto.employmentWish + ? form.workInfoDto.employmentWish + : "--" + : "--"}} + + + 有无赡养人: + {{form.familyInfoDto && + form.familyInfoDto.elderlyFlag == 1 + ? "有" + : form.familyInfoDto && + form.familyInfoDto.elderlyFlag == 0 + ? "无" + : "--"}} @@ -95,7 +293,7 @@ 关系图谱 - + @@ -114,11 +312,11 @@ - - + 上报诉求 + + 满意度调查 - + 走访打卡 diff --git a/subpages/searchResult/pages/resiInfo/resiInfo.wxss b/subpages/searchResult/pages/resiInfo/resiInfo.wxss index 6f545f2..e5095e0 100644 --- a/subpages/searchResult/pages/resiInfo/resiInfo.wxss +++ b/subpages/searchResult/pages/resiInfo/resiInfo.wxss @@ -59,12 +59,24 @@ page { .info .item { display: flex; margin-top: 28rpx; + position: relative; + } .info .item .label { width: fit-content; -} + color: #999999; +} +.must{ + font-size: 32rpx; + font-weight: 500; + color: #FF2A00; + position: absolute; + left: -18rpx; + top: 49rpx; + transform: translateY(-50rpx); +} .punch { width: 260rpx; height: 260rpx; @@ -104,11 +116,13 @@ page { box-sizing: border-box; text-align: center; height: 76rpx; - border-radius: 38rpx; + border-radius: 39rpx; margin: 30rpx 0; line-height: 76rpx; border-radius: 76rpx; - border: 2rpx solid #999999; + border: 1rpx solid #999999; + width: 226rpx; + text-align: center; } .blue{ From 9736e39ad1437dfea7886803536c576fe5013383 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Wed, 10 Apr 2024 13:59:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?tabBar=E9=A1=BA=E5=BA=8F=E4=BF=AE=E6=94=B9,?= =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/custom-tab-bar/index.js | 21 ++++++++-------- pages/resiAndHouse/resiAndHouse.js | 1 + pages/work2/work2.wxml | 2 +- .../pages/housePortrait/housePortrait.wxml | 4 ++-- .../searchResult/pages/resiInfo/resiInfo.js | 4 ++-- .../searchResult/pages/resiInfo/resiInfo.wxml | 24 ++++++++++++------- .../searchResult/pages/resiInfo/resiInfo.wxss | 9 ++++++- 7 files changed, 41 insertions(+), 24 deletions(-) diff --git a/components/custom-tab-bar/index.js b/components/custom-tab-bar/index.js index ac6feb3..5aa7f3c 100644 --- a/components/custom-tab-bar/index.js +++ b/components/custom-tab-bar/index.js @@ -23,14 +23,6 @@ Component({ "selectedIconPath": "/images/home/resiAndHouseSelected.png", show: true - }, - { - "pagePath": "/pages/statistics/statistics", - "text": "数据", - "iconPath": "/images/home/information.png", - "selectedIconPath": "/images/home/informationSelected.png", - show: false - }, { "pagePath": "/pages/work2/work2", @@ -40,6 +32,15 @@ Component({ show: true }, + { + "pagePath": "/pages/statistics/statistics", + "text": "数据", + "iconPath": "/images/home/information.png", + "selectedIconPath": "/images/home/informationSelected.png", + show: false + + }, + { "pagePath": "/pages/mine/mine", "text": "我的", @@ -63,13 +64,13 @@ Component({ getOwnedRolesOfStaffId(res.data.id).then(res2 => { app.globalData.user = res.data this.setData({ - "list[2].show": res2.data.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 + "list[3].show": res2.data.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 }) }) }) } else { this.setData({ - "list[2].show": app.globalData.roleList.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 + "list[3].show": app.globalData.roleList.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 }) } console.log(app.globalData.roleList, 'userss') diff --git a/pages/resiAndHouse/resiAndHouse.js b/pages/resiAndHouse/resiAndHouse.js index 2171d75..46fe908 100644 --- a/pages/resiAndHouse/resiAndHouse.js +++ b/pages/resiAndHouse/resiAndHouse.js @@ -386,6 +386,7 @@ Page({ tableData: [] }) this.getTableData() + this.getAllOrgCategoryCount() }, onClose() { this.setData({ diff --git a/pages/work2/work2.wxml b/pages/work2/work2.wxml index 39c2e3c..53bda47 100644 --- a/pages/work2/work2.wxml +++ b/pages/work2/work2.wxml @@ -42,7 +42,7 @@ - 信息服务 + 为民服务 diff --git a/subpages/house/pages/housePortrait/housePortrait.wxml b/subpages/house/pages/housePortrait/housePortrait.wxml index 599e898..2fba860 100644 --- a/subpages/house/pages/housePortrait/housePortrait.wxml +++ b/subpages/house/pages/housePortrait/housePortrait.wxml @@ -69,10 +69,10 @@ 操作人: {{item.operatorName}} - + diff --git a/subpages/searchResult/pages/resiInfo/resiInfo.js b/subpages/searchResult/pages/resiInfo/resiInfo.js index 45feb71..12e0776 100644 --- a/subpages/searchResult/pages/resiInfo/resiInfo.js +++ b/subpages/searchResult/pages/resiInfo/resiInfo.js @@ -646,7 +646,8 @@ Page({ list.push({ name:'关系图谱', id:"graph" - }) + }, + ) this.setData({ tabList: list }) @@ -656,7 +657,6 @@ Page({ item.name == "拓展信息" ||item.name == "居住信息" || item.name == "基本信息") ); - let arrs = [] arrs = this.data.originalExpandList.filter((itemA) => { return arr.some((itemB) => itemB.name === itemA.title); diff --git a/subpages/searchResult/pages/resiInfo/resiInfo.wxml b/subpages/searchResult/pages/resiInfo/resiInfo.wxml index 5ed9b94..e1d8de0 100644 --- a/subpages/searchResult/pages/resiInfo/resiInfo.wxml +++ b/subpages/searchResult/pages/resiInfo/resiInfo.wxml @@ -16,11 +16,11 @@ 编辑 - + 创建时间: {{form.baseInfoDto.createdTime}} @@ -30,8 +30,8 @@ {{form.baseInfoDto.updatedTime}} - - {{item.name}} ({{ item.filledQty }}/{{ item.totalQty }}) + + {{item.name}} ({{ item.filledQty }}/{{ item.totalQty }}) @@ -116,13 +116,21 @@ * - 人房状况: - {{item.agencyName}}{{item.homeName }} + 人户状况: + + + + {{selectItem.label}} + + + + -- + + - * 户籍所在地: - {{ item.placeOfDomicile || "--" }} + {{ item.placeOfDomicile === 'null'?'--':item.placeOfDomicile}} * diff --git a/subpages/searchResult/pages/resiInfo/resiInfo.wxss b/subpages/searchResult/pages/resiInfo/resiInfo.wxss index e5095e0..a2d0023 100644 --- a/subpages/searchResult/pages/resiInfo/resiInfo.wxss +++ b/subpages/searchResult/pages/resiInfo/resiInfo.wxss @@ -68,6 +68,11 @@ page { color: #999999; } + +.info .item .value { + flex: 1; + overflow-x: hidden; +} .must{ font-size: 32rpx; font-weight: 500; @@ -113,12 +118,14 @@ page { } .btn { + display: flex; + align-items: center; + justify-content: center; box-sizing: border-box; text-align: center; height: 76rpx; border-radius: 39rpx; margin: 30rpx 0; - line-height: 76rpx; border-radius: 76rpx; border: 1rpx solid #999999; width: 226rpx;