@titaui/pc 1.12.7-beta.2 → 1.12.7-beta.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/lib/components/attachments-preview/index.js +4 -4
- package/lib/components/change-okr-modal/index.js +2 -4
- package/lib/components/color-date-picker/index.css +7 -0
- package/lib/components/color-date-picker/index.js +13 -7
- package/lib/components/common-share/publishMblog.js +2 -4
- package/lib/components/create-okr-modal/fields/okr-type-detail.js +2 -4
- package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +2 -4
- package/lib/components/create-okr-modal/index.js +2 -4
- package/lib/components/create-okr-modal/request-api.js +12 -16
- package/lib/components/create-okr-modal/utils/helper.js +2 -6
- package/lib/components/dialog-confirm/index.css +1 -0
- package/lib/components/dialog-confirm/index.js +5 -3
- package/lib/components/dialog-upload/index.js +2 -4
- package/lib/components/dialog-upload/uploaded-preview.js +4 -4
- package/lib/components/drawer-manager/drawerWrapper.js +2 -4
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +12 -8
- package/lib/components/dynamic/dynamic-item/components/header/index.js +1 -5
- package/lib/components/dynamic/dynamic-item/components/okr-progress/constant.js +31 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +88 -57
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +2 -4
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +51 -21
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +76 -84
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +49 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +105 -34
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +20 -3
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +37 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +18 -11
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +12 -6
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +14 -6
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +16 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +99 -23
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +30 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/index.css +1 -0
- package/lib/components/dynamic/dynamic-item/index.js +5 -3
- package/lib/components/firework/index.js +2 -6
- package/lib/components/form/form-fields/input-verification-code/index.js +2 -4
- package/lib/components/grid-layout/util/network.js +6 -10
- package/lib/components/import-modal/import-okr-modal/index.js +4 -1
- package/lib/components/import-modal/import-task-modal/index.js +2 -1
- package/lib/components/import-modal/tree/okr-tree/index.js +2 -4
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +7 -3
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +7 -3
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +59 -29
- package/lib/components/menus/export-modules/summary-menus/menus.js +42 -51
- package/lib/components/menus/export-modules/summary-menus/request-api.js +17 -0
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +50 -7
- package/lib/components/menus/request-apis.js +8 -2
- package/lib/components/new-confidence/index.js +5 -5
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +2 -4
- package/lib/components/okr-detail/components/ao-nice/index.js +4 -6
- package/lib/components/okr-detail/components/header/edit-name.js +2 -4
- package/lib/components/okr-detail/components/header/o-avatar.js +2 -4
- package/lib/components/okr-detail/components/o-classify.js +2 -4
- package/lib/components/okr-detail/components/o-progress-update/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +6 -8
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +2 -4
- package/lib/components/okr-detail/detail-footer/index.js +2 -4
- package/lib/components/okr-detail/detail-header/index.js +10 -12
- package/lib/components/okr-detail/okr-list/index.js +2 -4
- package/lib/components/okr-detail/request-apis.js +2 -6
- package/lib/components/okr-flow/child-node/fields/creator.js +2 -4
- package/lib/components/okr-flow/child-node/work-node.js +2 -4
- package/lib/components/okr-flow/export-modal/index.js +23 -4
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +8 -10
- package/lib/components/okr-flow/request-apis.js +2 -6
- package/lib/components/okr-flow/root-node/index.js +2 -4
- package/lib/components/okr-progress/components/o-progress-update/index.js +2 -4
- package/lib/components/okr-progress-modal/index.js +2 -4
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +2 -4
- package/lib/components/okr-share/common-painter/darwAvatar.js +4 -8
- package/lib/components/okr-share/common-painter/openDataPainter.js +2 -6
- package/lib/components/okr-share/pink-card/drawDepartmentName.js +2 -6
- package/lib/components/okr-share/pink-card/drawQuote.js +2 -6
- package/lib/components/okr-share/pink-card/drawUserName.js +2 -6
- package/lib/components/okr-share/pink-card/index.js +2 -6
- package/lib/components/okr-share/publishMblog.js +2 -4
- package/lib/components/okr-share/shareCardSelector.js +4 -6
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +4 -4
- package/lib/components/okrcase-library/server/network.js +20 -24
- package/lib/components/open-data-painter/index.js +2 -6
- package/lib/components/period-selector/helper/index.js +2 -6
- package/lib/components/picker/components/panels/week-panel/utils.js +81 -2
- package/lib/components/picker/components/panels/week-panel/week-body.js +29 -31
- package/lib/components/picker/components/picker-trigger/index.js +2 -47
- package/lib/components/promise-confirm/index.css +0 -0
- package/lib/components/promise-confirm/index.js +117 -0
- package/lib/components/promise-confirm/interface.js +5 -0
- package/lib/components/rate/index.css +111 -0
- package/lib/components/rate/index.js +1 -1
- package/lib/components/rich-editor/schemas/list.js +0 -1
- package/lib/components/rich-editor-at/index.js +9 -4
- package/lib/components/rich-editor-upload/index.js +3 -0
- package/lib/components/select-tags/index.js +7 -1
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +2 -6
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +4 -8
- package/lib/components/survey-model/request-api.js +2 -6
- package/lib/components/task-relation-modal/index.js +4 -6
- package/lib/components/task-relation-modal/tree/category-tree/index.js +2 -4
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +2 -4
- package/lib/components/task-relation-modal/tree/work-tree/index.js +2 -4
- package/lib/components/task-relation-modal/work-relation/index.js +4 -6
- package/lib/components/task-tree/task-item-node/e-project.js +2 -4
- package/lib/components/task-tree/task-item-node/e-task.js +2 -4
- package/lib/components/toast/index.js +8 -12
- package/lib/components/upvote/index.js +4 -6
- package/lib/components/version-change-modal/index.js +4 -6
- package/lib/components/version-change-modal/request-api.js +2 -6
- package/lib/components/weekly-report/card.js +12 -4
- package/lib/components/weekly-report/common-painter/darwAvatar.js +6 -10
- package/lib/components/weekly-report/common-painter/drawName.js +2 -6
- package/lib/components/weekly-report/common-painter/openDataPainter.js +2 -6
- package/lib/components/weekly-report/index.js +4 -6
- package/lib/components/write-summary-modal/index.css +79 -0
- package/lib/components/write-summary-modal/index.js +167 -0
- package/lib/components/write-summary-modal/interface.js +19 -0
- package/lib/components/write-summary-modal/request-api.js +18 -0
- package/lib/components/write-summary-modal/utils.js +31 -0
- package/lib/index.js +16 -0
- package/lib/pages/group-management/groupInterface.js +2 -6
- package/lib/pages/new-okr-list/request-api.js +14 -18
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +2 -4
- package/lib/pages/okr-map/request-apis.js +2 -6
- package/lib/utils/constant.js +8 -2
- package/lib/utils/request-v1.js +2 -6
- package/lib/utils/request.js +2 -6
- package/package.json +1 -1
|
@@ -23,6 +23,8 @@ var _index = require("../../../components/menu-tree/tree-node/index");
|
|
|
23
23
|
|
|
24
24
|
var _utils = require("../../../utils");
|
|
25
25
|
|
|
26
|
+
var _bsGlobal = require("../../../../../utils/bs-global.js");
|
|
27
|
+
|
|
26
28
|
var _precls = _interopRequireDefault(require("../../../precls"));
|
|
27
29
|
|
|
28
30
|
var _scrollbar = _interopRequireDefault(require("../../../../scrollbar"));
|
|
@@ -72,7 +74,7 @@ function _default() {
|
|
|
72
74
|
rawTreeData = _useState4[0],
|
|
73
75
|
setRawTreeData = _useState4[1];
|
|
74
76
|
|
|
75
|
-
var _useState5 = (0, _react.useState)([
|
|
77
|
+
var _useState5 = (0, _react.useState)(['0']),
|
|
76
78
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
77
79
|
selectedMenuKeys = _useState6[0],
|
|
78
80
|
setSelectedMenuKeys = _useState6[1];
|
|
@@ -92,44 +94,70 @@ function _default() {
|
|
|
92
94
|
_useState12 = _slicedToArray(_useState11, 1),
|
|
93
95
|
itemHeight = _useState12[0];
|
|
94
96
|
|
|
97
|
+
var isBoss = (0, _bsGlobal.getUserInfo)().IsBoss;
|
|
98
|
+
|
|
95
99
|
var _useState13 = (0, _react.useState)(window.BSGlobal.OkrAdvancedSetting.KRSetting.OkrDepsShowUser),
|
|
96
100
|
_useState14 = _slicedToArray(_useState13, 1),
|
|
97
101
|
isGetUser = _useState14[0];
|
|
98
102
|
|
|
99
103
|
(0, _react.useEffect)(function () {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
var
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
104
|
+
if (isBoss) {
|
|
105
|
+
location.href = '#/summary/manage?departmentName=公司全部&departmentId=0';
|
|
106
|
+
|
|
107
|
+
var allDepartmentText = window.getLocale && window.getLocale(_i18n.locale.menu_alldeparment) || _i18n.locale.menu_alldeparment;
|
|
108
|
+
|
|
109
|
+
(0, _requestApis.getDepsAndUsers)(-1, isGetUser).then(function (rawTreeData) {
|
|
110
|
+
var rootNode = {
|
|
111
|
+
async: true,
|
|
112
|
+
data: {
|
|
113
|
+
id: 0,
|
|
114
|
+
name: allDepartmentText
|
|
115
|
+
},
|
|
116
|
+
pid: -1,
|
|
117
|
+
id: '0',
|
|
118
|
+
key: '0',
|
|
119
|
+
isLeaf: true,
|
|
120
|
+
nodeType: _index.DEPART_NODE,
|
|
121
|
+
title: allDepartmentText
|
|
122
|
+
};
|
|
123
|
+
setRawTreeData([rootNode].concat(_toConsumableArray(rawTreeData)));
|
|
124
|
+
setTreeData((0, _utils.toTree)([rootNode].concat(_toConsumableArray(rawTreeData))));
|
|
125
|
+
setLoading(false);
|
|
126
|
+
});
|
|
127
|
+
} else {
|
|
128
|
+
(0, _requestApis.getMyDepartMent)().then(function (res) {
|
|
129
|
+
location.href = "#/summary/manage?departmentName=".concat(res.Data[0].name, "&departmentId=").concat(res.Data[0].id);
|
|
130
|
+
var rawTreeData = res.Data;
|
|
131
|
+
var rootNode = {
|
|
132
|
+
async: true,
|
|
133
|
+
data: {
|
|
134
|
+
id: rawTreeData[0].id,
|
|
135
|
+
name: rawTreeData[0].name,
|
|
136
|
+
isOpen: rawTreeData[0].isOpen,
|
|
137
|
+
hasChild: rawTreeData[0].hasChild
|
|
138
|
+
},
|
|
139
|
+
pid: -1,
|
|
140
|
+
id: '0',
|
|
141
|
+
key: '0',
|
|
142
|
+
isLeaf: true,
|
|
143
|
+
nodeType: _index.DEPART_NODE,
|
|
144
|
+
title: rawTreeData[0].name
|
|
145
|
+
};
|
|
146
|
+
setRawTreeData([rootNode].concat(_toConsumableArray(rawTreeData)));
|
|
147
|
+
setTreeData((0, _utils.toTree)([rootNode].concat(_toConsumableArray(rawTreeData))));
|
|
148
|
+
setLoading(false);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
120
151
|
}, []); // 因为要实现虚拟列表的功能,所有要动态的计算出一个菜单的高度
|
|
121
152
|
|
|
122
153
|
(0, _react.useEffect)(function () {
|
|
123
154
|
setHeight(document.body.offsetHeight - 164);
|
|
124
|
-
}, []); //
|
|
125
|
-
// location.href = "#/okr/manage?departmentName=公司全部&departmentId=0";
|
|
126
|
-
// }, []);
|
|
127
|
-
// 动态加载子节点数据集
|
|
155
|
+
}, []); // 动态加载子节点数据集
|
|
128
156
|
|
|
129
157
|
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
130
158
|
if (loadedNode.current.includes(treeNode.id)) return null;
|
|
131
159
|
return new Promise(function (resolve) {
|
|
132
|
-
(0, _requestApis.getDepsAndUsers)(treeNode.id,
|
|
160
|
+
(0, _requestApis.getDepsAndUsers)(treeNode.id, false).then(function (nodes) {
|
|
133
161
|
if (!nodes.length) {
|
|
134
162
|
resolve(true);
|
|
135
163
|
return;
|
|
@@ -152,8 +180,10 @@ function _default() {
|
|
|
152
180
|
var nodeType = node.nodeType,
|
|
153
181
|
data = node.data;
|
|
154
182
|
|
|
155
|
-
if (nodeType == _index.USER_NODE) {
|
|
156
|
-
|
|
183
|
+
if (nodeType == _index.USER_NODE) {
|
|
184
|
+
location.href = "#/summary/manage?toUserId=".concat(data.userId);
|
|
185
|
+
} else if (nodeType == _index.DEPART_NODE) {
|
|
186
|
+
location.href = "#/summary/manage?departmentName=".concat(data.name, "&departmentId=").concat(data.id);
|
|
157
187
|
}
|
|
158
188
|
|
|
159
189
|
setSelectedMenuKeys(selectedKyes);
|
|
@@ -194,7 +224,7 @@ function _default() {
|
|
|
194
224
|
itemHeight: itemHeight,
|
|
195
225
|
virtual: true,
|
|
196
226
|
onSelect: onSelectHandler,
|
|
197
|
-
defaultExpandedKeys: [
|
|
227
|
+
defaultExpandedKeys: ['0'],
|
|
198
228
|
selectedKeys: selectedMenuKeys,
|
|
199
229
|
loadData: onLoadTreeNodeDataHandler
|
|
200
230
|
})));
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultRefObject = exports["default"] = exports.PAGE_SUMMARY_SUBORDINATE = exports.PAGE_SUMMARY_SHARE = exports.PAGE_SUMMARY_ROLE = exports.PAGE_SUMMARY_MY = exports.PAGE_SUMMARY_DEPART = exports.PAGE_SUMMARY_CHART = exports.PAGE_SUMMARY_ALl = void 0;
|
|
7
7
|
|
|
8
|
-
var _auth = require("../../../../utils/auth");
|
|
9
|
-
|
|
10
8
|
var _i18n = require("../../i18n");
|
|
11
9
|
|
|
12
10
|
var _index = require("../../components/menu-tree/tree-node/index");
|
|
@@ -24,90 +22,83 @@ var defaultRefObject = {
|
|
|
24
22
|
insertSubordinates: function insertSubordinates() {},
|
|
25
23
|
getMenus: function getMenus() {},
|
|
26
24
|
setSubordinatesLoading: function setSubordinatesLoading() {},
|
|
27
|
-
SUBORDINATES:
|
|
25
|
+
SUBORDINATES: ''
|
|
28
26
|
};
|
|
29
27
|
exports.defaultRefObject = defaultRefObject;
|
|
30
|
-
var PAGE_SUMMARY_ALl =
|
|
28
|
+
var PAGE_SUMMARY_ALl = 'summaryall';
|
|
31
29
|
exports.PAGE_SUMMARY_ALl = PAGE_SUMMARY_ALl;
|
|
32
|
-
var PAGE_SUMMARY_MY =
|
|
30
|
+
var PAGE_SUMMARY_MY = 'summarymy';
|
|
33
31
|
exports.PAGE_SUMMARY_MY = PAGE_SUMMARY_MY;
|
|
34
|
-
var PAGE_SUMMARY_SUBORDINATE =
|
|
32
|
+
var PAGE_SUMMARY_SUBORDINATE = 'subordinates';
|
|
35
33
|
exports.PAGE_SUMMARY_SUBORDINATE = PAGE_SUMMARY_SUBORDINATE;
|
|
36
|
-
var PAGE_SUMMARY_SHARE =
|
|
34
|
+
var PAGE_SUMMARY_SHARE = 'share';
|
|
37
35
|
exports.PAGE_SUMMARY_SHARE = PAGE_SUMMARY_SHARE;
|
|
38
|
-
var PAGE_SUMMARY_DEPART =
|
|
36
|
+
var PAGE_SUMMARY_DEPART = 'depart';
|
|
39
37
|
exports.PAGE_SUMMARY_DEPART = PAGE_SUMMARY_DEPART;
|
|
40
|
-
var PAGE_SUMMARY_ROLE =
|
|
38
|
+
var PAGE_SUMMARY_ROLE = 'role';
|
|
41
39
|
exports.PAGE_SUMMARY_ROLE = PAGE_SUMMARY_ROLE;
|
|
42
|
-
var PAGE_SUMMARY_CHART =
|
|
40
|
+
var PAGE_SUMMARY_CHART = 'chart';
|
|
43
41
|
exports.PAGE_SUMMARY_CHART = PAGE_SUMMARY_CHART;
|
|
44
42
|
|
|
45
43
|
var summaryMenus = /*#__PURE__*/function () {
|
|
46
|
-
function summaryMenus() {
|
|
44
|
+
function summaryMenus(props) {
|
|
47
45
|
_classCallCheck(this, summaryMenus);
|
|
48
46
|
|
|
49
47
|
this.COMPANYALL = _index.COMPANY_ALL_NODE;
|
|
50
48
|
this.SHARE = _index.SHARE_NODE;
|
|
51
49
|
this.SUBORDINATES = 'subordinates';
|
|
52
|
-
|
|
53
|
-
var baseAuth = new _auth.BaseAuth();
|
|
54
|
-
|
|
55
|
-
if (baseAuth.isBoss() || baseAuth.isManager() || baseAuth.isDepartmentLeader()) {
|
|
56
|
-
hasDashboardAuth = true;
|
|
57
|
-
}
|
|
58
|
-
|
|
50
|
+
console.log('props', props);
|
|
59
51
|
this.menus = [{
|
|
60
|
-
icon:
|
|
52
|
+
icon: 'all-zongjie',
|
|
61
53
|
label: _i18n.locale.menu_all_summary,
|
|
62
54
|
key: PAGE_SUMMARY_ALl,
|
|
63
55
|
type: _index.MENU_ITEM_NOE,
|
|
64
|
-
href:
|
|
56
|
+
href: '#/summary/all',
|
|
57
|
+
isShow: true
|
|
65
58
|
}, {
|
|
66
|
-
icon:
|
|
59
|
+
icon: 'caidan-my',
|
|
67
60
|
label: _i18n.locale.menu_my_summary,
|
|
68
61
|
key: PAGE_SUMMARY_MY,
|
|
69
62
|
type: _index.MENU_ITEM_NOE,
|
|
70
|
-
href:
|
|
63
|
+
href: '#/summary/my',
|
|
64
|
+
isShow: true
|
|
71
65
|
}, {
|
|
72
|
-
icon:
|
|
66
|
+
icon: 'caidan-xiashu',
|
|
73
67
|
label: _i18n.locale.menu_my_subordinates,
|
|
74
68
|
key: this.SUBORDINATES,
|
|
75
69
|
type: _index.SUBORDINATES_NODE,
|
|
76
70
|
isLeaf: false,
|
|
77
71
|
children: [],
|
|
78
|
-
href:
|
|
72
|
+
href: '#/summary/subordinates',
|
|
79
73
|
isShow: window.BSGlobal.loginUserInfo.HasSub
|
|
80
74
|
}, {
|
|
81
|
-
icon:
|
|
75
|
+
icon: 'caidan-enjoy',
|
|
82
76
|
label: _i18n.locale.menu_my_share,
|
|
83
77
|
key: PAGE_SUMMARY_SHARE,
|
|
84
78
|
type: _index.MENU_ITEM_NOE,
|
|
85
|
-
href:
|
|
79
|
+
href: '#/summary/share',
|
|
80
|
+
isShow: props.isShowShare
|
|
86
81
|
}, {
|
|
87
|
-
icon:
|
|
82
|
+
icon: 'bumen',
|
|
88
83
|
label: _i18n.locale.menu_department,
|
|
89
84
|
key: this.COMPANYALL,
|
|
90
85
|
type: this.COMPANYALL,
|
|
91
|
-
href:
|
|
86
|
+
href: '',
|
|
87
|
+
isShow: props.isShowDept
|
|
92
88
|
}, {
|
|
93
|
-
icon:
|
|
89
|
+
icon: '',
|
|
94
90
|
label: _i18n.locale.menu_summary,
|
|
95
|
-
key:
|
|
91
|
+
key: 'other',
|
|
96
92
|
type: _index.GROUP_NAME_NODE,
|
|
97
|
-
href:
|
|
93
|
+
href: '',
|
|
94
|
+
isShow: true
|
|
98
95
|
}, {
|
|
99
|
-
icon:
|
|
96
|
+
icon: 'my-setup',
|
|
100
97
|
label: _i18n.locale.menu_summary_role,
|
|
101
98
|
key: PAGE_SUMMARY_ROLE,
|
|
102
99
|
type: _index.MENU_ITEM_NOE,
|
|
103
|
-
href:
|
|
104
|
-
|
|
105
|
-
icon: "yibiao",
|
|
106
|
-
label: _i18n.locale.menu_summary_count,
|
|
107
|
-
key: PAGE_SUMMARY_CHART,
|
|
108
|
-
type: _index.MENU_ITEM_NOE,
|
|
109
|
-
href: "#/summary/chart",
|
|
110
|
-
isShow: hasDashboardAuth
|
|
100
|
+
href: '#/enterprise/manage?reactRouterName=daily',
|
|
101
|
+
isShow: true
|
|
111
102
|
}];
|
|
112
103
|
}
|
|
113
104
|
|
|
@@ -118,11 +109,11 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
118
109
|
|
|
119
110
|
if (loading) {
|
|
120
111
|
this.menus[1].children.push({
|
|
121
|
-
icon:
|
|
122
|
-
label:
|
|
123
|
-
key:
|
|
112
|
+
icon: '',
|
|
113
|
+
label: 'loading',
|
|
114
|
+
key: 'loading-subordinates',
|
|
124
115
|
type: _index.LOADING_NODE,
|
|
125
|
-
href:
|
|
116
|
+
href: '',
|
|
126
117
|
data: {}
|
|
127
118
|
});
|
|
128
119
|
}
|
|
@@ -132,11 +123,11 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
132
123
|
value: function insertSubordinates(users) {
|
|
133
124
|
if (!users || !users.length) {
|
|
134
125
|
this.menus[2].children = [{
|
|
135
|
-
icon:
|
|
136
|
-
label:
|
|
137
|
-
key:
|
|
126
|
+
icon: '',
|
|
127
|
+
label: 'empty-subordinates',
|
|
128
|
+
key: 'empty-subordinates',
|
|
138
129
|
type: _index.NO_SUBORDINATES_NODE,
|
|
139
|
-
href:
|
|
130
|
+
href: '',
|
|
140
131
|
data: {}
|
|
141
132
|
}];
|
|
142
133
|
return;
|
|
@@ -147,11 +138,11 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
147
138
|
for (var i = 0; i < users.length; i++) {
|
|
148
139
|
var user = users[i];
|
|
149
140
|
treeNodeUsers.push({
|
|
150
|
-
icon:
|
|
141
|
+
icon: '',
|
|
151
142
|
label: user.name,
|
|
152
143
|
key: "".concat(user.userId),
|
|
153
144
|
type: _index.USER_NODE,
|
|
154
|
-
href:
|
|
145
|
+
href: '',
|
|
155
146
|
data: user
|
|
156
147
|
});
|
|
157
148
|
}
|
|
@@ -162,7 +153,7 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
162
153
|
key: "getMenus",
|
|
163
154
|
value: function getMenus() {
|
|
164
155
|
var menus = this.formateToTreeNodeData(this.menus.filter(function (it) {
|
|
165
|
-
return it.isShow
|
|
156
|
+
return it.isShow == true;
|
|
166
157
|
}));
|
|
167
158
|
return menus;
|
|
168
159
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getShareStatus = void 0;
|
|
7
|
+
|
|
8
|
+
var _request = require("@titaui/request");
|
|
9
|
+
|
|
10
|
+
var _helpers = require("../../../../utils/helpers");
|
|
11
|
+
|
|
12
|
+
var getShareStatus = function getShareStatus() {
|
|
13
|
+
var loginUser = (0, _helpers.getLoginUserInfo)();
|
|
14
|
+
return (0, _request.rget)('v1')("summary/getShareUsers?toUserId=".concat(loginUser.Id));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.getShareStatus = getShareStatus;
|
|
@@ -23,6 +23,10 @@ var _menuHighlight = _interopRequireDefault(require("./menu-highlight"));
|
|
|
23
23
|
|
|
24
24
|
var _requestApis = require("../../request-apis");
|
|
25
25
|
|
|
26
|
+
var _requestApi = require("./request-api");
|
|
27
|
+
|
|
28
|
+
var _auth = require("../../../../utils/auth");
|
|
29
|
+
|
|
26
30
|
require("../../index.css");
|
|
27
31
|
|
|
28
32
|
require("./index.css");
|
|
@@ -59,7 +63,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
59
63
|
maxHeight = _useState2[0],
|
|
60
64
|
setMaxHeight = _useState2[1];
|
|
61
65
|
|
|
62
|
-
var _useState3 = (0, _react.useState)([
|
|
66
|
+
var _useState3 = (0, _react.useState)(['myokr']),
|
|
63
67
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
64
68
|
expandedKeys = _useState4[0],
|
|
65
69
|
setExpandedKeys = _useState4[1];
|
|
@@ -69,19 +73,32 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
69
73
|
selectedMenuKeys = _useState6[0],
|
|
70
74
|
setSelectedMenuKeys = _useState6[1];
|
|
71
75
|
|
|
76
|
+
var _useState7 = (0, _react.useState)(false),
|
|
77
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
78
|
+
isShowShare = _useState8[0],
|
|
79
|
+
setIsShowShare = _useState8[1];
|
|
80
|
+
|
|
81
|
+
var _useState9 = (0, _react.useState)(new _auth.BaseAuth().isBoss()),
|
|
82
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
83
|
+
isShowDepartment = _useState10[0],
|
|
84
|
+
setIsShowDepartment = _useState10[1];
|
|
85
|
+
|
|
72
86
|
var flipRef = (0, _react.useRef)({
|
|
73
87
|
next: function next() {},
|
|
74
88
|
goback: function goback() {}
|
|
75
89
|
});
|
|
76
90
|
var summaryMenusData = (0, _react.useRef)(_menus.defaultRefObject);
|
|
77
91
|
|
|
78
|
-
var
|
|
79
|
-
summaryMenusData.current = new _menus["default"](
|
|
92
|
+
var _useState11 = (0, _react.useState)(function () {
|
|
93
|
+
summaryMenusData.current = new _menus["default"]({
|
|
94
|
+
isShowShare: false,
|
|
95
|
+
isShowDept: true
|
|
96
|
+
});
|
|
80
97
|
return summaryMenusData.current.getMenus();
|
|
81
98
|
}),
|
|
82
|
-
|
|
83
|
-
menus =
|
|
84
|
-
setMenus =
|
|
99
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
100
|
+
menus = _useState12[0],
|
|
101
|
+
setMenus = _useState12[1]; // 判断路由高亮菜单
|
|
85
102
|
|
|
86
103
|
|
|
87
104
|
(0, _react.useEffect)(function () {
|
|
@@ -121,7 +138,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
121
138
|
resolve(true); // 获取数据
|
|
122
139
|
|
|
123
140
|
(0, _requestApis.getSubordinates)({
|
|
124
|
-
relationIds:
|
|
141
|
+
relationIds: '1,2'
|
|
125
142
|
}, {
|
|
126
143
|
disabledDottedSubordinatesDig: true
|
|
127
144
|
}).then(function (users) {
|
|
@@ -161,6 +178,32 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
161
178
|
};
|
|
162
179
|
});
|
|
163
180
|
(0, _react.useEffect)(function () {
|
|
181
|
+
var newMenu = new _menus["default"]({
|
|
182
|
+
isShowShare: isShowShare,
|
|
183
|
+
isShowDept: isShowDepartment
|
|
184
|
+
});
|
|
185
|
+
summaryMenusData.current = newMenu;
|
|
186
|
+
setMenus(newMenu.getMenus());
|
|
187
|
+
}, [isShowShare, isShowDepartment]);
|
|
188
|
+
(0, _react.useEffect)(function () {
|
|
189
|
+
(0, _requestApi.getShareStatus)().then(function (resp) {
|
|
190
|
+
if (resp.Code === 1) {
|
|
191
|
+
if (resp.Data.length > 0) {
|
|
192
|
+
setIsShowShare(true);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
if (!isShowDepartment) {
|
|
198
|
+
(0, _requestApis.getMyDepartMent)().then(function (resp) {
|
|
199
|
+
if (resp.Code === 1) {
|
|
200
|
+
if (resp.Data.length > 0) {
|
|
201
|
+
setIsShowDepartment(true);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
|
|
164
207
|
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
165
208
|
var _iterator = _createForOfIteratorHelper(entries),
|
|
166
209
|
_step;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.removeFollower = exports.getSubordinates = exports.getFollowerList = exports.getDepsAndUsers = exports.addFollower = void 0;
|
|
6
|
+
exports.removeFollower = exports.getSubordinates = exports.getMyDepartMent = exports.getFollowerList = exports.getDepsAndUsers = exports.addFollower = void 0;
|
|
7
7
|
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
|
|
@@ -137,4 +137,10 @@ var getDepsAndUsers = function getDepsAndUsers() {
|
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
exports.getDepsAndUsers = getDepsAndUsers;
|
|
140
|
+
exports.getDepsAndUsers = getDepsAndUsers;
|
|
141
|
+
|
|
142
|
+
var getMyDepartMent = function getMyDepartMent() {
|
|
143
|
+
return (0, _request.rget)('v2')("department/myLead?toUserId=".concat(userId));
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
exports.getMyDepartMent = getMyDepartMent;
|
|
@@ -39,7 +39,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
39
39
|
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
|
|
42
|
-
var prefix =
|
|
42
|
+
var prefix = "tita-ui-new-confidence";
|
|
43
43
|
|
|
44
44
|
var NewConfidence = function NewConfidence(_ref) {
|
|
45
45
|
var value = _ref.value,
|
|
@@ -70,7 +70,7 @@ var NewConfidence = function NewConfidence(_ref) {
|
|
|
70
70
|
setConfidence(value);
|
|
71
71
|
}, [value]);
|
|
72
72
|
var renderPopContent = (0, _react.useMemo)(function () {
|
|
73
|
-
if (!editable) return;
|
|
73
|
+
if (!editable) return null;
|
|
74
74
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
75
|
className: "".concat(prefix, "__pop-content")
|
|
76
76
|
}, _constant.ConfidencePointArr.map(function (point) {
|
|
@@ -85,12 +85,12 @@ var NewConfidence = function NewConfidence(_ref) {
|
|
|
85
85
|
src: _constant.ConfidenceMapIcon[point]
|
|
86
86
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
87
87
|
className: "".concat(prefix, "__pop-content-item-text")
|
|
88
|
-
}, point, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)(
|
|
88
|
+
}, point, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("Per_Set_Form_Quantifier_Points"))));
|
|
89
89
|
}));
|
|
90
90
|
}, [editable]);
|
|
91
91
|
return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
92
92
|
popup: renderPopContent,
|
|
93
|
-
popupPlacement:
|
|
93
|
+
popupPlacement: "bottom",
|
|
94
94
|
ref: popupRef,
|
|
95
95
|
popupAlign: {
|
|
96
96
|
offset: [0, 5],
|
|
@@ -102,7 +102,7 @@ var NewConfidence = function NewConfidence(_ref) {
|
|
|
102
102
|
}
|
|
103
103
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
104
|
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--editable"), editable))
|
|
105
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
105
|
+
}, confidence > 0 && /*#__PURE__*/_react["default"].createElement("img", {
|
|
106
106
|
className: "".concat(prefix, "__icon"),
|
|
107
107
|
alt: "",
|
|
108
108
|
src: _constant.ConfidenceMapIcon[confidence]
|
|
@@ -33,8 +33,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
33
33
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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
35
|
|
|
36
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
37
|
-
|
|
38
36
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
39
37
|
|
|
40
38
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -91,8 +89,8 @@ var Principal = function Principal(_ref) {
|
|
|
91
89
|
};
|
|
92
90
|
|
|
93
91
|
var confirmHandler = /*#__PURE__*/function () {
|
|
94
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/
|
|
95
|
-
return
|
|
92
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
93
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
96
94
|
while (1) {
|
|
97
95
|
switch (_context.prev = _context.next) {
|
|
98
96
|
case 0:
|
|
@@ -31,8 +31,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
33
33
|
|
|
34
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
35
|
-
|
|
36
34
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
37
35
|
|
|
38
36
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -85,8 +83,8 @@ function _default(props) {
|
|
|
85
83
|
}, []);
|
|
86
84
|
|
|
87
85
|
var onMakeNiceHander = /*#__PURE__*/function () {
|
|
88
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
89
|
-
return
|
|
86
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
87
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
90
88
|
while (1) {
|
|
91
89
|
switch (_context.prev = _context.next) {
|
|
92
90
|
case 0:
|
|
@@ -171,8 +169,8 @@ function _default(props) {
|
|
|
171
169
|
visible: selectorVisible,
|
|
172
170
|
align: "center",
|
|
173
171
|
onSelect: /*#__PURE__*/function () {
|
|
174
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
|
175
|
-
return
|
|
172
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(type) {
|
|
173
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
176
174
|
while (1) {
|
|
177
175
|
switch (_context2.prev = _context2.next) {
|
|
178
176
|
case 0:
|