ls-pro-common 3.0.91 → 3.0.93
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/common.js +1 -1
- package/dist/common.min.js +1 -1
- package/es/components/AreaCascader.js +2 -2
- package/es/components/AreaCascaderPanel.js +2 -1
- package/es/components/InputTable.js +3 -0
- package/es/http/index.js +1 -1
- package/es/utils/index.js +1 -1
- package/lib/components/AreaCascader.js +2 -2
- package/lib/components/AreaCascaderPanel.js +2 -1
- package/lib/components/InputTable.js +3 -0
- package/lib/http/index.js +1 -1
- package/lib/utils/index.js +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
8
8
|
import { httpGet } from '../http';
|
|
9
|
-
import { getCache, setCache, treeEach, isSaasVersion } from '../utils';
|
|
9
|
+
import { getCache, setCache, treeEach, isSaasVersion, toGatewayUrl } from '../utils';
|
|
10
10
|
var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
11
11
|
var _useState = useState([]),
|
|
12
12
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -35,7 +35,7 @@ var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
35
35
|
case 4:
|
|
36
36
|
api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
|
|
37
37
|
if (isSaasVersion()) {
|
|
38
|
-
api = '/
|
|
38
|
+
api = toGatewayUrl('/tenant-mdm-api/sysAdministrativeDivision/allByTree');
|
|
39
39
|
}
|
|
40
40
|
_context.next = 8;
|
|
41
41
|
return httpGet(api, {}, false);
|
|
@@ -11,6 +11,7 @@ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
|
11
11
|
import { httpGet } from '../http';
|
|
12
12
|
import { getCache, setCache, treeEach, isSaasVersion } from '../utils';
|
|
13
13
|
import './common.less';
|
|
14
|
+
import { toGatewayUrl } from 'ls-pro-table';
|
|
14
15
|
var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
15
16
|
var propsConfig = _objectSpread({
|
|
16
17
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
@@ -94,7 +95,7 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
94
95
|
case 3:
|
|
95
96
|
api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
|
|
96
97
|
if (isSaasVersion()) {
|
|
97
|
-
api = '/
|
|
98
|
+
api = toGatewayUrl('/tenant-mdm-api/sysAdministrativeDivision/allByTree');
|
|
98
99
|
}
|
|
99
100
|
_context.next = 7;
|
|
100
101
|
return httpGet(api, {}, false);
|
package/es/http/index.js
CHANGED
|
@@ -284,7 +284,7 @@ export function getDict(dictCode) {
|
|
|
284
284
|
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
285
285
|
var api = '/lesoon-integration/sysDictDtl/listByProperties';
|
|
286
286
|
if (isSaasVersion()) {
|
|
287
|
-
api = '/tenant-
|
|
287
|
+
api = '/tenant-integration-api/sysDictDtl/listByProperties';
|
|
288
288
|
}
|
|
289
289
|
var param = {
|
|
290
290
|
dictCode: dictCode
|
package/es/utils/index.js
CHANGED
|
@@ -917,5 +917,5 @@ export var downloadFile = function downloadFile(url, fileName) {
|
|
|
917
917
|
document.body.removeChild(a);
|
|
918
918
|
};
|
|
919
919
|
export var isSaasVersion = function isSaasVersion() {
|
|
920
|
-
return (getCache('
|
|
920
|
+
return (getCache('TENANT') || '') === '1';
|
|
921
921
|
};
|
|
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
8
8
|
import { httpGet } from '../http';
|
|
9
|
-
import { getCache, setCache, treeEach, isSaasVersion } from '../utils';
|
|
9
|
+
import { getCache, setCache, treeEach, isSaasVersion, toGatewayUrl } from '../utils';
|
|
10
10
|
var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
11
11
|
var _useState = useState([]),
|
|
12
12
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -35,7 +35,7 @@ var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
35
35
|
case 4:
|
|
36
36
|
api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
|
|
37
37
|
if (isSaasVersion()) {
|
|
38
|
-
api = '/
|
|
38
|
+
api = toGatewayUrl('/tenant-mdm-api/sysAdministrativeDivision/allByTree');
|
|
39
39
|
}
|
|
40
40
|
_context.next = 8;
|
|
41
41
|
return httpGet(api, {}, false);
|
|
@@ -11,6 +11,7 @@ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
|
11
11
|
import { httpGet } from '../http';
|
|
12
12
|
import { getCache, setCache, treeEach, isSaasVersion } from '../utils';
|
|
13
13
|
import './common.less';
|
|
14
|
+
import { toGatewayUrl } from 'ls-pro-table';
|
|
14
15
|
var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
15
16
|
var propsConfig = _objectSpread({
|
|
16
17
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
@@ -94,7 +95,7 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
94
95
|
case 3:
|
|
95
96
|
api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
|
|
96
97
|
if (isSaasVersion()) {
|
|
97
|
-
api = '/
|
|
98
|
+
api = toGatewayUrl('/tenant-mdm-api/sysAdministrativeDivision/allByTree');
|
|
98
99
|
}
|
|
99
100
|
_context.next = 7;
|
|
100
101
|
return httpGet(api, {}, false);
|
package/lib/http/index.js
CHANGED
|
@@ -284,7 +284,7 @@ export function getDict(dictCode) {
|
|
|
284
284
|
var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
|
|
285
285
|
var api = '/lesoon-integration/sysDictDtl/listByProperties';
|
|
286
286
|
if (isSaasVersion()) {
|
|
287
|
-
api = '/tenant-
|
|
287
|
+
api = '/tenant-integration-api/sysDictDtl/listByProperties';
|
|
288
288
|
}
|
|
289
289
|
var param = {
|
|
290
290
|
dictCode: dictCode
|
package/lib/utils/index.js
CHANGED
|
@@ -917,5 +917,5 @@ export var downloadFile = function downloadFile(url, fileName) {
|
|
|
917
917
|
document.body.removeChild(a);
|
|
918
918
|
};
|
|
919
919
|
export var isSaasVersion = function isSaasVersion() {
|
|
920
|
-
return (getCache('
|
|
920
|
+
return (getCache('TENANT') || '') === '1';
|
|
921
921
|
};
|