@zgfe/modules-settings 2.1.0-zhongyuan.25 → 2.1.0-zhongyuan.27

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.
@@ -109,6 +109,7 @@ declare let apis: {
109
109
  operationLog: string;
110
110
  securityLog: string;
111
111
  getLogTime: string;
112
+ exportLog: string;
112
113
  };
113
114
  getPassword: {
114
115
  validateCode: string;
@@ -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
- }))), /*#__PURE__*/React.createElement("div", {
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,
@@ -250,6 +250,12 @@ var PageInfo = function PageInfo(props) {
250
250
  });
251
251
  return;
252
252
  }
253
+ if (!imgUrl) {
254
+ notification.warning({
255
+ message: '请选择页面图示'
256
+ });
257
+ return;
258
+ }
253
259
  if (eventAttrList.filter(function (item) {
254
260
  return !item.eventId;
255
261
  }).length) {
@@ -1006,7 +1012,11 @@ var PageInfo = function PageInfo(props) {
1006
1012
  }
1007
1013
  }, /*#__PURE__*/React.createElement("div", {
1008
1014
  className: "".concat(classPrefix, "-info-title")
1009
- }, "\u9875\u9762\u56FE\u793A"), /*#__PURE__*/React.createElement("div", {
1015
+ }, /*#__PURE__*/React.createElement("span", {
1016
+ style: {
1017
+ color: '#FB5547'
1018
+ }
1019
+ }, "*"), "\u9875\u9762\u56FE\u793A"), /*#__PURE__*/React.createElement("div", {
1010
1020
  className: "".concat(classPrefix, "-info-input")
1011
1021
  }, !imgPath ? (/*#__PURE__*/React.createElement(Upload, _objectSpread({}, uploadProps), /*#__PURE__*/React.createElement("div", {
1012
1022
  className: "".concat(classPrefix, "-info-upload")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "2.1.0-zhongyuan.25",
3
+ "version": "2.1.0-zhongyuan.27",
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": "f9bbe18ea9f27c0a392e59cea858f430bea25292",
70
+ "gitHead": "3e2d9de580341a65655b6f932c6fe5f2684c2a26",
71
71
  "gitHooks": {
72
72
  "pre-commit": "lint-staged"
73
73
  }