@titaui/pc 1.7.26 → 1.7.30
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/cascader/index.css +1 -1
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +14 -5
- package/lib/components/nav-top/components/user-message/constant.js +3 -1
- package/lib/components/nav-top/index.js +2 -3
- package/lib/components/weekly-report/board.js +10 -1
- package/lib/components/weekly-report/card.js +14 -14
- package/lib/components/weekly-report/index.css +51 -17
- package/lib/components/weekly-report/index.js +21 -15
- package/lib/components/weekly-report/interface.js +5 -0
- package/lib/components/weekly-report/statistics.js +6 -9
- package/lib/pages/new-okr-list/header/filter.js +0 -1
- package/package.json +1 -1
- package/src/components/cascader/index.scss +1 -1
- package/src/components/nav-top/components/user-message/components/inform/inform-item.tsx +9 -2
- package/src/components/nav-top/components/user-message/constant.ts +2 -0
- package/src/components/nav-top/index.tsx +1 -2
- package/src/components/weekly-report/board.tsx +5 -0
- package/src/components/weekly-report/card.tsx +22 -15
- package/src/components/weekly-report/index.scss +50 -17
- package/src/components/weekly-report/index.tsx +18 -17
- package/src/components/weekly-report/interface.ts +31 -0
- package/src/components/weekly-report/statistics.tsx +7 -6
- package/src/pages/new-okr-list/header/filter.tsx +0 -1
- package/yarn-error.log +15894 -0
|
@@ -74,7 +74,13 @@ var Inform = function Inform(props) {
|
|
|
74
74
|
// // @ts-ignore
|
|
75
75
|
// Talent.app.vent.trigger("global-daily-detail-pull-screen", feedId);
|
|
76
76
|
// }
|
|
77
|
-
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
if (messageType == 135) {
|
|
80
|
+
var redisKey = item.content.match(/redisKey=(\S*?)"/g)[1]; // @ts-ignore
|
|
81
|
+
|
|
82
|
+
Talent.app.vent.trigger("open-weekly-report-modal", redisKey);
|
|
83
|
+
} // 处理合并的消息
|
|
78
84
|
|
|
79
85
|
|
|
80
86
|
var isMessageMerging = messageType == 13018 || messageType == 30362 || messageType == 131;
|
|
@@ -122,15 +128,18 @@ var Inform = function Inform(props) {
|
|
|
122
128
|
}
|
|
123
129
|
} else if (item.objUrl) {
|
|
124
130
|
window.open(item.objUrl);
|
|
131
|
+
} else if (item.objType === _constant.informType.Okr) {
|
|
132
|
+
var url = item.content.match(/(http[s]?:\/\/([\w-]+.)+([:\d+])?(\/[\w-\.\/\?%&=]*))/g);
|
|
133
|
+
window.open(url, '_blank');
|
|
125
134
|
} else {
|
|
126
135
|
var reg = /href='.*?(?=')/g;
|
|
127
|
-
var
|
|
136
|
+
var _url = '';
|
|
128
137
|
item.content.replace(reg, function ($0) {
|
|
129
|
-
|
|
138
|
+
_url = $0.slice(6);
|
|
130
139
|
});
|
|
131
140
|
|
|
132
|
-
if (
|
|
133
|
-
window.open(
|
|
141
|
+
if (_url) {
|
|
142
|
+
window.open(_url, '_blank');
|
|
134
143
|
}
|
|
135
144
|
}
|
|
136
145
|
}
|
|
@@ -33,8 +33,6 @@ var _request = require("../../utils/request");
|
|
|
33
33
|
|
|
34
34
|
var _toast = _interopRequireDefault(require("../toast"));
|
|
35
35
|
|
|
36
|
-
var _helpers = require("../../utils/helpers");
|
|
37
|
-
|
|
38
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
39
37
|
|
|
40
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); }
|
|
@@ -55,7 +53,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
55
53
|
|
|
56
54
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
57
55
|
|
|
58
|
-
var Logo = (0,
|
|
56
|
+
var Logo = (0, _bsGlobal.getTenantInfo)().Logo || _logoWhite["default"];
|
|
57
|
+
|
|
59
58
|
var hasOKRApp = (0, _bsGlobal.getBSGlobal)("newNavigation").find(function (item) {
|
|
60
59
|
return item.appId === 113;
|
|
61
60
|
});
|
|
@@ -14,8 +14,15 @@ var preCls = 'weekly-report-card-board';
|
|
|
14
14
|
function Board(_ref) {
|
|
15
15
|
var percent = _ref.percent;
|
|
16
16
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
17
|
+
style: {
|
|
18
|
+
position: 'relative',
|
|
19
|
+
paddingBottom: 1
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
17
22
|
className: preCls
|
|
18
23
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
+
className: preCls + '__cover'
|
|
25
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
19
26
|
className: preCls + '__done'
|
|
20
27
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
21
28
|
className: preCls + '__undone',
|
|
@@ -36,7 +43,9 @@ function Board(_ref) {
|
|
|
36
43
|
}
|
|
37
44
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
38
45
|
className: preCls + '__center'
|
|
39
|
-
}, /*#__PURE__*/_react["default"].createElement("div", null, percent, "%")))
|
|
46
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, percent, "%"))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
47
|
+
className: preCls + '__cover--bottom'
|
|
48
|
+
}));
|
|
40
49
|
}
|
|
41
50
|
|
|
42
51
|
var _default = Board;
|
|
@@ -49,8 +49,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
49
49
|
|
|
50
50
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
51
51
|
|
|
52
|
-
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
53
|
-
|
|
54
52
|
var preCls = "weekly-report-card";
|
|
55
53
|
|
|
56
54
|
var getImageBase64ByUrl = function getImageBase64ByUrl(toUserId) {
|
|
@@ -62,7 +60,7 @@ var getImageBase64ByUrl = function getImageBase64ByUrl(toUserId) {
|
|
|
62
60
|
};
|
|
63
61
|
|
|
64
62
|
function Card(_ref, ref) {
|
|
65
|
-
|
|
63
|
+
var data = _ref.data;
|
|
66
64
|
|
|
67
65
|
var _useState = (0, _react.useState)(),
|
|
68
66
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -183,7 +181,7 @@ function Card(_ref, ref) {
|
|
|
183
181
|
src: require("./img/title.png")
|
|
184
182
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
185
183
|
className: preCls + "__date-range"
|
|
186
|
-
},
|
|
184
|
+
}, data.WeekCycle), /*#__PURE__*/_react["default"].createElement("div", {
|
|
187
185
|
className: preCls + "__shadow"
|
|
188
186
|
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
189
187
|
className: preCls + "__laba",
|
|
@@ -192,12 +190,12 @@ function Card(_ref, ref) {
|
|
|
192
190
|
className: preCls + "__bofang",
|
|
193
191
|
src: require("./img/bofang.png")
|
|
194
192
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
195
|
-
className: preCls + "__body"
|
|
196
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
197
193
|
className: preCls + "__avatar"
|
|
198
194
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
199
195
|
src: avatarSrc
|
|
200
|
-
})), /*#__PURE__*/_react["default"].createElement("
|
|
196
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
197
|
+
className: preCls + "__body"
|
|
198
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
201
199
|
className: preCls + "__userName",
|
|
202
200
|
src: nameSrc
|
|
203
201
|
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
@@ -206,21 +204,23 @@ function Card(_ref, ref) {
|
|
|
206
204
|
alt: ""
|
|
207
205
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
208
206
|
className: preCls + "__text"
|
|
209
|
-
},
|
|
210
|
-
percent:
|
|
207
|
+
}, data.Quotations), /*#__PURE__*/_react["default"].createElement(_board["default"], {
|
|
208
|
+
percent: Number(data.Complete)
|
|
211
209
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
212
210
|
className: preCls + "__comparison"
|
|
213
|
-
}, "OKR \u5B8C\u6210\u5EA6", /*#__PURE__*/_react["default"].createElement("img", {
|
|
211
|
+
}, "OKR \u5B8C\u6210\u5EA6", data.Increase != '0' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, " ", /*#__PURE__*/_react["default"].createElement("img", {
|
|
214
212
|
className: preCls + "__direction",
|
|
215
|
-
src: require("./img/up.png"),
|
|
213
|
+
src: Number(data.Increase) > 0 ? require("./img/up.png") : require("./img/down.png"),
|
|
216
214
|
alt: ""
|
|
217
215
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
218
216
|
style: {
|
|
219
|
-
color: "#4DC591"
|
|
217
|
+
color: Number(data.Increase) > 0 ? "#4DC591" : '#F05E5E'
|
|
220
218
|
}
|
|
221
|
-
}, "
|
|
219
|
+
}, Math.abs(Number(data.Increase)), "%")) : ''), /*#__PURE__*/_react["default"].createElement("div", {
|
|
222
220
|
className: preCls + "__colleague"
|
|
223
|
-
},
|
|
221
|
+
}, data.PromptLanguage), /*#__PURE__*/_react["default"].createElement(_statistics["default"], {
|
|
222
|
+
data: data
|
|
223
|
+
})), /*#__PURE__*/_react["default"].createElement("img", {
|
|
224
224
|
className: preCls + "__bottom",
|
|
225
225
|
src: require("./img/bottom.png")
|
|
226
226
|
}));
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
.weekly-report-card-wrapper {
|
|
6
6
|
overflow: hidden;
|
|
7
7
|
width: 336px;
|
|
8
|
-
height:
|
|
8
|
+
height: 534px;
|
|
9
9
|
border-radius: 24px;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.weekly-report-card-wrapper .weekly-report-card-content {
|
|
13
13
|
position: relative;
|
|
14
|
-
top: -
|
|
14
|
+
top: -52px;
|
|
15
15
|
left: -20px;
|
|
16
16
|
transform: scale(0.9);
|
|
17
17
|
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
align-items: center;
|
|
33
33
|
width: 375px;
|
|
34
34
|
height: 710px;
|
|
35
|
-
background: linear-gradient(180deg, #B7D5FF 0%, #186FFF
|
|
35
|
+
background: linear-gradient(180deg, #B7D5FF 0%, #186FFF 50%);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.weekly-report-card__title {
|
|
@@ -55,21 +55,28 @@
|
|
|
55
55
|
flex-direction: column;
|
|
56
56
|
align-items: center;
|
|
57
57
|
width: 335px;
|
|
58
|
-
height:
|
|
58
|
+
height: 422px;
|
|
59
59
|
background: transparent;
|
|
60
60
|
padding-top: 55px;
|
|
61
61
|
border-radius: 12px;
|
|
62
62
|
background-image: url("./img/body.png");
|
|
63
63
|
background-size: 100% 100%;
|
|
64
64
|
background-position-y: -1px;
|
|
65
|
+
box-sizing: content-box;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
.weekly-report-card__avatar {
|
|
68
69
|
position: absolute;
|
|
69
|
-
left:
|
|
70
|
-
top:
|
|
71
|
-
|
|
70
|
+
left: 150px;
|
|
71
|
+
top: 135px;
|
|
72
|
+
width: 76px;
|
|
73
|
+
height: 76px;
|
|
74
|
+
background-color: #FFF;
|
|
72
75
|
border-radius: 50%;
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
z-index: 2;
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
.weekly-report-card__avatar > img {
|
|
@@ -103,6 +110,7 @@
|
|
|
103
110
|
margin: 28px 0;
|
|
104
111
|
max-width: 279px;
|
|
105
112
|
text-align: center;
|
|
113
|
+
min-height: 52px;
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
.weekly-report-card__quote {
|
|
@@ -122,22 +130,46 @@
|
|
|
122
130
|
|
|
123
131
|
.weekly-report-card-board__done {
|
|
124
132
|
position: absolute;
|
|
125
|
-
width:
|
|
126
|
-
height:
|
|
133
|
+
width: 150px;
|
|
134
|
+
height: 150px;
|
|
127
135
|
border-radius: 50%;
|
|
128
|
-
background: linear-gradient(
|
|
136
|
+
background: linear-gradient(90deg, #2879FF 0%, #5B8FF9 50%);
|
|
129
137
|
overflow: hidden;
|
|
138
|
+
top: 2px;
|
|
139
|
+
left: 2px;
|
|
130
140
|
}
|
|
131
141
|
|
|
132
142
|
.weekly-report-card-board__undone {
|
|
133
143
|
position: absolute;
|
|
134
|
-
|
|
135
|
-
|
|
144
|
+
left: -5px;
|
|
145
|
+
bottom: 75px;
|
|
146
|
+
width: 160px;
|
|
147
|
+
height: 80px;
|
|
136
148
|
background-color: #eaf1fe;
|
|
137
149
|
transform-origin: center bottom;
|
|
138
150
|
transform: rotate(90deg);
|
|
139
151
|
}
|
|
140
152
|
|
|
153
|
+
.weekly-report-card-board__cover {
|
|
154
|
+
width: 154px;
|
|
155
|
+
height: 154px;
|
|
156
|
+
position: absolute;
|
|
157
|
+
border-radius: 50%;
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
border: 2px solid #fff;
|
|
160
|
+
z-index: 10;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.weekly-report-card-board__cover--bottom {
|
|
164
|
+
width: 154px;
|
|
165
|
+
height: 2px;
|
|
166
|
+
position: absolute;
|
|
167
|
+
bottom: 0;
|
|
168
|
+
box-sizing: border-box;
|
|
169
|
+
background-color: #FFF;
|
|
170
|
+
z-index: 10;
|
|
171
|
+
}
|
|
172
|
+
|
|
141
173
|
.weekly-report-card-board__space {
|
|
142
174
|
position: absolute;
|
|
143
175
|
width: 2px;
|
|
@@ -223,7 +255,7 @@
|
|
|
223
255
|
display: flex;
|
|
224
256
|
align-items: center;
|
|
225
257
|
justify-content: space-between;
|
|
226
|
-
margin-top:
|
|
258
|
+
margin-top: 18px;
|
|
227
259
|
}
|
|
228
260
|
|
|
229
261
|
.weekly-report-card__statistics__item {
|
|
@@ -279,16 +311,16 @@
|
|
|
279
311
|
|
|
280
312
|
.weekly-report-card__laba {
|
|
281
313
|
position: absolute;
|
|
282
|
-
left:
|
|
283
|
-
top:
|
|
314
|
+
left: 6px;
|
|
315
|
+
top: 108px;
|
|
284
316
|
width: 94px;
|
|
285
317
|
height: 65px;
|
|
286
318
|
}
|
|
287
319
|
|
|
288
320
|
.weekly-report-card__bofang {
|
|
289
321
|
position: absolute;
|
|
290
|
-
right:
|
|
291
|
-
top:
|
|
322
|
+
right: 4px;
|
|
323
|
+
top: 124px;
|
|
292
324
|
width: 62px;
|
|
293
325
|
height: 66px;
|
|
294
326
|
z-index: 1;
|
|
@@ -318,6 +350,8 @@
|
|
|
318
350
|
background-color: transparent;
|
|
319
351
|
font-size: 14px;
|
|
320
352
|
color: #FFF;
|
|
353
|
+
backdrop-filter: blur(2px);
|
|
354
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
321
355
|
}
|
|
322
356
|
|
|
323
357
|
.weekly-report-card__download:hover {
|
|
@@ -67,7 +67,7 @@ function WeeklyReportPreview(_ref) {
|
|
|
67
67
|
position: "relative"
|
|
68
68
|
}
|
|
69
69
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
|
-
className: (0, _classnames["default"])(
|
|
70
|
+
className: (0, _classnames["default"])(preCls + "__close"),
|
|
71
71
|
onClick: onClose
|
|
72
72
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
73
73
|
style: {
|
|
@@ -75,10 +75,13 @@ function WeeklyReportPreview(_ref) {
|
|
|
75
75
|
left: "-99999999px"
|
|
76
76
|
}
|
|
77
77
|
}, /*#__PURE__*/_react["default"].createElement(_card["default"], {
|
|
78
|
+
data: data,
|
|
78
79
|
ref: cardRef
|
|
79
80
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
81
|
className: preCls + "-wrapper"
|
|
81
|
-
}, /*#__PURE__*/_react["default"].createElement(_card["default"],
|
|
82
|
+
}, /*#__PURE__*/_react["default"].createElement(_card["default"], {
|
|
83
|
+
data: data
|
|
84
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
82
85
|
className: preCls + "__button-container"
|
|
83
86
|
}, /*#__PURE__*/_react["default"].createElement(_rectBtn["default"], {
|
|
84
87
|
className: preCls + "__download",
|
|
@@ -145,7 +148,7 @@ function WeeklyReportModal(_ref4) {
|
|
|
145
148
|
visible = _useState2[0],
|
|
146
149
|
setVisible = _useState2[1];
|
|
147
150
|
|
|
148
|
-
var _useState3 = (0, _react.useState)(),
|
|
151
|
+
var _useState3 = (0, _react.useState)((0, _tools.getQueryString)().redisKey || null),
|
|
149
152
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
150
153
|
redisKey = _useState4[0],
|
|
151
154
|
setRedisKey = _useState4[1];
|
|
@@ -160,6 +163,7 @@ function WeeklyReportModal(_ref4) {
|
|
|
160
163
|
|
|
161
164
|
(_window = window) === null || _window === void 0 ? void 0 : (_window$Talent = _window.Talent) === null || _window$Talent === void 0 ? void 0 : _window$Talent.app.vent.off('open-weekly-report-modal');
|
|
162
165
|
(_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$Talent = _window2.Talent) === null || _window2$Talent === void 0 ? void 0 : _window2$Talent.app.vent.on('open-weekly-report-modal', function (redisKey) {
|
|
166
|
+
if (visible) return;
|
|
163
167
|
setRedisKey(redisKey);
|
|
164
168
|
setVisible(true);
|
|
165
169
|
});
|
|
@@ -168,30 +172,32 @@ function WeeklyReportModal(_ref4) {
|
|
|
168
172
|
|
|
169
173
|
return (_window3 = window) === null || _window3 === void 0 ? void 0 : (_window3$Talent = _window3.Talent) === null || _window3$Talent === void 0 ? void 0 : _window3$Talent.app.vent.off('open-weekly-report-modal');
|
|
170
174
|
};
|
|
171
|
-
}, []);
|
|
175
|
+
}, [visible]);
|
|
172
176
|
(0, _react.useEffect)(function () {
|
|
173
|
-
|
|
177
|
+
if (!visible) return;
|
|
178
|
+
var current = new Date();
|
|
179
|
+
var dateTimeTicks = current.getFullYear() + '/' + (current.getMonth() + 1) + '/' + current.getDate();
|
|
180
|
+
var param = "redisKey=".concat(redisKey || null, "&dateTimeTicks=").concat(dateTimeTicks || null);
|
|
174
181
|
|
|
175
182
|
if (data) {
|
|
176
183
|
setData(null);
|
|
177
184
|
}
|
|
178
185
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}, [redisKey]);
|
|
186
|
+
(0, _request.rget)('v1')('okr/wwsummary/get?' + param).then(function (res) {
|
|
187
|
+
if (res.Code == 1) {
|
|
188
|
+
setData(res.Data);
|
|
189
|
+
} else {
|
|
190
|
+
setVisible(false);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}, [redisKey, visible]);
|
|
188
194
|
(0, _react.useEffect)(function () {
|
|
189
195
|
if (!!(0, _tools.getQueryString)().redisKey) {
|
|
190
196
|
location.replace(decodeURIComponent(location.href).replace(/&?redisKey=\S*(&|$)/g, ''));
|
|
191
197
|
}
|
|
192
198
|
|
|
193
199
|
if (visible) {
|
|
194
|
-
(0, _request.
|
|
200
|
+
(0, _request.rdelete)('v1')('Indicator/Clear?message_type=0&indicator_type=15');
|
|
195
201
|
}
|
|
196
202
|
}, [visible]);
|
|
197
203
|
if (!data) return null;
|
|
@@ -11,34 +11,31 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
13
|
|
|
14
|
-
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
15
|
-
|
|
16
14
|
var preCls = 'weekly-report-card__statistics';
|
|
17
15
|
|
|
18
16
|
function Statistics(_ref) {
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
var data = _ref.data;
|
|
21
18
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
22
19
|
className: preCls
|
|
23
20
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
21
|
className: (0, _classnames["default"])(preCls + '__item', preCls + '__finish')
|
|
25
22
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
23
|
className: preCls + '__num'
|
|
27
|
-
},
|
|
24
|
+
}, data.TaskNum), /*#__PURE__*/_react["default"].createElement("div", {
|
|
28
25
|
className: preCls + '__text'
|
|
29
26
|
}, "\u5B8C\u6210\u4EFB\u52A1")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
30
27
|
className: (0, _classnames["default"])(preCls + '__item', preCls + '__praise')
|
|
31
28
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
29
|
className: preCls + '__num'
|
|
33
|
-
},
|
|
30
|
+
}, data.LoveNum), /*#__PURE__*/_react["default"].createElement("div", {
|
|
34
31
|
className: preCls + '__text'
|
|
35
|
-
}, "\u83B7\u5F97\u70B9\u8D5E"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
|
+
}, "\u83B7\u5F97\u70B9\u8D5E"), data.LoveTopNum && data.LoveTopNum != '0' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
36
33
|
className: preCls + '__tips'
|
|
37
|
-
}, "
|
|
34
|
+
}, "Top", data.LoveTopNum)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
38
35
|
className: (0, _classnames["default"])(preCls + '__item', preCls + '__communication')
|
|
39
36
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
40
37
|
className: preCls + '__num'
|
|
41
|
-
},
|
|
38
|
+
}, data.Lnteraction), /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
39
|
className: preCls + '__text'
|
|
43
40
|
}, "\u53C2\u4E0E\u4E92\u52A8")));
|
|
44
41
|
}
|
|
@@ -71,7 +71,6 @@ var Filter = function Filter(props) {
|
|
|
71
71
|
setFilterNum = _useState4[1];
|
|
72
72
|
|
|
73
73
|
var _useState5 = (0, _react.useState)(function () {
|
|
74
|
-
debugger;
|
|
75
74
|
var routerData = (0, _tools.getQueryString)();
|
|
76
75
|
var annualNum = routerData.annualNum,
|
|
77
76
|
cycleType = routerData.cycleType,
|
package/package.json
CHANGED
|
@@ -38,7 +38,11 @@ const Inform = (props) => {
|
|
|
38
38
|
// // @ts-ignore
|
|
39
39
|
// Talent.app.vent.trigger("global-daily-detail-pull-screen", feedId);
|
|
40
40
|
// }
|
|
41
|
-
|
|
41
|
+
if(messageType == 135){
|
|
42
|
+
const redisKey = item.content.match(/redisKey=(\S*?)"/g)[1]
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
Talent.app.vent.trigger("open-weekly-report-modal", redisKey);
|
|
45
|
+
}
|
|
42
46
|
// 处理合并的消息
|
|
43
47
|
const isMessageMerging = messageType == 13018 || messageType == 30362 || messageType == 131;
|
|
44
48
|
if (!isMessageMerging) {
|
|
@@ -92,7 +96,10 @@ const Inform = (props) => {
|
|
|
92
96
|
}
|
|
93
97
|
} else if (item.objUrl) {
|
|
94
98
|
window.open(item.objUrl);
|
|
95
|
-
} else {
|
|
99
|
+
} else if (item.objType === informType.Okr) {
|
|
100
|
+
let url = item.content.match(/(http[s]?:\/\/([\w-]+.)+([:\d+])?(\/[\w-\.\/\?%&=]*))/g);
|
|
101
|
+
window.open(url, '_blank');
|
|
102
|
+
} else {
|
|
96
103
|
const reg = /href='.*?(?=')/g;
|
|
97
104
|
let url = '';
|
|
98
105
|
item.content.replace(reg, ($0) => {
|
|
@@ -15,6 +15,7 @@ export const informType = {
|
|
|
15
15
|
"details": 69, //查看详情
|
|
16
16
|
"daily": 55, //日报月报周报
|
|
17
17
|
"todayJob": 81, //进入今日工作
|
|
18
|
+
"Okr": 0, //Okr
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
export enum EObjType {
|
|
@@ -26,4 +27,5 @@ export enum EObjType {
|
|
|
26
27
|
MileStone = 27, // 里程碑
|
|
27
28
|
KanBan = 66, // 看板
|
|
28
29
|
Remind = 8,//提醒
|
|
30
|
+
|
|
29
31
|
}
|
|
@@ -11,8 +11,7 @@ import "./index.scss";
|
|
|
11
11
|
import defaultLogo from "./images/logo-white.png";
|
|
12
12
|
import { rpost } from "../../utils/request";
|
|
13
13
|
import Toast from "../toast";
|
|
14
|
-
|
|
15
|
-
const Logo = isLocal() ? getTenantInfo().Logo : defaultLogo;
|
|
14
|
+
const Logo = getTenantInfo().Logo || defaultLogo;
|
|
16
15
|
const hasOKRApp = getBSGlobal("newNavigation").find(
|
|
17
16
|
(item) => item.appId === 113
|
|
18
17
|
);
|
|
@@ -7,7 +7,9 @@ const preCls = 'weekly-report-card-board'
|
|
|
7
7
|
|
|
8
8
|
function Board({percent}: Props): ReactElement {
|
|
9
9
|
return (
|
|
10
|
+
<div style={{position:'relative',paddingBottom:1}}>
|
|
10
11
|
<div className={preCls}>
|
|
12
|
+
<div className={preCls+'__cover'}/>
|
|
11
13
|
<div className={preCls+'__done'}>
|
|
12
14
|
<div className={preCls+'__undone'}style={{transform:`rotate(${percent/100 * 180}deg)`}}/>
|
|
13
15
|
<div className={preCls+'__space'} style={{transform:'rotate(45deg)'}}/>
|
|
@@ -18,6 +20,9 @@ function Board({percent}: Props): ReactElement {
|
|
|
18
20
|
<div className={preCls+'__center'}>
|
|
19
21
|
<div>{percent}%</div>
|
|
20
22
|
</div>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
<div className={preCls+'__cover--bottom'}/>
|
|
21
26
|
</div>
|
|
22
27
|
)
|
|
23
28
|
}
|
|
@@ -15,10 +15,12 @@ import Statistics from "./statistics";
|
|
|
15
15
|
import { isWx } from "../../utils/bs-global";
|
|
16
16
|
import "./index.scss";
|
|
17
17
|
import { rpost,rget } from "../../utils/request";
|
|
18
|
+
import { IWeeklyReportData } from "./interface";
|
|
18
19
|
|
|
19
20
|
const preCls = "weekly-report-card";
|
|
20
21
|
|
|
21
22
|
interface Props {
|
|
23
|
+
data:IWeeklyReportData
|
|
22
24
|
}
|
|
23
25
|
const getImageBase64ByUrl = (toUserId) => {
|
|
24
26
|
return rpost("v1")(`okr/share/getBase64Str`, { toUserId }).then(
|
|
@@ -27,7 +29,7 @@ const getImageBase64ByUrl = (toUserId) => {
|
|
|
27
29
|
}
|
|
28
30
|
);
|
|
29
31
|
};
|
|
30
|
-
function Card({}: Props, ref): ReactElement {
|
|
32
|
+
function Card({data}: Props, ref): ReactElement {
|
|
31
33
|
const [avatarSrc, setAvatarSrc] = useState<string>();
|
|
32
34
|
const [nameSrc, setNameSrc] = useState<string>();
|
|
33
35
|
const loginUserInfo = getLoginUserInfo();
|
|
@@ -110,14 +112,15 @@ function Card({}: Props, ref): ReactElement {
|
|
|
110
112
|
return (
|
|
111
113
|
<div className={preCls + "-content"} ref={cardRef}>
|
|
112
114
|
<img className={preCls + "__title"} src={require("./img/title.png")} />
|
|
113
|
-
<div className={preCls + "__date-range"}>
|
|
115
|
+
<div className={preCls + "__date-range"}>{data.WeekCycle}</div>
|
|
114
116
|
<div className={preCls + "__shadow"} />
|
|
115
117
|
<img className={preCls + "__laba"} src={require("./img/laba.png")} />
|
|
116
118
|
<img className={preCls + "__bofang"} src={require("./img/bofang.png")} />
|
|
117
|
-
<div className={preCls + "
|
|
118
|
-
<div className={preCls + "__avatar"}>
|
|
119
|
+
<div className={preCls + "__avatar"}>
|
|
119
120
|
<img src={avatarSrc} />
|
|
120
121
|
</div>
|
|
122
|
+
<div className={preCls + "__body"}>
|
|
123
|
+
|
|
121
124
|
<img className={preCls + "__userName"} src={nameSrc} />
|
|
122
125
|
<img
|
|
123
126
|
className={preCls + "__quote"}
|
|
@@ -125,22 +128,26 @@ function Card({}: Props, ref): ReactElement {
|
|
|
125
128
|
alt=""
|
|
126
129
|
/>
|
|
127
130
|
<div className={preCls + "__text"}>
|
|
128
|
-
|
|
131
|
+
{data.Quotations}
|
|
129
132
|
</div>
|
|
130
|
-
<Board percent={
|
|
133
|
+
<Board percent={Number(data.Complete)} />
|
|
131
134
|
<div className={preCls + "__comparison"}>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
|
|
136
|
+
OKR 完成度
|
|
137
|
+
{
|
|
138
|
+
data.Increase != '0' ? <> <img
|
|
139
|
+
className={preCls + "__direction"}
|
|
140
|
+
src={Number( data.Increase) > 0 ? require("./img/up.png") : require('./img/down.png')}
|
|
141
|
+
alt=""
|
|
142
|
+
/>
|
|
143
|
+
<span style={{ color: Number( data.Increase) > 0 ? "#4DC591" : '#F05E5E'}}>{Math.abs(Number(data.Increase))}%</span></> : ''
|
|
144
|
+
}
|
|
145
|
+
|
|
139
146
|
</div>
|
|
140
147
|
<div className={preCls + "__colleague"}>
|
|
141
|
-
|
|
148
|
+
{data.PromptLanguage}
|
|
142
149
|
</div>
|
|
143
|
-
<Statistics />
|
|
150
|
+
<Statistics data={data}/>
|
|
144
151
|
</div>
|
|
145
152
|
<img className={preCls + "__bottom"} src={require("./img/bottom.png")} />
|
|
146
153
|
</div>
|