|
|
@@ -66,9 +66,10 @@
|
|
|
<a-spin :spinning="spinningGroup">
|
|
|
<div style="width: 100%; height: 315px">
|
|
|
<ul class="group-keep-ul">
|
|
|
- <li>
|
|
|
- 今日消耗: <span style="font-weight: bold">{{ todayCost | formatNum }}</span>
|
|
|
- </li>
|
|
|
+ <li>
|
|
|
+ {{ groupCostLabel }}:
|
|
|
+ <span style="font-weight: bold">{{ groupCostValue | formatNum }}</span>
|
|
|
+ </li>
|
|
|
<li v-if="!!compare">
|
|
|
<span style="margin-left: 20%" v-if="compare.indexOf('-') == 0">
|
|
|
<img
|
|
|
@@ -89,12 +90,12 @@
|
|
|
<span style="color: red">{{ compare }}</span>
|
|
|
</span>
|
|
|
|
|
|
- <a-tooltip placement="top">
|
|
|
- <template slot="title">
|
|
|
- <span>今天截止此时的消耗跟昨天截止同个时段的消耗变化</span>
|
|
|
- </template>
|
|
|
- <a-icon style="margin-left: 10px" type="question-circle" />
|
|
|
- </a-tooltip>
|
|
|
+ <a-tooltip placement="top">
|
|
|
+ <template slot="title">
|
|
|
+ <span>{{ groupCompareTooltip }}</span>
|
|
|
+ </template>
|
|
|
+ <a-icon style="margin-left: 10px" type="question-circle" />
|
|
|
+ </a-tooltip>
|
|
|
</li>
|
|
|
<li><span style="margin-left: 31px">消耗:</span> {{ sectionCost | formatNum }}</li>
|
|
|
<li>人均带户: {{ userAverageAccount | formatNum }}</li>
|
|
|
@@ -698,7 +699,7 @@ export default {
|
|
|
.replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,')
|
|
|
},
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ mounted() {
|
|
|
|
|
|
if(this.userInfo().id == '4afe739502ae4258a18c36a000d7ff20'||this.userInfo().roleName == '头条运营经理'){
|
|
|
this.mediaId= '1'
|
|
|
@@ -715,11 +716,36 @@ export default {
|
|
|
this.getItemList()
|
|
|
this.clientWidth = document.documentElement.clientWidth - 224
|
|
|
},
|
|
|
- activated() {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.clientWidth = document.documentElement.clientWidth - 224
|
|
|
- })
|
|
|
- },
|
|
|
+ activated() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.clientWidth = document.documentElement.clientWidth - 224
|
|
|
+ })
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ groupCostLabel() {
|
|
|
+ if (!Array.isArray(this.dateEchart) || this.dateEchart.length !== 2) {
|
|
|
+ return '区间消耗'
|
|
|
+ }
|
|
|
+ const start = this.dateEchart[0] && this.dateEchart[0].format ? this.dateEchart[0].format('YYYY-MM-DD') : ''
|
|
|
+ const end = this.dateEchart[1] && this.dateEchart[1].format ? this.dateEchart[1].format('YYYY-MM-DD') : ''
|
|
|
+ const today = moment().format('YYYY-MM-DD')
|
|
|
+ return start === today && end === today ? '今日消耗' : '区间消耗'
|
|
|
+ },
|
|
|
+ groupCompareTooltip() {
|
|
|
+ if (!Array.isArray(this.dateEchart) || this.dateEchart.length !== 2) {
|
|
|
+ return '所选区间消耗与上一区间消耗变化'
|
|
|
+ }
|
|
|
+ const start = this.dateEchart[0] && this.dateEchart[0].format ? this.dateEchart[0].format('YYYY-MM-DD') : ''
|
|
|
+ const end = this.dateEchart[1] && this.dateEchart[1].format ? this.dateEchart[1].format('YYYY-MM-DD') : ''
|
|
|
+ const today = moment().format('YYYY-MM-DD')
|
|
|
+ return start === today && end === today
|
|
|
+ ? '今天截止此时的消耗跟昨天截止同个时段的消耗变化'
|
|
|
+ : '所选区间消耗与上一区间消耗变化'
|
|
|
+ },
|
|
|
+ groupCostValue() {
|
|
|
+ return this.groupCostLabel === '今日消耗' ? this.todayCost : this.sectionCost
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
...mapGetters(['userInfo']),
|
|
|
isTencentMedia(mediaId) {
|