tntd 1.4.20 → 1.4.22
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/components/Handle/README.md +0 -20
- package/components/Handle/index.js +44 -7
- package/components/locale.js +8 -2
- package/dist/1.tntd.js +1 -1
- package/dist/stats.json +24430 -24390
- package/dist/tntd.css +1 -1
- package/dist/tntd.js +13 -8
- package/es/ArrayInput/icon.js +5 -5
- package/es/ArrayInput/index.js +108 -76
- package/es/AuthContext.js +1 -1
- package/es/Columns/index.js +38 -31
- package/es/DevelopmentLogin/LoginModal.js +45 -32
- package/es/DevelopmentLogin/index.js +17 -13
- package/es/Ellipsis/Svg/CopySVG.js +13 -13
- package/es/Ellipsis/Svg/TickSVG.js +8 -8
- package/es/Ellipsis/index.js +69 -58
- package/es/Handle/README.md +0 -20
- package/es/Handle/index.js +100 -33
- package/es/Icon/fonts/iconfont.js +12 -7
- package/es/Icon/index.js +13 -10
- package/es/Img/Contain.js +29 -24
- package/es/Img/Cover.js +54 -40
- package/es/Img/index.js +45 -36
- package/es/Layout/ActionsContext.js +2 -3
- package/es/Layout/AppList.js +92 -37
- package/es/Layout/Application.js +72 -26
- package/es/Layout/Avatar.js +66 -29
- package/es/Layout/CompatibleLanguage.js +94 -39
- package/es/Layout/EnterpriseLayout/Avatar.js +76 -38
- package/es/Layout/EnterpriseLayout/Language.js +32 -14
- package/es/Layout/EnterpriseLayout/Theme.js +34 -16
- package/es/Layout/EnterpriseLayout/index.js +16 -14
- package/es/Layout/GlobalNavigation/NavigationPopup.js +170 -59
- package/es/Layout/GlobalNavigation/index.js +54 -20
- package/es/Layout/Header.js +46 -25
- package/es/Layout/HeaderActions.js +56 -42
- package/es/Layout/HeaderNavs.js +47 -20
- package/es/Layout/HeaderTabs.js +102 -49
- package/es/Layout/Iconfont.js +1 -1
- package/es/Layout/Language.js +32 -14
- package/es/Layout/Layout.js +108 -86
- package/es/Layout/Logo.js +32 -16
- package/es/Layout/OrgAppList.js +107 -62
- package/es/Layout/SideMenu.js +124 -63
- package/es/Layout/Theme.js +61 -23
- package/es/Layout/checkAuth.js +29 -0
- package/es/Layout/index.js +34 -26
- package/es/Layout/paaslayout/CompactSideMenu.js +74 -35
- package/es/Layout/paaslayout/Header.js +45 -22
- package/es/Layout/paaslayout/Logo.js +13 -3
- package/es/Layout/paaslayout/SideMenu.js +78 -39
- package/es/Layout/paaslayout/index.js +102 -75
- package/es/Layout/storage.js +9 -10
- package/es/Layout/utils.js +136 -0
- package/es/LoadingButton/index.js +24 -15
- package/es/Modal/index.js +46 -38
- package/es/Page/Box.js +41 -34
- package/es/Page/index.js +67 -52
- package/es/Page/utils.js +5 -0
- package/es/QueryForm/Field/Checkbox.js +9 -5
- package/es/QueryForm/Field/Select.js +41 -31
- package/es/QueryForm/Field/SelectInput.js +41 -26
- package/es/QueryForm/Field/fieldsMap.js +1 -0
- package/es/QueryForm/Field/index.js +71 -41
- package/es/QueryForm/createActions.js +7 -6
- package/es/QueryForm/index.js +135 -76
- package/es/QueryListScene/List.js +128 -74
- package/es/QueryListScene/QueryForm.js +81 -46
- package/es/QueryListScene/QueryListScene.js +40 -25
- package/es/QueryListScene/Title.js +3 -3
- package/es/QueryListScene/Toolbar.js +12 -11
- package/es/Select/DropDownWrap.js +50 -29
- package/es/Select/index.js +231 -135
- package/es/Table/ResizableTable/index.js +40 -26
- package/es/Table/index.js +16 -18
- package/es/Title/index.js +23 -21
- package/es/locale.js +11 -3
- package/es/utils/checkAuth.js +5 -3
- package/es/utils/findMenuInfoByPath.js +4 -0
- package/es/utils/index.js +23 -12
- package/lib/ArrayInput/icon.js +6 -6
- package/lib/ArrayInput/index.js +127 -78
- package/lib/AuthContext.js +4 -1
- package/lib/Columns/index.js +47 -31
- package/lib/DevelopmentLogin/LoginModal.js +58 -32
- package/lib/DevelopmentLogin/index.js +27 -16
- package/lib/Ellipsis/Svg/CopySVG.js +15 -13
- package/lib/Ellipsis/Svg/TickSVG.js +10 -8
- package/lib/Ellipsis/index.js +80 -57
- package/lib/Handle/README.md +0 -20
- package/lib/Handle/index.js +119 -33
- package/lib/Icon/fonts/iconfont.js +12 -7
- package/lib/Icon/index.js +20 -11
- package/lib/Img/Contain.js +34 -24
- package/lib/Img/Cover.js +65 -42
- package/lib/Img/index.js +51 -36
- package/lib/Layout/ActionsContext.js +4 -1
- package/lib/Layout/AppList.js +118 -40
- package/lib/Layout/Application.js +86 -26
- package/lib/Layout/Avatar.js +86 -32
- package/lib/Layout/CompatibleLanguage.js +110 -39
- package/lib/Layout/EnterpriseLayout/Avatar.js +100 -41
- package/lib/Layout/EnterpriseLayout/Header.js +113 -0
- package/lib/Layout/EnterpriseLayout/HeaderActions.js +104 -0
- package/lib/Layout/EnterpriseLayout/Language.js +48 -17
- package/lib/Layout/EnterpriseLayout/Theme.js +44 -16
- package/lib/Layout/EnterpriseLayout/index.js +23 -14
- package/lib/Layout/GlobalNavigation/NavigationPopup.js +186 -59
- package/lib/Layout/GlobalNavigation/index.js +74 -23
- package/lib/Layout/Header.js +63 -28
- package/lib/Layout/HeaderActions.js +74 -45
- package/lib/Layout/HeaderNavs.js +61 -23
- package/lib/Layout/HeaderTabs.js +118 -51
- package/lib/Layout/Iconfont.js +5 -1
- package/lib/Layout/Language.js +48 -17
- package/lib/Layout/Layout.js +128 -88
- package/lib/Layout/Logo.js +43 -19
- package/lib/Layout/OrgAppList.js +127 -64
- package/lib/Layout/SideMenu.js +143 -65
- package/lib/Layout/Theme.js +73 -23
- package/lib/Layout/checkAuth.js +39 -0
- package/lib/Layout/createActions.js +5 -0
- package/lib/Layout/images/index.js +28 -0
- package/lib/Layout/index.js +55 -30
- package/lib/Layout/paaslayout/CompactSideMenu.js +84 -35
- package/lib/Layout/paaslayout/Header.js +55 -22
- package/lib/Layout/paaslayout/Logo.js +19 -3
- package/lib/Layout/paaslayout/SideMenu.js +87 -39
- package/lib/Layout/paaslayout/index.js +122 -77
- package/lib/Layout/storage.js +40 -11
- package/lib/Layout/utils.js +166 -0
- package/lib/LoadingButton/index.js +29 -15
- package/lib/Modal/index.js +53 -38
- package/lib/Page/Box.js +45 -34
- package/lib/Page/index.js +77 -52
- package/lib/Page/utils.js +9 -1
- package/lib/QueryForm/Field/Checkbox.js +13 -5
- package/lib/QueryForm/Field/Select.js +53 -33
- package/lib/QueryForm/Field/SelectInput.js +56 -28
- package/lib/QueryForm/Field/fieldsMap.js +15 -1
- package/lib/QueryForm/Field/index.js +81 -43
- package/lib/QueryForm/createActions.js +12 -6
- package/lib/QueryForm/index.js +157 -78
- package/lib/QueryForm/useForm.js +5 -0
- package/lib/QueryListScene/List.js +140 -76
- package/lib/QueryListScene/QueryForm.js +86 -46
- package/lib/QueryListScene/QueryListScene.js +46 -25
- package/lib/QueryListScene/Title.js +7 -3
- package/lib/QueryListScene/Toolbar.js +16 -11
- package/lib/QueryListScene/createActions.js +5 -0
- package/lib/QueryListScene/index.js +10 -0
- package/lib/QueryListScene/useActions.js +5 -0
- package/lib/Select/DropDownWrap.js +56 -31
- package/lib/Select/index.js +241 -135
- package/lib/Table/ResizableTable/index.js +48 -26
- package/lib/Table/index.js +28 -17
- package/lib/Title/index.js +28 -21
- package/lib/index.js +56 -35
- package/lib/locale.js +19 -4
- package/lib/utils/checkAuth.js +9 -4
- package/lib/utils/findMenuInfoByPath.js +8 -1
- package/lib/utils/index.js +42 -15
- package/package.json +2 -2
package/lib/Layout/OrgAppList.js
CHANGED
|
@@ -1,69 +1,117 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) {
|
|
3
|
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports["default"] = void 0;
|
|
9
|
+
|
|
8
10
|
require("antd/lib/tree-select/style");
|
|
11
|
+
|
|
9
12
|
var _treeSelect = _interopRequireDefault(require("antd/lib/tree-select"));
|
|
13
|
+
|
|
10
14
|
require("antd/lib/select/style");
|
|
15
|
+
|
|
11
16
|
var _select = _interopRequireDefault(require("antd/lib/select"));
|
|
17
|
+
|
|
12
18
|
require("antd/lib/input/style");
|
|
19
|
+
|
|
13
20
|
var _input = _interopRequireDefault(require("antd/lib/input"));
|
|
21
|
+
|
|
14
22
|
var _react = require("react");
|
|
23
|
+
|
|
15
24
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
25
|
+
|
|
16
26
|
var _lodash = require("lodash");
|
|
27
|
+
|
|
17
28
|
var _storage = require("./storage");
|
|
29
|
+
|
|
18
30
|
var _utils = require("../utils");
|
|
19
|
-
|
|
20
|
-
function _getRequireWildcardCache(
|
|
21
|
-
|
|
31
|
+
|
|
32
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
+
|
|
22
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
37
|
+
|
|
38
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
39
|
+
|
|
40
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
41
|
+
|
|
42
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
43
|
+
|
|
44
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
45
|
+
|
|
46
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
47
|
+
|
|
48
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
49
|
+
|
|
50
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
51
|
+
|
|
34
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
+
|
|
54
|
+
function _templateObject3() {
|
|
55
|
+
var data = _taggedTemplateLiteral(["\n .org-tree-select {\n &.ant-select-tree-dropdown .ant-select-dropdown-search{\n padding: 10px;\n .ant-select-search__field{\n padding: 0 7px;\n height:28px;\n line-height: 28px;\n }\n }\n .ant-select-tree {\n margin-top:0;\n padding: 0 10px 0 4px;\n li{\n margin:4px 0 ;\n .ant-select-tree-switcher{\n height: 30px;\n line-height: 30px;\n float: left;\n }\n .ant-select-tree-node-content-wrapper{\n height: 30px;\n line-height:30px;\n padding: 0;\n border-radius: 0;\n &.ant-select-tree-node-selected{\n background: #E7F0FE;\n }\n }\n .ant-select-tree-node-content-wrapper:hover{\n background: #E7F0FE;\n }\n .ant-select-tree-title{\n font-family: PingFangSC-Regular;\n color: #17233D;\n padding-left: 4px;\n padding-right: 4px;\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n }\n }\n .org-tree-check-select {\n .ant-select-tree {\n margin-top:0;\n padding: 0 10px 0 4px;\n li{\n margin:4px 0 ;\n .ant-select-tree-switcher{\n height: 30px;\n line-height: 30px;\n vertical-align: top;\n }\n\n .ant-select-tree-checkbox{\n vertical-align: super;\n }\n \n .ant-select-tree-node-content-wrapper{\n height: 30px;\n line-height:30px;\n padding: 0;\n border-radius: 0;\n &.ant-select-tree-node-selected{\n background: #E7F0FE;\n }\n }\n .ant-select-tree-node-content-wrapper:hover{\n background: #E7F0FE;\n }\n .ant-select-tree-title{\n font-family: PingFangSC-Regular;\n color: #17233D;\n padding-left: 4px;\n padding-right: 4px;\n display: block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n }\n }\n"]);
|
|
56
|
+
|
|
57
|
+
_templateObject3 = function _templateObject3() {
|
|
58
|
+
return data;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _templateObject2() {
|
|
65
|
+
var data = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n .ant-select-selection, .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n .ant-select-selection--multiple {\n padding-bottom: 0;\n overflow: auto;\n min-height: 28px;\n }\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u5220\u9664\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u4E3A\u6D45\u8272\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n }\n // \u4E0D\u9700\u8981\u533A\u5206\u8272\u7CFB\n // .tnt-themeS1.hasHeaderTabs & {\n // /* background: #141825; */\n // /* color: rgba(255,255,255,.85); */\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #B2BECD;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"]);
|
|
66
|
+
|
|
67
|
+
_templateObject2 = function _templateObject2() {
|
|
68
|
+
return data;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return data;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function _templateObject() {
|
|
75
|
+
var data = _taggedTemplateLiteral(["\n display: inline-block !important;\n width:auto !important;\n min-width: 260px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n\n &.ant-input-group.ant-input-group-compact::before,\n &.ant-input-group.ant-input-group-compact::after{\n content:\"\";\n display: none;\n }\n\n .ant-select-selection, .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n .ant-select-selection--multiple {\n padding-bottom: 0;\n overflow: auto;\n min-height: 28px;\n }\n\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u5220\u9664\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u6539\u4E3A\u6D45\u8272\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n\n .ant-select-selection__placeholder, .ant-select-search__field__placeholder{\n color: #8B919E;\n }\n }\n // \u5220\u9664\u8272\u7CFB\u5DEE\u5F02\n // .tnt-themeS1.hasHeaderTabs & {\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // \u5220\u9664\u8272\u7CFB\u5DEE\u5F02\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295 !important;\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #B2BECD;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"]);
|
|
76
|
+
|
|
77
|
+
_templateObject = function _templateObject() {
|
|
78
|
+
return data;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return data;
|
|
82
|
+
}
|
|
83
|
+
|
|
35
84
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
85
|
+
|
|
36
86
|
var InputGroup = _input["default"].Group;
|
|
37
|
-
var Option = _select["default"].Option;
|
|
87
|
+
var Option = _select["default"].Option; // 机构+应用UI
|
|
38
88
|
|
|
39
|
-
|
|
40
|
-
var OrgAppsInputGroup = (0, _styledComponents["default"])(InputGroup)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block !important;\n width:auto !important;\n min-width: 260px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n\n &.ant-input-group.ant-input-group-compact::before,\n &.ant-input-group.ant-input-group-compact::after{\n content:\"\";\n display: none;\n }\n\n .ant-select-selection, .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n .ant-select-selection--multiple {\n padding-bottom: 0;\n overflow: auto;\n min-height: 28px;\n }\n\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u5220\u9664\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u6539\u4E3A\u6D45\u8272\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n\n .ant-select-selection__placeholder, .ant-select-search__field__placeholder{\n color: #8B919E;\n }\n }\n // \u5220\u9664\u8272\u7CFB\u5DEE\u5F02\n // .tnt-themeS1.hasHeaderTabs & {\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // \u5220\u9664\u8272\u7CFB\u5DEE\u5F02\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295 !important;\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #B2BECD;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"])), function (props) {
|
|
89
|
+
var OrgAppsInputGroup = (0, _styledComponents["default"])(InputGroup)(_templateObject(), function (props) {
|
|
41
90
|
return "".concat(props.theme.blueBgColor, " !important");
|
|
42
|
-
});
|
|
91
|
+
}); // 只展示机构
|
|
43
92
|
|
|
44
|
-
|
|
45
|
-
var AppTreeSelect = (0, _styledComponents["default"])(_treeSelect["default"])(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n min-width: 160px;\n height: 28px;\n line-height: 28;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n .ant-select-selection, .ant-select-selection__rendered {\n line-height: 28px;\n height: 28px;\n }\n .ant-select-selection--multiple {\n padding-bottom: 0;\n overflow: auto;\n min-height: 28px;\n }\n .ant-select-selection {\n .hasHeaderTabs & {\n border-radius: 14px;\n font-size: 12px;\n // \u5220\u9664\u9ED8\u8BA4\u9ED1\u8272\n // background: #191D29;\n // border: 1px solid rgba(186,189,197,0.60);\n // color: rgba(255,255,255,.8);\n // \u7EDF\u4E00\u4E3A\u6D45\u8272\n background: #fff !important;\n border-color: #c9d2dd !important;\n color: #8b919e !important;\n }\n // \u4E0D\u9700\u8981\u533A\u5206\u8272\u7CFB\n // .tnt-themeS1.hasHeaderTabs & {\n // /* background: #141825; */\n // /* color: rgba(255,255,255,.85); */\n // background: #fff;\n // border-color: #c9d2dd;\n // color: #8b919e;\n // }\n\n // .tnt-themeS3.hasHeaderTabs &{\n // background: ", "; //#1D4295\n // color: rgba(255,255,255,0.8);\n // border-color: rgba(255,255,255,0.5);\n // }\n }\n .ant-select-arrow {\n .hasHeaderTabs & {\n color: #B2BECD;\n }\n .tnt-themeS1 & {\n /* color: rgba(255,255,255,.85); */\n }\n }\n\n .tnt-themeS1 & {\n border-radius: 2px;\n }\n\n .isInIframe & {\n margin-left: 20px;\n }\n"])), function (props) {
|
|
93
|
+
var AppTreeSelect = (0, _styledComponents["default"])(_treeSelect["default"])(_templateObject2(), function (props) {
|
|
46
94
|
return "".concat(props.theme.blueBgColor, " !important");
|
|
47
95
|
});
|
|
48
|
-
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject3
|
|
96
|
+
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject3());
|
|
97
|
+
|
|
49
98
|
var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
50
99
|
var orgAppShow = props.orgAppShow,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
100
|
+
selectedOrgKey = props.selectedOrgKey,
|
|
101
|
+
orgList = props.orgList,
|
|
102
|
+
orgTreeConfig = props.orgTreeConfig,
|
|
103
|
+
onOrgChange = props.onOrgChange,
|
|
104
|
+
selectedAppKey = props.selectedAppKey,
|
|
105
|
+
_props$orgAppList = props.orgAppList,
|
|
106
|
+
orgAppList = _props$orgAppList === void 0 ? [] : _props$orgAppList,
|
|
107
|
+
onAppChange = props.onAppChange,
|
|
108
|
+
headerTabs = props.headerTabs;
|
|
60
109
|
var orgListFormatData = (0, _utils.traverseTree)([orgList], function (item) {
|
|
61
110
|
item.title = item.name;
|
|
62
111
|
item.value = item.uuid;
|
|
63
112
|
item.key = item.uuid;
|
|
64
|
-
});
|
|
113
|
+
}); // 初始化数据函数
|
|
65
114
|
|
|
66
|
-
// 初始化数据函数
|
|
67
115
|
var getInitialSelected = function getInitialSelected(selectedKey, currentStore, dataList, type) {
|
|
68
116
|
var findByKey = function findByKey(selectedKey) {
|
|
69
117
|
var find;
|
|
@@ -75,13 +123,17 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
75
123
|
});
|
|
76
124
|
return find;
|
|
77
125
|
};
|
|
126
|
+
|
|
78
127
|
var current = findByKey(selectedKey || (0, _lodash.get)(currentStore, 'key'));
|
|
128
|
+
|
|
79
129
|
if (type) {
|
|
80
130
|
return current;
|
|
81
131
|
}
|
|
132
|
+
|
|
82
133
|
return current || dataList[0];
|
|
83
|
-
};
|
|
84
|
-
|
|
134
|
+
}; // 初始化数据函数机构树
|
|
135
|
+
|
|
136
|
+
|
|
85
137
|
var getInitialSelectedTree = function getInitialSelectedTree(selecteds, dataList) {
|
|
86
138
|
if (selecteds.length) {
|
|
87
139
|
return selecteds;
|
|
@@ -95,28 +147,28 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
95
147
|
(0, _storage.setCurrentOrgTreeStore)(temp);
|
|
96
148
|
return temp;
|
|
97
149
|
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
// 初始化值
|
|
150
|
+
}; // 初始化值
|
|
101
151
|
// 机构
|
|
152
|
+
|
|
153
|
+
|
|
102
154
|
var _useState = (0, _react.useState)(getInitialSelected(selectedOrgKey, (0, _storage.getCurrentOrgStore)(), orgListFormatData)),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
155
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
156
|
+
selectedOrg = _useState2[0],
|
|
157
|
+
setSelectedOrg = _useState2[1]; // 机构树
|
|
158
|
+
|
|
106
159
|
|
|
107
|
-
// 机构树
|
|
108
160
|
var _useState3 = (0, _react.useState)(getInitialSelectedTree((0, _storage.getCurrentOrgTreeStore)(), orgListFormatData)),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
161
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
162
|
+
selectedOrgTree = _useState4[0],
|
|
163
|
+
setSelectedOrgTree = _useState4[1]; // 应用
|
|
164
|
+
|
|
112
165
|
|
|
113
|
-
// 应用
|
|
114
166
|
var _useState5 = (0, _react.useState)(getInitialSelected(selectedAppKey, (0, _storage.getCurrentAppStore)(), orgAppList, 'default')),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
167
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
168
|
+
selectedApp = _useState6[0],
|
|
169
|
+
setSelectedApp = _useState6[1]; // org变化事件
|
|
170
|
+
|
|
118
171
|
|
|
119
|
-
// org变化事件
|
|
120
172
|
var changeOrg = function changeOrg() {
|
|
121
173
|
var org = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
122
174
|
setSelectedOrg(org);
|
|
@@ -127,8 +179,10 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
127
179
|
});
|
|
128
180
|
onOrgChange && onOrgChange(org);
|
|
129
181
|
};
|
|
182
|
+
|
|
130
183
|
var changeOrgTree = function changeOrgTree() {
|
|
131
184
|
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
185
|
+
|
|
132
186
|
if (!val.length) {
|
|
133
187
|
val = orgListFormatData.map(function (res) {
|
|
134
188
|
return {
|
|
@@ -137,34 +191,38 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
137
191
|
};
|
|
138
192
|
});
|
|
139
193
|
}
|
|
194
|
+
|
|
140
195
|
setSelectedOrgTree(val);
|
|
141
196
|
(0, _storage.setCurrentOrgTreeStore)(val);
|
|
142
197
|
onOrgChange && onOrgChange(val);
|
|
143
|
-
};
|
|
198
|
+
}; // app变化事件
|
|
199
|
+
|
|
144
200
|
|
|
145
|
-
// app变化事件
|
|
146
201
|
var changeApp = function changeApp(app) {
|
|
147
202
|
setSelectedApp(app);
|
|
148
203
|
(0, _storage.setCurrentAppStore)(app);
|
|
149
204
|
onAppChange && onAppChange(app);
|
|
150
205
|
};
|
|
206
|
+
|
|
151
207
|
(0, _react.useEffect)(function () {
|
|
152
208
|
// 监听org机构
|
|
153
209
|
var newOrg = getInitialSelected(selectedOrgKey, (0, _storage.getCurrentOrgStore)(), orgListFormatData);
|
|
210
|
+
|
|
154
211
|
if ((newOrg == null ? void 0 : newOrg.key) !== (selectedOrg == null ? void 0 : selectedOrg.key)) {
|
|
155
212
|
changeOrg(newOrg);
|
|
156
|
-
}
|
|
213
|
+
} // 监听应用
|
|
214
|
+
|
|
157
215
|
|
|
158
|
-
// 监听应用
|
|
159
216
|
var newApp = getInitialSelected(selectedAppKey, (0, _storage.getCurrentAppStore)(), orgAppList);
|
|
217
|
+
|
|
160
218
|
if ((newApp == null ? void 0 : newApp.key) !== (selectedApp == null ? void 0 : selectedApp.key)) {
|
|
161
219
|
changeApp(newApp);
|
|
162
220
|
}
|
|
163
|
-
}, [orgList, selectedOrgKey, selectedAppKey, orgAppList]);
|
|
221
|
+
}, [orgList, selectedOrgKey, selectedAppKey, orgAppList]); // 如果是多签页的模式 则居右对齐
|
|
164
222
|
|
|
165
|
-
// 如果是多签页的模式 则居右对齐
|
|
166
223
|
var treeSelectPosition = {},
|
|
167
|
-
|
|
224
|
+
selectPosition = {};
|
|
225
|
+
|
|
168
226
|
if (headerTabs) {
|
|
169
227
|
treeSelectPosition = {
|
|
170
228
|
dropdownPopupAlign: {
|
|
@@ -177,8 +235,10 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
177
235
|
}
|
|
178
236
|
};
|
|
179
237
|
}
|
|
238
|
+
|
|
180
239
|
;
|
|
181
240
|
var orgTreeConfigProp = {};
|
|
241
|
+
|
|
182
242
|
if (orgTreeConfig) {
|
|
183
243
|
orgTreeConfigProp = _objectSpread({
|
|
184
244
|
dropdownClassName: 'org-tree-check-select',
|
|
@@ -205,8 +265,9 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
205
265
|
value: (0, _lodash.get)(selectedOrg, 'key')
|
|
206
266
|
};
|
|
207
267
|
}
|
|
268
|
+
|
|
208
269
|
if (!orgAppShow) {
|
|
209
|
-
return
|
|
270
|
+
return React.createElement(React.Fragment, null, React.createElement(AppTreeSelect, _extends({
|
|
210
271
|
placeholder: "\u9009\u62E9\u673A\u6784",
|
|
211
272
|
searchPlaceholder: "\u673A\u6784\u540D\u79F0",
|
|
212
273
|
treeNodeFilterProp: "title",
|
|
@@ -224,11 +285,12 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
224
285
|
overflow: 'auto',
|
|
225
286
|
width: 320
|
|
226
287
|
}
|
|
227
|
-
}, orgTreeConfigProp)),
|
|
288
|
+
}, orgTreeConfigProp)), React.createElement(GlobalStyle, null));
|
|
228
289
|
}
|
|
229
|
-
|
|
290
|
+
|
|
291
|
+
return React.createElement(OrgAppsInputGroup, {
|
|
230
292
|
compact: true
|
|
231
|
-
},
|
|
293
|
+
}, React.createElement(_treeSelect["default"], _extends({
|
|
232
294
|
placeholder: "\u9009\u62E9\u673A\u6784",
|
|
233
295
|
searchPlaceholder: "\u673A\u6784\u540D\u79F0",
|
|
234
296
|
treeNodeFilterProp: "title",
|
|
@@ -245,7 +307,7 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
245
307
|
overflow: 'auto',
|
|
246
308
|
width: 320
|
|
247
309
|
}
|
|
248
|
-
}, orgTreeConfigProp)),
|
|
310
|
+
}, orgTreeConfigProp)), React.createElement(GlobalStyle, null), React.createElement(_select["default"], {
|
|
249
311
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
250
312
|
showSearch: true,
|
|
251
313
|
optionFilterProp: "children",
|
|
@@ -263,12 +325,13 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
263
325
|
}
|
|
264
326
|
}, orgAppList.map(function (_ref2) {
|
|
265
327
|
var key = _ref2.key,
|
|
266
|
-
|
|
267
|
-
return
|
|
328
|
+
name = _ref2.name;
|
|
329
|
+
return React.createElement(Option, {
|
|
268
330
|
key: key,
|
|
269
331
|
value: key,
|
|
270
332
|
title: name
|
|
271
333
|
}, name);
|
|
272
334
|
})));
|
|
273
335
|
});
|
|
336
|
+
|
|
274
337
|
exports["default"] = _default;
|