|
@@ -55,6 +55,11 @@
|
|
>
|
|
>
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="关键词类别">
|
|
|
|
+ <el-select v-model="form.kwName" placeholder="请选择">
|
|
|
|
+ <el-option :label="item.value" :value="item.name" v-for="item in selectColumns" :key="item.name" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="关键词">
|
|
<el-form-item label="关键词">
|
|
<el-input v-model="form.match" placeholder="检索关键词" clearable />
|
|
<el-input v-model="form.match" placeholder="检索关键词" clearable />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -90,11 +95,13 @@
|
|
:prop="item.key"
|
|
:prop="item.key"
|
|
:label="item.label"
|
|
:label="item.label"
|
|
:sortable="item.sortable"
|
|
:sortable="item.sortable"
|
|
- :sort-orders="item.sortable ? ['ascending','descending', null] : []"
|
|
|
|
|
|
+ :sort-orders="
|
|
|
|
+ item.sortable ? ['ascending', 'descending', null] : []
|
|
|
|
+ "
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
{{
|
|
{{
|
|
- item.type == "number"
|
|
|
|
|
|
+ item.type == 'number'
|
|
? formatter(scope.row[item.key])
|
|
? formatter(scope.row[item.key])
|
|
: scope.row[item.key]
|
|
: scope.row[item.key]
|
|
}}
|
|
}}
|
|
@@ -124,11 +131,13 @@
|
|
:prop="item.key"
|
|
:prop="item.key"
|
|
:label="item.label"
|
|
:label="item.label"
|
|
:sortable="item.sortable"
|
|
:sortable="item.sortable"
|
|
- :sort-orders="item.sortable ? ['ascending','descending', null] : []"
|
|
|
|
|
|
+ :sort-orders="
|
|
|
|
+ item.sortable ? ['ascending', 'descending', null] : []
|
|
|
|
+ "
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
{{
|
|
{{
|
|
- item.type == "number"
|
|
|
|
|
|
+ item.type == 'number'
|
|
? formatter(scope.row[item.key])
|
|
? formatter(scope.row[item.key])
|
|
: scope.row[item.key]
|
|
: scope.row[item.key]
|
|
}}
|
|
}}
|
|
@@ -153,75 +162,90 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
// @ is an alias to /src
|
|
// @ is an alias to /src
|
|
-const ElLoading = require("element-plus/lib/el-loading/index");
|
|
|
|
-import "element-plus/lib/theme-chalk/el-loading.css";
|
|
|
|
|
|
+const ElLoading = require('element-plus/lib/el-loading/index');
|
|
|
|
+import 'element-plus/lib/theme-chalk/el-loading.css';
|
|
|
|
|
|
-import { platformList, platformlistData, platform } from "@/api/index";
|
|
|
|
|
|
+import {
|
|
|
|
+ platformList,
|
|
|
|
+ platformlistData,
|
|
|
|
+ platform,
|
|
|
|
+ selectColumns,
|
|
|
|
+} from '@/api/index';
|
|
|
|
|
|
-import { formatter } from "@/utils/tool";
|
|
|
|
-import config from "@/config/index";
|
|
|
|
|
|
+import { formatter } from '@/utils/tool';
|
|
|
|
+import config from '@/config/index';
|
|
let tableDataListOri = [];
|
|
let tableDataListOri = [];
|
|
let sortLib = null;
|
|
let sortLib = null;
|
|
let sort = null;
|
|
let sort = null;
|
|
export default {
|
|
export default {
|
|
- name: "RealData",
|
|
|
|
|
|
+ name: 'RealData',
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
btnGroup: {
|
|
btnGroup: {
|
|
微信: {
|
|
微信: {
|
|
- color: "#1cc393",
|
|
|
|
- class: "weixin",
|
|
|
|
|
|
+ color: '#1cc393',
|
|
|
|
+ class: 'weixin',
|
|
},
|
|
},
|
|
微博: {
|
|
微博: {
|
|
- color: "#ffb712",
|
|
|
|
- class: "weibo",
|
|
|
|
|
|
+ color: '#ffb712',
|
|
|
|
+ class: 'weibo',
|
|
},
|
|
},
|
|
快手: {
|
|
快手: {
|
|
- color: "#ffb712",
|
|
|
|
- class: "kuaishou",
|
|
|
|
|
|
+ color: '#ffb712',
|
|
|
|
+ class: 'kuaishou',
|
|
},
|
|
},
|
|
抖音: {
|
|
抖音: {
|
|
- color: "#170b1a",
|
|
|
|
- class: "douyin",
|
|
|
|
|
|
+ color: '#170b1a',
|
|
|
|
+ class: 'douyin',
|
|
},
|
|
},
|
|
头条: {
|
|
头条: {
|
|
- color: "#de0517",
|
|
|
|
- class: "toutiao",
|
|
|
|
|
|
+ color: '#de0517',
|
|
|
|
+ class: 'toutiao',
|
|
},
|
|
},
|
|
B站: {
|
|
B站: {
|
|
- color: "#ffb712",
|
|
|
|
- class: "bzhan",
|
|
|
|
|
|
+ color: '#ffb712',
|
|
|
|
+ class: 'bzhan',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
page: 0,
|
|
page: 0,
|
|
pagesize: 20,
|
|
pagesize: 20,
|
|
total: 0,
|
|
total: 0,
|
|
load: false,
|
|
load: false,
|
|
- activeTab: "agg",
|
|
|
|
|
|
+ activeTab: 'agg',
|
|
form: {
|
|
form: {
|
|
- platform: "",
|
|
|
|
|
|
+ platform: '',
|
|
dt: [],
|
|
dt: [],
|
|
- match: "",
|
|
|
|
|
|
+ match: '',
|
|
|
|
+ kwName: '',
|
|
},
|
|
},
|
|
- formRael: { platform: "", dt: [] },
|
|
|
|
|
|
+ formRael: { platform: '', dt: [] },
|
|
tableData: [],
|
|
tableData: [],
|
|
pListData: [],
|
|
pListData: [],
|
|
|
|
+ selectColumns: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- platformList("?kh=1").then(res => {
|
|
|
|
- const first = res[0] || { platform: "", dt: "" };
|
|
|
|
- this.form = {
|
|
|
|
- dt: [first.dt, first.dt],
|
|
|
|
- platform: first.platform,
|
|
|
|
- };
|
|
|
|
|
|
+ platformList('?kh=1').then(res => {
|
|
|
|
+ const first = res[0] || { platform: '', dt: '' };
|
|
|
|
+ this.form.dt = [first.dt, first.dt];
|
|
|
|
+ this.form.platform = first.platform;
|
|
this.formRael = {
|
|
this.formRael = {
|
|
dt: [first.dt, first.dt],
|
|
dt: [first.dt, first.dt],
|
|
- platform: first.platform || "",
|
|
|
|
|
|
+ platform: first.platform || '',
|
|
};
|
|
};
|
|
this.pListData = res || [];
|
|
this.pListData = res || [];
|
|
this.onSubmit();
|
|
this.onSubmit();
|
|
});
|
|
});
|
|
|
|
+ selectColumns().then(r => {
|
|
|
|
+ const li = r || [];
|
|
|
|
+ for (let i = 0; i < li.length; i++) {
|
|
|
|
+ const item = li[i];
|
|
|
|
+ if (item.default != '1') continue;
|
|
|
|
+ this.form.kwName = item.name;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.selectColumns = li;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
agg() {
|
|
agg() {
|
|
@@ -273,9 +297,9 @@ export default {
|
|
'/new-media/export?start=' +
|
|
'/new-media/export?start=' +
|
|
[startd.year, startd.month, startd.day].join('-') +
|
|
[startd.year, startd.month, startd.day].join('-') +
|
|
'&end=' +
|
|
'&end=' +
|
|
- [starte.year, starte.month, starte.day].join('-') +
|
|
|
|
|
|
+ [starte.year, starte.month, starte.day].join('-') +
|
|
'&kh=1';
|
|
'&kh=1';
|
|
- if (this.formRael.sort) url += "&sort=" + this.formRael.sort;
|
|
|
|
|
|
+ if (this.formRael.sort) url += '&sort=' + this.formRael.sort;
|
|
if (this.formRael.match) url += '&match=' + this.formRael.match;
|
|
if (this.formRael.match) url += '&match=' + this.formRael.match;
|
|
window.open(url);
|
|
window.open(url);
|
|
},
|
|
},
|
|
@@ -323,11 +347,11 @@ export default {
|
|
let h = D.getHours();
|
|
let h = D.getHours();
|
|
let M = D.getMinutes();
|
|
let M = D.getMinutes();
|
|
let s = D.getSeconds();
|
|
let s = D.getSeconds();
|
|
- m > 9 ? m : (m = "0" + m);
|
|
|
|
- d > 9 ? d : (d = "0" + d);
|
|
|
|
- h > 9 ? h : (h = "0" + h);
|
|
|
|
- M > 9 ? M : (M = "0" + M);
|
|
|
|
- s > 9 ? s : (s = "0" + s);
|
|
|
|
|
|
+ m > 9 ? m : (m = '0' + m);
|
|
|
|
+ d > 9 ? d : (d = '0' + d);
|
|
|
|
+ h > 9 ? h : (h = '0' + h);
|
|
|
|
+ M > 9 ? M : (M = '0' + M);
|
|
|
|
+ s > 9 ? s : (s = '0' + s);
|
|
return {
|
|
return {
|
|
year: D.getFullYear(),
|
|
year: D.getFullYear(),
|
|
month: m,
|
|
month: m,
|
|
@@ -343,12 +367,13 @@ export default {
|
|
const p = {
|
|
const p = {
|
|
platform: this.form.platform || this.pListData[0],
|
|
platform: this.form.platform || this.pListData[0],
|
|
start: startd
|
|
start: startd
|
|
- ? [startd.year, startd.month, startd.day].join("-")
|
|
|
|
|
|
+ ? [startd.year, startd.month, startd.day].join('-')
|
|
: undefined,
|
|
: undefined,
|
|
end: starte
|
|
end: starte
|
|
- ? [starte.year, starte.month, starte.day].join("-")
|
|
|
|
|
|
+ ? [starte.year, starte.month, starte.day].join('-')
|
|
: undefined,
|
|
: undefined,
|
|
match: this.form.match,
|
|
match: this.form.match,
|
|
|
|
+ kwName: this.form.kwName,
|
|
};
|
|
};
|
|
sort && (p.sort = sort);
|
|
sort && (p.sort = sort);
|
|
const sortLibType = {
|
|
const sortLibType = {
|