2 次代碼提交 4e63169467 ... 8d356d551d

作者 SHA1 備註 提交日期
  openHj 8d356d551d Merge remote-tracking branch 'origin/master' 10 月之前
  openHj 5cda640a7f 统计 10 月之前
共有 1 個文件被更改,包括 41 次插入0 次删除
  1. 41 0
      src/views/XMHJC/browsing/index.vue

+ 41 - 0
src/views/XMHJC/browsing/index.vue

@@ -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>