Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2022-08-01 08:56:43 +08:00
5 changed files with 312 additions and 50 deletions

View File

@@ -92,9 +92,8 @@
</el-button>
<ai-import :instance="instance" :dict="dict" v-if="tabIndex === 0" type="wxcp/wxuser" name="内部通讯录"
:importParams="{departmentId:search.departmentId}" @success="getList"/>
<el-button size="small" icon="iconfont iconUpdate_Files" v-if="tabIndex === 0" :loading="btnLoading"
@click="syncMembers">同步数据
</el-button>
<el-button size="small" icon="iconfont iconUpdate_Files" v-if="tabIndex === 0" :loading="btnLoading" @click="syncMembers">同步部门</el-button>
<el-button size="small" icon="iconfont iconUpdate_Files" v-if="tabIndex === 0" :loading="btnLoading" @click="syncUser">同步成员</el-button>
<ai-wechat-selecter refs="addTags" :instance="instance" v-model="users" @change="onChooseUser"
:disabled="currIndex < 0" v-if="tabIndex === 1">
<el-button size="small" :disabled="currIndex < 0" type="primary" icon="iconfont iconAdd">添加成员</el-button>
@@ -505,25 +504,13 @@ export default {
},
syncMembers() {
let departId = this.search.departmentId;
if (!departId) departId = 1;
this.btnLoading = true
this.instance.post(`/app/wxcp/wxdepartment/syncDepart`).then(res => {
if (res.code == 0) {
this.instance.post(`/app/wxcp/wxdepartment/syncUser?departmentId=${departId}`, null, {
timeout: 1000000
}).then(res => {
if (res.code == 0) {
this.$message.success('同步成功')
this.getList()
this.getTree()
}
this.btnLoading = false
}).catch(() => {
this.btnLoading = false
})
this.$message.success('同步成功')
this.getList()
this.getTree()
}
}).catch(() => {
@@ -531,6 +518,26 @@ export default {
})
},
syncUser() {
let departId = this.search.departmentId;
if (!departId) departId = 1;
this.btnLoading = true
this.instance.post(`/app/wxcp/wxdepartment/syncUser?departmentId=${departId}`, null, {
timeout: 1000000
}).then(res => {
if (res.code == 0) {
this.$message.success('同步成功')
this.getList()
this.getTree()
}
this.btnLoading = false
}).catch(() => {
this.btnLoading = false
})
},
getTags() {
this.instance.post(`/app/wxcp/wxtag/listAll`).then(res => {
if (res.code == 0) {

View File

@@ -40,26 +40,27 @@
<div class="item-top__item">
<h2>居民群</h2>
<div class="bottom">
<span>{{ groupNumber.groupSum }}</span>
<span>{{ groupNumber.groupSum || 0 }}</span>
</div>
</div>
<div class="item-top__item">
<h2>群成员</h2>
<div class="bottom">
<span>{{ groupNumber.totalSum }}</span>
<span>{{ groupNumber.totalSum || 0 }}</span>
</div>
</div>
<div class="item-top__item">
<h2>昨日新增</h2>
<div class="bottom">
<span>{{ groupNumber.increaseSum }}</span>
<span>{{ groupNumber.increaseSum || 0 }}</span>
<img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/arrow-rise.png" />
</div>
</div>
<div class="item-top__item">
<h2>昨日流失</h2>
<div class="bottom">
<span>{{ groupNumber.decreaseSum }}</span>
<span>{{ groupNumber.decreaseSum || 0 }}</span>
<img src="https://cdn.cunwuyun.cn/dvcp/dv/pddv/bottom.png" />
</div>
</div>
@@ -88,9 +89,9 @@
<div class="item">
<div class="title">消息回复率</div>
<div class="item-top DonutChart-wrapper">
<DonutChart v-if="leftIndex === 1" :ratio="replyPercentage.yestodaySum" text="昨日"></DonutChart>
<DonutChart v-if="leftIndex === 1" :ratio="replyPercentage.weekSum" text="近7天"></DonutChart>
<DonutChart v-if="leftIndex === 1" :ratio="replyPercentage.monthSum" text="近1个月"></DonutChart>
<DonutChart v-if="leftIndex === 1" :ratio="replyPercentage ? replyPercentage.yestodaySum : 0" text="昨日"></DonutChart>
<DonutChart v-if="leftIndex === 1" :ratio="replyPercentage ? replyPercentage.weekSum : 0" text="近7天"></DonutChart>
<DonutChart v-if="leftIndex === 1" :ratio="replyPercentage ? replyPercentage.monthSum : 0" text="近1个月"></DonutChart>
</div>
</div>
<div class="item">
@@ -113,15 +114,15 @@
<div class="item-top ql">
<div class="item-top__item" @click="qlIndex = 0" :class="[qlIndex === 0 ? 'active' : '']">
<h2>活跃群聊</h2>
<p>{{ groupChatNumber.chatHasMsg || 0 }}</p>
<p>{{ groupChatNumber ? groupChatNumber.chatHasMsg : 0 }}</p>
</div>
<div class="item-top__item" @click="qlIndex = 1" :class="[qlIndex === 1 ? 'active' : '']">
<h2>活跃群成员</h2>
<p>{{ groupChatNumber.memberHasMsg || 0 }}</p>
<p>{{ groupChatNumber ? groupChatNumber.memberHasMsg : 0 }}</p>
</div>
<div class="item-top__item" @click="qlIndex = 2" :class="[qlIndex === 2 ? 'active' : '']">
<h2>群聊消息</h2>
<p>{{ groupChatNumber.msgTotal || 0 }}</p>
<p>{{ groupChatNumber ? groupChatNumber.msgTotal : 0 }}</p>
</div>
</div>
<div class="chart5" v-show="qlIndex === 0" style="width: 336px; height: 200px;"></div>
@@ -196,27 +197,27 @@
<div :class="[rightIndex === 1 ? 'active' : '']" @click="rightIndex = 1">上周积分榜</div>
</div>
<div class="tab-content">
<div class="tab-item" v-for="(item, index) in 6" :key="index" v-show="rightIndex === 0">
<div class="tab-item" v-for="(item, index) in pointList" :key="index" v-show="rightIndex === 0">
<div class="left" :class="'left'+ index">{{ index + 1 }}</div>
<div class="middel">
<div class="top">
<h2>王磊</h2>
<span v-if="index === 0">网格长</span>
<h2>{{ item.name }}</h2>
<!-- <span v-if="index === 0">网格长</span> -->
</div>
<p></p>
</div>
<i>433</i>
<i>{{ item.point }}</i>
</div>
<div class="tab-item" v-for="(item, index) in 6" :key="index" v-show="rightIndex === 1">
<div class="tab-item" v-for="(item, index) in rankList" :key="index" v-show="rightIndex === 1">
<div class="left" :class="'left'+ index">{{ index + 1 }}</div>
<div class="middel">
<div class="top">
<h2>王磊1</h2>
<span v-if="index === 0">网格长</span>
<h2>{{ item.name }}</h2>
<!-- <span v-if="index === 0">网格长</span> -->
</div>
<p></p>
</div>
<i>433</i>
<i>{{ item.point }}</i>
</div>
</div>
</div>
@@ -259,7 +260,247 @@
groupNumber: {},
replyPercentage: {},
groupChatNumber: {},
dynamicList: []
dynamicList: [],
rankList: [
{
name: '李玉梅',
point: 550
},
{
name: '尚俊华',
point: 400
},
{
name: '周进',
point: 400
},
{
name: '熊兰',
point: 350
},
{
name: '全学奎',
point: 300
},
{
name: '张铂楠',
point: 300
},
{
name: '黄立琼',
point: 100
},
],
pointList: [
{
name: '王娇',
point: 9800
},
{
name: '张雨婷',
point: 6500
},
{
name: '周进',
point: 7800
},
{
name: '彭开富',
point: 5550
},
{
name: '李玉梅',
point: 5100
},
{
name: '尚俊华',
point: 4900
},
{
name: '周进',
point: 4050
},
{
name: '熊兰',
point: 3650
},
{
name: '全学奎',
point: 3000
},
{
name: '张铂楠',
point: 3000
},
{
name: '黄立琼',
point: 2500
},
{
name: '张丽',
point: 2750
},
{
name: '甘华富',
point: 1650
},
{
name: '刘明',
point: 1250
},
{
name: '张浩',
point: 900
},
{
name: '陈利权',
point: 900
},
{
name: '邱博文',
point: 600
},
{
name: '朱太原',
point: 600
},
{
name: '张淑君',
point: 600
},
{
name: '郭虹',
point: 600
},
{
name: '张丽萍',
point: 600
},
{
name: '李申琼',
point: 550
},
{
name: '易涛',
point: 500
},
{
name: '黄先华',
point: 500
},
{
name: '王卫理',
point: 450
},
{
name: '郑建秋',
point: 450
},
{
name: '尹涛',
point: 450
},
{
name: '李青',
point: 400
},
{
name: '杨丽蓉',
point: 400
},
{
name: '郭俊华',
point: 300
},
{
name: '高仁虎',
point: 300
},
{
name: '肖维兵',
point: 300
},
{
name: '刘文菊',
point: 200
},
{
name: '陈艳',
point: 200
},
{
name: '兰头',
point: 150
},
{
name: '廖加芬',
point: 150
},
{
name: '陈林华',
point: 150
},
{
name: '严先荣',
point: 150
},
{
name: '易涛',
point: 150
},
{
name: '伍小兵',
point: 150
},
{
name: '刘亚筠',
point: 150
},
{
name: '陈群英',
point: 150
},
{
name: '刘信党',
point: 150
},
{
name: '杨悦堃',
point: 150
},
{
name: '李茂珊',
point: 150
},
{
name: '饶春秀',
point: 150
},
{
name: '范先琼',
point: 150
},
{
name: '曾上游',
point: 150
},
{
name: '钟郁昭',
point: 150
},
{
name: '付德秀',
point: 150
},
{
name: '张胜玉',
point: 100
},
{
name: '谭星',
point: 100
}
]
}
},
@@ -1124,6 +1365,8 @@
}
.tab-content {
height: 230px;
overflow-y: auto;
.tab-item {
display: flex;
align-items: center;

View File

@@ -124,7 +124,7 @@
return {
...v,
girdName: v.girdName.substr(0, 8)
girdName: v.girdName.substr(0, 11)
}
}), {
parent: 'parentGirdId'
@@ -216,13 +216,13 @@
.org-chart-node-label {
width: 40px;
height: 230px;
height: 254px;
margin-right: 15px;
padding: 0 0;
.org-chart-node-label-inner {
width: 40px!important;
height: 230px!important;
height: 254px!important;
border: 1px solid;
background: linear-gradient(180deg, rgba(69,210,218,0.2500) 0%, rgba(69,210,218,0.1000) 100%)!important;
border-image: linear-gradient(180deg, rgba(5, 185, 203, 1), rgba(73, 214, 207, 1)) 1 1!important;

View File

@@ -1,5 +1,5 @@
<template>
<ai-detail class="AppAnnounceAdd" v-loading="isLoading">
<ai-detail class="AppAnnounceAdd">
<template slot="title">
<ai-title :title="id ? '编辑居民群发' : '添加居民群发'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
@@ -238,8 +238,7 @@
:visible.sync="isShowDate"
width="590px"
title="定时发送"
@close="onClose"
@onConfirm="onDateForm">
customFooter>
<el-form ref="dateForm" :model="dateForm" label-width="130px" label-position="right">
<div class="ai-form">
<el-form-item label="定时发送时间" style="width: 100%;" prop="choiceTime" :rules="[{ required: true, message: '请选择定时发送时间', trigger: 'change' }]">
@@ -255,12 +254,16 @@
</el-form-item>
</div>
</el-form>
<div class="dialog-footer" slot="footer">
<el-button @click="onClose">取消</el-button>
<el-button @click="onDateForm" type="primary" :loading="isLoading2" style="width: 92px;">确认</el-button>
</div>
</ai-dialog>
</div>
</template>
<template #footer>
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="confirm(0)" style="width: 120px;">通知成员发送</el-button>
<el-button type="primary" @click="confirm(0)" :loading="isLoading1" style="width: 120px;">通知成员发送</el-button>
<el-button type="primary" @click="confirm(1)">定时发送</el-button>
</template>
</ai-detail>
@@ -286,6 +289,8 @@
return {
info: {},
department: [],
isLoading1: false,
isLoading2: false,
fileList: [],
isShowAddLink: false,
isShowAddMiniapp: false,
@@ -582,7 +587,7 @@
return this.$message.error('居民群数量不能为0')
}
if (sendType === 1 && !this.dateForm.choiceTime) {
if (sendType === 1 && !this.dateForm.choiceTime && !this.params.id) {
this.isShowDate = true
return false
}
@@ -595,7 +600,11 @@
...this.fileList
]
this.isLoading = true
if (sendType === 0) {
this.isLoading1 = true
} else {
this.isLoading2 = true
}
this.instance.post(`/app/appmasssendingtask/addOrUpdate`, {
...this.form,
id: this.params.id,
@@ -616,11 +625,14 @@
setTimeout(() => {
this.cancel(true)
}, 600)
} else {
this.isLoading1 = false
this.isLoading2 = false
}
this.isLoading = false
}).catch(() => {
this.isLoading = false
this.isLoading1 = false
this.isLoading2 = false
})
}
})

View File

@@ -69,7 +69,7 @@
<ai-open-data type="userName" :openid="row.createUserId"></ai-open-data>
</span>
<span style="color: #999">
<ai-open-data type="departmentName" :openid="row.createUserSecondDept"></ai-open-data>
<ai-open-data type="departmentName" :openid="row.createUserDept"></ai-open-data>
</span>
</div>
</template>
@@ -131,7 +131,7 @@
}, this.dict.getLabel('mstStatus', row.status))
}
},
{ prop: 'completionRate', label: '任务完成率', align: 'center' }
{ prop: 'completionRate', label: '任务完成率', align: 'center', formart: v => v ? v === '0.0' ? '0%' : `${v}%` : '-' }
]
}
},