分类、部门删除预检查

This commit is contained in:
禺狨
2023-03-15 16:03:25 +08:00
5 changed files with 16 additions and 4 deletions

View File

@@ -43,7 +43,11 @@ export const CoursePage = () => {
const [dep_ids, setDepIds] = useState<any>([]);
const [selLabel, setLabel] = useState<string>("全部课程");
const [categoryCount, setCategoryCount] = useState<any>({});
<<<<<<< HEAD
const [tabKey, setTabKey] = useState(1);
=======
const [pureTotal, setPureTotal] = useState(0);
>>>>>>> fc90ddf2cc1481f6aa7fb80b7d2746f7bbc94fcd
const items: TabsProps["items"] = [
{
@@ -52,6 +56,7 @@ export const CoursePage = () => {
children: (
<div className="float-left">
<TreeCategory
resourceTotal={pureTotal}
text={"课程"}
categoryCount={categoryCount}
onUpdate={(keys: any, title: any) => {
@@ -178,6 +183,7 @@ export const CoursePage = () => {
setTotal(res.data.total);
setList(res.data.data);
setCategoryCount(res.data.category_count);
setPureTotal(res.data.pure_total);
setLoading(false);
})
.catch((err: any) => {

View File

@@ -44,6 +44,7 @@ export const ResourceImagesPage = () => {
const [selLabel, setLabel] = useState<string>("全部图片");
const [loading, setLoading] = useState<boolean>(false);
const [categoryCount, setCategoryCount] = useState<any>({});
const [pureTotal, setPureTotal] = useState(0);
// 删除图片
const removeResource = () => {
@@ -89,6 +90,7 @@ export const ResourceImagesPage = () => {
setVisibleArr(arr);
setHoverArr(arr);
setCategoryCount(res.data.category_count);
setPureTotal(res.data.pure_total);
setLoading(false);
})
.catch((err: any) => {
@@ -154,6 +156,7 @@ export const ResourceImagesPage = () => {
<TreeCategory
text={"图片"}
categoryCount={categoryCount}
resourceTotal={pureTotal}
onUpdate={(keys: any, title: any) => {
setCategoryIds(keys);
if (typeof title == "string") {

View File

@@ -30,6 +30,7 @@ export const ResourceVideosPage = () => {
const [category_ids, setCategoryIds] = useState<any>([]);
const [selLabel, setLabel] = useState<string>("全部视频");
const [categoryCount, setCategoryCount] = useState<any>({});
const [pureTotal, setPureTotal] = useState(0);
const columns: ColumnsType<DataType> = [
// {
@@ -129,6 +130,7 @@ export const ResourceVideosPage = () => {
setVideoExtra(res.data.videos_extra);
setAdminUsers(res.data.admin_users);
setCategoryCount(res.data.category_count);
setPureTotal(res.data.pure_total);
setLoading(false);
})
.catch((err: any) => {
@@ -167,6 +169,7 @@ export const ResourceVideosPage = () => {
<div className="tree-main-body">
<div className="left-box">
<TreeCategory
resourceTotal={pureTotal}
text={"视频"}
categoryCount={categoryCount}
onUpdate={(keys: any, title: any) => {