|
@@ -2,7 +2,7 @@ import { View } from "@tarojs/components";
|
|
import EmptyData from "@/components/empty-data";
|
|
import EmptyData from "@/components/empty-data";
|
|
|
|
|
|
import StyleFilter, { TListStyle } from "../StyleFilter";
|
|
import StyleFilter, { TListStyle } from "../StyleFilter";
|
|
-import { useState } from "react";
|
|
|
|
|
|
+import { useRef, useState } from "react";
|
|
|
|
|
|
import CorrectionListChat from "./components/CorrectionListChat";
|
|
import CorrectionListChat from "./components/CorrectionListChat";
|
|
import CorrectionList from "./components/CorrectionList";
|
|
import CorrectionList from "./components/CorrectionList";
|
|
@@ -10,14 +10,12 @@ import CorrectionList from "./components/CorrectionList";
|
|
import { TEntItem } from "@/types/user";
|
|
import { TEntItem } from "@/types/user";
|
|
|
|
|
|
import CompanyList from "../CompanyList";
|
|
import CompanyList from "../CompanyList";
|
|
-import { TCorrectionItem } from "@/types/correction";
|
|
|
|
|
|
|
|
const Index = () => {
|
|
const Index = () => {
|
|
// const [checked, setChecked] = useState(false);
|
|
// const [checked, setChecked] = useState(false);
|
|
// const [showPopup, setShowPopup] = useState(false);
|
|
// const [showPopup, setShowPopup] = useState(false);
|
|
const [listStyle, setListStyle] = useState<TListStyle>("chat");
|
|
const [listStyle, setListStyle] = useState<TListStyle>("chat");
|
|
const [ent, setEnt] = useState<TEntItem | null>(null);
|
|
const [ent, setEnt] = useState<TEntItem | null>(null);
|
|
- const [list, setList] = useState<TCorrectionItem[]>();
|
|
|
|
const [totalCount, setTotalCount] = useState<number>(0);
|
|
const [totalCount, setTotalCount] = useState<number>(0);
|
|
|
|
|
|
const extraEnt: TEntItem[] = [
|
|
const extraEnt: TEntItem[] = [
|
|
@@ -36,7 +34,6 @@ const Index = () => {
|
|
return (
|
|
return (
|
|
<CorrectionListChat
|
|
<CorrectionListChat
|
|
setTotalCount={setTotalCount}
|
|
setTotalCount={setTotalCount}
|
|
- setData={setList}
|
|
|
|
entId={ent?.entId}
|
|
entId={ent?.entId}
|
|
/>
|
|
/>
|
|
);
|
|
);
|
|
@@ -44,16 +41,15 @@ const Index = () => {
|
|
return (
|
|
return (
|
|
<CorrectionList
|
|
<CorrectionList
|
|
setTotalCount={setTotalCount}
|
|
setTotalCount={setTotalCount}
|
|
- setData={setList}
|
|
|
|
entId={ent?.entId}
|
|
entId={ent?.entId}
|
|
/>
|
|
/>
|
|
);
|
|
);
|
|
};
|
|
};
|
|
- console.log("渲染纠错模块");
|
|
|
|
|
|
+ console.log("渲染纠错模块", totalCount);
|
|
// 渲染主体
|
|
// 渲染主体
|
|
const renderEmpty = () => {
|
|
const renderEmpty = () => {
|
|
// 空数据
|
|
// 空数据
|
|
- if (!list?.length) {
|
|
|
|
|
|
+ if (!totalCount) {
|
|
return (
|
|
return (
|
|
<View className="flex-center pt-40">
|
|
<View className="flex-center pt-40">
|
|
<EmptyData type={"whiteboard"}>
|
|
<EmptyData type={"whiteboard"}>
|