Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -71,6 +71,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$dict.load('yesOrNo').then(() => {
|
this.$dict.load('yesOrNo').then(() => {
|
||||||
if(this.params.id) {
|
if(this.params.id) {
|
||||||
|
console.log(122)
|
||||||
this.userInfo.id = this.params.id
|
this.userInfo.id = this.params.id
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="list-content">
|
<div class="list-content">
|
||||||
<div class="item" :id="'id'+item.label" v-for="(item, index) in list" :key="index">
|
<u-index-list :scrollTop="scrollTop" :index-list="indexList">
|
||||||
<div class="title">{{item.label}}</div>
|
<div v-for="(letter, index) in indexList" :key="index">
|
||||||
<div class="phone-list">
|
<u-index-anchor :index="letter"/>
|
||||||
<div class="item-info" v-for="(e, indexs) in item.dataList" :key="indexs">
|
<div class="item" v-for="(item, index) in list.filter(e=>e.nameInitials==letter)">
|
||||||
<p>{{e.name}}</p>
|
<div class="title">{{item.label}}</div>
|
||||||
<div class="phone">
|
<div class="phone-list">
|
||||||
<span>{{e.type}}</span>{{e.phone}}
|
<div class="item-info">
|
||||||
|
<p>{{item.name}}</p>
|
||||||
|
<div class="phone">
|
||||||
|
<span>{{item.type}}</span>{{item.phone}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</u-index-list>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="id-list">
|
||||||
|
<div class="item" v-for="(item, index) in list" :key="index">
|
||||||
|
<u-index-anchor :index="item.label" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="id-list">
|
|
||||||
<a class="item" :href="'#id'+item.label" v-for="(item, index) in list" :key="index">{{item.label}}</a>
|
|
||||||
</div>
|
|
||||||
<div class="footer-btn" @click="toAddList">我添加的</div>
|
<div class="footer-btn" @click="toAddList">我添加的</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -26,7 +33,9 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
scrollTop: 0,
|
||||||
list: [],
|
list: [],
|
||||||
|
indexList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
@@ -35,6 +44,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
idClick(id) {
|
||||||
|
document.getElementById('#id'+id).scrollIntoView();
|
||||||
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.$http.post(`/app/appconvenientaddressbook/list`, null, {
|
this.$http.post(`/app/appconvenientaddressbook/list`, null, {
|
||||||
params: {
|
params: {
|
||||||
@@ -42,28 +54,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
var list = []
|
this.indexList = [...new Set(res.data.records.map(e=>e.nameInitials))];
|
||||||
var data = []
|
this.list = res.data.records;
|
||||||
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
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -81,14 +73,14 @@ export default {
|
|||||||
background-color: #F3F6F9;
|
background-color: #F3F6F9;
|
||||||
.list-content{
|
.list-content{
|
||||||
padding-bottom: 112px;
|
padding-bottom: 112px;
|
||||||
.title{
|
// .title{
|
||||||
padding-left: 48px;
|
// padding-left: 48px;
|
||||||
line-height: 64px;
|
// line-height: 64px;
|
||||||
font-size: 26px;
|
// font-size: 26px;
|
||||||
font-family: PingFangSC-Semibold, PingFang SC;
|
// font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
font-weight: 600;
|
// font-weight: 600;
|
||||||
color: #999;
|
// color: #999;
|
||||||
}
|
// }
|
||||||
.phone-list{
|
.phone-list{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
width: 100%;
|
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{
|
.footer-btn{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -152,8 +128,8 @@ export default {
|
|||||||
color: #FFF;
|
color: #FFF;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
a {
|
::v-deep .u-index-anchor {
|
||||||
text-decoration: none;
|
top: 0!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<img src="./img/edit-icon.png" alt="" @click="edit(item)">
|
<img src="./img/edit-icon.png" alt="" @click="edit(item.id)">
|
||||||
<img src="./img/del-icon.png" alt="" @click="del(item)">
|
<img src="./img/del-icon.png" alt="" @click="del(item)">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,22 +9,22 @@
|
|||||||
<div class="topcard">
|
<div class="topcard">
|
||||||
<div class="cards">
|
<div class="cards">
|
||||||
<div class="items">
|
<div class="items">
|
||||||
<span class="items1">1</span>
|
<span class="items1">{{ groupSum }}</span>
|
||||||
<span>群聊人数</span>
|
<span>群聊总数</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="items">
|
<div class="items">
|
||||||
<span class="items2">1</span>
|
<span class="items2">{{ chartsList.total }}</span>
|
||||||
<span>群成员总数</span>
|
<span>群成员总数</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="items">
|
<div class="items">
|
||||||
<span class="items3">1</span>
|
<span class="items3">{{ chartsList.increase }}</span>
|
||||||
<span>今日入群</span>
|
<span>今日入群</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="items">
|
<div class="items">
|
||||||
<span class="items4">1</span>
|
<span class="items4">{{ chartsList.decrease }}</span>
|
||||||
<span>今日退群</span>
|
<span>今日退群</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -39,23 +39,18 @@
|
|||||||
<div class="topcard">
|
<div class="topcard">
|
||||||
<div class="cards">
|
<div class="cards">
|
||||||
<div class="items">
|
<div class="items">
|
||||||
<span class="items1">1</span>
|
<span class="items1">{{ nums }}</span>
|
||||||
<span>群聊人数</span>
|
<span>居民总数</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="items">
|
<div class="items">
|
||||||
<span class="items2">1</span>
|
<span class="items3">0</span>
|
||||||
<span>群成员总数</span>
|
<span>今日新增</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="items">
|
<div class="items">
|
||||||
<span class="items3">1</span>
|
<span class="items4">0</span>
|
||||||
<span>今日入群</span>
|
<span>今日流失</span>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="items">
|
|
||||||
<span class="items4">1</span>
|
|
||||||
<span>今日退群</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -143,8 +138,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
lists: [
|
lists: [
|
||||||
{
|
{
|
||||||
iconPath: 'order',
|
iconPath: 'home',
|
||||||
selectedIconPath: 'order-fill',
|
selectedIconPath: 'home-fill',
|
||||||
text: '统计分析',
|
text: '统计分析',
|
||||||
isDot: true,
|
isDot: true,
|
||||||
customIcon: false,
|
customIcon: false,
|
||||||
@@ -192,6 +187,10 @@ export default {
|
|||||||
page: { current: 1, size: 10, total: 0 },
|
page: { current: 1, size: 10, total: 0 },
|
||||||
search: { name: '' },
|
search: { name: '' },
|
||||||
list: [],
|
list: [],
|
||||||
|
groupSum: '',
|
||||||
|
chartsList: [],
|
||||||
|
datass: [],
|
||||||
|
nums: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -199,7 +198,8 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getEchart()
|
this.getEchart1()
|
||||||
|
this.getEchart2()
|
||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -233,7 +233,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
toGroupList(item) {
|
toGroupList(item) {
|
||||||
console.log(1, item.id)
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `./GroupList?id=${item.id}`,
|
url: `./GroupList?id=${item.id}`,
|
||||||
})
|
})
|
||||||
@@ -258,17 +257,92 @@ 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) => {
|
this.$http.post(`/app/appresident/queryCustInfoByAreaId?areaId=${this.user.areaId}`).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.initEcharts1(res.data['年龄层次'])
|
this.initEcharts2(res.data['年龄层次'])
|
||||||
this.initEcharts2(res.data['人口分布'])
|
this.nums = res.data['总人数']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
initEcharts1(data) {
|
initEcharts1(data) {
|
||||||
var option = {
|
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)),
|
||||||
|
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) {
|
||||||
|
var options = {
|
||||||
|
grid: {
|
||||||
|
top: '9%',
|
||||||
|
left: '6%',
|
||||||
|
right: '8%',
|
||||||
|
bottom: '6%',
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: data.map((v) => v.v1),
|
data: data.map((v) => v.v1),
|
||||||
@@ -311,53 +385,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)
|
options && this.Echarts2.setOption(options)
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -366,7 +393,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
areaSelect(e) {
|
areaSelect(e) {
|
||||||
console.log(e)
|
|
||||||
this.areaId = e.id
|
this.areaId = e.id
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
@@ -390,10 +416,12 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.currentTabs == 0) {
|
if (this.currentTabs == 0) {
|
||||||
this.Echarts1 = echarts.init(document.getElementById('echarts1'))
|
this.Echarts1 = echarts.init(document.getElementById('echarts1'))
|
||||||
} else {
|
this.getEchart1()
|
||||||
this.Echarts2 = echarts.init(document.getElementById('echarts2'))
|
}
|
||||||
|
if (this.currentTabs == 1) {
|
||||||
|
this.Echarts2 = echarts.init(document.getElementById('echarts2'))
|
||||||
|
this.getEchart2()
|
||||||
}
|
}
|
||||||
this.getEchart()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (this.currentTabBar == 1) {
|
if (this.currentTabBar == 1) {
|
||||||
@@ -409,10 +437,11 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
this.Echarts1 = echarts.init(document.getElementById('echarts1'))
|
this.Echarts1 = echarts.init(document.getElementById('echarts1'))
|
||||||
|
this.getEchart1()
|
||||||
} else {
|
} else {
|
||||||
this.Echarts2 = echarts.init(document.getElementById('echarts2'))
|
this.Echarts2 = echarts.init(document.getElementById('echarts2'))
|
||||||
|
this.getEchart2()
|
||||||
}
|
}
|
||||||
this.getEchart()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user