From 16aeecf6c8c53bfcb5281add4d6b08a842f06140 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Mon, 13 Dec 2021 14:54:30 +0800 Subject: [PATCH] ddd --- .../visual/communityParty/community.vue | 107 +++++- .../modules/visual/communityParty/party.vue | 352 ++++++++++-------- src/views/modules/visual/cpts/analyse.vue | 1 + 3 files changed, 287 insertions(+), 173 deletions(-) diff --git a/src/views/modules/visual/communityParty/community.vue b/src/views/modules/visual/communityParty/community.vue index 27019e26..c7029f60 100644 --- a/src/views/modules/visual/communityParty/community.vue +++ b/src/views/modules/visual/communityParty/community.vue @@ -38,21 +38,22 @@
-
-
组织单位
-
1233
+
+
{{ item.label }}
+
{{ item.value }}
-
+
+ :operate="true" + @look="handleLook">
-
党建单位分类统计
+
党建单位分布
@@ -75,7 +76,7 @@
-
{{ item.name }}
+
{{ item.label }}
{{ item.value }}
@@ -95,7 +96,7 @@
-
{{ item.name }}
+
{{ item.label }}
@@ -141,6 +142,7 @@ export default { tableData: [ // [1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], ], + detailId: '', agencyId: '', value2: '', timeRange: '', @@ -180,7 +182,7 @@ export default { icon: require('../../../../assets/img/shuju/measure/qita.png') } ], - + cateInfo: [], //地图相关数据 isfirstInit: true,//记录是否是首次加载地图 agencyInfo: {},//登陆者的组织信息:主要为了获取地图中心点和level @@ -231,6 +233,8 @@ export default { await nextTick(100); this.loadUnit() this.getList(); + this.getCateCount() + this.getCateType() await this.getWorkUserInfo() await this.getMapUnitList() }, @@ -261,6 +265,81 @@ export default { } this.visibleLoading = false }, + async getCateCount () { + + const url = "/heart/icpartyactivity/statistics" + // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list" + let params = { + agencyId: this.agencyId + } + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.cateInfo = data + } else { + this.$message.error(msg) + } + }, + async getCateType () { + + const url = "/heart/icpartyunit/typestatistics" + // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list" + let params = { + agencyId: this.agencyId + } + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + // this.cateInfo = data + const colorItem = { + 0: { + color: 'rgba(250, 32, 10, 1)', + icon: require('../../../../assets/img/shuju/measure/ly@2x.png') + }, + 1: { + color: 'rgba(251, 177, 4, 1)', + icon: require('../../../../assets/img/shuju/measure/lxdj@2x.png') + }, + 2: { + color: 'rgba(80, 194, 237, 1)', + icon: require('../../../../assets/img/shuju/measure/xq@2x.png') + }, + 3: { + color: 'rgba(65, 181, 104, 1)', + icon: require('../../../../assets/img/shuju/measure/jgzs@2x.png') + }, + 4: { + color: 'rgba(192, 21, 195, 1)', + icon: require('../../../../assets/img/shuju/measure/qita.png') + } + } + this.partyItem = data.map((item, index) => { + return { + ...item, + ...colorItem[index] + } + }) + } else { + this.$message.error(msg) + } + }, + async getDetail () { + + const url = "/heart/icpartyactivity/detail" + let params = { + id: this.agencyId + } + + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.detailInfo = data + } else { + this.$message.error(msg) + } + }, async loadUnit () { const url = "/heart/icresidemanddict/subcodelist" // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option" @@ -328,8 +407,8 @@ export default { //获取联建单位分布图 async getMapUnitList () { - // const url = "/heart/icpartyunit/distribution" - const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution" + const url = "/heart/icpartyunit/distribution" + // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution" let params = { agencyId: this.agencyId @@ -393,7 +472,9 @@ export default { clickProject (feature) { console.log('标注信息', feature.values_.properties) }, - + handleLook(val) { + this.detailId = val.id + }, handleSelectChange () { this.getList(); diff --git a/src/views/modules/visual/communityParty/party.vue b/src/views/modules/visual/communityParty/party.vue index 3f0f419f..a94b7916 100644 --- a/src/views/modules/visual/communityParty/party.vue +++ b/src/views/modules/visual/communityParty/party.vue @@ -4,7 +4,7 @@
- + + --> + + +
@@ -47,7 +45,7 @@
{{item.value}}
-
25%
+
{{ item.radio }}
@@ -58,19 +56,19 @@
@@ -98,8 +96,8 @@
@@ -142,23 +140,31 @@ export default { }, data() { return { - warningList: [], headerList: [ { title: "序号", coulmn: 'index' }, - { title: "姓名", coulmn: 'gridName' }, - { title: "年龄", coulmn: 'buildingName' }, - { title: "手机号码", coulmn: 'neighborhoodName' } + { title: "姓名", coulmn: 'name' }, + { title: "年龄", coulmn: 'age' }, + { title: "手机号码", coulmn: 'mobile' } + ], + headerEduList: [ + { title: "序号", coulmn: 'index' }, + { title: "姓名", coulmn: 'name' }, + { title: "学历", coulmn: 'education' }, + { title: "手机号码", coulmn: 'mobile' } ], tableData: [ // [1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], ], + selectAgency: null, + propTree: [], value2: '', visibleLoading: true, pageNo: 1, pageSize: 10, + agePageNo: 1, + agePageSize: 10, total: 0, - activeIndex: 0, - activeLevel: "1", + ageTotal: 0, eduItem: [ { name: '小学', @@ -221,6 +227,8 @@ export default { color: 'rgba(255, 186, 0, 1)' } ], + ageList: [], + eduList: [], pieAgeChartS: null, pieEduChartSs: null, pieAgeOptions: null, @@ -228,12 +236,15 @@ export default { }; }, async mounted() { - await nextTick(100); - this.initAgeCharts() - this.initEduCharts() + await this.getAgencyList() + this.getAgeCount(this.$store.state.user.agencyId, 'agency') + this.getEduCount(this.$store.state.user.agencyId, 'agency') + // this.initAgeCharts() + // this.initEduCharts() + this.getAgeList(this.$store.state.user.agencyId, 'agency') + this.getEduList(this.$store.state.user.agencyId, 'agency') // this.initChartType() - this.getBuildingwarnlist(); }, methods: { pieInitOk (dom) { @@ -252,105 +263,7 @@ export default { // const eId = document.getElementById('echartOrg') // let _charts = echarts.init(eId) let option = { - // tooltip: { - // show: false, - // trigger: 'item' - // }, - // legend: { - // show: false, - // orient: 'vertical', - // top: '40%', - // left: 'right', - // textStyle: { - // color: '#fff' - // } - // }, - // title: { - // text: '12000', //图形标题,配置在中间对应效果图的80% - // subtext: '总数', - // left: "center", - // top: "center", - // textStyle: { - // color: "#fff", - // fontSize: 28, - // align: "center" - // }, - // subtextStyle: { - // fontSize: 16, - // color: '#fff' - // } - // }, - // series: [ - // { - // // name: 'Access From', - // type: 'pie', - // // center: ['10%', '50%'], - // radius: ['40%', '60%'], - // avoidLabelOverlap: true, - // // top: top + '%', - // // height: '80%', - // left: 'center', - // width: 400, - // label: { - // show: true, - // position: 'outer', - // alignTo: 'edge', - // formatter: '{a|{c}}\n{r|}\n{name|{b}}', - // minMargin: 5, - // edgeDistance: 20, - // lineHeight: 15, - // color: '#fff', - // fontSize: 12, - // // padding: [5], - // distanceToLabelLine: 10, - // rich: { - // name: { - // padding: [0, 6, 0, 6] - // }, - // a: { - // fontSize: 15, - // color: '#fff', - // padding: [0, 6, 0, 6] - // }, - // r: { - // backgroundColor: 'auto', - // borderRadius: 6, - // width: 6, - // height: 6, - // // padding: [3, 3, 0, -12] - // } - // } - // }, - // emphasis: { - // label: { - // show: true, - // fontSize: '14', - // fontWeight: 'bold' - // } - // }, - // labelLine: { - // show: false, - // length: 20, - // length2: 0, - // maxSurfaceAngle: 80, - // lineStyle: { - // cap: 'round' - // } - // }, - // labelLayout: function (params) { - // const isLeft = params.labelRect.x < this.pieChartS.getWidth() / 2; - // const points = params.labelLinePoints; - // // Update the end point. - // points[2][0] = isLeft - // ? params.labelRect.x - // : params.labelRect.x + params.labelRect.width; - // return { - // labelLinePoints: points - // }; - // }, - // data: this.ageItem - // } - // ] + } this.pieAgeOptions = pieOption(this.pieAgeChartS) this.clickAgePie(0) @@ -606,59 +519,163 @@ export default { this.$refs.eduChart.setOption(this.pieEduOptions) }, - onClickList(index, level) { - this.activeIndex = index; - this.activeLevel = level; - this.pageNo = 1; - this.getUserwarnlist(); + async getAgeCount(orgId, orgType) { + const url = "/epmetuser/icresiuser/partymemberagestatistics"; + let params = { + orgId, + orgType + }; + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + this.ageItem = data.map(item => { + return { + ...item, + name: item.label + } + }) + this.initAgeCharts() + } else { + } }, - //具体人员列表 - async getUserwarnlist() { - const { activeIndex, activeLevel, warningList } = this; - const reqItem = warningList[activeIndex]; - let tableData = []; - const url = "/epmetuser/statsresiwarn/userwarnlist"; + async getEduCount(orgId, orgType) { + const url = "/epmetuser/icresiuser/partymembereducationstatistics"; let params = { - configId: reqItem.configId, - buildingIdList: reqItem["buildingIdList" + activeLevel], - pageNo: this.pageNo, - pageSize: this.pageSize, + orgId, + orgType }; const { data, code, msg } = await requestPost(url, params); if (code === 0) { - tableData = data.list.map((item, index) => { + this.eduItem = data.map(item => { return { ...item, - index: index + 1, - residentNames: item.residentNames || "暂无" + name: item.label } - }); - this.tableData = tableData; - this.total = data.total; + }) + this.initEduCharts() } else { } }, - // 【人员预警】 楼宇预警数量列表 - async getBuildingwarnlist() { - const url = "/epmetuser/statsresiwarn/buildingwarnlist"; + async getAgeList(orgId, orgType, _code) { + this.visibleLoading = true + const url = "/epmetuser/icresiuser/partymemberagelist"; let params = { - agencyId: this.$store.state.user.agencyId, + orgId, + orgType, + code: _code || '', + pageNo: this.agePageNo, + pageSize: this.agePageSize }; const { data, code, msg } = await requestPost(url, params); if (code === 0) { - this.warningList = data; - this.visibleLoading = false; - this.getUserwarnlist(); + this.ageList = data.list.map((item, index) => { + return { + ...item, + index: index + 1 + } + }) + this.ageTotal = data.total } else { } + this.visibleLoading = false + }, + async getEduList(orgId, orgType, _code) { + const url = "/epmetuser/icresiuser/partymembereducationlist"; + let params = { + orgId, + orgType, + code: _code || '', + pageNo: this.pageNo, + pageSize: this.pageSize + }; + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + this.eduList = data.list.map((item, index) => { + return { + ...item, + index: index + 1 + } + }) + this.total = data.total + } else { + } + }, + async getAgencyList(node, resolve) { + // const url = "/gov/org/customeragency/staffinagencylist"; + const url = '/gov/org/customeragency/agencygridtree' + // let params = { + // agencyId: this.$store.state.user.agencyId, + // }; + const { data, code, msg } = await requestPost(url); + if (code === 0) { + console.log('data-org----o', data) + this.selectAgency = [`${data.agencyId}-${data.level}`] + let arr = [] + arr.push(data) + this.propTree = arr && this.getTreeData(arr) + + } else { + } + }, + getTreeData(data){ + if (!Array.isArray(data)) return [] + let arr = data.map(item => { + let _item = {} + if (item.subAgencyList) { + if (item.subAgencyList.length === 0) { + _item = { + label: item.agencyName, + value: item.agencyId + '-' + item.level, + level: item.level, + children: undefined + } + } else _item = { + label: item.agencyName, + value: item.agencyId + '-' + item.level, + level: item.level, + children: this.getTreeData(item.subAgencyList)} + } else { + _item = { + label: item.agencyName, + value: item.agencyId + '-' + item.level, + level: item.level, + } + } + return _item + }) + return arr + }, + handleCascader(val) { + console.log('val-vvv', val) + const _arr = val[val.length - 1].split('-') + const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' + this.getAgeList(_arr[0], orgType) + this.getEduList(_arr[0], orgType) + }, + getCheckedNodes(val) { + console.log('val-nnn', val) + }, + lazyLoad(node, resolve) { + setTimeout(() => { + this.getAgeList(node, resolve) + }, 500) + }, + pageSizeChangeHandleAge(val) { + this.agePageNo = 1 + this.agePageSize = val + this.getAgeList() + }, + pageCurrentChangeHandleAge (val) { + this.agePageSize = val + this.getAgeList() }, pageSizeChangeHandleNew(val) { this.pageNo = 1; this.pageSize = val; + this.getEduList() }, pageCurrentChangeHandleNew(val) { this.pageNo = val; - this.getUserwarnlist(); + this.getEduList() }, }, }; @@ -723,6 +740,21 @@ export default { } } + .title-label { + ::v-deep .el-input { + width: 180px; + .el-input__inner { + font-size: 20px; + font-weight: 800; + color: #fff; + background: transparent; + border: 0; + } + .el-icon-arrow-down::before { + content: "\e790"; + } + } + } } .card-echart { display: flex; diff --git a/src/views/modules/visual/cpts/analyse.vue b/src/views/modules/visual/cpts/analyse.vue index 51378193..f5e18295 100644 --- a/src/views/modules/visual/cpts/analyse.vue +++ b/src/views/modules/visual/cpts/analyse.vue @@ -433,6 +433,7 @@ export default { width: 100%; box-sizing: border-box; padding: 8px 0; + color: #fff; border-bottom: 1px dashed rgba(131, 152, 217, 1); .item-status { min-width: 50px;