mirror of
https://github.com/PlayEdu/backend
synced 2025-06-28 08:05:03 +08:00
视频列表增加名称搜索
This commit is contained in:
parent
e12c13e5cd
commit
d9850260e9
@ -59,7 +59,6 @@ export const MemberLearnProgressDialog: React.FC<PropInterface> = ({
|
|||||||
{
|
{
|
||||||
title: "课时标题",
|
title: "课时标题",
|
||||||
dataIndex: "title",
|
dataIndex: "title",
|
||||||
|
|
||||||
render: (title: string) => (
|
render: (title: string) => (
|
||||||
<>
|
<>
|
||||||
<span>{title}</span>
|
<span>{title}</span>
|
||||||
@ -68,7 +67,6 @@ export const MemberLearnProgressDialog: React.FC<PropInterface> = ({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "总时长",
|
title: "总时长",
|
||||||
width: 120,
|
|
||||||
dataIndex: "duration",
|
dataIndex: "duration",
|
||||||
render: (duration: number) => (
|
render: (duration: number) => (
|
||||||
<>
|
<>
|
||||||
@ -78,7 +76,6 @@ export const MemberLearnProgressDialog: React.FC<PropInterface> = ({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "已学习时长",
|
title: "已学习时长",
|
||||||
width: 120,
|
|
||||||
dataIndex: "finished_duration",
|
dataIndex: "finished_duration",
|
||||||
render: (_, record: any) => (
|
render: (_, record: any) => (
|
||||||
<>
|
<>
|
||||||
@ -96,7 +93,6 @@ export const MemberLearnProgressDialog: React.FC<PropInterface> = ({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "是否学完",
|
title: "是否学完",
|
||||||
width: 100,
|
|
||||||
dataIndex: "is_finished",
|
dataIndex: "is_finished",
|
||||||
render: (_, record: any) => (
|
render: (_, record: any) => (
|
||||||
<>
|
<>
|
||||||
@ -112,7 +108,6 @@ export const MemberLearnProgressDialog: React.FC<PropInterface> = ({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "开始时间",
|
title: "开始时间",
|
||||||
width: 150,
|
|
||||||
dataIndex: "created_at",
|
dataIndex: "created_at",
|
||||||
render: (_, record: any) => (
|
render: (_, record: any) => (
|
||||||
<>
|
<>
|
||||||
@ -126,7 +121,6 @@ export const MemberLearnProgressDialog: React.FC<PropInterface> = ({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "学完时间",
|
title: "学完时间",
|
||||||
width: 150,
|
|
||||||
dataIndex: "finished_at",
|
dataIndex: "finished_at",
|
||||||
render: (_, record: any) => (
|
render: (_, record: any) => (
|
||||||
<>
|
<>
|
||||||
@ -142,7 +136,6 @@ export const MemberLearnProgressDialog: React.FC<PropInterface> = ({
|
|||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 70,
|
|
||||||
render: (_, record: any) => (
|
render: (_, record: any) => (
|
||||||
<>
|
<>
|
||||||
{records && records[record.id] ? (
|
{records && records[record.id] ? (
|
||||||
@ -222,7 +215,7 @@ export const MemberLearnProgressDialog: React.FC<PropInterface> = ({
|
|||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
footer={null}
|
footer={null}
|
||||||
>
|
>
|
||||||
<div className="w-100 d-flex mt-24">
|
<div className="mt-24">
|
||||||
<PerButton
|
<PerButton
|
||||||
type="primary"
|
type="primary"
|
||||||
text="重置学习记录"
|
text="重置学习记录"
|
||||||
@ -235,10 +228,7 @@ export const MemberLearnProgressDialog: React.FC<PropInterface> = ({
|
|||||||
disabled={null}
|
disabled={null}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div className="mt-24" style={{ maxHeight: 800, overflowY: "auto" }}>
|
||||||
className="w-100 d-flex mt-24"
|
|
||||||
style={{ maxHeight: 800, overflowY: "auto" }}
|
|
||||||
>
|
|
||||||
<Table
|
<Table
|
||||||
columns={column}
|
columns={column}
|
||||||
dataSource={list}
|
dataSource={list}
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Modal, Table, message, Space, Dropdown, Button } from "antd";
|
import {
|
||||||
|
Modal,
|
||||||
|
Table,
|
||||||
|
message,
|
||||||
|
Space,
|
||||||
|
Dropdown,
|
||||||
|
Typography,
|
||||||
|
Input,
|
||||||
|
Button,
|
||||||
|
} from "antd";
|
||||||
import type { MenuProps } from "antd";
|
import type { MenuProps } from "antd";
|
||||||
import { resource } from "../../../api";
|
import { resource } from "../../../api";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
@ -63,6 +72,7 @@ const ResourceVideosPage = () => {
|
|||||||
const [multiConfig, setMultiConfig] = useState(false);
|
const [multiConfig, setMultiConfig] = useState(false);
|
||||||
const [updateId, setUpdateId] = useState(0);
|
const [updateId, setUpdateId] = useState(0);
|
||||||
const [playUrl, setPlayUrl] = useState("");
|
const [playUrl, setPlayUrl] = useState("");
|
||||||
|
const [title, setTitle] = useState("");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setCateId(Number(result.get("cid")));
|
setCateId(Number(result.get("cid")));
|
||||||
@ -231,7 +241,7 @@ const ResourceVideosPage = () => {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
let categoryIds = category_ids.join(",");
|
let categoryIds = category_ids.join(",");
|
||||||
resource
|
resource
|
||||||
.resourceList(page, size, "", "", "", "VIDEO", categoryIds)
|
.resourceList(page, size, "", "", title, "VIDEO", categoryIds)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
setTotal(res.data.result.total);
|
setTotal(res.data.result.total);
|
||||||
setVideoList(res.data.result.data);
|
setVideoList(res.data.result.data);
|
||||||
@ -250,6 +260,7 @@ const ResourceVideosPage = () => {
|
|||||||
setSize(10);
|
setSize(10);
|
||||||
setVideoList([]);
|
setVideoList([]);
|
||||||
setSelectedRowKeys([]);
|
setSelectedRowKeys([]);
|
||||||
|
setTitle("");
|
||||||
setRefresh(!refresh);
|
setRefresh(!refresh);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -328,7 +339,34 @@ const ResourceVideosPage = () => {
|
|||||||
删除
|
删除
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="d-flex"></div>
|
<div className="d-flex">
|
||||||
|
<div className="d-flex mr-24">
|
||||||
|
<Typography.Text>名称:</Typography.Text>
|
||||||
|
<Input
|
||||||
|
value={title}
|
||||||
|
onChange={(e) => {
|
||||||
|
setTitle(e.target.value);
|
||||||
|
}}
|
||||||
|
allowClear
|
||||||
|
style={{ width: 160 }}
|
||||||
|
placeholder="请输入名称关键字"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="d-flex">
|
||||||
|
<Button className="mr-16" onClick={resetVideoList}>
|
||||||
|
重 置
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => {
|
||||||
|
setPage(1);
|
||||||
|
setRefresh(!refresh);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
查 询
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="float-left">
|
<div className="float-left">
|
||||||
{multiConfig ? (
|
{multiConfig ? (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user