@titaui/pc 1.11.27-beta.8 → 1.11.29
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/name-avatar/index.css +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/avatar/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/icon-btn/index.js +17 -8
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +13 -19
- package/lib/components/change-okr-modal/Item.js +14 -14
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/create-okr-modal/index.js +1 -3
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -42
- package/lib/components/drawer/index.css +0 -33
- package/lib/components/drawer/index.js +3 -26
- package/lib/components/drop-selector/index.js +25 -10
- package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
- package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/index.css +21 -0
- package/lib/components/dynamic/advertise/index.js +126 -0
- package/lib/components/dynamic/advertise/interface.js +5 -0
- package/lib/components/dynamic/advertise/util.js +28 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
- package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
- package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
- package/lib/components/dynamic/constant.js +33 -32
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- 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 +5 -5
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/index.js +50 -32
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
- package/lib/components/dynamic/dynamic-liking/index.css +81 -0
- package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
- package/lib/components/dynamic/dynamic-liking/item.js +75 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.js +7 -15
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +141 -0
- package/lib/components/dynamic/dynamic-topping/index.js +82 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +153 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +173 -0
- package/lib/components/dynamic/dynamic.js +428 -0
- package/lib/components/dynamic/export-module/index.js +37 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +12 -9
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +184 -0
- package/lib/components/dynamic/my-team/index.js +263 -0
- package/lib/components/dynamic/my-team/request-api.js +52 -0
- package/lib/components/dynamic/my-team/util.js +20 -0
- package/lib/components/dynamic/new-ui.css +192 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
- package/lib/components/dynamic/online-broadcast/data.js +77 -0
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +46 -0
- package/lib/components/dynamic/online-broadcast/index.js +61 -0
- package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +51 -0
- package/lib/components/dynamic/quick-operation/index.js +120 -0
- package/lib/components/dynamic/request-api.js +68 -7
- package/lib/components/e-priority/index.js +8 -8
- package/lib/components/eReport/eReportShare/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/grid-layout/sub-employee-okr/person-okr.js +5 -5
- package/lib/components/icon-button-list/index.js +3 -3
- package/lib/components/img-viewer/index.css +3 -3
- package/lib/components/img-viewer/index.js +11 -11
- 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 +30 -0
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
- package/lib/components/menus/index.js +11 -5
- 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/index.js +4 -8
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -10
- package/lib/components/okr-detail/components/header/o-name.js +3 -10
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +10 -14
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/actions.js +23 -23
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
- package/lib/components/okr-detail/detail-header/index.css +0 -11
- package/lib/components/okr-detail/detail-header/index.js +234 -228
- package/lib/components/okr-detail/index.js +21 -40
- package/lib/components/okr-detail/okr-list/index.js +8 -11
- package/lib/components/okr-detail/request-apis.js +4 -10
- package/lib/components/okr-flow/child-node/index.css +6 -6
- package/lib/components/okr-flow/child-node/work-node.js +21 -21
- package/lib/components/okr-flow/export-modal/index.js +33 -19
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
- package/lib/components/okr-flow/okr-map/index.js +5 -5
- package/lib/components/okr-flow/request-apis.js +4 -4
- package/lib/components/okr-flow/root-node/index.js +25 -24
- package/lib/components/okr-flow/utils/index.js +5 -5
- package/lib/components/okr-flow/utils/tree-handler.js +17 -17
- package/lib/components/okr-period-selector/index.js +5 -9
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +3 -3
- package/lib/components/period-selector/index.js +11 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
- package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
- package/lib/components/picker/components/panels/date-panel/index.css +14 -0
- package/lib/components/picker/components/panels/date-panel/index.js +49 -0
- package/lib/components/picker/components/panels/month-panel/index.css +27 -0
- package/lib/components/picker/components/panels/month-panel/index.js +63 -0
- package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
- package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
- package/lib/components/picker/components/panels/panel-body/index.js +53 -0
- package/lib/components/picker/components/panels/panel-head/index.js +48 -0
- package/lib/components/picker/components/panels/year-panel/index.css +23 -0
- package/lib/components/picker/components/panels/year-panel/index.js +65 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
- package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
- package/lib/components/picker/components/picker-trigger/index.css +57 -0
- package/lib/components/picker/components/picker-trigger/index.js +94 -0
- package/lib/components/picker/context.js +15 -0
- package/lib/components/picker/index.css +121 -0
- package/lib/components/picker/index.js +13 -0
- package/lib/components/picker/picker-panels.js +182 -0
- package/lib/components/picker/picker.js +132 -0
- package/lib/components/picker/type.js +5 -0
- package/lib/components/picker/utils.js +28 -0
- package/lib/components/popup/index.js +4 -4
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -5
- package/lib/components/survey-model/index.css +18 -18
- package/lib/components/survey-model/instance.js +1 -1
- package/lib/components/task-relation-modal/request-api.js +1 -2
- 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 +123 -0
- package/lib/components/time-picker/index.js +13 -0
- package/lib/components/time-picker/time-picker-selector.js +138 -0
- package/lib/components/time-picker/time-picker.js +336 -0
- package/lib/components/time-picker/timer-picker-input.js +96 -0
- package/lib/components/time-picker/utils.js +52 -0
- package/lib/components/toast/index.js +3 -5
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/index.js +0 -40
- package/lib/pages/aha2021/index.js +5 -1
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
- package/lib/pages/okr-map/number-select/index.js +2 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
- package/lib/utils/auth.js +6 -6
- package/lib/utils/bs-global.js +12 -12
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/hooks.js +72 -0
- package/lib/utils/open-data.js +27 -31
- package/package.json +6 -3
- 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/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
- package/lib/components/okr-detail/helper.js +0 -108
- package/lib/components/textarea/index.css +0 -142
- package/lib/components/textarea/index.js +0 -259
- package/lib/pages/new-okr-list/header/common.js +0 -52
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _toast = _interopRequireDefault(require("../../toast"));
|
|
15
|
+
|
|
16
|
+
var _avatar = _interopRequireDefault(require("../../avatar"));
|
|
17
|
+
|
|
18
|
+
var _progress = _interopRequireDefault(require("../../progress"));
|
|
19
|
+
|
|
20
|
+
var _tooltip = _interopRequireDefault(require("../../tooltip"));
|
|
21
|
+
|
|
22
|
+
var _statusTime = _interopRequireDefault(require("../../status-time"));
|
|
23
|
+
|
|
24
|
+
var _drawerManager = _interopRequireDefault(require("../../drawer-manager"));
|
|
25
|
+
|
|
26
|
+
var _ePriority = _interopRequireDefault(require("../../e-priority"));
|
|
27
|
+
|
|
28
|
+
var _dialogConfirm = _interopRequireWildcard(require("../../dialog-confirm"));
|
|
29
|
+
|
|
30
|
+
var _eStatusDropdown = _interopRequireDefault(require("./e-status-dropdown"));
|
|
31
|
+
|
|
32
|
+
var _requestApis = require("../request-apis");
|
|
33
|
+
|
|
34
|
+
var _constant = require("./constant");
|
|
35
|
+
|
|
36
|
+
var _getProcessColor = _interopRequireDefault(require("./get-process-color"));
|
|
37
|
+
|
|
38
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
39
|
+
|
|
40
|
+
var _platform = require("../../../utils/platform");
|
|
41
|
+
|
|
42
|
+
var _bsGlobal = require("../../../utils/bs-global");
|
|
43
|
+
|
|
44
|
+
var _helpers = require("../../../utils/helpers");
|
|
45
|
+
|
|
46
|
+
var _auth = require("../../../utils/auth");
|
|
47
|
+
|
|
48
|
+
var _precls = _interopRequireDefault(require("../precls"));
|
|
49
|
+
|
|
50
|
+
require("./index.css");
|
|
51
|
+
|
|
52
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
53
|
+
|
|
54
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
55
|
+
|
|
56
|
+
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; }
|
|
57
|
+
|
|
58
|
+
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); } }
|
|
59
|
+
|
|
60
|
+
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); }); }; }
|
|
61
|
+
|
|
62
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
63
|
+
|
|
64
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
65
|
+
|
|
66
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
67
|
+
|
|
68
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
69
|
+
|
|
70
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
71
|
+
|
|
72
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
73
|
+
|
|
74
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
75
|
+
|
|
76
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
77
|
+
|
|
78
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
79
|
+
|
|
80
|
+
var TooltipText = _tooltip["default"].Text; // status=3 已过期 status=2 已完成
|
|
81
|
+
|
|
82
|
+
function ETaskNode(props) {
|
|
83
|
+
var _okrInfo$authority;
|
|
84
|
+
|
|
85
|
+
var index = props.index,
|
|
86
|
+
title = props.title,
|
|
87
|
+
data = props.data,
|
|
88
|
+
_props$createUserId = props.createUserId,
|
|
89
|
+
createUserId = _props$createUserId === void 0 ? {} : _props$createUserId,
|
|
90
|
+
_props$krUser = props.krUser,
|
|
91
|
+
krUser = _props$krUser === void 0 ? {} : _props$krUser,
|
|
92
|
+
_props$hasProgress = props.hasProgress,
|
|
93
|
+
hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
|
|
94
|
+
_props$hasRelation = props.hasRelation,
|
|
95
|
+
hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation,
|
|
96
|
+
_props$isPushScreen = props.isPushScreen,
|
|
97
|
+
isPushScreen = _props$isPushScreen === void 0 ? true : _props$isPushScreen,
|
|
98
|
+
_props$hasPrinciple = props.hasPrinciple,
|
|
99
|
+
hasPrinciple = _props$hasPrinciple === void 0 ? true : _props$hasPrinciple;
|
|
100
|
+
|
|
101
|
+
var _useState = (0, _react.useState)(false),
|
|
102
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
103
|
+
unConnectVisible = _useState2[0],
|
|
104
|
+
setUnConnectVisible = _useState2[1];
|
|
105
|
+
|
|
106
|
+
var _useState3 = (0, _react.useState)(data.progress),
|
|
107
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
108
|
+
progress = _useState4[0];
|
|
109
|
+
|
|
110
|
+
var _useState5 = (0, _react.useState)(data.principalUser || {}),
|
|
111
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
112
|
+
user = _useState6[0],
|
|
113
|
+
setUser = _useState6[1];
|
|
114
|
+
|
|
115
|
+
var _useState7 = (0, _react.useState)(data.status === 2),
|
|
116
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
117
|
+
isGray = _useState8[0],
|
|
118
|
+
setIsGray = _useState8[1];
|
|
119
|
+
|
|
120
|
+
var _useState9 = (0, _react.useState)(data.status === 4),
|
|
121
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
122
|
+
isCancel = _useState10[0],
|
|
123
|
+
setIsCancel = _useState10[1];
|
|
124
|
+
|
|
125
|
+
var _useState11 = (0, _react.useState)("".concat(data.priority)),
|
|
126
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
127
|
+
priority = _useState12[0],
|
|
128
|
+
setPriority = _useState12[1];
|
|
129
|
+
|
|
130
|
+
var _useState13 = (0, _react.useState)({
|
|
131
|
+
deadLine: data.deadLine,
|
|
132
|
+
isLongTerm: data.isLongTerm,
|
|
133
|
+
status: data.status,
|
|
134
|
+
riskLevel: data.riskLevel
|
|
135
|
+
}),
|
|
136
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
137
|
+
dataInfo = _useState14[0],
|
|
138
|
+
setDataInfo = _useState14[1];
|
|
139
|
+
|
|
140
|
+
var _useState15 = (0, _react.useState)(function () {
|
|
141
|
+
return (0, _bsGlobal.getBSGlobal)("TaskAdvancedSetting").TaskFunctionSetting.TaskPriority;
|
|
142
|
+
}),
|
|
143
|
+
_useState16 = _slicedToArray(_useState15, 1),
|
|
144
|
+
isShowPriority = _useState16[0];
|
|
145
|
+
|
|
146
|
+
var okrInfo = {}; // extraEditAuth = new KRAuth({ user: krUser, createUserId }).hasAuth()
|
|
147
|
+
// || new OAuth({
|
|
148
|
+
// principalUser: okrInfo.principalUser,
|
|
149
|
+
// createUserId: okrInfo.createUserId,
|
|
150
|
+
// }).hasAuth()
|
|
151
|
+
|
|
152
|
+
var hasEditAuth = new _auth.EAuth({
|
|
153
|
+
principalUser: data.principalUser,
|
|
154
|
+
user: data.user
|
|
155
|
+
}).hasAuth() // || extraEditAuth
|
|
156
|
+
&& data.status !== 5;
|
|
157
|
+
var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
|
|
158
|
+
var hasRelativeAuth = new _auth.KRAuth({
|
|
159
|
+
user: krUser,
|
|
160
|
+
createUserId: createUserId
|
|
161
|
+
}).hasAuth() || new _auth.OAuth({
|
|
162
|
+
principalUser: okrInfo.principalUser,
|
|
163
|
+
createUserId: okrInfo.createUserId
|
|
164
|
+
}).hasAuth();
|
|
165
|
+
|
|
166
|
+
var onEditUserHandler = function onEditUserHandler(_ref) {
|
|
167
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
168
|
+
user = _ref2[0];
|
|
169
|
+
|
|
170
|
+
(0, _requestApis.updateTaskPrincipal)({
|
|
171
|
+
taskId: data.taskId,
|
|
172
|
+
toUserId: Number(user.id)
|
|
173
|
+
}).then(function (data) {
|
|
174
|
+
if (data.Code === 1) {
|
|
175
|
+
setUser(user.data);
|
|
176
|
+
|
|
177
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
|
|
178
|
+
canClose: false
|
|
179
|
+
});
|
|
180
|
+
} else {
|
|
181
|
+
_toast["default"].Error(data.Message, {
|
|
182
|
+
canClose: false
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
})["catch"](function () {
|
|
186
|
+
_toast["default"].Error("网络异常", {
|
|
187
|
+
canClose: false
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
var onEStatusChangeHandler = function onEStatusChangeHandler(statusType) {
|
|
193
|
+
(0, _requestApis.updateTaskStatus)({
|
|
194
|
+
taskId: data.taskId,
|
|
195
|
+
status: _constant.EStatusClass2StatusType[statusType]
|
|
196
|
+
}).then(function (resp) {
|
|
197
|
+
if (resp.Code === 1) {
|
|
198
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
|
|
199
|
+
canClose: false
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
setDataInfo(_objectSpread(_objectSpread({}, dataInfo), {}, {
|
|
203
|
+
status: _constant.EStatusClass2StatusType[statusType]
|
|
204
|
+
}));
|
|
205
|
+
setIsGray(_constant.EStatusClass2StatusType[statusType] === 2);
|
|
206
|
+
setIsCancel(_constant.EStatusClass2StatusType[statusType] === 4);
|
|
207
|
+
} else {
|
|
208
|
+
_toast["default"].Error(resp.Message, {
|
|
209
|
+
canClose: false
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
})["catch"](function () {
|
|
213
|
+
_toast["default"].Error("网络异常", {
|
|
214
|
+
canClose: false
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
var onSureUnConnectHandler = function onSureUnConnectHandler() {
|
|
220
|
+
(0, _requestApis.cancelRel)({
|
|
221
|
+
krId: data.mileStoneId,
|
|
222
|
+
objType: data.objType,
|
|
223
|
+
okrId: okrInfo.workId,
|
|
224
|
+
taskId: data.taskId
|
|
225
|
+
}).then(function (resp) {
|
|
226
|
+
if (resp.Code === 1) {
|
|
227
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
|
|
228
|
+
canClose: false
|
|
229
|
+
});
|
|
230
|
+
} else {
|
|
231
|
+
_toast["default"].Error(resp.Message, {
|
|
232
|
+
canClose: false
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
})["catch"](function () {
|
|
236
|
+
_toast["default"].Error("网络异常", {
|
|
237
|
+
canClose: false
|
|
238
|
+
});
|
|
239
|
+
})["finally"](setUnConnectVisible(false));
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
var updateDateHandler = /*#__PURE__*/function () {
|
|
243
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(e) {
|
|
244
|
+
var res;
|
|
245
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
246
|
+
while (1) {
|
|
247
|
+
switch (_context.prev = _context.next) {
|
|
248
|
+
case 0:
|
|
249
|
+
if (!(!hasEditAuth || dataInfo.status === 2)) {
|
|
250
|
+
_context.next = 2;
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return _context.abrupt("return");
|
|
255
|
+
|
|
256
|
+
case 2:
|
|
257
|
+
_context.next = 4;
|
|
258
|
+
return window.openDatePicker(e.target, {
|
|
259
|
+
isShowCycleView: false,
|
|
260
|
+
rangepickerOptions: {
|
|
261
|
+
startDate: dataInfo.startDate,
|
|
262
|
+
endDate: dataInfo.deadLine
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
case 4:
|
|
267
|
+
res = _context.sent;
|
|
268
|
+
_context.next = 7;
|
|
269
|
+
return (0, _requestApis.updateTaskDate)({
|
|
270
|
+
taskId: data.taskId,
|
|
271
|
+
startDate: res.startDate,
|
|
272
|
+
endDate: res.endDate,
|
|
273
|
+
isLongTerm: res.isLongTerm
|
|
274
|
+
}).then(function (resp) {
|
|
275
|
+
if (resp.Code === 1) {
|
|
276
|
+
setDataInfo(_objectSpread(_objectSpread({}, dataInfo), {}, {
|
|
277
|
+
deadLine: resp.Data.deadLine,
|
|
278
|
+
isLongTerm: resp.Data.isLongTerm,
|
|
279
|
+
status: resp.Data.status
|
|
280
|
+
}));
|
|
281
|
+
|
|
282
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
|
|
283
|
+
canClose: false
|
|
284
|
+
});
|
|
285
|
+
} else {
|
|
286
|
+
_toast["default"].Error(resp.Message, {
|
|
287
|
+
canClose: false
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
})["catch"](function () {
|
|
291
|
+
_toast["default"].Error("网络异常", {
|
|
292
|
+
canClose: false
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
case 7:
|
|
297
|
+
case "end":
|
|
298
|
+
return _context.stop();
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}, _callee);
|
|
302
|
+
}));
|
|
303
|
+
|
|
304
|
+
return function updateDateHandler(_x) {
|
|
305
|
+
return _ref3.apply(this, arguments);
|
|
306
|
+
};
|
|
307
|
+
}();
|
|
308
|
+
|
|
309
|
+
var onEPriorityChangeHandler = function onEPriorityChangeHandler(selectPriority) {
|
|
310
|
+
(0, _requestApis.setTaskPriority)({
|
|
311
|
+
taskId: data.taskId,
|
|
312
|
+
priority: selectPriority
|
|
313
|
+
}).then(function (resp) {
|
|
314
|
+
if (resp.Code === 1) {
|
|
315
|
+
_toast["default"].Success(resp.Message);
|
|
316
|
+
|
|
317
|
+
setPriority(selectPriority);
|
|
318
|
+
} else {
|
|
319
|
+
_toast["default"].Error(resp.Message);
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
var handleShowTaskDetail = function handleShowTaskDetail() {
|
|
325
|
+
if ((0, _platform.isPlatform)("dd")) {
|
|
326
|
+
_drawerManager["default"].close();
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (isPushScreen) {
|
|
330
|
+
var _window$Talent, _window$Talent2;
|
|
331
|
+
|
|
332
|
+
(_window$Talent = window.Talent) === null || _window$Talent === void 0 ? void 0 : _window$Talent.app.vent.off("global-pull-screen:closed:".concat(data.taskId));
|
|
333
|
+
(_window$Talent2 = window.Talent) === null || _window$Talent2 === void 0 ? void 0 : _window$Talent2.app.vent.on("global-pull-screen:closed:".concat(data.taskId), function () {// refreshEList && refreshEList();
|
|
334
|
+
}); // 任务:打开推屏
|
|
335
|
+
|
|
336
|
+
window.Talent.app.vent.trigger("global-pull-screen", data.taskId, "task");
|
|
337
|
+
} else {
|
|
338
|
+
window.open("//".concat(window.location.host).concat(window.location.pathname, "#more/taskinfo?id=").concat(data.taskId));
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
343
|
+
key: index,
|
|
344
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node"))
|
|
345
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
346
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-prefix"))
|
|
347
|
+
}, /*#__PURE__*/_react["default"].createElement(_eStatusDropdown["default"], {
|
|
348
|
+
onChange: onEStatusChangeHandler,
|
|
349
|
+
checked: _constant.EStatusStatus2ClassType[dataInfo.status],
|
|
350
|
+
hasAuth: hasEditAuth
|
|
351
|
+
})), isShowPriority && /*#__PURE__*/_react["default"].createElement("span", {
|
|
352
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority"))
|
|
353
|
+
}, /*#__PURE__*/_react["default"].createElement(_ePriority["default"], {
|
|
354
|
+
onChange: onEPriorityChangeHandler,
|
|
355
|
+
checked: priority,
|
|
356
|
+
hasAuth: hasEditAuth,
|
|
357
|
+
status: data.status
|
|
358
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
359
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-title ").concat(isCancel ? "".concat(_precls["default"], "__e-project-node-gray") : "")),
|
|
360
|
+
onClick: handleShowTaskDetail
|
|
361
|
+
}, /*#__PURE__*/_react["default"].createElement(TooltipText, {
|
|
362
|
+
text: (0, _helpers.escapeHtml)(title),
|
|
363
|
+
isPercent: true
|
|
364
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
365
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions"))
|
|
366
|
+
}, hasPrinciple && /*#__PURE__*/_react["default"].createElement("span", {
|
|
367
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-user"))
|
|
368
|
+
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Text, {
|
|
369
|
+
name: user === null || user === void 0 ? void 0 : user.name,
|
|
370
|
+
id: user === null || user === void 0 ? void 0 : user.userId,
|
|
371
|
+
width: 92,
|
|
372
|
+
editable: dataInfo.status !== 2 && hasEditAuth,
|
|
373
|
+
onEditUser: onEditUserHandler,
|
|
374
|
+
isGetRoot: true,
|
|
375
|
+
showAvatar: true,
|
|
376
|
+
avatar: user === null || user === void 0 ? void 0 : user.avatar,
|
|
377
|
+
extraCls: (isCancel || isGray) && "".concat(_precls["default"], "__e-project-node-gray")
|
|
378
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
379
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-date")),
|
|
380
|
+
onClick: updateDateHandler
|
|
381
|
+
}, /*#__PURE__*/_react["default"].createElement(_statusTime["default"], {
|
|
382
|
+
deadLine: dataInfo.deadLine,
|
|
383
|
+
isLongTerm: dataInfo.isLongTerm,
|
|
384
|
+
isCancel: dataInfo.status === 4,
|
|
385
|
+
isComplete: dataInfo.status === 2
|
|
386
|
+
})), hasProgress && /*#__PURE__*/_react["default"].createElement("span", {
|
|
387
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-progress ").concat((isGray || isCancel) && "".concat(_precls["default"], "__e-project-node-gray")))
|
|
388
|
+
}, /*#__PURE__*/_react["default"].createElement(_progress["default"].Circle, {
|
|
389
|
+
size: 22,
|
|
390
|
+
width: 3,
|
|
391
|
+
percent: progress,
|
|
392
|
+
linear: true,
|
|
393
|
+
linearId: data.taskId,
|
|
394
|
+
linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearStartColor", dataInfo.status),
|
|
395
|
+
linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearEndColor", dataInfo.status),
|
|
396
|
+
backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "backgroundColor", dataInfo.status)
|
|
397
|
+
})), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
398
|
+
overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel"),
|
|
399
|
+
placement: "top"
|
|
400
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
401
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-connect")),
|
|
402
|
+
onClick: function onClick() {
|
|
403
|
+
return setUnConnectVisible(true);
|
|
404
|
+
}
|
|
405
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
406
|
+
className: "tu-icon-quxiaoguanlian e-node-status-icon"
|
|
407
|
+
}))) : null), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
408
|
+
visible: unConnectVisible,
|
|
409
|
+
type: "warning"
|
|
410
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
411
|
+
type: "title"
|
|
412
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Text_Cancelass")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
413
|
+
type: "content"
|
|
414
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Text_TtasknotO")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
|
|
415
|
+
type: "button",
|
|
416
|
+
onClick: function onClick() {
|
|
417
|
+
return setUnConnectVisible(false);
|
|
418
|
+
}
|
|
419
|
+
}, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
|
|
420
|
+
type: "button",
|
|
421
|
+
onClick: onSureUnConnectHandler
|
|
422
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine"))));
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
var _default = ETaskNode;
|
|
426
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var getProcessColor = function getProcessColor(level, type, status) {
|
|
9
|
+
var cancelColor = {
|
|
10
|
+
linearStartColor: "#e1e5ec",
|
|
11
|
+
linearEndColor: "#bfc7d5",
|
|
12
|
+
backgroundColor: "rgba(40, 121, 255, 0.11)"
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
if (status === 2) {
|
|
16
|
+
return cancelColor[type];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (status === 4) {
|
|
20
|
+
return cancelColor[type];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var processColor = {
|
|
24
|
+
1: {
|
|
25
|
+
riskLevel: 1,
|
|
26
|
+
linearStartColor: "#9fbfff",
|
|
27
|
+
linearEndColor: "#2879ff",
|
|
28
|
+
backgroundColor: "rgba(40, 121, 255, 0.11)"
|
|
29
|
+
},
|
|
30
|
+
2: {
|
|
31
|
+
riskLevel: 2,
|
|
32
|
+
linearStartColor: "#9fbfff",
|
|
33
|
+
linearEndColor: "#2879ff",
|
|
34
|
+
backgroundColor: "rgba(40, 121, 255, 0.11)"
|
|
35
|
+
},
|
|
36
|
+
3: {
|
|
37
|
+
riskLevel: 3,
|
|
38
|
+
linearStartColor: "#FFA5A5",
|
|
39
|
+
linearEndColor: "#F05E5E",
|
|
40
|
+
backgroundColor: "rgba(222, 89, 89, 0.1)"
|
|
41
|
+
},
|
|
42
|
+
4: {
|
|
43
|
+
riskLevel: 4,
|
|
44
|
+
linearStartColor: "#93eed2",
|
|
45
|
+
linearEndColor: "#5ad8a6",
|
|
46
|
+
backgroundColor: "rgba(40, 121, 255, 0.11)"
|
|
47
|
+
},
|
|
48
|
+
5: {
|
|
49
|
+
riskLevel: 5,
|
|
50
|
+
linearStartColor: "#93eed2",
|
|
51
|
+
linearEndColor: "#5ad8a6",
|
|
52
|
+
backgroundColor: "rgba(40, 121, 255, 0.11)"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
var color = processColor["".concat(level)];
|
|
56
|
+
if (level === 0) color = processColor["1"];
|
|
57
|
+
if (!color) return {};
|
|
58
|
+
return color[type];
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var _default = getProcessColor;
|
|
62
|
+
exports["default"] = _default;
|