|
@@ -1,9 +1,8 @@
|
|
|
<template>
|
|
|
<div style="font-size: 0; background-color: #fff">
|
|
|
<img
|
|
|
- :src="
|
|
|
- 'https://cxzx.smcic.net/zhoubao/assets/tv' + $route.query.date + '.jpg'
|
|
|
- "
|
|
|
+ v-if="date"
|
|
|
+ :src="'https://cxzx.smcic.net/zhoubao/assets/tv' + date + '.jpg'"
|
|
|
width="100%"
|
|
|
class="content"
|
|
|
style="margin-bottom: 1em; display: block"
|
|
@@ -130,11 +129,8 @@
|
|
|
</div>
|
|
|
|
|
|
<img
|
|
|
- :src="
|
|
|
- 'https://cxzx.smcic.net/zhoubao/assets/xatv' +
|
|
|
- $route.query.date +
|
|
|
- '.jpg'
|
|
|
- "
|
|
|
+ v-if="date"
|
|
|
+ :src="'https://cxzx.smcic.net/zhoubao/assets/xatv' + date + '.jpg'"
|
|
|
width="100%"
|
|
|
class="content"
|
|
|
style="margin-bottom: 1em; display: block"
|
|
@@ -263,7 +259,7 @@
|
|
|
<van-col span="7" class="td">
|
|
|
{{ ratios.timecount }}小时
|
|
|
</van-col>
|
|
|
- <van-col span="10" class="td" style="text-align: left;">
|
|
|
+ <van-col span="10" class="td" style="text-align: left">
|
|
|
环比:
|
|
|
<span
|
|
|
:style="
|
|
@@ -286,13 +282,11 @@
|
|
|
<van-col span="7" class="td">
|
|
|
{{ ratios.hitcount }}
|
|
|
</van-col>
|
|
|
- <van-col span="10" class="td" style="text-align: left;">
|
|
|
+ <van-col span="10" class="td" style="text-align: left">
|
|
|
环比:
|
|
|
<span
|
|
|
:style="
|
|
|
- ratios.hitcount_ring > 0
|
|
|
- ? 'color: red'
|
|
|
- : 'color: #04c15f'
|
|
|
+ ratios.hitcount_ring > 0 ? 'color: red' : 'color: #04c15f'
|
|
|
"
|
|
|
>
|
|
|
{{ ratios.hitcount_ring }}%
|
|
@@ -310,7 +304,7 @@
|
|
|
<van-col span="7" class="td">
|
|
|
{{ ratios.usrcount }}
|
|
|
</van-col>
|
|
|
- <van-col span="10" class="td" style="text-align: left;">
|
|
|
+ <van-col span="10" class="td" style="text-align: left">
|
|
|
环比:
|
|
|
<span
|
|
|
:style="
|
|
@@ -333,7 +327,7 @@
|
|
|
{{ formatType1(ratios.touchfreq, 2) }}次
|
|
|
</van-col>
|
|
|
|
|
|
- <van-col span="10" class="td" style="text-align: left;">
|
|
|
+ <van-col span="10" class="td" style="text-align: left">
|
|
|
环比:
|
|
|
<span
|
|
|
:style="
|
|
@@ -360,7 +354,7 @@
|
|
|
<van-col span="7" class="td"
|
|
|
>{{ formatNum(ratios.reachrate, 2) }}%
|
|
|
</van-col>
|
|
|
- <van-col span="10" class="td" style="text-align: left;">
|
|
|
+ <van-col span="10" class="td" style="text-align: left">
|
|
|
环比:
|
|
|
<span
|
|
|
:style="
|
|
@@ -383,7 +377,7 @@
|
|
|
<van-col span="7" class="td"
|
|
|
>{{ timeFormat(ratios.user_duration, 0) }}分钟
|
|
|
</van-col>
|
|
|
- <van-col span="10" class="td" style="text-align: left;">
|
|
|
+ <van-col span="10" class="td" style="text-align: left">
|
|
|
环比:
|
|
|
<span
|
|
|
:style="
|
|
@@ -406,7 +400,7 @@
|
|
|
<van-col span="7" class="td">
|
|
|
{{ formatNum(ratios.watchrate, 2) }}%
|
|
|
</van-col>
|
|
|
- <van-col span="10" class="td" style="text-align: left;">
|
|
|
+ <van-col span="10" class="td" style="text-align: left">
|
|
|
环比:
|
|
|
<span
|
|
|
:style="
|
|
@@ -429,13 +423,11 @@
|
|
|
<van-col span="7" class="td"
|
|
|
>{{ formatNum(ratios.occrate, 2) }}%
|
|
|
</van-col>
|
|
|
- <van-col span="10" class="td" style="text-align: left;">
|
|
|
+ <van-col span="10" class="td" style="text-align: left">
|
|
|
环比:
|
|
|
<span
|
|
|
:style="
|
|
|
- ratios.occrate_ring > 0
|
|
|
- ? 'color: red'
|
|
|
- : 'color: #04c15f'
|
|
|
+ ratios.occrate_ring > 0 ? 'color: red' : 'color: #04c15f'
|
|
|
"
|
|
|
>
|
|
|
{{ ratios.occrate_ring }}%
|
|
@@ -452,13 +444,11 @@
|
|
|
<van-col span="7" class="td"
|
|
|
>{{ formatNum(ratios.loyalty, 2) }}%
|
|
|
</van-col>
|
|
|
- <van-col span="10" class="td" style="text-align: left;">
|
|
|
+ <van-col span="10" class="td" style="text-align: left">
|
|
|
环比:
|
|
|
<span
|
|
|
:style="
|
|
|
- ratios.loyalty_ring > 0
|
|
|
- ? 'color: red'
|
|
|
- : 'color: #04c15f'
|
|
|
+ ratios.loyalty_ring > 0 ? 'color: red' : 'color: #04c15f'
|
|
|
"
|
|
|
>
|
|
|
{{ ratios.loyalty_ring }}%
|
|
@@ -529,12 +519,12 @@ import "vant/lib/popup/style/index";
|
|
|
import "vant/lib/icon/style/index";
|
|
|
import "vant/lib/col/style/index";
|
|
|
import "vant/lib/row/style/index";
|
|
|
-// import {} from "../utils/tool";
|
|
|
-import Dayjs from "dayjs";
|
|
|
import { jsonZhouXian, jsonZhou } from "../../../api/index";
|
|
|
-
|
|
|
+import { defaultDate } from "@/utils/tool.js";
|
|
|
import echarts from "../../../utils/echarts";
|
|
|
|
|
|
+import report from "../mixin/index.js";
|
|
|
+
|
|
|
export default {
|
|
|
name: "TraditionalAndXian",
|
|
|
data() {
|
|
@@ -556,93 +546,90 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
|
- mounted() {
|
|
|
- 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({
|
|
|
- w_texts: ["陕西视听大数据"],
|
|
|
- w_options: {
|
|
|
- w_opacity: "0.1",
|
|
|
- },
|
|
|
- });
|
|
|
- const time = new Date(this.$route.query.date);
|
|
|
- let D = new Date(time);
|
|
|
- const lasetDay = new Dayjs(D.getTime() - D.getDay() * 86400000);
|
|
|
- const firstDay = new Dayjs(lasetDay - 6 * 86400000);
|
|
|
- jsonZhouXian({
|
|
|
- start: firstDay.format("YYYYMMDD"),
|
|
|
- end: lasetDay.format("YYYYMMDD"),
|
|
|
- time: Date.now(),
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- const title = {
|
|
|
- company: res.company || "",
|
|
|
- name: res.name || "",
|
|
|
- title: res.title || "",
|
|
|
- desc: res.desc || "",
|
|
|
- dataSource: res.dataSource || "",
|
|
|
- };
|
|
|
- this.title = title;
|
|
|
- this.platfromData = res.list || [];
|
|
|
- this.$emit("start", {
|
|
|
- status: 200,
|
|
|
- });
|
|
|
+ mixins: [report],
|
|
|
+ computed: {},
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this.fontSize = (document.body.offsetWidth / 24).toFixed(2) - 0;
|
|
|
+ if (document.body.offsetWidth > 677) this.fontSize = 22;
|
|
|
+ watermark.setWaterMark({
|
|
|
+ w_texts: ["陕西视听大数据"],
|
|
|
+ w_options: {
|
|
|
+ w_opacity: "0.1",
|
|
|
+ },
|
|
|
+ });
|
|
|
+ const date = defaultDate(
|
|
|
+ "Week",
|
|
|
+ this.$route.query.date || this.lastTimeDate.tv
|
|
|
+ ).split("-");
|
|
|
+ this.date = (date[2] || "").replace(/\*/g, "-");
|
|
|
+ jsonZhouXian({
|
|
|
+ start: date[0],
|
|
|
+ end: date[1],
|
|
|
+ time: Date.now(),
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
- this.$emit("start", {
|
|
|
- status: err,
|
|
|
+ .then(res => {
|
|
|
+ const title = {
|
|
|
+ company: res.company || "",
|
|
|
+ name: res.name || "",
|
|
|
+ title: res.title || "",
|
|
|
+ desc: res.desc || "",
|
|
|
+ dataSource: res.dataSource || "",
|
|
|
+ };
|
|
|
+ this.title = title;
|
|
|
+ this.platfromData = res.list || [];
|
|
|
+ this.$emit("start", {
|
|
|
+ status: 200,
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$emit("start", {
|
|
|
+ status: err,
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
|
|
|
- jsonZhou({
|
|
|
- start: firstDay.format("YYYYMMDD"),
|
|
|
- end: lasetDay.format("YYYYMMDD"),
|
|
|
- time: Date.now(),
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- const title = {
|
|
|
- company: res.company || "",
|
|
|
- name: res.name || "",
|
|
|
- title: res.title || "",
|
|
|
- desc: res.desc || "",
|
|
|
- dataSource: res.dataSource || "",
|
|
|
- };
|
|
|
- this.title1 = title;
|
|
|
- this.platfromData1 = res.list || [];
|
|
|
- this.$emit("start", {
|
|
|
- status: 200,
|
|
|
- });
|
|
|
+ jsonZhou({
|
|
|
+ start: date[0],
|
|
|
+ end: date[1],
|
|
|
+ time: Date.now(),
|
|
|
})
|
|
|
- .catch(err => {
|
|
|
- this.$emit("start", {
|
|
|
- status: err,
|
|
|
+ .then(res => {
|
|
|
+ const title = {
|
|
|
+ company: res.company || "",
|
|
|
+ name: res.name || "",
|
|
|
+ title: res.title || "",
|
|
|
+ desc: res.desc || "",
|
|
|
+ dataSource: res.dataSource || "",
|
|
|
+ };
|
|
|
+ this.title1 = title;
|
|
|
+ this.platfromData1 = res.list || [];
|
|
|
+ this.$emit("start", {
|
|
|
+ status: 200,
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$emit("start", {
|
|
|
+ status: err,
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
|
|
|
- window.onresize = () => {
|
|
|
- const doc = document.body;
|
|
|
- const width = doc.offsetWidth - 32;
|
|
|
- let height = (width / 4) * 3;
|
|
|
- this.width = document.body.offsetWidth || 0;
|
|
|
- this.dayEcharts &&
|
|
|
- this.dayEcharts.resize({
|
|
|
- width,
|
|
|
- height: width,
|
|
|
- });
|
|
|
- this.echarts &&
|
|
|
- this.echarts.resize({
|
|
|
- width,
|
|
|
- height,
|
|
|
- });
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {},
|
|
|
- methods: {
|
|
|
+ window.onresize = () => {
|
|
|
+ const doc = document.body;
|
|
|
+ const width = doc.offsetWidth - 32;
|
|
|
+ let height = (width / 4) * 3;
|
|
|
+ this.width = document.body.offsetWidth || 0;
|
|
|
+ this.dayEcharts &&
|
|
|
+ this.dayEcharts.resize({
|
|
|
+ width,
|
|
|
+ height: width,
|
|
|
+ });
|
|
|
+ this.echarts &&
|
|
|
+ this.echarts.resize({
|
|
|
+ width,
|
|
|
+ height,
|
|
|
+ });
|
|
|
+ };
|
|
|
+ },
|
|
|
formatType1(num, W) {
|
|
|
let N = this.formatNum(num, W || 0);
|
|
|
if (N >= 100000000) {
|