|
@@ -8,8 +8,6 @@ const { Option } = Select;
|
|
|
function ExceptionLog() {
|
|
|
useEffect(() => {
|
|
|
getAbnormalLog();
|
|
|
- console.log(123);
|
|
|
-
|
|
|
}, []);
|
|
|
const [logList, setLogList] = useState([]);
|
|
|
const [total, setTotal] = useState(0);
|
|
@@ -28,15 +26,13 @@ function ExceptionLog() {
|
|
|
let data = {
|
|
|
pages: 1,
|
|
|
current: 1,
|
|
|
- size: 15
|
|
|
+ size: size,
|
|
|
}
|
|
|
//表格数据
|
|
|
function getAbnormalLog(param) {
|
|
|
post(api.getAbnormalLog, param || params).then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
const data = res.data.data;
|
|
|
- console.log(data);
|
|
|
-
|
|
|
setLogList(data.records);
|
|
|
setTotal(data.total)
|
|
|
}
|
|
@@ -58,9 +54,9 @@ function ExceptionLog() {
|
|
|
setParams(params)
|
|
|
getAbnormalLog()
|
|
|
}
|
|
|
- function showModal(operationWay) {
|
|
|
+ function showModal(operationErrorInfo) {
|
|
|
setMsvisible(true)
|
|
|
- getAbnormalLogWayAndIp(operationWay)
|
|
|
+ setTipText(operationErrorInfo)
|
|
|
}
|
|
|
function handleOk() {
|
|
|
setMsvisible(false)
|
|
@@ -68,18 +64,6 @@ function ExceptionLog() {
|
|
|
function handleCancel() {
|
|
|
setMsvisible(false)
|
|
|
}
|
|
|
- function getAbnormalLogWayAndIp(operationWay) {
|
|
|
- let params = {
|
|
|
- mark:0,
|
|
|
- operationWay: operationWay
|
|
|
- }
|
|
|
- post(api.getAbnormalLogWayAndIp, params).then((res) => {
|
|
|
- if (res.data.code === 200) {
|
|
|
- const data = res.data.data;
|
|
|
- setTipText(data)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
const onFinish = (value) => {
|
|
|
const param = {
|
|
|
...data,
|
|
@@ -114,7 +98,7 @@ function ExceptionLog() {
|
|
|
{
|
|
|
title: '操作', dataIndex: 'key', render: (text, record) => (
|
|
|
<Space size="middle">
|
|
|
- <a onClick={e => showModal(record.operationWay)}>查看</a>
|
|
|
+ <a onClick={e => showModal(record.operationErrorInfo)}>查看</a>
|
|
|
</Space>
|
|
|
)
|
|
|
}
|