tntd 1.4.32 → 1.4.33-beta.1
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/Ellipsis/index.js +47 -15
- package/components/QueryListScene/QueryForm.js +4 -4
- package/components/QueryListScene/createActions.js +4 -4
- package/dist/1.tntd.js +1 -1
- package/dist/stats.json +24089 -23289
- package/dist/tntd.css +1 -1
- package/dist/tntd.js +7 -10
- package/es/ArrayInput/icon.js +5 -5
- package/es/ArrayInput/index.js +79 -111
- package/es/AuthContext.js +1 -1
- package/es/Columns/index.js +33 -40
- package/es/DevelopmentLogin/LoginModal.js +33 -46
- package/es/DevelopmentLogin/index.js +14 -18
- package/es/Ellipsis/Svg/CopySVG.js +13 -13
- package/es/Ellipsis/Svg/TickSVG.js +8 -8
- package/es/Ellipsis/index.js +100 -79
- package/es/Handle/index.js +46 -64
- package/es/Icon/fonts/iconfont.js +7 -12
- package/es/Icon/index.js +12 -15
- package/es/Img/Contain.js +26 -31
- package/es/Img/Cover.js +43 -57
- package/es/Img/index.js +39 -48
- package/es/Layout/ActionsContext.js +3 -2
- package/es/Layout/AppList.js +39 -94
- package/es/Layout/Application.js +28 -74
- package/es/Layout/Avatar.js +30 -67
- package/es/Layout/CompatibleLanguage.js +41 -96
- package/es/Layout/EnterpriseLayout/Avatar.js +39 -77
- package/es/Layout/EnterpriseLayout/Language.js +16 -34
- package/es/Layout/EnterpriseLayout/Theme.js +18 -36
- package/es/Layout/EnterpriseLayout/index.js +14 -16
- package/es/Layout/GlobalNavigation/NavigationPopup.js +61 -172
- package/es/Layout/GlobalNavigation/index.js +22 -56
- package/es/Layout/Header.js +26 -47
- package/es/Layout/HeaderActions.js +45 -59
- package/es/Layout/HeaderNavs.js +24 -51
- package/es/Layout/HeaderTabs.js +53 -106
- package/es/Layout/Iconfont.js +1 -1
- package/es/Layout/Language.js +16 -34
- package/es/Layout/Layout.js +88 -110
- package/es/Layout/Logo.js +17 -33
- package/es/Layout/OrgAppList.js +64 -109
- package/es/Layout/SideMenu.js +67 -128
- package/es/Layout/Theme.js +25 -63
- package/es/Layout/index.js +28 -37
- package/es/Layout/paaslayout/CompactSideMenu.js +37 -76
- package/es/Layout/paaslayout/Header.js +23 -46
- package/es/Layout/paaslayout/Logo.js +4 -14
- package/es/Layout/paaslayout/SideMenu.js +41 -80
- package/es/Layout/paaslayout/index.js +77 -104
- package/es/Layout/storage.js +10 -9
- package/es/LoadingButton/index.js +18 -27
- package/es/Modal/index.js +42 -51
- package/es/Page/Box.js +36 -43
- package/es/Page/index.js +56 -71
- package/es/Page/utils.js +0 -5
- package/es/QueryForm/Field/Checkbox.js +7 -11
- package/es/QueryForm/Field/Select.js +34 -44
- package/es/QueryForm/Field/SelectInput.js +31 -46
- package/es/QueryForm/Field/fieldsMap.js +0 -1
- package/es/QueryForm/Field/index.js +46 -78
- package/es/QueryForm/createActions.js +6 -7
- package/es/QueryForm/index.js +79 -140
- package/es/QueryListScene/List.js +83 -139
- package/es/QueryListScene/QueryForm.js +54 -91
- package/es/QueryListScene/QueryListScene.js +29 -47
- package/es/QueryListScene/Title.js +3 -3
- package/es/QueryListScene/Toolbar.js +13 -14
- package/es/QueryListScene/createActions.js +4 -4
- package/es/Select/DropDownWrap.js +32 -55
- package/es/Select/index.js +140 -232
- package/es/Table/ResizableTable/index.js +29 -43
- package/es/Table/index.js +20 -19
- package/es/Title/index.js +23 -25
- package/es/locale.js +1 -5
- package/es/utils/checkAuth.js +6 -8
- package/es/utils/findMenuInfoByPath.js +0 -4
- package/es/utils/index.js +17 -27
- package/lib/ArrayInput/icon.js +7 -9
- package/lib/ArrayInput/index.js +82 -131
- package/lib/AuthContext.js +2 -6
- package/lib/Columns/index.js +36 -54
- package/lib/DevelopmentLogin/LoginModal.js +36 -63
- package/lib/DevelopmentLogin/index.js +21 -31
- package/lib/Ellipsis/Svg/CopySVG.js +15 -18
- package/lib/Ellipsis/Svg/TickSVG.js +10 -13
- package/lib/Ellipsis/index.js +105 -93
- package/lib/Handle/index.js +51 -87
- package/lib/Icon/fonts/iconfont.js +7 -12
- package/lib/Icon/iconList.js +1 -2
- package/lib/Icon/index.js +16 -26
- package/lib/Img/Contain.js +29 -40
- package/lib/Img/Cover.js +48 -72
- package/lib/Img/index.js +42 -58
- package/lib/Layout/ActionsContext.js +1 -5
- package/lib/Layout/AppList.js +45 -124
- package/lib/Layout/Application.js +31 -92
- package/lib/Layout/Avatar.js +36 -91
- package/lib/Layout/CompatibleLanguage.js +44 -116
- package/lib/Layout/EnterpriseLayout/Avatar.js +45 -105
- package/lib/Layout/EnterpriseLayout/Language.js +22 -54
- package/lib/Layout/EnterpriseLayout/Theme.js +21 -50
- package/lib/Layout/EnterpriseLayout/index.js +17 -27
- package/lib/Layout/GlobalNavigation/NavigationPopup.js +64 -192
- package/lib/Layout/GlobalNavigation/index.js +28 -80
- package/lib/Layout/Header.js +36 -68
- package/lib/Layout/HeaderActions.js +51 -81
- package/lib/Layout/HeaderNavs.js +30 -70
- package/lib/Layout/HeaderTabs.js +58 -127
- package/lib/Layout/Iconfont.js +4 -9
- package/lib/Layout/Language.js +22 -54
- package/lib/Layout/Layout.js +93 -134
- package/lib/Layout/Logo.js +26 -47
- package/lib/Layout/OrgAppList.js +69 -133
- package/lib/Layout/SideMenu.js +72 -151
- package/lib/Layout/Theme.js +28 -79
- package/lib/Layout/createActions.js +3 -9
- package/lib/Layout/images/index.js +5 -36
- package/lib/Layout/index.js +35 -63
- package/lib/Layout/paaslayout/CompactSideMenu.js +40 -90
- package/lib/Layout/paaslayout/Header.js +30 -60
- package/lib/Layout/paaslayout/Logo.js +11 -24
- package/lib/Layout/paaslayout/SideMenu.js +44 -93
- package/lib/Layout/paaslayout/index.js +82 -128
- package/lib/Layout/storage.js +26 -68
- package/lib/LoadingButton/index.js +21 -36
- package/lib/Modal/index.js +45 -62
- package/lib/Page/Box.js +38 -50
- package/lib/Page/index.js +58 -84
- package/lib/Page/utils.js +5 -16
- package/lib/QueryForm/Field/Checkbox.js +10 -19
- package/lib/QueryForm/Field/Select.js +39 -60
- package/lib/QueryForm/Field/SelectInput.js +36 -65
- package/lib/QueryForm/Field/fieldsMap.js +6 -23
- package/lib/QueryForm/Field/index.js +50 -91
- package/lib/QueryForm/createActions.js +9 -16
- package/lib/QueryForm/index.js +83 -165
- package/lib/QueryForm/useForm.js +1 -6
- package/lib/QueryListScene/List.js +89 -153
- package/lib/QueryListScene/QueryForm.js +58 -101
- package/lib/QueryListScene/QueryListScene.js +31 -56
- package/lib/QueryListScene/Title.js +6 -11
- package/lib/QueryListScene/Toolbar.js +16 -22
- package/lib/QueryListScene/createActions.js +7 -13
- package/lib/QueryListScene/index.js +5 -19
- package/lib/QueryListScene/useActions.js +1 -6
- package/lib/Select/DropDownWrap.js +35 -63
- package/lib/Select/index.js +142 -245
- package/lib/Table/ResizableTable/index.js +31 -54
- package/lib/Table/index.js +21 -34
- package/lib/Title/index.js +26 -34
- package/lib/index.js +36 -57
- package/lib/locale.js +9 -25
- package/lib/utils/checkAuth.js +9 -16
- package/lib/utils/findMenuInfoByPath.js +3 -12
- package/lib/utils/index.js +26 -60
- package/package.json +3 -2
package/es/Layout/OrgAppList.js
CHANGED
|
@@ -1,91 +1,60 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
import "antd/lib/tree-select/style";
|
|
2
3
|
import _TreeSelect from "antd/lib/tree-select";
|
|
3
4
|
import "antd/lib/select/style";
|
|
4
5
|
import _Select from "antd/lib/select";
|
|
5
6
|
import "antd/lib/input/style";
|
|
6
7
|
import _Input from "antd/lib/input";
|
|
7
|
-
|
|
8
|
-
function _extends() { _extends = Object.assign
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
-
|
|
24
|
-
function _templateObject3() {
|
|
25
|
-
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"]);
|
|
26
|
-
|
|
27
|
-
_templateObject3 = function _templateObject3() {
|
|
28
|
-
return data;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return data;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function _templateObject2() {
|
|
35
|
-
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"]);
|
|
36
|
-
|
|
37
|
-
_templateObject2 = function _templateObject2() {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _templateObject() {
|
|
45
|
-
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"]);
|
|
46
|
-
|
|
47
|
-
_templateObject = function _templateObject() {
|
|
48
|
-
return data;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return data;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
55
|
-
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
9
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
16
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
18
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
19
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
20
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
21
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
56
22
|
import { useState, useEffect } from 'react';
|
|
57
23
|
import styled, { withTheme, createGlobalStyle } from 'styled-components';
|
|
58
24
|
import { get } from 'lodash';
|
|
59
25
|
import { getCurrentAppStore, setCurrentAppStore, getCurrentOrgStore, setCurrentOrgStore, getCurrentOrgTreeStore, setCurrentOrgTreeStore } from './storage';
|
|
60
26
|
import { traverseTree } from '../utils';
|
|
61
27
|
var InputGroup = _Input.Group;
|
|
62
|
-
var Option = _Select.Option;
|
|
28
|
+
var Option = _Select.Option;
|
|
63
29
|
|
|
64
|
-
|
|
30
|
+
// 机构+应用UI
|
|
31
|
+
var OrgAppsInputGroup = styled(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) {
|
|
65
32
|
return "".concat(props.theme.blueBgColor, " !important");
|
|
66
|
-
});
|
|
33
|
+
});
|
|
67
34
|
|
|
68
|
-
|
|
35
|
+
// 只展示机构
|
|
36
|
+
var AppTreeSelect = styled(_TreeSelect)(_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) {
|
|
69
37
|
return "".concat(props.theme.blueBgColor, " !important");
|
|
70
38
|
});
|
|
71
|
-
var GlobalStyle = createGlobalStyle(_templateObject3());
|
|
39
|
+
var GlobalStyle = createGlobalStyle(_templateObject3 || (_templateObject3 = _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"])));
|
|
72
40
|
export default withTheme(function (props) {
|
|
73
41
|
var orgAppShow = props.orgAppShow,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
42
|
+
selectedOrgKey = props.selectedOrgKey,
|
|
43
|
+
orgList = props.orgList,
|
|
44
|
+
orgTreeConfig = props.orgTreeConfig,
|
|
45
|
+
onOrgChange = props.onOrgChange,
|
|
46
|
+
selectedAppKey = props.selectedAppKey,
|
|
47
|
+
_props$orgAppList = props.orgAppList,
|
|
48
|
+
orgAppList = _props$orgAppList === void 0 ? [] : _props$orgAppList,
|
|
49
|
+
onAppChange = props.onAppChange,
|
|
50
|
+
headerTabs = props.headerTabs;
|
|
83
51
|
var orgListFormatData = traverseTree([orgList], function (item) {
|
|
84
52
|
item.title = item.name;
|
|
85
53
|
item.value = item.uuid;
|
|
86
54
|
item.key = item.uuid;
|
|
87
|
-
});
|
|
55
|
+
});
|
|
88
56
|
|
|
57
|
+
// 初始化数据函数
|
|
89
58
|
var getInitialSelected = function getInitialSelected(selectedKey, currentStore, dataList, type) {
|
|
90
59
|
var findByKey = function findByKey(selectedKey) {
|
|
91
60
|
var find;
|
|
@@ -97,17 +66,13 @@ export default withTheme(function (props) {
|
|
|
97
66
|
});
|
|
98
67
|
return find;
|
|
99
68
|
};
|
|
100
|
-
|
|
101
69
|
var current = findByKey(selectedKey || get(currentStore, 'key'));
|
|
102
|
-
|
|
103
70
|
if (type) {
|
|
104
71
|
return current;
|
|
105
72
|
}
|
|
106
|
-
|
|
107
73
|
return current || dataList[0];
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
|
|
74
|
+
};
|
|
75
|
+
// 初始化数据函数机构树
|
|
111
76
|
var getInitialSelectedTree = function getInitialSelectedTree(selecteds, dataList) {
|
|
112
77
|
if (selecteds.length) {
|
|
113
78
|
return selecteds;
|
|
@@ -121,28 +86,28 @@ export default withTheme(function (props) {
|
|
|
121
86
|
setCurrentOrgTreeStore(temp);
|
|
122
87
|
return temp;
|
|
123
88
|
}
|
|
124
|
-
};
|
|
125
|
-
// 机构
|
|
126
|
-
|
|
89
|
+
};
|
|
127
90
|
|
|
91
|
+
// 初始化值
|
|
92
|
+
// 机构
|
|
128
93
|
var _useState = useState(getInitialSelected(selectedOrgKey, getCurrentOrgStore(), orgListFormatData)),
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
94
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
95
|
+
selectedOrg = _useState2[0],
|
|
96
|
+
setSelectedOrg = _useState2[1];
|
|
133
97
|
|
|
98
|
+
// 机构树
|
|
134
99
|
var _useState3 = useState(getInitialSelectedTree(getCurrentOrgTreeStore(), orgListFormatData)),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
100
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
101
|
+
selectedOrgTree = _useState4[0],
|
|
102
|
+
setSelectedOrgTree = _useState4[1];
|
|
139
103
|
|
|
104
|
+
// 应用
|
|
140
105
|
var _useState5 = useState(getInitialSelected(selectedAppKey, getCurrentAppStore(), orgAppList, 'default')),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
106
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
107
|
+
selectedApp = _useState6[0],
|
|
108
|
+
setSelectedApp = _useState6[1];
|
|
145
109
|
|
|
110
|
+
// org变化事件
|
|
146
111
|
var changeOrg = function changeOrg() {
|
|
147
112
|
var org = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
148
113
|
setSelectedOrg(org);
|
|
@@ -153,10 +118,8 @@ export default withTheme(function (props) {
|
|
|
153
118
|
});
|
|
154
119
|
onOrgChange && onOrgChange(org);
|
|
155
120
|
};
|
|
156
|
-
|
|
157
121
|
var changeOrgTree = function changeOrgTree() {
|
|
158
122
|
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
159
|
-
|
|
160
123
|
if (!val.length) {
|
|
161
124
|
val = orgListFormatData.map(function (res) {
|
|
162
125
|
return {
|
|
@@ -165,38 +128,34 @@ export default withTheme(function (props) {
|
|
|
165
128
|
};
|
|
166
129
|
});
|
|
167
130
|
}
|
|
168
|
-
|
|
169
131
|
setSelectedOrgTree(val);
|
|
170
132
|
setCurrentOrgTreeStore(val);
|
|
171
133
|
onOrgChange && onOrgChange(val);
|
|
172
|
-
};
|
|
173
|
-
|
|
134
|
+
};
|
|
174
135
|
|
|
136
|
+
// app变化事件
|
|
175
137
|
var changeApp = function changeApp(app) {
|
|
176
138
|
setSelectedApp(app);
|
|
177
139
|
setCurrentAppStore(app);
|
|
178
140
|
onAppChange && onAppChange(app);
|
|
179
141
|
};
|
|
180
|
-
|
|
181
142
|
useEffect(function () {
|
|
182
143
|
// 监听org机构
|
|
183
144
|
var newOrg = getInitialSelected(selectedOrgKey, getCurrentOrgStore(), orgListFormatData);
|
|
184
|
-
|
|
185
145
|
if ((newOrg == null ? void 0 : newOrg.key) !== (selectedOrg == null ? void 0 : selectedOrg.key)) {
|
|
186
146
|
changeOrg(newOrg);
|
|
187
|
-
}
|
|
188
|
-
|
|
147
|
+
}
|
|
189
148
|
|
|
149
|
+
// 监听应用
|
|
190
150
|
var newApp = getInitialSelected(selectedAppKey, getCurrentAppStore(), orgAppList);
|
|
191
|
-
|
|
192
151
|
if ((newApp == null ? void 0 : newApp.key) !== (selectedApp == null ? void 0 : selectedApp.key)) {
|
|
193
152
|
changeApp(newApp);
|
|
194
153
|
}
|
|
195
|
-
}, [orgList, selectedOrgKey, selectedAppKey, orgAppList]);
|
|
154
|
+
}, [orgList, selectedOrgKey, selectedAppKey, orgAppList]);
|
|
196
155
|
|
|
156
|
+
// 如果是多签页的模式 则居右对齐
|
|
197
157
|
var treeSelectPosition = {},
|
|
198
|
-
|
|
199
|
-
|
|
158
|
+
selectPosition = {};
|
|
200
159
|
if (headerTabs) {
|
|
201
160
|
treeSelectPosition = {
|
|
202
161
|
dropdownPopupAlign: {
|
|
@@ -209,10 +168,8 @@ export default withTheme(function (props) {
|
|
|
209
168
|
}
|
|
210
169
|
};
|
|
211
170
|
}
|
|
212
|
-
|
|
213
171
|
;
|
|
214
172
|
var orgTreeConfigProp = {};
|
|
215
|
-
|
|
216
173
|
if (orgTreeConfig) {
|
|
217
174
|
orgTreeConfigProp = _objectSpread({
|
|
218
175
|
dropdownClassName: 'org-tree-check-select',
|
|
@@ -239,9 +196,8 @@ export default withTheme(function (props) {
|
|
|
239
196
|
value: get(selectedOrg, 'key')
|
|
240
197
|
};
|
|
241
198
|
}
|
|
242
|
-
|
|
243
199
|
if (!orgAppShow) {
|
|
244
|
-
return React.createElement(React.Fragment, null, React.createElement(AppTreeSelect, _extends({
|
|
200
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AppTreeSelect, _extends({
|
|
245
201
|
placeholder: "\u9009\u62E9\u673A\u6784",
|
|
246
202
|
searchPlaceholder: "\u673A\u6784\u540D\u79F0",
|
|
247
203
|
treeNodeFilterProp: "title",
|
|
@@ -259,12 +215,11 @@ export default withTheme(function (props) {
|
|
|
259
215
|
overflow: 'auto',
|
|
260
216
|
width: 320
|
|
261
217
|
}
|
|
262
|
-
}, orgTreeConfigProp)), React.createElement(GlobalStyle, null));
|
|
218
|
+
}, orgTreeConfigProp)), /*#__PURE__*/React.createElement(GlobalStyle, null));
|
|
263
219
|
}
|
|
264
|
-
|
|
265
|
-
return React.createElement(OrgAppsInputGroup, {
|
|
220
|
+
return /*#__PURE__*/React.createElement(OrgAppsInputGroup, {
|
|
266
221
|
compact: true
|
|
267
|
-
}, React.createElement(_TreeSelect, _extends({
|
|
222
|
+
}, /*#__PURE__*/React.createElement(_TreeSelect, _extends({
|
|
268
223
|
placeholder: "\u9009\u62E9\u673A\u6784",
|
|
269
224
|
searchPlaceholder: "\u673A\u6784\u540D\u79F0",
|
|
270
225
|
treeNodeFilterProp: "title",
|
|
@@ -281,7 +236,7 @@ export default withTheme(function (props) {
|
|
|
281
236
|
overflow: 'auto',
|
|
282
237
|
width: 320
|
|
283
238
|
}
|
|
284
|
-
}, orgTreeConfigProp)), React.createElement(GlobalStyle, null), React.createElement(_Select, {
|
|
239
|
+
}, orgTreeConfigProp)), /*#__PURE__*/React.createElement(GlobalStyle, null), /*#__PURE__*/React.createElement(_Select, {
|
|
285
240
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
286
241
|
showSearch: true,
|
|
287
242
|
optionFilterProp: "children",
|
|
@@ -299,8 +254,8 @@ export default withTheme(function (props) {
|
|
|
299
254
|
}
|
|
300
255
|
}, orgAppList.map(function (_ref2) {
|
|
301
256
|
var key = _ref2.key,
|
|
302
|
-
|
|
303
|
-
return React.createElement(Option, {
|
|
257
|
+
name = _ref2.name;
|
|
258
|
+
return /*#__PURE__*/React.createElement(Option, {
|
|
304
259
|
key: key,
|
|
305
260
|
value: key,
|
|
306
261
|
title: name
|