@titaui/pc 1.10.9 → 1.10.12
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 -87
- package/lib/components/communication/CommunicationRecord.js +26 -16
- package/lib/components/communication/index.css +54 -10
- package/lib/components/communication/index.js +67 -28
- package/lib/components/communication/style.js +8 -6
- package/lib/components/create-okr-modal/fields/okr-parent.js +1 -5
- package/lib/components/dynamic/components/obj-status/index.css +3 -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 +8 -7
- package/lib/components/dynamic/dynamic-item/components/header/index.js +13 -7
- 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 +46 -27
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +39 -29
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +5 -33
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +6 -32
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +58 -18
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +27 -19
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +55 -42
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +49 -44
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +39 -27
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +23 -29
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +31 -14
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +11 -24
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +25 -40
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +10 -29
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +25 -40
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +13 -30
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +13 -55
- 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 +56 -31
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +45 -33
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +19 -17
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +11 -17
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +20 -22
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +31 -27
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +3 -3
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +8 -18
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +5 -20
- 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 +32 -28
- 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/dynamic-like-ranking/item.js +1 -1
- package/lib/components/dynamic/img/dynamic-point.svg +13 -0
- package/lib/components/dynamic/util.js +41 -81
- package/lib/components/file-list/components/single-file/index.css +9 -8
- package/lib/components/file-list/components/single-file/index.js +1 -1
- package/lib/components/follower-visitor/index.js +6 -4
- package/lib/components/grid-layout/okr-progress/index.js +20 -30
- 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/okr-detail/okr-list/index.js +1 -5
- package/lib/components/progress/circle-progress/index.css +1 -0
- package/lib/components/progress/circle-progress/index.js +8 -3
- package/lib/components/search-key-handle/index.js +7 -2
- package/lib/utils/bs-global.js +13 -9
- 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,10 @@ 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).concat(i),
|
|
299
303
|
active: activeItem,
|
|
300
304
|
onSelect: function onSelect(data) {
|
|
301
305
|
return _this3.handleSelect(data);
|
|
@@ -306,21 +310,21 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
|
|
|
306
310
|
onClick: function onClick() {
|
|
307
311
|
return _this3.getListData(true);
|
|
308
312
|
}
|
|
309
|
-
}, loadingMore ? "".concat((0, _getLocale.getLocale)(
|
|
313
|
+
}, loadingMore ? "".concat((0, _getLocale.getLocale)('Mod_loading'), "\u2026") : (0, _getLocale.getLocale)('OKR_MyO_Butt_Loadmore'), /*#__PURE__*/_react["default"].createElement("i", {
|
|
310
314
|
className: "tu-icon-arrow-down"
|
|
311
|
-
}))), !!data.length && isEnd && /*#__PURE__*/_react["default"].createElement(_styledComponents.NoMore, null, (0, _getLocale.getLocale)(
|
|
315
|
+
}))), !!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
316
|
type: "confirm",
|
|
313
317
|
onClick: this.handleUnConnect
|
|
314
|
-
}, (0, _getLocale.getLocale)(
|
|
318
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_Cancel')), /*#__PURE__*/_react["default"].createElement(_styledComponents.ButtonGroup, null, /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
|
|
315
319
|
onClick: this.hide
|
|
316
|
-
}, (0, _getLocale.getLocale)(
|
|
320
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
|
|
317
321
|
style: {
|
|
318
322
|
marginLeft: 15
|
|
319
323
|
},
|
|
320
|
-
disabled: !selected && parentId
|
|
324
|
+
disabled: !selected && parentId === 0,
|
|
321
325
|
type: "confirm",
|
|
322
326
|
onClick: this.handleConfirm
|
|
323
|
-
}, (0, _getLocale.getLocale)(
|
|
327
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Determine'))))));
|
|
324
328
|
}
|
|
325
329
|
}]);
|
|
326
330
|
|
|
@@ -335,9 +339,9 @@ ChangeOkr.defaultProps = {
|
|
|
335
339
|
var _initialiseProps = function _initialiseProps() {
|
|
336
340
|
var _this4 = this;
|
|
337
341
|
|
|
338
|
-
this.PAGE_ID = this.props.okrPopType
|
|
342
|
+
this.PAGE_ID = this.props.okrPopType === 1 ? 40001 : 40011;
|
|
339
343
|
this.DATA_KEY = "62_".concat((0, _bsGlobal.getUserInfo)().Id);
|
|
340
|
-
this.KRSetting = (0, _bsGlobal.getBSGlobal)(
|
|
344
|
+
this.KRSetting = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting;
|
|
341
345
|
this.page = 1;
|
|
342
346
|
this.moveX = 0;
|
|
343
347
|
this.pending = false;
|
|
@@ -363,9 +367,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
363
367
|
});
|
|
364
368
|
}
|
|
365
369
|
|
|
366
|
-
if (okrPopType
|
|
370
|
+
if (okrPopType === 1) {
|
|
367
371
|
_this4.setState({
|
|
368
|
-
keywords:
|
|
372
|
+
keywords: '',
|
|
369
373
|
nextPage: 1
|
|
370
374
|
});
|
|
371
375
|
}
|
|
@@ -386,21 +390,21 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
386
390
|
};
|
|
387
391
|
|
|
388
392
|
this.onBeforeShow = function () {
|
|
389
|
-
var p = document.querySelector(
|
|
393
|
+
var p = document.querySelector('.okr-panel-changeOkrPop'); // @ts-ignore
|
|
390
394
|
|
|
391
395
|
p && (p.style.transform = "translate(".concat(_this4.moveX, "px,-20px) scale(0)"));
|
|
392
396
|
};
|
|
393
397
|
|
|
394
398
|
this.onAfterShow = function () {
|
|
395
|
-
var p = document.querySelector(
|
|
399
|
+
var p = document.querySelector('.okr-panel-changeOkrPop'); // @ts-ignore
|
|
396
400
|
|
|
397
|
-
p && (p.style.transform =
|
|
401
|
+
p && (p.style.transform = 'translate(0,0) scale(1)');
|
|
398
402
|
};
|
|
399
403
|
|
|
400
404
|
this.handleFilterChange = function (propName, value) {
|
|
401
405
|
var _this4$setState;
|
|
402
406
|
|
|
403
|
-
if (propName
|
|
407
|
+
if (propName === 'clear') {
|
|
404
408
|
_this4.setState({
|
|
405
409
|
users: [],
|
|
406
410
|
departments: [],
|
|
@@ -419,7 +423,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
419
423
|
|
|
420
424
|
_this4.setState((_this4$setState = {}, _defineProperty(_this4$setState, propName, value), _defineProperty(_this4$setState, "nextPage", 1), _defineProperty(_this4$setState, "remembered", false), _this4$setState), _this4.getListData);
|
|
421
425
|
|
|
422
|
-
if (propName
|
|
426
|
+
if (propName === 'remembered' && value) {
|
|
423
427
|
_this4.setState(_defineProperty({}, propName, value));
|
|
424
428
|
|
|
425
429
|
_this4.saveCondition(_this4.state.users, _this4.state.departments);
|
|
@@ -427,7 +431,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
427
431
|
return;
|
|
428
432
|
}
|
|
429
433
|
|
|
430
|
-
if (propName
|
|
434
|
+
if (propName === 'remembered' && !value) {
|
|
431
435
|
_this4.setState(_defineProperty({}, propName, value));
|
|
432
436
|
|
|
433
437
|
_this4.deleteCondition();
|
|
@@ -435,7 +439,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
435
439
|
};
|
|
436
440
|
|
|
437
441
|
this.saveCondition = function (users, depts) {
|
|
438
|
-
var url = (0, _requestV.getApiUrl)(
|
|
442
|
+
var url = (0, _requestV.getApiUrl)('customizequery/condition/save');
|
|
439
443
|
var departmentIdsArr = depts.map(function (item) {
|
|
440
444
|
return item.Id;
|
|
441
445
|
});
|
|
@@ -449,31 +453,31 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
449
453
|
// 用户ID_项目ID_里程碑ID
|
|
450
454
|
pageId: _this4.PAGE_ID,
|
|
451
455
|
// 列表页Id
|
|
452
|
-
startTime:
|
|
456
|
+
startTime: '',
|
|
453
457
|
// 开始时间
|
|
454
|
-
endTime:
|
|
458
|
+
endTime: '',
|
|
455
459
|
// 结束时间
|
|
456
|
-
departmentIds: departmentIdsArr.join(
|
|
460
|
+
departmentIds: departmentIdsArr.join(','),
|
|
457
461
|
// 部门id
|
|
458
462
|
userObjects: [{
|
|
459
|
-
Id:
|
|
460
|
-
Name:
|
|
461
|
-
Email:
|
|
463
|
+
Id: '',
|
|
464
|
+
Name: '',
|
|
465
|
+
Email: '',
|
|
462
466
|
Relation: 0
|
|
463
467
|
}],
|
|
464
468
|
// 用户id
|
|
465
|
-
scope:
|
|
466
|
-
|
|
467
|
-
categoryIds:
|
|
469
|
+
scope: '',
|
|
470
|
+
//范围
|
|
471
|
+
categoryIds: '',
|
|
468
472
|
// 分类
|
|
469
|
-
sortType:
|
|
473
|
+
sortType: '',
|
|
470
474
|
// 排序
|
|
471
475
|
annualNum: year,
|
|
472
476
|
// 0 -1 undefined 1999
|
|
473
477
|
status: status,
|
|
474
478
|
okrType: type,
|
|
475
|
-
cycleType: cycle ? "".concat(cycle).split(
|
|
476
|
-
yqmNum: cycle ? "".concat(cycle).split(
|
|
479
|
+
cycleType: cycle ? "".concat(cycle).split(',')[0] : null,
|
|
480
|
+
yqmNum: cycle ? "".concat(cycle).split(',')[1] : null
|
|
477
481
|
};
|
|
478
482
|
data.userObjects = [];
|
|
479
483
|
users.forEach(function (item) {
|
|
@@ -484,21 +488,23 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
484
488
|
Relation: 0
|
|
485
489
|
});
|
|
486
490
|
});
|
|
487
|
-
(0, _requestV.taker)(url,
|
|
491
|
+
(0, _requestV.taker)(url, 'POST', data);
|
|
488
492
|
};
|
|
489
493
|
|
|
490
494
|
this.deleteCondition = function () {
|
|
491
495
|
var url = (0, _requestV.getApiUrl)("customizequery/condition/delete?dataKey=".concat(_this4.DATA_KEY, "&pageId=").concat(_this4.PAGE_ID));
|
|
492
|
-
(0, _requestV.taker)(url,
|
|
496
|
+
(0, _requestV.taker)(url, 'DELETE', {});
|
|
493
497
|
};
|
|
494
498
|
|
|
495
499
|
this.scollListToTop = function () {
|
|
496
|
-
|
|
500
|
+
if (_this4.list) {
|
|
501
|
+
_this4.list.scrollTop = 0;
|
|
502
|
+
}
|
|
497
503
|
};
|
|
498
504
|
|
|
499
505
|
this.getListData = /*#__PURE__*/function () {
|
|
500
506
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(isLoading) {
|
|
501
|
-
var _this4$state2,
|
|
507
|
+
var _this4$state2, keywords, type, users, departments, data, nextPage, toUserId, _this4$state3, status, cycle, year, okrPopType, url;
|
|
502
508
|
|
|
503
509
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
504
510
|
while (1) {
|
|
@@ -512,11 +518,13 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
512
518
|
return _context.abrupt("return");
|
|
513
519
|
|
|
514
520
|
case 2:
|
|
515
|
-
_this4$state2 = _this4.state,
|
|
516
|
-
cycle = cycle
|
|
521
|
+
_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;
|
|
522
|
+
_this4$state3 = _this4.state, status = _this4$state3.status, cycle = _this4$state3.cycle, year = _this4$state3.year;
|
|
523
|
+
okrPopType = _this4.props.okrPopType;
|
|
524
|
+
cycle = cycle || '-1';
|
|
517
525
|
year = year || -1;
|
|
518
526
|
status = status || 0;
|
|
519
|
-
url = (0, _requestV.getApiUrl)(
|
|
527
|
+
url = (0, _requestV.getApiUrl)('okr/search');
|
|
520
528
|
_this4.pending = true;
|
|
521
529
|
|
|
522
530
|
if (isLoading) {
|
|
@@ -529,38 +537,38 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
529
537
|
_this4.page = 1;
|
|
530
538
|
}
|
|
531
539
|
|
|
532
|
-
(0, _requestV.taker)(url,
|
|
540
|
+
(0, _requestV.taker)(url, 'POST', {
|
|
533
541
|
// 优秀!
|
|
534
542
|
|
|
535
543
|
/**
|
|
536
544
|
* pageNum: 0
|
|
537
545
|
* pageSize: 20
|
|
538
546
|
*/
|
|
539
|
-
cycleType: "".concat(cycle).split(
|
|
540
|
-
yqmNum: "".concat(cycle).split(
|
|
547
|
+
cycleType: "".concat(cycle).split(',')[0],
|
|
548
|
+
yqmNum: "".concat(cycle).split(',')[1] || 0,
|
|
541
549
|
// 如果是 undefined 就控制成 0 说明没有第二条件
|
|
542
550
|
annualNum: year,
|
|
543
|
-
pageNum: nextPage
|
|
551
|
+
pageNum: nextPage === 0 ? 1 : _this4.page,
|
|
544
552
|
// pageNum 最小是1
|
|
545
553
|
pageSize: pageSize,
|
|
546
554
|
status: status,
|
|
547
555
|
keywords: keywords,
|
|
548
|
-
okrType: type
|
|
549
|
-
orderType:
|
|
550
|
-
// 13:按人员排序
|
|
556
|
+
okrType: type === -1 ? '' : type,
|
|
557
|
+
orderType: 1,
|
|
558
|
+
// 13:按人员排序 1按照创建时间最晚排序
|
|
551
559
|
departmentIds: departments.map(function (d) {
|
|
552
560
|
return d.Id;
|
|
553
|
-
}).join(
|
|
561
|
+
}).join(','),
|
|
554
562
|
userIds: users.map(function (u) {
|
|
555
563
|
return u.Id;
|
|
556
|
-
}).join(
|
|
557
|
-
searchKr:
|
|
564
|
+
}).join(','),
|
|
565
|
+
searchKr: okrPopType,
|
|
558
566
|
// 是否搜索KR:默认为0-不搜索,1-只有对齐目标弹层可以搜索KR
|
|
559
|
-
toUserId:
|
|
567
|
+
toUserId: toUserId
|
|
560
568
|
}).then(function (res) {
|
|
561
569
|
_this4.pending = false;
|
|
562
570
|
var resData = res && res.Data && res.Data.works || [];
|
|
563
|
-
var isRefresh = _this4.page
|
|
571
|
+
var isRefresh = _this4.page === 1;
|
|
564
572
|
|
|
565
573
|
_this4.setState({
|
|
566
574
|
nextPage: res.Data.nextPage,
|
|
@@ -568,16 +576,24 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
568
576
|
data: isRefresh ? resData : [].concat(_toConsumableArray(data), _toConsumableArray(resData)),
|
|
569
577
|
isEnd: res.Data.nextPage === 0
|
|
570
578
|
}, function () {
|
|
571
|
-
|
|
579
|
+
console.log(_this4.state.data);
|
|
580
|
+
|
|
581
|
+
if (isRefresh) {
|
|
582
|
+
_this4.scollListToTop();
|
|
583
|
+
}
|
|
572
584
|
});
|
|
573
|
-
})["catch"](function (
|
|
585
|
+
})["catch"](function () {
|
|
574
586
|
_this4.pending = false;
|
|
575
|
-
_this4.state.loadingMore
|
|
576
|
-
|
|
577
|
-
|
|
587
|
+
var loadingMore = _this4.state.loadingMore;
|
|
588
|
+
|
|
589
|
+
if (loadingMore) {
|
|
590
|
+
_this4.setState({
|
|
591
|
+
loadingMore: false
|
|
592
|
+
});
|
|
593
|
+
}
|
|
578
594
|
});
|
|
579
595
|
|
|
580
|
-
case
|
|
596
|
+
case 12:
|
|
581
597
|
case "end":
|
|
582
598
|
return _context.stop();
|
|
583
599
|
}
|
|
@@ -601,7 +617,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
601
617
|
selectData.workId = 0;
|
|
602
618
|
}
|
|
603
619
|
|
|
604
|
-
if (selected && (selectData.workId && selected.workId && selectData.workId
|
|
620
|
+
if (selected && (selectData.workId && selected.workId && selectData.workId === selected.workId || selectData.mileStoneId && selected.mileStoneId && selectData.mileStoneId === selected.mileStoneId)) return;
|
|
605
621
|
|
|
606
622
|
_this4.setState({
|
|
607
623
|
selected: selectData,
|
|
@@ -610,9 +626,12 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
610
626
|
};
|
|
611
627
|
|
|
612
628
|
this.handleConfirm = function () {
|
|
613
|
-
var _this4$
|
|
614
|
-
selected = _this4$
|
|
615
|
-
selectOkr = _this4$
|
|
629
|
+
var _this4$state4 = _this4.state,
|
|
630
|
+
selected = _this4$state4.selected,
|
|
631
|
+
selectOkr = _this4$state4.selectOkr;
|
|
632
|
+
var _this4$props2 = _this4.props,
|
|
633
|
+
onConfirm = _this4$props2.onConfirm,
|
|
634
|
+
parentId = _this4$props2.parentId;
|
|
616
635
|
var parentType = selected && selected.mileStoneId ? 2 : 1; // 临时注入
|
|
617
636
|
|
|
618
637
|
var data = _objectSpread(_objectSpread({}, selected), {}, {
|
|
@@ -621,28 +640,30 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
621
640
|
|
|
622
641
|
|
|
623
642
|
data.parentType = parentType;
|
|
643
|
+
data.workName = (0, _tools.htmlToText)(data.workName);
|
|
624
644
|
|
|
625
|
-
if (selected && (selected.workId || selected.mileStoneId)
|
|
626
|
-
|
|
645
|
+
if (selected && (selected.workId || selected.mileStoneId) !== parentId) {
|
|
646
|
+
onConfirm(data);
|
|
627
647
|
}
|
|
628
648
|
|
|
629
649
|
_this4.hide();
|
|
630
650
|
};
|
|
631
651
|
|
|
632
652
|
this.handleUnConnect = function () {
|
|
633
|
-
// 取消关联对齐目标
|
|
634
|
-
|
|
653
|
+
var onConfirm = _this4.props.onConfirm; // 取消关联对齐目标
|
|
654
|
+
|
|
655
|
+
onConfirm({
|
|
635
656
|
workId: 0,
|
|
636
|
-
workName:
|
|
657
|
+
workName: '',
|
|
637
658
|
mileStoneId: 0,
|
|
638
|
-
mileStoneName:
|
|
659
|
+
mileStoneName: '',
|
|
639
660
|
parentType: 0
|
|
640
661
|
});
|
|
641
662
|
|
|
642
663
|
_this4.setState({
|
|
643
664
|
selected: {
|
|
644
665
|
workId: 0,
|
|
645
|
-
workName:
|
|
666
|
+
workName: ''
|
|
646
667
|
}
|
|
647
668
|
});
|
|
648
669
|
|
|
@@ -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,
|
|
@@ -72,14 +76,22 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
|
|
|
72
76
|
}), /*#__PURE__*/_react["default"].createElement(_style.CommunicationDetail, null, /*#__PURE__*/_react["default"].createElement("p", {
|
|
73
77
|
style: {
|
|
74
78
|
color: "#3a4247",
|
|
75
|
-
wordBreak: "break-all"
|
|
79
|
+
wordBreak: "break-all",
|
|
80
|
+
display: 'flex',
|
|
81
|
+
alignItems: 'center'
|
|
76
82
|
}
|
|
77
|
-
}, communicationTrack.commentType != 2 ? /*#__PURE__*/_react["default"].createElement("span",
|
|
83
|
+
}, communicationTrack.commentType != 2 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
84
|
+
className: "".concat(prefix, "__communication-item")
|
|
85
|
+
}, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
|
|
78
86
|
userName: communicationTrack.publishUser.name,
|
|
79
87
|
userId: communicationTrack.publishUser.userId
|
|
80
88
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
81
|
-
className: "".concat(prefix, "__communication-
|
|
82
|
-
},
|
|
89
|
+
className: "".concat(prefix, "__communication-time")
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
91
|
+
className: "".concat(prefix, "__communication-time-point")
|
|
92
|
+
}, "\xB7"), communicationTrack.createDate)) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
93
|
+
className: "".concat(prefix, "__communication-item")
|
|
94
|
+
}, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
|
|
83
95
|
userName: communicationTrack.publishUser.name,
|
|
84
96
|
userId: communicationTrack.publishUser.userId
|
|
85
97
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -88,25 +100,23 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
|
|
|
88
100
|
userName: communicationTrack.parentUser.name,
|
|
89
101
|
userId: communicationTrack.parentUser.userId
|
|
90
102
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
91
|
-
className: "".concat(prefix, "__communication-
|
|
92
|
-
},
|
|
103
|
+
className: "".concat(prefix, "__communication-time")
|
|
104
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
105
|
+
className: "".concat(prefix, "__communication-time-point")
|
|
106
|
+
}, "\xB7"), communicationTrack.createDate), /*#__PURE__*/_react["default"].createElement(_Portals["default"], null, /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
|
|
93
107
|
html: true,
|
|
94
108
|
className: "tt-react-tooltip",
|
|
95
109
|
place: "top",
|
|
96
110
|
type: "dark",
|
|
97
111
|
effect: "solid"
|
|
98
|
-
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
112
|
+
})))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
99
113
|
className: "".concat(prefix, "__communication-content"),
|
|
100
114
|
ref: contentRef
|
|
101
|
-
}, (0, _openData.parseTag)(communicationTrack.content.trim()))
|
|
115
|
+
}, (0, _openData.parseTag)(communicationTrack.content.trim())), communicationTrack.attachments && /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
116
|
className: "".concat(prefix, "__communication-attachments")
|
|
103
117
|
}, /*#__PURE__*/_react["default"].createElement(_fileList["default"], {
|
|
104
118
|
data: communicationTrack.attachments
|
|
105
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
106
|
-
className: "".concat(prefix, "__communication-bottom")
|
|
107
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
108
|
-
className: "".concat(prefix, "__communication-time")
|
|
109
|
-
}, communicationTrack.createDate), /*#__PURE__*/_react["default"].createElement(_style.CommunicationActionbar, {
|
|
119
|
+
})), /*#__PURE__*/_react["default"].createElement(_style.CommunicationActionbar, {
|
|
110
120
|
className: "communication__actionbar"
|
|
111
121
|
}, /*#__PURE__*/_react["default"].createElement(_style.ActionbarList, null, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
|
|
112
122
|
onMouseDown: function onMouseDown(event) {
|
|
@@ -135,7 +145,7 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
|
|
|
135
145
|
onSubmit: function onSubmit(event) {
|
|
136
146
|
return onCommunicationRecordChange(event, "delete", index);
|
|
137
147
|
}
|
|
138
|
-
}, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, null, (0, _getLocale.getLocale)("Mod_Delete"))))))
|
|
148
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, null, (0, _getLocale.getLocale)("Mod_Delete")))))), /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
|
|
139
149
|
id: "praise-record",
|
|
140
150
|
className: "tt-react-tooltip",
|
|
141
151
|
place: "top",
|