From 13b4b7342ef6d4a45d8b282d52be67b4f96bf9de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E6=9C=89=E6=B8=85=E9=A6=99=E6=9C=88=E6=9C=89?=
=?UTF-8?q?=E9=98=B4?= <185154740@qq.com>
Date: Wed, 22 Dec 2021 11:40:37 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E7=BB=9F=E8=AE=A1bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/apps/AppResidentFile/AppResidentFile.vue | 166 ++++++++++---------
1 file changed, 91 insertions(+), 75 deletions(-)
diff --git a/src/apps/AppResidentFile/AppResidentFile.vue b/src/apps/AppResidentFile/AppResidentFile.vue
index e6a3d14b..261546e5 100644
--- a/src/apps/AppResidentFile/AppResidentFile.vue
+++ b/src/apps/AppResidentFile/AppResidentFile.vue
@@ -9,22 +9,22 @@
- 1
- 群聊人数
+ {{ groupSum }}
+ 群聊总数
- 1
+ {{ chartsList.total }}
群成员总数
- 1
+ {{ chartsList.increase }}
今日入群
- 1
+ {{ chartsList.decrease }}
今日退群
@@ -39,23 +39,18 @@
- 1
- 群聊人数
+ {{ nums }}
+ 居民总数
- 1
- 群成员总数
+ {{ chartsList.increase }}
+ 今日新增
- 1
- 今日入群
-
-
-
- 1
- 今日退群
+ {{ chartsList.decrease }}
+ 今日流失
@@ -143,8 +138,8 @@ export default {
return {
lists: [
{
- iconPath: 'order',
- selectedIconPath: 'order-fill',
+ iconPath: 'home',
+ selectedIconPath: 'home-fill',
text: '统计分析',
isDot: true,
customIcon: false,
@@ -192,6 +187,10 @@ export default {
page: { current: 1, size: 10, total: 0 },
search: { name: '' },
list: [],
+ groupSum: '',
+ chartsList: [],
+ datass: [],
+ nums: '',
}
},
computed: {
@@ -199,7 +198,8 @@ export default {
},
watch: {},
onLoad() {
- this.getEchart()
+ this.getEchart1()
+ this.getEchart2()
this.areaId = this.user.areaId
},
mounted() {
@@ -233,7 +233,6 @@ export default {
},
toGroupList(item) {
- console.log(1, item.id)
uni.navigateTo({
url: `./GroupList?id=${item.id}`,
})
@@ -258,17 +257,79 @@ export default {
})
},
- getEchart() {
+ // 居民群统计
+ getEchart1() {
+ console.log(1)
+ this.$http.post(`/app/wxcp/wxgroup/groupStatistic`).then((res) => {
+ if (res.code === 0) {
+ this.initEcharts1(res.data.list)
+ this.groupSum = res.data.groupSum
+ this.chartsList = res.data.today
+ }
+ })
+ },
+
+ // 居民群统计
+ getEchart2() {
+ console.log(2)
this.$http.post(`/app/appresident/queryCustInfoByAreaId?areaId=${this.user.areaId}`).then((res) => {
if (res.code === 0) {
- this.initEcharts1(res.data['年龄层次'])
- this.initEcharts2(res.data['人口分布'])
+ this.initEcharts2(res.data['年龄层次'])
+ this.nums = res.data['总人数']
}
})
},
initEcharts1(data) {
var option = {
+ xAxis: {
+ type: 'category',
+ data: Object.keys(data).map((e) => e.substring(e.length - 5, e.length)),
+ axisLine: {
+ lineStyle: { color: '#157EFF' },
+ },
+ axisLabel: {
+ show: true,
+ interval: 0,
+ },
+ axisTick: {
+ interval: 'auto',
+ },
+ },
+ yAxis: {
+ type: 'value',
+ axisLine: {
+ lineStyle: {
+ color: '#666',
+ },
+ },
+ splitLine: {
+ show: true,
+ lineStyle: {
+ color: '#D8DDE6',
+ },
+ },
+ axisLabel: {
+ show: true,
+ interval: 0,
+ },
+ },
+ series: [
+ {
+ color: '#0072FF',
+ barWidth: 30,
+ data: Object.values(data).map((e) => e.total),
+ type: 'line',
+ },
+ ],
+ }
+
+ option && this.Echarts1.setOption(option)
+ },
+
+ initEcharts2(data) {
+ console.log(data)
+ var options = {
xAxis: {
type: 'category',
data: data.map((v) => v.v1),
@@ -311,53 +372,6 @@ export default {
],
}
- option && this.Echarts1.setOption(option)
- },
-
- initEcharts2(data) {
- var options = {
- xAxis: {
- type: 'category',
- data: data.map((v) => v.name),
- axisLine: {
- lineStyle: { color: '#157EFF' },
- },
- axisLabel: {
- show: true,
- interval: 0,
- },
- axisTick: {
- interval: 'auto',
- },
- },
- yAxis: {
- type: 'value',
- axisLine: {
- lineStyle: {
- color: '#666',
- },
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: '#D8DDE6',
- },
- },
- axisLabel: {
- show: true,
- interval: 0,
- },
- },
- series: [
- {
- color: '#0072FF',
- barWidth: 30,
- data: data.map((v) => v.v1),
- type: 'line',
- },
- ],
- }
-
options && this.Echarts2.setOption(options)
},
@@ -366,7 +380,6 @@ export default {
},
areaSelect(e) {
- console.log(e)
this.areaId = e.id
this.getList()
},
@@ -390,10 +403,12 @@ export default {
this.$nextTick(() => {
if (this.currentTabs == 0) {
this.Echarts1 = echarts.init(document.getElementById('echarts1'))
- } else {
- this.Echarts2 = echarts.init(document.getElementById('echarts2'))
+ this.getEchart1()
+ }
+ if (this.currentTabs == 1) {
+ this.Echarts2 = echarts.init(document.getElementById('echarts2'))
+ this.getEchart2()
}
- this.getEchart()
})
}
if (this.currentTabBar == 1) {
@@ -409,10 +424,11 @@ export default {
this.$nextTick(() => {
if (index == 0) {
this.Echarts1 = echarts.init(document.getElementById('echarts1'))
+ this.getEchart1()
} else {
this.Echarts2 = echarts.init(document.getElementById('echarts2'))
+ this.getEchart2()
}
- this.getEchart()
})
},
From 7896d20f359e8617790e4fa4b4833bb01228dfe6 Mon Sep 17 00:00:00 2001
From: liuye
Date: Wed, 22 Dec 2021 11:43:57 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BE=BF=E6=B0=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/apps/AppMailList/components/add.vue | 1 +
src/apps/AppMailList/components/list.vue | 94 +++++++------------
src/apps/AppMailList/components/myAddList.vue | 2 +-
3 files changed, 37 insertions(+), 60 deletions(-)
diff --git a/src/apps/AppMailList/components/add.vue b/src/apps/AppMailList/components/add.vue
index 366dead8..f5e69281 100644
--- a/src/apps/AppMailList/components/add.vue
+++ b/src/apps/AppMailList/components/add.vue
@@ -71,6 +71,7 @@ export default {
mounted() {
this.$dict.load('yesOrNo').then(() => {
if(this.params.id) {
+ console.log(122)
this.userInfo.id = this.params.id
this.getDetail()
}
diff --git a/src/apps/AppMailList/components/list.vue b/src/apps/AppMailList/components/list.vue
index 430848f7..e2dad564 100644
--- a/src/apps/AppMailList/components/list.vue
+++ b/src/apps/AppMailList/components/list.vue
@@ -1,21 +1,28 @@
-
-
{{item.label}}
-
-
-
{{e.name}}
-
-
{{e.type}}{{e.phone}}
+
+
+
+
+
{{item.label}}
+
+
+
{{item.name}}
+
+ {{item.type}}{{item.phone}}
+
+
+
+
+
@@ -26,7 +33,9 @@ export default {
data() {
return {
+ scrollTop: 0,
list: [],
+ indexList: []
}
},
computed: { ...mapState(['user']) },
@@ -35,6 +44,9 @@ export default {
},
methods: {
+ idClick(id) {
+ document.getElementById('#id'+id).scrollIntoView();
+ },
getList() {
this.$http.post(`/app/appconvenientaddressbook/list`, null, {
params: {
@@ -42,28 +54,8 @@ export default {
}
}).then(res => {
if (res.code == 0) {
- var list = []
- var data = []
- res.data.records.map((item) => {
- if(list.indexOf(item.nameInitials)) {
- list.push(item.nameInitials)
- }
- })
- list.map((item) => {
- var obj = {
- label: item,
- dataList: []
- }
- data.push(obj)
- })
- data.map((item, index) => {
- res.data.records.map((items) => {
- if(item.label == items.nameInitials) {
- data[index].dataList.push(items)
- }
- })
- })
- this.list = data
+ this.indexList = [...new Set(res.data.records.map(e=>e.nameInitials))];
+ this.list = res.data.records;
}
})
},
@@ -81,14 +73,14 @@ export default {
background-color: #F3F6F9;
.list-content{
padding-bottom: 112px;
- .title{
- padding-left: 48px;
- line-height: 64px;
- font-size: 26px;
- font-family: PingFangSC-Semibold, PingFang SC;
- font-weight: 600;
- color: #999;
- }
+ // .title{
+ // padding-left: 48px;
+ // line-height: 64px;
+ // font-size: 26px;
+ // font-family: PingFangSC-Semibold, PingFang SC;
+ // font-weight: 600;
+ // color: #999;
+ // }
.phone-list{
background-color: #fff;
width: 100%;
@@ -120,22 +112,6 @@ export default {
}
}
}
- .id-list{
- width: 50px;
- text-align: center;
- position: fixed;
- top: 160px;
- right: 32px;
- z-index: 99;
- .item{
- display: block;
- font-size: 24px;
- font-family: PingFangSC-Semibold, PingFang SC;
- font-weight: 600;
- color: #CCC;
- line-height: 40px;
- }
- }
.footer-btn{
width: 100%;
text-align: center;
@@ -152,8 +128,8 @@ export default {
color: #FFF;
z-index: 999;
}
- a {
- text-decoration: none;
+ ::v-deep .u-index-anchor {
+ top: 0!important;
}
}
\ No newline at end of file
diff --git a/src/apps/AppMailList/components/myAddList.vue b/src/apps/AppMailList/components/myAddList.vue
index 65c1eac5..df34a844 100644
--- a/src/apps/AppMailList/components/myAddList.vue
+++ b/src/apps/AppMailList/components/myAddList.vue
@@ -9,7 +9,7 @@
From cb1b3d9f5a3b3a9063b8a0b53dd6ad89d238e65c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E6=9C=89=E6=B8=85=E9=A6=99=E6=9C=88=E6=9C=89?=
=?UTF-8?q?=E9=98=B4?= <185154740@qq.com>
Date: Wed, 22 Dec 2021 11:53:04 +0800
Subject: [PATCH 3/3] =?UTF-8?q?echart=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/apps/AppResidentFile/AppResidentFile.vue | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/apps/AppResidentFile/AppResidentFile.vue b/src/apps/AppResidentFile/AppResidentFile.vue
index 261546e5..2fafd02c 100644
--- a/src/apps/AppResidentFile/AppResidentFile.vue
+++ b/src/apps/AppResidentFile/AppResidentFile.vue
@@ -44,12 +44,12 @@
- {{ chartsList.increase }}
+ 0
今日新增
- {{ chartsList.decrease }}
+ 0
今日流失
@@ -282,6 +282,13 @@ export default {
initEcharts1(data) {
var option = {
+ grid: {
+ top: '9%',
+ left: '6%',
+ right: '8%',
+ bottom: '6%',
+ containLabel: true,
+ },
xAxis: {
type: 'category',
data: Object.keys(data).map((e) => e.substring(e.length - 5, e.length)),
@@ -328,8 +335,14 @@ export default {
},
initEcharts2(data) {
- console.log(data)
var options = {
+ grid: {
+ top: '9%',
+ left: '6%',
+ right: '8%',
+ bottom: '6%',
+ containLabel: true,
+ },
xAxis: {
type: 'category',
data: data.map((v) => v.v1),