|
@@ -1,5 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <div class="Content">
|
|
|
|
|
|
+ <div class="Search">
|
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
|
<el-breadcrumb-item>新媒体</el-breadcrumb-item>
|
|
<el-breadcrumb-item>新媒体</el-breadcrumb-item>
|
|
<el-breadcrumb-item>应用分析</el-breadcrumb-item>
|
|
<el-breadcrumb-item>应用分析</el-breadcrumb-item>
|
|
@@ -62,23 +62,6 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="内容类型">
|
|
|
|
- <el-select
|
|
|
|
- collapse-tags
|
|
|
|
- clearable
|
|
|
|
- v-model="form.content"
|
|
|
|
- placeholder="请选择内容"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in content"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- :disabled="item.disabled"
|
|
|
|
- >
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item style="float: right">
|
|
<el-form-item style="float: right">
|
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -87,7 +70,7 @@
|
|
<br />
|
|
<br />
|
|
<el-card class="box-card">
|
|
<el-card class="box-card">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
- <el-col :span="6" v-for="(v, i) in top" :key="i + v.name">
|
|
|
|
|
|
+ <el-col :span="8" v-for="(v, i) in top" :key="i + v.name">
|
|
<div class="libTitle" v-text="v.name"></div>
|
|
<div class="libTitle" v-text="v.name"></div>
|
|
<el-table
|
|
<el-table
|
|
:data="v.list || []"
|
|
:data="v.list || []"
|
|
@@ -98,17 +81,17 @@
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="title"
|
|
|
|
|
|
+ prop="keyWord"
|
|
header-align="center"
|
|
header-align="center"
|
|
align="center"
|
|
align="center"
|
|
- label="标题"
|
|
|
|
|
|
+ label="关键词"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
/>
|
|
/>
|
|
<el-table-column label="次数" header-align="center" align="center">
|
|
<el-table-column label="次数" header-align="center" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<countTo
|
|
<countTo
|
|
:startVal="0"
|
|
:startVal="0"
|
|
- :endVal="scope.row[v.target] || 0"
|
|
|
|
|
|
+ :endVal="scope.row.searchTimes || 0"
|
|
:duration="100"
|
|
:duration="100"
|
|
></countTo>
|
|
></countTo>
|
|
</template>
|
|
</template>
|
|
@@ -118,8 +101,7 @@
|
|
</el-row>
|
|
</el-row>
|
|
<br />
|
|
<br />
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :span="8">
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ <el-col :span="8"> </el-col>
|
|
<el-col :span="16">
|
|
<el-col :span="16">
|
|
<el-button
|
|
<el-button
|
|
size="small"
|
|
size="small"
|
|
@@ -136,33 +118,20 @@
|
|
<el-table
|
|
<el-table
|
|
:data="table.records || []"
|
|
:data="table.records || []"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
- @sort-change="tableChange"
|
|
|
|
:header-cell-style="{
|
|
:header-cell-style="{
|
|
backgroundColor: '#f4f5f7',
|
|
backgroundColor: '#f4f5f7',
|
|
color: '#606266',
|
|
color: '#606266',
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="contentId"
|
|
|
|
|
|
+ prop="keyWord"
|
|
header-align="center"
|
|
header-align="center"
|
|
align="center"
|
|
align="center"
|
|
- label="内容ID"
|
|
|
|
|
|
+ label="搜索关键词"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <span v-text="scope.row.contentId || '-'"></span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="title"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- width="300"
|
|
|
|
- label="标题"
|
|
|
|
- show-overflow-tooltip
|
|
|
|
- >
|
|
|
|
- <template #default="scope">
|
|
|
|
- <span v-text="scope.row.title || '-'"></span>
|
|
|
|
|
|
+ <span v-text="scope.row.keyWord || '-'"></span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -176,104 +145,54 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="publishTime"
|
|
|
|
|
|
+ prop="classify"
|
|
header-align="center"
|
|
header-align="center"
|
|
align="center"
|
|
align="center"
|
|
- label="发布时间"
|
|
|
|
|
|
+ label="所属分类"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <span v-text="scope.row.publishTime || '-'"></span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="平均阅读时长"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- sortable
|
|
|
|
- :sort-orders="['descending', null]"
|
|
|
|
- prop="cduration"
|
|
|
|
- >
|
|
|
|
- <template #default="scope">
|
|
|
|
- <span v-text="timeFormat(scope.row.cduration)"></span>
|
|
|
|
|
|
+ <span v-text="scope.row.classify || '-'"></span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="阅读次数"
|
|
|
|
|
|
+ label="搜索次数"
|
|
header-align="center"
|
|
header-align="center"
|
|
align="center"
|
|
align="center"
|
|
- sortable
|
|
|
|
- :sort-orders="['descending', null]"
|
|
|
|
- prop="cpv"
|
|
|
|
|
|
+ prop="searchTimes"
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<countTo
|
|
<countTo
|
|
- :startVal="0"
|
|
|
|
- :endVal="scope.row.cpv || 0"
|
|
|
|
- :duration="100"
|
|
|
|
|
|
+ :startVal="scope.row.searchTimes"
|
|
|
|
+ :endVal="scope.row.searchTimes"
|
|
|
|
+ :duration="1"
|
|
></countTo>
|
|
></countTo>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="点赞次数"
|
|
|
|
|
|
+ label="结果列表点击次数"
|
|
header-align="center"
|
|
header-align="center"
|
|
align="center"
|
|
align="center"
|
|
- sortable
|
|
|
|
- :sort-orders="['descending', null]"
|
|
|
|
- prop="csupport"
|
|
|
|
|
|
+ prop="clickTimes"
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<countTo
|
|
<countTo
|
|
- :startVal="0"
|
|
|
|
- :endVal="scope.row.csupport || 0"
|
|
|
|
- :duration="100"
|
|
|
|
|
|
+ :startVal="scope.row.clickTimes"
|
|
|
|
+ :endVal="scope.row.clickTimes"
|
|
|
|
+ :duration="1"
|
|
></countTo>
|
|
></countTo>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="收藏次数"
|
|
|
|
|
|
+ label="点击用户数"
|
|
header-align="center"
|
|
header-align="center"
|
|
align="center"
|
|
align="center"
|
|
- sortable
|
|
|
|
- :sort-orders="['descending', null]"
|
|
|
|
- prop="ccollect"
|
|
|
|
|
|
+ prop="clickUser"
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<countTo
|
|
<countTo
|
|
- :startVal="0"
|
|
|
|
- :endVal="scope.row.ccollect || 0"
|
|
|
|
- :duration="100"
|
|
|
|
- ></countTo>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="分享次数"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- sortable
|
|
|
|
- :sort-orders="['descending', null]"
|
|
|
|
- prop="cshare"
|
|
|
|
- >
|
|
|
|
- <template #default="scope">
|
|
|
|
- <countTo
|
|
|
|
- :startVal="0"
|
|
|
|
- :endVal="scope.row.cshare || 0"
|
|
|
|
- :duration="100"
|
|
|
|
- ></countTo>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- label="观看用户数"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- sortable
|
|
|
|
- :sort-orders="['descending', null]"
|
|
|
|
- prop="cuser"
|
|
|
|
- >
|
|
|
|
- <template #default="scope">
|
|
|
|
- <countTo
|
|
|
|
- :startVal="0"
|
|
|
|
- :endVal="scope.row.cuser || 0"
|
|
|
|
|
|
+ :startVal="scope.row.clickUser"
|
|
|
|
+ :endVal="scope.row.clickUser"
|
|
:duration="100"
|
|
:duration="100"
|
|
></countTo>
|
|
></countTo>
|
|
</template>
|
|
</template>
|
|
@@ -297,15 +216,15 @@ import {
|
|
getRule,
|
|
getRule,
|
|
getAppList,
|
|
getAppList,
|
|
getSearchData,
|
|
getSearchData,
|
|
- getContentTop10,
|
|
|
|
- getContentPage,
|
|
|
|
|
|
+ getSearchPage,
|
|
|
|
+ getSearchTop10,
|
|
} from "@/api/index";
|
|
} from "@/api/index";
|
|
|
|
|
|
import countTo from "@/components/counto/vue-countTo.vue";
|
|
import countTo from "@/components/counto/vue-countTo.vue";
|
|
|
|
|
|
import config from "@/config/index";
|
|
import config from "@/config/index";
|
|
export default {
|
|
export default {
|
|
- name: "Content",
|
|
|
|
|
|
+ name: "Search",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
lastParams: {},
|
|
lastParams: {},
|
|
@@ -314,17 +233,15 @@ export default {
|
|
app: "",
|
|
app: "",
|
|
version: [],
|
|
version: [],
|
|
date: [],
|
|
date: [],
|
|
- content: "",
|
|
|
|
},
|
|
},
|
|
cycle: [],
|
|
cycle: [],
|
|
showList: [],
|
|
showList: [],
|
|
version: [],
|
|
version: [],
|
|
- content: [],
|
|
|
|
top: [],
|
|
top: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
- const { source, appV, contentV, appli, appVLi, contentli } =
|
|
|
|
|
|
+ const { source, appV, appli, appVLi } =
|
|
await this.getAppListFunc();
|
|
await this.getAppListFunc();
|
|
const keys = {
|
|
const keys = {
|
|
value: "mname",
|
|
value: "mname",
|
|
@@ -332,12 +249,10 @@ export default {
|
|
};
|
|
};
|
|
this.cycle = this.verifyList(appli, source, keys, false);
|
|
this.cycle = this.verifyList(appli, source, keys, false);
|
|
this.version = this.verifyList(appVLi, appV, keys, true);
|
|
this.version = this.verifyList(appVLi, appV, keys, true);
|
|
- this.content = this.verifyList(contentli, contentV, keys, true);
|
|
|
|
this.form = {
|
|
this.form = {
|
|
// app: (this.cycle[0] || { value: "" }).value,
|
|
// app: (this.cycle[0] || { value: "" }).value,
|
|
app: "起点新闻",
|
|
app: "起点新闻",
|
|
version: [(this.version[0] || { value: "" }).value],
|
|
version: [(this.version[0] || { value: "" }).value],
|
|
- content: -1,
|
|
|
|
date: [new Date(Date.now() - 604800000), new Date(Date.now() - 86400000)],
|
|
date: [new Date(Date.now() - 604800000), new Date(Date.now() - 86400000)],
|
|
page: 1,
|
|
page: 1,
|
|
size: 20,
|
|
size: 20,
|
|
@@ -347,13 +262,6 @@ export default {
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
- tableChange(e) {
|
|
|
|
- this.form.page = 1;
|
|
|
|
- this.form.sortBy = e.column ? e.column.property : "";
|
|
|
|
- this.lastParams.sortBy = e.column ? e.column.property : "";
|
|
|
|
- this.lastParams.page = 1;
|
|
|
|
- getContentPage(this.lastParams).then(r => (this.table = r || {}));
|
|
|
|
- },
|
|
|
|
verifyList(list, verify, obj, more) {
|
|
verifyList(list, verify, obj, more) {
|
|
if (!obj) return;
|
|
if (!obj) return;
|
|
let li = list || [];
|
|
let li = list || [];
|
|
@@ -379,31 +287,26 @@ export default {
|
|
start: this.FormData(this.form.date[0]),
|
|
start: this.FormData(this.form.date[0]),
|
|
end: this.FormData(this.form.date[1]),
|
|
end: this.FormData(this.form.date[1]),
|
|
version: this.form.version == -1 ? undefined : this.form.version,
|
|
version: this.form.version == -1 ? undefined : this.form.version,
|
|
- contentType: this.form.content == -1 ? undefined : this.form.content,
|
|
|
|
page: this.form.page,
|
|
page: this.form.page,
|
|
pageSize: this.form.size,
|
|
pageSize: this.form.size,
|
|
sortBy: this.form.sortBy,
|
|
sortBy: this.form.sortBy,
|
|
};
|
|
};
|
|
- getContentPage(this.lastParams).then(r => (this.table = r || {}));
|
|
|
|
- getContentTop10({
|
|
|
|
|
|
+ getSearchPage(this.lastParams).then(r => (this.table = r || {}));
|
|
|
|
+ getSearchTop10({
|
|
app: this.form.app,
|
|
app: this.form.app,
|
|
start: this.FormData(this.form.date[0]),
|
|
start: this.FormData(this.form.date[0]),
|
|
end: this.FormData(this.form.date[1]),
|
|
end: this.FormData(this.form.date[1]),
|
|
version: this.form.version == -1 ? undefined : this.form.version,
|
|
version: this.form.version == -1 ? undefined : this.form.version,
|
|
- contentType: this.form.content == -1 ? undefined : this.form.content,
|
|
|
|
- })
|
|
|
|
- .then(r => {
|
|
|
|
- this.top = r || [];
|
|
|
|
- });
|
|
|
|
|
|
+ }).then(r => {
|
|
|
|
+ this.top = r || [];
|
|
|
|
+ });
|
|
},
|
|
},
|
|
async getAppListFunc() {
|
|
async getAppListFunc() {
|
|
- const { r, li, appVersion, contentList } = await this.getAppListOri();
|
|
|
|
|
|
+ const { r, li, appVersion } = await this.getAppListOri();
|
|
let source = { length: 0 },
|
|
let source = { length: 0 },
|
|
appli = [];
|
|
appli = [];
|
|
let appV = { length: 0 },
|
|
let appV = { length: 0 },
|
|
appVLi = [];
|
|
appVLi = [];
|
|
- let contentV = { length: 0 },
|
|
|
|
- contentli = [];
|
|
|
|
let prvList = r.output.data.prvRolectrl || [];
|
|
let prvList = r.output.data.prvRolectrl || [];
|
|
for (let i = 0; i < prvList.length; i++) {
|
|
for (let i = 0; i < prvList.length; i++) {
|
|
const v = prvList[i];
|
|
const v = prvList[i];
|
|
@@ -411,19 +314,14 @@ export default {
|
|
(source[v.detid] = true), (source.length = source.length + 1);
|
|
(source[v.detid] = true), (source.length = source.length + 1);
|
|
if (v.controlid == "APP_VERSION")
|
|
if (v.controlid == "APP_VERSION")
|
|
(appV[v.detid] = true), (appV.length = appV.length + 1);
|
|
(appV[v.detid] = true), (appV.length = appV.length + 1);
|
|
- if (v.controlid == "content_TYPE")
|
|
|
|
- (contentV[v.detid] = true), (contentV.length = contentV.length + 1);
|
|
|
|
}
|
|
}
|
|
if (li.status === "0") appli = li.output.data || [];
|
|
if (li.status === "0") appli = li.output.data || [];
|
|
if (appVersion.length) appVLi = appVersion || [];
|
|
if (appVersion.length) appVLi = appVersion || [];
|
|
- if (contentList.length) contentli = contentList || [];
|
|
|
|
return {
|
|
return {
|
|
source,
|
|
source,
|
|
appV,
|
|
appV,
|
|
appli,
|
|
appli,
|
|
- contentV,
|
|
|
|
appVLi,
|
|
appVLi,
|
|
- contentli,
|
|
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async getAppListOri() {
|
|
async getAppListOri() {
|
|
@@ -450,16 +348,7 @@ export default {
|
|
gcode: "APP_VERSION",
|
|
gcode: "APP_VERSION",
|
|
source: defaultAppName,
|
|
source: defaultAppName,
|
|
});
|
|
});
|
|
- // 端列表
|
|
|
|
- let contentList = await getAppList({
|
|
|
|
- exportMark: "0",
|
|
|
|
- gcode: "CONTENT_TYPE",
|
|
|
|
- pageid: 1,
|
|
|
|
- pagesize: 1000,
|
|
|
|
- });
|
|
|
|
- contentList =
|
|
|
|
- contentList.status == "0" ? contentList.output.data || [] : [];
|
|
|
|
- return { r, li, appVersion, contentList };
|
|
|
|
|
|
+ return { r, li, appVersion };
|
|
},
|
|
},
|
|
disabledDate(time) {
|
|
disabledDate(time) {
|
|
const first = new Date("2021-06-21 00:00:00");
|
|
const first = new Date("2021-06-21 00:00:00");
|
|
@@ -556,11 +445,15 @@ export default {
|
|
const app = this.lastParams.app || this.form.app;
|
|
const app = this.lastParams.app || this.form.app;
|
|
const version =
|
|
const version =
|
|
this.form.version == -1 ? undefined : this.form.version.join(",");
|
|
this.form.version == -1 ? undefined : this.form.version.join(",");
|
|
- const contentType = this.lastParams.contentType || this.form.contentType;
|
|
|
|
let url =
|
|
let url =
|
|
- config.base.leverAudience + "/cxzx-program/new-media/content/export?start=" + S + "&end=" + E +"&app=" + app;
|
|
|
|
|
|
+ config.base.leverAudience +
|
|
|
|
+ "/cxzx-program/new-media/search/export?start=" +
|
|
|
|
+ S +
|
|
|
|
+ "&end=" +
|
|
|
|
+ E +
|
|
|
|
+ "&app=" +
|
|
|
|
+ app;
|
|
version && (url += "&version=" + version);
|
|
version && (url += "&version=" + version);
|
|
- contentType && (url += "&contentType=" + contentType);
|
|
|
|
window.open(url);
|
|
window.open(url);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -571,7 +464,7 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style>
|
|
<style>
|
|
-.Content {
|
|
|
|
|
|
+.Search {
|
|
margin: 10px 15px;
|
|
margin: 10px 15px;
|
|
}
|
|
}
|
|
.libTitle {
|
|
.libTitle {
|