@zgfe/modules-settings 1.2.4-log.0 → 1.2.4-log.2
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/icons/demo.css +0 -0
- package/es/constants/icons/demo_index.html +0 -0
- package/es/constants/icons/iconfont.css +0 -0
- package/es/constants/icons/iconfont.js +0 -0
- package/es/constants/icons/iconfont.json +0 -0
- package/es/constants/icons/iconfont.ttf +0 -0
- package/es/constants/icons/iconfont.woff +0 -0
- package/es/constants/icons/iconfont.woff2 +0 -0
- package/es/modules/companySetting/cost/index.less +0 -0
- package/es/modules/companySetting/operationLog/index.js +40 -19
- package/es/modules/companySetting/operationLog/index.less +6 -0
- package/es/modules/companySetting/operationLog/util.d.ts +7 -0
- package/es/modules/companySetting/operationLog/util.js +9 -0
- package/es/modules/companySetting/wechatBinding/index.less +0 -0
- package/es/modules/personalSetting/securityLog/index.js +1 -1
- package/package.json +2 -2
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -17,6 +17,7 @@ import { DatePicker, Radio, Table } from 'antd';
|
|
|
17
17
|
import locale from 'antd/es/date-picker/locale/zh_CN';
|
|
18
18
|
import moment from 'moment';
|
|
19
19
|
import './index.less';
|
|
20
|
+
import { setColumnsList } from './util';
|
|
20
21
|
var OperationLog = function OperationLog() {
|
|
21
22
|
var classPrefix = 'operation-log-page';
|
|
22
23
|
var _useState = useState({
|
|
@@ -44,22 +45,28 @@ var OperationLog = function OperationLog() {
|
|
|
44
45
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
45
46
|
dateRange = _useState10[0],
|
|
46
47
|
setDateRange = _useState10[1];
|
|
47
|
-
var _useState11 = useState(
|
|
48
|
+
var _useState11 = useState([]),
|
|
48
49
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
tableData = _useState12[0],
|
|
51
|
+
setTableData = _useState12[1];
|
|
51
52
|
var _useState13 = useState([]),
|
|
52
53
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var
|
|
54
|
+
columns = _useState14[0],
|
|
55
|
+
setColumns = _useState14[1];
|
|
56
|
+
var columnsList = [{
|
|
56
57
|
title: '应用(应用ID)',
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
key: 'appId',
|
|
59
|
+
render: function render(_, record) {
|
|
60
|
+
if (!record.appId) return '-';
|
|
61
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, record.appName, "(", record.appId, ")");
|
|
62
|
+
}
|
|
59
63
|
}, {
|
|
60
64
|
title: '操作人(登录账号)',
|
|
61
65
|
dataIndex: 'operatorName',
|
|
62
|
-
key: 'operatorName'
|
|
66
|
+
key: 'operatorName',
|
|
67
|
+
render: function render(_, record) {
|
|
68
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, record.operatorName, "(", record.operatorEmail, ")");
|
|
69
|
+
}
|
|
63
70
|
}, {
|
|
64
71
|
title: '功能模块',
|
|
65
72
|
dataIndex: 'targetType',
|
|
@@ -68,10 +75,21 @@ var OperationLog = function OperationLog() {
|
|
|
68
75
|
title: '操作类型',
|
|
69
76
|
dataIndex: 'operationType',
|
|
70
77
|
key: 'operationType'
|
|
78
|
+
}, {
|
|
79
|
+
title: '操作结果',
|
|
80
|
+
dataIndex: 'operationResult',
|
|
81
|
+
key: 'operationResult'
|
|
71
82
|
}, {
|
|
72
83
|
title: '操作设备',
|
|
73
84
|
dataIndex: 'userAgent',
|
|
74
|
-
key: 'userAgent'
|
|
85
|
+
key: 'userAgent',
|
|
86
|
+
width: 120,
|
|
87
|
+
ellipsis: true,
|
|
88
|
+
render: function render(text) {
|
|
89
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
90
|
+
className: "".concat(classPrefix, "-columns")
|
|
91
|
+
}, text);
|
|
92
|
+
}
|
|
75
93
|
}, {
|
|
76
94
|
title: 'IP地址',
|
|
77
95
|
dataIndex: 'userAccessIp',
|
|
@@ -82,17 +100,20 @@ var OperationLog = function OperationLog() {
|
|
|
82
100
|
key: 'gmtCreate'
|
|
83
101
|
}];
|
|
84
102
|
useEffect(function () {
|
|
103
|
+
switch (logType) {
|
|
104
|
+
case '1':
|
|
105
|
+
setColumns(setColumnsList(columnsList, ['operationResult']));
|
|
106
|
+
break;
|
|
107
|
+
case '2':
|
|
108
|
+
setColumns(columnsList);
|
|
109
|
+
break;
|
|
110
|
+
case '3':
|
|
111
|
+
setColumns(setColumnsList(columnsList, ['appId']));
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
85
114
|
queryData();
|
|
86
115
|
}, [logType]);
|
|
87
116
|
useEffect(function () {
|
|
88
|
-
// if (time) clearTimeout(time);
|
|
89
|
-
// setTime(
|
|
90
|
-
// setTimeout(() => {
|
|
91
|
-
// console.log(condition, 'condition');
|
|
92
|
-
// queryLog();
|
|
93
|
-
// }, 500),
|
|
94
|
-
// );
|
|
95
|
-
console.log(condition);
|
|
96
117
|
queryLog();
|
|
97
118
|
}, [condition]);
|
|
98
119
|
function queryData() {
|
|
@@ -170,7 +191,7 @@ var OperationLog = function OperationLog() {
|
|
|
170
191
|
value: "2"
|
|
171
192
|
}, "\u64CD\u4F5C\u65E5\u5FD7"), /*#__PURE__*/React.createElement(Radio.Button, {
|
|
172
193
|
value: "3"
|
|
173
|
-
}, "\u6743\u9650\u65E5\u5FD7")), condition.year && /*#__PURE__*/React.createElement(DatePicker, {
|
|
194
|
+
}, "\u6743\u9650\u7BA1\u7406\u65E5\u5FD7")), condition.year && /*#__PURE__*/React.createElement(DatePicker, {
|
|
174
195
|
value: moment("".concat(condition.year, "-").concat(condition.month), 'YYYY-MM'),
|
|
175
196
|
picker: "month",
|
|
176
197
|
disabledDate: disabledDate,
|
|
File without changes
|
|
@@ -106,7 +106,7 @@ var SecurityLog = function SecurityLog() {
|
|
|
106
106
|
data: condition
|
|
107
107
|
}).then(function (res) {
|
|
108
108
|
if (parseInt(res === null || res === void 0 ? void 0 : res.code) == 100000) {
|
|
109
|
-
setTotal(res.data.
|
|
109
|
+
setTotal(res.data.count);
|
|
110
110
|
setTableData(res.data.logs);
|
|
111
111
|
setTableLoading(false);
|
|
112
112
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "1.2.4-log.
|
|
3
|
+
"version": "1.2.4-log.2",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"umi-request": "^1.4.0",
|
|
52
52
|
"yorkie": "^2.0.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "2f002b33243fef1dde5d165d93b07c9320d9d1a0",
|
|
55
55
|
"gitHooks": {
|
|
56
56
|
"pre-commit": "lint-staged"
|
|
57
57
|
}
|