@titaui/pc 1.10.4 → 1.10.7
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/change-okr-modal/index.js +108 -88
- package/lib/components/communication/CommunicationRecord.js +18 -12
- package/lib/components/communication/index.css +48 -9
- package/lib/components/communication/index.js +67 -28
- package/lib/components/communication/style.js +7 -5
- package/lib/components/dynamic/components/obj-status/index.css +2 -19
- package/lib/components/dynamic/components/obj-status/index.js +7 -8
- package/lib/components/dynamic/components/obj-status/utils.js +37 -0
- package/lib/components/dynamic/components/percent/index.css +1 -1
- package/lib/components/dynamic/components/title/index.css +21 -22
- package/lib/components/dynamic/components/title/index.js +20 -8
- package/lib/components/dynamic/dynamic-item/components/header/index.css +6 -6
- package/lib/components/dynamic/dynamic-item/components/header/index.js +12 -6
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align-kr.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align-o.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +35 -24
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +35 -29
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +6 -34
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +6 -32
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +59 -19
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +27 -19
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +49 -38
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +49 -44
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +41 -29
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +23 -29
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +33 -16
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +11 -24
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +26 -41
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +10 -29
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +26 -41
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +13 -30
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +16 -54
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +31 -80
- package/lib/components/dynamic/dynamic-item/dynamic-progress/utils.js +72 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +35 -28
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +10 -23
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-kr.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-o.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-task.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela.svg +23 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +45 -26
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +41 -33
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +19 -6
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +11 -17
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +21 -23
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +31 -27
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +4 -4
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +8 -18
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +6 -21
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +6 -36
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/dynamic-share-course.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.css +10 -18
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.js +9 -25
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +34 -30
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +10 -24
- package/lib/components/dynamic/dynamic-item/index.css +4 -4
- package/lib/components/dynamic/dynamic-item/index.js +38 -8
- package/lib/components/dynamic/util.js +41 -81
- package/lib/components/file-list/components/single-file/index.css +9 -8
- package/lib/components/float-fixed-video-modal/img/close.png +0 -0
- package/lib/components/float-fixed-video-modal/img/full.svg +21 -0
- package/lib/components/float-fixed-video-modal/img/muted.svg +21 -0
- package/lib/components/float-fixed-video-modal/img/pause.svg +21 -0
- package/lib/components/float-fixed-video-modal/img/play.svg +22 -0
- package/lib/components/float-fixed-video-modal/img/small.svg +22 -0
- package/lib/components/float-fixed-video-modal/img/smallFaQi.png +0 -0
- package/lib/components/float-fixed-video-modal/img/volume.svg +21 -0
- package/lib/components/float-fixed-video-modal/index.css +243 -0
- package/lib/components/float-fixed-video-modal/index.js +334 -0
- package/lib/components/float-fixed-video-modal/utils.js +25 -0
- package/lib/components/mblog/context.js +3 -1
- package/lib/components/mblog/index.css +7 -0
- package/lib/components/mblog/index.js +31 -4
- package/lib/components/mblog/style.js +4 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +21 -12
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-empty.js +7 -4
- package/lib/components/progress/circle-progress/index.css +1 -0
- package/lib/components/progress/circle-progress/index.js +7 -2
- package/lib/components/search-key-handle/index.js +7 -2
- package/lib/components/video-modal/img/bigFaqi.png +0 -0
- package/lib/components/video-modal/img/muted.svg +16 -0
- package/lib/components/video-modal/img/not-muted.svg +16 -0
- package/lib/components/video-modal/img/pause.svg +17 -0
- package/lib/components/video-modal/img/play.png +0 -0
- package/lib/components/video-modal/img/play.svg +16 -0
- package/lib/components/video-modal/img/small.svg +22 -0
- package/lib/components/video-modal/index.css +213 -0
- package/lib/components/video-modal/index.js +322 -0
- package/lib/components/video-modal/utils.js +25 -0
- package/lib/index.js +16 -0
- package/lib/utils/bs-global.js +8 -4
- package/lib/utils/tools.js +11 -2
- package/package.json +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/img/okrs-icon.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/img/plan-icon.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/guanlian.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-icon.png +0 -0
|
@@ -25,6 +25,8 @@ var _constant = require("./constant");
|
|
|
25
25
|
|
|
26
26
|
var _getLocale = require("../../utils/getLocale");
|
|
27
27
|
|
|
28
|
+
var _tools = require("../../utils/tools");
|
|
29
|
+
|
|
28
30
|
require("./index.css");
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -78,13 +80,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
78
80
|
var pageSize = 20;
|
|
79
81
|
|
|
80
82
|
function parseUser(toUser) {
|
|
83
|
+
if (!toUser || JSON.stringify(toUser) === '{}') return {};
|
|
81
84
|
return {
|
|
82
85
|
Name: toUser.name,
|
|
83
86
|
Id: toUser.userId,
|
|
84
87
|
DepartmentId: 0,
|
|
85
88
|
Email: toUser.email,
|
|
86
89
|
UserAvatar: toUser.avatar,
|
|
87
|
-
Department:
|
|
90
|
+
Department: ''
|
|
88
91
|
};
|
|
89
92
|
} // ChangeOKR 是伴随父组件的出现而出现的, 构造阶段就已经有所有的数据
|
|
90
93
|
|
|
@@ -113,11 +116,11 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
113
116
|
status: null,
|
|
114
117
|
cycle: null,
|
|
115
118
|
type: null,
|
|
116
|
-
users: [user],
|
|
119
|
+
users: JSON.stringify(user) === '{}' ? [] : [user],
|
|
117
120
|
// 构造之后这里还是空的
|
|
118
121
|
departments: [],
|
|
119
122
|
data: [],
|
|
120
|
-
keywords:
|
|
123
|
+
keywords: '',
|
|
121
124
|
loadingMore: false,
|
|
122
125
|
isEnd: false,
|
|
123
126
|
nextPage: 1,
|
|
@@ -141,7 +144,7 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
141
144
|
this.setState({
|
|
142
145
|
users: [user],
|
|
143
146
|
data: [],
|
|
144
|
-
keywords:
|
|
147
|
+
keywords: ''
|
|
145
148
|
});
|
|
146
149
|
}
|
|
147
150
|
}
|
|
@@ -155,20 +158,20 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
155
158
|
// 首次加载的时候 需要把 cycle 通过 cycleType 与 yqmNum 合并出来
|
|
156
159
|
|
|
157
160
|
var url = (0, _requestV.getApiUrl)("customizequery/condition/get?dataKey=".concat(this.DATA_KEY, "&pageId=").concat(this.PAGE_ID));
|
|
158
|
-
(0, _requestV.taker)(url,
|
|
161
|
+
(0, _requestV.taker)(url, 'GET').then(function (res) {
|
|
159
162
|
// condition 设置完筛选条件 然后再调用 getData()
|
|
160
163
|
if (res.Code === 1) {
|
|
161
164
|
var _res$Data = res.Data,
|
|
162
165
|
cycleType = _res$Data.cycleType,
|
|
163
166
|
yqmNum = _res$Data.yqmNum,
|
|
164
167
|
annualNum = _res$Data.annualNum,
|
|
165
|
-
okrType = _res$Data.okrType,
|
|
166
168
|
status = _res$Data.status,
|
|
167
169
|
users = _res$Data.users;
|
|
170
|
+
var okrType = res.Data.okrType;
|
|
168
171
|
var cycle;
|
|
169
|
-
cycleType ||
|
|
172
|
+
cycleType || '';
|
|
170
173
|
|
|
171
|
-
if (cycleType
|
|
174
|
+
if (cycleType === 1 || cycleType === -1) {
|
|
172
175
|
cycle = "".concat(cycleType);
|
|
173
176
|
} else {
|
|
174
177
|
cycle = cycleType ? "".concat(cycleType, ",").concat(yqmNum) : null;
|
|
@@ -176,7 +179,7 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
176
179
|
|
|
177
180
|
var year = annualNum || null; // status = status || 0;
|
|
178
181
|
|
|
179
|
-
okrType = okrType
|
|
182
|
+
okrType = okrType === undefined ? null : okrType;
|
|
180
183
|
|
|
181
184
|
if (!_this2.KRSetting.OkrTypeSetting) {
|
|
182
185
|
okrType = null;
|
|
@@ -188,8 +191,8 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
188
191
|
year: year,
|
|
189
192
|
status: status,
|
|
190
193
|
type: okrType,
|
|
191
|
-
users: [user],
|
|
192
|
-
keywords:
|
|
194
|
+
users: JSON.stringify(user) === '{}' ? [] : [user],
|
|
195
|
+
keywords: '',
|
|
193
196
|
nextPage: 1
|
|
194
197
|
}, function () {
|
|
195
198
|
return _this2.getListData();
|
|
@@ -209,9 +212,9 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
209
212
|
Id: id,
|
|
210
213
|
DepartmentId: 0,
|
|
211
214
|
Email: email,
|
|
212
|
-
Department:
|
|
213
|
-
UserAvatar:
|
|
214
|
-
keywords:
|
|
215
|
+
Department: '',
|
|
216
|
+
UserAvatar: '',
|
|
217
|
+
keywords: '',
|
|
215
218
|
nextPage: 1
|
|
216
219
|
};
|
|
217
220
|
})
|
|
@@ -239,13 +242,15 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
239
242
|
isEnd = _this$state.isEnd,
|
|
240
243
|
departments = _this$state.departments,
|
|
241
244
|
keywords = _this$state.keywords,
|
|
242
|
-
remembered = _this$state.remembered;
|
|
245
|
+
remembered = _this$state.remembered; // container
|
|
246
|
+
|
|
243
247
|
var _this$props = this.props,
|
|
244
248
|
className = _this$props.className,
|
|
245
249
|
okrPopType = _this$props.okrPopType,
|
|
246
250
|
parentId = _this$props.parentId,
|
|
247
|
-
|
|
248
|
-
|
|
251
|
+
hideCancelBtn = _this$props.hideCancelBtn,
|
|
252
|
+
alilgn = _this$props.alilgn,
|
|
253
|
+
autoAdjust = _this$props.autoAdjust;
|
|
249
254
|
var activeItem = selected || {
|
|
250
255
|
workId: parentId
|
|
251
256
|
};
|
|
@@ -258,8 +263,8 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
258
263
|
ref: function ref(r) {
|
|
259
264
|
return _this3.pop = r;
|
|
260
265
|
},
|
|
261
|
-
align:
|
|
262
|
-
autoAdjust:
|
|
266
|
+
align: alilgn,
|
|
267
|
+
autoAdjust: autoAdjust,
|
|
263
268
|
onBeforeShow: this.onBeforeShow,
|
|
264
269
|
onAfterShow: this.onAfterShow,
|
|
265
270
|
onBeforeHide: this.onBeforeShow,
|
|
@@ -272,7 +277,7 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
272
277
|
}, /*#__PURE__*/_react["default"].createElement(_styledComponents.Header, null, (0, _constant.getPopType)()[okrPopType], /*#__PURE__*/_react["default"].createElement("i", {
|
|
273
278
|
className: "tu-icon-close",
|
|
274
279
|
style: {
|
|
275
|
-
cursor:
|
|
280
|
+
cursor: 'pointer'
|
|
276
281
|
},
|
|
277
282
|
onClick: this.hide
|
|
278
283
|
})), /*#__PURE__*/_react["default"].createElement(_styledComponents.Body, null, /*#__PURE__*/_react["default"].createElement(_Filter["default"], {
|
|
@@ -291,11 +296,11 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
291
296
|
ref: function ref(r) {
|
|
292
297
|
return _this3.list = r;
|
|
293
298
|
}
|
|
294
|
-
}, data.map(function (d
|
|
299
|
+
}, data.map(function (d) {
|
|
295
300
|
return /*#__PURE__*/_react["default"].createElement(_Item["default"], {
|
|
296
301
|
data: d,
|
|
297
302
|
keywords: keywords,
|
|
298
|
-
key: "".concat(d.workId)
|
|
303
|
+
key: "".concat(d.workId),
|
|
299
304
|
active: activeItem,
|
|
300
305
|
onSelect: function onSelect(data) {
|
|
301
306
|
return _this3.handleSelect(data);
|
|
@@ -306,21 +311,21 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
306
311
|
onClick: function onClick() {
|
|
307
312
|
return _this3.getListData(true);
|
|
308
313
|
}
|
|
309
|
-
}, loadingMore ? "".concat((0, _getLocale.getLocale)(
|
|
314
|
+
}, loadingMore ? "".concat((0, _getLocale.getLocale)('Mod_loading'), "\u2026") : (0, _getLocale.getLocale)('OKR_MyO_Butt_Loadmore'), /*#__PURE__*/_react["default"].createElement("i", {
|
|
310
315
|
className: "tu-icon-arrow-down"
|
|
311
|
-
}))), !!data.length && isEnd && /*#__PURE__*/_react["default"].createElement(_styledComponents.NoMore, null, (0, _getLocale.getLocale)(
|
|
316
|
+
}))), !!data.length && isEnd && /*#__PURE__*/_react["default"].createElement(_styledComponents.NoMore, null, (0, _getLocale.getLocale)('Mod_Nomore'), "\uFF5E"))), /*#__PURE__*/_react["default"].createElement(_styledComponents.Footer, null, okrPopType === 1 && parentId !== 0 && !hideCancelBtn && /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
|
|
312
317
|
type: "confirm",
|
|
313
318
|
onClick: this.handleUnConnect
|
|
314
|
-
}, (0, _getLocale.getLocale)(
|
|
319
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_Cancel')), /*#__PURE__*/_react["default"].createElement(_styledComponents.ButtonGroup, null, /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
|
|
315
320
|
onClick: this.hide
|
|
316
|
-
}, (0, _getLocale.getLocale)(
|
|
321
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
|
|
317
322
|
style: {
|
|
318
323
|
marginLeft: 15
|
|
319
324
|
},
|
|
320
|
-
disabled: !selected && parentId
|
|
325
|
+
disabled: !selected && parentId === 0,
|
|
321
326
|
type: "confirm",
|
|
322
327
|
onClick: this.handleConfirm
|
|
323
|
-
}, (0, _getLocale.getLocale)(
|
|
328
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Determine'))))));
|
|
324
329
|
}
|
|
325
330
|
}]);
|
|
326
331
|
|
|
@@ -335,9 +340,9 @@ ChangeOkr.defaultProps = {
|
|
|
335
340
|
var _initialiseProps = function _initialiseProps() {
|
|
336
341
|
var _this4 = this;
|
|
337
342
|
|
|
338
|
-
this.PAGE_ID = this.props.okrPopType
|
|
343
|
+
this.PAGE_ID = this.props.okrPopType === 1 ? 40001 : 40011;
|
|
339
344
|
this.DATA_KEY = "62_".concat((0, _bsGlobal.getUserInfo)().Id);
|
|
340
|
-
this.KRSetting = (0, _bsGlobal.getBSGlobal)(
|
|
345
|
+
this.KRSetting = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting;
|
|
341
346
|
this.page = 1;
|
|
342
347
|
this.moveX = 0;
|
|
343
348
|
this.pending = false;
|
|
@@ -363,9 +368,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
363
368
|
});
|
|
364
369
|
}
|
|
365
370
|
|
|
366
|
-
if (okrPopType
|
|
371
|
+
if (okrPopType === 1) {
|
|
367
372
|
_this4.setState({
|
|
368
|
-
keywords:
|
|
373
|
+
keywords: '',
|
|
369
374
|
nextPage: 1
|
|
370
375
|
});
|
|
371
376
|
}
|
|
@@ -386,21 +391,21 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
386
391
|
};
|
|
387
392
|
|
|
388
393
|
this.onBeforeShow = function () {
|
|
389
|
-
var p = document.querySelector(
|
|
394
|
+
var p = document.querySelector('.okr-panel-changeOkrPop'); // @ts-ignore
|
|
390
395
|
|
|
391
396
|
p && (p.style.transform = "translate(".concat(_this4.moveX, "px,-20px) scale(0)"));
|
|
392
397
|
};
|
|
393
398
|
|
|
394
399
|
this.onAfterShow = function () {
|
|
395
|
-
var p = document.querySelector(
|
|
400
|
+
var p = document.querySelector('.okr-panel-changeOkrPop'); // @ts-ignore
|
|
396
401
|
|
|
397
|
-
p && (p.style.transform =
|
|
402
|
+
p && (p.style.transform = 'translate(0,0) scale(1)');
|
|
398
403
|
};
|
|
399
404
|
|
|
400
405
|
this.handleFilterChange = function (propName, value) {
|
|
401
406
|
var _this4$setState;
|
|
402
407
|
|
|
403
|
-
if (propName
|
|
408
|
+
if (propName === 'clear') {
|
|
404
409
|
_this4.setState({
|
|
405
410
|
users: [],
|
|
406
411
|
departments: [],
|
|
@@ -419,7 +424,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
419
424
|
|
|
420
425
|
_this4.setState((_this4$setState = {}, _defineProperty(_this4$setState, propName, value), _defineProperty(_this4$setState, "nextPage", 1), _defineProperty(_this4$setState, "remembered", false), _this4$setState), _this4.getListData);
|
|
421
426
|
|
|
422
|
-
if (propName
|
|
427
|
+
if (propName === 'remembered' && value) {
|
|
423
428
|
_this4.setState(_defineProperty({}, propName, value));
|
|
424
429
|
|
|
425
430
|
_this4.saveCondition(_this4.state.users, _this4.state.departments);
|
|
@@ -427,7 +432,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
427
432
|
return;
|
|
428
433
|
}
|
|
429
434
|
|
|
430
|
-
if (propName
|
|
435
|
+
if (propName === 'remembered' && !value) {
|
|
431
436
|
_this4.setState(_defineProperty({}, propName, value));
|
|
432
437
|
|
|
433
438
|
_this4.deleteCondition();
|
|
@@ -435,7 +440,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
435
440
|
};
|
|
436
441
|
|
|
437
442
|
this.saveCondition = function (users, depts) {
|
|
438
|
-
var url = (0, _requestV.getApiUrl)(
|
|
443
|
+
var url = (0, _requestV.getApiUrl)('customizequery/condition/save');
|
|
439
444
|
var departmentIdsArr = depts.map(function (item) {
|
|
440
445
|
return item.Id;
|
|
441
446
|
});
|
|
@@ -449,31 +454,31 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
449
454
|
// 用户ID_项目ID_里程碑ID
|
|
450
455
|
pageId: _this4.PAGE_ID,
|
|
451
456
|
// 列表页Id
|
|
452
|
-
startTime:
|
|
457
|
+
startTime: '',
|
|
453
458
|
// 开始时间
|
|
454
|
-
endTime:
|
|
459
|
+
endTime: '',
|
|
455
460
|
// 结束时间
|
|
456
|
-
departmentIds: departmentIdsArr.join(
|
|
461
|
+
departmentIds: departmentIdsArr.join(','),
|
|
457
462
|
// 部门id
|
|
458
463
|
userObjects: [{
|
|
459
|
-
Id:
|
|
460
|
-
Name:
|
|
461
|
-
Email:
|
|
464
|
+
Id: '',
|
|
465
|
+
Name: '',
|
|
466
|
+
Email: '',
|
|
462
467
|
Relation: 0
|
|
463
468
|
}],
|
|
464
469
|
// 用户id
|
|
465
|
-
scope:
|
|
466
|
-
|
|
467
|
-
categoryIds:
|
|
470
|
+
scope: '',
|
|
471
|
+
//范围
|
|
472
|
+
categoryIds: '',
|
|
468
473
|
// 分类
|
|
469
|
-
sortType:
|
|
474
|
+
sortType: '',
|
|
470
475
|
// 排序
|
|
471
476
|
annualNum: year,
|
|
472
477
|
// 0 -1 undefined 1999
|
|
473
478
|
status: status,
|
|
474
479
|
okrType: type,
|
|
475
|
-
cycleType: cycle ? "".concat(cycle).split(
|
|
476
|
-
yqmNum: cycle ? "".concat(cycle).split(
|
|
480
|
+
cycleType: cycle ? "".concat(cycle).split(',')[0] : null,
|
|
481
|
+
yqmNum: cycle ? "".concat(cycle).split(',')[1] : null
|
|
477
482
|
};
|
|
478
483
|
data.userObjects = [];
|
|
479
484
|
users.forEach(function (item) {
|
|
@@ -484,21 +489,23 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
484
489
|
Relation: 0
|
|
485
490
|
});
|
|
486
491
|
});
|
|
487
|
-
(0, _requestV.taker)(url,
|
|
492
|
+
(0, _requestV.taker)(url, 'POST', data);
|
|
488
493
|
};
|
|
489
494
|
|
|
490
495
|
this.deleteCondition = function () {
|
|
491
496
|
var url = (0, _requestV.getApiUrl)("customizequery/condition/delete?dataKey=".concat(_this4.DATA_KEY, "&pageId=").concat(_this4.PAGE_ID));
|
|
492
|
-
(0, _requestV.taker)(url,
|
|
497
|
+
(0, _requestV.taker)(url, 'DELETE', {});
|
|
493
498
|
};
|
|
494
499
|
|
|
495
500
|
this.scollListToTop = function () {
|
|
496
|
-
|
|
501
|
+
if (_this4.list) {
|
|
502
|
+
_this4.list.scrollTop = 0;
|
|
503
|
+
}
|
|
497
504
|
};
|
|
498
505
|
|
|
499
506
|
this.getListData = /*#__PURE__*/function () {
|
|
500
507
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(isLoading) {
|
|
501
|
-
var _this4$state2,
|
|
508
|
+
var _this4$state2, keywords, type, users, departments, data, nextPage, toUserId, _this4$state3, status, cycle, year, okrPopType, url;
|
|
502
509
|
|
|
503
510
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
504
511
|
while (1) {
|
|
@@ -512,15 +519,17 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
512
519
|
return _context.abrupt("return");
|
|
513
520
|
|
|
514
521
|
case 2:
|
|
515
|
-
_this4$state2 = _this4.state,
|
|
516
|
-
cycle = cycle
|
|
522
|
+
_this4$state2 = _this4.state, keywords = _this4$state2.keywords, type = _this4$state2.type, users = _this4$state2.users, departments = _this4$state2.departments, data = _this4$state2.data, nextPage = _this4$state2.nextPage, toUserId = _this4$state2.toUserId;
|
|
523
|
+
_this4$state3 = _this4.state, status = _this4$state3.status, cycle = _this4$state3.cycle, year = _this4$state3.year;
|
|
524
|
+
okrPopType = _this4.props.okrPopType;
|
|
525
|
+
cycle = cycle || '-1';
|
|
517
526
|
year = year || -1;
|
|
518
527
|
status = status || 0;
|
|
519
|
-
url = (0, _requestV.getApiUrl)(
|
|
528
|
+
url = (0, _requestV.getApiUrl)('okr/search');
|
|
520
529
|
_this4.pending = true;
|
|
521
530
|
|
|
522
531
|
if (isLoading) {
|
|
523
|
-
_this4.page
|
|
532
|
+
_this4.page = _this4.page + 1;
|
|
524
533
|
|
|
525
534
|
_this4.setState({
|
|
526
535
|
loadingMore: true
|
|
@@ -529,38 +538,38 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
529
538
|
_this4.page = 1;
|
|
530
539
|
}
|
|
531
540
|
|
|
532
|
-
(0, _requestV.taker)(url,
|
|
541
|
+
(0, _requestV.taker)(url, 'POST', {
|
|
533
542
|
// 优秀!
|
|
534
543
|
|
|
535
544
|
/**
|
|
536
545
|
* pageNum: 0
|
|
537
546
|
* pageSize: 20
|
|
538
547
|
*/
|
|
539
|
-
cycleType: "".concat(cycle).split(
|
|
540
|
-
yqmNum: "".concat(cycle).split(
|
|
548
|
+
cycleType: "".concat(cycle).split(',')[0],
|
|
549
|
+
yqmNum: "".concat(cycle).split(',')[1] || 0,
|
|
541
550
|
// 如果是 undefined 就控制成 0 说明没有第二条件
|
|
542
551
|
annualNum: year,
|
|
543
|
-
pageNum: nextPage
|
|
552
|
+
pageNum: nextPage === 0 ? 1 : _this4.page,
|
|
544
553
|
// pageNum 最小是1
|
|
545
554
|
pageSize: pageSize,
|
|
546
555
|
status: status,
|
|
547
556
|
keywords: keywords,
|
|
548
|
-
okrType: type
|
|
549
|
-
orderType:
|
|
550
|
-
// 13:按人员排序
|
|
557
|
+
okrType: type === -1 ? '' : type,
|
|
558
|
+
orderType: 1,
|
|
559
|
+
// 13:按人员排序 1按照创建时间最晚排序
|
|
551
560
|
departmentIds: departments.map(function (d) {
|
|
552
561
|
return d.Id;
|
|
553
|
-
}).join(
|
|
562
|
+
}).join(','),
|
|
554
563
|
userIds: users.map(function (u) {
|
|
555
564
|
return u.Id;
|
|
556
|
-
}).join(
|
|
557
|
-
searchKr:
|
|
565
|
+
}).join(','),
|
|
566
|
+
searchKr: okrPopType,
|
|
558
567
|
// 是否搜索KR:默认为0-不搜索,1-只有对齐目标弹层可以搜索KR
|
|
559
|
-
toUserId:
|
|
568
|
+
toUserId: toUserId
|
|
560
569
|
}).then(function (res) {
|
|
561
570
|
_this4.pending = false;
|
|
562
571
|
var resData = res && res.Data && res.Data.works || [];
|
|
563
|
-
var isRefresh = _this4.page
|
|
572
|
+
var isRefresh = _this4.page === 1;
|
|
564
573
|
|
|
565
574
|
_this4.setState({
|
|
566
575
|
nextPage: res.Data.nextPage,
|
|
@@ -568,16 +577,22 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
568
577
|
data: isRefresh ? resData : [].concat(_toConsumableArray(data), _toConsumableArray(resData)),
|
|
569
578
|
isEnd: res.Data.nextPage === 0
|
|
570
579
|
}, function () {
|
|
571
|
-
|
|
580
|
+
if (isRefresh) {
|
|
581
|
+
_this4.scollListToTop();
|
|
582
|
+
}
|
|
572
583
|
});
|
|
573
|
-
})["catch"](function (
|
|
584
|
+
})["catch"](function () {
|
|
574
585
|
_this4.pending = false;
|
|
575
|
-
_this4.state.loadingMore
|
|
576
|
-
|
|
577
|
-
|
|
586
|
+
var loadingMore = _this4.state.loadingMore;
|
|
587
|
+
|
|
588
|
+
if (loadingMore) {
|
|
589
|
+
_this4.setState({
|
|
590
|
+
loadingMore: false
|
|
591
|
+
});
|
|
592
|
+
}
|
|
578
593
|
});
|
|
579
594
|
|
|
580
|
-
case
|
|
595
|
+
case 12:
|
|
581
596
|
case "end":
|
|
582
597
|
return _context.stop();
|
|
583
598
|
}
|
|
@@ -601,7 +616,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
601
616
|
selectData.workId = 0;
|
|
602
617
|
}
|
|
603
618
|
|
|
604
|
-
if (selected && (selectData.workId && selected.workId && selectData.workId
|
|
619
|
+
if (selected && (selectData.workId && selected.workId && selectData.workId === selected.workId || selectData.mileStoneId && selected.mileStoneId && selectData.mileStoneId === selected.mileStoneId)) return;
|
|
605
620
|
|
|
606
621
|
_this4.setState({
|
|
607
622
|
selected: selectData,
|
|
@@ -610,9 +625,12 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
610
625
|
};
|
|
611
626
|
|
|
612
627
|
this.handleConfirm = function () {
|
|
613
|
-
var _this4$
|
|
614
|
-
selected = _this4$
|
|
615
|
-
selectOkr = _this4$
|
|
628
|
+
var _this4$state4 = _this4.state,
|
|
629
|
+
selected = _this4$state4.selected,
|
|
630
|
+
selectOkr = _this4$state4.selectOkr;
|
|
631
|
+
var _this4$props2 = _this4.props,
|
|
632
|
+
onConfirm = _this4$props2.onConfirm,
|
|
633
|
+
parentId = _this4$props2.parentId;
|
|
616
634
|
var parentType = selected && selected.mileStoneId ? 2 : 1; // 临时注入
|
|
617
635
|
|
|
618
636
|
var data = _objectSpread(_objectSpread({}, selected), {}, {
|
|
@@ -621,28 +639,30 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
621
639
|
|
|
622
640
|
|
|
623
641
|
data.parentType = parentType;
|
|
642
|
+
data.workName = (0, _tools.htmlToText)(data.workName);
|
|
624
643
|
|
|
625
|
-
if (selected && (selected.workId || selected.mileStoneId)
|
|
626
|
-
|
|
644
|
+
if (selected && (selected.workId || selected.mileStoneId) !== parentId) {
|
|
645
|
+
onConfirm(data);
|
|
627
646
|
}
|
|
628
647
|
|
|
629
648
|
_this4.hide();
|
|
630
649
|
};
|
|
631
650
|
|
|
632
651
|
this.handleUnConnect = function () {
|
|
633
|
-
// 取消关联对齐目标
|
|
634
|
-
|
|
652
|
+
var onConfirm = _this4.props.onConfirm; // 取消关联对齐目标
|
|
653
|
+
|
|
654
|
+
onConfirm({
|
|
635
655
|
workId: 0,
|
|
636
|
-
workName:
|
|
656
|
+
workName: '',
|
|
637
657
|
mileStoneId: 0,
|
|
638
|
-
mileStoneName:
|
|
658
|
+
mileStoneName: '',
|
|
639
659
|
parentType: 0
|
|
640
660
|
});
|
|
641
661
|
|
|
642
662
|
_this4.setState({
|
|
643
663
|
selected: {
|
|
644
664
|
workId: 0,
|
|
645
|
-
workName:
|
|
665
|
+
workName: ''
|
|
646
666
|
}
|
|
647
667
|
});
|
|
648
668
|
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _reactTooltip = _interopRequireDefault(require("react-tooltip"));
|
|
13
13
|
|
|
14
|
-
var _avatar = _interopRequireDefault(require("
|
|
14
|
+
var _avatar = _interopRequireDefault(require("../avatar"));
|
|
15
15
|
|
|
16
16
|
var _Portals = _interopRequireDefault(require("../../components-v1/portals/Portals"));
|
|
17
17
|
|
|
@@ -64,7 +64,11 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
|
|
|
64
64
|
return /*#__PURE__*/_react["default"].createElement(_style.CommunicationItem, {
|
|
65
65
|
className: className
|
|
66
66
|
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
67
|
-
size:
|
|
67
|
+
size: {
|
|
68
|
+
width: 28,
|
|
69
|
+
fontSize: 14,
|
|
70
|
+
textNum: 1
|
|
71
|
+
},
|
|
68
72
|
name: communicationTrack.publishUser.name,
|
|
69
73
|
src: communicationTrack.publishUser.avatar.small,
|
|
70
74
|
color: communicationTrack.publishUser.avatar.color,
|
|
@@ -78,8 +82,10 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
|
|
|
78
82
|
userName: communicationTrack.publishUser.name,
|
|
79
83
|
userId: communicationTrack.publishUser.userId
|
|
80
84
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
81
|
-
className: "".concat(prefix, "__communication-
|
|
82
|
-
},
|
|
85
|
+
className: "".concat(prefix, "__communication-time")
|
|
86
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
87
|
+
className: "".concat(prefix, "__communication-time-point")
|
|
88
|
+
}, "\xB7"), communicationTrack.createDate)) : /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
|
|
83
89
|
userName: communicationTrack.publishUser.name,
|
|
84
90
|
userId: communicationTrack.publishUser.userId
|
|
85
91
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -88,25 +94,25 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
|
|
|
88
94
|
userName: communicationTrack.parentUser.name,
|
|
89
95
|
userId: communicationTrack.parentUser.userId
|
|
90
96
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
91
|
-
className: "".concat(prefix, "__communication-
|
|
92
|
-
},
|
|
97
|
+
className: "".concat(prefix, "__communication-time")
|
|
98
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
99
|
+
className: "".concat(prefix, "__communication-time-point")
|
|
100
|
+
}, "\xB7"), communicationTrack.createDate), /*#__PURE__*/_react["default"].createElement(_Portals["default"], null, /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
|
|
93
101
|
html: true,
|
|
94
102
|
className: "tt-react-tooltip",
|
|
95
103
|
place: "top",
|
|
96
104
|
type: "dark",
|
|
97
105
|
effect: "solid"
|
|
98
|
-
}))), /*#__PURE__*/_react["default"].createElement("
|
|
99
|
-
className: "".concat(prefix, "__communication-content"),
|
|
100
|
-
ref: contentRef
|
|
101
|
-
}, (0, _openData.parseTag)(communicationTrack.content.trim()))), communicationTrack.attachments && /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
|
+
})))), communicationTrack.attachments && /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
107
|
className: "".concat(prefix, "__communication-attachments")
|
|
103
108
|
}, /*#__PURE__*/_react["default"].createElement(_fileList["default"], {
|
|
104
109
|
data: communicationTrack.attachments
|
|
105
110
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
111
|
className: "".concat(prefix, "__communication-bottom")
|
|
107
112
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
108
|
-
className: "".concat(prefix, "__communication-
|
|
109
|
-
|
|
113
|
+
className: "".concat(prefix, "__communication-content"),
|
|
114
|
+
ref: contentRef
|
|
115
|
+
}, (0, _openData.parseTag)(communicationTrack.content.trim())), /*#__PURE__*/_react["default"].createElement(_style.CommunicationActionbar, {
|
|
110
116
|
className: "communication__actionbar"
|
|
111
117
|
}, /*#__PURE__*/_react["default"].createElement(_style.ActionbarList, null, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
|
|
112
118
|
onMouseDown: function onMouseDown(event) {
|
|
@@ -5,17 +5,11 @@
|
|
|
5
5
|
margin: 0 8px;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.titaui-communication__communication-colon {
|
|
9
|
-
font-size: 14px;
|
|
10
|
-
font-weight: 600;
|
|
11
|
-
color: #3f4755;
|
|
12
|
-
line-height: 22px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
8
|
.titaui-communication__communication-content {
|
|
16
9
|
font-size: 14px;
|
|
17
10
|
color: #6f7886;
|
|
18
11
|
line-height: 22px;
|
|
12
|
+
position: relative;
|
|
19
13
|
}
|
|
20
14
|
|
|
21
15
|
.titaui-communication__communication-content .highlight {
|
|
@@ -47,9 +41,14 @@
|
|
|
47
41
|
|
|
48
42
|
.titaui-communication__communication-time {
|
|
49
43
|
font-size: 12px;
|
|
50
|
-
|
|
44
|
+
font-weight: 400;
|
|
45
|
+
color: #89919F;
|
|
51
46
|
line-height: 18px;
|
|
52
|
-
margin-
|
|
47
|
+
margin-left: 6px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.titaui-communication__communication-time-point {
|
|
51
|
+
margin-right: 4px;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
.titaui-communication__communication-bottom {
|
|
@@ -68,8 +67,48 @@
|
|
|
68
67
|
display: flex;
|
|
69
68
|
align-items: center;
|
|
70
69
|
user-select: none;
|
|
70
|
+
color: #2879ff;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.titaui-communication__communication-total-icon {
|
|
74
74
|
margin-left: 4px;
|
|
75
|
+
margin-top: -2px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.titaui-communication__reply-container-text {
|
|
79
|
+
margin-right: 4px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.titaui-communication__reply-container--show-user {
|
|
83
|
+
margin-left: 40px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.titaui-communication__reply-default-input {
|
|
87
|
+
display: flex;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.titaui-communication__reply-default-input-text {
|
|
91
|
+
flex: 1;
|
|
92
|
+
cursor: text;
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
color: #BFC7D5;
|
|
95
|
+
line-height: 22px;
|
|
96
|
+
margin-left: 12px;
|
|
97
|
+
height: 32px;
|
|
98
|
+
border-radius: 16px;
|
|
99
|
+
background: rgba(240, 244, 250, 0.6);
|
|
100
|
+
border-radius: 16px;
|
|
101
|
+
border: 1px solid #E9ECF0;
|
|
102
|
+
display: flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
box-sizing: border-box;
|
|
105
|
+
padding-left: 12px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.titaui-communication__reply-default-input-avatar {
|
|
109
|
+
height: 32px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.titaui-communication__reply-default-input-avatar .titaui-pc-avator-container {
|
|
113
|
+
display: inline-flex;
|
|
75
114
|
}
|