|
@@ -78,19 +78,20 @@
|
|
<canvas id="barChart" style="width: 100%; height: 70vw" class=""></canvas>
|
|
<canvas id="barChart" style="width: 100%; height: 70vw" class=""></canvas>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <!-- <div class="card">
|
|
|
|
- <div class="cardtit">发稿统计</div>
|
|
|
|
|
|
+ <div class="card">
|
|
|
|
+ <div class="cardtit">爆款热点</div>
|
|
<div style="padding: 10px">
|
|
<div style="padding: 10px">
|
|
<el-table :data="platformList" style="width: 100%">
|
|
<el-table :data="platformList" style="width: 100%">
|
|
- <el-table-column prop="depName" label="部门"> </el-table-column>
|
|
|
|
- <el-table-column prop="total" label="发稿量">
|
|
|
|
|
|
+ <el-table-column prop="host" label="部门"> </el-table-column>
|
|
|
|
+ <el-table-column prop="subTopic" label="热点名称"> </el-table-column>
|
|
|
|
+ <el-table-column prop="playCount" label="传播量">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{ scope.row.total | numform }}
|
|
|
|
|
|
+ {{ scope.row.playCount | numform }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
- </div> -->
|
|
|
|
|
|
+ </div>
|
|
|
|
|
|
<div class="card">
|
|
<div class="card">
|
|
<div class="cardtit">
|
|
<div class="cardtit">
|
|
@@ -128,12 +129,13 @@
|
|
<el-table-column prop="depName" label="部门"> </el-table-column>
|
|
<el-table-column prop="depName" label="部门"> </el-table-column>
|
|
<el-table-column prop="name" label="账号"> </el-table-column>
|
|
<el-table-column prop="name" label="账号"> </el-table-column>
|
|
<el-table-column prop="platform" label="平台"> </el-table-column>
|
|
<el-table-column prop="platform" label="平台"> </el-table-column>
|
|
- <el-table-column prop="publishTime" label="发稿时间"> </el-table-column>
|
|
|
|
|
|
+ <el-table-column prop="publishTime" label="发稿时间">
|
|
|
|
+ </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<el-pagination
|
|
<el-pagination
|
|
style="margin-top: 5px"
|
|
style="margin-top: 5px"
|
|
background
|
|
background
|
|
- layout="prev, pager, next"
|
|
|
|
|
|
+ layout="total, prev, pager, next"
|
|
:total="usertotal"
|
|
:total="usertotal"
|
|
:current-page="page"
|
|
:current-page="page"
|
|
@current-change="pagechange"
|
|
@current-change="pagechange"
|
|
@@ -151,7 +153,8 @@ import {
|
|
platformData,
|
|
platformData,
|
|
qushiData,
|
|
qushiData,
|
|
bumenData,
|
|
bumenData,
|
|
-// pingtaiData,
|
|
|
|
|
|
+ // pingtaiData,
|
|
|
|
+ baodianList,
|
|
zhanghaoData,
|
|
zhanghaoData,
|
|
bumenList,
|
|
bumenList,
|
|
} from "@/api/index.js";
|
|
} from "@/api/index.js";
|
|
@@ -166,7 +169,7 @@ export default {
|
|
playT: 0,
|
|
playT: 0,
|
|
plays: [],
|
|
plays: [],
|
|
loading: false,
|
|
loading: false,
|
|
- // platformList: [],
|
|
|
|
|
|
+ platformList: [],
|
|
dep: "全部",
|
|
dep: "全部",
|
|
T: [],
|
|
T: [],
|
|
userlist: [],
|
|
userlist: [],
|
|
@@ -204,13 +207,15 @@ export default {
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
init() {
|
|
init() {
|
|
- console.log("--");
|
|
|
|
linechart && linechart.destroy();
|
|
linechart && linechart.destroy();
|
|
barchart && barchart.destroy();
|
|
barchart && barchart.destroy();
|
|
piechart && piechart.destroy();
|
|
piechart && piechart.destroy();
|
|
linechart = null;
|
|
linechart = null;
|
|
barchart = null;
|
|
barchart = null;
|
|
piechart = null;
|
|
piechart = null;
|
|
|
|
+ baodianList(this.topic).then(r=>{
|
|
|
|
+ this.platformList = r || []
|
|
|
|
+ })
|
|
platformData(this.topic).then(r => {
|
|
platformData(this.topic).then(r => {
|
|
let platform = {},
|
|
let platform = {},
|
|
pli = [];
|
|
pli = [];
|
|
@@ -251,13 +256,13 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
this.bmGet();
|
|
this.bmGet();
|
|
- // pingtaiData({
|
|
|
|
- // depRange: "ALL",
|
|
|
|
- // title: this.topic,
|
|
|
|
- // }).then(r => {
|
|
|
|
- // console.log(r)
|
|
|
|
- // this.platformList = (r || []).sort((a, b) => b.readTotal - a.readTotal);
|
|
|
|
- // });
|
|
|
|
|
|
+ // pingtaiData({
|
|
|
|
+ // depRange: "ALL",
|
|
|
|
+ // title: this.topic,
|
|
|
|
+ // }).then(r => {
|
|
|
|
+ // console.log(r)
|
|
|
|
+ // this.platformList = (r || []).sort((a, b) => b.readTotal - a.readTotal);
|
|
|
|
+ // });
|
|
this.grtzhData();
|
|
this.grtzhData();
|
|
bumenList().then(r => {
|
|
bumenList().then(r => {
|
|
let options = (r || []).map(v => {
|
|
let options = (r || []).map(v => {
|
|
@@ -339,24 +344,9 @@ export default {
|
|
tickCount: 5,
|
|
tickCount: 5,
|
|
},
|
|
},
|
|
});
|
|
});
|
|
- linechart.axis("playCount", {
|
|
|
|
- label: function label(text) {
|
|
|
|
- const textCfg = {};
|
|
|
|
- textCfg.text = that.numform(text);
|
|
|
|
- return textCfg;
|
|
|
|
- },
|
|
|
|
- grid: null,
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- linechart.axis("dt", {
|
|
|
|
- label: function label(text, index, total) {
|
|
|
|
- const textCfg = {};
|
|
|
|
- if (index === 0) {
|
|
|
|
- textCfg.textAlign = "left";
|
|
|
|
- } else if (index === total - 1) {
|
|
|
|
- textCfg.textAlign = "right";
|
|
|
|
- }
|
|
|
|
- return textCfg;
|
|
|
|
|
|
+ linechart.scale("playCount", {
|
|
|
|
+ formatter(text) {
|
|
|
|
+ return that.numform(text);
|
|
},
|
|
},
|
|
});
|
|
});
|
|
linechart.tooltip({
|
|
linechart.tooltip({
|
|
@@ -364,7 +354,6 @@ export default {
|
|
onShow: function onShow(ev) {
|
|
onShow: function onShow(ev) {
|
|
const items = ev.items;
|
|
const items = ev.items;
|
|
items[0].name = items[0].title;
|
|
items[0].name = items[0].title;
|
|
- items[0].value = that.numform(items[0].title);
|
|
|
|
items[1].name = null;
|
|
items[1].name = null;
|
|
items[1].value = 0;
|
|
items[1].value = 0;
|
|
},
|
|
},
|
|
@@ -394,7 +383,7 @@ export default {
|
|
barchart = new F2.Chart({
|
|
barchart = new F2.Chart({
|
|
id: "barChart",
|
|
id: "barChart",
|
|
pixelRatio: window.devicePixelRatio,
|
|
pixelRatio: window.devicePixelRatio,
|
|
- padding: [10, 50, 30, 110],
|
|
|
|
|
|
+ padding: [10, 50, 30, 140],
|
|
});
|
|
});
|
|
|
|
|
|
barchart.source(li, {
|
|
barchart.source(li, {
|
|
@@ -410,6 +399,15 @@ export default {
|
|
},
|
|
},
|
|
grid: null,
|
|
grid: null,
|
|
});
|
|
});
|
|
|
|
+ barchart.axis("depName", {
|
|
|
|
+ label: function label(text) {
|
|
|
|
+ const textCfg = {};
|
|
|
|
+ textCfg.text = text;
|
|
|
|
+ textCfg.fontSize = 12;
|
|
|
|
+ return textCfg;
|
|
|
|
+ },
|
|
|
|
+ grid: null,
|
|
|
|
+ });
|
|
|
|
|
|
barchart.coord({
|
|
barchart.coord({
|
|
transposed: true,
|
|
transposed: true,
|