From c5a74fdbf86f7da8ab42a976e6a96c9edb1fc63c Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 13 九月 2024 08:09:00 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx b/zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx
index cb0d505..56b0283 100644
--- a/zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx
+++ b/zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx
@@ -42,6 +42,7 @@
 import * as Common from '@/utils/common';
 import rowSx from './rowSx';
 import { format } from 'date-fns';
+import OperationDetail from './OperationDetail'
 
 const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
     '& .css-1vooibu-MuiSvgIcon-root': {
@@ -133,7 +134,10 @@
                 <StyledDatagrid
                     preferenceKey='operationRecord'
                     bulkActionButtons={false}
-                    rowClick={(id, resource, record) => false}
+                    rowClick={(id, resource, record) => {
+                        setDrawerVal(!!drawerVal && drawerVal === record ? null : record);
+                        return false;
+                    }}
                     omit={['appkey', 'statusBool', 'err', 'updateTime', 'createTime', 'memo']}
                     rowSx={rowSx(drawerVal || null)}
                 >
@@ -146,8 +150,8 @@
                     <TextField source="appkey" label="table.field.operationRecord.appkey" />
                     <FormattedTimestampField source="timestamp" label="table.field.operationRecord.timestamp" />
                     <NumberField source="spendTime" label="table.field.operationRecord.spendTime" sx={{ fontWeight: 'bold' }} />
-                    <TextField source="request" label="table.field.operationRecord.request" sortable={false} />
-                    <TextField source="response" label="table.field.operationRecord.response" sortable={false} />
+                    <TextField source="request" label="table.field.operationRecord.request" sortable={false} hidden={!!drawerVal} />
+                    <TextField source="response" label="table.field.operationRecord.response" sortable={false} hidden={!!drawerVal} />
                     <ResultField source="result" label="table.field.operationRecord.result" />
                     <TextField source="err" label="table.field.operationRecord.err" />
                     <TextField source="clientIp" label="table.field.operationRecord.clientIp" />
@@ -162,6 +166,9 @@
                 drawerVal={drawerVal}
                 setDrawerVal={setDrawerVal}
             >
+                <OperationDetail
+                    operation={drawerVal}
+                />
             </PageDrawer>
         </Box>
     )

--
Gitblit v1.9.1