shaogen1995 2 tahun lalu
induk
melakukan
100ad8c1c5

File diff ditekan karena terlalu besar
+ 198 - 214
houtai/src/pages/A1Hot/HotMap/index.tsx


+ 156 - 137
houtai/src/pages/A1Hot/index.tsx

@@ -14,6 +14,16 @@ import { PieChart } from "echarts/charts";
 import { LabelLayout } from "echarts/features";
 import HotMap from "./HotMap";
 import classNames from "classnames";
+import {
+  getHotInfo1API,
+  getHotInfo2API,
+  getHotInfo3API,
+  getHotInfo4API,
+  getHotInfo5API,
+  getHotInfo6API,
+} from "@/store/action/A1Hot";
+import { HotInfo1Type, HotInfo3Type, HotInfo4Type } from "@/types";
+import { hotChangeObj } from "@/utils/changeData";
 
 echarts.use([
   GridComponent,
@@ -27,6 +37,25 @@ echarts.use([
 ]);
 
 function Hot() {
+  // 数量总计
+  const [allNum1, setAllNum1] = useState(0);
+  const [allNum2, setAllNum2] = useState(0);
+  const [allNum3, setAllNum3] = useState(0);
+  const [allNum4, setAllNum4] = useState(0);
+  const [allNum5, setAllNum5] = useState(0);
+
+  // 日期下拉框
+  const [select1, setSelect1] = useState<1 | 7 | 30 | "">(7);
+  // 藏品排行下拉框
+  const [select2, setSelect2] = useState("visit");
+  // 场景排行下拉框
+  const [select3, setSelect3] = useState("visit");
+  // 馆藏统计下拉框
+  const [select4, setSelect4] = useState("texture");
+
+  const [likeData, setLikeData] = useState<HotInfo4Type[]>([]);
+  const [likeData2, setLikeData2] = useState<HotInfo4Type[]>([]);
+
   // 获取echarts图表的函数
 
   // 折线图
@@ -82,13 +111,13 @@ function Hot() {
     []
   );
 
-  // 饼图
+  // 饼图集合
   const echartsFu2 = useCallback(
     (dom: any, data: { value: number; name: string }[], obj: any) => {
       let chartDom2: any = document.querySelector(dom);
       let myChart2 = echarts.init(chartDom2);
       let option2 = {
-        color:['#11A480','#00BBF6','#F97C7C','#93876D','#ECDFBF'],
+        color: ["#11A480", "#00BBF6", "#F97C7C", "#93876D", "#ECDFBF"],
         tooltip: {
           trigger: "item",
         },
@@ -142,143 +171,132 @@ function Hot() {
     []
   );
 
-  const getInfoFu = useCallback(() => {
-    // 第一个折线 echarts----------------------------
-    const data1_1 = [
-      "2023-2-01",
-      "2023-2-02",
-      "2023-2-03",
-      "2023-2-04",
-      "2023-2-05",
-      "2023-2-06",
-      "2023-2-07",
-      "2023-2-08",
-      "2023-2-09",
-      "2023-2-10",
-      "2023-2-11",
-      "2023-2-12",
-      "2023-2-13",
-      "2023-2-14",
-    ];
-    const data1_2 = [0, 5, 6, 8, 11, 0, 3, 1, 5, 6, 1, 7, 5, 2];
-    echartsFu1("#echarts1", data1_1, data1_2, ["#11A480"]);
-
-    // 第二个折线 echarts----------------------------
-    const data2_1 = [
-      "2023-2-08",
-      "2023-2-09",
-      "2023-2-10",
-      "2023-2-11",
-      "2023-2-12",
-      "2023-2-13",
-      "2023-2-14",
-    ];
-    const data2_2 = [5, 6, 8, 11, 0, 5, 2];
-    echartsFu1("#echarts2", data2_1, data2_2, ["#00BBF6"]);
-
-    // 第三个折线 echarts----------------------------
-    const data3_1 = [
-      "2023-2-08",
-      "2023-2-09",
-      "2023-2-10",
-      "2023-2-11",
-      "2023-2-12",
-      "2023-2-13",
-      "2023-2-14",
-    ];
-    const data3_2 = [0, 5, 6, 8, 11, 20, 1];
-    echartsFu1("#echarts3", data3_1, data3_2, ["#F97C7C"]);
-
-    // 第一个饼图
-    const data4 = [
-      {
-        icon: "circle",
-        value: 10,
-        name: "拖拉机",
-      },
-      {
-        icon: "circle",
-        value: 1,
-        name: "火车",
-      },
-      {
-        icon: "circle",
-        value: 30,
-        name: "板车",
-      },
-    ];
-
-    // 第一个饼图
-    const data7 = [
-      {
-        icon: "circle",
-        value: 10,
-        name: "拖拉机",
-      },
-      {
-        icon: "circle",
-        value: 3,
-        name: "火车",
-      },
-      {
-        icon: "circle",
-        value: 30,
-        name: "板车",
-      },
-      {
+  // 第一个饼图--浏览总数
+  const echartsB1 = useCallback(async () => {
+    const res3 = await getHotInfo3API(select1);
+    const data3: HotInfo3Type[] = res3.data;
+    let allNum4 = 0;
+    const data4: any = [];
+    data3.forEach((v) => {
+      data4.push({
         icon: "circle",
-        value: 3,
-        name: "火车1",
-      },
-      {
-        icon: "circle",
-        value: 30,
-        name: "板车1",
-      },
-    ];
+        value: v.pcs,
+        name: hotChangeObj[v.groupKey],
+      });
+      allNum4 += v.pcs;
+    });
+    setAllNum4(allNum4);
     // 左边饼图配置文件
     const data4Obj = {
       legend: { left: "center", bottom: 20 },
       series: { center: ["50%", "35%"], radius: ["50%", "70%"] },
     };
+    echartsFu2("#echarts4", data4, data4Obj);
+  }, [echartsFu2, select1]);
+
+  // 藏品排行
+  const getlikeData1Fu = useCallback(async () => {
+    const res = await getHotInfo4API(select1, select2);
+    const data: HotInfo4Type[] = res.data;
+    setLikeData(data);
+  }, [select1, select2]);
+
+  // 场景排行
+  const getlikeData2Fu = useCallback(async () => {
+    const res = await getHotInfo5API(select1, select3);
+    const data: HotInfo4Type[] = res.data;
+    setLikeData2(data);
+  }, [select1, select3]);
+
+  // 馆藏统计---第二个饼图
+  const getGoodsAllFu = useCallback(async () => {
+    const res = await getHotInfo6API();
+    const data: any = res.data;
+    const data7: any = [];
+    setAllNum5(data.total);
+    for (const k in data) {
+      if (k === select4) {
+        data[k].forEach((v: any) => {
+          data7.push({ icon: "circle", value: v.pcs, name: v.type });
+        });
+      }
+    }
     // 右边饼图配置文件
     const data7Obj = {
       legend: { left: "center", bottom: 5 },
       series: { center: ["50%", "35%"], radius: ["40%", "60%"] },
     };
-    // echartsFu2("#echarts4", data4, data4Obj);
-    // echartsFu2("#echarts5", data4, data4Obj);
-    echartsFu2("#echarts4", data4, data4Obj);
     echartsFu2("#echarts7", data7, data7Obj);
-  }, [echartsFu1, echartsFu2]);
+  }, [echartsFu2, select4]);
 
+  // 关于浏览总数改变重新发请求拿数据
   useEffect(() => {
-    getInfoFu();
-  }, [getInfoFu]);
+    echartsB1();
+  }, [echartsB1]);
 
-  // 日期下拉框
-  const [select1, setSelect1] = useState<1 | 7 | 30 | "">(7);
-  // 藏品排行下拉框
-  const [select2, setSelect2] = useState(0);
-  // 场景排行下拉框
-  const [select3, setSelect3] = useState(0);
-  // 馆藏统计下拉框
-  const [select4, setSelect4] = useState(0);
+  // 关于藏品排行改变数据重新发请求拿数据
+  useEffect(() => {
+    getlikeData1Fu();
+  }, [getlikeData1Fu]);
 
-  const [likeData, setLikeData] = useState([
-    { name: "啊实打实大苏打", pcs: 10 },
-    {
-      name: "啊实打实大苏打啊实打实大苏打实打实啊实打实大苏打啊实打实大苏打实打实",
-      pcs: 10,
-    },
-    { name: "啊实打实大苏打", pcs: 10 },
-    { name: "啊实打实大苏打", pcs: 10 },
-    { name: "啊实打实大苏打", pcs: 10 },
-  ]);
+  // 关于场景排行改变数据重新发请求拿数据
+  useEffect(() => {
+    getlikeData2Fu();
+  }, [getlikeData2Fu]);
+
+  // 关于馆藏统计改变数据重新发请求拿数据
+  useEffect(() => {
+    getGoodsAllFu();
+  }, [getGoodsAllFu]);
+
+  const getInfoFu = useCallback(async () => {
+    // 第一个折线 echarts----------------------------
+    const res1 = await getHotInfo1API();
+    const data1: HotInfo1Type[] = res1.data.reverse();
+    let allNum1 = 0;
+    const data1_1: string[] = [];
+    const data1_2: number[] = [];
+    data1.forEach((v) => {
+      data1_1.push(v.today);
+      data1_2.push(v.pcsUser);
+      allNum1 += v.pcsUser;
+    });
+    setAllNum1(allNum1);
+    echartsFu1("#echarts1", data1_1, data1_2, ["#11A480"]);
+
+    // 第二、三个折线 echarts----------------------------
+    const res2 = await getHotInfo2API();
+    const data2: HotInfo1Type[] = res2.data.reverse();
+    let allNum2 = 0;
+    const data2_1: string[] = [];
+    const data2_2: number[] = [];
+
+    let allNum3 = 0;
+    const data3_1: string[] = [];
+    const data3_2: number[] = [];
+
+    data2.forEach((v) => {
+      data2_1.push(v.today);
+      data2_2.push(v.pcsWall);
+      allNum2 += v.pcsWall;
+
+      data3_1.push(v.today);
+      data3_2.push(v.pcsWearable);
+      allNum3 += v.pcsWearable;
+    });
+    setAllNum2(allNum2);
+    setAllNum3(allNum3);
+
+    echartsFu1("#echarts2", data2_1, data2_2, ["#00BBF6"]);
+    echartsFu1("#echarts3", data3_1, data3_2, ["#F97C7C"]);
+  }, [echartsFu1]);
+
+  useEffect(() => {
+    getInfoFu();
+  }, [getInfoFu]);
 
   return (
     <div className={styles.Hot}>
-
       <div className="pageTitlt">热度统计</div>
 
       <div className="hotMainBox">
@@ -288,7 +306,8 @@ function Hot() {
             {/* 线上访客盒子 */}
             <div className="topBoxL1">
               <div className="hotTit">
-                线上访客&nbsp;&nbsp;<span style={{ color: "#11A480" }}>58</span>
+                线上访客&nbsp;&nbsp;
+                <span style={{ color: "#11A480" }}>{allNum1}</span>
                 <Tooltip title="近14个自然日的访客数;一天内同一访客多次访问记为1">
                   <div className="inco">
                     <ExclamationCircleFilled />
@@ -304,7 +323,7 @@ function Hot() {
               <div className="topBoxL2L">
                 <div className="hotTit">
                   万物墙热度&nbsp;&nbsp;
-                  <span style={{ color: "#00BBF6" }}>264</span>
+                  <span style={{ color: "#00BBF6" }}>{allNum2}</span>
                   <Tooltip title="查看场景/文物/视频时,记为1点热度">
                     <div className="inco">
                       <ExclamationCircleFilled />
@@ -319,7 +338,7 @@ function Hot() {
               <div className="topBoxL2R">
                 <div className="hotTit">
                   穿戴设备热度&nbsp;&nbsp;
-                  <span style={{ color: "#F97C7C" }}>14</span>
+                  <span style={{ color: "#F97C7C" }}>{allNum3}</span>
                   <Tooltip title="穿戴设备每次启动,记为1点热度">
                     <div className="inco">
                       <ExclamationCircleFilled />
@@ -381,7 +400,7 @@ function Hot() {
                   <div className="echarts4Box">
                     <div className="echarts4BoxTxt">
                       <div>总数</div>
-                      <p>124</p>
+                      <p>{allNum4}</p>
                     </div>
                     <div id="echarts4"></div>
                   </div>
@@ -395,16 +414,16 @@ function Hot() {
                       style={{ width: 100 }}
                       onChange={(e) => setSelect2(e)}
                       options={[
-                        { value: 0, label: "按浏览" },
-                        { value: 1, label: "按点赞" },
-                        { value: 2, label: "按弹幕" },
+                        { value: "visit", label: "按浏览" },
+                        { value: "star", label: "按点赞" },
+                        { value: "barrage", label: "按弹幕" },
                       ]}
                     />
                   </div>
                   {likeData.length ? (
                     <div className="downBoxLMain2LRowBox">
                       {likeData.map((v, i) => (
-                        <div className="downBoxLMain2LRow" key={i}>
+                        <div className="downBoxLMain2LRow" key={v.name}>
                           <div className="downBoxLMain2LRow1" title={v.name}>
                             <div
                               className={classNames(
@@ -442,16 +461,16 @@ function Hot() {
                       style={{ width: 100 }}
                       onChange={(e) => setSelect3(e)}
                       options={[
-                        { value: 0, label: "按浏览" },
-                        { value: 1, label: "按弹幕" },
+                        { value: "visit", label: "按浏览" },
+                        { value: "star", label: "按点赞" },
                       ]}
                     />
                   </div>
 
-                  {likeData.length ? (
+                  {likeData2.length ? (
                     <div className="downBoxLMain2LRowBox">
-                      {likeData.map((v, i) => (
-                        <div className="downBoxLMain2LRow" key={i}>
+                      {likeData2.map((v, i) => (
+                        <div className="downBoxLMain2LRow" key={v.name}>
                           <div className="downBoxLMain2LRow1" title={v.name}>
                             <div
                               className={classNames(
@@ -494,9 +513,9 @@ function Hot() {
                 style={{ width: 100 }}
                 onChange={(e) => setSelect4(e)}
                 options={[
-                  { value: 0, label: "按类别" },
-                  { value: 1, label: "按年代" },
-                  { value: 2, label: "按级别" },
+                  { value: "texture", label: "按类别" },
+                  { value: "age", label: "按年代" },
+                  { value: "level", label: "按级别" },
                 ]}
               />
             </div>
@@ -504,7 +523,7 @@ function Hot() {
               <div id="echarts7"></div>
               <div className="downBoxRBoxTxt">
                 <div>总数</div>
-                <p>9</p>
+                <p>{allNum5}</p>
               </div>
             </div>
           </div>

+ 12 - 0
houtai/src/pages/B2Goods/GoodsBarrage/index.css

@@ -6,6 +6,18 @@
   padding-top: 15px;
   width: 100%;
 }
+.GoodsBarrage .main .rowTit {
+  margin-top: 5px;
+  position: relative;
+  opacity: 0;
+  transition: top 0.2s;
+  color: #ff4d4f;
+  top: -10px;
+}
+.GoodsBarrage .main .rowTitAc {
+  top: 0;
+  opacity: 1;
+}
 .GoodsBarrage .button {
   text-align: center;
 }

+ 16 - 1
houtai/src/pages/B2Goods/GoodsBarrage/index.less

@@ -7,8 +7,23 @@
     border-top: 1px solid #999999;
     padding-top: 15px;
     width: 100%;
+
+    .rowTit {
+      margin-top: 5px;
+      position: relative;
+      opacity: 0;
+      transition: top .2s;
+      color: #ff4d4f;
+      top: -10px;
+    }
+
+    .rowTitAc {
+      top: 0;
+      opacity: 1;
+    }
   }
-  .button{
+
+  .button {
     text-align: center;
   }
 }

+ 19 - 5
houtai/src/pages/B2Goods/GoodsBarrage/index.tsx

@@ -1,5 +1,6 @@
 import { Button, Modal, Popconfirm, Radio } from "antd";
-import React, { useState } from "react";
+import React, { useCallback, useState } from "react";
+import classNames from "classnames";
 import "./index.css";
 
 type Props = {
@@ -7,7 +8,17 @@ type Props = {
 };
 
 function GoodsBarrage({ closeMoalFu }: Props) {
-  const [value, setValue] = useState(1);
+  const [value, setValue] = useState(-1);
+
+  const [check, setCheck] = useState(false);
+
+  // 点击提交
+  const btnOk = useCallback(() => {
+    if (value === -1) {
+      setCheck(true);
+      return;
+    }
+  }, [value]);
 
   return (
     <Modal
@@ -21,15 +32,18 @@ function GoodsBarrage({ closeMoalFu }: Props) {
     >
       <div className="main">
         <div className="row">
-          <span></span>
           <Radio.Group onChange={(e) => setValue(e.target.value)} value={value}>
             <Radio value={1}>全部开启</Radio>
             <Radio value={2}>全部关闭</Radio>
           </Radio.Group>
         </div>
-        <br />
+        <div className={classNames("rowTit", check&&value===-1 ? "rowTitAc" : "")}>
+          请选择全部开启或关闭!
+        </div>
         <div className="button">
-          <Button type="primary">提交</Button>
+          <Button type="primary" onClick={btnOk}>
+            提交
+          </Button>
           &emsp;
           <Popconfirm
             title="放弃编辑后,信息将不会保存!"

+ 4 - 4
houtai/src/pages/B2Goods/index.tsx

@@ -407,9 +407,9 @@ function Goods() {
           <span>名称:</span>
           <Input
             key={inputKey}
-            maxLength={10}
+            maxLength={25}
             style={{ width: 150 }}
-            placeholder="请输入"
+            placeholder="请输入关键字"
             allowClear
             onChange={(e) => nameChange(e)}
           />
@@ -419,9 +419,9 @@ function Goods() {
           <span>登记编号:</span>
           <Input
             key={inputKey}
-            maxLength={20}
+            maxLength={25}
             style={{ width: 150 }}
-            placeholder="请输入"
+            placeholder="请输入关键字"
             allowClear
             onChange={(e) => numChange(e)}
           />

+ 21 - 3
houtai/src/pages/B4Barrage/index.module.scss

@@ -1,5 +1,23 @@
-.Barrage{
-  :global{
-    
+.Barrage {
+  :global {
+    .searchBox {
+      padding: 14px 15px 1px;
+      border-radius: 10px;
+      background-color: #fff;
+
+      .searchBoxSon1 {
+        display: flex;
+        flex-wrap: wrap;
+        margin-bottom: 14px;
+
+        .searchRow {
+          margin-right: 30px;
+        }
+        .searchBtn{
+          margin-left: 166px;
+        }
+      }
+
+    }
   }
 }

+ 244 - 5
houtai/src/pages/B4Barrage/index.tsx

@@ -1,12 +1,251 @@
-import React from "react";
+import { RootState } from "@/store";
+import { getBarrageListAPI } from "@/store/action/B4Barrage";
+import { Input, DatePicker, Select, Button } from "antd";
+import React, { useCallback, useEffect, useRef, useState } from "react";
+import { useDispatch, useSelector } from "react-redux";
 import styles from "./index.module.scss";
- function Barrage() {
-  
+const { RangePicker } = DatePicker;
+
+function Barrage() {
+  const dispatch = useDispatch();
+  const pageNumRef = useRef(1);
+  const pagePageRef = useRef(10);
+
+  // 从仓库获取表格列表信息
+  const tableInfo = useSelector(
+    (state: RootState) => state.barrageReducer.tableInfo
+  );
+
+  // 顶部筛选
+  const [tableSelect, setTableSelect] = useState({
+    name: "",
+    name2: "",
+    name3: "",
+    startTime: "",
+    endTime: "",
+    startTime2: "",
+    endTime2: "",
+    topic: -1,
+    display: -1,
+    pageSize: 10,
+    pageNum: 1,
+  });
+
+  // 封装发送请求的函数
+
+  const getList = useCallback(async () => {
+    const data = {
+      ...tableSelect,
+      topic: tableSelect.topic === -1 ? null : tableSelect.topic,
+      display: tableSelect.display === -1 ? null : tableSelect.display,
+      pageNum: pageNumRef.current,
+    };
+    dispatch(getBarrageListAPI(data));
+  }, [dispatch, tableSelect]);
+
+  // 当前页码统一
+  useEffect(() => {
+    pageNumRef.current = tableSelect.pageNum;
+    pagePageRef.current = tableSelect.pageSize;
+  }, [tableSelect.pageNum, tableSelect.pageSize]);
+
+  useEffect(() => {
+    getList();
+  }, [getList]);
+
+  // 弹幕/文物搜索的输入
+  const nameTime = useRef(-1);
+  const nameChange = useCallback(
+    (e: React.ChangeEvent<HTMLInputElement>) => {
+      clearTimeout(nameTime.current);
+      nameTime.current = window.setTimeout(() => {
+        setTableSelect({
+          ...tableSelect,
+          name: e.target.value,
+          pageNum: 1,
+        });
+      }, 500);
+    },
+    [tableSelect]
+  );
+
+  // 弹幕日期的改变
+  const barrageTimeChange = (date: any, dateString: any) => {
+    let startTime2 = "";
+    let endTime2 = "";
+    if (dateString[0] && dateString[1]) {
+      startTime2 = dateString[0] + " 00:00:00";
+      endTime2 = dateString[1] + " 23:59:59";
+    }
+    setTableSelect({ ...tableSelect, startTime2, endTime2, pageNum: 1 });
+  };
+
+  // 作者称呼的输入
+  const nameTime2 = useRef(-1);
+  const nameChange2 = useCallback(
+    (e: React.ChangeEvent<HTMLInputElement>) => {
+      clearTimeout(nameTime2.current);
+      nameTime2.current = window.setTimeout(() => {
+        setTableSelect({
+          ...tableSelect,
+          name2: e.target.value,
+          pageNum: 1,
+        });
+      }, 500);
+    },
+    [tableSelect]
+  );
+
+  // 审核人的输入
+  const nameTime3 = useRef(-1);
+  const nameChange3 = useCallback(
+    (e: React.ChangeEvent<HTMLInputElement>) => {
+      clearTimeout(nameTime3.current);
+      nameTime3.current = window.setTimeout(() => {
+        setTableSelect({
+          ...tableSelect,
+          name3: e.target.value,
+          pageNum: 1,
+        });
+      }, 500);
+    },
+    [tableSelect]
+  );
+
+  // 审核日期的改变
+  const timeChange = (date: any, dateString: any) => {
+    let startTime = "";
+    let endTime = "";
+    if (dateString[0] && dateString[1]) {
+      startTime = dateString[0] + " 00:00:00";
+      endTime = dateString[1] + " 23:59:59";
+    }
+    setTableSelect({ ...tableSelect, startTime, endTime, pageNum: 1 });
+  };
+
+  // 点击重置
+  const [inputKey, setInputKey] = useState(1);
+  const resetSelectFu = useCallback(() => {
+    // 把2个输入框和时间选择器清空
+    setInputKey(Date.now());
+    setTableSelect({
+      name: "",
+      name2: "",
+      name3: "",
+      startTime: "",
+      endTime: "",
+      startTime2: "",
+      endTime2: "",
+      topic: -1,
+      display: -1,
+      pageSize: 10,
+      pageNum: 1,
+    });
+  }, []);
+
   return (
     <div className={styles.Barrage}>
-      <h1>Barrage</h1>
+      <div className="pageTitlt">弹幕管理</div>
+      {/* 上面的搜索盒子 */}
+      <div className="searchBox">
+        <div className="searchBoxSon1">
+          <div className="searchRow">
+            <span>弹幕/文物搜索:</span>
+            <Input
+              key={inputKey}
+              maxLength={25}
+              style={{ width: 246 }}
+              placeholder="请输入关键字"
+              allowClear
+              onChange={(e) => nameChange(e)}
+            />
+          </div>
+
+          <div className="searchRow">
+            <span>弹幕日期:</span>
+            <RangePicker
+              style={{ width: 240 }}
+              key={inputKey}
+              onChange={barrageTimeChange}
+            />
+          </div>
+
+          <div className="searchRow">
+            <span>作者称呼:</span>
+            <Input
+              key={inputKey}
+              maxLength={10}
+              style={{ width: 150 }}
+              placeholder="请输入关键字"
+              allowClear
+              onChange={(e) => nameChange2(e)}
+            />
+          </div>
+
+          <div className="searchRow">
+            <span>审核人:</span>
+            <Input
+              key={inputKey}
+              maxLength={10}
+              style={{ width: 150 }}
+              placeholder="请输入关键字"
+              allowClear
+              onChange={(e) => nameChange3(e)}
+            />
+          </div>
+        </div>
+
+        <div className="searchBoxSon1">
+          <div className="searchRow">
+            <span>审核状态:</span>
+            <Select
+              placeholder="请选择"
+              style={{ width: 90 }}
+              value={tableSelect.topic}
+              onChange={(e) =>
+                setTableSelect({ ...tableSelect, topic: e, pageNum: 1 })
+              }
+              options={[
+                { value: -1, label: "全部" },
+                { value: 1, label: "待审核" },
+                { value: 2, label: "已审核" },
+              ]}
+            />
+          </div>
+          <div className="searchRow">
+            <span>采纳状态:</span>
+            <Select
+              placeholder="请选择"
+              style={{ width: 90 }}
+              value={tableSelect.display}
+              onChange={(e) =>
+                setTableSelect({ ...tableSelect, display: e, pageNum: 1 })
+              }
+              options={[
+                { value: -1, label: "全部" },
+                { value: 1, label: "采纳" },
+                { value: 2, label: "不采纳" },
+              ]}
+            />
+          </div>
+          <div className="searchRow">
+            <span>审核日期:</span>
+            <RangePicker
+              style={{ width: 240 }}
+              key={inputKey}
+              onChange={timeChange}
+            />
+          </div>
+
+          {/* 按钮 */}
+          <div className="searchBtn">
+            <Button onClick={resetSelectFu}>重置</Button>&emsp;
+            <Button>弹幕功能设置(当前:关闭)</Button>
+          </div>
+        </div>
+      </div>
     </div>
-  )
+  );
 }
 
 const MemoBarrage = React.memo(Barrage);

+ 54 - 0
houtai/src/store/action/A1Hot.ts

@@ -0,0 +1,54 @@
+import http from "@/utils/http";
+
+/**
+ * 线上访客
+ */
+export const getHotInfo1API = () => {
+  return http.get("cms/report/getUserHot");
+};
+
+/**
+ * 热度
+ */
+export const getHotInfo2API = () => {
+  return http.get("cms/report/getHot");
+};
+
+/**
+ * 浏览总数
+ */
+export const getHotInfo3API = (dayScope: 1 | 7 | 30 | "") => {
+  return http.get(`cms/report/getVisitTotal?dayScope=${dayScope}`);
+};
+
+/**
+ * 馆藏排行
+ */
+export const getHotInfo4API = (dayScope: 1 | 7 | 30 | "", type: string) => {
+  return http.get(
+    `cms/report/getGoodsRanking?dayScope=${dayScope}&type=${type}`
+  );
+};
+
+/**
+ * 场景排行
+ */
+export const getHotInfo5API = (dayScope: 1 | 7 | 30 | "", type: string) => {
+  return http.get(
+    `cms/report/getSceneRanking?dayScope=${dayScope}&type=${type}`
+  );
+};
+
+/**
+ * 馆藏统计
+ */
+export const getHotInfo6API = () => {
+  return http.get('cms/report/getGoodsTotal');
+};
+
+/**
+ * 访客来源
+ */
+export const getHotMapInfoAPI = () => {
+  return http.get('cms/report/getIpHot');
+};

+ 14 - 0
houtai/src/store/action/B4Barrage.ts

@@ -0,0 +1,14 @@
+import http from "@/utils/http";
+import { AppDispatch } from "..";
+/**
+ * 获取列表数据
+ */
+export const getBarrageListAPI = (data: any) => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post("cms/goods/pageList", data);
+    dispatch({
+      type: "barrage/getList",
+      payload: { list: res.data.records, total: res.data.total },
+    });
+  };
+};

+ 3 - 1
houtai/src/store/action/login.ts

@@ -32,7 +32,9 @@ export const getDictListAPI = () => {
       source: [{ label: "全部", value: "", type: "source" }],
     } as DictListTypeObj;
     list.forEach((v) => {
-      obj[v.type].push({ label: v.name, value: v.name, type: v.type });
+      if (v.type !== "province") {
+        obj[v.type].push({ label: v.name, value: v.name, type: v.type });
+      }
     });
 
     dispatch({ type: "login/getDictList", payload: obj });

+ 29 - 0
houtai/src/store/reducer/B4Barrage.ts

@@ -0,0 +1,29 @@
+
+// 初始化状态
+const initState = {
+  // 列表数据
+  tableInfo: {
+    list: [] as any[],
+    total: 0,
+  },
+};
+
+// 定义 action 类型
+type BarrageActionType = {
+  type: "barrage/getList";
+  payload: { list: any[]; total: number };
+};
+
+// 频道 reducer
+export default function barrageReducer(
+  state = initState,
+  action: BarrageActionType
+) {
+  switch (action.type) {
+    // 获取列表数据
+    case "barrage/getList":
+      return { ...state, tableInfo: action.payload };
+    default:
+      return state;
+  }
+}

+ 3 - 1
houtai/src/store/reducer/index.ts

@@ -2,6 +2,7 @@
 import { combineReducers } from 'redux'
 import goodsReducer from './B2Goods'
 import wallReducer from './B3Wall'
+import barrageReducer from './B4Barrage'
 import logReducer from './C3log'
 
 // 导入 登录 模块的 reducer
@@ -12,7 +13,8 @@ const rootReducer = combineReducers({
   loginStore: loginReducer,
   logReducer:logReducer,
   goodsReducer:goodsReducer,
-  wallReducer:wallReducer
+  wallReducer:wallReducer,
+  barrageReducer:barrageReducer
 })
 
 // 默认导出

+ 34 - 0
houtai/src/types/api/hot.d.ts

@@ -0,0 +1,34 @@
+export type HotInfo1Type = {
+  createTime: string;
+  creatorId: null;
+  creatorName: string;
+  id: number;
+  pcsUser: number;
+  pcsWall: number;
+  pcsWearable: number;
+  today: string;
+  updateTime: string;
+};
+
+export type HotInfo3Type = {
+  groupKey: "goods" | "scene" | "video";
+  pcs: number;
+};
+
+export type HotInfo4Type = {
+  name: string;
+  pcs: number;
+};
+
+type HotMaoTypeT = {
+  groupKey: string;
+  parent: string;
+  pcs: number;
+};
+
+export type HotMaoType = {
+  groupKey: string;
+  parent: string;
+  pcs: number;
+  son: HotMaoTypeT[];
+};

+ 4 - 6
houtai/src/types/api/login.d.ts

@@ -1,7 +1,7 @@
 export type DictListType = {
   label: string;
   value: string;
-  type: "age" | "texture" | "level" | "source";
+  type: "age" | "texture" | "level" | "source" | "province";
 };
 
 export type DictListTypeObj = {
@@ -11,8 +11,7 @@ export type DictListTypeObj = {
   source: DictListType[];
 };
 
-
-export type DictListTypeAPI ={
+export type DictListTypeAPI = {
   createTime: null;
   creatorId: null;
   creatorName: string;
@@ -21,7 +20,6 @@ export type DictListTypeAPI ={
   name: string;
   parentId: null;
   sort: null;
-  type: "age" | "texture" | "level" | "source";
+  type: "age" | "texture" | "level" | "source" | "province";
   updateTime: null;
-}
-
+};

+ 2 - 1
houtai/src/types/index.d.ts

@@ -1,3 +1,4 @@
 export * from './api/log'
 export * from './api/login'
-export * from './api/wall'
+export * from './api/wall'
+export * from './api/hot'

+ 6 - 0
houtai/src/utils/changeData.ts

@@ -4,3 +4,9 @@ export const typeChangeObj = {
   audio: "音频",
   video: "视频",
 };
+
+export const hotChangeObj ={
+  goods:'馆藏',
+  scene:'VR场景',
+  video:'视频'
+}

+ 6 - 7
houtai/src/utils/http.ts

@@ -6,11 +6,10 @@ import { MessageFu } from "./message";
 // 请求基地址
 export const baseURL =
   // 线下的图片地址需要加上/api/
-  // process.env.NODE_ENV === "development"
-  //   ? "http://192.168.20.55:8040/api/"
-  //   : "";
-  // process.env.NODE_ENV === "development" ? "https://jszhongyi.4dage.com" : "";
-  process.env.NODE_ENV === "development" ? "https://xuzhouwall.4dage.com" : "";
+  process.env.NODE_ENV === "development"
+    ? "http://192.168.20.55:8041/api/"
+    : "";
+  // process.env.NODE_ENV === "development" ? "https://xuzhouwall.4dage.com" : "";
 
 // 处理  类型“AxiosResponse<any, any>”上不存在属性“code”
 declare module "axios" {
@@ -23,10 +22,10 @@ declare module "axios" {
 // 创建 axios 实例
 const http = axios.create({
   // --------线下的地址不用加/api/
-  // baseURL: baseURL,
+  baseURL: baseURL,
 
   // --------打包或线上环境接口需要加上api/
-  baseURL: baseURL + "/api/",
+  // baseURL: baseURL + "/api/",
   timeout: 5000,
 });