郫都大屏

This commit is contained in:
yanran200730
2022-07-26 15:09:39 +08:00
parent f0099ecd92
commit d85ab06f68
4 changed files with 49 additions and 13 deletions

View File

@@ -141,12 +141,9 @@
<h2>网格动态</h2> <h2>网格动态</h2>
</div> </div>
<div class="bottom-list"> <div class="bottom-list">
<div class="item" v-for="(item, index) in 3" :key="index"> <div class="item" v-for="item in dynamicList" :key="item.id">
<i>07/19 09:45</i> <i>{{ item.createTime }}</i>
<span>书院社区-张三 </span> <em>{{ item.logDescription }}</em>
<em>添加居民"</em>
<span>蓝天白云</span>
<em>"为好友</em>
</div> </div>
</div> </div>
</div> </div>
@@ -261,7 +258,8 @@
tagInfo: {}, tagInfo: {},
groupNumber: {}, groupNumber: {},
replyPercentage: {}, replyPercentage: {},
groupChatNumber: {} groupChatNumber: {},
dynamicList: []
} }
}, },
@@ -299,6 +297,11 @@
this.replyPercentage = res.data this.replyPercentage = res.data
} }
}) })
this.instance.post(`/app/appUserOperation/list?size=10000`).then(res => {
if (res.code === 0) {
this.dynamicList = res.data.records
}
})
this.instance.post(`/app/wxgroupstatistic/getGroupNumber`).then(res => { this.instance.post(`/app/wxgroupstatistic/getGroupNumber`).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.groupNumber = res.data['居民群统计'] this.groupNumber = res.data['居民群统计']

View File

@@ -2,7 +2,7 @@
<div class="DonutChart" :id="id"> <div class="DonutChart" :id="id">
<canvas :id="canvasId"></canvas> <canvas :id="canvasId"></canvas>
<div class="DonutChart-text"> <div class="DonutChart-text">
<span>{{ ratio }}%</span> <span>{{ ratio || 0 }}%</span>
<i>{{ text }}</i> <i>{{ text }}</i>
</div> </div>
</div> </div>

View File

@@ -1,8 +1,8 @@
<template> <template>
<div class="AppAnnounce"> <div class="AppAnnounce">
<keep-alive :include="['List']"> <!-- <keep-alive :include="['List']"> -->
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component> <component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive> <!-- </keep-alive> -->
</div> </div>
</template> </template>

View File

@@ -23,24 +23,29 @@
<el-form-item label="选择群主" v-if="form.sendScope !== '0'" prop="wxGroupsName" style="width: 100%;" :rules="[{ required: true, message: '请选择选择群主', trigger: 'change' }]"> <el-form-item label="选择群主" v-if="form.sendScope !== '0'" prop="wxGroupsName" style="width: 100%;" :rules="[{ required: true, message: '请选择选择群主', trigger: 'change' }]">
<div class="AppAnnounceDetail-select"> <div class="AppAnnounceDetail-select">
<el-input size="small" class="AppAnnounceDetail-select__input" placeholder="请选择..." disabled v-model="form.wxGroupsName"></el-input> <el-input size="small" class="AppAnnounceDetail-select__input" placeholder="请选择..." disabled v-model="form.wxGroupsName"></el-input>
<div class="select-left" v-if="form.filterCriteria.length"> <div class="select-left" v-if="form.filterCriteria.length && form.sendScope !== '2'">
<span v-for="(item, index) in form.filterCriteria" :key="index"> <span v-for="(item, index) in form.filterCriteria" :key="index">
<ai-open-data type="departmentName" :openid="item"></ai-open-data> <ai-open-data type="departmentName" :openid="item"></ai-open-data>
</span> </span>
</div> </div>
<div class="select-left" v-if="form.filterCriteria.length && form.sendScope === '2'">
<span v-for="(item, index) in girdNames" :key="index">{{ item }}</span>
</div>
<i v-if="!form.filterCriteria.length">请选择</i> <i v-if="!form.filterCriteria.length">请选择</i>
<ai-picker <ai-picker
:instance="instance" :instance="instance"
multiple multiple
:ops="{label: form.sendScope === '2' ? 'girdName' : 'name'}"
:action="form.sendScope === '1' ? '/app/wxcp/wxdepartment/departList' : '/app/appgirdinfo/girdList'" :action="form.sendScope === '1' ? '/app/wxcp/wxdepartment/departList' : '/app/appgirdinfo/girdList'"
v-model="form.filterCriteria" v-model="form.filterCriteria"
@pick="onPick"
@change="onSelcetChange"> @change="onSelcetChange">
<div class="select-right">选择</div> <div class="select-right">选择</div>
</ai-picker> </ai-picker>
</div> </div>
<div class="tips"> <div class="tips">
<p>消息预计送达居民群数</p> <p>消息预计送达居民群数</p>
<span>{{ form.filterCriteria.length }}</span> <span>{{ groupLen }}</span>
<el-tooltip <el-tooltip
placement="top" placement="top"
content="任务开始后3天内15分钟更新1次3天后访问页面时触发更新1时间最多刷新1次"> content="任务开始后3天内15分钟更新1次3天后访问页面时触发更新1时间最多刷新1次">
@@ -315,13 +320,23 @@
taskTitle: '', taskTitle: '',
examinesName: '' examinesName: ''
}, },
girdNames: '',
id: '', id: '',
tagsList: [] tagsList: []
} }
}, },
computed: { computed: {
...mapState(['user']) ...mapState(['user']),
groupLen () {
let i = 0
this.form.wxGroups.forEach(v => {
i = i + v.groupIds.split(',').length
})
return i
}
}, },
created () { created () {
@@ -346,6 +361,10 @@
filterCriteria: res.data.filterCriteria.split(',') filterCriteria: res.data.filterCriteria.split(',')
} }
if (res.data.girdNames) {
this.girdNames = res.data.girdNames
}
this.dateForm.choiceTime = res.data.choiceTime this.dateForm.choiceTime = res.data.choiceTime
if (res.data.examines && res.data.examines.length) { if (res.data.examines && res.data.examines.length) {
@@ -384,6 +403,10 @@
}, },
onScopeChange (e) { onScopeChange (e) {
this.form.filterCriteria = []
this.form.wxGroups = []
this.girdNames = ''
if (e === '0') { if (e === '0') {
this.getWxGroups() this.getWxGroups()
} else { } else {
@@ -391,6 +414,12 @@
} }
}, },
onPick (e) {
if (this.form.sendScope === '2' && e.length) {
this.girdNames = e.map(v => v.girdName)
}
},
onSelcetChange (e) { onSelcetChange (e) {
if (e.length) { if (e.length) {
this.form.wxGroupsName = '1' this.form.wxGroupsName = '1'
@@ -535,6 +564,10 @@
confirm (sendType) { confirm (sendType) {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (!this.form.wxGroups.length) {
return this.$message.error('居民群数量不能为0')
}
if (sendType === 1 && !this.dateForm.choiceTime) { if (sendType === 1 && !this.dateForm.choiceTime) {
this.isShowDate = true this.isShowDate = true
return false return false