|
@@ -1,220 +1,237 @@
|
|
|
<template>
|
|
|
- <div class="tv-list" :style="'font-size:' + fontSize + 'px'">
|
|
|
- <div class="content">
|
|
|
- <div class="titleTop">
|
|
|
- {{ date.join("-") }}
|
|
|
- </div>
|
|
|
- <div class="itemHead">
|
|
|
- <van-row>
|
|
|
- <van-col span="3" class="td"> 排名 </van-col>
|
|
|
- <van-col span="8" class="td"> 频道 </van-col>
|
|
|
- <van-col span="5" class="td"> 市场份额 </van-col>
|
|
|
- <!-- td2 :style="width > 667 ? 'line-height: 2.5em' : 'line-height: 1.5em'" -->
|
|
|
- <van-col span="6" class="td"> 人均时长(分) </van-col>
|
|
|
- <van-col span="2" class="td">
|
|
|
- <img
|
|
|
- src="../../../assets/image/shou.gif"
|
|
|
- width="26px"
|
|
|
- alt=""
|
|
|
- style="vertical-align: middle"
|
|
|
- />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- </div>
|
|
|
- <div v-for="(v, o) in platfromData || []" :key="v.name">
|
|
|
- <div
|
|
|
- style="border-bottom: 1px dashed #eee; margin: 11px 0 0 0"
|
|
|
- v-if="o === 20"
|
|
|
- ></div>
|
|
|
- <van-row class="item" @click="() => showPopup(o)">
|
|
|
- <van-col
|
|
|
- span="3"
|
|
|
- :class="{ td: true }"
|
|
|
- :style="{ color: color[o] || '#000', fontWeight: 600 }"
|
|
|
- >
|
|
|
- {{ v.rank }}
|
|
|
- </van-col>
|
|
|
- <van-col span="8" :class="{ td: true }">
|
|
|
- {{ v.channelname }}
|
|
|
- </van-col>
|
|
|
- <van-col span="5" :class="{ td: true }">
|
|
|
- {{ formatNum(v.occrate, 2) }}%
|
|
|
- <van-icon
|
|
|
- v-if="v.occrate_change !== '相等'"
|
|
|
- name="down"
|
|
|
- :color="v.occrate_change === '上升' ? '#f00' : '#0f0'"
|
|
|
- :class="{ rise: v.occrate_change === '上升' }"
|
|
|
- />
|
|
|
- </van-col>
|
|
|
- <van-col span="6" :class="{ td: true }">
|
|
|
- {{ timeFormat(v.user_duration) }}
|
|
|
- <van-icon
|
|
|
- v-if="v.user_duration_change !== '相等'"
|
|
|
- name="down"
|
|
|
- :color="v.user_duration_change === '上升' ? '#f00' : '#0f0'"
|
|
|
- :class="{ rise: v.user_duration_change === '上升' }"
|
|
|
- />
|
|
|
- </van-col>
|
|
|
- <van-col span="2" class="td" style="cursor: pointer">
|
|
|
- <van-icon name="arrow" />
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- </div>
|
|
|
- <van-popup
|
|
|
- :style="{ height: '100%', width: '100%' }"
|
|
|
- position="right"
|
|
|
- v-model="show"
|
|
|
- >
|
|
|
- <div class="main">
|
|
|
- <van-cell
|
|
|
- title-style="flex: 3"
|
|
|
- :title="ratios.schedulename"
|
|
|
- :label="ratios.channelname"
|
|
|
- >
|
|
|
- <div @click="show = false" style="color: #5470c6; cursor: pointer">
|
|
|
- <van-icon name="revoke" />
|
|
|
- </div>
|
|
|
- </van-cell>
|
|
|
- <van-cell-group title="视听收视新指标">
|
|
|
- <van-row>
|
|
|
- <van-col span="7" class="td"> 收视次数: </van-col>
|
|
|
- <van-col span="5" class="td">
|
|
|
- <counto
|
|
|
- :startVal="0"
|
|
|
- :endVal="ratios.hitcount || 0"
|
|
|
- :duration="1000"
|
|
|
- ></counto>
|
|
|
- <span v-if="ratios.hitcountP">.</span>
|
|
|
- <counto
|
|
|
- v-if="ratios.hitcountP"
|
|
|
- :startVal="0"
|
|
|
- :endVal="ratios.hitcountP || 0"
|
|
|
- :duration="1000"
|
|
|
- ></counto
|
|
|
- >{{ ratios.hitcountWei }}
|
|
|
- </van-col>
|
|
|
-
|
|
|
- <van-col span="7" class="td"> 用户数: </van-col>
|
|
|
- <van-col span="5" class="td">
|
|
|
- <counto
|
|
|
- :startVal="0"
|
|
|
- :endVal="ratios.usrcount || 0"
|
|
|
- :duration="1000"
|
|
|
- ></counto>
|
|
|
- <span v-if="ratios.usrcountP">.</span>
|
|
|
- <counto
|
|
|
- v-if="ratios.usrcountP"
|
|
|
- :startVal="0"
|
|
|
- :endVal="ratios.usrcountP || 0"
|
|
|
- :duration="1000"
|
|
|
- ></counto
|
|
|
- >{{ ratios.usrcountWei }}
|
|
|
- </van-col>
|
|
|
-
|
|
|
- <van-col span="10" class="td"> 月度活跃用户数: </van-col>
|
|
|
- <van-col span="5" class="td">
|
|
|
- <counto
|
|
|
- :startVal="0"
|
|
|
- :endVal="ratios.usrcount || 0"
|
|
|
- :duration="1000"
|
|
|
- ></counto>
|
|
|
- <span v-if="ratios.usrcountP">.</span>
|
|
|
- <counto
|
|
|
- v-if="ratios.usrcountP"
|
|
|
- :startVal="0"
|
|
|
- :endVal="ratios.usrcountP || 0"
|
|
|
- :duration="1000"
|
|
|
- ></counto
|
|
|
- >{{ ratios.usrcountWei }}
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- </van-cell-group>
|
|
|
- <van-cell-group title="传统指标">
|
|
|
- <van-row>
|
|
|
- <van-col span="7" class="td"> 收视时长: </van-col>
|
|
|
- <van-col span="6" class="td">
|
|
|
- <counto
|
|
|
- :startVal="0"
|
|
|
- :endVal="ratios.timecount || 0"
|
|
|
- :duration="1000"
|
|
|
- ></counto>
|
|
|
- <span v-if="ratios.timecountP">.</span>
|
|
|
- <counto
|
|
|
- v-if="ratios.timecountP"
|
|
|
- :startVal="0"
|
|
|
- :endVal="ratios.timecountP || 0"
|
|
|
- :duration="1000"
|
|
|
- ></counto
|
|
|
- >{{ ratios.timecountWei }}
|
|
|
- </van-col>
|
|
|
- <van-col span="5" class="td"> 到达率: </van-col>
|
|
|
- <van-col span="6" class="td"
|
|
|
- >{{ formatNum(ratios.reachrate, 2) }}%
|
|
|
- </van-col>
|
|
|
- <van-col span="7" class="td"> 人均时长: </van-col>
|
|
|
- <van-col span="6" class="td"
|
|
|
- >{{ timeFormat(ratios.user_duration) }}分钟
|
|
|
- </van-col>
|
|
|
- <van-col span="5" class="td"> 收视率: </van-col>
|
|
|
- <van-col span="6" class="td">
|
|
|
- {{ formatNum(ratios.watchrate, 2) }}%
|
|
|
- </van-col>
|
|
|
- <van-col span="7" class="td"> 市场占有率: </van-col>
|
|
|
- <van-col span="6" class="td"
|
|
|
- >{{ formatNum(ratios.occrate, 2) }}%
|
|
|
- </van-col>
|
|
|
- <van-col span="5" class="td"> 忠诚度: </van-col>
|
|
|
- <van-col span="6" class="td"
|
|
|
- >{{ formatNum(ratios.loyalty, 2) }}%
|
|
|
- </van-col>
|
|
|
- </van-row>
|
|
|
- </van-cell-group>
|
|
|
- <div ref="pie"></div>
|
|
|
- <div ref="day"></div>
|
|
|
+ <div style="font-size: 0;background-color:#fff ;">
|
|
|
+ <img
|
|
|
+ src="https://cxzx.smcic.net/zhoubao/assets/tv01.jpg"
|
|
|
+ width="100%"
|
|
|
+ style="margin-bottom: 1em;display: block;"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <p
|
|
|
+ :style="'text-indent: 2em; font-weight: 600; padding: 0.5em 3px;font-size: '+ fontSize +'px;'"
|
|
|
+ v-text="title.desc"
|
|
|
+ ></p>
|
|
|
+ <div :style="'height: '+ fontSize +'px;'"></div>
|
|
|
+ <div class="tv-list" :style="'font-size:' + fontSize + 'px'">
|
|
|
+ <div class="content">
|
|
|
+ <!-- <div class="titleTop">
|
|
|
+ <p v-text="title.company"></p>
|
|
|
+ <p v-text="title.name"></p>
|
|
|
+ <p v-text="title.title"></p>
|
|
|
+ </div> -->
|
|
|
+ <div class="itemHead">
|
|
|
+ <van-row>
|
|
|
+ <van-col span="3" class="td"> 排名 </van-col>
|
|
|
+ <van-col span="7" class="td"> 频道 </van-col>
|
|
|
+ <van-col span="5">
|
|
|
+ <van-popover
|
|
|
+ v-model="fene"
|
|
|
+ trigger="click"
|
|
|
+ @select="fene = !fene"
|
|
|
+ >
|
|
|
+ <div style="padding: 5px">
|
|
|
+ 市场份额=本频道收视率/所有频道收视率
|
|
|
+ </div>
|
|
|
+ <template #reference>
|
|
|
+ <p class="td">市场份额</p>
|
|
|
+ </template>
|
|
|
+ </van-popover>
|
|
|
+ </van-col>
|
|
|
+ <!-- td2 :style="width > 667 ? 'line-height: 2.5em' : 'line-height: 1.5em'" -->
|
|
|
+ <van-col span="7">
|
|
|
+ <van-popover
|
|
|
+ v-model="shichang"
|
|
|
+ trigger="click"
|
|
|
+ @select="shichang = !shichang"
|
|
|
+ >
|
|
|
+ <div style="padding: 5px">
|
|
|
+ 市场份额=本频道收视率/所有频道收视率
|
|
|
+ </div>
|
|
|
+ <template #reference>
|
|
|
+ <p class="td">周人均时长(分)</p>
|
|
|
+ </template>
|
|
|
+ </van-popover>
|
|
|
+ </van-col>
|
|
|
+ <van-col span="2" class="td">
|
|
|
+ <img
|
|
|
+ src="../../../assets/image/shou.gif"
|
|
|
+ width="26px"
|
|
|
+ alt=""
|
|
|
+ style="vertical-align: middle"
|
|
|
+ />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
</div>
|
|
|
- <div class="bottom content">
|
|
|
- <img
|
|
|
+ <div v-for="(v, o) in platfromData || []" :key="v.name">
|
|
|
+ <div
|
|
|
+ style="border-bottom: 1px dashed #eee; margin: 11px 0 0 0"
|
|
|
+ v-if="o === 20"
|
|
|
+ ></div>
|
|
|
+ <van-row class="item" @click="() => showPopup(o)">
|
|
|
+ <van-col
|
|
|
+ span="3"
|
|
|
+ :class="{ td: true }"
|
|
|
+ :style="{ color: color[o] || '#000', fontWeight: 600 }"
|
|
|
+ >
|
|
|
+ {{ v.rank }}
|
|
|
+ </van-col>
|
|
|
+ <van-col span="7" :class="{ td: true }">
|
|
|
+ {{ v.channelname }}
|
|
|
+ </van-col>
|
|
|
+ <van-col span="5" :class="{ td: true }">
|
|
|
+ {{ formatNum(v.occrate, 2) }}%
|
|
|
+ <van-icon
|
|
|
+ v-if="v.occrate_change !== '相等'"
|
|
|
+ name="down"
|
|
|
+ :color="v.occrate_change === '上升' ? '#f00' : '#0f0'"
|
|
|
+ :class="{ rise: v.occrate_change === '上升' }"
|
|
|
+ />
|
|
|
+ </van-col>
|
|
|
+ <van-col span="7" :class="{ td: true }">
|
|
|
+ {{ timeFormat(v.user_duration) }}
|
|
|
+ <van-icon
|
|
|
+ v-if="v.user_duration_change !== '相等'"
|
|
|
+ name="down"
|
|
|
+ :color="v.user_duration_change === '上升' ? '#f00' : '#0f0'"
|
|
|
+ :class="{ rise: v.user_duration_change === '上升' }"
|
|
|
+ />
|
|
|
+ </van-col>
|
|
|
+ <van-col span="2" class="td" style="cursor: pointer">
|
|
|
+ <van-icon name="arrow" />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ </div>
|
|
|
+ <van-popup
|
|
|
+ :style="{ height: '100%', width: '100%' }"
|
|
|
+ position="right"
|
|
|
+ v-model="show"
|
|
|
+ >
|
|
|
+ <div class="main">
|
|
|
+ <van-cell
|
|
|
+ title-style="flex: 3"
|
|
|
+ :title="ratios.schedulename"
|
|
|
+ :label="ratios.channelname"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ @click="show = false"
|
|
|
+ style="color: #5470c6; cursor: pointer"
|
|
|
+ >
|
|
|
+ <van-icon name="revoke" />
|
|
|
+ {{ ratios.channelname }}
|
|
|
+ </div>
|
|
|
+ </van-cell>
|
|
|
+ <van-cell-group title="视听收视新指标">
|
|
|
+ <van-row>
|
|
|
+ <van-col span="10" class="td"> 收视时长: </van-col>
|
|
|
+ <van-col span="14" class="td">
|
|
|
+ <counto
|
|
|
+ :startVal="0"
|
|
|
+ :endVal="ratios.timecount || 0"
|
|
|
+ :duration="1000"
|
|
|
+ ></counto>
|
|
|
+ <span v-if="ratios.timecountP">.</span>
|
|
|
+ {{
|
|
|
+ (ratios.timecountP > 0 ? ratios.timecountP : "") +
|
|
|
+ ratios.timecountWei
|
|
|
+ }}
|
|
|
+ </van-col>
|
|
|
+ <van-col span="10" class="td"> 收视次数: </van-col>
|
|
|
+ <van-col span="14" class="td">
|
|
|
+ <counto
|
|
|
+ :startVal="0"
|
|
|
+ :endVal="ratios.hitcount || 0"
|
|
|
+ :duration="1000"
|
|
|
+ ></counto>
|
|
|
+ <span v-if="ratios.hitcountP">.</span>
|
|
|
+ {{
|
|
|
+ (ratios.hitcountP > 0 ? ratios.hitcountP : "") +
|
|
|
+ ratios.hitcountWei
|
|
|
+ }}
|
|
|
+ </van-col>
|
|
|
+
|
|
|
+ <van-col span="10" class="td"> 周活跃户数: </van-col>
|
|
|
+ <van-col span="14" class="td">
|
|
|
+ <counto
|
|
|
+ :startVal="0"
|
|
|
+ :endVal="ratios.usrcount || 0"
|
|
|
+ :duration="1000"
|
|
|
+ ></counto>
|
|
|
+ <span v-if="ratios.usrcountP">.</span>
|
|
|
+ {{
|
|
|
+ (ratios.usrcountP > 0 ? ratios.usrcountP : "") +
|
|
|
+ ratios.usrcountWei
|
|
|
+ }}
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ </van-cell-group>
|
|
|
+ <van-cell-group title="传统指标">
|
|
|
+ <van-row>
|
|
|
+ <van-col span="5" class="td"> 到达率: </van-col>
|
|
|
+ <van-col span="5" class="td"
|
|
|
+ >{{ formatNum(ratios.reachrate, 2) }}%
|
|
|
+ </van-col>
|
|
|
+ <van-col span="7" class="td"> 周人均时长: </van-col>
|
|
|
+ <van-col span="7" class="td"
|
|
|
+ >{{ timeFormat(ratios.user_duration, 0) }}分钟
|
|
|
+ </van-col>
|
|
|
+ <van-col span="5" class="td"> 收视率: </van-col>
|
|
|
+ <van-col span="5" class="td">
|
|
|
+ {{ formatNum(ratios.watchrate, 2) }}%
|
|
|
+ </van-col>
|
|
|
+ <van-col span="7" class="td"> 市场占有率: </van-col>
|
|
|
+ <van-col span="7" class="td"
|
|
|
+ >{{ formatNum(ratios.occrate, 2) }}%
|
|
|
+ </van-col>
|
|
|
+ <van-col span="5" class="td"> 忠诚度: </van-col>
|
|
|
+ <van-col span="5" class="td"
|
|
|
+ >{{ formatNum(ratios.loyalty, 2) }}%
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ </van-cell-group>
|
|
|
+ <div ref="pie"></div>
|
|
|
+ <div ref="day"></div>
|
|
|
+ </div>
|
|
|
+ <div class="bottom content">
|
|
|
+ <!-- <img
|
|
|
src="https://djweb.smcic.net/img/smcLogo.png"
|
|
|
width="30%"
|
|
|
style="vertical-align: middle"
|
|
|
alt=""
|
|
|
- />
|
|
|
- <span
|
|
|
- style="
|
|
|
- display: inline-block;
|
|
|
- width: 68%;
|
|
|
- vertical-align: middle;
|
|
|
- padding-left: 5px;
|
|
|
- font-weight: 600;
|
|
|
- "
|
|
|
- >
|
|
|
- 本数据由<span style="white-space: nowrap"
|
|
|
- >“陕西广电融媒体集团大数据平台”</span
|
|
|
- >提供。技术支持 汪朝涵:17302954998
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </van-popup>
|
|
|
- </div>
|
|
|
- <div class="bottom content">
|
|
|
- <img
|
|
|
+ /> -->
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ display: block;
|
|
|
+ font-size: 0.9rem;
|
|
|
+ vertical-align: middle;
|
|
|
+ padding-left: 5px;
|
|
|
+ font-weight: 600;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 本数据由“陕西广电融媒体集团大数据平台”提供。
|
|
|
+ <p>技术支持 白帆 13325452244;汪朝涵:17302954998</p>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+ </div>
|
|
|
+ <div class="bottom content">
|
|
|
+ <!-- <img
|
|
|
src="https://djweb.smcic.net/img/smcLogo.png"
|
|
|
width="30%"
|
|
|
style="vertical-align: middle"
|
|
|
alt=""
|
|
|
- />
|
|
|
- <span
|
|
|
- style="
|
|
|
- display: inline-block;
|
|
|
- width: 68%;
|
|
|
- vertical-align: middle;
|
|
|
- padding-left: 5px;
|
|
|
- font-weight: 600;
|
|
|
- "
|
|
|
- >
|
|
|
- 本数据由<span style="white-space: nowrap"
|
|
|
- >“陕西广电融媒体集团大数据平台”</span
|
|
|
- >提供。技术支持 汪朝涵:17302954998
|
|
|
- </span>
|
|
|
+ /> -->
|
|
|
+ <span
|
|
|
+ style="
|
|
|
+ display: block;
|
|
|
+ font-size: 0.9rem;
|
|
|
+ vertical-align: middle;
|
|
|
+ padding-left: 5px;
|
|
|
+ font-weight: 600;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 本数据由“陕西广电融媒体集团大数据平台”提供。
|
|
|
+ <p>技术支持 白帆 13325452244;汪朝涵:17302954998</p>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -230,7 +247,9 @@ import {
|
|
|
Popup as vanPopup,
|
|
|
cellGroup as vanCellGroup,
|
|
|
Cell as vanCell,
|
|
|
+ Popover as vanPopover,
|
|
|
} from "vant";
|
|
|
+import "vant/lib/popover/style/index";
|
|
|
import "vant/lib/cell-group/style/index";
|
|
|
import "vant/lib/cell/style/index";
|
|
|
import "vant/lib/popup/style/index";
|
|
@@ -247,6 +266,8 @@ export default {
|
|
|
name: "tv-list",
|
|
|
data() {
|
|
|
return {
|
|
|
+ shichang: false,
|
|
|
+ fene: false,
|
|
|
fontSize: 17,
|
|
|
show: false,
|
|
|
charts: undefined,
|
|
@@ -255,13 +276,17 @@ export default {
|
|
|
color: ["#ff0036", "#ff9b00", "#ffcc00"],
|
|
|
echarts: undefined,
|
|
|
dayEcharts: undefined,
|
|
|
- date: [],
|
|
|
+ title: {},
|
|
|
width: document.body.offsetWidth || 0,
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
|
mounted() {
|
|
|
- if (!this.$route.query.auto) return;
|
|
|
+ if (
|
|
|
+ this.$route.query.auto !==
|
|
|
+ "06fd56cdf5a6cfc3a2139cc8514d05aa0439ee8c1fb4d81145bc9647"
|
|
|
+ )
|
|
|
+ return;
|
|
|
this.fontSize = (document.body.offsetWidth / 24).toFixed(2) - 0;
|
|
|
if (document.body.offsetWidth > 677) this.fontSize = 22;
|
|
|
watermark.setWaterMark({
|
|
@@ -274,13 +299,20 @@ export default {
|
|
|
let D = new Date(time);
|
|
|
const lasetDay = new Dayjs(D.getTime() - D.getDay() * 86400000);
|
|
|
const firstDay = new Dayjs(lasetDay - 6 * 86400000);
|
|
|
- this.date = [firstDay.format("YYYY-MM-DD"), lasetDay.format("YYYY-MM-DD")];
|
|
|
jsonZhou({
|
|
|
start: firstDay.format("YYYYMMDD"),
|
|
|
end: lasetDay.format("YYYYMMDD"),
|
|
|
})
|
|
|
.then(res => {
|
|
|
- this.platfromData = res || [];
|
|
|
+ console.log(res);
|
|
|
+ const title = {
|
|
|
+ company: res.company || "",
|
|
|
+ name: res.name || "",
|
|
|
+ title: res.title || "",
|
|
|
+ desc: res.desc || "",
|
|
|
+ };
|
|
|
+ this.title = title;
|
|
|
+ this.platfromData = res.list || [];
|
|
|
this.$emit("start", {
|
|
|
status: 200,
|
|
|
});
|
|
@@ -327,13 +359,13 @@ export default {
|
|
|
N = N.toString().split(".");
|
|
|
return {
|
|
|
N: (N[0] || 0) * 1,
|
|
|
- P: (N[1] || 0) * 1,
|
|
|
+ P: N[1] || 0,
|
|
|
wei,
|
|
|
};
|
|
|
},
|
|
|
- timeFormat(t) {
|
|
|
+ timeFormat(t,w) {
|
|
|
const Time = t || 0;
|
|
|
- let out = Time.toFixed(1) - 0;
|
|
|
+ let out = Time.toFixed(w || 0) - 0;
|
|
|
return out;
|
|
|
},
|
|
|
showPopup(i) {
|
|
@@ -382,10 +414,10 @@ export default {
|
|
|
});
|
|
|
this.dayEcharts.setOption({
|
|
|
title: {
|
|
|
- text: "用户趋势",
|
|
|
+ text: "家庭户收视规模",
|
|
|
subtext: this.ratios.user_count_compare
|
|
|
- ? this.ratios.user_count_compare
|
|
|
- : "",
|
|
|
+ ? this.ratios.user_count_compare + " 单位:户"
|
|
|
+ : "单位:户",
|
|
|
textStyle: {
|
|
|
fontSize: 14,
|
|
|
},
|
|
@@ -409,7 +441,7 @@ export default {
|
|
|
formatter: e => {
|
|
|
const T = this.formatType(e);
|
|
|
let out = T.N;
|
|
|
- if (T.P) out += "." + T.P;
|
|
|
+ if (T.P > 0) out += "." + (T.P - 0);
|
|
|
out += T.wei;
|
|
|
return out;
|
|
|
},
|
|
@@ -439,61 +471,39 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
- const key = [],
|
|
|
- value = [];
|
|
|
- let max = 0;
|
|
|
- this.ratios.duration_list.map(v => {
|
|
|
- let val = (v.value * 100).toFixed(2) - 0;
|
|
|
- key.push(v.range);
|
|
|
- value.push(val);
|
|
|
- max < val && (max = val);
|
|
|
- });
|
|
|
- max += max * 0.2;
|
|
|
- max > 100 && (max = 100);
|
|
|
this.echarts.setOption({
|
|
|
title: {
|
|
|
text: "观看时长用户分布",
|
|
|
+ subtext: "单位:%",
|
|
|
textStyle: {
|
|
|
fontSize: 14,
|
|
|
},
|
|
|
},
|
|
|
- radar: {
|
|
|
- shape: "circle",
|
|
|
- center: ["50%", "50%"],
|
|
|
- radius: 100,
|
|
|
- axisName: {
|
|
|
- color: "#000",
|
|
|
- },
|
|
|
- indicator: key.map((v, i) => {
|
|
|
- let m = value[i] / max,
|
|
|
- val = max;
|
|
|
- m <= 0.5 ? (val = 0.5 * max) : "";
|
|
|
- return {
|
|
|
- name: v,
|
|
|
- max: val,
|
|
|
- };
|
|
|
- }),
|
|
|
- },
|
|
|
+ color: [
|
|
|
+ "#87cefa",
|
|
|
+ "#00bfff",
|
|
|
+ "#1e90ff",
|
|
|
+ "#0000ff",
|
|
|
+ "#00008b",
|
|
|
+ "#191970",
|
|
|
+ "#000080",
|
|
|
+ "#0000cd",
|
|
|
+ "#4169e1",
|
|
|
+ "#6495ed",
|
|
|
+ ],
|
|
|
series: [
|
|
|
{
|
|
|
- type: "radar",
|
|
|
- data: [
|
|
|
- {
|
|
|
- value,
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- formatter: function (params) {
|
|
|
- return params.value.toFixed(0) + "%";
|
|
|
- },
|
|
|
- },
|
|
|
- itemStyle: {
|
|
|
- color: "#F9713C",
|
|
|
- },
|
|
|
- areaStyle: {
|
|
|
- opacity: 0.1,
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
+ name: "Nightingale Chart",
|
|
|
+ type: "pie",
|
|
|
+ radius: [30, 70],
|
|
|
+ center: ["50%", "50%"],
|
|
|
+ data: this.ratios.duration_list.map(v => {
|
|
|
+ let bfb = (v.value * 100).toFixed(0) - 0;
|
|
|
+ return {
|
|
|
+ value: bfb,
|
|
|
+ name: v.range + "\n 占比" + bfb + "%",
|
|
|
+ };
|
|
|
+ }),
|
|
|
},
|
|
|
],
|
|
|
});
|
|
@@ -508,6 +518,7 @@ export default {
|
|
|
vanPopup,
|
|
|
vanCell,
|
|
|
vanCellGroup,
|
|
|
+ vanPopover,
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -558,10 +569,17 @@ export default {
|
|
|
transform: rotate(180deg);
|
|
|
}
|
|
|
.titleTop {
|
|
|
- height: 80px;
|
|
|
- line-height: 80px;
|
|
|
+ padding: 1em 0;
|
|
|
+ font-weight: 600;
|
|
|
background-image: linear-gradient(to right, #014392, #008fc4, #00428c);
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
}
|
|
|
</style>
|
|
|
+<style>
|
|
|
+.van-cell-group__title {
|
|
|
+ font-size: 1.1rem;
|
|
|
+ color: #000;
|
|
|
+ font-weight: 600;
|
|
|
+}
|
|
|
+</style>
|