@titaui/pc 1.11.4-0 → 1.11.4-0.beta-2
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 +9 -2
- package/lib/components/avatar/text-avatar/index.js +34 -9
- 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 +12 -12
- 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/grid-layout/sub-employee-okr/person-okr.js +11 -5
- 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/components/MblogContent.js +5 -2
- 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/img/new.svg +30 -0
- package/lib/components/nav-top/components/menu/img/wecome-temp.png +0 -0
- package/lib/components/nav-top/components/menu/index.css +91 -0
- package/lib/components/nav-top/components/menu/index.js +80 -32
- 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/components/okr-tree/tree-node/kr-node/index.js +3 -2
- 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 +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-detail/okr-list/index.js +5 -3
- package/lib/components/okr-flow/child-node/index.css +68 -22
- 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 +108 -21
- 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 +268 -0
- package/lib/components/survey-model/instance.js +86 -0
- package/lib/components/survey-model/request-api.js +80 -0
- package/lib/components/task-relation-modal/index.js +0 -1
- 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 +16 -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 +114 -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 +299 -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 +94 -133
- package/lib/components/time-picker/timer-picker-input.js +3 -7
- 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
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
.tita-survey-model {
|
|
2
|
+
width: 436px;
|
|
3
|
+
background: #ffffff;
|
|
4
|
+
box-shadow: 0px 8px 24px 0px rgba(127, 145, 180, 0.2);
|
|
5
|
+
border-radius: 24px;
|
|
6
|
+
border: 1px solid #f0f2f5;
|
|
7
|
+
padding: 24px;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
position: fixed;
|
|
10
|
+
right: 20px;
|
|
11
|
+
bottom: 20px;
|
|
12
|
+
z-index: 4000;
|
|
13
|
+
animation: showModel 0.5s;
|
|
14
|
+
transition: height linear 0.5s;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tita-survey-model__head {
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
align-items: center;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tita-survey-model__head-title {
|
|
25
|
+
font-size: 18px;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
color: #141c28;
|
|
28
|
+
line-height: 22px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.tita-survey-model__head-close {
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
color: #141c28;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
font-size: 20px;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
width: 24px;
|
|
39
|
+
height: 24px;
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.tita-survey-model__head-close:hover {
|
|
44
|
+
background: #f0f4fa;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.tita-survey-model__text {
|
|
48
|
+
border-radius: 8px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tita-survey-model__score {
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
align-items: center;
|
|
55
|
+
margin-top: 20px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.tita-survey-model__score-item {
|
|
59
|
+
width: 28px;
|
|
60
|
+
height: 28px;
|
|
61
|
+
background: #ffffff;
|
|
62
|
+
border-radius: 8px;
|
|
63
|
+
border: 1px solid #dfe3ea;
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.tita-survey-model__score-item:hover {
|
|
71
|
+
border: 1px solid #2879ff;
|
|
72
|
+
color: #2879ff;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.tita-survey-model__score-item--active {
|
|
76
|
+
border: 1px solid #2879ff;
|
|
77
|
+
background: rgba(40, 121, 255, 0.1);
|
|
78
|
+
color: #2879ff;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.tita-survey-model__keywords {
|
|
82
|
+
display: flex;
|
|
83
|
+
justify-content: space-between;
|
|
84
|
+
align-items: center;
|
|
85
|
+
margin-top: 12px;
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
font-weight: normal;
|
|
88
|
+
color: #6f7886;
|
|
89
|
+
line-height: 18px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tita-survey-model__tags {
|
|
93
|
+
margin: 14px -10px 8px 0;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
flex-wrap: wrap;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.tita-survey-model__tags-item {
|
|
100
|
+
height: 26px;
|
|
101
|
+
font-size: 12px;
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
background: #ffffff;
|
|
106
|
+
margin: 0 8px 8px 0;
|
|
107
|
+
padding: 0 12px;
|
|
108
|
+
border-radius: 8px;
|
|
109
|
+
border: 1px solid #dfe3ea;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.tita-survey-model__tags-item:hover {
|
|
114
|
+
color: #2879ff;
|
|
115
|
+
border: 1px solid #2879ff;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.tita-survey-model__tags-item--active {
|
|
119
|
+
background: rgba(40, 121, 255, 0.1);
|
|
120
|
+
color: #2879ff;
|
|
121
|
+
border: 1px solid #2879ff;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.tita-survey-model__btn {
|
|
125
|
+
width: 36px;
|
|
126
|
+
margin: 16px auto 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.tita-survey-model__input {
|
|
130
|
+
margin-top: 20px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@keyframes showModel {
|
|
134
|
+
0% {
|
|
135
|
+
transform: translateY(100%);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
100% {
|
|
139
|
+
transform: translateY(0);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
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 _dayjs = _interopRequireDefault(require("dayjs"));
|
|
15
|
+
|
|
16
|
+
var _button = _interopRequireDefault(require("../button"));
|
|
17
|
+
|
|
18
|
+
var _titaUi = require("tita-ui");
|
|
19
|
+
|
|
20
|
+
var _auth = require("../../utils/auth");
|
|
21
|
+
|
|
22
|
+
var _bsGlobal = require("../../utils/bs-global");
|
|
23
|
+
|
|
24
|
+
var _contact = _interopRequireDefault(require("./contact"));
|
|
25
|
+
|
|
26
|
+
var _requestApi = require("./request-api");
|
|
27
|
+
|
|
28
|
+
var _tools = require("../../utils/tools");
|
|
29
|
+
|
|
30
|
+
require("./index.css");
|
|
31
|
+
|
|
32
|
+
var _helpers = require("../../utils/helpers");
|
|
33
|
+
|
|
34
|
+
var _window$BSGlobal, _window$BSGlobal$tena, _window$BSGlobal2, _window$BSGlobal2$ten;
|
|
35
|
+
|
|
36
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
|
+
|
|
38
|
+
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); }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
45
|
+
|
|
46
|
+
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."); }
|
|
47
|
+
|
|
48
|
+
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); }
|
|
49
|
+
|
|
50
|
+
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; }
|
|
51
|
+
|
|
52
|
+
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; }
|
|
53
|
+
|
|
54
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
|
+
|
|
56
|
+
var preCls = 'tita-survey-model';
|
|
57
|
+
var Rect = _button["default"].Rect;
|
|
58
|
+
var loginUserInfo = window.BSGlobal.loginUserInfo;
|
|
59
|
+
var Role = new _auth.MyRole();
|
|
60
|
+
var Version = ((_window$BSGlobal = window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$tena = _window$BSGlobal.tenantAuthentication) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.version) || ((_window$BSGlobal2 = window.BSGlobal) === null || _window$BSGlobal2 === void 0 ? void 0 : (_window$BSGlobal2$ten = _window$BSGlobal2.tenantAuthentication) === null || _window$BSGlobal2$ten === void 0 ? void 0 : _window$BSGlobal2$ten.Version) || 1;
|
|
61
|
+
|
|
62
|
+
var SurveyModel = function SurveyModel(_ref) {
|
|
63
|
+
var activityName = _ref.activityName,
|
|
64
|
+
title = _ref.title,
|
|
65
|
+
startTime = _ref.startTime,
|
|
66
|
+
endTime = _ref.endTime,
|
|
67
|
+
scores = _ref.scores,
|
|
68
|
+
scoringKeywords = _ref.scoringKeywords,
|
|
69
|
+
reasonTags = _ref.reasonTags,
|
|
70
|
+
advisePlaceholder = _ref.advisePlaceholder;
|
|
71
|
+
|
|
72
|
+
var _useState = (0, _react.useState)(false),
|
|
73
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
74
|
+
dialogVisible = _useState2[0],
|
|
75
|
+
setDialogVisible = _useState2[1];
|
|
76
|
+
|
|
77
|
+
var _useState3 = (0, _react.useState)(''),
|
|
78
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
79
|
+
score = _useState4[0],
|
|
80
|
+
setScore = _useState4[1];
|
|
81
|
+
|
|
82
|
+
var _useState5 = (0, _react.useState)(''),
|
|
83
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
84
|
+
scoreType = _useState6[0],
|
|
85
|
+
setScoreType = _useState6[1];
|
|
86
|
+
|
|
87
|
+
var _useState7 = (0, _react.useState)(''),
|
|
88
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
89
|
+
reason = _useState8[0],
|
|
90
|
+
setReason = _useState8[1];
|
|
91
|
+
|
|
92
|
+
var _useState9 = (0, _react.useState)(''),
|
|
93
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
94
|
+
advice = _useState10[0],
|
|
95
|
+
setAdvice = _useState10[1];
|
|
96
|
+
|
|
97
|
+
var _useState11 = (0, _react.useState)(false),
|
|
98
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
99
|
+
contact = _useState12[0],
|
|
100
|
+
setContact = _useState12[1];
|
|
101
|
+
|
|
102
|
+
var handleCloseSurvey = function handleCloseSurvey() {
|
|
103
|
+
setDialogVisible(false);
|
|
104
|
+
localStorage.setItem("survey_model_date__".concat(loginUserInfo.Id), (0, _dayjs["default"])().toString());
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
(0, _react.useEffect)(function () {
|
|
108
|
+
if (Version === 1) return;
|
|
109
|
+
if ((0, _helpers.isDingDing)()) return;
|
|
110
|
+
if (!!window.location.hostname.match(/.work/)) return;
|
|
111
|
+
var newDate = (0, _dayjs["default"])();
|
|
112
|
+
var oldDate = localStorage.getItem("survey_model_date__".concat(loginUserInfo.Id));
|
|
113
|
+
|
|
114
|
+
if (endTime) {
|
|
115
|
+
if ((0, _dayjs["default"])(endTime).valueOf() < (0, _dayjs["default"])().valueOf()) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (oldDate) {
|
|
121
|
+
var oldDay = (0, _dayjs["default"])(oldDate);
|
|
122
|
+
|
|
123
|
+
if (newDate.diff(oldDay, 'day') < 7) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
(0, _requestApi.getData)(activityName).then(function (res) {
|
|
129
|
+
if (res.code === 200) {
|
|
130
|
+
var _res$data, _res$data$list;
|
|
131
|
+
|
|
132
|
+
if (!(res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && (_res$data$list = _res$data.list) !== null && _res$data$list !== void 0 && _res$data$list.length)) {
|
|
133
|
+
setTimeout(function () {
|
|
134
|
+
setDialogVisible(true);
|
|
135
|
+
}, 15000);
|
|
136
|
+
} else {
|
|
137
|
+
setDialogVisible(false);
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
setDialogVisible(false);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}, []);
|
|
144
|
+
|
|
145
|
+
var handleScore = function handleScore(score) {
|
|
146
|
+
setScore(score);
|
|
147
|
+
|
|
148
|
+
if (score < 7) {
|
|
149
|
+
setScoreType('bad');
|
|
150
|
+
} else if (score < 9) {
|
|
151
|
+
setScoreType('normal');
|
|
152
|
+
} else {
|
|
153
|
+
setScoreType('good');
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
var handleReason = function handleReason(reason) {
|
|
158
|
+
setReason(reason);
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
var onAdviceChange = function onAdviceChange(value) {
|
|
162
|
+
setAdvice(value);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
var handleSubmit = function handleSubmit(contact) {
|
|
166
|
+
var tenantInfo = window.BSGlobal.tenantInfo;
|
|
167
|
+
var npsStartTime = (0, _dayjs["default"])(startTime).unix();
|
|
168
|
+
var npsEndTime = (0, _dayjs["default"])(endTime).unix();
|
|
169
|
+
var result = {
|
|
170
|
+
fields: {
|
|
171
|
+
nps_activity_name: activityName,
|
|
172
|
+
nps_activity_title: title,
|
|
173
|
+
nps_start_time: npsStartTime,
|
|
174
|
+
nps_end_time: npsEndTime,
|
|
175
|
+
nps_score: score,
|
|
176
|
+
nps_advice: (0, _tools.htmlEncodeByRegExp)(advice),
|
|
177
|
+
nps_score_reason: reason,
|
|
178
|
+
user_id: loginUserInfo.Id,
|
|
179
|
+
user_name: loginUserInfo.Name,
|
|
180
|
+
user_contact: (0, _tools.htmlEncodeByRegExp)(contact),
|
|
181
|
+
user_role_name: Role.getRole(),
|
|
182
|
+
tenant_id: tenantInfo.Id,
|
|
183
|
+
tenant_name: tenantInfo.Name,
|
|
184
|
+
tenant_source_name: tenantInfo.Source.toString(),
|
|
185
|
+
tenant_version_name: _bsGlobal.VERSION_MAP[Version]
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
(0, _requestApi.sendData)(result, 'nps_survey').then(function (res) {
|
|
189
|
+
console.log('提交成功');
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
var handleToNext = function handleToNext() {
|
|
194
|
+
setDialogVisible(false);
|
|
195
|
+
setContact(true);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
if (contact) return /*#__PURE__*/_react["default"].createElement(_contact["default"], {
|
|
199
|
+
sendData: handleSubmit,
|
|
200
|
+
visilble: contact,
|
|
201
|
+
setVisible: setContact
|
|
202
|
+
});
|
|
203
|
+
if (!dialogVisible) return /*#__PURE__*/_react["default"].createElement("div", null);
|
|
204
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
205
|
+
className: (0, _classnames["default"])('tita-survey-model')
|
|
206
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
207
|
+
className: "".concat(preCls, "__head")
|
|
208
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
209
|
+
className: "".concat(preCls, "__head-title")
|
|
210
|
+
}, title), /*#__PURE__*/_react["default"].createElement("span", {
|
|
211
|
+
className: "tu-icon-canceled ".concat(preCls, "__head-close "),
|
|
212
|
+
onClick: handleCloseSurvey
|
|
213
|
+
})), (scores === null || scores === void 0 ? void 0 : scores.length) && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
214
|
+
className: "".concat(preCls, "__score")
|
|
215
|
+
}, scores.map(function (item) {
|
|
216
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
217
|
+
className: (0, _classnames["default"])("".concat(preCls, "__score-item"), _defineProperty({}, "".concat(preCls, "__score-item--active"), item === score)),
|
|
218
|
+
key: item,
|
|
219
|
+
onClick: function onClick() {
|
|
220
|
+
return handleScore(item);
|
|
221
|
+
}
|
|
222
|
+
}, item);
|
|
223
|
+
})), (scoringKeywords === null || scoringKeywords === void 0 ? void 0 : scoringKeywords.length) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
224
|
+
className: "".concat(preCls, "__keywords")
|
|
225
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
226
|
+
className: "".concat(preCls, "__keywords-left")
|
|
227
|
+
}, scoringKeywords[0]), /*#__PURE__*/_react["default"].createElement("div", {
|
|
228
|
+
className: "".concat(preCls, "__keywords-right")
|
|
229
|
+
}, scoringKeywords[1]))), scoreType && /*#__PURE__*/_react["default"].createElement("div", {
|
|
230
|
+
className: "".concat(preCls, "__content")
|
|
231
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
232
|
+
className: "".concat(preCls, "__tags")
|
|
233
|
+
}, reasonTags[scoreType].map(function (item, key) {
|
|
234
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
235
|
+
className: (0, _classnames["default"])("".concat(preCls, "__tags-item"), _defineProperty({}, "".concat(preCls, "__tags-item--active"), item === reason)),
|
|
236
|
+
key: key,
|
|
237
|
+
onClick: function onClick() {
|
|
238
|
+
return handleReason(item);
|
|
239
|
+
}
|
|
240
|
+
}, item);
|
|
241
|
+
})), /*#__PURE__*/_react["default"].createElement(_titaUi.Textarea, {
|
|
242
|
+
placeholder: advisePlaceholder,
|
|
243
|
+
value: advice,
|
|
244
|
+
onChange: function onChange(e) {
|
|
245
|
+
return onAdviceChange(e.target.value);
|
|
246
|
+
},
|
|
247
|
+
maxLine: 4,
|
|
248
|
+
maxLength: 500,
|
|
249
|
+
wrapperClass: "".concat(preCls, "__text")
|
|
250
|
+
}), /*#__PURE__*/_react["default"].createElement(Rect, {
|
|
251
|
+
type: "primary",
|
|
252
|
+
className: "".concat(preCls, "__btn"),
|
|
253
|
+
onClick: handleToNext
|
|
254
|
+
}, "\u63D0\u4EA4")));
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
SurveyModel.defaultProps = {
|
|
258
|
+
scoringKeywords: ['不愿意', '非常愿意'],
|
|
259
|
+
scores: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
|
260
|
+
reasonTags: {
|
|
261
|
+
bad: ['视角效果不美观', '没有 Excel 便捷', '感受不到管理效率提升', '速度太慢', '操作复杂', '系统不稳定', '功能不满足'],
|
|
262
|
+
normal: ['管理效率有提升', '能解决大部分管理问题', '操作再简单一些', '系统不是很稳定'],
|
|
263
|
+
good: ['OKR 与绩效天然打通', '能追踪目标落地过程', '团队管理高效', '视角效果很好']
|
|
264
|
+
},
|
|
265
|
+
advisePlaceholder: '你觉得哪些地方可以做到更好?'
|
|
266
|
+
};
|
|
267
|
+
var _default = SurveyModel;
|
|
268
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.requestDomain = exports.getJwtToken = exports["default"] = void 0;
|
|
7
|
+
exports.setToken = setToken;
|
|
8
|
+
|
|
9
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
10
|
+
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
|
|
13
|
+
var tenantId = window.BSGlobal.tenantInfo.Id;
|
|
14
|
+
var userId = window.BSGlobal.loginUserInfo.Id;
|
|
15
|
+
|
|
16
|
+
var requestDomain = function requestDomain() {
|
|
17
|
+
if (!window.location.hostname.match(/.work/)) return '';
|
|
18
|
+
return "".concat(window.location.protocol, "//www.tita.gift");
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.requestDomain = requestDomain;
|
|
22
|
+
|
|
23
|
+
function getToken() {
|
|
24
|
+
return sessionStorage.getItem('DEMOFREE_TOKEN') || '';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function setToken(token) {
|
|
28
|
+
sessionStorage.setItem('DEMOFREE_TOKEN', token);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var getJwtToken = function getJwtToken() {
|
|
32
|
+
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/const/skynetToken")).then(function (res) {
|
|
33
|
+
var _res$data;
|
|
34
|
+
|
|
35
|
+
if ((_res$data = res.data) !== null && _res$data !== void 0 && _res$data.Data) {
|
|
36
|
+
setToken(JSON.parse(res.data.Data.obj).token);
|
|
37
|
+
return JSON.parse(res.data.Data.obj);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return false;
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.getJwtToken = getJwtToken;
|
|
45
|
+
|
|
46
|
+
var instance = _axios["default"].create({
|
|
47
|
+
timeout: 10 * 1000
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
var beforeRequest = function beforeRequest(config) {
|
|
51
|
+
config.headers['authorization'] = "Bearer ".concat(getToken());
|
|
52
|
+
return config;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var beforeResponse = function beforeResponse(res) {
|
|
56
|
+
var config = res.config;
|
|
57
|
+
config.retry = 3;
|
|
58
|
+
config.__retryCount = config.__retryCount || 0;
|
|
59
|
+
|
|
60
|
+
if (res.data.code == 401) {
|
|
61
|
+
// 401错误表示未登录授权或者token失效
|
|
62
|
+
if (config.__retryCount <= config.retry) {
|
|
63
|
+
config.__retryCount += 1;
|
|
64
|
+
return getJwtToken().then(function () {
|
|
65
|
+
return instance.request(res.config);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return Promise.reject(res);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return res.data;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
var requestError = function requestError(error) {
|
|
76
|
+
return Promise.reject(error);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
instance.interceptors.request.use(beforeRequest, requestError);
|
|
80
|
+
instance.interceptors.response.use(beforeResponse, function (error) {
|
|
81
|
+
console.log({
|
|
82
|
+
error: error
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
var _default = instance;
|
|
86
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.sendData = exports.getData = void 0;
|
|
7
|
+
|
|
8
|
+
var _instance = _interopRequireDefault(require("./instance"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
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); } }
|
|
13
|
+
|
|
14
|
+
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); }); }; }
|
|
15
|
+
|
|
16
|
+
// const isDev = !!window.location.hostname.match(/work/)
|
|
17
|
+
var sendData = function sendData(fields, objectName) {
|
|
18
|
+
return _instance["default"].post('https://skynet-apis.tita.cloud/api/v1/nps/insert', JSON.stringify(fields), {
|
|
19
|
+
headers: Object.assign({
|
|
20
|
+
'Content-Type': 'application/json;charset=utf-8;',
|
|
21
|
+
'x-meta': objectName
|
|
22
|
+
})
|
|
23
|
+
}).then(function (res) {
|
|
24
|
+
return res;
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.sendData = sendData;
|
|
29
|
+
|
|
30
|
+
var getData = /*#__PURE__*/function () {
|
|
31
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(objectName) {
|
|
32
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
33
|
+
while (1) {
|
|
34
|
+
switch (_context.prev = _context.next) {
|
|
35
|
+
case 0:
|
|
36
|
+
return _context.abrupt("return", _instance["default"].get('https://skynet-apis.tita.cloud/api/v1/nps/list?name=' + objectName).then(function (res) {
|
|
37
|
+
return res;
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
case 1:
|
|
41
|
+
case "end":
|
|
42
|
+
return _context.stop();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}, _callee);
|
|
46
|
+
}));
|
|
47
|
+
|
|
48
|
+
return function getData(_x) {
|
|
49
|
+
return _ref.apply(this, arguments);
|
|
50
|
+
};
|
|
51
|
+
}(); // export const updateData = () =>{
|
|
52
|
+
// return axios
|
|
53
|
+
// .post(
|
|
54
|
+
// "https://tracker.tita.com/api/v1/metas/update",
|
|
55
|
+
// {
|
|
56
|
+
// "id": recordId,
|
|
57
|
+
// "fields": [
|
|
58
|
+
// { "name": "issue_status", "type": "string", "value": "解决中" },
|
|
59
|
+
// { "name": "issue_owner", "type": "string", "value": newPrinciple },
|
|
60
|
+
// { "name": "issue_bug_start_unix", "type": "long", "value": Math.round(new Date().getTime() / 1000) },
|
|
61
|
+
// ],
|
|
62
|
+
// "objectName": "sentry_issue",
|
|
63
|
+
// },
|
|
64
|
+
// {
|
|
65
|
+
// "headers": Object.assign(
|
|
66
|
+
// {
|
|
67
|
+
// "Content-Type": "application/json",
|
|
68
|
+
// "authorization":localStorage.getItem('BUGFREE_JWT_TOKEN'),
|
|
69
|
+
// },
|
|
70
|
+
// authHeaders,
|
|
71
|
+
// ),
|
|
72
|
+
// },
|
|
73
|
+
// )
|
|
74
|
+
// .then(res => {
|
|
75
|
+
// return res;
|
|
76
|
+
// });
|
|
77
|
+
// }
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
exports.getData = getData;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _cloneDeep = _interopRequireDefault(require("clone-deep"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
// 扁平数据转换为树
|
|
19
|
+
var toTree = function toTree(data) {
|
|
20
|
+
var cloneData = (0, _cloneDeep["default"])(data);
|
|
21
|
+
var map = {};
|
|
22
|
+
var res = [];
|
|
23
|
+
cloneData.forEach(function (item) {
|
|
24
|
+
return map[item.taskId] = item;
|
|
25
|
+
});
|
|
26
|
+
cloneData.forEach(function (item) {
|
|
27
|
+
var parent = map[item.parentTaskId];
|
|
28
|
+
|
|
29
|
+
if (parent) {
|
|
30
|
+
if (!parent.children) parent.children = [];
|
|
31
|
+
parent.children.push(item);
|
|
32
|
+
} else {
|
|
33
|
+
res.push(item);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return res;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var getTaskNodeData = function getTaskNodeData(tasks) {
|
|
40
|
+
if (!tasks) return [];
|
|
41
|
+
return tasks.map(function (task, index) {
|
|
42
|
+
return {
|
|
43
|
+
key: task.taskId,
|
|
44
|
+
index: index,
|
|
45
|
+
title: task.taskName,
|
|
46
|
+
nodeType: task.objType === 4 ? "e-project" : "e-task",
|
|
47
|
+
isLeaf: task.children && task.children.length === 0,
|
|
48
|
+
children: getTaskNodeData(task.children),
|
|
49
|
+
data: _objectSpread({}, task)
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
var formatTasksToTreeData = function formatTasksToTreeData(tasks) {
|
|
55
|
+
var taskTreeData = toTree(tasks);
|
|
56
|
+
var taskNodeData = getTaskNodeData(taskTreeData);
|
|
57
|
+
return taskNodeData;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var _default = formatTasksToTreeData;
|
|
61
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>P1</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="任务-交互说明" transform="translate(-1895.000000, -184.000000)" fill="#F05E5E" fill-rule="nonzero">
|
|
6
|
+
<g id="编组-4" transform="translate(1871.000000, 156.000000)">
|
|
7
|
+
<g id="form-/-text-copy-6" transform="translate(24.000000, 19.000000)">
|
|
8
|
+
<g id="标签" transform="translate(0.000000, 9.000000)">
|
|
9
|
+
<path d="M3.80174927,13.7142857 L3.80174927,9.70017637 L6.10667124,9.70017637 C7.13565426,9.6813639 7.91768136,9.34273956 8.45275253,8.68430335 C8.97410393,8.05878895 9.23477963,7.36507937 9.23477963,6.6031746 C9.23477963,6.03880071 9.13188132,5.54967666 8.92608472,5.13580247 C8.72943463,4.70781893 8.47333219,4.37860082 8.1577774,4.14814815 C7.78277025,3.84244562 7.41233636,3.64021164 7.04647573,3.54144621 C6.6806151,3.46619636 6.3010347,3.42857143 5.90773452,3.42857143 L2.28571429,3.42857143 L2.28571429,13.7142857 L3.80174927,13.7142857 Z M6.04493226,8.22574956 L3.80174927,8.22574956 L3.80174927,4.90299824 L5.99005316,4.90299824 C6.40164637,4.893592 6.76293374,4.99000588 7.07391528,5.19223986 C7.27971188,5.31452087 7.43977591,5.48148148 7.55410736,5.69312169 C7.66386555,5.92827748 7.71874464,6.21751911 7.71874464,6.56084656 C7.71874464,6.97472075 7.58383353,7.35097002 7.31401132,7.68959436 C7.03046933,8.03762493 6.60744298,8.21634333 6.04493226,8.22574956 Z M13.7142857,13.7142857 L13.7142857,3.42857143 L12.2805694,3.42857143 L10.8605728,4.49382716 L10.8605728,6.05996473 L12.2805694,4.98765432 L12.2805694,13.7142857 L13.7142857,13.7142857 Z" id="P1"></path>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>P2</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="任务-交互说明" transform="translate(-1895.000000, -215.000000)" fill="#F6BD16" fill-rule="nonzero">
|
|
6
|
+
<g id="编组-4" transform="translate(1871.000000, 156.000000)">
|
|
7
|
+
<g id="form-/-text-copy-6" transform="translate(24.000000, 19.000000)">
|
|
8
|
+
<g id="标签" transform="translate(0.000000, 40.000000)">
|
|
9
|
+
<path d="M2.69158333,13.1428571 L2.69158333,9.16151603 L5.04620775,9.16151603 C6.09737937,9.14285714 6.8962698,8.80699708 7.44287904,8.15393586 C7.97547266,7.5335277 8.24176947,6.84548105 8.24176947,6.08979592 C8.24176947,5.53002915 8.13665231,5.04489796 7.92641799,4.63440233 C7.72552741,4.20991254 7.46390247,3.88338192 7.14154318,3.6548105 C6.75844952,3.3516035 6.38002774,3.15102041 6.00627783,3.05306122 C5.63252792,2.97842566 5.24476239,2.94110787 4.84298124,2.94110787 L1.14285714,2.94110787 L1.14285714,13.1428571 L2.69158333,13.1428571 Z M4.98313746,7.69912536 L2.69158333,7.69912536 L2.69158333,4.40349854 L4.92707497,4.40349854 C5.34754362,4.3941691 5.71662165,4.48979592 6.03430907,4.69037901 C6.2445434,4.81166181 6.40805898,4.97725948 6.52485583,5.18717201 C6.6369808,5.42040816 6.69304329,5.70728863 6.69304329,6.04781341 C6.69304329,6.45830904 6.55522301,6.83148688 6.27958245,7.16734694 C5.98992627,7.51253644 5.55777794,7.68979592 4.98313746,7.69912536 Z M14.8571429,13.1428571 L14.8571429,11.6804665 L10.9537922,11.6804665 L14.2404555,7.56618076 C14.6515804,7.04373178 14.8571429,6.44664723 14.8571429,5.77492711 C14.8477991,4.93527697 14.5651507,4.2425656 14.0091978,3.696793 C13.4625885,3.14635569 12.7501277,2.8664723 11.8718155,2.85714286 C11.0869407,2.8664723 10.4258705,3.14169096 9.88860501,3.68279883 C9.35601139,4.23790087 9.07102708,4.93994169 9.03365209,5.78892128 L10.4912767,5.78892128 C10.5426673,5.32244898 10.7061829,4.96093294 10.9818235,4.70437318 C11.2481203,4.44781341 11.5821593,4.31953353 11.9839404,4.31953353 C12.4371122,4.32886297 12.7875027,4.47580175 13.0351121,4.76034985 C13.2733776,5.04489796 13.3925104,5.37842566 13.3925104,5.76093294 C13.3925104,5.90553936 13.3738229,6.05947522 13.3364479,6.22274052 C13.2803854,6.39533528 13.1752683,6.5819242 13.0210964,6.78250729 L9.03365209,11.7644315 L9.03365209,13.1428571 L14.8571429,13.1428571 Z" id="P2"></path>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|