@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
|
@@ -36,16 +36,18 @@
|
|
|
36
36
|
|
|
37
37
|
.titaui-okr-flow--node {
|
|
38
38
|
position: relative;
|
|
39
|
-
padding:
|
|
40
|
-
width:
|
|
41
|
-
|
|
39
|
+
padding: 12px 12px;
|
|
40
|
+
width: 340px;
|
|
41
|
+
border: 1px solid #fff;
|
|
42
42
|
background: #ffffff;
|
|
43
43
|
box-shadow: 0px 4px 10px 0px rgba(127, 145, 180, 0.1);
|
|
44
|
-
border-radius:
|
|
44
|
+
border-radius: 12px;
|
|
45
45
|
box-sizing: border-box;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.titaui-okr-flow--node__private {
|
|
49
|
+
width: 340px;
|
|
50
|
+
height: 102px;
|
|
49
51
|
background: url(../images/private-light.png) no-repeat;
|
|
50
52
|
background-size: contain;
|
|
51
53
|
}
|
|
@@ -56,7 +58,7 @@
|
|
|
56
58
|
|
|
57
59
|
.titaui-okr-flow--node__kr {
|
|
58
60
|
border: 1px solid rgba(90, 216, 166, 0.5);
|
|
59
|
-
background: #
|
|
61
|
+
background: #eefbf6;
|
|
60
62
|
height: 96px;
|
|
61
63
|
}
|
|
62
64
|
|
|
@@ -75,25 +77,68 @@
|
|
|
75
77
|
white-space: unset;
|
|
76
78
|
}
|
|
77
79
|
|
|
80
|
+
.titaui-okr-flow--node-krs {
|
|
81
|
+
margin-top: 12px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.titaui-okr-flow--node-kr {
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
display: flex;
|
|
87
|
+
line-height: 20px;
|
|
88
|
+
font-size: 12px;
|
|
89
|
+
margin-top: 8px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.titaui-okr-flow--node-kr-icon {
|
|
93
|
+
color: rgba(40, 121, 255, 0.6);
|
|
94
|
+
margin-right: 8px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.titaui-okr-flow--node-kr-title {
|
|
98
|
+
flex: 1;
|
|
99
|
+
font-size: 13px;
|
|
100
|
+
font-weight: 400;
|
|
101
|
+
color: #3f4755;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.titaui-okr-flow--node-kr-progress {
|
|
105
|
+
width: 32px;
|
|
106
|
+
text-align: right;
|
|
107
|
+
margin-left: 8px;
|
|
108
|
+
white-space: nowrap;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.titaui-okr-flow--node-kr-status--normal {
|
|
112
|
+
color: #2879ff;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.titaui-okr-flow--node-kr-status--risk {
|
|
116
|
+
color: #f6bd16;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.titaui-okr-flow--node-kr-status--expired {
|
|
120
|
+
color: #f05e5e;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.titaui-okr-flow--node-kr-status--complete {
|
|
124
|
+
color: #5ad8a6;
|
|
125
|
+
}
|
|
126
|
+
|
|
78
127
|
.titaui-okr-flow--node-title {
|
|
79
|
-
max-width:
|
|
80
|
-
height: 44px;
|
|
128
|
+
max-width: 270px;
|
|
81
129
|
margin-right: 54px;
|
|
82
|
-
margin-bottom:
|
|
83
|
-
line-height:
|
|
130
|
+
margin-bottom: 4px;
|
|
131
|
+
line-height: 24px;
|
|
84
132
|
color: #141c28;
|
|
85
133
|
font-size: 14px;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
display: -webkit-box;
|
|
89
|
-
text-overflow: ellipsis;
|
|
90
|
-
-webkit-box-orient: vertical;
|
|
91
|
-
-webkit-line-clamp: 2;
|
|
134
|
+
font-weight: 600;
|
|
135
|
+
cursor: pointer;
|
|
92
136
|
}
|
|
93
137
|
|
|
94
138
|
.titaui-okr-flow--node-desp {
|
|
95
139
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
96
140
|
position: relative;
|
|
141
|
+
cursor: pointer;
|
|
97
142
|
}
|
|
98
143
|
|
|
99
144
|
.titaui-okr-flow--node-right {
|
|
@@ -118,7 +163,7 @@
|
|
|
118
163
|
overflow: hidden;
|
|
119
164
|
text-overflow: ellipsis;
|
|
120
165
|
white-space: nowrap;
|
|
121
|
-
line-height:
|
|
166
|
+
line-height: 20px;
|
|
122
167
|
max-width: 96px;
|
|
123
168
|
}
|
|
124
169
|
|
|
@@ -157,7 +202,7 @@
|
|
|
157
202
|
line-height: 24px;
|
|
158
203
|
font-size: 12px;
|
|
159
204
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
160
|
-
color: #
|
|
205
|
+
color: #6f7886;
|
|
161
206
|
}
|
|
162
207
|
|
|
163
208
|
.titaui-okr-flow--node-weight:before {
|
|
@@ -179,7 +224,7 @@
|
|
|
179
224
|
align-items: center;
|
|
180
225
|
font-size: 12px;
|
|
181
226
|
line-height: 24px;
|
|
182
|
-
color: #
|
|
227
|
+
color: #6f7886;
|
|
183
228
|
}
|
|
184
229
|
|
|
185
230
|
.titaui-okr-flow--node-progress .t-c-progress-circle {
|
|
@@ -291,12 +336,13 @@
|
|
|
291
336
|
}
|
|
292
337
|
|
|
293
338
|
.titaui-okr-flow--node-status {
|
|
339
|
+
cursor: pointer;
|
|
294
340
|
position: absolute;
|
|
295
341
|
right: 0;
|
|
296
342
|
top: 0;
|
|
297
343
|
width: 50px;
|
|
298
344
|
height: 32px;
|
|
299
|
-
border-radius: 0
|
|
345
|
+
border-radius: 0 12px 0 20px;
|
|
300
346
|
font-size: 13px;
|
|
301
347
|
text-align: center;
|
|
302
348
|
line-height: 32px;
|
|
@@ -367,7 +413,7 @@
|
|
|
367
413
|
}
|
|
368
414
|
|
|
369
415
|
.titaui-okr-flow__dark .titaui-okr-flow--node-status__normal {
|
|
370
|
-
color: #
|
|
416
|
+
color: #1fa7ff;
|
|
371
417
|
background: #3b4e6e;
|
|
372
418
|
}
|
|
373
419
|
|
|
@@ -386,7 +432,7 @@
|
|
|
386
432
|
}
|
|
387
433
|
|
|
388
434
|
.titaui-okr-flow__dark .titaui-okr-flow--node-kr-status__normal {
|
|
389
|
-
color: #
|
|
435
|
+
color: #1fa7ff;
|
|
390
436
|
background: #3b4e6e;
|
|
391
437
|
}
|
|
392
438
|
|
|
@@ -31,6 +31,10 @@ var _bsGlobal = require("../../../utils/bs-global");
|
|
|
31
31
|
|
|
32
32
|
var _getLocale = require("../../../utils/getLocale");
|
|
33
33
|
|
|
34
|
+
var _tools = require("../../../utils/tools");
|
|
35
|
+
|
|
36
|
+
var _drawerManager = _interopRequireDefault(require("../../../components/drawer-manager"));
|
|
37
|
+
|
|
34
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
39
|
|
|
36
40
|
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); }
|
|
@@ -61,7 +65,7 @@ function WorkNode(_ref) {
|
|
|
61
65
|
darkTheme = _ref.darkTheme;
|
|
62
66
|
var workId = data.workId,
|
|
63
67
|
_data$workName = data.workName,
|
|
64
|
-
workName = _data$workName === void 0 ?
|
|
68
|
+
workName = _data$workName === void 0 ? '' : _data$workName,
|
|
65
69
|
okrType = data.okrType,
|
|
66
70
|
departmentId = data.departmentId,
|
|
67
71
|
departmentName = data.departmentName,
|
|
@@ -71,6 +75,7 @@ function WorkNode(_ref) {
|
|
|
71
75
|
manualRiskLevel = data.manualRiskLevel,
|
|
72
76
|
progress = data.progress,
|
|
73
77
|
okrClassify = data.okrClassify,
|
|
78
|
+
Krs = data.Krs,
|
|
74
79
|
cycleType = data.cycleType,
|
|
75
80
|
startDate = data.startDate,
|
|
76
81
|
endDate = data.endDate,
|
|
@@ -92,9 +97,11 @@ function WorkNode(_ref) {
|
|
|
92
97
|
imgWidth = _useState6[0],
|
|
93
98
|
setImgWidth = _useState6[1];
|
|
94
99
|
|
|
100
|
+
var bodyr = (0, _react.useRef)();
|
|
101
|
+
|
|
95
102
|
var getOkrTypeMap = function getOkrTypeMap() {
|
|
96
103
|
return {
|
|
97
|
-
1: (0, _getLocale.getLocale)(
|
|
104
|
+
1: (0, _getLocale.getLocale)('OKR_MyO_Pop_Individual'),
|
|
98
105
|
// 2: <OpenDepartmentName id={departmentId} name={departmentName} />,
|
|
99
106
|
2: /*#__PURE__*/_react["default"].createElement("img", {
|
|
100
107
|
src: darkTheme ? whiteImg : departUrl,
|
|
@@ -103,8 +110,8 @@ function WorkNode(_ref) {
|
|
|
103
110
|
},
|
|
104
111
|
width: imgWidth
|
|
105
112
|
}),
|
|
106
|
-
3: (0, _getLocale.getLocale)(
|
|
107
|
-
4: groupName || (0, _getLocale.getLocale)(
|
|
113
|
+
3: (0, _getLocale.getLocale)('OKR_MyO_Pop_Company'),
|
|
114
|
+
4: groupName || (0, _getLocale.getLocale)('OKR_MyO_Text_Team')
|
|
108
115
|
};
|
|
109
116
|
};
|
|
110
117
|
|
|
@@ -115,7 +122,7 @@ function WorkNode(_ref) {
|
|
|
115
122
|
while (1) {
|
|
116
123
|
switch (_context.prev = _context.next) {
|
|
117
124
|
case 0:
|
|
118
|
-
name = departmentName ||
|
|
125
|
+
name = departmentName || '默认部门';
|
|
119
126
|
|
|
120
127
|
if (!(0, _bsGlobal.isWx)()) {
|
|
121
128
|
_context.next = 5;
|
|
@@ -126,15 +133,15 @@ function WorkNode(_ref) {
|
|
|
126
133
|
return (0, _openDataPainter.getOpenData)({
|
|
127
134
|
id: departmentId,
|
|
128
135
|
name: departmentName,
|
|
129
|
-
type:
|
|
136
|
+
type: 'departmentName'
|
|
130
137
|
});
|
|
131
138
|
|
|
132
139
|
case 4:
|
|
133
140
|
name = _context.sent;
|
|
134
141
|
|
|
135
142
|
case 5:
|
|
136
|
-
getCanvasImg(
|
|
137
|
-
getCanvasImg(
|
|
143
|
+
getCanvasImg('white', name);
|
|
144
|
+
getCanvasImg('dark', name);
|
|
138
145
|
|
|
139
146
|
case 7:
|
|
140
147
|
case "end":
|
|
@@ -150,11 +157,11 @@ function WorkNode(_ref) {
|
|
|
150
157
|
}();
|
|
151
158
|
|
|
152
159
|
var getCanvasImg = function getCanvasImg() {
|
|
153
|
-
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
160
|
+
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'white';
|
|
154
161
|
var name = arguments.length > 1 ? arguments[1] : undefined;
|
|
155
|
-
var canvas = document.createElement(
|
|
156
|
-
var ctx = canvas.getContext(
|
|
157
|
-
var font =
|
|
162
|
+
var canvas = document.createElement('canvas');
|
|
163
|
+
var ctx = canvas.getContext('2d');
|
|
164
|
+
var font = 'normal 12px/24px -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei';
|
|
158
165
|
ctx.font = font; // const fitStr = fittingString(ctx, name, 92);
|
|
159
166
|
|
|
160
167
|
var _ctx$measureText = ctx.measureText(name),
|
|
@@ -163,11 +170,11 @@ function WorkNode(_ref) {
|
|
|
163
170
|
var actualWidth = Math.min(width, 92);
|
|
164
171
|
(0, _openDataPainter.setSize)(canvas, ctx, actualWidth, 24);
|
|
165
172
|
setImgWidth(actualWidth);
|
|
166
|
-
ctx.textBaseline =
|
|
173
|
+
ctx.textBaseline = 'middle';
|
|
167
174
|
ctx.font = font;
|
|
168
|
-
ctx.fillStyle = theme ==
|
|
175
|
+
ctx.fillStyle = theme == 'white' ? '#FFFFFF' : '#6f7886';
|
|
169
176
|
ctx.fillText(name, 0, 12);
|
|
170
|
-
theme ==
|
|
177
|
+
theme == 'white' ? setWhiteImg(canvas.toDataURL()) : setDepartUrl(canvas.toDataURL());
|
|
171
178
|
};
|
|
172
179
|
|
|
173
180
|
(0, _react.useEffect)(function () {
|
|
@@ -176,6 +183,18 @@ function WorkNode(_ref) {
|
|
|
176
183
|
}
|
|
177
184
|
}, []);
|
|
178
185
|
|
|
186
|
+
var openODetail = function openODetail(id) {
|
|
187
|
+
_drawerManager["default"].open('okrDetail', {
|
|
188
|
+
okrId: workId
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
var openKr = function openKr(id) {
|
|
193
|
+
_drawerManager["default"].open('krDetail', {
|
|
194
|
+
krId: id
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
|
|
179
198
|
var getCycleTextByType = function getCycleTextByType() {
|
|
180
199
|
var cycleType = data.cycleType,
|
|
181
200
|
yqmnum = data.yqmnum,
|
|
@@ -187,7 +206,7 @@ function WorkNode(_ref) {
|
|
|
187
206
|
|
|
188
207
|
switch (cycleTypeCopy) {
|
|
189
208
|
case 0:
|
|
190
|
-
return (0, _getLocale.getLocale)(
|
|
209
|
+
return (0, _getLocale.getLocale)('Mod_Customization');
|
|
191
210
|
|
|
192
211
|
case 1:
|
|
193
212
|
return "".concat(annualNum, "\u5E74");
|
|
@@ -202,26 +221,29 @@ function WorkNode(_ref) {
|
|
|
202
221
|
return "".concat(yqmnum, "-").concat((yqmnum + 1) % 12 || 12, "\u6708");
|
|
203
222
|
|
|
204
223
|
case 5:
|
|
205
|
-
return "".concat(yqmnum == 1 ?
|
|
224
|
+
return "".concat(yqmnum == 1 ? '上' : '下', "\u534A\u5E74");
|
|
206
225
|
|
|
207
226
|
case -1:
|
|
208
|
-
return KrIndex ? "KR".concat(KrIndex) :
|
|
227
|
+
return KrIndex ? "KR".concat(KrIndex) : 'KR';
|
|
209
228
|
}
|
|
210
229
|
}; // 1:正常 2:有风险 3:过期 4:完成 5:过期完成 ,
|
|
211
230
|
|
|
212
231
|
|
|
213
|
-
var riskLevelSuffix = [
|
|
232
|
+
var riskLevelSuffix = ['normal', 'normal', 'risk', 'expired', 'complete', 'complete_over', 'normal'];
|
|
214
233
|
if (!MapOkrVisible) return /*#__PURE__*/_react["default"].createElement("div", {
|
|
215
234
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node"), "".concat(_precls["default"], "--node__private"))
|
|
216
235
|
});
|
|
217
236
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
218
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "--node"), _defineProperty({}, "".concat(_precls["default"], "--node__search"), isSearchRes))
|
|
237
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "--node"), _defineProperty({}, "".concat(_precls["default"], "--node__search"), isSearchRes)),
|
|
238
|
+
ref: bodyr
|
|
219
239
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
220
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-title"))
|
|
221
|
-
|
|
240
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-title")),
|
|
241
|
+
onClick: openODetail
|
|
242
|
+
}, (0, _tools.htmlDecodeByRegExp)(workName), /*#__PURE__*/_react["default"].createElement(_okrClassify["default"], {
|
|
222
243
|
classify: okrClassify
|
|
223
244
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
224
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-desp"))
|
|
245
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-desp")),
|
|
246
|
+
onClick: openODetail
|
|
225
247
|
}, /*#__PURE__*/_react["default"].createElement(_creator["default"], {
|
|
226
248
|
creator: principalUser || {}
|
|
227
249
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -230,7 +252,22 @@ function WorkNode(_ref) {
|
|
|
230
252
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-type"))
|
|
231
253
|
}, getOkrTypeMap()[okrType])), /*#__PURE__*/_react["default"].createElement("span", {
|
|
232
254
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-cycle"))
|
|
233
|
-
}, getCycleTextByType()))), /*#__PURE__*/_react["default"].createElement("
|
|
255
|
+
}, getCycleTextByType()))), !!(Krs !== null && Krs !== void 0 && Krs.length) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
256
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-krs"))
|
|
257
|
+
}, Krs.map(function (item, key) {
|
|
258
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
259
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-kr")),
|
|
260
|
+
onClick: function onClick() {
|
|
261
|
+
return openKr(item.mileStoneId);
|
|
262
|
+
}
|
|
263
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
264
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-kr-icon"))
|
|
265
|
+
}, "KR", item.SortNum + 1), /*#__PURE__*/_react["default"].createElement("div", {
|
|
266
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-kr-title"))
|
|
267
|
+
}, item.mileStoneName), /*#__PURE__*/_react["default"].createElement("div", {
|
|
268
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-kr-progress ").concat(_precls["default"], "--node-kr-status--").concat(riskLevelSuffix[item.riskLevel]))
|
|
269
|
+
}, item.progress, "%"));
|
|
270
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
234
271
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-status"), "".concat(_precls["default"], "--node-status__").concat(riskLevelSuffix[manualRiskLevel]))
|
|
235
272
|
}, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
236
273
|
text: "".concat(progress, "%"),
|
|
@@ -33,6 +33,8 @@ var _precls = _interopRequireDefault(require("../precls"));
|
|
|
33
33
|
|
|
34
34
|
var _getLocale = require("../../../utils/getLocale");
|
|
35
35
|
|
|
36
|
+
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
37
|
+
|
|
36
38
|
require("rc-color-picker/assets/index.css");
|
|
37
39
|
|
|
38
40
|
require("./index.css");
|
|
@@ -45,6 +47,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
45
47
|
|
|
46
48
|
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; }
|
|
47
49
|
|
|
50
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
51
|
+
|
|
52
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
53
|
+
|
|
54
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
55
|
+
|
|
56
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
57
|
+
|
|
48
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); } }
|
|
49
59
|
|
|
50
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); }); }; }
|
|
@@ -77,7 +87,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
77
87
|
mapInstance = _useState2[0],
|
|
78
88
|
setMapInstance = _useState2[1];
|
|
79
89
|
|
|
80
|
-
var _useState3 = (0, _react.useState)(
|
|
90
|
+
var _useState3 = (0, _react.useState)('none'),
|
|
81
91
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
82
92
|
bgColor = _useState4[0],
|
|
83
93
|
setBgColor = _useState4[1];
|
|
@@ -88,6 +98,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
88
98
|
setIsExport = _useState6[1];
|
|
89
99
|
|
|
90
100
|
var modalRef = (0, _react.useRef)();
|
|
101
|
+
var virtualElements = (0, _react.useRef)([]);
|
|
91
102
|
(0, _react.useEffect)(function () {
|
|
92
103
|
if ((0, _bsGlobal.isWx)() && window.WWOpenData) {
|
|
93
104
|
if (window.WWOpenData.enableCanvasSharing) {
|
|
@@ -112,12 +123,12 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
112
123
|
while (1) {
|
|
113
124
|
switch (_context.prev = _context.next) {
|
|
114
125
|
case 0:
|
|
115
|
-
okrMapRef = document.querySelector(
|
|
126
|
+
okrMapRef = document.querySelector('.titaui-okr-flow__export') || document.createElement('div');
|
|
116
127
|
width = okrMapRef.clientWidth; // 获取dom 宽度
|
|
117
128
|
|
|
118
129
|
height = okrMapRef.clientHeight; // 获取dom 高度
|
|
119
130
|
|
|
120
|
-
canvas = document.createElement(
|
|
131
|
+
canvas = document.createElement('canvas'); // 创建一个canvas节点
|
|
121
132
|
|
|
122
133
|
scale = 20; // 定义任意放大倍数 支持小数
|
|
123
134
|
|
|
@@ -154,27 +165,27 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
154
165
|
}
|
|
155
166
|
}
|
|
156
167
|
|
|
157
|
-
var imgUrl = result.toDataURL(
|
|
168
|
+
var imgUrl = result.toDataURL('image/png'); // 得到图片的base64编码数据
|
|
158
169
|
|
|
159
170
|
// 得到图片的base64编码数据
|
|
160
|
-
(0, _requestApis.getBase64DownloadUrl)(imgUrl.split(
|
|
171
|
+
(0, _requestApis.getBase64DownloadUrl)(imgUrl.split(',')[1]).then(function (url) {
|
|
161
172
|
var image = new Image();
|
|
162
|
-
image.setAttribute(
|
|
173
|
+
image.setAttribute('crossOrigin', 'anonymous');
|
|
163
174
|
|
|
164
175
|
image.onload = function () {
|
|
165
176
|
if (!url.Data.obj) {
|
|
166
|
-
_toast["default"].Error(
|
|
177
|
+
_toast["default"].Error('导出失败,请稍后重试', {
|
|
167
178
|
canClose: false
|
|
168
179
|
});
|
|
169
180
|
}
|
|
170
181
|
|
|
171
|
-
var a = document.createElement(
|
|
182
|
+
var a = document.createElement('a'); // 生成一个a元素
|
|
172
183
|
|
|
173
184
|
// 生成一个a元素
|
|
174
|
-
var event = new MouseEvent(
|
|
185
|
+
var event = new MouseEvent('click'); // 创建一个单击事件
|
|
175
186
|
|
|
176
187
|
// 创建一个单击事件
|
|
177
|
-
a.download =
|
|
188
|
+
a.download = 'okr地图'; // 设置图片名称
|
|
178
189
|
|
|
179
190
|
// 设置图片名称
|
|
180
191
|
a.href = url.Data.obj; // 将生成的URL设置为a.href属性
|
|
@@ -183,7 +194,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
183
194
|
a.dispatchEvent(event); // 触发a的单击事件
|
|
184
195
|
|
|
185
196
|
// 触发a的单击事件
|
|
186
|
-
_toast["default"].Success(
|
|
197
|
+
_toast["default"].Success('导出成功');
|
|
187
198
|
|
|
188
199
|
setIsExport(false);
|
|
189
200
|
|
|
@@ -217,7 +228,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
217
228
|
|
|
218
229
|
var confirmHandler = function confirmHandler() {
|
|
219
230
|
if (isExport) {
|
|
220
|
-
_toast["default"].Warning(
|
|
231
|
+
_toast["default"].Warning('正在导出中', {
|
|
221
232
|
canClose: true
|
|
222
233
|
});
|
|
223
234
|
|
|
@@ -233,11 +244,24 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
233
244
|
};
|
|
234
245
|
|
|
235
246
|
var colorChangeHandler = function colorChangeHandler(colors) {
|
|
236
|
-
setBgColor(colors ? colors.color :
|
|
247
|
+
setBgColor(colors ? colors.color : 'none');
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
var NodeDebug = function NodeDebug() {
|
|
251
|
+
var elements = (0, _reactFlowRenderer.useStoreState)(function (state) {
|
|
252
|
+
return [].concat(_toConsumableArray(state.nodes), _toConsumableArray(state.edges));
|
|
253
|
+
}, _isEqual["default"]);
|
|
254
|
+
var setElements = (0, _reactFlowRenderer.useStoreActions)(function (actions) {
|
|
255
|
+
return actions.setElements;
|
|
256
|
+
});
|
|
257
|
+
var newElements = (0, _utils.getLayoutedElements)(elements, direction);
|
|
258
|
+
virtualElements = newElements;
|
|
259
|
+
setElements(newElements);
|
|
260
|
+
return null;
|
|
237
261
|
};
|
|
238
262
|
|
|
239
263
|
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
240
|
-
title: (0, _getLocale.getLocale)(
|
|
264
|
+
title: (0, _getLocale.getLocale)('OKR_Ali_Exportmap'),
|
|
241
265
|
noFooterLine: true,
|
|
242
266
|
visible: visible,
|
|
243
267
|
width: "1000px",
|
|
@@ -253,7 +277,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
253
277
|
style: {
|
|
254
278
|
marginRight: 10
|
|
255
279
|
}
|
|
256
|
-
}, (0, _getLocale.getLocale)(
|
|
280
|
+
}, (0, _getLocale.getLocale)('OKR_Ali_Selectbackground')), /*#__PURE__*/_react["default"].createElement(_rcColorPicker["default"], {
|
|
257
281
|
animation: "slide-up",
|
|
258
282
|
color: "#FFFFFF",
|
|
259
283
|
onChange: colorChangeHandler,
|
|
@@ -275,7 +299,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
275
299
|
nodesDraggable: false,
|
|
276
300
|
nodesConnectable: false,
|
|
277
301
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__export"), _defineProperty({}, "".concat(_precls["default"], "__dark"), darkTheme)),
|
|
278
|
-
elements:
|
|
302
|
+
elements: dataSource,
|
|
279
303
|
nodeTypes: _utils.nodeTypes,
|
|
280
304
|
minZoom: 0.05,
|
|
281
305
|
zoomOnScroll: false,
|
|
@@ -284,10 +308,10 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
284
308
|
paneMoveable: false,
|
|
285
309
|
style: {
|
|
286
310
|
height: 600,
|
|
287
|
-
width:
|
|
311
|
+
width: '100%',
|
|
288
312
|
background: bgColor
|
|
289
313
|
}
|
|
290
|
-
}))))));
|
|
314
|
+
}, /*#__PURE__*/_react["default"].createElement(NodeDebug, null)))))));
|
|
291
315
|
};
|
|
292
316
|
|
|
293
317
|
ExportMapModal.defaultProps = {
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
justify-content: center;
|
|
6
6
|
align-items: center;
|
|
7
|
+
background: #f0f4fa;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
.titaui-okr-flow--loading-img {
|
|
10
|
-
width:
|
|
11
|
+
width: 80px;
|
|
11
12
|
height: 140px;
|
|
12
13
|
background: url("../../images/loading-light.gif") no-repeat;
|
|
14
|
+
background-size: 100% auto;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
.titaui-okr-flow--loading-img__dark {
|