From a20b21ee15694bb104384d4d8dd5c9e30b05b72c Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Tue, 14 Dec 2021 15:09:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E5=8C=96=E5=85=9A=E5=BB=BA?= =?UTF-8?q?=EF=BC=8C=E6=9C=8D=E5=8A=A1=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visual/communityParty/community.vue | 69 +- .../visual/communityParty/dialogInfo.vue | 109 ++-- .../modules/visual/communityParty/party.vue | 38 +- src/views/modules/visual/cpts/analyse.vue | 18 +- .../modules/visual/measure/dialogInfo.vue | 614 ++++++++++++++++++ src/views/modules/visual/measure/service.vue | 441 +++++++++---- .../modules/visual/measure/volunteer.vue | 147 ++--- src/views/pages/login.vue | 20 + 8 files changed, 1191 insertions(+), 265 deletions(-) create mode 100644 src/views/modules/visual/measure/dialogInfo.vue diff --git a/src/views/modules/visual/communityParty/community.vue b/src/views/modules/visual/communityParty/community.vue index c7029f60e..71601608e 100644 --- a/src/views/modules/visual/communityParty/community.vue +++ b/src/views/modules/visual/communityParty/community.vue @@ -31,8 +31,8 @@ end-placeholder="结束日期" prefix-icon="el-icon-caret-bottom" value-format="yyyy-MM-dd HH:mm:ss" - @change="handleSelectChange" - @clear="handleSelectChange"> + :default-time="['00:00:00', '23:59:59']" + > @@ -73,8 +73,8 @@
-
{{ item.label }}
-
@@ -103,7 +103,7 @@
-
@@ -225,6 +225,7 @@ export default { longitude: 120.379455, } ], + detailInfo: {} }; }, async mounted () { @@ -238,6 +239,12 @@ export default { await this.getWorkUserInfo() await this.getMapUnitList() }, + watch: { + timeRange(val) { + console.log('val-www', val) + this.getList(); + } + }, methods: { //具体人员列表 @@ -251,15 +258,20 @@ export default { pageSize: this.pageSize, pageNo: this.pageNo, serviceMatter: this.serviceMatter, - startTime: this.timeRange.length > 0 && this.timeRange[0] || '', - endTime: this.timeRange.length > 0 && this.timeRange[1] || '' + startTime: this.timeRange && this.timeRange[0] || '', + endTime: this.timeRange && this.timeRange[1] || '' } const { data, code, msg } = await requestPost(url, params) if (code === 0) { this.total = data.total - this.tableData = data.list + this.tableData = data.list.map((item, index) => { + return { + ...item, + index: index + 1 + } + }) } else { this.$message.error(msg) } @@ -325,11 +337,11 @@ export default { this.$message.error(msg) } }, - async getDetail () { + async getDetail (id) { const url = "/heart/icpartyactivity/detail" let params = { - id: this.agencyId + id: id } const { data, code, msg } = await requestPost(url, params) @@ -340,6 +352,7 @@ export default { this.$message.error(msg) } }, + async loadUnit () { const url = "/heart/icresidemanddict/subcodelist" // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option" @@ -472,8 +485,11 @@ export default { clickProject (feature) { console.log('标注信息', feature.values_.properties) }, - handleLook(val) { + async handleLook(val) { + this.detailId = val.id + await this.getDetail(val.id) + this.showedMoreInfo = true }, handleSelectChange () { @@ -506,6 +522,33 @@ export default { .card-wr:last-child { margin-left: 20px; } + ::v-deep .table-body { + overflow: auto; + &::-webkit-scrollbar { + width: 8px; + // background: linear-gradient(270deg, #0063FE, #0095FF); + } + + &::-webkit-scrollbar-corner, + /* 滚动条角落 */ + &::-webkit-scrollbar-thumb, + &::-webkit-scrollbar-track { /*滚动条的轨道*/ + border-radius: 4px; + } + + &::-webkit-scrollbar-corner, + &::-webkit-scrollbar-track { + /* 滚动条轨道 */ + + background: rgba(12, 129, 254, .24); + // box-shadow: inset 0 0 1px rgba(180, 160, 120, 0.5); + } + + &::-webkit-scrollbar-thumb { + /* 滚动条手柄 */ + background: linear-gradient(270deg, #0063FE, #0095FF); + } + } } .card-title { display: flex; diff --git a/src/views/modules/visual/communityParty/dialogInfo.vue b/src/views/modules/visual/communityParty/dialogInfo.vue index 736a092ea..4a5212900 100644 --- a/src/views/modules/visual/communityParty/dialogInfo.vue +++ b/src/views/modules/visual/communityParty/dialogInfo.vue @@ -4,77 +4,62 @@
- 需求详情 + 活动详情
-
需求内容
+
-
- +
- 所属网格: - 哈哈哈 + 服务事项: + {{ info.serviceMatterName }}
- 需求类型: - 的是法撒旦法 + 单位名称: + {{ info.unitName }}
- 需求状态: - 第三方士大夫 + 活动标题: + {{ info.title }}
- 上报类型: - 撒打发斯蒂芬 + 活动内容: +
- 上 报 人: - 撒打发斯蒂芬 + 服务人数: + {{ info.peopleCount }}
- 上报人联系方式: - 撒打发斯蒂芬 + 活动时间: + {{ info.activityTime }}
- 上报时间: - 2021-09-17 12:52 + 活动坐标: + 经度:{{ info.latitude }}
+ 纬度:{{ info.longitude }}
- 服务时间: - 2021-09-17 12:52 + 活动地址: + {{ info.address }}
- 服务方: - 哈哈哈 -
-
- 实际服务时间: - 2021-09-17 12:52 至
- 2021-09-17 17:52
-
-
- 完成情况: - 第三方士大夫 -
-
- 评价: - - - + 活动结果: +
-
+ @@ -119,6 +104,7 @@ export default { type: String, default: "", }, + info: Object }, components: { @@ -132,7 +118,7 @@ export default { groupList: [], groupIndex: 0, startGroupIndex: 0, - info: {}, + // info: {}, allInfo: {}, xiaoquList: [], @@ -371,6 +357,46 @@ export default { margin-bottom: 15px; font-size: 16px; cursor: pointer; + .item-field { + // width: 100px; + flex-shrink: 0; + } + .item-content { + width: 100%; + max-height: 420px; + overflow-y: auto; + &::-webkit-scrollbar { + width: 8px; + // background: linear-gradient(270deg, #0063FE, #0095FF); + } + + &::-webkit-scrollbar-corner, + /* 滚动条角落 */ + &::-webkit-scrollbar-thumb, + &::-webkit-scrollbar-track { /*滚动条的轨道*/ + border-radius: 4px; + } + + &::-webkit-scrollbar-corner, + &::-webkit-scrollbar-track { + /* 滚动条轨道 */ + + background: rgba(12, 129, 254, .24); + // box-shadow: inset 0 0 1px rgba(180, 160, 120, 0.5); + } + + &::-webkit-scrollbar-thumb { + /* 滚动条手柄 */ + background: linear-gradient(270deg, #0063FE, #0095FF); + } + } + ::v-deep p { + margin: 0; + img { + width: 100%; + height: 100%; + } + } } .item-desc { font-size: 16px; @@ -392,4 +418,5 @@ export default { padding: 0 32px; } + diff --git a/src/views/modules/visual/communityParty/party.vue b/src/views/modules/visual/communityParty/party.vue index a94b79167..62d804676 100644 --- a/src/views/modules/visual/communityParty/party.vue +++ b/src/views/modules/visual/communityParty/party.vue @@ -39,7 +39,7 @@
-
+
{{ item.name }}
@@ -155,7 +155,10 @@ export default { tableData: [ // [1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], ], + noInit: false, selectAgency: null, + ageTotalCount: 0, + eduTotalCount: 0, propTree: [], value2: '', visibleLoading: true, @@ -319,6 +322,7 @@ export default { this.clickEduPie(params.dataIndex) } this.$refs.eduChart.handleClick(fun) + this.noInit = true // option && this.$refs.pieChart.setOption(option); }, @@ -448,8 +452,10 @@ export default { }, clickAgePie (seriesIndex) { + let _code = '' this.ageItem.forEach((element, index) => { if (index === seriesIndex) { + _code = element.code element.label = { show: true, @@ -461,7 +467,7 @@ export default { } }; - console.log('zlcm') + console.log('zlcm', element) } else { element.label = { show: false, @@ -478,14 +484,23 @@ export default { } }); + this.pieAgeOptions.title.text = this.ageTotalCount this.pieAgeOptions.series[1].data = this.ageItem // this.$refs.pieChart.hideLoading() this.$refs.ageChart.setOption(this.pieAgeOptions) + if (this.noInit) { + const _arr = this.selectAgency[this.selectAgency.length - 1].split('-') + const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' + this.getAgeList(_arr[0], orgType, _code) + } + this.noInit = true }, clickEduPie (seriesIndex) { + let _code = '' this.eduItem.forEach((element, index) => { if (index === seriesIndex) { + _code = element.code element.label = { show: true, @@ -514,9 +529,18 @@ export default { } }); + this.pieEduOptions.title.text = this.eduTotalCount this.pieEduOptions.series[1].data = this.eduItem // this.$refs.pieChart.hideLoading() this.$refs.eduChart.setOption(this.pieEduOptions) + if (this.noInit) { + const _arr = this.selectAgency[this.selectAgency.length - 1].split('-') + const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' + + this.getEduList(_arr[0], orgType, _code) + } + this.noInit = true + }, async getAgeCount(orgId, orgType) { @@ -533,6 +557,9 @@ export default { name: item.label } }) + data.forEach(item => { + this.ageTotalCount += Number(item.value) + }) this.initAgeCharts() } else { } @@ -551,11 +578,15 @@ export default { name: item.label } }) + data.forEach(item => { + this.eduTotalCount += Number(item.value) + }) this.initEduCharts() } else { } }, async getAgeList(orgId, orgType, _code) { + this.visibleLoading = true const url = "/epmetuser/icresiuser/partymemberagelist"; let params = { @@ -575,7 +606,9 @@ export default { }) this.ageTotal = data.total } else { + this.$message.error(msg) } + // if (_code == 0 || _code) this.noInit = true this.visibleLoading = false }, async getEduList(orgId, orgType, _code) { @@ -597,6 +630,7 @@ export default { }) this.total = data.total } else { + this.$message.error(msg) } }, async getAgencyList(node, resolve) { diff --git a/src/views/modules/visual/cpts/analyse.vue b/src/views/modules/visual/cpts/analyse.vue index f5e18295c..462db2f8c 100644 --- a/src/views/modules/visual/cpts/analyse.vue +++ b/src/views/modules/visual/cpts/analyse.vue @@ -134,7 +134,8 @@ class="analys-up analys-down" src="../../../../assets/img/shuju/measure/down-right.png" />
-
+
@@ -446,9 +447,13 @@ export default { // line-height: 15px; background: #0C5CFE; border-radius: 2px; - &-pending { + &-pending, &-canceled { background: rgba(224, 84, 0, 1); } + &-assigned, &-have_order { + background: rgba(9, 163, 125, 1); + } + } .item-content { font-size: 14px; @@ -474,6 +479,11 @@ export default { .list { height: 235px; } + .cate-list { + .cate-row { + margin-bottom: 0; + } + } } .analys-col-posi { // .analys-up, .analys-down { @@ -505,8 +515,8 @@ export default { .list-wr::-webkit-scrollbar-corner, /* 滚动条角落 */ -.list::-webkit-scrollbar-thumb, -.scroll-container::-webkit-scrollbar-track { /*滚动条的轨道*/ +.list-wr::-webkit-scrollbar-thumb, +.list-wr::-webkit-scrollbar-track { /*滚动条的轨道*/ border-radius: 4px; } diff --git a/src/views/modules/visual/measure/dialogInfo.vue b/src/views/modules/visual/measure/dialogInfo.vue new file mode 100644 index 000000000..39c06e968 --- /dev/null +++ b/src/views/modules/visual/measure/dialogInfo.vue @@ -0,0 +1,614 @@ + + + + + + diff --git a/src/views/modules/visual/measure/service.vue b/src/views/modules/visual/measure/service.vue index 96cc33bac..cf0a52a33 100644 --- a/src/views/modules/visual/measure/service.vue +++ b/src/views/modules/visual/measure/service.vue @@ -4,26 +4,30 @@
- - - 全部网格 - - - 黄金糕 - 狮子头 - 螺蛳粉 - 双皮奶 - 蚵仔煎 - - + +
选择时间
-
- + +
@@ -117,6 +121,7 @@ :headerList="headerList" :tableData="tableData" :visibleLoading="visibleLoading" + @look="handleLook" > +
@@ -140,6 +151,7 @@ import { requestPost } from "@/js/dai/request"; import screenTable from "../components/screen-table/index"; import cptCard from "@/views/modules/visual/cpts/card"; import nextTick from "dai-js/tools/nextTick"; +import dialogInfo from './dialogInfo' import * as echarts from 'echarts'; export default { @@ -147,41 +159,52 @@ export default { components: { cptCard, screenTable, + dialogInfo }, data() { return { + showedMoreInfo: false, warningList: [], headerList: [ { title: "序号", coulmn: 'index' }, - { title: "需求类型", coulmn: 'gridName' }, - { title: "具体内容", coulmn: 'buildingName' }, - { title: "上报情况", coulmn: 'neighborhoodName' }, - { title: "上报人", coulmn: 'residentNames' }, - { title: "上报时间", coulmn: 'residentNames' }, - { title: "是否认领", coulmn: 'residentNames' }, - { title: "认领方", coulmn: 'residentNames' }, - { title: "认领时间", coulmn: 'residentNames' } + { title: "状态", coulmn: 'statusName' }, + { title: "所属网格", coulmn: 'gridName' }, + { title: "需求类型", coulmn: 'categoryName' }, + { title: "需求内容", coulmn: 'content' }, + { title: "上报类型", coulmn: 'reportTypeName' }, + { title: "上报人", coulmn: 'reportUserName' }, + { title: "上报时间", coulmn: 'reportTime' }, + { title: "需求人", coulmn: 'gridName' }, + { title: "服务方", coulmn: 'serviceName' }, + { title: "服务时间", coulmn: 'wantServiceTime' }, ], + timeRange: '', tableData: [ // [1,'商丘路社区第一网格','商丘路小区','2号楼','杨颖、王平、刘佳敏、丁辉、杨萍'], ], + reportDict: [], + selectAgency: '', + propTree: [], value2: '', visibleLoading: true, pageNo: 1, pageSize: 10, total: 0, - activeIndex: 0, - activeLevel: "1", + detailInfo: {} }; }, async mounted() { + this.initTime() await nextTick(100); - this.initCharts() + await this.getAgencyList() + await this.getDict() + this.getServicePie(this.$store.state.user.agencyId, 'agency') + // this.initCharts() // this.initChartType() - this.getBuildingwarnlist(); + // this.getServiceList(this.$store.state.user.agencyId, 'agency'); }, methods: { - initCharts() { + initCharts(xData, yData) { const eId = document.getElementById('echartsBox') let _charts = echarts.init(eId) @@ -211,7 +234,7 @@ export default { axisLabel: { color: '#fff' }, - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + data: xData }, yAxis: { type: 'value', @@ -223,61 +246,96 @@ export default { }, // axisLine: false }, - series: [ - { - name: '区域化党建单位', - type: 'bar', - stack: 'total', - // barWidth: 20, - label: { - show: true - }, - emphasis: { - focus: 'series' - }, - data: [320, 302, 301, 334, 390, 330, 320] - }, - { - name: '社会组织', - type: 'bar', - stack: 'total', - // barWidth: 20, - label: { - show: true - }, - emphasis: { - focus: 'series' - }, - data: [120, 132, 101, 134, 90, 230, 210] - }, - { - name: '社区自组织', - type: 'bar', - stack: 'total', - // barWidth: 20, - label: { - show: true - }, - emphasis: { - focus: 'series' - }, - data: [220, 182, 191, 234, 290, 330, 310] - }, - { - name: '志愿者', - type: 'bar', - stack: 'total', - // barWidth: 20, - label: { - show: true - }, - emphasis: { - focus: 'series' - }, - data: [150, 212, 201, 154, 190, 330, 410] - }, - { - name: '未完成', + series: yData + // [ + // { + // name: '区域化党建单位', + // type: 'bar', + // stack: 'total', + // // barWidth: 20, + // label: { + // show: true + // }, + // emphasis: { + // focus: 'series' + // }, + // data: [320, 302, 301, 334, 390, 330, 320] + // }, + // { + // name: '社会组织', + // type: 'bar', + // stack: 'total', + // // barWidth: 20, + // label: { + // show: true + // }, + // emphasis: { + // focus: 'series' + // }, + // data: [120, 132, 101, 134, 90, 230, 210] + // }, + // { + // name: '社区自组织', + // type: 'bar', + // stack: 'total', + // // barWidth: 20, + // label: { + // show: true + // }, + // emphasis: { + // focus: 'series' + // }, + // data: [220, 182, 191, 234, 290, 330, 310] + // }, + // { + // name: '志愿者', + // type: 'bar', + // stack: 'total', + // // barWidth: 20, + // label: { + // show: true + // }, + // emphasis: { + // focus: 'series' + // }, + // data: [150, 212, 201, 154, 190, 330, 410] + // }, + // { + // name: '未完成', + // type: 'bar', + // stack: 'total', + // // barWidth: 20, + // label: { + // show: true + // }, + // emphasis: { + // focus: 'series' + // }, + // data: [820, 832, 901, 934, 1290, 1330, 1320] + // } + // ] + }; + + option && _charts.setOption(option); + + }, + async getServicePie(orgId, orgType) { + const url = "/heart/userdemand/category-analysis"; + let params = { + orgId, + orgType, + startDateId: this.timeRange && this.timeRange[0] || '', + endDateId: this.timeRange && this.timeRange[1] || '' + }; + const { data, code, msg } = await requestPost(url, params); + if (code === 0) { + console.log('pie-data', data) + const { categoryList, legend } = data + let xData = categoryList.map(item => item.categoryName) + let yData = [] + yData = legend.map(item => { + return { + name: item.legendName, type: 'bar', stack: 'total', // barWidth: 20, @@ -287,60 +345,148 @@ export default { emphasis: { focus: 'series' }, - data: [820, 832, 901, 934, 1290, 1330, 1320] + data: categoryList.map(n => n.total) } - ] - }; - - option && _charts.setOption(option); - - }, - - onClickList(index, level) { - this.activeIndex = index; - this.activeLevel = level; - this.pageNo = 1; - this.getUserwarnlist(); + }) + + this.initCharts(xData, yData) + this.getServiceList(orgId, orgType, data.categoryList[0].categoryCode) + } else { + } + this.visibleLoading = false; }, - //具体人员列表 - async getUserwarnlist() { - const { activeIndex, activeLevel, warningList } = this; - const reqItem = warningList[activeIndex]; - let tableData = []; - const url = "/epmetuser/statsresiwarn/userwarnlist"; + async getServiceList(orgId, orgType, _code) { + const url = "/heart/userdemand/pagelist-analysis"; let params = { - configId: reqItem.configId, - buildingIdList: reqItem["buildingIdList" + activeLevel], + orgId, + orgType, pageNo: this.pageNo, pageSize: this.pageSize, + categoryCode: _code || '', + startDateId: this.timeRange && this.timeRange[0] || '', + endDateId: this.timeRange && this.timeRange[1] || '' }; const { data, code, msg } = await requestPost(url, params); if (code === 0) { - tableData = data.list.map((item, index) => { + const status = { + pending: '待处理', + canceled: '已取消', + assigned: '已派单', + have_order: '已接单', + finished: '已完成', + } + // const type = { + // volunteer: '志愿者', + // social_org: '社会组织', + // community_org: '社区自组织', + // party_unit: '区域党建单位', + // } + this.tableData = data.list.map((item, index) => { return { ...item, - index: index + 1, - residentNames: item.residentNames || "暂无" + statusName: status[item.status], + reportTypeName: this.reportDict.filter(n => n.value === item.reportType)[0].label, + index: index + 1 } - }); - this.tableData = tableData; - this.total = data.total; + }) + this.total = data.total + } else { } + this.visibleLoading = false; }, - // 【人员预警】 楼宇预警数量列表 - async getBuildingwarnlist() { - const url = "/epmetuser/statsresiwarn/buildingwarnlist"; + async getAgencyList() { + // 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 { + this.$message.error(msg) + } + }, + async getDict() { + // const url = "/gov/org/customeragency/staffinagencylist"; + const url = '/sys/dict/data/dictlist' let params = { - agencyId: this.$store.state.user.agencyId, + dictType: 'user_demand_report_type', }; const { data, code, msg } = await requestPost(url, params); if (code === 0) { - this.warningList = data; - this.visibleLoading = false; - this.getUserwarnlist(); + console.log('data-org----dict', data) + this.reportDict = data + } else { + this.$message.error(msg) + } + }, + 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 + }, + initTime() { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + console.log('time-rtt', this.timeFormat(start), this.timeFormat(end)) + this.timeRange = [this.timeFormat(start), this.timeFormat(end)] + }, + timeFormat(date) { + if (!date || typeof date === 'string') { + return false } + var y = date.getFullYear() //年 + var m = date.getMonth() + 1 //月 + if (m < 10) m = '0' + m + var d = date.getDate() //日 + if (d < 10) d = '0' + d + + return y + '-' + m + '-' + d + }, + async handleLook(val) { + + // this.detailId = val.id + this.detailInfo = val + // await this.getDetail(val.id) + this.showedMoreInfo = true + }, + handleCascader(val) { + console.log('val-vvv', val) + const _arr = val[val.length - 1].split('-') + const orgType = _arr[1] !== 'grid' ? 'agency': 'grid' + this.getServiceList(_arr[0], orgType) }, pageSizeChangeHandleNew(val) { this.pageNo = 1; @@ -348,7 +494,6 @@ export default { }, pageCurrentChangeHandleNew(val) { this.pageNo = val; - this.getUserwarnlist(); }, }, }; @@ -413,7 +558,67 @@ 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"; + } + } + } } +.second-select { + margin: 0 10px 0 0; + ::v-deep .el-input { + width: 180px; + height: 36px; + .el-input__inner { + height: 100%; + padding: 0 10px; + color: #fff; + line-height: 36px; + background: #06186d; + border: 1px solid #1a64cc; + } + + .el-icon-arrow-up:before { + content: "\e78f"; + } + // .el-select__caret:before { + // content: '\E790' + // } + } + ::v-deep .el-date-editor { + width: 360px; + position: relative; + background: #06186d; + border: 1px solid #1a64cc; + .el-range-input { + color: #fff; + background: #06186d; + } + .el-range-separator { + color: #fff; + } + .el-range__icon { + position: absolute; + right: 5px; + // float: right; + } + .el-input__prefix { + left: unset; + right: 5px; + } + } + } .card-echart { display: flex; margin-top: 40px; diff --git a/src/views/modules/visual/measure/volunteer.vue b/src/views/modules/visual/measure/volunteer.vue index 8850c5402..fe191e932 100644 --- a/src/views/modules/visual/measure/volunteer.vue +++ b/src/views/modules/visual/measure/volunteer.vue @@ -14,13 +14,13 @@
-
6500
+
{{ vInfo.partyTotal || 0 }}
党员数量
-
6500
+
{{ vInfo.resiTotal || 0 }}
居民数量
@@ -40,13 +40,13 @@
-
6500
+
{{ vInfo.partyServiceTotal || 0 }}
党员数量
-
6500
+
{{ vInfo.resiServiceTotal || 0 }}
居民数量
@@ -187,19 +187,24 @@ export default { longitude: 120.379455, } ], + vPersonal: [], + vCount: [], + vpTotal: 0, + vcTotal: 0, + vInfo: {} }; }, async mounted () { await nextTick(100); - this.initCharts() - this.initCount() - this.getBuildingwarnlist(); + this.getPie() + // this.initCharts() + // this.initCount() await this.getWorkUserInfo() await this.getMapUnitList() }, methods: { - initCharts () { + initCharts (total, data) { const eId = document.getElementById('echartService') let _charts = echarts.init(eId) let option = { @@ -215,7 +220,7 @@ export default { } }, title: { - text: '12000', //图形标题,配置在中间对应效果图的80% + text: total, //图形标题,配置在中间对应效果图的80% subtext: '志愿者总数', left: "center", top: "center", @@ -248,29 +253,14 @@ export default { } }, - data: [ - { - value: 104, - name: '党员', - itemStyle: { - color: 'rgba(26, 178, 255, 1)' - } - }, - { - value: 735, - name: '居民', - itemStyle: { - color: 'rgba(250, 193, 38, 1)' - } - } - ] + data: data } ] } option && _charts.setOption(option); }, - initCount () { + initCount (total, data) { const eId = document.getElementById('echartCount') let _charts = echarts.init(eId) let option = { @@ -286,7 +276,7 @@ export default { } }, title: { - text: '12000', //图形标题,配置在中间对应效果图的80% + text: total, //图形标题,配置在中间对应效果图的80% subtext: '志愿者服务总数', left: "center", top: "center", @@ -322,82 +312,65 @@ export default { } }, - data: [ - { - value: 1048, - name: '党员', - itemStyle: { - color: 'rgba(26, 178, 255, 1)' - } - }, - { - value: 735, - name: '居民', - itemStyle: { - color: 'rgba(250, 193, 38, 1)' - } - } - ] + data: data } ] } option && _charts.setOption(option); }, - - onClickList (index, level) { - this.activeIndex = index; - this.activeLevel = level; - this.pageNo = 1; - this.getUserwarnlist(); - }, - //具体人员列表 - async getUserwarnlist () { - const { activeIndex, activeLevel, warningList } = this; - const reqItem = warningList[activeIndex]; - let tableData = []; - const url = "/epmetuser/statsresiwarn/userwarnlist"; - let params = { - configId: reqItem.configId, - buildingIdList: reqItem["buildingIdList" + activeLevel], - pageNo: this.pageNo, - pageSize: this.pageSize, - }; - const { data, code, msg } = await requestPost(url, params); + async getPie () { + const url = "/data/report/heart/demand/volunteer/service"; + // let params = { + // agencyId: this.$store.state.user.agencyId, + // }; + const { data, code, msg } = await requestPost(url); if (code === 0) { - tableData = data.list.map((item, index) => { - return { - ...item, - index: index + 1, - residentNames: item.residentNames || "暂无" + console.log('data-ddd', data) + this.vInfo = data + const arr = [{ + name: '党员数量', + value: data.partyTotal, + itemStyle: { + color: 'rgba(26, 178, 255, 1)' } - }); - this.tableData = tableData; - this.total = data.total; + }, { + name: '居民数量', + value: data.resiTotal, + itemStyle: { + color: 'rgba(250, 193, 38, 1)' + } + }] + const arr1 = [{ + name: '党员数量', + value: data.partyServiceTotal, + itemStyle: { + color: 'rgba(26, 178, 255, 1)' + } + }, { + name: '居民数量', + value: data.resiServiceTotal, + temStyle: { + color: 'rgba(250, 193, 38, 1)' + } + }] + this.vPersonal = [ ...arr ] + this.vCount = [ ...arr1 ] + this.vpTotal = data.volunteerTotal + this.vcTotal = data.serviceTotal + this.initCharts(data.volunteerTotal, arr) + this.initCount(data.serviceTotal, arr1) } else { + this.$message.error(msg) } }, // 【人员预警】 楼宇预警数量列表 - async getBuildingwarnlist () { - const url = "/epmetuser/statsresiwarn/buildingwarnlist"; - let params = { - agencyId: this.$store.state.user.agencyId, - }; - const { data, code, msg } = await requestPost(url, params); - if (code === 0) { - this.warningList = data; - this.visibleLoading = false; - this.getUserwarnlist(); - } else { - } - }, pageSizeChangeHandleNew (val) { this.pageNo = 1; this.pageSize = val; }, pageCurrentChangeHandleNew (val) { this.pageNo = val; - this.getUserwarnlist(); }, // 获取当前管理员信息 @@ -645,11 +618,11 @@ export default { } .card-wr-map { - height: calc(100vh - 110px); + height: calc(100vh - 140px); .card-map { width: 100%; - height: calc(100vh - 255px); + height: calc(100vh - 285px); .map { width: 100%; diff --git a/src/views/pages/login.vue b/src/views/pages/login.vue index d08988d78..013f89d45 100644 --- a/src/views/pages/login.vue +++ b/src/views/pages/login.vue @@ -182,6 +182,26 @@ export default { const params = { phone: this.dataForm.phone } + // this.$http + // .post(url, params).then(({ data })=> { + // console.log('res--comll', data) + // if (data.data.length === 0) { + // //没有客户,提示无法登录 + // this.$message.error('账号不存在') + // this.endLoading() + // } else if (data.data.length === 1) { + // this.selectCustomer(data.data[0]) + // } else { + // this.endLoading() + // this.diaVisible = true + // this.$nextTick(() => { + // this.tableData = data.data + // }) + // } + // }).catch((err) => { + // this.endLoading() + // this.$message.error(err) + // }) window.app.ajax.post( url, params,