@titaui/pc 1.11.4-0 → 1.11.4-11
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/avatar/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/rect-btn/index.js +7 -7
- package/lib/components/change-okr-modal/Item.js +15 -15
- package/lib/components/communication/index.js +30 -29
- package/lib/components/drawer/index.js +7 -6
- package/lib/components/dynamic/constant.js +43 -36
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +243 -0
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +6 -2
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +11 -11
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +14 -14
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/index.js +70 -41
- package/lib/components/dynamic/dynamic-list/index.js +5 -13
- package/lib/components/e-priority/index.js +18 -12
- package/lib/components/eReport/eReportShare/index.js +11 -11
- package/lib/components/file-list/components/single-file/index.js +11 -11
- package/lib/components/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +102 -0
- package/lib/components/form/form-fields/input/index.js +10 -10
- package/lib/components/form/form-fields/user/index.css +23 -3
- package/lib/components/form/form-fields/user/index.js +18 -8
- package/lib/components/form/form-fields/user/user-input.js +15 -6
- package/lib/components/form/index.js +10 -3
- package/lib/components/icon-button-list/index.css +2 -57
- package/lib/components/icon-button-list/index.js +10 -7
- package/lib/components/img-viewer/index.css +10 -3
- package/lib/components/img-viewer/index.js +57 -18
- package/lib/components/mblog/index.js +31 -30
- package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.css +4 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +23 -17
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +5 -5
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +5 -4
- package/lib/components/nav-top/components/menu/index.js +14 -14
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
- package/lib/components/nav-top/components/user-message/constant.js +1 -0
- package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
- package/lib/components/nav-top/components/user-message/index.js +23 -20
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
- package/lib/components/okr-detail/detail-header/actions.js +62 -66
- package/lib/components/okr-detail/detail-header/index.css +2 -2
- package/lib/components/okr-detail/detail-header/index.js +205 -194
- package/lib/components/okr-detail/index.js +21 -19
- package/lib/components/okr-flow/child-node/index.css +67 -21
- package/lib/components/okr-flow/child-node/work-node.js +61 -24
- package/lib/components/okr-flow/empty/index.css +8 -1
- package/lib/components/okr-flow/export-modal/index.js +42 -18
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.css +3 -1
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +30 -24
- package/lib/components/okr-flow/images/loading-light.gif +0 -0
- package/lib/components/okr-flow/okr-map/index.js +43 -22
- package/lib/components/okr-flow/request-apis.js +15 -8
- package/lib/components/okr-flow/root-node/index.css +2 -2
- package/lib/components/okr-flow/root-node/index.js +26 -25
- package/lib/components/okr-flow/utils/index.js +45 -29
- package/lib/components/okr-flow/utils/tree-handler.js +29 -18
- package/lib/components/okrcase-library/index.css +6 -4
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +36 -30
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +9 -3
- package/lib/components/period-selector/index.js +14 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +21 -19
- package/lib/components/picker/components/panels/date-panel/date-head.js +29 -8
- package/lib/components/picker/components/panels/month-panel/month-body.js +6 -4
- package/lib/components/picker/components/picker-trigger/index.css +31 -0
- package/lib/components/picker/components/picker-trigger/index.js +24 -15
- package/lib/components/picker/picker-panels.js +1 -1
- package/lib/components/picker/picker.js +12 -13
- package/lib/components/popup/index.js +4 -4
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scroll-container/index.js +423 -0
- package/lib/components/scroll-container/style.css +35 -0
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/components/chart/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -13
- package/lib/components/survey-model/contact.js +93 -0
- package/lib/components/survey-model/index.css +141 -0
- package/lib/components/survey-model/index.js +265 -0
- package/lib/components/survey-model/instance.js +86 -0
- package/lib/components/survey-model/request-api.js +80 -0
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +22 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/precls.js +8 -0
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
- package/lib/components/task-tree/task-item-node/e-project.js +212 -0
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
- package/lib/components/task-tree/task-item-node/e-task.js +426 -0
- package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
- package/lib/components/task-tree/task-item-node/index.css +289 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +16 -0
- package/lib/components/task-tree/task-tree.js +49 -0
- package/lib/components/time-picker/index.css +24 -0
- package/lib/components/time-picker/time-picker-selector.js +8 -12
- package/lib/components/time-picker/time-picker.js +136 -108
- package/lib/components/time-picker/utils.js +13 -2
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components/wechat-btn/index.css +14 -0
- package/lib/components/wechat-btn/index.js +338 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/index.js +99 -91
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +7 -2
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +73 -34
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +65 -42
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +26 -14
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +58 -13
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +28 -20
- package/lib/pages/okr-map/number-select/index.css +12 -9
- package/lib/pages/okr-map/number-select/index.js +3 -3
- package/lib/utils/auth.js +65 -8
- package/lib/utils/bs-global.js +18 -6
- package/lib/utils/open-data.js +63 -43
- package/package.json +6 -2
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -223
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -31
- package/.prettierrc.js +0 -90
- package/.vscode/settings.json +0 -5
- package/yarn-error.log +0 -22184
|
@@ -27,7 +27,7 @@ var _level2Search = _interopRequireDefault(require("../../level2-search"));
|
|
|
27
27
|
|
|
28
28
|
var _requestApis = require("../../request-apis");
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _useStorage15 = _interopRequireDefault(require("../../hooks/useStorage"));
|
|
31
31
|
|
|
32
32
|
var _drawerManager = _interopRequireDefault(require("../../../../components/drawer-manager"));
|
|
33
33
|
|
|
@@ -75,39 +75,44 @@ function _default(props) {
|
|
|
75
75
|
_objectDestructuringEmpty(props); // 使用存储的State
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
var _useStorage = (0,
|
|
78
|
+
var _useStorage = (0, _useStorage15["default"])('period', {
|
|
79
79
|
annualNum: "".concat(new Date().getFullYear()),
|
|
80
|
-
cycleType:
|
|
80
|
+
cycleType: '2',
|
|
81
81
|
yqmNum: "".concat((0, _dayjs["default"])().quarter())
|
|
82
82
|
}),
|
|
83
83
|
_useStorage2 = _slicedToArray(_useStorage, 2),
|
|
84
84
|
period = _useStorage2[0],
|
|
85
85
|
setPeriod = _useStorage2[1];
|
|
86
86
|
|
|
87
|
-
var _useStorage3 = (0,
|
|
87
|
+
var _useStorage3 = (0, _useStorage15["default"])('showkr', false),
|
|
88
88
|
_useStorage4 = _slicedToArray(_useStorage3, 2),
|
|
89
89
|
showkr = _useStorage4[0],
|
|
90
90
|
setShowKr = _useStorage4[1];
|
|
91
91
|
|
|
92
|
-
var _useStorage5 = (0,
|
|
92
|
+
var _useStorage5 = (0, _useStorage15["default"])('showCardKr', false),
|
|
93
93
|
_useStorage6 = _slicedToArray(_useStorage5, 2),
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
showCardKr = _useStorage6[0],
|
|
95
|
+
setShowCardKr = _useStorage6[1];
|
|
96
96
|
|
|
97
|
-
var _useStorage7 = (0,
|
|
97
|
+
var _useStorage7 = (0, _useStorage15["default"])('searchType', 'company'),
|
|
98
98
|
_useStorage8 = _slicedToArray(_useStorage7, 2),
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
searchType = _useStorage8[0],
|
|
100
|
+
setSearchType = _useStorage8[1];
|
|
101
101
|
|
|
102
|
-
var _useStorage9 = (0,
|
|
102
|
+
var _useStorage9 = (0, _useStorage15["default"])('level2Selected', {}),
|
|
103
|
+
_useStorage10 = _slicedToArray(_useStorage9, 2),
|
|
104
|
+
level2Selected = _useStorage10[0],
|
|
105
|
+
setLevel2Selected = _useStorage10[1];
|
|
106
|
+
|
|
107
|
+
var _useStorage11 = (0, _useStorage15["default"])('rootNode', {
|
|
103
108
|
rootId: 0,
|
|
104
|
-
rootName:
|
|
109
|
+
rootName: ''
|
|
105
110
|
}, {
|
|
106
111
|
noLocal: true
|
|
107
112
|
}),
|
|
108
|
-
|
|
109
|
-
rootNode =
|
|
110
|
-
setRootNode =
|
|
113
|
+
_useStorage12 = _slicedToArray(_useStorage11, 2),
|
|
114
|
+
rootNode = _useStorage12[0],
|
|
115
|
+
setRootNode = _useStorage12[1];
|
|
111
116
|
|
|
112
117
|
var _useState = (0, _react.useState)(true),
|
|
113
118
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -125,7 +130,7 @@ function _default(props) {
|
|
|
125
130
|
darkTheme = _useState6[0],
|
|
126
131
|
setDarkTheme = _useState6[1];
|
|
127
132
|
|
|
128
|
-
var _useState7 = (0, _react.useState)(
|
|
133
|
+
var _useState7 = (0, _react.useState)('horizontal'),
|
|
129
134
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
130
135
|
direction = _useState8[0],
|
|
131
136
|
setDirection = _useState8[1]; // 默认水平
|
|
@@ -152,10 +157,10 @@ function _default(props) {
|
|
|
152
157
|
showMask = _useState16[0],
|
|
153
158
|
setShowMask = _useState16[1];
|
|
154
159
|
|
|
155
|
-
var
|
|
156
|
-
|
|
157
|
-
openLevel =
|
|
158
|
-
setOpenLevel =
|
|
160
|
+
var _useStorage13 = (0, _useStorage15["default"])('openLevel', 2),
|
|
161
|
+
_useStorage14 = _slicedToArray(_useStorage13, 2),
|
|
162
|
+
openLevel = _useStorage14[0],
|
|
163
|
+
setOpenLevel = _useStorage14[1];
|
|
159
164
|
|
|
160
165
|
var _useState17 = (0, _react.useState)(false),
|
|
161
166
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
@@ -177,7 +182,7 @@ function _default(props) {
|
|
|
177
182
|
}
|
|
178
183
|
}, [fullScreen]);
|
|
179
184
|
(0, _react.useEffect)(function () {
|
|
180
|
-
if (searchType ==
|
|
185
|
+
if (searchType == 'company') {
|
|
181
186
|
setRootNode({
|
|
182
187
|
rootId: 0,
|
|
183
188
|
rootName: _utils.tenantName
|
|
@@ -192,25 +197,37 @@ function _default(props) {
|
|
|
192
197
|
|
|
193
198
|
var onMapActionsHandler = function onMapActionsHandler(iconType) {
|
|
194
199
|
switch (iconType) {
|
|
195
|
-
case
|
|
200
|
+
case 'export':
|
|
196
201
|
exportCurrentFlow();
|
|
197
202
|
break;
|
|
198
203
|
|
|
199
|
-
case
|
|
204
|
+
case 'share':
|
|
200
205
|
setShareDialogVisible(true);
|
|
201
206
|
break;
|
|
202
207
|
|
|
203
|
-
case
|
|
208
|
+
case 'fullscreen':
|
|
204
209
|
// 全屏
|
|
210
|
+
var cardFlat = document.querySelector('.titaui-menus__menu-card');
|
|
211
|
+
|
|
212
|
+
if (cardFlat) {
|
|
213
|
+
cardFlat.style.display = 'none';
|
|
214
|
+
}
|
|
215
|
+
|
|
205
216
|
setFullScreen(true);
|
|
206
217
|
break;
|
|
207
218
|
|
|
208
|
-
case
|
|
219
|
+
case 'quit-fullscreen':
|
|
209
220
|
// 退出全屏
|
|
221
|
+
var cardFlat = document.querySelector('.titaui-menus__menu-card');
|
|
222
|
+
|
|
223
|
+
if (cardFlat) {
|
|
224
|
+
cardFlat.style.display = 'flex';
|
|
225
|
+
}
|
|
226
|
+
|
|
210
227
|
setFullScreen(false);
|
|
211
228
|
break;
|
|
212
229
|
|
|
213
|
-
case
|
|
230
|
+
case 'horizontal':
|
|
214
231
|
setDirection(iconType);
|
|
215
232
|
setForceRender(true);
|
|
216
233
|
setTimeout(function () {
|
|
@@ -218,7 +235,7 @@ function _default(props) {
|
|
|
218
235
|
}, 100);
|
|
219
236
|
break;
|
|
220
237
|
|
|
221
|
-
case
|
|
238
|
+
case 'vertical':
|
|
222
239
|
setDirection(iconType);
|
|
223
240
|
setForceRender(true);
|
|
224
241
|
setTimeout(function () {
|
|
@@ -235,7 +252,7 @@ function _default(props) {
|
|
|
235
252
|
var setLevel2SelectedHandler = function setLevel2SelectedHandler(node) {
|
|
236
253
|
var restAttrs = {}; // 把用户头像带过去
|
|
237
254
|
|
|
238
|
-
if (node.nodeType ==
|
|
255
|
+
if (node.nodeType == 'person') {
|
|
239
256
|
restAttrs.avatar = node.data.avatar;
|
|
240
257
|
}
|
|
241
258
|
|
|
@@ -257,27 +274,28 @@ function _default(props) {
|
|
|
257
274
|
setSearchType(iconType);
|
|
258
275
|
|
|
259
276
|
switch (iconType) {
|
|
260
|
-
case
|
|
277
|
+
case 'company':
|
|
261
278
|
return setHasSubSearch(false);
|
|
262
279
|
|
|
263
|
-
case
|
|
280
|
+
case 'depart':
|
|
264
281
|
setLevel2Selected({
|
|
265
282
|
id: DepartmentId,
|
|
266
283
|
name: Department
|
|
267
284
|
});
|
|
268
285
|
break;
|
|
269
286
|
|
|
270
|
-
case
|
|
287
|
+
case 'group':
|
|
271
288
|
// 群组的默认显示项为数据列表的第一个节点
|
|
272
289
|
// 清空其他选项值,等待异步回调选中第一个数据
|
|
273
290
|
setLevel2Selected({});
|
|
274
291
|
break;
|
|
275
292
|
|
|
276
|
-
case
|
|
293
|
+
case 'user':
|
|
277
294
|
var userAvatar = {
|
|
278
295
|
color: UserAvatar.Color,
|
|
279
296
|
small: UserAvatar.Small,
|
|
280
|
-
hasAvatar: UserAvatar.HasAvatar
|
|
297
|
+
hasAvatar: UserAvatar.HasAvatar,
|
|
298
|
+
big: UserAvatar.Original || UserAvatar.original || UserAvatar.Big || UserAvatar.Large
|
|
281
299
|
};
|
|
282
300
|
setLevel2Selected({
|
|
283
301
|
id: Id,
|
|
@@ -330,7 +348,7 @@ function _default(props) {
|
|
|
330
348
|
var onKrPushChange = function onKrPushChange(name, value, id) {
|
|
331
349
|
var data = {};
|
|
332
350
|
|
|
333
|
-
if (name ==
|
|
351
|
+
if (name == 'user') {
|
|
334
352
|
var avatar = {};
|
|
335
353
|
|
|
336
354
|
for (var key in value.UserAvatar) {
|
|
@@ -344,16 +362,16 @@ function _default(props) {
|
|
|
344
362
|
userId: value.Id
|
|
345
363
|
}
|
|
346
364
|
};
|
|
347
|
-
} else if (name ==
|
|
365
|
+
} else if (name == 'date') {
|
|
348
366
|
data = {
|
|
349
367
|
startDate: value.startDate,
|
|
350
368
|
endDate: value.endDate
|
|
351
369
|
};
|
|
352
|
-
} else if (name ==
|
|
370
|
+
} else if (name == 'progress') {
|
|
353
371
|
data = {
|
|
354
372
|
progress: value
|
|
355
373
|
};
|
|
356
|
-
} else if (name ==
|
|
374
|
+
} else if (name == 'mileStoneName') {
|
|
357
375
|
data = {
|
|
358
376
|
mileStoneName: value
|
|
359
377
|
};
|
|
@@ -373,11 +391,11 @@ function _default(props) {
|
|
|
373
391
|
var modelType = node.modelType,
|
|
374
392
|
data = node.data;
|
|
375
393
|
|
|
376
|
-
if (modelType ==
|
|
377
|
-
_drawerManager["default"].open(
|
|
394
|
+
if (modelType == 'work') {
|
|
395
|
+
_drawerManager["default"].open('okrDetail', {
|
|
378
396
|
okrId: data.workId
|
|
379
397
|
});
|
|
380
|
-
} else if (modelType ==
|
|
398
|
+
} else if (modelType == 'kr') {
|
|
381
399
|
if (!data.mapkrVisible) return;
|
|
382
400
|
setSelectOkr(_objectSpread(_objectSpread({}, data), {}, {
|
|
383
401
|
workId: data.mileStoneId,
|
|
@@ -395,7 +413,7 @@ function _default(props) {
|
|
|
395
413
|
principalUser: data.user
|
|
396
414
|
}));
|
|
397
415
|
|
|
398
|
-
_drawerManager["default"].open(
|
|
416
|
+
_drawerManager["default"].open('krDetail', {
|
|
399
417
|
krId: data.mileStoneId
|
|
400
418
|
});
|
|
401
419
|
}
|
|
@@ -430,6 +448,9 @@ function _default(props) {
|
|
|
430
448
|
onShowKrClick: function onShowKrClick(val) {
|
|
431
449
|
return setShowKr(val);
|
|
432
450
|
},
|
|
451
|
+
onShowCardKr: function onShowCardKr(val) {
|
|
452
|
+
return setShowCardKr(val);
|
|
453
|
+
},
|
|
433
454
|
onSearchChange: onSearchChangeHandler,
|
|
434
455
|
onPeriodChange: function onPeriodChange(period) {
|
|
435
456
|
return setPeriod(period);
|
|
@@ -446,13 +467,14 @@ function _default(props) {
|
|
|
446
467
|
darkTheme: darkTheme,
|
|
447
468
|
direction: direction,
|
|
448
469
|
showkr: showkr,
|
|
470
|
+
showCardKr: showCardKr,
|
|
449
471
|
period: period
|
|
450
472
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
451
473
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__content"))
|
|
452
474
|
}, function () {
|
|
453
475
|
// 根据选择的搜索类型不同,show出不同的组件
|
|
454
476
|
if (!hasSubSearch) return undefined;
|
|
455
|
-
if (searchType ==
|
|
477
|
+
if (searchType == 'company') return undefined;
|
|
456
478
|
return /*#__PURE__*/_react["default"].createElement(_level2Search["default"], {
|
|
457
479
|
key: searchType,
|
|
458
480
|
type: searchType,
|
|
@@ -469,6 +491,7 @@ function _default(props) {
|
|
|
469
491
|
return /*#__PURE__*/_react["default"].createElement(OkrSearchPanel, _extends({
|
|
470
492
|
ref: okrMapRef,
|
|
471
493
|
showkr: showkr,
|
|
494
|
+
showCardKr: showCardKr,
|
|
472
495
|
direction: direction,
|
|
473
496
|
darkTheme: darkTheme,
|
|
474
497
|
openLevel: openLevel,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
padding-left: 25px;
|
|
6
6
|
box-sizing: border-box;
|
|
7
|
+
border-radius: 12px;
|
|
7
8
|
height: 76px;
|
|
8
9
|
background: #ffffff;
|
|
9
10
|
box-shadow: 0px 0px 8px 0px #e9eef3;
|
|
@@ -23,18 +24,6 @@
|
|
|
23
24
|
line-height: 28px;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
.titapage-okr-map-share-okr__header-title:after {
|
|
27
|
-
display: inline-block;
|
|
28
|
-
position: absolute;
|
|
29
|
-
content: '';
|
|
30
|
-
right: 0;
|
|
31
|
-
top: 0;
|
|
32
|
-
background: linear-gradient(180deg, rgba(191, 199, 213, 0) 0%, #bfc7d5 50%, rgba(191, 199, 213, 0) 100%);
|
|
33
|
-
border-radius: 1px;
|
|
34
|
-
width: 1px;
|
|
35
|
-
height: 100%;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
27
|
.titapage-okr-map-share-okr__header-dark {
|
|
39
28
|
display: inline-block;
|
|
40
29
|
position: absolute;
|
|
@@ -71,6 +60,29 @@
|
|
|
71
60
|
right: 25px;
|
|
72
61
|
}
|
|
73
62
|
|
|
63
|
+
.titapage-okr-map-share-okr__header-showMore {
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
position: absolute;
|
|
66
|
+
right: 110px;
|
|
67
|
+
padding: 0 12px;
|
|
68
|
+
height: 30px;
|
|
69
|
+
line-height: 30px;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
color: #3f4755;
|
|
72
|
+
font-size: 12px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.titapage-okr-map-share-okr__header-showMore::after {
|
|
76
|
+
position: absolute;
|
|
77
|
+
display: inline-block;
|
|
78
|
+
background: url("../../../images/line-down-arrow.svg") transparent no-repeat 50% 50%;
|
|
79
|
+
content: '';
|
|
80
|
+
height: 6px;
|
|
81
|
+
width: 10px;
|
|
82
|
+
right: 0;
|
|
83
|
+
top: calc(50% - 3px);
|
|
84
|
+
}
|
|
85
|
+
|
|
74
86
|
.titapage-okr-map__dark .titapage-okr-map-share-okr__header {
|
|
75
87
|
background: #3f4755;
|
|
76
88
|
box-shadow: none;
|
|
@@ -81,7 +93,7 @@
|
|
|
81
93
|
}
|
|
82
94
|
|
|
83
95
|
.titapage-okr-map__dark .titapage-okr-map-share-okr__header-dark {
|
|
84
|
-
color: #
|
|
96
|
+
color: #89919f;
|
|
85
97
|
}
|
|
86
98
|
|
|
87
99
|
.titapage-okr-map__dark .titapage-okr-map-share-okr__header-dark:before {
|
|
@@ -117,5 +129,5 @@
|
|
|
117
129
|
}
|
|
118
130
|
|
|
119
131
|
.titapage-okr-map__dark .titapage-okr-map-share-okr__header .titaui-icon-button-list__btn:hover {
|
|
120
|
-
background-color: #
|
|
132
|
+
background-color: #515a69;
|
|
121
133
|
}
|
|
@@ -17,6 +17,10 @@ var _switch = _interopRequireDefault(require("../../../../../components/switch")
|
|
|
17
17
|
|
|
18
18
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
19
19
|
|
|
20
|
+
var _popup = _interopRequireDefault(require("../../../../../components/popup"));
|
|
21
|
+
|
|
22
|
+
var _toast = _interopRequireDefault(require("../../../../../components/toast"));
|
|
23
|
+
|
|
20
24
|
var _precls = _interopRequireDefault(require("../../../precls"));
|
|
21
25
|
|
|
22
26
|
require("./index.css");
|
|
@@ -31,34 +35,75 @@ function _default(props) {
|
|
|
31
35
|
var setDarkTheme = props.setDarkTheme,
|
|
32
36
|
darkTheme = props.darkTheme,
|
|
33
37
|
showkr = props.showkr,
|
|
38
|
+
showCardKr = props.showCardKr,
|
|
39
|
+
setShowCardKr = props.setShowCardKr,
|
|
34
40
|
setShowKr = props.setShowKr,
|
|
35
41
|
setDirection = props.setDirection,
|
|
36
42
|
onBtnClick = props.onBtnClick,
|
|
37
43
|
direction = props.direction;
|
|
38
44
|
var period = {};
|
|
39
45
|
var iconButtons = [{
|
|
40
|
-
icon:
|
|
41
|
-
overlay: (0, _getLocale.getLocale)(
|
|
46
|
+
icon: 'daochu',
|
|
47
|
+
overlay: (0, _getLocale.getLocale)('Mod_Export'),
|
|
48
|
+
type: 'export'
|
|
42
49
|
}, {
|
|
43
|
-
icon: direction ==
|
|
44
|
-
overlay: direction ==
|
|
50
|
+
icon: direction == 'horizontal' ? 'yangshi-ditu' : 'yangshi-ditu',
|
|
51
|
+
overlay: direction == 'horizontal' ? "".concat((0, _getLocale.getLocale)('OKR_Ali_Butt_Toggleportrait')) : "".concat((0, _getLocale.getLocale)('OKR_Ali_Butt_Togglelandscape')),
|
|
52
|
+
placement: 'topRight',
|
|
53
|
+
rotate: direction == 'horizontal' ? 0 : -90,
|
|
54
|
+
type: direction == 'horizontal' ? 'vertical' : 'horizontal'
|
|
45
55
|
}]; // 获取地图数据
|
|
46
56
|
|
|
47
57
|
(0, _react.useEffect)(function () {// ...
|
|
48
58
|
}, []);
|
|
59
|
+
|
|
60
|
+
var onhandleShowCardKr = function onhandleShowCardKr(checked) {
|
|
61
|
+
if (showkr && checked) {
|
|
62
|
+
setShowKr(false);
|
|
63
|
+
|
|
64
|
+
_toast["default"].Warning('仅允许开启一项');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
setShowCardKr(checked);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var onConfirmHandler = function onConfirmHandler(checked) {
|
|
71
|
+
if (showCardKr && checked) {
|
|
72
|
+
setShowCardKr(false);
|
|
73
|
+
|
|
74
|
+
_toast["default"].Warning('仅允许开启一项');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
setShowKr(checked);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var popup = function popup() {
|
|
81
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
82
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__show-more-popup"))
|
|
83
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__header-action-showkr"))
|
|
85
|
+
}, /*#__PURE__*/_react["default"].createElement(_switch["default"], {
|
|
86
|
+
label: (0, _getLocale.getLocale)('OKR_Db_KRDetails'),
|
|
87
|
+
checked: showCardKr,
|
|
88
|
+
onChange: onhandleShowCardKr
|
|
89
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
90
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__header-action-showkr"))
|
|
91
|
+
}, /*#__PURE__*/_react["default"].createElement(_switch["default"], {
|
|
92
|
+
label: (0, _getLocale.getLocale)('OKR_Ali_Butt_ExhibitionKRs'),
|
|
93
|
+
checked: showkr,
|
|
94
|
+
onChange: onConfirmHandler
|
|
95
|
+
})));
|
|
96
|
+
};
|
|
97
|
+
|
|
49
98
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
50
99
|
className: (0, _classnames["default"])("".concat(_precls["default"], "-share-okr__header"))
|
|
51
100
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
52
101
|
className: (0, _classnames["default"])("".concat(_precls["default"], "-share-okr__header-title"))
|
|
53
|
-
}, (0, _getLocale.getLocale)(
|
|
54
|
-
|
|
55
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
onChange: function onChange(checked) {
|
|
59
|
-
return setShowKr(checked);
|
|
60
|
-
}
|
|
61
|
-
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
102
|
+
}, (0, _getLocale.getLocale)('OKR_Menu_Title_Alignment')), /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
103
|
+
popup: popup
|
|
104
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
105
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "-share-okr__header-showMore"))
|
|
106
|
+
}, (0, _getLocale.getLocale)('OKR_Ali_Butt_Exhibitionmore'))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
62
107
|
className: (0, _classnames["default"])("".concat(_precls["default"], "-share-okr__header-direction"))
|
|
63
108
|
}, /*#__PURE__*/_react["default"].createElement(_iconButtonList["default"], {
|
|
64
109
|
items: iconButtons,
|
|
@@ -55,14 +55,14 @@ function _default() {
|
|
|
55
55
|
var _useState = (0, _react.useState)(function () {
|
|
56
56
|
var hashQuery = {};
|
|
57
57
|
var urlHash = decodeURIComponent(window.location.hash);
|
|
58
|
-
var hashQueryStr = urlHash.split(
|
|
59
|
-
hashQueryStr.split(
|
|
60
|
-
var _it$split = it.split(
|
|
58
|
+
var hashQueryStr = urlHash.split('?')[1];
|
|
59
|
+
hashQueryStr.split('&').forEach(function (it) {
|
|
60
|
+
var _it$split = it.split('='),
|
|
61
61
|
_it$split2 = _slicedToArray(_it$split, 2),
|
|
62
62
|
key = _it$split2[0],
|
|
63
63
|
value = _it$split2[1];
|
|
64
64
|
|
|
65
|
-
if (key ==
|
|
65
|
+
if (key == 'level2Selected' || key == 'period' || key == 'rootNode') hashQuery[key] = JSON.parse(value);else if (key == 'showkr' || key == 'darkTheme') hashQuery[key] = value == 'true';else hashQuery[key] = value;
|
|
66
66
|
});
|
|
67
67
|
return hashQuery;
|
|
68
68
|
}),
|
|
@@ -83,35 +83,40 @@ function _default() {
|
|
|
83
83
|
showkr = _useState8[0],
|
|
84
84
|
setShowKr = _useState8[1];
|
|
85
85
|
|
|
86
|
-
var _useState9 = (0, _react.useState)(hashQuery.
|
|
86
|
+
var _useState9 = (0, _react.useState)(hashQuery.showCardKr),
|
|
87
87
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
showCardKr = _useState10[0],
|
|
89
|
+
setShowCardKr = _useState10[1];
|
|
90
90
|
|
|
91
|
-
var _useState11 = (0, _react.useState)(hashQuery.
|
|
91
|
+
var _useState11 = (0, _react.useState)(hashQuery.darkTheme),
|
|
92
92
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
darkTheme = _useState12[0],
|
|
94
|
+
setDarkTheme = _useState12[1];
|
|
95
95
|
|
|
96
|
-
var _useState13 = (0, _react.useState)(hashQuery.
|
|
96
|
+
var _useState13 = (0, _react.useState)(hashQuery.direction),
|
|
97
97
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
direction = _useState14[0],
|
|
99
|
+
setDirection = _useState14[1];
|
|
100
100
|
|
|
101
|
-
var _useState15 = (0, _react.useState)(
|
|
101
|
+
var _useState15 = (0, _react.useState)(hashQuery.rootNode),
|
|
102
102
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
rootNode = _useState16[0],
|
|
104
|
+
setRootNode = _useState16[1];
|
|
105
|
+
|
|
106
|
+
var _useState17 = (0, _react.useState)(false),
|
|
107
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
108
|
+
forceRender = _useState18[0],
|
|
109
|
+
setForceRender = _useState18[1];
|
|
105
110
|
|
|
106
111
|
var okrMapRef = (0, _react.useRef)();
|
|
107
112
|
|
|
108
113
|
var onMapActionsHandler = function onMapActionsHandler(iconType) {
|
|
109
114
|
switch (iconType) {
|
|
110
|
-
case
|
|
115
|
+
case 'export':
|
|
111
116
|
exportCurrentFlow();
|
|
112
117
|
break;
|
|
113
118
|
|
|
114
|
-
case
|
|
119
|
+
case 'horizontal':
|
|
115
120
|
setDirection(iconType);
|
|
116
121
|
setForceRender(true);
|
|
117
122
|
setTimeout(function () {
|
|
@@ -119,7 +124,7 @@ function _default() {
|
|
|
119
124
|
}, 100);
|
|
120
125
|
break;
|
|
121
126
|
|
|
122
|
-
case
|
|
127
|
+
case 'vertical':
|
|
123
128
|
setDirection(iconType);
|
|
124
129
|
setForceRender(true);
|
|
125
130
|
setTimeout(function () {
|
|
@@ -144,9 +149,11 @@ function _default() {
|
|
|
144
149
|
className: (0, _classnames["default"])(_precls["default"], "".concat(_precls["default"], "-share"))
|
|
145
150
|
}, /*#__PURE__*/_react["default"].createElement(_header["default"], {
|
|
146
151
|
showkr: showkr,
|
|
152
|
+
showCardKr: showCardKr,
|
|
147
153
|
darkTheme: darkTheme,
|
|
148
154
|
direction: direction,
|
|
149
155
|
setShowKr: setShowKr,
|
|
156
|
+
setShowCardKr: setShowCardKr,
|
|
150
157
|
setDirection: setDirection,
|
|
151
158
|
onBtnClick: onMapActionsHandler,
|
|
152
159
|
setDarkTheme: setDarkTheme
|
|
@@ -158,10 +165,11 @@ function _default() {
|
|
|
158
165
|
ref: okrMapRef,
|
|
159
166
|
searchType: searchType,
|
|
160
167
|
showkr: showkr,
|
|
168
|
+
showCardKr: showCardKr,
|
|
161
169
|
direction: direction,
|
|
162
170
|
darkTheme: darkTheme
|
|
163
171
|
}, period, rootNode, {
|
|
164
|
-
okrType: _utils.OkrTypeSetting ? _utils.okrTypeMap[searchType] :
|
|
172
|
+
okrType: _utils.OkrTypeSetting ? _utils.okrTypeMap[searchType] : ''
|
|
165
173
|
}));
|
|
166
174
|
}())));
|
|
167
175
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
.titaui-number-select {
|
|
2
2
|
font-size: 14px;
|
|
3
3
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
4
|
-
color: #
|
|
5
|
-
width: 136px;
|
|
4
|
+
color: #3f4755;
|
|
6
5
|
position: relative;
|
|
7
6
|
}
|
|
8
7
|
|
|
@@ -23,12 +22,12 @@
|
|
|
23
22
|
|
|
24
23
|
.titaui-number-select--action-icon {
|
|
25
24
|
display: inline-block;
|
|
26
|
-
width:
|
|
27
|
-
height:
|
|
28
|
-
background: #
|
|
25
|
+
width: 16px;
|
|
26
|
+
height: 16px;
|
|
27
|
+
background: #bfc7d5;
|
|
29
28
|
border-radius: 10px;
|
|
30
29
|
text-align: center;
|
|
31
|
-
line-height:
|
|
30
|
+
line-height: 14px;
|
|
32
31
|
color: #fff;
|
|
33
32
|
cursor: pointer;
|
|
34
33
|
vertical-align: middle;
|
|
@@ -39,8 +38,12 @@
|
|
|
39
38
|
user-select: none;
|
|
40
39
|
}
|
|
41
40
|
|
|
41
|
+
.titaui-number-select--action-icon-right {
|
|
42
|
+
line-height: 16px;
|
|
43
|
+
}
|
|
44
|
+
|
|
42
45
|
.titaui-number-select--action-icon:hover {
|
|
43
|
-
background: #
|
|
46
|
+
background: #2879ff;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
.titaui-number-select--action-icon__disable {
|
|
@@ -48,13 +51,13 @@
|
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
.titaui-number-select--action-icon__disable:hover {
|
|
51
|
-
background: #
|
|
54
|
+
background: #bfc7d5;
|
|
52
55
|
opacity: 0.4;
|
|
53
56
|
cursor: not-allowed;
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
.titaui-number-select--value {
|
|
57
|
-
margin: 0
|
|
60
|
+
margin: 0 4px;
|
|
58
61
|
vertical-align: middle;
|
|
59
62
|
-webkit-touch-callout: none;
|
|
60
63
|
-webkit-user-select: none;
|
|
@@ -29,7 +29,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
29
29
|
|
|
30
30
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
31
|
|
|
32
|
-
var preCls =
|
|
32
|
+
var preCls = 'titaui-number-select';
|
|
33
33
|
|
|
34
34
|
function NumberSelect(props) {
|
|
35
35
|
var _props$max = props.max,
|
|
@@ -41,7 +41,7 @@ function NumberSelect(props) {
|
|
|
41
41
|
_props$defaultValue = props.defaultValue,
|
|
42
42
|
defaultValue = _props$defaultValue === void 0 ? 2 : _props$defaultValue,
|
|
43
43
|
_props$label = props.label,
|
|
44
|
-
label = _props$label === void 0 ? (0, _getLocale.getLocale)(
|
|
44
|
+
label = _props$label === void 0 ? (0, _getLocale.getLocale)('Mod_Editor') : _props$label;
|
|
45
45
|
|
|
46
46
|
var _useState = (0, _react.useState)(defaultValue),
|
|
47
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -72,7 +72,7 @@ function NumberSelect(props) {
|
|
|
72
72
|
}, "-"), /*#__PURE__*/React.createElement("span", {
|
|
73
73
|
className: (0, _classnames["default"])("".concat(preCls, "--value"))
|
|
74
74
|
}, num), /*#__PURE__*/React.createElement("span", {
|
|
75
|
-
className: (0, _classnames["default"])("".concat(preCls, "--action-icon"), _defineProperty({}, "".concat(preCls, "--action-icon__disable"), num == max)),
|
|
75
|
+
className: (0, _classnames["default"])("".concat(preCls, "--action-icon"), "".concat(preCls, "--action-icon-right"), _defineProperty({}, "".concat(preCls, "--action-icon__disable"), num == max)),
|
|
76
76
|
onClick: addHandler
|
|
77
77
|
}, "+")));
|
|
78
78
|
}
|