Skip to content

Let's use AI to Earn!

fix: 修复执行记录界面bug

牛文政07cdc73b34f5
diff --git a/src/icp/autoRun.ts b/src/icp/autoRun.ts
index a7af521e..875a906d 100644
--- a/src/icp/autoRun.ts
+++ b/src/icp/autoRun.ts
@@ -128,7 +128,7 @@ export async function ipcGetAutoRunRecordList(
},
): Promise<{
list: AutoRunRecord[];
- count: number;
+ total: number;
}> {
const res = await window.ipcRenderer.invoke(
'ICP_AUTO_RUN_RECORD_LIST',
diff --git a/src/views/reply/components/autoRunRecord.tsx b/src/views/reply/components/autoRunRecord.tsx
index 98b8098a..dc88a9ff 100644
--- a/src/views/reply/components/autoRunRecord.tsx
+++ b/src/views/reply/components/autoRunRecord.tsx
@@ -46,10 +46,12 @@ const Com = React.forwardRef<AutoRunRecordRef>((props: any, ref) => {
},
);
+ console.log('----- res', res);
+
setAutoRunRecordList(res.list);
setPagination({
...pagination,
- total: res.count,
+ total: res.total,
});
}
@@ -65,6 +67,7 @@ const Com = React.forwardRef<AutoRunRecordRef>((props: any, ref) => {
>
<div style={{ width: '100%' }} className="bg-slate-500">
<Table
+ key={autoRun?.id}
dataSource={autoRunRecordList}
style={{ width: '100%' }}
className="bg-slate-500"
@@ -84,6 +87,7 @@ const Com = React.forwardRef<AutoRunRecordRef>((props: any, ref) => {
<Column
title="触发周期"
key="cycleType"
+ dataIndex="cycleType"
render={(cycleType: string) => (
<ParseCronSchedule cronExpression={cycleType} />
)}
@@ -91,6 +95,7 @@ const Com = React.forwardRef<AutoRunRecordRef>((props: any, ref) => {
<Column
title="创建时间"
key="createTime"
+ dataIndex="createTime"
render={(_: any, record: AutoRun) => (
<p>{new Date(record.createTime).toLocaleString()}</p>
)}