From 72fd2448497548512523fbc60c4c8dc0262015d7 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Mon, 1 Apr 2024 19:07:47 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=BE=E8=B0=B1?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/resiInfo/component/graph/graph.js | 259 +++++ .../pages/resiInfo/component/graph/graph.json | 6 + .../pages/resiInfo/component/graph/graph.wxml | 4 + .../pages/resiInfo/component/graph/graph.wxss | 9 + .../searchResult/pages/resiInfo/resiInfo.js | 907 ++++++++++++++++++ .../searchResult/pages/resiInfo/resiInfo.json | 7 + .../searchResult/pages/resiInfo/resiInfo.wxml | 126 +++ .../searchResult/pages/resiInfo/resiInfo.wxss | 241 +++++ 8 files changed, 1559 insertions(+) create mode 100644 subpages/searchResult/pages/resiInfo/component/graph/graph.js create mode 100644 subpages/searchResult/pages/resiInfo/component/graph/graph.json create mode 100644 subpages/searchResult/pages/resiInfo/component/graph/graph.wxml create mode 100644 subpages/searchResult/pages/resiInfo/component/graph/graph.wxss create mode 100644 subpages/searchResult/pages/resiInfo/resiInfo.js create mode 100644 subpages/searchResult/pages/resiInfo/resiInfo.json create mode 100644 subpages/searchResult/pages/resiInfo/resiInfo.wxml create mode 100644 subpages/searchResult/pages/resiInfo/resiInfo.wxss diff --git a/subpages/searchResult/pages/resiInfo/component/graph/graph.js b/subpages/searchResult/pages/resiInfo/component/graph/graph.js new file mode 100644 index 0000000..7ba4f33 --- /dev/null +++ b/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' + } + } + }); + } + } + } + } +}); \ No newline at end of file diff --git a/subpages/searchResult/pages/resiInfo/component/graph/graph.json b/subpages/searchResult/pages/resiInfo/component/graph/graph.json new file mode 100644 index 0000000..6031717 --- /dev/null +++ b/subpages/searchResult/pages/resiInfo/component/graph/graph.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "ec-canvas": "../../../../../../ec-canvas/ec-canvas" + } +} \ No newline at end of file diff --git a/subpages/searchResult/pages/resiInfo/component/graph/graph.wxml b/subpages/searchResult/pages/resiInfo/component/graph/graph.wxml new file mode 100644 index 0000000..2cced87 --- /dev/null +++ b/subpages/searchResult/pages/resiInfo/component/graph/graph.wxml @@ -0,0 +1,4 @@ + + + + diff --git a/subpages/searchResult/pages/resiInfo/component/graph/graph.wxss b/subpages/searchResult/pages/resiInfo/component/graph/graph.wxss new file mode 100644 index 0000000..f7895b6 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/subpages/searchResult/pages/resiInfo/resiInfo.js b/subpages/searchResult/pages/resiInfo/resiInfo.js new file mode 100644 index 0000000..b94c446 --- /dev/null +++ b/subpages/searchResult/pages/resiInfo/resiInfo.js @@ -0,0 +1,907 @@ +// subpages/searchResult/pages/resiInfo/resiInfo.js +import api from "../../../../utils/api" +var http = require('../../../../utils/request.js') +const QQMapWX = require('../../../../utils/qqmap-wx-jssdk') +const app = getApp() +var timerId = null; +Page({ + + /** + * 页面的初始数据 + */ + data: { + 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:'' + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + 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) + } + }) + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + if (timerId) { + clearInterval(timerId); + timerId = null; + } + }, + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + }, + 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 + }) + } +}) \ No newline at end of file diff --git a/subpages/searchResult/pages/resiInfo/resiInfo.json b/subpages/searchResult/pages/resiInfo/resiInfo.json new file mode 100644 index 0000000..b454563 --- /dev/null +++ b/subpages/searchResult/pages/resiInfo/resiInfo.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "van-dialog": "@vant/weapp/dialog/index", + "resi-graph":"./component/graph/graph" + }, + "navigationBarTitleText": "详情" +} \ No newline at end of file diff --git a/subpages/searchResult/pages/resiInfo/resiInfo.wxml b/subpages/searchResult/pages/resiInfo/resiInfo.wxml new file mode 100644 index 0000000..3d6cef0 --- /dev/null +++ b/subpages/searchResult/pages/resiInfo/resiInfo.wxml @@ -0,0 +1,126 @@ + + + + + + + + {{form.baseInfoDto.name}} + 信息完整度: + {{form.integrityData.score}}% + + + {{item}} + + + + 编辑 + + + + 地址: + {{form + .resideInfoDtos[0].agencyName}}{{form.resideInfoDtos[0].homeName}} + + + 创建时间: + {{form.baseInfoDto.createdTime}} + + + 最近更新时间: + {{form.baseInfoDto.updatedTime}} + + + + {{item.name}} ({{ item.filledQty }}/{{ item.totalQty }}) + + + + + + 基础信息 + + + 国籍: + {{form.baseInfoDto.nationalityName|| '--' }} + + + 证件类型: + {{idTypeList[form.baseInfoDto.idType].label}} + + + 证件号: + {{form.baseInfoDto.idNum}} + + + 联系电话: + {{form.baseInfoDto.mobile}} + + + 文化程度: + {{form.eduInfoDto.cultureLevelName}} + + + + 性别: + {{form.baseInfoDto.genderName}} + + + 出生日期: + {{form.baseInfoDto.birthday}} + + + 民族: + {{form.baseInfoDto.nationName}} + + + 婚姻状况: + {{marriageName}} + + + + 籍贯: + {{form.baseInfoDto.nativePlace}} + + + + + {{item.title}} + + + {{itemC.label}}: + {{itemC.value|| '--' }} + + + + + 居民图谱 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/subpages/searchResult/pages/resiInfo/resiInfo.wxss b/subpages/searchResult/pages/resiInfo/resiInfo.wxss new file mode 100644 index 0000000..6f545f2 --- /dev/null +++ b/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; +} \ No newline at end of file From 2622446badc99613e113ba5d155c022237fee520 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Tue, 2 Apr 2024 14:17:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=88=BF=E5=B1=8B=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subpages/addResi/pages/addResi/addResi.js | 178 +++++++++++--------- subpages/addResi/pages/addResi/addResi.json | 1 - subpages/addResi/pages/addResi/addResi.wxml | 93 +++++----- utils/api.js | 10 +- 4 files changed, 156 insertions(+), 126 deletions(-) diff --git a/subpages/addResi/pages/addResi/addResi.js b/subpages/addResi/pages/addResi/addResi.js index 35f3b9d..f6e7832 100644 --- a/subpages/addResi/pages/addResi/addResi.js +++ b/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); }) diff --git a/subpages/addResi/pages/addResi/addResi.json b/subpages/addResi/pages/addResi/addResi.json index fb5bd8f..8c2d3cb 100644 --- a/subpages/addResi/pages/addResi/addResi.json +++ b/subpages/addResi/pages/addResi/addResi.json @@ -1,5 +1,4 @@ { - "navigationBarTitleText": "新增居民", "usingComponents": { "wux-select": "../../../../components/dist/select", "DynamicForms": "../../../../components/DynamicForms/DynamicForms", diff --git a/subpages/addResi/pages/addResi/addResi.wxml b/subpages/addResi/pages/addResi/addResi.wxml index e1f5340..90805f9 100644 --- a/subpages/addResi/pages/addResi/addResi.wxml +++ b/subpages/addResi/pages/addResi/addResi.wxml @@ -42,8 +42,8 @@ - - {{form.resideInfoDtos[indexP].buildingName ? form.resideInfoDtos[indexP].buildingName : '请选择'}} + + {{form.resideInfoDtos[indexP].buildName ? form.resideInfoDtos[indexP].buildName : '请选择'}} @@ -70,8 +70,8 @@ - - {{form.resideInfoDtos[indexP].houseName ? form.resideInfoDtos[indexP].houseName : '请选择'}} + + {{form.resideInfoDtos[indexP].doorName ? form.resideInfoDtos[indexP].doorName : '请选择'}} @@ -265,7 +265,7 @@ - {{form.baseInfoDto.nation ? dicts.nationList[form.baseInfoDto.nation].label : '请选择'}} + {{form.baseInfoDto.nationName? form.baseInfoDto.nationName : '请选择'}} @@ -278,7 +278,7 @@ - {{form.eduInfoDto.cultureLevel ? dicts.educationList[form.eduInfoDto.cultureLevel].label : '请选择'}} + {{form.eduInfoDto.cultureLevelName ? form.eduInfoDto.cultureLevelName : '请选择'}} @@ -460,8 +460,8 @@ - 是 - 否 + 是 + @@ -472,8 +472,8 @@ - 是 - 否 + 是 + @@ -498,8 +498,8 @@ - 是 - 否 + 是 + @@ -537,9 +537,9 @@ - 群众 - 党员 - 共青团员 + 群众 + 党员 + 共青团员 @@ -560,8 +560,8 @@ - 是 - 否 + 是 + @@ -579,8 +579,8 @@ - 是 - 否 + 是 + @@ -599,8 +599,8 @@ - 是 - 否 + 是 + @@ -619,8 +619,8 @@ - 是 - 否 + 是 + @@ -644,8 +644,8 @@ - 是 - 否 + 是 + @@ -662,8 +662,8 @@ - 是 - 否 + 是 + @@ -680,8 +680,8 @@ - 是 - 否 + 是 + @@ -698,8 +698,8 @@ - 是 - 否 + 是 + @@ -716,8 +716,8 @@ - 是 - 否 + 是 + @@ -728,8 +728,8 @@ - 是 - 否 + 是 + @@ -751,11 +751,12 @@ {{radioItem.label}} + - 是 - 否 - + 是 + 否 + @@ -770,8 +771,8 @@ - 是 - 否 + 是 + @@ -789,8 +790,8 @@ - 是 - 否 + 是 + @@ -802,8 +803,8 @@ - 是 - 否 + 是 + @@ -814,8 +815,8 @@ - 是 - 否 + 是 + diff --git a/utils/api.js b/utils/api.js index eb232f3..b15a460 100644 --- a/utils/api.js +++ b/utils/api.js @@ -65,7 +65,8 @@ module.exports = { submitResi, getAllOrgCategoryCount, getResiInfo, - userXiangQ + userXiangQ, + updatetResi } // 获取公钥 @@ -335,12 +336,17 @@ 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) +} + From dfe56009a6df6ddb9f15a1825578dabd99db092e Mon Sep 17 00:00:00 2001 From: juwei001 <974220104@qq.com> Date: Tue, 2 Apr 2024 18:17:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/house/czMax.png | Bin 0 -> 665 bytes images/house/czMin.png | Bin 0 -> 520 bytes images/house/wcsMax.png | Bin 0 -> 573 bytes images/house/wcsMin.png | Bin 0 -> 464 bytes images/house/xzMax.png | Bin 0 -> 668 bytes images/house/xzMin.png | Bin 0 -> 519 bytes images/house/zzMax.png | Bin 0 -> 659 bytes images/house/zzMin.png | Bin 0 -> 505 bytes pages/resiAndHouse/resiAndHouse.js | 711 ++++++++++++++-------- pages/resiAndHouse/resiAndHouse.wxml | 61 +- pages/resiAndHouse/resiAndHouse.wxss | 861 +++++++++++++++++---------- project.config.json | 3 +- utils/api.js | 26 + utils/config.js | 4 +- 14 files changed, 1098 insertions(+), 568 deletions(-) create mode 100644 images/house/czMax.png create mode 100644 images/house/czMin.png create mode 100644 images/house/wcsMax.png create mode 100644 images/house/wcsMin.png create mode 100644 images/house/xzMax.png create mode 100644 images/house/xzMin.png create mode 100644 images/house/zzMax.png create mode 100644 images/house/zzMin.png diff --git a/images/house/czMax.png b/images/house/czMax.png new file mode 100644 index 0000000000000000000000000000000000000000..6663e7ea3719ba1b7e1f612b8edf4dedad54e414 GIT binary patch literal 665 zcmV;K0%rY*P)Px%Q%OWYR5(v{lgmq0Q543%wf8yqnp%=5p%hwVmXh9l;JpeVMvzgHMm1{CizWs| zO`6!GNsTHfXw*oGnmWk1B2mQE6dU*-^q|KiN~C-C`eN_v$lgp9)iu6 z3>FHzOe$sbotj3-5$J2Z2>w6GM zlLHWoIctDn1(qm!=UcSx!9siczw$>{0o^k*HC2`aBz6#}Oc}WXF+HRjB|soia_lec zjk&I_A1jam7?_=HG;sY1G`6tyRxm=rK9WJaf*`&1hOO}ll7e;KfuMH^wgd<}fA+OVTwCbQy^`KSA>%A-BjH60b4J1R+Kc}BN(5^#4^?tW zg^z-SmXA}1swI8S3ic+7Q=nT^kp?fp!$K7FwrnqWO=3I%nr9{t8kjhxQC2K6i6U>I zV+zEjkcmQkZ{Hly*fqs8eFms4LMM&LOA;wBT>)QZLx?KWt4gczNilcw zYN-<^Uer`nRc9hZLn1h@#CHmNN{!?{@eq)z6gUr7k$dPLzO^2GHOo zYY04aU}z-2=sg5~kmz+BJzdy1ja$v_7U%x~*sN1{cUkGh00000NkvXXu0mjf*`p_8 literal 0 HcmV?d00001 diff --git a/images/house/czMin.png b/images/house/czMin.png new file mode 100644 index 0000000000000000000000000000000000000000..30a70fc9103e98f4f5b0f2acf4a691f5df97fc02 GIT binary patch literal 520 zcmV+j0{8uiP)Px$!bwCyR47wrlDlhEK@`TnGjsQDTznuT1d)UV!9ui%>#}QJ3#JJuHexA=Hu^6J zVwKiTw6YTvE3qu!nkTOwNf_v|rPiF3J&^R!UGjo3DeCIHNqk}Zp z*49Qk-R|B>z5eUJcL4JDWhF@pr=zImn2j1S=d6hRdGPz`QTPy=Xf{t2OQlJLJ7tVC zMC2}s0Y`1Q40oE<>Q+BNfNEcshhvQ=>C)I5ds~Q`3R(hC5-Rwikb5g*)sNm^YOBi^ zKwO5{xFEPs;3`Q`5Pp&fy8}8I@#yQ;_h(W`l1s*>6+?LfNI5wB=swHgxo4Bk0k49* zi=SFIVn|8BIVE=;I7No&J{KJQ8l-MO%)=%tZPU+r?$m<-+C2CJ1$<^KZ z%#{G0X)jDisXefkiCg`e`asYAytlJo3D97BzLAnUB@~{k!6Kc`<b@?P)Px$_en%SR5(wilFdt0VHC!n^S*PxMkA=k88>aDpe}A|t^^eY5|pbpZ4wFsS1#JL zii{EZAo>UT3xcRc1mZG?7z}PBA`=Zm5CoboT1e_#XYTvdy=LY(BSP=;J?H$+d7g6w z|M{d-eHboeV^^OSqQ~fsd05${Gsh0EbjsZYcvo4>*$yrU#nMnmDZB%q1<0+y@0)Ii z>;Q!GO9Rv@5HdD2r$pp7052^fng(WK`c>g+sU&6#lmbXf`00Ba6gL?V3~r^v`bi9Il|WZxPciEsOthG8m+xR0?YvNHU(5Fi@Dg!_zkYjIm-QD z#9Y;oSwQTrGQhh-e&O*pz|qAfP`AL>u7}~qI=%vMx_TkJ7o03SOaaO6T}Pj$wri>t zeWYMYfYH5-{9RWH{QTr!fM>yPaAVF@UfE>q5fw+D0VERGCgaa`_-N|ovx#khql>WY z8k*6Y*kD+zRDzoVh?ugu)-8i6@*p^oyPtkmtINHsCLSTMsp=o3m%n+@K}R1DJ~0MoMRtw8dC^QKS%a9dA-})c_1gAxOi9i!wp71xXyQM?00000 LNkvXXu0mjf?@0m; literal 0 HcmV?d00001 diff --git a/images/house/wcsMin.png b/images/house/wcsMin.png new file mode 100644 index 0000000000000000000000000000000000000000..cec6dbec35c0d7e6fbda1bf65beb18f140108bfd GIT binary patch literal 464 zcmV;>0WbcEP)Px$ib+I4R47w*l0i$9Q51&X_uQFD18HI7tkjX5DS{TM5QaH_K-@%2A#9_6K@eAN z+eNL~1xc&ctrT=oBDkoT(wPwvN1a6>L{Q(ougs?n)5mmn_uTj4K8JIOL`kx8y)l^f z*S;4D{pZR1)|s8n?QNy|vdsq}3PX;(CBj*hdY**aP^HrBV~?hwa6@3pfTsd_1Z|md zt~i{l{e2*YYPHi`WSH_^8FPF>a8{CQTaZVjn=cOce~9%y?=|i^XJgKo@zOH_lS%DX zP{2!uz7nVH~r5yDj%Fa1eAAbt);UZeDF+X?BnR*!2Si7B9%M8cm{C*0000Px%R!KxbR5(v{lTAoeQ547j=e~~_)3Gcv^P^1q0D~knT0|~HcP>I`Q5G(QVm1|p zZK8#nHnoU8sAv(@qA-SN6Ilx(K_Vgu+O%q!5}1q9N$)-Xc=ydrmdxW_-s9c(|DE$c z_Z&f$YhgOyU}9r(2XD^{z-s@={~IJ^;oZ6I*%0m40wy#a4*Dh6bA3i+E$AP>hkM=8 zp01ul$^xw#v%_u2C5pcTOEE(#(l2}9$?^d4q+aU5m2)}DqITCis&yS z0nrtWx?A4D(wqKmCbMA}%1+V^g6@|i%8TD37W*Myrp1*skoq%2i?5Tb%FF259-$UtUAqREK`_XR*g1j+l4xlYk!d5T3e}N}MR-+C*o&1`PKF4N*S9m| z9YD7N%H)PGV6vIKdswo5LUCS3@P5rSRvX)D-~RxdV_oewy_UlO0000Px$!AV3xR47wjl0Rq^Q4q$zZ+CCA7mWzv5CkDg3X8jdsGw0oTI~ddGzb2vtZc5b zvq&2Y5v+oR5)=!;XrV<4F+~bR3r!)~1gx}(cb8o5&3v-EmvH96yub6CZ)SMJz9E6_ zFRj|aj{W8I{jL4)`I*C)TA5AS>D0-jqH!snQWTAkT7QA(9&8T#?Lk_-R_&@*k1AFb z)5~(+0X&1-YMk_%+1bS(yI=w7)AhsKov0pwN>WL0$vFpD40iwq!ZxV>&FtdRyCOZU z-8iMS_4x**fOPa;?7bH*J{v?Hq?V_c ztA>xsmGv_vv^-T$0R(1`ss2xwUoDkNH5PT{4GEtk+c;f9FHba5(`HDjk0OQl?mo}l z8K$xkMQtSfEBX6W+4AQ{8ZeDnI?{soUr|^r9O0qtWXRV9(mLDS0rUiikQ_Mf%$DJn zl3ptncFmj;0sFwFX8!+1OJmb!VIq!9$c2ij*Z=}Stg(sj{{X`|2z5VMm_`5q002ov JPDHLkV1jvP?@<5% literal 0 HcmV?d00001 diff --git a/images/house/zzMax.png b/images/house/zzMax.png new file mode 100644 index 0000000000000000000000000000000000000000..61819c9d3ddc629c723958d698cf224ca8c80f32 GIT binary patch literal 659 zcmV;E0&M+>P)Px%O-V#SR5(v{lg)2TVHC!n^UmBUm5!oFEm|oW@zJUvt+m7gOWjn2R2nKsKU9Ln z*mT1}NVv4It@sTG8yK>W~-7^(eiwVPAYdRVL*Z+p;aBuc}sc* zTjkdj!~rgjuv*0KQCcrgSsVD;MUgrxoq4i&7apHO-?ZOvPkf2A(wojVBn-9$1btt( z1u7>=R7IQWl+$7`s-zJ5uE4qV-!=W-D4MDys=`%=mjp%~;PlXVJv{LybMY2Zn+ScQYKBR8 zivcw13(%kLthnR=9S{C)FeX-;&6&LxTxqHA0P~27!~y^qWslaiXJ?Y<9pKntZj;fl zJQHB&|0boN{G)91^Q&@m3AeBomQViBJHeq=KR(%an5aRp0Vc4$wC6 zI|(bDPY8B_lvzh1`jra8Mqog$zP?b|H!}+Px$vq?ljR47wzlFv(&K^Vus&uhD^ZmC5eMIZ>>?4T|cwbY@Dr#b~4!i6rDu#`Uz zg&=!K2+sy71$$`;iM@HNi`QU12+^Mq`73vIcb)g0=PNU>F0ME*%*->-=lMSK%p*86 z3IzrjY2K)7YIos@)Xv_!vz#^-R+vO*bX!%fH6z|Ks-0o|@WaPk_x5SO7BsoSE9s=Y zYk{t&v5!^pj6{OOMi@r9Pr3B^3Fx8ORrXtBGC)VNZggCg52zFpAOI!)!*XgVmnuSp zGV|Ts5pX~wUTs+9N#69%e$oNQdqhes?`$2smDi>HKB8mPSj=1EI!IBC6&&Q?Hc+|d z)616{4{L{ZM3jTJG}H$+g@$bN05<`liM3lLPw z`EhRMIigsVibMcR99X*n^aC}m@R@6xb`#+ItthQ(&2@}4SX(w2_Xa?gq1 z<^GiTgT%if4?SPp9F8P0a1hG0Dk}sgoFiOtUve4(7fAg6@vA3RLV>~4?rLw1{7lN= vN!1+SW!&PLNBQmNyUTNJZFF9roo71&G-DuSyrfmF00000NkvXXu0mjfrxNLs literal 0 HcmV?d00001 diff --git a/pages/resiAndHouse/resiAndHouse.js b/pages/resiAndHouse/resiAndHouse.js index 9123dcc..f0b0879 100644 --- a/pages/resiAndHouse/resiAndHouse.js +++ b/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) { -}) \ No newline at end of file + 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' + }) + } + }) + } +}) diff --git a/pages/resiAndHouse/resiAndHouse.wxml b/pages/resiAndHouse/resiAndHouse.wxml index e57b16a..1febb26 100644 --- a/pages/resiAndHouse/resiAndHouse.wxml +++ b/pages/resiAndHouse/resiAndHouse.wxml @@ -23,7 +23,7 @@ 搜索 - + @@ -56,8 +56,6 @@ - @@ -93,7 +91,64 @@ + + + + {{cascaderNameFw}} + + + 切换 + + + + + + + + {{item.num}} + {{item.name}} + + + + + 注: + + 自住 + + 出租 + + 闲置 + + 未出售 + + + + + + + + + + + + + {{item.houseName}} + + {{item.resiTotal}}人 + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/resiAndHouse/resiAndHouse.wxss b/pages/resiAndHouse/resiAndHouse.wxss index 694f5cd..97ab17d 100644 --- a/pages/resiAndHouse/resiAndHouse.wxss +++ b/pages/resiAndHouse/resiAndHouse.wxss @@ -1,11 +1,12 @@ /* pages/resiAndHouse/resiAndHouse.wxss */ -page{ +page { width: 100%; min-height: 100vh; overflow: hidden; background-color: #f7f7f7; - } - /* .page { +} + +/* .page { position: relative; width: 750rpx; height: calc(100vh - 100rpx); @@ -13,15 +14,16 @@ page{ display: flex; flex-direction: column; } */ - .group_1 { - background-color: rgba(57,116,246,1.000000); +.group_1 { + background-color: rgba(57, 116, 246, 1.000000); width: 750rpx; height: 404rpx; display: flex; flex-direction: column; - } - .group_2 { - background-color: rgba(245,246,246,1.000000); +} + +.group_2 { + background-color: rgba(245, 246, 246, 1.000000); border-radius: 20rpx; position: absolute; left: 0rpx; @@ -32,31 +34,34 @@ page{ display: flex; flex-direction: column; justify-content: flex-end; - } - - .block_1 { +} + +.block_1 { width: 750rpx; height: 324rpx; display: flex; flex-direction: column; - } - .box_15 { +} + +.box_15 { width: 709rpx; height: 56rpx; flex-direction: row; display: flex; margin: 70rpx 0 0 21rpx; - } - .label_1 { +} + +.label_1 { width: 34rpx; height: 31rpx; margin-top: 11rpx; - } - .text_1 { +} + +.text_1 { width: 157rpx; height: 30rpx; overflow-wrap: break-word; - color: rgba(255,255,255,1); + color: rgba(255, 255, 255, 1); font-size: 32rpx; font-family: PingFang-SC-Medium; font-weight: 500; @@ -64,96 +69,113 @@ page{ white-space: nowrap; line-height: 42rpx; margin: 13rpx 0 0 18rpx; - } - .image_2 { +} + +.image_2 { width: 158rpx; height: 56rpx; margin-left: 342rpx; - } - .text-wrapper_30 { +} + +.text-wrapper_30 { width: 100%; flex-direction: row; display: flex; justify-content: center; margin-top: 39rpx; position: relative; - } - .text-wrapper_30 > view{ +} + +.text-wrapper_30>view { display: flex; width: 50%; height: 60rpx; align-items: center; flex-direction: column; position: relative; - - } - .text-wrapper_30 > view image{ + +} + +.text-wrapper_30>view image { width: 140rpx; height: 14rpx; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); - } - .text-wrapper_30 - .text_2 { +} + +.text-wrapper_30 .text_2 { width: 134rpx; height: 33rpx; overflow-wrap: break-word; - color: rgba(255,255,255,1); + color: rgba(255, 255, 255, 1); font-size: 34rpx; font-family: PingFang-SC-Bold; font-weight: 700; text-align: left; white-space: nowrap; line-height: 42rpx; - } - .text_3 { +} + +.text_3 { width: 132rpx; height: 33rpx; overflow-wrap: break-word; - color: rgba(255,255,255,1); + color: rgba(255, 255, 255, 1); font-size: 34rpx; font-family: PingFang-SC-Medium; font-weight: 500; text-align: left; white-space: nowrap; line-height: 42rpx; - } - .image_3 { +} + +.image_3 { width: 140rpx; height: 14rpx; margin: 9rpx 0 0 169rpx; - } - - - .label_2 { +} + + +.label_2 { width: 30rpx; height: 30rpx; - } - - - - .section_2 { - background-color: rgba(255,255,255,1.000000); +} + + + +.section_2 { + background-color: rgba(255, 255, 255, 1.000000); border-radius: 20rpx; width: 710rpx; height: 100%; display: flex; flex-direction: column; margin: 21rpx 0 0 20rpx; - } - .box_16 { +} + +.box_16 { width: 100%; height: 100rpx; display: flex; justify-content: center; align-items: center; margin-top: 20rpx; - } - .text_4 { +} + +.box_161 { + width: 100%; + height: 100rpx; + justify-content: center; + align-items: center; + text-align: center; + margin-top: 20rpx; +} + +.text_4 { overflow-wrap: break-word; - color: rgba(51,51,51,1); + color: rgba(51, 51, 51, 1); font-size: 36rpx; font-family: PingFang-SC-Bold; font-weight: 700; @@ -161,50 +183,87 @@ page{ white-space: nowrap; line-height: 52rpx; text-align: center; - - margin-right:20rpx ; - } - .image-text_9 { + + margin-right: 20rpx; +} + +.image-text_9 { width: 89rpx; flex-direction: row; display: flex; justify-content: space-between; - } - .text_5 { +} + +.image-text_91 { + flex-direction: row; + display: flex; + text-align: center; + justify-content: space-between; +} + +.image-text_qh { + /* margin: 0 auto; */ +} + +.text_51{ + font-size: 26rpx; + color: #ACACAC; +} + +.text_52 { + margin-right: 36rpx; +} + +.image_81{ + width: 26rpx; + height: 26rpx; + position: relative; + top: 5rpx; +} +.image_82{ + margin-left: 36rpx; +} + +.text_5 { width: 55rpx; height: 26rpx; overflow-wrap: break-word; - color: rgba(58,128,231,1); + color: rgba(58, 128, 231, 1); font-size: 28rpx; font-family: PingFang-SC-Medium; font-weight: 500; text-align: center; white-space: nowrap; line-height: 28rpx; - } - .image_8 { +} + +.image_8 { width: 28rpx; height: 18rpx; margin-top: 5rpx; - } - .box_17 { +} + +.box_17 { width: 649rpx; margin: 20rpx 0 0 30rpx; - } - .list_2 { +} + +.list_2 { width: 486rpx; height: 75rpx; flex-direction: row; display: flex; - } - .text-wrapper_31-0 { +} + +.text-wrapper_31-0 { width: 99rpx; height: 75rpx; margin-right: 39rpx; display: flex; flex-direction: column; - } - .text_6-0 { +} + +.text_6-0 { width: 99rpx; height: 31rpx; overflow-wrap: break-word; @@ -214,9 +273,10 @@ page{ text-align: left; white-space: nowrap; line-height: 42rpx; - color: rgba(57,116,246,1); - } - .text_7-0 { + color: rgba(57, 116, 246, 1); +} + +.text_7-0 { width: 102rpx; height: 24rpx; overflow-wrap: break-word; @@ -227,16 +287,18 @@ page{ white-space: nowrap; line-height: 38rpx; margin: 20rpx 0 0 24rpx; - color: rgba(57,116,246,1); - } - .text-wrapper_31-1 { + color: rgba(57, 116, 246, 1); +} + +.text-wrapper_31-1 { width: 99rpx; height: 75rpx; margin-right: 39rpx; display: flex; flex-direction: column; - } - .text_6-1 { +} + +.text_6-1 { width: 99rpx; height: 31rpx; overflow-wrap: break-word; @@ -246,13 +308,14 @@ page{ text-align: left; white-space: nowrap; line-height: 42rpx; - color: rgba(51,51,51,1); - } - .text_9-1 { + color: rgba(51, 51, 51, 1); +} + +.text_9-1 { width: 49rpx; height: 25rpx; overflow-wrap: break-word; - color: rgba(102,102,102,1); + color: rgba(102, 102, 102, 1); font-size: 26rpx; font-family: PingFang-SC-Medium; font-weight: 500; @@ -260,15 +323,17 @@ page{ white-space: nowrap; line-height: 38rpx; margin: 19rpx 0 0 13rpx; - } - .text-wrapper_31-2 { +} + +.text-wrapper_31-2 { width: 99rpx; height: 75rpx; margin-right: 39rpx; display: flex; flex-direction: column; - } - .text_6-2 { +} + +.text_6-2 { width: 99rpx; height: 31rpx; overflow-wrap: break-word; @@ -278,9 +343,10 @@ page{ text-align: left; white-space: nowrap; line-height: 42rpx; - color: rgba(51,51,51,1); - } - .text_7-2 { + color: rgba(51, 51, 51, 1); +} + +.text_7-2 { width: 102rpx; height: 24rpx; overflow-wrap: break-word; @@ -291,16 +357,18 @@ page{ white-space: nowrap; line-height: 38rpx; margin: 20rpx 0 0 24rpx; - color: rgba(102,102,102,1); - } - .text-wrapper_31-3 { + color: rgba(102, 102, 102, 1); +} + +.text-wrapper_31-3 { width: 99rpx; height: 75rpx; margin-right: 39rpx; display: flex; flex-direction: column; - } - .text_6-3 { +} + +.text_6-3 { width: 99rpx; height: 31rpx; overflow-wrap: break-word; @@ -310,9 +378,10 @@ page{ text-align: left; white-space: nowrap; line-height: 42rpx; - color: rgba(51,51,51,1); - } - .text_7-3 { + color: rgba(51, 51, 51, 1); +} + +.text_7-3 { width: 102rpx; height: 24rpx; overflow-wrap: break-word; @@ -323,14 +392,14 @@ page{ white-space: nowrap; line-height: 38rpx; margin: 20rpx 0 0 24rpx; - color: rgba(102,102,102,1); - } - - .text_49 { + color: rgba(102, 102, 102, 1); +} + +.text_49 { width: 79rpx; height: 31rpx; overflow-wrap: break-word; - color: rgba(51,51,51,1); + color: rgba(51, 51, 51, 1); font-size: 36rpx; font-family: FZCTHJW--GB1-0; font-weight: normal; @@ -338,12 +407,13 @@ page{ white-space: nowrap; line-height: 42rpx; margin-left: 24rpx; - } - .text_50 { +} + +.text_50 { width: 128rpx; height: 25rpx; overflow-wrap: break-word; - color: rgba(102,102,102,1); + color: rgba(102, 102, 102, 1); font-size: 26rpx; font-family: PingFang-SC-Medium; font-weight: 500; @@ -351,9 +421,9 @@ page{ white-space: nowrap; line-height: 38rpx; margin-top: 19rpx; - } - - .box_18 { +} + +.box_18 { width: 649rpx; /* height: 36rpx; */ flex-direction: row; @@ -361,11 +431,12 @@ page{ justify-content: space-between; display: flex; margin: 20rpx 0 0 0; - } - .text_16 { - width:fit-content; +} + +.text_16 { + width: fit-content; overflow-wrap: break-word; - color: rgba(51,51,51,1); + color: rgba(51, 51, 51, 1); font-size: 34rpx; font-family: PingFang-SC-Medium; font-weight: 500; @@ -373,11 +444,11 @@ page{ white-space: nowrap; line-height: 41rpx; margin-top: 2rpx; - } - - - .text-wrapper_8 { - background-color: rgba(236,236,236,0.500000); +} + + +.text-wrapper_8 { + background-color: rgba(236, 236, 236, 0.500000); border-radius: 4rpx; margin-left: 6rpx; white-space: nowrap; @@ -387,12 +458,13 @@ page{ font-weight: 500; font-size: 24rpx; color: #999999; - } - .text_18 { +} + +.text_18 { width: 94rpx; height: 23rpx; overflow-wrap: break-word; - color: rgba(153,153,153,1); + color: rgba(153, 153, 153, 1); font-size: 24rpx; font-family: PingFang-SC-Medium; font-weight: 500; @@ -400,8 +472,9 @@ page{ white-space: nowrap; line-height: 42rpx; margin: 7rpx 0 0 8rpx; - } - .text-wrapper_9 { +} + +.text-wrapper_9 { width: 243rpx; overflow-wrap: break-word; font-size: 0rpx; @@ -411,8 +484,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 4rpx 0 0 0; - } - .text_19 { +} + +.text_19 { width: 243rpx; height: 28rpx; overflow-wrap: break-word; @@ -423,8 +497,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_20 { +} + +.text_20 { width: 243rpx; height: 28rpx; overflow-wrap: break-word; @@ -435,16 +510,18 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .box_19 { +} + +.box_19 { width: 533rpx; height: 29rpx; flex-direction: row; display: flex; justify-content: space-between; margin: 27rpx 0 0 0; - } - .text-wrapper_10 { +} + +.text-wrapper_10 { width: 146rpx; height: 29rpx; overflow-wrap: break-word; @@ -454,8 +531,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_21 { +} + +.text_21 { width: 146rpx; height: 29rpx; overflow-wrap: break-word; @@ -466,8 +544,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_22 { +} + +.text_22 { width: 146rpx; height: 29rpx; overflow-wrap: break-word; @@ -478,8 +557,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_11 { +} + +.text-wrapper_11 { width: 145rpx; height: 28rpx; overflow-wrap: break-word; @@ -489,8 +569,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_23 { +} + +.text_23 { width: 145rpx; height: 28rpx; overflow-wrap: break-word; @@ -501,8 +582,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_24 { +} + +.text_24 { width: 145rpx; height: 28rpx; overflow-wrap: break-word; @@ -513,8 +595,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_12 { +} + +.text-wrapper_12 { width: 263rpx; height: 28rpx; overflow-wrap: break-word; @@ -525,8 +608,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 19rpx 0 0 0; - } - .text_25 { +} + +.text_25 { width: 263rpx; height: 28rpx; overflow-wrap: break-word; @@ -537,8 +621,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_26 { +} + +.text_26 { width: 263rpx; height: 28rpx; overflow-wrap: break-word; @@ -549,8 +634,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_13 { +} + +.text-wrapper_13 { width: 415rpx; height: 28rpx; overflow-wrap: break-word; @@ -561,8 +647,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 20rpx 0 0 0; - } - .text_27 { +} + +.text_27 { width: 415rpx; height: 28rpx; overflow-wrap: break-word; @@ -573,8 +660,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_28 { +} + +.text_28 { width: 415rpx; height: 28rpx; overflow-wrap: break-word; @@ -585,8 +673,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_29 { +} + +.text_29 { width: 415rpx; height: 28rpx; overflow-wrap: break-word; @@ -597,8 +686,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_14 { +} + +.text-wrapper_14 { width: 639rpx; height: 28rpx; overflow-wrap: break-word; @@ -609,8 +699,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 20rpx 0 0 0; - } - .text_30 { +} + +.text_30 { width: 639rpx; height: 28rpx; overflow-wrap: break-word; @@ -621,8 +712,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_31 { +} + +.text_31 { width: 639rpx; height: 28rpx; overflow-wrap: break-word; @@ -633,8 +725,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_15 { +} + +.text-wrapper_15 { width: 537rpx; height: 28rpx; overflow-wrap: break-word; @@ -645,8 +738,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 20rpx 0 0 0; - } - .text_32 { +} + +.text_32 { width: 537rpx; height: 28rpx; overflow-wrap: break-word; @@ -657,8 +751,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_33 { +} + +.text_33 { width: 537rpx; height: 28rpx; overflow-wrap: break-word; @@ -669,24 +764,27 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .image_6 { +} + +.image_6 { width: 650rpx; height: 1rpx; margin: 30rpx 0 0 31rpx; - } - .box_20 { +} + +.box_20 { width: 648rpx; height: 36rpx; flex-direction: row; display: flex; margin: 28rpx 0 0 31rpx; - } - .text_34 { +} + +.text_34 { width: 83rpx; height: 32rpx; overflow-wrap: break-word; - color: rgba(51,51,51,1); + color: rgba(51, 51, 51, 1); font-size: 34rpx; font-family: PingFang-SC-Medium; font-weight: 500; @@ -694,21 +792,23 @@ page{ white-space: nowrap; line-height: 41rpx; margin-top: 2rpx; - } - .text-wrapper_23 { - background-color: rgba(236,236,236,0.500000); +} + +.text-wrapper_23 { + background-color: rgba(236, 236, 236, 0.500000); border-radius: 4rpx; height: 36rpx; margin-left: 16rpx; display: flex; flex-direction: column; width: 60rpx; - } - .text_51 { +} + +.text_51 { width: 45rpx; height: 23rpx; overflow-wrap: break-word; - color: rgba(153,153,153,1); + color: rgba(153, 153, 153, 1); font-size: 24rpx; font-family: PingFang-SC-Medium; font-weight: 500; @@ -716,21 +816,23 @@ page{ white-space: nowrap; line-height: 42rpx; margin: 7rpx 0 0 8rpx; - } - .text-wrapper_24 { - background-color: rgba(236,236,236,0.500000); +} + +.text-wrapper_24 { + background-color: rgba(236, 236, 236, 0.500000); border-radius: 4rpx; height: 36rpx; margin-left: 6rpx; display: flex; flex-direction: column; width: 110rpx; - } - .text_52 { +} + +.text_52 { width: 94rpx; height: 23rpx; overflow-wrap: break-word; - color: rgba(153,153,153,1); + color: rgba(153, 153, 153, 1); font-size: 24rpx; font-family: PingFang-SC-Medium; font-weight: 500; @@ -738,8 +840,9 @@ page{ white-space: nowrap; line-height: 42rpx; margin: 7rpx 0 0 8rpx; - } - .text-wrapper_16 { +} + +.text-wrapper_16 { width: 243rpx; height: 28rpx; overflow-wrap: break-word; @@ -750,8 +853,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 5rpx 0 0 130rpx; - } - .text_35 { +} + +.text_35 { width: 243rpx; height: 28rpx; overflow-wrap: break-word; @@ -762,8 +866,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_36 { +} + +.text_36 { width: 243rpx; height: 28rpx; overflow-wrap: break-word; @@ -774,8 +879,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_17 { +} + +.text-wrapper_17 { width: 263rpx; height: 28rpx; overflow-wrap: break-word; @@ -786,8 +892,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 22rpx 0 0 30rpx; - } - .text_37 { +} + +.text_37 { width: 263rpx; height: 28rpx; overflow-wrap: break-word; @@ -798,8 +905,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_38 { +} + +.text_38 { width: 263rpx; height: 28rpx; overflow-wrap: break-word; @@ -810,8 +918,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_18 { +} + +.text-wrapper_18 { width: 415rpx; height: 28rpx; overflow-wrap: break-word; @@ -822,8 +931,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 20rpx 0 0 31rpx; - } - .text_39 { +} + +.text_39 { width: 415rpx; height: 28rpx; overflow-wrap: break-word; @@ -834,8 +944,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_40 { +} + +.text_40 { width: 415rpx; height: 28rpx; overflow-wrap: break-word; @@ -846,8 +957,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_41 { +} + +.text_41 { width: 415rpx; height: 28rpx; overflow-wrap: break-word; @@ -858,8 +970,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_19 { +} + +.text-wrapper_19 { width: 639rpx; height: 28rpx; overflow-wrap: break-word; @@ -870,8 +983,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 20rpx 0 0 31rpx; - } - .text_42 { +} + +.text_42 { width: 639rpx; height: 28rpx; overflow-wrap: break-word; @@ -882,8 +996,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_43 { +} + +.text_43 { width: 639rpx; height: 28rpx; overflow-wrap: break-word; @@ -894,8 +1009,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_20 { +} + +.text-wrapper_20 { width: 537rpx; height: 28rpx; overflow-wrap: break-word; @@ -906,8 +1022,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 20rpx 0 0 30rpx; - } - .text_44 { +} + +.text_44 { width: 537rpx; height: 28rpx; overflow-wrap: break-word; @@ -918,8 +1035,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_45 { +} + +.text_45 { width: 537rpx; height: 28rpx; overflow-wrap: break-word; @@ -930,33 +1048,37 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .image_9 { +} + +.image_9 { width: 650rpx; height: 1rpx; margin: 31rpx 0 0 30rpx; - } - .box_21 { +} + +.box_21 { width: 648rpx; height: 32rpx; flex-direction: row; display: flex; justify-content: space-between; margin: 36rpx 0 0 31rpx; - } - .text_53 { +} + +.text_53 { width: 83rpx; height: 32rpx; overflow-wrap: break-word; - color: rgba(51,51,51,1); + color: rgba(51, 51, 51, 1); font-size: 34rpx; font-family: PingFang-SC-Medium; font-weight: 500; text-align: left; white-space: nowrap; line-height: 41rpx; - } - .text-wrapper_25 { +} + +.text-wrapper_25 { width: 243rpx; height: 28rpx; overflow-wrap: break-word; @@ -967,8 +1089,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin-top: 3rpx; - } - .text_54 { +} + +.text_54 { width: 243rpx; height: 28rpx; overflow-wrap: break-word; @@ -979,8 +1102,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_55 { +} + +.text_55 { width: 243rpx; height: 28rpx; overflow-wrap: break-word; @@ -991,8 +1115,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_26 { +} + +.text-wrapper_26 { width: 263rpx; height: 28rpx; overflow-wrap: break-word; @@ -1003,8 +1128,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 24rpx 0 0 30rpx; - } - .text_56 { +} + +.text_56 { width: 263rpx; height: 28rpx; overflow-wrap: break-word; @@ -1015,8 +1141,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_57 { +} + +.text_57 { width: 263rpx; height: 28rpx; overflow-wrap: break-word; @@ -1027,8 +1154,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_27 { +} + +.text-wrapper_27 { width: 416rpx; height: 28rpx; overflow-wrap: break-word; @@ -1039,8 +1167,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 20rpx 0 0 31rpx; - } - .text_58 { +} + +.text_58 { width: 416rpx; height: 28rpx; overflow-wrap: break-word; @@ -1051,8 +1180,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_59 { +} + +.text_59 { width: 416rpx; height: 28rpx; overflow-wrap: break-word; @@ -1063,8 +1193,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_60 { +} + +.text_60 { width: 416rpx; height: 28rpx; overflow-wrap: break-word; @@ -1075,8 +1206,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_28 { +} + +.text-wrapper_28 { width: 639rpx; height: 28rpx; overflow-wrap: break-word; @@ -1087,12 +1219,13 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 20rpx 0 0 31rpx; - } +} .scroll { height: calc(100vh - 750rpx); } - .text_61 { + +.text_61 { width: 639rpx; height: 28rpx; overflow-wrap: break-word; @@ -1103,8 +1236,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_62 { +} + +.text_62 { width: 639rpx; height: 28rpx; overflow-wrap: break-word; @@ -1115,8 +1249,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text-wrapper_29 { +} + +.text-wrapper_29 { width: 537rpx; height: 28rpx; overflow-wrap: break-word; @@ -1127,8 +1262,9 @@ page{ white-space: nowrap; line-height: 40rpx; margin: 20rpx 0 27rpx 30rpx; - } - .text_63 { +} + +.text_63 { width: 537rpx; height: 28rpx; overflow-wrap: break-word; @@ -1139,8 +1275,9 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .text_64 { +} + +.text_64 { width: 537rpx; height: 28rpx; overflow-wrap: break-word; @@ -1151,36 +1288,61 @@ page{ text-align: left; white-space: nowrap; line-height: 40rpx; - } - .box_17 .tabs{ - display: flex; - justify-content: start; - - } - .box_17 .tabs .tab_item{ - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - margin-right: 20rpx; - } - .box_17 .tabs .tab_item .num{ - font-weight: 400; - font-size: 36rpx; - } - - .box_17 .tabs .tab_item .name{ - font-size: 26rpx; - padding-bottom:6rpx; - box-sizing: border-box; - color: #666666; - } - - .border_bto{ - color: #3974f6 !important; - border-bottom: solid 6rpx #3974f6; - } - .resi_tag{ +} + +.box_17 .tabs { + display: flex; + justify-content: start; + +} + +.box_17 .tabs .tab_item { + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; + margin-right: 20rpx; +} + +.box_17 .tabs .tab_item_fw { + display: flex; + flex-direction: column; + width: 120rpx; + justify-content: space-between; + align-items: center; + margin-right: 20rpx; +} + +.box_17 .tabs .tab_item .num { + font-weight: 400; + font-size: 36rpx; +} + +.box_17 .tabs .tab_item_fw .num { + font-weight: 400; + font-size: 36rpx; +} + +.box_17 .tabs .tab_item_fw .name { + font-size: 26rpx; + padding-bottom: 6rpx; + box-sizing: border-box; + color: #666666; +} + +.box_17 .tabs .tab_item .name { + font-size: 26rpx; + padding-bottom: 6rpx; + box-sizing: border-box; + color: #666666; +} + +.border_bto { + color: #3974f6 !important; + border-bottom: solid 6rpx #3974f6; +} + +.resi_tag { display: flex; flex-grow: 0; justify-content: start; @@ -1188,65 +1350,130 @@ page{ overflow-x: scroll; padding: 10rpx 0; box-sizing: border-box; - } - .form_item{ - margin-top: 10rpx; - padding: 0 30rpx 30rpx; - box-sizing: border-box; - border-bottom: 1rpx #EAEAEA solid; - } - .inout_box { +} + +.form_item { + margin-top: 10rpx; + padding: 0 30rpx 30rpx; + box-sizing: border-box; + border-bottom: 1rpx #EAEAEA solid; +} + +.scroll_fw { + height: calc(100vh - 750rpx); +} + +.form_item_fw { + width: 100%; + display: flex; + flex-wrap: wrap; + /* 可选:添加以下任一属性以调整子元素在主轴上的对齐方式 */ + justify-content: center; + /* justify-content: space-between; // 子元素间均匀间隔,首尾元素贴边 */ + /* justify-content: space-around; */ +} + +.form_item_fw_item{ + /* flex-basis: 200px; */ + /* 或设置固定宽度,如 */ + width: calc(33% - 24rpx); + /* 其他样式... */ + margin: 10rpx; + height: 124rpx; + background: rgba(225, 238, 254, 0.4); + /* 为了弥补可能出现的1px间隙,可以添加适当的左右外边距 */ +} +.form_item_fw_item_bg0{ + background: rgba(225, 238, 254, 0.4); +} +.form_item_fw_item_bg1{ + background: rgba(227, 248, 247, 0.4); +} +.form_item_fw_item_bg2{ + background: rgba(225, 238, 254, 0.4); +} +.form_item_fw_item_bg3{ + background: rgba(217, 223, 233, 0.4); +} +.item_fw{ + display: flex; + padding: 24rpx; +} +.item_img_fw_img{ + width: 32rpx; + height: 32rpx; +} +.item_text_hh{ + font-weight: bold; + font-size: 34rpx; + color: #333333; +} +.item_texts_fw{ + padding-left: 12rpx; + padding-top: 4rpx; +} +.item_text_rs{ + font-weight: 500; + font-size: 24rpx; + color: #999999; +} + +.inout_box { position: relative; margin: 20rpx 0 20rpx; padding: 0 20rpx; - box-sizing:border-box; - } - .inout_box input{ + box-sizing: border-box; +} + +.inout_box input { width: auto; background: #F5F5FA; border-radius: 47rpx; - padding:0 100rpx 0 69rpx; + padding: 0 100rpx 0 69rpx; height: 76rpx; font-size: 26rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - } - .inout_box .search_img{ +} + +.inout_box .search_img { position: absolute; left: 37rpx; top: 24rpx; width: 30rpx; height: 30rpx; - } - .inout_box .btn_box{ +} + +.inout_box .btn_box { width: 110rpx; height: 50rpx; position: absolute; top: 15rpx; - right:4rpx; + right: 4rpx; display: flex; align-items: center; - } - .inout_box .btn_box text{ +} + +.inout_box .btn_box text { width: 80rpx; height: 30rpx; line-height: 30rpx; font-size: 28rpx; box-sizing: border-box; - color:#3A80E7; + color: #3A80E7; padding-left: 15rpx; - border-left:2rpx #3A80E7 solid ; - } - .OCR_img{ - width: 44rpx; - height: 44rpx; - position: absolute; - left: -60rpx; - z-index: 10; - } - .font_bold{ + border-left: 2rpx #3A80E7 solid; +} + +.OCR_img { + width: 44rpx; + height: 44rpx; + position: absolute; + left: -60rpx; + z-index: 10; +} + +.font_bold { font-weight: 600; - } - - \ No newline at end of file +} \ No newline at end of file diff --git a/project.config.json b/project.config.json index 9c610f9..243fa51 100644 --- a/project.config.json +++ b/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", diff --git a/utils/api.js b/utils/api.js index b15a460..21dfd37 100644 --- a/utils/api.js +++ b/utils/api.js @@ -66,6 +66,11 @@ module.exports = { getAllOrgCategoryCount, getResiInfo, userXiangQ, + getTopTree, + getNextTree, + houseSearch, + allOrgHouseInfo, + getLogList, updatetResi } @@ -348,5 +353,26 @@ 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) +} diff --git a/utils/config.js b/utils/config.js index e786cec..c55aafd 100644 --- a/utils/config.js +++ b/utils/config.js @@ -6,8 +6,8 @@ module.exports = { function BASEURL() { // return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 - // return 'http://192.168.1.144/api/' //测试环境 - return 'http://219.146.91.110:30801/api/' + return 'http://192.168.1.144/api/' //测试环境 + // return 'http://219.146.91.110:30801/api/' //return http://219.146.91.110:30801/api //外网 }