dlt-for-react 2.3.4 → 2.3.5
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/README.md +4 -0
- package/lib/components/HqCascader/index.js +4 -6
- package/lib/components/HqCheckBox/index.js +2 -4
- package/lib/components/HqInputPicker/render.js +3 -1
- package/lib/components/HqMultiSelect/index.js +2 -4
- package/lib/components/HqSelect/getSelectName.js +2 -6
- package/lib/components/HqSelect/index.js +3 -5
- package/lib/components/HqSelector/NHSelector/resultview/index.js +1 -1
- package/lib/components/HqSelector/NHSelector/table/index.js +1 -1
- package/lib/components/HqSelector/NHSelector/tree/index.js +1 -1
- package/lib/components/HqSwitch/index.js +2 -4
- package/lib/components/KyCheckBox/index.js +2 -4
- package/lib/components/KyExcel/index.js +2 -2
- package/lib/components/KyTable/highSelect.js +2 -4
- package/lib/components/KyTable/index.js +5 -7
- package/lib/components/KyTableCardList/highSelect.js +2 -4
- package/lib/components/KyTableCardList/index.js +2 -2
- package/lib/components/KyTree/index.js +2 -2
- package/lib/components/KyUpload/index.js +5 -5
- package/lib/index.js +105 -0
- package/lib/layouts/Login/index-pre.js +1 -1
- package/lib/layouts/Login/index.js +1 -1
- package/lib/layouts/Login/login.js +1 -1
- package/lib/layouts/Top/index.js +1 -1
- package/lib/layouts/layout/index.js +3 -3
- package/lib/layouts/mixTop/index.js +1 -1
- package/lib/utils/AxiosUtil.js +534 -0
- package/lib/utils/NHCore.js +3 -1
- package/lib/utils/NHFetch.js +67 -221
- package/lib/utils/env.js +29 -0
- package/lib/utils/toFormDesignPage.js +2 -6
- package/lib/utils/toFormFillingPage.js +2 -6
- package/lib/utils/toProcessApplyPage.js +2 -6
- package/lib/utils/toProcessDesignPage.js +3 -7
- package/lib/utils/toProcessVerifyPage.js +2 -6
- package/lib/utils/toProcessViewPage.js +2 -6
- package/lib/utils/user.js +80 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -13,6 +13,10 @@ npm publish
|
|
|
13
13
|
> npm install dlt-for-react --save
|
|
14
14
|
|
|
15
15
|
##### 版本修改记录
|
|
16
|
+
#### V2.3.5—2026 年 7 月 17 日
|
|
17
|
+
1. 新增 AxiosUtil 请求工具(含 nhFetch),项目内部统一使用 nhFetch 替代 NHFetch
|
|
18
|
+
2. 保留原版 NHFetch.js 供外部兼容引用
|
|
19
|
+
|
|
16
20
|
#### V2.3.4—2026 年 7 月 16 日
|
|
17
21
|
1. 优化 NHFetch 请求头与网关 3.0 token 刷新逻辑,修复代理接口 302 异常
|
|
18
22
|
|
|
@@ -39,9 +39,7 @@ var _react = require("react");
|
|
|
39
39
|
|
|
40
40
|
var _react2 = _interopRequireDefault(_react);
|
|
41
41
|
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
42
|
+
var _AxiosUtil = require("../../utils/AxiosUtil");
|
|
45
43
|
|
|
46
44
|
var _propTypes = require("prop-types");
|
|
47
45
|
|
|
@@ -172,7 +170,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
172
170
|
|
|
173
171
|
var params = (0, _extends3.default)({}, _this3.props.params, { level: level, sign: sign, cascaderValue: cascaderValue });
|
|
174
172
|
params.t = new Date().getTime();
|
|
175
|
-
(0,
|
|
173
|
+
(0, _AxiosUtil.nhFetch)((baseUrl === undefined ? "" : baseUrl) + (flexibleUrl ? flexibleUrl : "/proData/selectCascaderList"), "GET", params).then(function (res) {
|
|
176
174
|
if (res) {
|
|
177
175
|
var data = res.data;
|
|
178
176
|
if (data) {
|
|
@@ -219,7 +217,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
219
217
|
value: value
|
|
220
218
|
};
|
|
221
219
|
params.t = new Date().getTime();
|
|
222
|
-
(0,
|
|
220
|
+
(0, _AxiosUtil.nhFetch)((baseUrl === undefined ? "" : baseUrl) + "/proData/selectValues", "GET", params).then(function (res) {
|
|
223
221
|
if (res && res.code === 200 && res.data) {
|
|
224
222
|
_this3.setState({ value: res.data }, callback);
|
|
225
223
|
}
|
|
@@ -242,7 +240,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
242
240
|
|
|
243
241
|
var params = (0, _extends3.default)({}, _this3.props.params, { level: level, sign: sign, cascaderValue: cascaderValue });
|
|
244
242
|
params.t = new Date().getTime();
|
|
245
|
-
(0,
|
|
243
|
+
(0, _AxiosUtil.nhFetch)((baseUrl === undefined ? "" : baseUrl) + (flexibleUrl ? flexibleUrl : "/proData/selectCascaderList"), "GET", params).then(function (res) {
|
|
246
244
|
if (res) {
|
|
247
245
|
if (res.data) {
|
|
248
246
|
if (targetOption) {
|
|
@@ -54,9 +54,7 @@ var _propTypes = require("prop-types");
|
|
|
54
54
|
|
|
55
55
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
56
56
|
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
57
|
+
var _AxiosUtil = require("../../utils/AxiosUtil");
|
|
60
58
|
|
|
61
59
|
var _equalsObj = require("../../utils/equalsObj");
|
|
62
60
|
|
|
@@ -113,7 +111,7 @@ var HqCheckBox = function (_React$Component) {
|
|
|
113
111
|
if (!sign) {
|
|
114
112
|
_this.getCustomDataSource();
|
|
115
113
|
} else {
|
|
116
|
-
(0,
|
|
114
|
+
(0, _AxiosUtil.nhFetch)((baseUrl === undefined ? "" : baseUrl) + pathUrl, "GET", {
|
|
117
115
|
sign: sign,
|
|
118
116
|
t: new Date().getTime()
|
|
119
117
|
}).then(function (res) {
|
|
@@ -181,6 +181,8 @@ var _zh_CN2 = _interopRequireDefault(_zh_CN);
|
|
|
181
181
|
|
|
182
182
|
require("moment/locale/zh-cn");
|
|
183
183
|
|
|
184
|
+
var _AxiosUtil = require("../../utils/AxiosUtil");
|
|
185
|
+
|
|
184
186
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
185
187
|
|
|
186
188
|
var TextArea = _input2.default.TextArea;
|
|
@@ -491,7 +493,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
491
493
|
}
|
|
492
494
|
|
|
493
495
|
_context.next = 5;
|
|
494
|
-
return
|
|
496
|
+
return (0, _AxiosUtil.nhFetch)("/outer/getCsszByCsbz", "GET", {
|
|
495
497
|
csbz: "XTGL_TSZF"
|
|
496
498
|
});
|
|
497
499
|
|
|
@@ -60,9 +60,7 @@ var _propTypes = require("prop-types");
|
|
|
60
60
|
|
|
61
61
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
62
62
|
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
63
|
+
var _AxiosUtil = require("../../utils/AxiosUtil");
|
|
66
64
|
|
|
67
65
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
68
66
|
|
|
@@ -261,7 +259,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
261
259
|
this.loadRemoteData = function (sign) {
|
|
262
260
|
var baseUrl = _this3.props.baseUrl;
|
|
263
261
|
_this3.setState({ loading: true });
|
|
264
|
-
(0,
|
|
262
|
+
(0, _AxiosUtil.nhFetch)((baseUrl === undefined ? "" : baseUrl) + "/proData/selectDataList", "GET", { sign: sign, t: new Date().getTime() }).then(function (res) {
|
|
265
263
|
if (res) {
|
|
266
264
|
_this3.parseData(res.data);
|
|
267
265
|
_this3.setState({ loading: false });
|
|
@@ -4,14 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
10
|
-
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
7
|
+
var _AxiosUtil = require('../../utils/AxiosUtil');
|
|
12
8
|
|
|
13
9
|
var getSelectName = function getSelectName(sign, values) {
|
|
14
|
-
return (0,
|
|
10
|
+
return (0, _AxiosUtil.nhFetch)('/proData/getSelectName', 'get', { sign: sign, values: typeof values == 'string' ? values : values.join(','), t: new Date().getTime() }).then(function (res) {
|
|
15
11
|
if (res) {
|
|
16
12
|
return res.data;
|
|
17
13
|
}return '';
|
|
@@ -61,9 +61,7 @@ var _propTypes = require("prop-types");
|
|
|
61
61
|
|
|
62
62
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
63
63
|
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
64
|
+
var _AxiosUtil = require("../../utils/AxiosUtil");
|
|
67
65
|
|
|
68
66
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
69
67
|
|
|
@@ -276,7 +274,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
276
274
|
params = _props3.params,
|
|
277
275
|
baseUrl = _props3.baseUrl;
|
|
278
276
|
|
|
279
|
-
(0,
|
|
277
|
+
(0, _AxiosUtil.nhFetch)(baseUrl + flexibleUrl, "GET", params).then(function (res) {
|
|
280
278
|
if (res) {
|
|
281
279
|
_this2.parseData(res.data);
|
|
282
280
|
_this2.setState({ loading: false });
|
|
@@ -292,7 +290,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
292
290
|
params = _props4.params;
|
|
293
291
|
|
|
294
292
|
_this2.setState({ loading: true });
|
|
295
|
-
(0,
|
|
293
|
+
(0, _AxiosUtil.nhFetch)((baseUrl === undefined ? "" : baseUrl) + "/proData/selectDataList", "GET", (0, _extends3.default)({ sign: sign }, params, { t: new Date().getTime() })).then(function (res) {
|
|
296
294
|
if (res) {
|
|
297
295
|
_this2.parseData(res.data);
|
|
298
296
|
_this2.setState({ loading: false });
|
|
@@ -72,7 +72,7 @@ var ResultView = exports.ResultView = function (_React$Component) {
|
|
|
72
72
|
if (_this.props.mode !== "tree") {
|
|
73
73
|
params.sqlParams = _this.props.sqlParams;
|
|
74
74
|
}
|
|
75
|
-
(0, _index3.
|
|
75
|
+
(0, _index3.nhFetch)(_this.props.url, "POST", params).then(function (res) {
|
|
76
76
|
if (res && res.data) {
|
|
77
77
|
var selectRows = [];
|
|
78
78
|
var selectRowKeys = [];
|
|
@@ -533,7 +533,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
533
533
|
var params = _this3.getFilterParams();
|
|
534
534
|
_this3.setState({ loading: true });
|
|
535
535
|
var url = _this3.props.url;
|
|
536
|
-
(0, _index.
|
|
536
|
+
(0, _index.nhFetch)(url, "POST", params).then(function (res) {
|
|
537
537
|
if (res) {
|
|
538
538
|
_this3.setState({
|
|
539
539
|
data: res.data.list,
|
|
@@ -215,7 +215,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
215
215
|
|
|
216
216
|
this.getData = function () {
|
|
217
217
|
var obj = _this3;
|
|
218
|
-
(0, _index.
|
|
218
|
+
(0, _index.nhFetch)(_this3.props.url, "POST", {
|
|
219
219
|
keyField: _this3.props.keyField,
|
|
220
220
|
params: _this3.props.params,
|
|
221
221
|
sign: _this3.props.sign,
|
|
@@ -38,9 +38,7 @@ var _propTypes = require("prop-types");
|
|
|
38
38
|
|
|
39
39
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
40
40
|
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
41
|
+
var _AxiosUtil = require("../../utils/AxiosUtil");
|
|
44
42
|
|
|
45
43
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
46
44
|
|
|
@@ -181,7 +179,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
181
179
|
|
|
182
180
|
this.getDataSource = function (sign) {
|
|
183
181
|
if (sign) {
|
|
184
|
-
(0,
|
|
182
|
+
(0, _AxiosUtil.nhFetch)(pathUrl, "GET", { sign: sign, t: new Date().getTime() }).then(function (res) {
|
|
185
183
|
if (res) {
|
|
186
184
|
var data = res.data;
|
|
187
185
|
if (data) {
|
|
@@ -54,9 +54,7 @@ var _propTypes = require("prop-types");
|
|
|
54
54
|
|
|
55
55
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
56
56
|
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
57
|
+
var _AxiosUtil = require("../../utils/AxiosUtil");
|
|
60
58
|
|
|
61
59
|
var _equalsObj = require("../../utils/equalsObj");
|
|
62
60
|
|
|
@@ -115,7 +113,7 @@ var KyCheckBox = function (_React$Component) {
|
|
|
115
113
|
interfaceUrl = _this$props.interfaceUrl;
|
|
116
114
|
|
|
117
115
|
var path = baseUrl + interfaceUrl;
|
|
118
|
-
(0,
|
|
116
|
+
(0, _AxiosUtil.nhFetch)(path, 'GET', { sign: sign, t: new Date().getTime() }).then(function (res) {
|
|
119
117
|
if (res) {
|
|
120
118
|
var data = res.data;
|
|
121
119
|
if (data) {
|
|
@@ -161,7 +161,7 @@ var KyExcel = function (_Component) {
|
|
|
161
161
|
_this.setState({ importStatus: "error" });
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
|
-
(0, _index.
|
|
164
|
+
(0, _index.nhFetch)(_this.props.importUrl, "POST", params).then(function (res) {
|
|
165
165
|
if (res) {
|
|
166
166
|
if (res.code && res.code === 200) {
|
|
167
167
|
var errorFileName = undefined;
|
|
@@ -224,7 +224,7 @@ var KyExcel = function (_Component) {
|
|
|
224
224
|
|
|
225
225
|
_this.loadProcessStatus = function () {
|
|
226
226
|
var baseUrl = _this.props.baseUrl || window.baseUrl;
|
|
227
|
-
(0, _index.
|
|
227
|
+
(0, _index.nhFetch)(baseUrl + "/proData/getProgressStatus", "GET", {
|
|
228
228
|
uuid: _this.state.uuid,
|
|
229
229
|
t: new Date().getTime()
|
|
230
230
|
}).then(function (res) {
|
|
@@ -64,9 +64,7 @@ var _propTypes = require('prop-types');
|
|
|
64
64
|
|
|
65
65
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
66
66
|
|
|
67
|
-
var
|
|
68
|
-
|
|
69
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
67
|
+
var _AxiosUtil = require('../../utils/AxiosUtil');
|
|
70
68
|
|
|
71
69
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
72
70
|
|
|
@@ -147,7 +145,7 @@ var HighSelect = function (_React$Component) {
|
|
|
147
145
|
_this.loadRemoteData = function (sign) {
|
|
148
146
|
var baseUrl = _this.props.baseUrl;
|
|
149
147
|
_this.setState({ loading: true });
|
|
150
|
-
(0,
|
|
148
|
+
(0, _AxiosUtil.nhFetch)((baseUrl === undefined ? '' : baseUrl) + '/proData/selectDataList', 'GET', {
|
|
151
149
|
sign: sign,
|
|
152
150
|
t: new Date().getTime()
|
|
153
151
|
}).then(function (res) {
|
|
@@ -119,9 +119,7 @@ var _KyModal = require('../KyModal');
|
|
|
119
119
|
|
|
120
120
|
var _KyModal2 = _interopRequireDefault(_KyModal);
|
|
121
121
|
|
|
122
|
-
var
|
|
123
|
-
|
|
124
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
122
|
+
var _AxiosUtil = require('../../utils/AxiosUtil');
|
|
125
123
|
|
|
126
124
|
var _textGroup = require('./textGroup');
|
|
127
125
|
|
|
@@ -1195,7 +1193,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
1195
1193
|
params = tableParam;
|
|
1196
1194
|
} else {
|
|
1197
1195
|
var t = new Date().getTime();
|
|
1198
|
-
(0,
|
|
1196
|
+
(0, _AxiosUtil.nhFetch)(_this4.props.baseUrl + '/proData/queryAllConfig', 'GET', t).then(function (res) {
|
|
1199
1197
|
if (res && res.code === 200) {
|
|
1200
1198
|
var _tableParam = res.data.table[_this4.props.sign];
|
|
1201
1199
|
if (_tableParam) {
|
|
@@ -1552,7 +1550,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
1552
1550
|
// if (flag && this.props.columns) {
|
|
1553
1551
|
// this.adjustColumnWidth(); // 先进行调整,否则表头内容都会挤到一起
|
|
1554
1552
|
// }
|
|
1555
|
-
(0,
|
|
1553
|
+
(0, _AxiosUtil.nhFetch)(url, 'POST', params).then(function (res) {
|
|
1556
1554
|
var height = _this4.state.height;
|
|
1557
1555
|
|
|
1558
1556
|
if (res) {
|
|
@@ -1617,7 +1615,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
1617
1615
|
}, 500);
|
|
1618
1616
|
} else {
|
|
1619
1617
|
var url = _this4.state.params.url ? _this4.state.params.url : baseUrl + '/proData/gridList';
|
|
1620
|
-
(0,
|
|
1618
|
+
(0, _AxiosUtil.nhFetch)(url, 'POST', params).then(function (res) {
|
|
1621
1619
|
if (res) {
|
|
1622
1620
|
_this4.setState({
|
|
1623
1621
|
hightSearchData: res.data ? res.data.list : [],
|
|
@@ -1726,7 +1724,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
1726
1724
|
var baseUrl = _this4.props.baseUrl || window.baseUrl || '';
|
|
1727
1725
|
var exportExcelCacheDataUrl = _this4.props.exportExcelCacheDataUrl || '';
|
|
1728
1726
|
var cacheDataUrl = exportExcelCacheDataUrl ? exportExcelCacheDataUrl : '/proData/gridList/excel/params';
|
|
1729
|
-
(0,
|
|
1727
|
+
(0, _AxiosUtil.nhFetch)(baseUrl + cacheDataUrl, 'POST', params).then(function (res) {
|
|
1730
1728
|
if (res) {
|
|
1731
1729
|
if (!res.data) {
|
|
1732
1730
|
_message3.default.info('请刷新浏览器,重新再执行此操作!');
|
|
@@ -58,9 +58,7 @@ var _propTypes = require("prop-types");
|
|
|
58
58
|
|
|
59
59
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
60
60
|
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
61
|
+
var _AxiosUtil = require("../../utils/AxiosUtil");
|
|
64
62
|
|
|
65
63
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
66
64
|
|
|
@@ -103,7 +101,7 @@ var HighSelect = function (_React$Component) {
|
|
|
103
101
|
|
|
104
102
|
_this.loadRemoteData = function (sign) {
|
|
105
103
|
var baseUrl = _this.props.baseUrl || "";
|
|
106
|
-
(0,
|
|
104
|
+
(0, _AxiosUtil.nhFetch)(baseUrl + "/proData/selectDataList", "GET", {
|
|
107
105
|
sign: sign,
|
|
108
106
|
t: new Date().getTime()
|
|
109
107
|
}).then(function (res) {
|
|
@@ -196,7 +196,7 @@ var KyTableCardList = function (_React$Component) {
|
|
|
196
196
|
};
|
|
197
197
|
var url_final = baseUrl + "/proData/gridList";
|
|
198
198
|
url_final = url || url_final;
|
|
199
|
-
(0, _index.
|
|
199
|
+
(0, _index.nhFetch)(url_final, "POST", params).then(function (res) {
|
|
200
200
|
if (res) {
|
|
201
201
|
_this.setState({
|
|
202
202
|
hightSearchData: res.data ? res.data.list : []
|
|
@@ -292,7 +292,7 @@ var KyTableCardList = function (_React$Component) {
|
|
|
292
292
|
onDataLoadFinish = _this$props2.onDataLoadFinish;
|
|
293
293
|
|
|
294
294
|
baseUrl = url || baseUrl || window.baseUrl || "";
|
|
295
|
-
(0, _index.
|
|
295
|
+
(0, _index.nhFetch)(baseUrl + "/proData/gridList", "POST", params).then(function (res) {
|
|
296
296
|
_this.setState({
|
|
297
297
|
data: res.data ? res.data.list : [],
|
|
298
298
|
selectedRowKeys: [],
|
|
@@ -417,7 +417,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
417
417
|
var obj = _this3;
|
|
418
418
|
var baseUrl = _this3.props.baseUrl;
|
|
419
419
|
var url = _this3.props.url ? _this3.props.url : (baseUrl || window.baseUrl || "") + "/proData/getTreeList";
|
|
420
|
-
(0, _index.
|
|
420
|
+
(0, _index.nhFetch)(url, "POST", {
|
|
421
421
|
params: _this3.props.params,
|
|
422
422
|
sqlParams: _this3.props.sqlParams,
|
|
423
423
|
sign: _this3.props.sign
|
|
@@ -457,7 +457,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
457
457
|
params = treeParam;
|
|
458
458
|
} else {
|
|
459
459
|
var t = new Date().getTime();
|
|
460
|
-
(0, _index.
|
|
460
|
+
(0, _index.nhFetch)(_this3.props.baseUrl + "/proData/queryAllConfig", "GET", t).then(function (res) {
|
|
461
461
|
if (res && res.code === 200) {
|
|
462
462
|
var _treeParam = res.data.tree[_this3.props.sign];
|
|
463
463
|
if (_treeParam) {
|
|
@@ -182,7 +182,7 @@ var KyUpload = function (_React$Component) {
|
|
|
182
182
|
this.setState({ value: value, fileList: [] });
|
|
183
183
|
var t = new Date().getTime();
|
|
184
184
|
// 获取动态文件
|
|
185
|
-
(0, _index.
|
|
185
|
+
(0, _index.nhFetch)(this.state.xtglUrl + '/dynamic/' + value + '/getDetailed', 'GET', t).then(function (res) {
|
|
186
186
|
if (res && res.data && res.data.length > 0) {
|
|
187
187
|
_this2.handleFileList(res.data);
|
|
188
188
|
}
|
|
@@ -214,7 +214,7 @@ var KyUpload = function (_React$Component) {
|
|
|
214
214
|
var value = this.state.value;
|
|
215
215
|
if (newValue !== value) return;
|
|
216
216
|
var t = new Date().getTime();
|
|
217
|
-
(0, _index.
|
|
217
|
+
(0, _index.nhFetch)(this.state.xtglUrl + '/dynamic/' + value + '/getDetailed', 'GET', t).then(function (res) {
|
|
218
218
|
if (res && res.data && res.data.length > 0) {
|
|
219
219
|
_this3.handleFileList(res.data);
|
|
220
220
|
}
|
|
@@ -245,7 +245,7 @@ var KyUpload = function (_React$Component) {
|
|
|
245
245
|
case 0:
|
|
246
246
|
params = ['KY_FJFWBZ', 'KY_FJYLBZ'];
|
|
247
247
|
_context.next = 3;
|
|
248
|
-
return (0, _index.
|
|
248
|
+
return (0, _index.nhFetch)(this.state.xtglUrl + '/common/parameters/get', 'POST', params);
|
|
249
249
|
|
|
250
250
|
case 3:
|
|
251
251
|
res = _context.sent;
|
|
@@ -795,7 +795,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
795
795
|
if (defaultEffective) {
|
|
796
796
|
param.ztm = '1';
|
|
797
797
|
}
|
|
798
|
-
(0, _index.
|
|
798
|
+
(0, _index.nhFetch)(_this5.state.xtglUrl + '/dynamic/insert', 'POST', param).then(function (res) {
|
|
799
799
|
if (res && res.code === 200) {
|
|
800
800
|
// 插入主表成功后 去掉将size设置为false,size存在应该为上传阶段的,若存在则未成功保存到接口,getResult时将去掉当前数据
|
|
801
801
|
fileList.map(function (item) {
|
|
@@ -870,7 +870,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
870
870
|
fileList = _this5.filterCurrentFile(e.fileList, e.file);
|
|
871
871
|
} else if (e.file.status === 'removed') {
|
|
872
872
|
//删除
|
|
873
|
-
(0, _index.
|
|
873
|
+
(0, _index.nhFetch)(_this5.state.xtglUrl + '/dynamic/updateDel', 'POST', { fjid: e.file.uid }).then(function (res) {
|
|
874
874
|
if (res && res.code === 200) {
|
|
875
875
|
_this5.getResult(fileList);
|
|
876
876
|
} else {
|
package/lib/index.js
CHANGED
|
@@ -451,6 +451,111 @@ Object.defineProperty(exports, 'NHFetch', {
|
|
|
451
451
|
}
|
|
452
452
|
});
|
|
453
453
|
|
|
454
|
+
var _AxiosUtil = require('./utils/AxiosUtil.js');
|
|
455
|
+
|
|
456
|
+
Object.defineProperty(exports, 'nhFetch', {
|
|
457
|
+
enumerable: true,
|
|
458
|
+
get: function get() {
|
|
459
|
+
return _AxiosUtil.nhFetch;
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
Object.defineProperty(exports, 'query', {
|
|
463
|
+
enumerable: true,
|
|
464
|
+
get: function get() {
|
|
465
|
+
return _AxiosUtil.query;
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
Object.defineProperty(exports, 'queryCancel', {
|
|
469
|
+
enumerable: true,
|
|
470
|
+
get: function get() {
|
|
471
|
+
return _AxiosUtil.queryCancel;
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
Object.defineProperty(exports, 'exportDataExcel', {
|
|
475
|
+
enumerable: true,
|
|
476
|
+
get: function get() {
|
|
477
|
+
return _AxiosUtil.exportDataExcel;
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
Object.defineProperty(exports, 'exportTemplateExcel', {
|
|
481
|
+
enumerable: true,
|
|
482
|
+
get: function get() {
|
|
483
|
+
return _AxiosUtil.exportTemplateExcel;
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
Object.defineProperty(exports, 'importExcel', {
|
|
487
|
+
enumerable: true,
|
|
488
|
+
get: function get() {
|
|
489
|
+
return _AxiosUtil.importExcel;
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
Object.defineProperty(exports, 'post', {
|
|
493
|
+
enumerable: true,
|
|
494
|
+
get: function get() {
|
|
495
|
+
return _AxiosUtil.post;
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
Object.defineProperty(exports, 'postForm', {
|
|
499
|
+
enumerable: true,
|
|
500
|
+
get: function get() {
|
|
501
|
+
return _AxiosUtil.postForm;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
Object.defineProperty(exports, 'get', {
|
|
505
|
+
enumerable: true,
|
|
506
|
+
get: function get() {
|
|
507
|
+
return _AxiosUtil.get;
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
Object.defineProperty(exports, 'insert', {
|
|
511
|
+
enumerable: true,
|
|
512
|
+
get: function get() {
|
|
513
|
+
return _AxiosUtil.insert;
|
|
514
|
+
}
|
|
515
|
+
});
|
|
516
|
+
Object.defineProperty(exports, 'update', {
|
|
517
|
+
enumerable: true,
|
|
518
|
+
get: function get() {
|
|
519
|
+
return _AxiosUtil.update;
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
Object.defineProperty(exports, 'remove', {
|
|
523
|
+
enumerable: true,
|
|
524
|
+
get: function get() {
|
|
525
|
+
return _AxiosUtil.remove;
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
Object.defineProperty(exports, 'requestAll', {
|
|
529
|
+
enumerable: true,
|
|
530
|
+
get: function get() {
|
|
531
|
+
return _AxiosUtil.requestAll;
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
Object.defineProperty(exports, 'checkRefresh', {
|
|
535
|
+
enumerable: true,
|
|
536
|
+
get: function get() {
|
|
537
|
+
return _AxiosUtil.checkRefresh;
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
Object.defineProperty(exports, 'expiredTips', {
|
|
541
|
+
enumerable: true,
|
|
542
|
+
get: function get() {
|
|
543
|
+
return _AxiosUtil.expiredTips;
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
Object.defineProperty(exports, 'setEnvs', {
|
|
547
|
+
enumerable: true,
|
|
548
|
+
get: function get() {
|
|
549
|
+
return _AxiosUtil.setEnvs;
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
Object.defineProperty(exports, 'getEnv', {
|
|
553
|
+
enumerable: true,
|
|
554
|
+
get: function get() {
|
|
555
|
+
return _AxiosUtil.getEnv;
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
|
|
454
559
|
var _base = require('./utils/base64.js');
|
|
455
560
|
|
|
456
561
|
Object.defineProperty(exports, 'Base64', {
|
|
@@ -168,7 +168,7 @@ var LoginPage = function (_React$Component) {
|
|
|
168
168
|
|
|
169
169
|
//获取版权信息
|
|
170
170
|
if (this.props.config.copyright && this.props.config.copyright.startsWith("front/")) {
|
|
171
|
-
(0, _index.
|
|
171
|
+
(0, _index.nhFetch)(this.props.config.copyright, "GET").then(function (res) {
|
|
172
172
|
if (res) {
|
|
173
173
|
_this2.setState({
|
|
174
174
|
copyright: res.data,
|
|
@@ -372,7 +372,7 @@ var LoginPage = function (_React$Component) {
|
|
|
372
372
|
|
|
373
373
|
//获取版权信息
|
|
374
374
|
if (this.props.config.copyright && this.props.config.copyright.startsWith("api/")) {
|
|
375
|
-
(0, _index.
|
|
375
|
+
(0, _index.nhFetch)(this.props.config.copyright, "GET").then(function (res) {
|
|
376
376
|
if (res) {
|
|
377
377
|
_this2.setState({
|
|
378
378
|
copyright: res.data,
|
|
@@ -492,7 +492,7 @@ var sso = function sso(func, allMenu, notConf) {
|
|
|
492
492
|
var ticket = getHashParam('ticket');
|
|
493
493
|
var originServiceUrl = window.location.origin + window.location.pathname + '#/index';
|
|
494
494
|
var _service = encodeURIComponent(originServiceUrl);
|
|
495
|
-
(0, _index.
|
|
495
|
+
(0, _index.nhFetch)('cas/login', 'GET', {
|
|
496
496
|
ticket: ticket,
|
|
497
497
|
serviceUrl: _service
|
|
498
498
|
}).then(function (res) {
|
package/lib/layouts/Top/index.js
CHANGED
|
@@ -187,7 +187,7 @@ var Home = function (_React$Component) {
|
|
|
187
187
|
|
|
188
188
|
//修改密码
|
|
189
189
|
var baseUrl = window.xtglUrl || "api/hq-xtgl";
|
|
190
|
-
(0, _index.
|
|
190
|
+
(0, _index.nhFetch)(baseUrl + "/outer/users/password/update?oldPassword=" + oldPwd + "&newPassword=" + newPwd, "post", {}).then(function (res) {
|
|
191
191
|
if (res && res.data.meta["success"]) {
|
|
192
192
|
_this.passWordForm.resetFields();
|
|
193
193
|
_this.nhEditPassWordModal.close();
|
|
@@ -177,7 +177,7 @@ var NHLayout = function (_React$Component) {
|
|
|
177
177
|
|
|
178
178
|
_this.getFwmc = function (fwmcUrl) {
|
|
179
179
|
return new _promise2.default(function (resolve, reject) {
|
|
180
|
-
(0, _index.
|
|
180
|
+
(0, _index.nhFetch)(fwmcUrl, "GET").then(function (res) {
|
|
181
181
|
if (res && res.code === 200) {
|
|
182
182
|
resolve(res.data);
|
|
183
183
|
}
|
|
@@ -188,7 +188,7 @@ var NHLayout = function (_React$Component) {
|
|
|
188
188
|
_this.getLayoutSetting = function () {
|
|
189
189
|
_this.setState({ layoutShow: false });
|
|
190
190
|
var baseUrl = window.xtglUrl || "api/hq-xtgl";
|
|
191
|
-
(0, _index.
|
|
191
|
+
(0, _index.nhFetch)(baseUrl + "/outer/getCsszByCsbz", "GET", {
|
|
192
192
|
csbz: "XTGL_LAYOUT_SETTING"
|
|
193
193
|
}).then(function (res) {
|
|
194
194
|
if (res && res.code === 200 && res.data) {
|
|
@@ -321,7 +321,7 @@ var NHLayout = function (_React$Component) {
|
|
|
321
321
|
}
|
|
322
322
|
var prams = [{ csszxid: csszxid, csz: (0, _stringify2.default)(setting) }];
|
|
323
323
|
var baseUrl = window.xtglUrl || "api/hq-xtgl";
|
|
324
|
-
(0, _index.
|
|
324
|
+
(0, _index.nhFetch)(baseUrl + "/parameterSetting/updateMulti", "POST", prams).then(function (res) {
|
|
325
325
|
if (res && res.code === 200) {
|
|
326
326
|
_message3.default.success("Layout配置项保存成功!");
|
|
327
327
|
}
|
|
@@ -177,7 +177,7 @@ var MixTop = function (_React$Component) {
|
|
|
177
177
|
var oldPwd = (0, _rsa.encryptedString)(key, oldPassWord);
|
|
178
178
|
var baseUrl = window.xtglUrl || "api/hq-xtgl";
|
|
179
179
|
//修改密码
|
|
180
|
-
(0, _index.
|
|
180
|
+
(0, _index.nhFetch)(baseUrl + "/outer/users/password/update?oldPassword=" + oldPwd + "&newPassword=" + newPwd, "post", {}).then(function (res) {
|
|
181
181
|
if (res && res.data.meta["success"]) {
|
|
182
182
|
_this.passWordForm.resetFields();
|
|
183
183
|
_this.nhEditPassWordModal.close();
|