@zw-team/react-lib 1.0.5-beta.2 → 1.0.5-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AccessReport/index.d.ts +7 -5
- package/dist/components/AccessReport/index.js +14 -2
- package/dist/components/ConfigProvider/ConfigProvider.js +15 -12
- package/dist/components/ConfigProvider/types.d.ts +1 -0
- package/dist/components/FormItem/FormItem.css +26 -0
- package/dist/components/Log/src/Detail.js +8 -6
- package/dist/components/Log/src/Detail.scss +2 -1
- package/dist/components/Log/src/Log.d.ts +1 -2
- package/dist/components/Log/src/Log.js +267 -227
- package/dist/components/Log/src/Log.scss +8 -3
- package/dist/components/Log/src/useLogTableColumns.d.ts +4 -1
- package/dist/components/Log/src/useLogTableColumns.js +21 -7
- package/dist/components/Log/types.d.ts +1 -0
- package/dist/components/LogButton/LogButton.js +5 -4
- package/dist/components/LogButton/logbutton.css +0 -1
- package/dist/components/LogButton/types.d.ts +3 -2
- package/dist/components/LogDialog/BiLogManager.d.ts +6 -4
- package/dist/components/LogDialog/BiLogManager.js +11 -5
- package/dist/components/LogDialog/LogDialog.js +133 -74
- package/dist/components/LogDialog/LogDialog.scss +10 -1
- package/dist/components/LogDialog/types.d.ts +3 -1
- package/dist/components/NavbarTool/NavbarTool.js +4 -4
- package/dist/components/NavbarTool/types.d.ts +2 -0
- package/dist/components/NoticeCenter/NoticeCenter.d.ts +1 -1
- package/dist/components/NoticeCenter/NoticeCenter.js +118 -73
- package/dist/components/NoticeCenter/noticeCenter.scss +10 -1
- package/dist/components/NoticeCenter/types.d.ts +1 -3
- package/dist/components/Table/useHeaderPopper.js +13 -5
- package/dist/hooks/useAccessReport.js +7 -1
- package/dist/package.json +74 -0
- package/dist/utils/advisory.d.ts +2 -2
- package/dist/utils/advisory.js +7 -2
- package/dist/utils/request/index.js +7 -1
- package/package.json +2 -2
|
@@ -1,57 +1,68 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Input, Select } from "antd";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
|
-
import { forwardRef, useEffect, useImperativeHandle, useMemo, useState } from "react";
|
|
4
|
+
import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
5
|
+
import { BiBlock } from "../../Block/index.js";
|
|
5
6
|
import { BiDatePicker } from "../../DatePicker/index.js";
|
|
6
7
|
import { BiForm } from "../../Form/index.js";
|
|
7
8
|
import { BiFormItem } from "../../FormItem/index.js";
|
|
8
9
|
import { BiTable } from "../../Table/index.js";
|
|
10
|
+
import { useConfig } from "../../ConfigProvider/ConfigContext.js";
|
|
11
|
+
import request, { SystemType } from "../../../utils/request/index.js";
|
|
9
12
|
import { useLogTableColumns } from "./useLogTableColumns.js";
|
|
10
13
|
import "./Log.scss";
|
|
14
|
+
import { BiSearchBlock } from "../../SearchBlock/index.js";
|
|
11
15
|
const BiLog = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
12
|
-
const { logId = '', logModel = '', BiLogDialog = false,
|
|
16
|
+
const { logId = '', logModel = '', BiLogDialog = false, className = '' } = props;
|
|
17
|
+
const { contextValue } = useConfig();
|
|
18
|
+
const env = contextValue.env || 'production';
|
|
19
|
+
const system = contextValue.system;
|
|
20
|
+
const mainOrigin = contextValue.mainOrigin;
|
|
21
|
+
const businessRequest = contextValue.request;
|
|
22
|
+
const drawerModel = Boolean(logId && logModel);
|
|
13
23
|
const [tableLoading, setTableLoading] = useState(false);
|
|
14
24
|
const [tableData, setTableData] = useState([]);
|
|
15
|
-
const [
|
|
16
|
-
const [
|
|
25
|
+
const [loadingMore, setLoadingMore] = useState(false);
|
|
26
|
+
const [lastId, setLastId] = useState('');
|
|
27
|
+
const [lastItemId, setLastItemId] = useState('');
|
|
28
|
+
const [currentApi, setCurrentApi] = useState('/log/getSummary');
|
|
29
|
+
const [showHistoryBtn, setShowHistoryBtn] = useState(true);
|
|
30
|
+
const contentRef = useRef(null);
|
|
17
31
|
const [optionsList, setOptionsList] = useState({
|
|
18
32
|
model: [],
|
|
19
33
|
operate_name: []
|
|
20
34
|
});
|
|
21
35
|
const [formData, setFormData] = useState({
|
|
22
|
-
id: '',
|
|
23
|
-
model: [
|
|
36
|
+
id: drawerModel ? logId : '',
|
|
37
|
+
model: drawerModel ? [
|
|
38
|
+
logModel
|
|
39
|
+
] : [],
|
|
24
40
|
operate_name: [],
|
|
25
|
-
operate_time: []
|
|
26
|
-
|
|
41
|
+
operate_time: drawerModel ? [] : [
|
|
42
|
+
dayjs().subtract(24, 'hour').format('YYYY-MM-DD HH:mm:ss'),
|
|
43
|
+
dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
44
|
+
],
|
|
45
|
+
object_type: drawerModel ? 'id' : 'name',
|
|
27
46
|
operator: '',
|
|
28
|
-
|
|
29
|
-
limit: 50
|
|
47
|
+
limit: 500
|
|
30
48
|
});
|
|
31
|
-
const drawerModel = useMemo(()=>logId && logModel, [
|
|
32
|
-
logId,
|
|
33
|
-
logModel
|
|
34
|
-
]);
|
|
35
|
-
const total = useMemo(()=>pageCount * formData.limit, [
|
|
36
|
-
pageCount,
|
|
37
|
-
formData.limit
|
|
38
|
-
]);
|
|
39
49
|
const params = useMemo(()=>{
|
|
40
|
-
const { id, model, operate_name, operate_time, object_type, operator,
|
|
41
|
-
const [
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
const { id, model, operate_name, operate_time, object_type, operator, limit } = formData;
|
|
51
|
+
const [operateTimeStart = '', operateTimeEnd = ''] = operate_time || [];
|
|
52
|
+
const payload = {
|
|
53
|
+
system,
|
|
44
54
|
model: model.toString(),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
object_type,
|
|
55
|
+
operateName: operate_name.toString(),
|
|
56
|
+
operateTimeStart,
|
|
57
|
+
operateTimeEnd,
|
|
49
58
|
operator,
|
|
50
|
-
page,
|
|
51
59
|
limit
|
|
52
60
|
};
|
|
61
|
+
payload['id' === object_type ? 'objectId' : 'objectName'] = id;
|
|
62
|
+
return payload;
|
|
53
63
|
}, [
|
|
54
|
-
formData
|
|
64
|
+
formData,
|
|
65
|
+
system
|
|
55
66
|
]);
|
|
56
67
|
const handleChangeForm = (key, val)=>{
|
|
57
68
|
setFormData((prev)=>({
|
|
@@ -59,40 +70,86 @@ const BiLog = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
59
70
|
[key]: val
|
|
60
71
|
}));
|
|
61
72
|
};
|
|
62
|
-
const
|
|
73
|
+
const normalizeRows = (rows = [])=>rows.map((item)=>({
|
|
74
|
+
...item,
|
|
75
|
+
showLength: item.operates?.length > 3 ? 3 : 0
|
|
76
|
+
}));
|
|
77
|
+
const dataSearch = async ()=>{
|
|
63
78
|
setTableLoading(true);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
...payload
|
|
74
|
-
}
|
|
75
|
-
}).then((res)=>{
|
|
79
|
+
setCurrentApi('/log/getSummary');
|
|
80
|
+
try {
|
|
81
|
+
const res = await request({
|
|
82
|
+
env,
|
|
83
|
+
system: 'logcenter',
|
|
84
|
+
api: '/log/getSummary',
|
|
85
|
+
data: params,
|
|
86
|
+
mainOrigin
|
|
87
|
+
});
|
|
76
88
|
if (1 === res.status_code) {
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
const rows = normalizeRows(res.data?.data);
|
|
90
|
+
setTableData(rows);
|
|
91
|
+
setLastId(res.data?.lastId || '');
|
|
92
|
+
setLastItemId(rows.at(-1)?.id || '');
|
|
93
|
+
if (!res.data?.lastId) {
|
|
94
|
+
setCurrentApi('/log/getHistorySummary');
|
|
95
|
+
setShowHistoryBtn(true);
|
|
96
|
+
}
|
|
83
97
|
}
|
|
98
|
+
} finally{
|
|
84
99
|
setTableLoading(false);
|
|
85
|
-
}
|
|
86
|
-
setTableLoading(false);
|
|
87
|
-
});
|
|
100
|
+
}
|
|
88
101
|
};
|
|
89
102
|
const clickSearch = ()=>{
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
103
|
+
setLastId('');
|
|
104
|
+
setLastItemId('');
|
|
105
|
+
setCurrentApi('/log/getSummary');
|
|
106
|
+
setShowHistoryBtn(true);
|
|
107
|
+
dataSearch();
|
|
108
|
+
};
|
|
109
|
+
const loadNext = async ()=>{
|
|
110
|
+
setLoadingMore(true);
|
|
111
|
+
const lastRow = contentRef.current?.querySelector('tbody tr:last-child');
|
|
112
|
+
try {
|
|
113
|
+
const data = '/log/getSummary' === currentApi ? {
|
|
114
|
+
...params,
|
|
115
|
+
lastId
|
|
116
|
+
} : {
|
|
117
|
+
...params,
|
|
118
|
+
objectId: logId,
|
|
119
|
+
model: logModel,
|
|
120
|
+
lastId: lastId || lastItemId
|
|
121
|
+
};
|
|
122
|
+
const res = await request({
|
|
123
|
+
env,
|
|
124
|
+
system: 'logcenter',
|
|
125
|
+
api: currentApi,
|
|
126
|
+
data,
|
|
127
|
+
mainOrigin
|
|
128
|
+
});
|
|
129
|
+
if (1 === res.status_code && res.data) {
|
|
130
|
+
const rows = normalizeRows(res.data.data);
|
|
131
|
+
if (rows.length) {
|
|
132
|
+
setTableData((prev)=>[
|
|
133
|
+
...prev,
|
|
134
|
+
...rows
|
|
135
|
+
]);
|
|
136
|
+
setLastItemId(rows.at(-1)?.id || '');
|
|
137
|
+
requestAnimationFrame(()=>lastRow?.scrollIntoView({
|
|
138
|
+
block: 'end'
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
const nextLastId = res.data.lastId || '';
|
|
142
|
+
setLastId(nextLastId);
|
|
143
|
+
if ('/log/getSummary' !== currentApi || nextLastId) {
|
|
144
|
+
if ('/log/getHistorySummary' === currentApi) setShowHistoryBtn(Boolean(nextLastId));
|
|
145
|
+
} else {
|
|
146
|
+
setCurrentApi('/log/getHistorySummary');
|
|
147
|
+
setShowHistoryBtn(true);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
} finally{
|
|
151
|
+
setLoadingMore(false);
|
|
152
|
+
}
|
|
96
153
|
};
|
|
97
154
|
const reset = ()=>{
|
|
98
155
|
setFormData({
|
|
@@ -105,16 +162,12 @@ const BiLog = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
105
162
|
],
|
|
106
163
|
object_type: 'name',
|
|
107
164
|
operator: '',
|
|
108
|
-
|
|
109
|
-
limit: 50
|
|
165
|
+
limit: 500
|
|
110
166
|
});
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
page
|
|
116
|
-
}));
|
|
117
|
-
dataSearch(page);
|
|
167
|
+
setLastId('');
|
|
168
|
+
setLastItemId('');
|
|
169
|
+
setCurrentApi('/log/getSummary');
|
|
170
|
+
setShowHistoryBtn(true);
|
|
118
171
|
};
|
|
119
172
|
const fomartOperates = (row)=>{
|
|
120
173
|
try {
|
|
@@ -134,12 +187,18 @@ const BiLog = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
134
187
|
showLength: 0
|
|
135
188
|
} : item));
|
|
136
189
|
};
|
|
137
|
-
const { drawerTableColums, defaultTableColums } = useLogTableColumns(showMore, fomartOperates);
|
|
190
|
+
const { drawerTableColums, defaultTableColums } = useLogTableColumns(showMore, fomartOperates, optionsList.model);
|
|
138
191
|
const initOptions = ()=>{
|
|
139
|
-
|
|
192
|
+
const optionsRequest = businessRequest ? businessRequest({
|
|
140
193
|
url: '/systemlog/options',
|
|
141
194
|
method: 'post'
|
|
142
|
-
})
|
|
195
|
+
}) : request({
|
|
196
|
+
env,
|
|
197
|
+
system: SystemType.ZHANGQUAN,
|
|
198
|
+
api: '/systemlog/options',
|
|
199
|
+
mainOrigin
|
|
200
|
+
});
|
|
201
|
+
optionsRequest.then((res)=>{
|
|
143
202
|
if (1 === res.status_code) setOptionsList({
|
|
144
203
|
model: res.data.model,
|
|
145
204
|
operate_name: res.data.operate_name
|
|
@@ -147,186 +206,167 @@ const BiLog = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
147
206
|
});
|
|
148
207
|
};
|
|
149
208
|
const handlerOpen = ()=>{
|
|
150
|
-
if (drawerModel) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}));
|
|
160
|
-
setTableColums(drawerTableColums);
|
|
161
|
-
}
|
|
209
|
+
if (drawerModel) setFormData((prev)=>({
|
|
210
|
+
...prev,
|
|
211
|
+
id: logId,
|
|
212
|
+
model: [
|
|
213
|
+
logModel
|
|
214
|
+
],
|
|
215
|
+
object_type: 'id',
|
|
216
|
+
operate_time: []
|
|
217
|
+
}));
|
|
162
218
|
clickSearch();
|
|
163
219
|
};
|
|
164
220
|
useImperativeHandle(ref, ()=>({
|
|
165
221
|
handlerOpen
|
|
166
222
|
}));
|
|
167
223
|
useEffect(()=>{
|
|
168
|
-
|
|
169
|
-
...prev,
|
|
170
|
-
operate_time: [
|
|
171
|
-
dayjs().subtract(24, 'hour').format('YYYY-MM-DD HH:mm:ss'),
|
|
172
|
-
dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
173
|
-
]
|
|
174
|
-
}));
|
|
175
|
-
if (drawerModel) {
|
|
176
|
-
setFormData((prev)=>({
|
|
177
|
-
...prev,
|
|
178
|
-
id: logId,
|
|
179
|
-
model: [
|
|
180
|
-
logModel
|
|
181
|
-
],
|
|
182
|
-
object_type: 'id',
|
|
183
|
-
operate_time: []
|
|
184
|
-
}));
|
|
185
|
-
setTableColums(drawerTableColums);
|
|
186
|
-
} else {
|
|
187
|
-
setTableColums(defaultTableColums);
|
|
224
|
+
if (!drawerModel) {
|
|
188
225
|
initOptions();
|
|
189
226
|
clickSearch();
|
|
190
227
|
}
|
|
191
228
|
}, []);
|
|
229
|
+
const tableColums = drawerModel ? drawerTableColums : defaultTableColums;
|
|
192
230
|
return /*#__PURE__*/ jsxs("div", {
|
|
193
|
-
|
|
231
|
+
ref: contentRef,
|
|
232
|
+
className: `content-outer bi-log-table ${className}`.trim(),
|
|
194
233
|
children: [
|
|
195
|
-
!drawerModel && /*#__PURE__*/ jsx(
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
234
|
+
!drawerModel && /*#__PURE__*/ jsx(BiSearchBlock, {
|
|
235
|
+
children: /*#__PURE__*/ jsxs(BiForm, {
|
|
236
|
+
children: [
|
|
237
|
+
/*#__PURE__*/ jsx(BiFormItem, {
|
|
238
|
+
label: "模块",
|
|
239
|
+
children: /*#__PURE__*/ jsx(Select, {
|
|
240
|
+
value: formData.model,
|
|
241
|
+
onChange: (e)=>handleChangeForm('model', e),
|
|
242
|
+
allowClear: true,
|
|
243
|
+
mode: "multiple",
|
|
244
|
+
placeholder: "请输入",
|
|
245
|
+
showSearch: true,
|
|
246
|
+
filterOption: true,
|
|
247
|
+
maxTagCount: 1,
|
|
248
|
+
options: optionsList.model,
|
|
249
|
+
style: {
|
|
250
|
+
width: '100%'
|
|
251
|
+
},
|
|
252
|
+
fieldNames: {
|
|
253
|
+
value: 'id'
|
|
254
|
+
}
|
|
255
|
+
})
|
|
256
|
+
}),
|
|
257
|
+
/*#__PURE__*/ jsx(BiFormItem, {
|
|
258
|
+
label: "操作",
|
|
259
|
+
children: /*#__PURE__*/ jsx(Select, {
|
|
260
|
+
value: formData.operate_name,
|
|
261
|
+
onChange: (e)=>handleChangeForm('operate_name', e),
|
|
262
|
+
allowClear: true,
|
|
263
|
+
mode: "multiple",
|
|
264
|
+
placeholder: "请输入",
|
|
265
|
+
showSearch: true,
|
|
266
|
+
filterOption: true,
|
|
267
|
+
maxTagCount: 1,
|
|
268
|
+
options: optionsList.operate_name,
|
|
269
|
+
style: {
|
|
270
|
+
width: '100%'
|
|
271
|
+
},
|
|
272
|
+
fieldNames: {
|
|
273
|
+
value: 'id'
|
|
274
|
+
}
|
|
275
|
+
})
|
|
276
|
+
}),
|
|
277
|
+
/*#__PURE__*/ jsx(BiFormItem, {
|
|
278
|
+
label: "操作人",
|
|
279
|
+
children: /*#__PURE__*/ jsx(Input, {
|
|
280
|
+
value: formData.operator,
|
|
281
|
+
onChange: (e)=>handleChangeForm('operator', e.target.value),
|
|
282
|
+
placeholder: "请输入内容",
|
|
283
|
+
allowClear: true
|
|
284
|
+
})
|
|
285
|
+
}),
|
|
286
|
+
/*#__PURE__*/ jsx(BiFormItem, {
|
|
287
|
+
label: /*#__PURE__*/ jsx(Select, {
|
|
288
|
+
value: formData.object_type,
|
|
289
|
+
onChange: (e)=>handleChangeForm('object_type', e),
|
|
290
|
+
placeholder: "请选择",
|
|
291
|
+
options: [
|
|
292
|
+
{
|
|
293
|
+
label: '对象ID',
|
|
216
294
|
value: 'id'
|
|
217
|
-
}
|
|
218
|
-
})
|
|
219
|
-
}),
|
|
220
|
-
/*#__PURE__*/ jsx(BiFormItem, {
|
|
221
|
-
label: "操作",
|
|
222
|
-
children: /*#__PURE__*/ jsx(Select, {
|
|
223
|
-
value: formData.operate_name,
|
|
224
|
-
onChange: (e)=>handleChangeForm('operate_name', e),
|
|
225
|
-
allowClear: true,
|
|
226
|
-
mode: "multiple",
|
|
227
|
-
placeholder: "请输入",
|
|
228
|
-
showSearch: true,
|
|
229
|
-
filterOption: true,
|
|
230
|
-
options: optionsList.operate_name,
|
|
231
|
-
style: {
|
|
232
|
-
width: '100%'
|
|
233
295
|
},
|
|
234
|
-
|
|
235
|
-
|
|
296
|
+
{
|
|
297
|
+
label: '对象名称',
|
|
298
|
+
value: 'name'
|
|
236
299
|
}
|
|
237
|
-
|
|
238
|
-
}),
|
|
239
|
-
/*#__PURE__*/ jsx(BiFormItem, {
|
|
240
|
-
label: "操作人",
|
|
241
|
-
children: /*#__PURE__*/ jsx(Input, {
|
|
242
|
-
value: formData.operator,
|
|
243
|
-
onChange: (e)=>handleChangeForm('operator', e.target.value),
|
|
244
|
-
placeholder: "请输入内容",
|
|
245
|
-
allowClear: true
|
|
246
|
-
})
|
|
300
|
+
]
|
|
247
301
|
}),
|
|
248
|
-
/*#__PURE__*/ jsx(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
302
|
+
children: /*#__PURE__*/ jsx(Input, {
|
|
303
|
+
value: formData.id,
|
|
304
|
+
onChange: (e)=>handleChangeForm('id', e.target.value),
|
|
305
|
+
placeholder: "请输入内容",
|
|
306
|
+
allowClear: true
|
|
307
|
+
})
|
|
308
|
+
}),
|
|
309
|
+
/*#__PURE__*/ jsx(BiFormItem, {
|
|
310
|
+
label: "操作日期",
|
|
311
|
+
children: /*#__PURE__*/ jsx(BiDatePicker, {
|
|
312
|
+
isRange: true,
|
|
313
|
+
value: formData.operate_time,
|
|
314
|
+
showTime: {
|
|
315
|
+
defaultOpenValue: [
|
|
316
|
+
dayjs('00:00:00', 'HH:mm:ss'),
|
|
317
|
+
dayjs('23:59:59', 'HH:mm:ss')
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
format: 'YYYY-MM-DD HH:mm:ss',
|
|
321
|
+
placeholder: [
|
|
322
|
+
'开始日期',
|
|
323
|
+
'结束日期'
|
|
324
|
+
],
|
|
325
|
+
onChange: (e)=>handleChangeForm('operate_time', e)
|
|
326
|
+
})
|
|
327
|
+
}),
|
|
328
|
+
/*#__PURE__*/ jsxs(BiFormItem, {
|
|
329
|
+
button: true,
|
|
330
|
+
children: [
|
|
331
|
+
/*#__PURE__*/ jsx(Button, {
|
|
332
|
+
type: "primary",
|
|
333
|
+
loading: tableLoading,
|
|
334
|
+
onClick: clickSearch,
|
|
335
|
+
children: "查询"
|
|
268
336
|
}),
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
allowClear: true
|
|
274
|
-
})
|
|
275
|
-
}),
|
|
276
|
-
/*#__PURE__*/ jsx(BiFormItem, {
|
|
277
|
-
label: "操作日期",
|
|
278
|
-
children: /*#__PURE__*/ jsx(BiDatePicker, {
|
|
279
|
-
isRange: true,
|
|
280
|
-
value: formData.operate_time,
|
|
281
|
-
showTime: {
|
|
282
|
-
defaultOpenValue: [
|
|
283
|
-
dayjs('00:00:00', 'HH:mm:ss'),
|
|
284
|
-
dayjs('23:59:59', 'HH:mm:ss')
|
|
285
|
-
]
|
|
337
|
+
/*#__PURE__*/ jsx(Button, {
|
|
338
|
+
onClick: reset,
|
|
339
|
+
style: {
|
|
340
|
+
marginLeft: '10px'
|
|
286
341
|
},
|
|
287
|
-
|
|
288
|
-
placeholder: [
|
|
289
|
-
'开始日期',
|
|
290
|
-
'结束日期'
|
|
291
|
-
],
|
|
292
|
-
onChange: (e)=>handleChangeForm('operate_time', e)
|
|
342
|
+
children: "重置"
|
|
293
343
|
})
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
children: [
|
|
298
|
-
/*#__PURE__*/ jsx(Button, {
|
|
299
|
-
type: "primary",
|
|
300
|
-
loading: tableLoading,
|
|
301
|
-
onClick: clickSearch,
|
|
302
|
-
children: "查询"
|
|
303
|
-
}),
|
|
304
|
-
/*#__PURE__*/ jsx(Button, {
|
|
305
|
-
onClick: reset,
|
|
306
|
-
style: {
|
|
307
|
-
marginLeft: '10px'
|
|
308
|
-
},
|
|
309
|
-
children: "重置"
|
|
310
|
-
})
|
|
311
|
-
]
|
|
312
|
-
})
|
|
313
|
-
]
|
|
314
|
-
})
|
|
344
|
+
]
|
|
345
|
+
})
|
|
346
|
+
]
|
|
315
347
|
})
|
|
316
348
|
}),
|
|
317
|
-
/*#__PURE__*/
|
|
318
|
-
className: "
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
349
|
+
/*#__PURE__*/ jsxs(BiBlock, {
|
|
350
|
+
className: "content-table",
|
|
351
|
+
children: [
|
|
352
|
+
/*#__PURE__*/ jsx(BiTable, {
|
|
353
|
+
className: "log-table",
|
|
354
|
+
loading: tableLoading,
|
|
355
|
+
data: tableData,
|
|
356
|
+
column: tableColums,
|
|
357
|
+
stickyTop: BiLogDialog ? 0 : 50,
|
|
358
|
+
pagination: false
|
|
359
|
+
}),
|
|
360
|
+
(lastId || showHistoryBtn) && /*#__PURE__*/ jsx("div", {
|
|
361
|
+
className: "log-history-btn",
|
|
362
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
363
|
+
type: "link",
|
|
364
|
+
loading: loadingMore,
|
|
365
|
+
onClick: loadNext,
|
|
366
|
+
children: loadingMore ? '加载中...' : '/log/getSummary' === currentApi ? '查询更多' : '查看历史'
|
|
367
|
+
})
|
|
368
|
+
})
|
|
369
|
+
]
|
|
330
370
|
})
|
|
331
371
|
]
|
|
332
372
|
});
|
|
@@ -11,14 +11,19 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.content-table {
|
|
14
|
+
box-sizing: border-box;
|
|
14
15
|
width: 100%;
|
|
15
16
|
padding: 15px;
|
|
16
17
|
}
|
|
18
|
+
|
|
19
|
+
.log-history-btn {
|
|
20
|
+
padding: 12px 0;
|
|
21
|
+
text-align: center;
|
|
22
|
+
}
|
|
17
23
|
}
|
|
18
24
|
.log-table {
|
|
19
25
|
border-radius: 0;
|
|
20
|
-
|
|
21
|
-
.cell {
|
|
26
|
+
.ant-table-cell {
|
|
22
27
|
p,
|
|
23
28
|
div {
|
|
24
29
|
margin: 0;
|
|
@@ -47,4 +52,4 @@
|
|
|
47
52
|
background-image: linear-gradient(rgba($color: #fff, $alpha: 0), rgba($color: #fff, $alpha: 1), rgba($color: #fff, $alpha: 1));
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
|
-
}
|
|
55
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type { BiColumns } from '../../Table';
|
|
2
|
-
export declare const useLogTableColumns: (showMoreFn: (row: any) => void, fomartOperates: (row: any) => any
|
|
2
|
+
export declare const useLogTableColumns: (showMoreFn: (row: any) => void, fomartOperates: (row: any) => any, modelOptions?: Array<{
|
|
3
|
+
id: string | number;
|
|
4
|
+
label: string;
|
|
5
|
+
}>) => Record<string, BiColumns>;
|