@zgfe/modules-settings 2.1.0-zhongyuan.24 → 2.1.0-zhongyuan.26
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/es/constants/api.d.ts
CHANGED
package/es/constants/api.js
CHANGED
|
@@ -134,7 +134,9 @@ var apis = {
|
|
|
134
134
|
// 安全日志
|
|
135
135
|
securityLog: '/zg/web/v2/system/securityLog',
|
|
136
136
|
// 时间范围查询
|
|
137
|
-
getLogTime: '/zg/web/v2/system/getLogTime'
|
|
137
|
+
getLogTime: '/zg/web/v2/system/getLogTime',
|
|
138
|
+
// 导出日志
|
|
139
|
+
exportLog: 'zg/web/v2/system/exportOperationLog'
|
|
138
140
|
},
|
|
139
141
|
getPassword: {
|
|
140
142
|
validateCode: '/zg/web/v2/system/validateCode',
|
|
@@ -13,9 +13,10 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
13
13
|
import React, { useEffect, useState, useContext } from 'react';
|
|
14
14
|
import request from '../../../utils/ajax';
|
|
15
15
|
import apis from '../../../constants/api';
|
|
16
|
-
import { DatePicker, Radio, Table } from 'antd';
|
|
16
|
+
import { DatePicker, Radio, Table, Button, Space } from 'antd';
|
|
17
17
|
import locale from 'antd/es/date-picker/locale/zh_CN';
|
|
18
18
|
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
19
|
+
import { DownloadOutlined } from '@ant-design/icons';
|
|
19
20
|
import moment from 'moment';
|
|
20
21
|
import './index.less';
|
|
21
22
|
import { setColumnsList } from './util';
|
|
@@ -24,7 +25,8 @@ var OperationLog = function OperationLog() {
|
|
|
24
25
|
var classPrefix = 'operation-log-page';
|
|
25
26
|
var _useContext = useContext(BizGlobalDataContext),
|
|
26
27
|
authority = _useContext.authority,
|
|
27
|
-
basicConfig = _useContext.basicConfig
|
|
28
|
+
basicConfig = _useContext.basicConfig,
|
|
29
|
+
showProdDownload = _useContext.showProdDownload;
|
|
28
30
|
var _useState = useState({
|
|
29
31
|
page: 1,
|
|
30
32
|
size: 10,
|
|
@@ -152,6 +154,16 @@ var OperationLog = function OperationLog() {
|
|
|
152
154
|
}
|
|
153
155
|
});
|
|
154
156
|
}
|
|
157
|
+
function exportData() {
|
|
158
|
+
request(apis.log.exportLog, {
|
|
159
|
+
method: 'get',
|
|
160
|
+
params: _objectSpread({
|
|
161
|
+
type: logType
|
|
162
|
+
}, condition),
|
|
163
|
+
responseType: 'blob',
|
|
164
|
+
fileName: "\u65E5\u5FD7\u4E0B\u8F7D_".concat(moment().format('YYYYMMDD'))
|
|
165
|
+
}).then(function (res) {});
|
|
166
|
+
}
|
|
155
167
|
function queryLog() {
|
|
156
168
|
setLoading(true);
|
|
157
169
|
if (!condition.year || !condition.month) return;
|
|
@@ -209,7 +221,7 @@ var OperationLog = function OperationLog() {
|
|
|
209
221
|
}, "\u64CD\u4F5C\u65E5\u5FD7"), /*#__PURE__*/React.createElement(Radio.Button, {
|
|
210
222
|
value: "3",
|
|
211
223
|
disabled: !authority[10104]
|
|
212
|
-
}, "\u6743\u9650\u7BA1\u7406\u65E5\u5FD7")), condition.year && (/*#__PURE__*/React.createElement(DatePicker, {
|
|
224
|
+
}, "\u6743\u9650\u7BA1\u7406\u65E5\u5FD7")), /*#__PURE__*/React.createElement(Space, null, condition.year && (/*#__PURE__*/React.createElement(DatePicker, {
|
|
213
225
|
value: moment("".concat(condition.year, "-").concat(condition.month), 'YYYY-MM'),
|
|
214
226
|
picker: "month",
|
|
215
227
|
disabledDate: disabledDate,
|
|
@@ -217,7 +229,12 @@ var OperationLog = function OperationLog() {
|
|
|
217
229
|
onChange: onChangeTime,
|
|
218
230
|
inputReadOnly: true,
|
|
219
231
|
allowClear: false
|
|
220
|
-
}))
|
|
232
|
+
})), showProdDownload && (/*#__PURE__*/React.createElement(Button, {
|
|
233
|
+
shape: "circle",
|
|
234
|
+
icon: /*#__PURE__*/React.createElement(DownloadOutlined, null),
|
|
235
|
+
size: "middle",
|
|
236
|
+
onClick: exportData
|
|
237
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
221
238
|
className: "".concat(classPrefix, "-table")
|
|
222
239
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
223
240
|
columns: columns,
|
|
@@ -138,7 +138,7 @@ var UserGroup = function UserGroup(props) {
|
|
|
138
138
|
setCreateAppLoading(true);
|
|
139
139
|
var msg = '';
|
|
140
140
|
var params = _objectSpread(_objectSpread({}, value), {}, {
|
|
141
|
-
password: "
|
|
141
|
+
password: "Aa111111",
|
|
142
142
|
id: userEditAuthData === null || userEditAuthData === void 0 ? void 0 : userEditAuthData.id,
|
|
143
143
|
roleIds: value === null || value === void 0 ? void 0 : (_value$roleIds = value.roleIds) === null || _value$roleIds === void 0 ? void 0 : _value$roleIds.map(function (item) {
|
|
144
144
|
return item.id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "2.1.0-zhongyuan.
|
|
3
|
+
"version": "2.1.0-zhongyuan.26",
|
|
4
4
|
"private": false,
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "86bcf2972cd5b67b250b767d9a79909e2d99a5ba",
|
|
71
71
|
"gitHooks": {
|
|
72
72
|
"pre-commit": "lint-staged"
|
|
73
73
|
}
|