|
@@ -1,4 +1,23 @@
|
|
|
<template>
|
|
|
+ <div style="background-color: white;margin-top: 15px;margin-bottom: 15px;height: 50px">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6">
|
|
|
+ <div style="margin-left: 30px">
|
|
|
+ <el-statistic title="本日浏览量" :value="statistic.today" />
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <div style="margin-left: 30px">
|
|
|
+ <el-statistic title="本周浏览量" :value="statistic.week" />
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <div style="margin-left: 30px">
|
|
|
+ <el-statistic title="本月浏览量" :value="statistic.month" />
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
<div class="carousel">
|
|
|
<!-- <Banner /> -->
|
|
|
<div class="content">
|
|
@@ -75,6 +94,13 @@ const sourceList = ref({
|
|
|
});
|
|
|
let dialogVisible = ref(false);
|
|
|
let modalType = ref("add");
|
|
|
+
|
|
|
+const statistic = ref({
|
|
|
+ today: 1,
|
|
|
+ week: 2,
|
|
|
+ month: 3,
|
|
|
+});
|
|
|
+
|
|
|
let rules = ref({
|
|
|
modules: [{ required: true, message: "请选择所属模块" }],
|
|
|
title: [{ required: true, message: "请输入标题" }],
|
|
@@ -245,6 +271,15 @@ const submitSearch = () => {
|
|
|
};
|
|
|
|
|
|
|
|
|
+
|
|
|
+const getStatistic = async (req) => {
|
|
|
+ proxy.post("/browsingHistory/getStatistic", {}).then((message) => {
|
|
|
+ console.log(message);
|
|
|
+ statistic.value = message.today;
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+getStatistic();
|
|
|
getList();
|
|
|
</script>
|
|
|
|
|
@@ -260,4 +295,10 @@ getList();
|
|
|
text-align: center;
|
|
|
border: 1px dashed var(--el-border-color);
|
|
|
}
|
|
|
+
|
|
|
+.like {
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 25px;
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
</style>
|