diff --git a/src/pages/system/adminlog/compenents/detail-dialog.tsx b/src/pages/system/adminlog/compenents/detail-dialog.tsx new file mode 100644 index 0000000..1c62d52 --- /dev/null +++ b/src/pages/system/adminlog/compenents/detail-dialog.tsx @@ -0,0 +1,57 @@ +import React, { useState, useEffect } from "react"; +import { Modal, Form } from "antd"; + +interface PropInterface { + param: string; + result: string; + open: boolean; + onCancel: () => void; +} + +export const AdminLogDetailDialog: React.FC = ({ + param, + open, + onCancel, + result, +}) => { + const [form] = Form.useForm(); + const [loading, setLoading] = useState(true); + + const onFinish = (values: any) => {}; + + const onFinishFailed = (errorInfo: any) => { + console.log("Failed:", errorInfo); + }; + + return ( + <> + onCancel()} + onCancel={() => onCancel()} + footer={null} + maskClosable={false} + > +
+
+ {param} + {result} +
+
+
+ + ); +}; diff --git a/src/pages/system/adminlog/index.tsx b/src/pages/system/adminlog/index.tsx index aa18091..b60640d 100644 --- a/src/pages/system/adminlog/index.tsx +++ b/src/pages/system/adminlog/index.tsx @@ -1,9 +1,18 @@ import { useEffect, useState } from "react"; -import { Table, Typography, Input, Select, Button, DatePicker } from "antd"; +import { + Table, + Typography, + Input, + Select, + Space, + Button, + DatePicker, +} from "antd"; import { adminLog } from "../../../api"; // import styles from "./index.module.less"; import type { ColumnsType } from "antd/es/table"; import { dateWholeFormat } from "../../../utils/index"; +import { AdminLogDetailDialog } from "./compenents/detail-dialog"; const { RangePicker } = DatePicker; import moment from "moment"; @@ -17,6 +26,8 @@ interface DataType { created_at: string; title: string; ip_area: string; + param: string; + result: string; } const SystemLogPage = () => { @@ -30,6 +41,9 @@ const SystemLogPage = () => { const [adminId, setAdminId] = useState(0); const [created_at, setCreatedAt] = useState([]); const [createdAts, setCreatedAts] = useState([]); + const [param, setParam] = useState(""); + const [result, setResult] = useState(""); + const [visiable, setVisiable] = useState(false); useEffect(() => { getData(); @@ -115,6 +129,25 @@ const SystemLogPage = () => { {dateWholeFormat(created_at)} ), }, + { + title: "操作", + key: "action", + fixed: "right", + width: 160, + render: (_, record) => ( + + ), + }, ]; return ( @@ -162,6 +195,12 @@ const SystemLogPage = () => { pagination={paginationProps} /> + setVisiable(false)} + > ); };