From cf6b2ae087e2edf9a5a38ea37caaa894064995ac Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Fri, 16 Jun 2023 14:04:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Announce/AppAnnounce/components/Add.vue | 21 +-- .../AppAnnounce/components/Detail.vue | 4 +- .../Announce/AppAnnounce/components/List.vue | 5 +- .../AppAnnounceStatistics.vue | 165 +----------------- .../Announce/AppAnnounce/components/Add.vue | 21 ++- .../AppAnnounce/components/Detail.vue | 4 +- .../Announce/AppAnnounce/components/List.vue | 5 +- .../AppAnnounceStatistics.vue | 165 +++++++++++++++++- 8 files changed, 195 insertions(+), 195 deletions(-) diff --git a/packages/wxwork/Announce/AppAnnounce/components/Add.vue b/packages/wxwork/Announce/AppAnnounce/components/Add.vue index ad8bbe64..a8910a59 100644 --- a/packages/wxwork/Announce/AppAnnounce/components/Add.vue +++ b/packages/wxwork/Announce/AppAnnounce/components/Add.vue @@ -17,7 +17,7 @@ 全部居民群 按部门选择 - 按网格选择 + @@ -140,16 +140,6 @@ 从本地上传,图片最大支持10MB,支持JPG,PNG格式;视频最大支持10MB,支持MP4格式;文件最大支持20MB - - - - {{ item.dictName }} - - - 确认 - + @@ -141,7 +141,6 @@ { slot: 'user', label: '创建人', openType: 'userName', align: 'center' }, { prop: 'choiceTime', label: '群发时间', align: 'center' }, { prop: 'taskEndTime', label: '群发结束时间', align: 'center' }, - { prop: 'markTag', label: '标签', align: 'center' }, { prop: 'status', align: 'center', @@ -160,7 +159,7 @@ }, created () { - this.dict.load('mstStatus', 'mstSendType', 'mstTag').then(() => { + this.dict.load('mstStatus', 'mstSendType').then(() => { this.getList() }) }, diff --git a/packages/wxwork/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue b/packages/wxwork/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue index 41d84d54..97ce8db3 100644 --- a/packages/wxwork/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue +++ b/packages/wxwork/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue @@ -103,18 +103,6 @@ -
- - - - - - -
@@ -175,14 +163,6 @@ isDepartData: true, departBarData: [], type: '', - date: '', - search: { - current: 1, - size: 10, - type: '0' - }, - chart1: null, - chart2: null } }, computed: { @@ -237,14 +217,6 @@ this.getDepart() this.dict.load('mstSendType') }, - - mounted () { - this.$nextTick(() => { - this.chart1 = echarts.init(document.querySelector('#chart1')) - this.chart2 = echarts.init(document.querySelector('#chart2')) - window.addEventListener('resize', this.onResize) - }) - }, methods: { ...mapActions(['initOpenData', 'transCanvas']), onUserChange (e) { @@ -318,8 +290,6 @@ this.setLineChart(xData, createData, 'createChart', ['#2891FF']) this.setLineChart(xData, executeData, 'executeChart', ['#FFB865']) this.setLineChart(xData, receiveData, 'receiveChart', ['#26D52B']) - this.initChart1(res.data.tagTrend) - this.initChart2(res.data.tagDistribution) } }) }, @@ -486,137 +456,8 @@ // ] // }; this.departBarChart.setOption(option) - }, - - initChart1 (data) { - const x = Object.keys(data) - const tags = data[x[0]].map(v => v.tag) - let option = { - tooltip: { - trigger: 'axis' - }, - legend: { - type: "plain" - }, - grid: { - left: '10px', - right: '28px', - bottom: '14px', - top: '30px', - containLabel: true - }, - dataZoom: [ - { - type: 'inside', - start: 0, - end: 7, - minValueSpan: 7 - }, - { - start: 0, - end: 7 - } - ], - color: ['#2266FF', '#22AA99', '#F8B425', '#29ABF7', '#49DFCB'], - xAxis: { - type: 'category', - axisLabel: { - align: 'center', - padding: [2, 0, 0, 0], - interval: 0, - fontSize: 14, - color: '#666666' - }, - boundaryGap: false, - axisLine: { - lineStyle: { - color: '#E1E5EF' - } - }, - data: x - }, - yAxis: { - axisTick: { - length: 0, - show: false - }, - splitLine: { - show: true, - lineStyle:{ - color: ['#E1E5EF'], - width: 1, - type: 'solid' - } - }, - nameTextStyle: { - color: '#666666', - align: 'left' - }, - axisLine: { - show: false - }, - axisLabel: { - color: '#666666' - }, - type: 'value' - }, - series: tags.map(v => { - return { - name: v, - type: 'line', - data: x.map(e => data[e]).filter(z => { - return z.filter(y => y.tag === v)[0].c - }) - } - }) - } - this.chart1.setOption(option) - }, - - initChart2 (data) { - let option = { - grid: { - left: '1%', - right: '0%', - bottom: '2%', - top: '0px', - containLabel: true - }, - tooltip: { - trigger: 'item', - axisPointer: { - } - }, - legend: { - left: 'center', - top: '0px', - textStyle: { - } - }, - color: ['#2266FF', '#22AA99', '#F8B425', '#29ABF7', '#49DFCB'], - series: [ - { - type: 'pie', - radius: '50%', - data: data.map(v => { - return { - value: v.c, - name: v.tag - } - }), - label: { - normal: { - textStyle: { - fontSize: '12' - }, - formatter: '{b}: {@2012} ({d}%)' - } - } - } - ] - } - this.chart2.setOption(option) } + } } @@ -628,10 +469,6 @@ display: flex; justify-content: space-between; } - - .bottom { - display: flex; - } .mar-b16{ margin-bottom: 16px; } diff --git a/project/qianxinan/Announce/AppAnnounce/components/Add.vue b/project/qianxinan/Announce/AppAnnounce/components/Add.vue index a8910a59..ad8bbe64 100644 --- a/project/qianxinan/Announce/AppAnnounce/components/Add.vue +++ b/project/qianxinan/Announce/AppAnnounce/components/Add.vue @@ -17,7 +17,7 @@ 全部居民群 按部门选择 - + 按网格选择 @@ -140,6 +140,16 @@ 从本地上传,图片最大支持10MB,支持JPG,PNG格式;视频最大支持10MB,支持MP4格式;文件最大支持20MB
+ + + + {{ item.dictName }} + + + 确认
- + @@ -141,6 +141,7 @@ { slot: 'user', label: '创建人', openType: 'userName', align: 'center' }, { prop: 'choiceTime', label: '群发时间', align: 'center' }, { prop: 'taskEndTime', label: '群发结束时间', align: 'center' }, + { prop: 'markTag', label: '标签', align: 'center' }, { prop: 'status', align: 'center', @@ -159,7 +160,7 @@ }, created () { - this.dict.load('mstStatus', 'mstSendType').then(() => { + this.dict.load('mstStatus', 'mstSendType', 'mstTag').then(() => { this.getList() }) }, diff --git a/project/qianxinan/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue b/project/qianxinan/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue index 97ce8db3..41d84d54 100644 --- a/project/qianxinan/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue +++ b/project/qianxinan/Announce/AppAnnounceStatistics/AppAnnounceStatistics.vue @@ -103,6 +103,18 @@ +
+ + + + + + +
@@ -163,6 +175,14 @@ isDepartData: true, departBarData: [], type: '', + date: '', + search: { + current: 1, + size: 10, + type: '0' + }, + chart1: null, + chart2: null } }, computed: { @@ -217,6 +237,14 @@ this.getDepart() this.dict.load('mstSendType') }, + + mounted () { + this.$nextTick(() => { + this.chart1 = echarts.init(document.querySelector('#chart1')) + this.chart2 = echarts.init(document.querySelector('#chart2')) + window.addEventListener('resize', this.onResize) + }) + }, methods: { ...mapActions(['initOpenData', 'transCanvas']), onUserChange (e) { @@ -290,6 +318,8 @@ this.setLineChart(xData, createData, 'createChart', ['#2891FF']) this.setLineChart(xData, executeData, 'executeChart', ['#FFB865']) this.setLineChart(xData, receiveData, 'receiveChart', ['#26D52B']) + this.initChart1(res.data.tagTrend) + this.initChart2(res.data.tagDistribution) } }) }, @@ -456,8 +486,137 @@ // ] // }; this.departBarChart.setOption(option) - } + }, + initChart1 (data) { + const x = Object.keys(data) + const tags = data[x[0]].map(v => v.tag) + let option = { + tooltip: { + trigger: 'axis' + }, + legend: { + type: "plain" + }, + grid: { + left: '10px', + right: '28px', + bottom: '14px', + top: '30px', + containLabel: true + }, + dataZoom: [ + { + type: 'inside', + start: 0, + end: 7, + minValueSpan: 7 + }, + { + start: 0, + end: 7 + } + ], + color: ['#2266FF', '#22AA99', '#F8B425', '#29ABF7', '#49DFCB'], + xAxis: { + type: 'category', + axisLabel: { + align: 'center', + padding: [2, 0, 0, 0], + interval: 0, + fontSize: 14, + color: '#666666' + }, + boundaryGap: false, + axisLine: { + lineStyle: { + color: '#E1E5EF' + } + }, + data: x + }, + yAxis: { + axisTick: { + length: 0, + show: false + }, + splitLine: { + show: true, + lineStyle:{ + color: ['#E1E5EF'], + width: 1, + type: 'solid' + } + }, + nameTextStyle: { + color: '#666666', + align: 'left' + }, + axisLine: { + show: false + }, + axisLabel: { + color: '#666666' + }, + type: 'value' + }, + series: tags.map(v => { + return { + name: v, + type: 'line', + data: x.map(e => data[e]).filter(z => { + return z.filter(y => y.tag === v)[0].c + }) + } + }) + } + this.chart1.setOption(option) + }, + + initChart2 (data) { + let option = { + grid: { + left: '1%', + right: '0%', + bottom: '2%', + top: '0px', + containLabel: true + }, + tooltip: { + trigger: 'item', + axisPointer: { + } + }, + legend: { + left: 'center', + top: '0px', + textStyle: { + } + }, + color: ['#2266FF', '#22AA99', '#F8B425', '#29ABF7', '#49DFCB'], + series: [ + { + type: 'pie', + radius: '50%', + data: data.map(v => { + return { + value: v.c, + name: v.tag + } + }), + label: { + normal: { + textStyle: { + fontSize: '12' + }, + formatter: '{b}: {@2012} ({d}%)' + } + } + } + ] + } + this.chart2.setOption(option) + } } } @@ -469,6 +628,10 @@ display: flex; justify-content: space-between; } + + .bottom { + display: flex; + } .mar-b16{ margin-bottom: 16px; }