@titaui/pc 1.12.8 → 1.12.9-beta.1
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/create-okr-modal/fields/okr-case.js +7 -5
- package/lib/components/create-okr-modal/index.js +29 -21
- package/lib/components/create-okr-modal/kr-items/krDatas.js +3 -2
- package/lib/components/okr-flow/export-modal/color.png +0 -0
- package/lib/components/okr-flow/export-modal/index.css +28 -13
- package/lib/components/okr-flow/export-modal/index.js +51 -8
- package/lib/components/okr-flow/export-modal/trans1.png +0 -0
- package/lib/components/period-selector/components/button/style.js +1 -1
- package/lib/components/period-selector/index.css +1 -0
- package/lib/components/period-selector/index.js +7 -2
- package/lib/components/select-layer/index.js +22 -8
- package/lib/components/task-relation-modal/helper.js +1 -56
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +1 -4
- package/lib/components/task-relation-modal/okr-relation/request-api.js +2 -6
- package/lib/components/task-relation-modal/request-api.js +5 -2
- package/lib/components/task-relation-modal/tree/work-tree/index.js +27 -31
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +22 -3
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +11 -11
- package/lib/components/tooltip/tooltip.js +9 -4
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +3 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +2 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +17 -3
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +1 -1
- package/package.json +1 -1
- package/lib/utils/planDataJson.js +0 -11115
|
@@ -43,7 +43,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
43
43
|
|
|
44
44
|
function OkrCase(_ref) {
|
|
45
45
|
var onOkrApply = _ref.onOkrApply,
|
|
46
|
-
okrTemplateEnabled = _ref.okrTemplateEnabled
|
|
46
|
+
okrTemplateEnabled = _ref.okrTemplateEnabled,
|
|
47
|
+
onVisibleChange = _ref.onVisibleChange;
|
|
47
48
|
|
|
48
49
|
var _useState = (0, _react.useState)(false),
|
|
49
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -52,6 +53,7 @@ function OkrCase(_ref) {
|
|
|
52
53
|
|
|
53
54
|
var okrCaseClickHandler = function okrCaseClickHandler() {
|
|
54
55
|
setVisible(true);
|
|
56
|
+
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(true);
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
var onCasesCloseHandler = function onCasesCloseHandler() {
|
|
@@ -62,13 +64,13 @@ function OkrCase(_ref) {
|
|
|
62
64
|
onOkrApply === null || onOkrApply === void 0 ? void 0 : onOkrApply(data);
|
|
63
65
|
setVisible(false);
|
|
64
66
|
|
|
65
|
-
_toast["default"].Success(
|
|
67
|
+
_toast["default"].Success('成功套用');
|
|
66
68
|
};
|
|
67
69
|
|
|
68
70
|
return /*#__PURE__*/_react["default"].createElement(_style.Line, null, okrTemplateEnabled && !(0, _helpers.isLocal)() && !(0, _helpers.isTencentHr)() ? /*#__PURE__*/_react["default"].createElement(_style.CaseLink, {
|
|
69
71
|
onClick: okrCaseClickHandler,
|
|
70
72
|
className: "tu-icon-shoushi"
|
|
71
|
-
}, (0, _getLocale.getLocale)(
|
|
73
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Butt_AddfromOKR')) : null, okrTemplateEnabled && /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
72
74
|
zIndex: 1200,
|
|
73
75
|
noHeadLine: true,
|
|
74
76
|
visible: visible,
|
|
@@ -78,8 +80,8 @@ function OkrCase(_ref) {
|
|
|
78
80
|
noCloseIcon: true,
|
|
79
81
|
destroyOnClose: true,
|
|
80
82
|
style: {
|
|
81
|
-
width:
|
|
82
|
-
height:
|
|
83
|
+
width: '100%',
|
|
84
|
+
height: '100%'
|
|
83
85
|
},
|
|
84
86
|
maskClosable: true
|
|
85
87
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -613,32 +613,35 @@ function CreateOkrModal(_ref, ref) {
|
|
|
613
613
|
|
|
614
614
|
|
|
615
615
|
var OnOkRApplyTplHandler = function OnOkRApplyTplHandler(data) {
|
|
616
|
-
setRichEditorStatus('refresh');
|
|
617
616
|
var name = data.name,
|
|
618
617
|
subelements = data.subelements;
|
|
619
|
-
setOkrNameData({
|
|
620
|
-
mentionUsers: [],
|
|
621
|
-
pureText: name,
|
|
622
|
-
pureTextExcludeAt: name,
|
|
623
|
-
richText: (0, _richEditor.TitaRichEditorInitTextState)(name)
|
|
624
|
-
});
|
|
625
|
-
setKrDatas(subelements.map(function (s) {
|
|
618
|
+
setOkrNameData(function () {
|
|
626
619
|
return {
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
krWeight: (0, _roundWeight.RoundWeight)(100 / subelements.length),
|
|
632
|
-
mileStoneName: s.name,
|
|
633
|
-
mileStoneNamePureTextExcludeAt: s.name,
|
|
634
|
-
mileStoneNameRichText: (0, _richEditor.TitaRichEditorInitTextState)(s.name),
|
|
635
|
-
aiteUsers: [],
|
|
636
|
-
confidenceIndex: 5
|
|
620
|
+
mentionUsers: [],
|
|
621
|
+
pureText: name,
|
|
622
|
+
pureTextExcludeAt: name,
|
|
623
|
+
richText: (0, _richEditor.TitaRichEditorInitTextState)(name)
|
|
637
624
|
};
|
|
638
|
-
})
|
|
625
|
+
});
|
|
626
|
+
setKrDatas(function () {
|
|
627
|
+
return subelements.map(function (s) {
|
|
628
|
+
return {
|
|
629
|
+
uuid: _uuid["default"].v1(),
|
|
630
|
+
principalId: Id,
|
|
631
|
+
principalName: Name,
|
|
632
|
+
userAvatar: UserAvatar,
|
|
633
|
+
krWeight: (0, _roundWeight.RoundWeight)(100 / subelements.length),
|
|
634
|
+
mileStoneName: s.name,
|
|
635
|
+
mileStoneNamePureTextExcludeAt: s.name,
|
|
636
|
+
mileStoneNameRichText: (0, _richEditor.TitaRichEditorInitTextState)(s.name),
|
|
637
|
+
aiteUsers: [],
|
|
638
|
+
confidenceIndex: 5
|
|
639
|
+
};
|
|
640
|
+
});
|
|
641
|
+
});
|
|
639
642
|
setIsCustomWeight(false);
|
|
640
643
|
setIsApplyTpl(true);
|
|
641
|
-
setRichEditorStatus('
|
|
644
|
+
setRichEditorStatus('refresh');
|
|
642
645
|
};
|
|
643
646
|
|
|
644
647
|
(0, _react.useEffect)(function () {
|
|
@@ -795,7 +798,11 @@ function CreateOkrModal(_ref, ref) {
|
|
|
795
798
|
className: "create-modal__title"
|
|
796
799
|
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Title_Newobjective')), /*#__PURE__*/_react["default"].createElement(_okrCase["default"], {
|
|
797
800
|
okrTemplateEnabled: true,
|
|
798
|
-
onOkrApply: OnOkRApplyTplHandler
|
|
801
|
+
onOkrApply: OnOkRApplyTplHandler,
|
|
802
|
+
onVisibleChange: function onVisibleChange() {
|
|
803
|
+
setIsApplyTpl(false);
|
|
804
|
+
setRichEditorStatus('initialization');
|
|
805
|
+
}
|
|
799
806
|
}));
|
|
800
807
|
}, []);
|
|
801
808
|
var krCheckFinalResult = (0, _react.useMemo)(function () {
|
|
@@ -917,6 +924,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
917
924
|
setONameCheckResult: setONameCheckResult,
|
|
918
925
|
setIsInputContent: setIsInputContent
|
|
919
926
|
}), /*#__PURE__*/_react["default"].createElement(_krDatas["default"], {
|
|
927
|
+
isApplyTpl: isApplyTpl,
|
|
920
928
|
isCustomWeight: isCustomWeight,
|
|
921
929
|
wrapperRef: wrapperRef,
|
|
922
930
|
krDatas: krDatas,
|
|
@@ -62,7 +62,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
62
62
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
63
63
|
|
|
64
64
|
function KrDatas(props) {
|
|
65
|
-
var
|
|
65
|
+
var isApplyTpl = props.isApplyTpl,
|
|
66
|
+
isCustomWeight = props.isCustomWeight,
|
|
66
67
|
wrapperRef = props.wrapperRef,
|
|
67
68
|
setKrDatas = props.setKrDatas,
|
|
68
69
|
krDatas = props.krDatas,
|
|
@@ -286,7 +287,7 @@ function KrDatas(props) {
|
|
|
286
287
|
}, [inputKrInfo, setIsInputContent]);
|
|
287
288
|
(0, _react.useEffect)(function () {
|
|
288
289
|
krDatasRef.current = krDatas;
|
|
289
|
-
}, []);
|
|
290
|
+
}, [isApplyTpl]);
|
|
290
291
|
return /*#__PURE__*/_react["default"].createElement("div", null, krDatasRef.current.map(function (kr, index) {
|
|
291
292
|
return /*#__PURE__*/_react["default"].createElement(_krItem["default"], {
|
|
292
293
|
key: kr === null || kr === void 0 ? void 0 : kr.uuid,
|
|
Binary file
|
|
@@ -15,28 +15,43 @@
|
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
17
|
padding: 0 32px 10px;
|
|
18
|
-
color: #89919F;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
.export-map-
|
|
22
|
-
border-radius: 4px;
|
|
23
|
-
display: inline-block;
|
|
24
|
-
width: 30px;
|
|
20
|
+
.export-map-modal__setting-color {
|
|
25
21
|
height: 30px;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
padding: 0 12px;
|
|
25
|
+
background: #FFFFFF;
|
|
26
|
+
border-radius: 16px;
|
|
27
|
+
border: 1px solid #E9ECF0;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
color: #141C28;
|
|
31
|
+
margin-right: 12px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.export-map-modal__setting-color:hover {
|
|
35
|
+
border: 1px solid #2879ff;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.export-map-modal__setting-color-trigger {
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
width: 20px;
|
|
41
|
+
height: 20px;
|
|
26
42
|
background: url("./color.png") no-repeat;
|
|
27
43
|
background-size: cover;
|
|
28
|
-
|
|
44
|
+
border-radius: 16px;
|
|
45
|
+
margin-right: 4px;
|
|
29
46
|
}
|
|
30
47
|
|
|
31
|
-
.export-map-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
height: 30px;
|
|
48
|
+
.export-map-modal__setting-color-trans {
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
width: 20px;
|
|
51
|
+
height: 20px;
|
|
36
52
|
background: url("./trans1.png") no-repeat;
|
|
37
53
|
background-size: cover;
|
|
38
|
-
|
|
39
|
-
cursor: pointer;
|
|
54
|
+
border-radius: 16px;
|
|
40
55
|
}
|
|
41
56
|
|
|
42
57
|
.export-map-modal .titaui-color-picker {
|
|
@@ -21,6 +21,10 @@ var _toast = _interopRequireDefault(require("../../toast"));
|
|
|
21
21
|
|
|
22
22
|
var _dialog = _interopRequireDefault(require("../../dialog"));
|
|
23
23
|
|
|
24
|
+
var _tooltip = _interopRequireDefault(require("../../tooltip"));
|
|
25
|
+
|
|
26
|
+
var _selectLayer = _interopRequireDefault(require("../../select-layer"));
|
|
27
|
+
|
|
24
28
|
var _utils = require("../utils");
|
|
25
29
|
|
|
26
30
|
var _context2 = require("../context");
|
|
@@ -101,8 +105,25 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
101
105
|
isExport = _useState6[0],
|
|
102
106
|
setIsExport = _useState6[1];
|
|
103
107
|
|
|
108
|
+
var _useState7 = (0, _react.useState)({
|
|
109
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_HDmode'),
|
|
110
|
+
value: 20
|
|
111
|
+
}),
|
|
112
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
113
|
+
model = _useState8[0],
|
|
114
|
+
setModel = _useState8[1];
|
|
115
|
+
|
|
104
116
|
var modalRef = (0, _react.useRef)();
|
|
105
117
|
var virtualElements = (0, _react.useRef)([]);
|
|
118
|
+
var models = [{
|
|
119
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_Standardmode'),
|
|
120
|
+
value: 10,
|
|
121
|
+
toolText: (0, _getLocale.getLocale)('Rep_NewS_SmallFileSuita')
|
|
122
|
+
}, {
|
|
123
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_HDmode'),
|
|
124
|
+
value: 20,
|
|
125
|
+
toolText: (0, _getLocale.getLocale)('Rep_NewS_LargeileSize')
|
|
126
|
+
}];
|
|
106
127
|
(0, _react.useEffect)(function () {
|
|
107
128
|
if ((0, _bsGlobal.isWx)() && window.WWOpenData) {
|
|
108
129
|
if (window.WWOpenData.enableCanvasSharing) {
|
|
@@ -134,7 +155,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
134
155
|
|
|
135
156
|
canvas = document.createElement('canvas'); // 创建一个canvas节点
|
|
136
157
|
|
|
137
|
-
scale =
|
|
158
|
+
scale = model.value; // 定义任意放大倍数 支持小数
|
|
138
159
|
|
|
139
160
|
canvas.width = width * scale; // 定义canvas 宽度 * 缩放
|
|
140
161
|
|
|
@@ -296,6 +317,10 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
296
317
|
setMapInstance(instance);
|
|
297
318
|
};
|
|
298
319
|
|
|
320
|
+
var onChangeHandler = function onChangeHandler(data) {
|
|
321
|
+
setModel(data);
|
|
322
|
+
};
|
|
323
|
+
|
|
299
324
|
var colorChangeHandler = function colorChangeHandler(colors) {
|
|
300
325
|
setBgColor(colors ? colors.color : 'none');
|
|
301
326
|
};
|
|
@@ -317,7 +342,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
317
342
|
title: (0, _getLocale.getLocale)('OKR_Ali_Exportmap'),
|
|
318
343
|
noFooterLine: true,
|
|
319
344
|
visible: visible,
|
|
320
|
-
width: "
|
|
345
|
+
width: "840px",
|
|
321
346
|
onClose: onCloseHandler,
|
|
322
347
|
onOk: confirmHandler,
|
|
323
348
|
onCancel: onCloseHandler,
|
|
@@ -327,9 +352,11 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
327
352
|
forceRender: true
|
|
328
353
|
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
329
354
|
className: "export-map-modal__setting"
|
|
355
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
356
|
+
className: "export-map-modal__setting-color"
|
|
330
357
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
331
358
|
style: {
|
|
332
|
-
marginRight:
|
|
359
|
+
marginRight: 16
|
|
333
360
|
}
|
|
334
361
|
}, (0, _getLocale.getLocale)('OKR_Ali_Selectbackground')), /*#__PURE__*/_react["default"].createElement(_rcColorPicker["default"], {
|
|
335
362
|
animation: "slide-up",
|
|
@@ -337,12 +364,28 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
337
364
|
onChange: colorChangeHandler,
|
|
338
365
|
className: "titaui-color-picker",
|
|
339
366
|
mode: "HSB"
|
|
367
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
368
|
+
overlay: (0, _getLocale.getLocale)('Mod_Customization'),
|
|
369
|
+
placement: "top"
|
|
370
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
371
|
+
className: "export-map-modal__setting-color-trigger"
|
|
372
|
+
}))), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
373
|
+
overlay: (0, _getLocale.getLocale)('OKR_Ali_Butt_Transparent'),
|
|
374
|
+
placement: "top"
|
|
340
375
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
341
|
-
className: "export-map-
|
|
342
|
-
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
343
|
-
className: "export-map-modal__color-trans",
|
|
376
|
+
className: "export-map-modal__setting-color-trans",
|
|
344
377
|
onClick: colorChangeHandler
|
|
345
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
378
|
+
}))), /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
379
|
+
onChangeSelect: onChangeHandler,
|
|
380
|
+
items: models,
|
|
381
|
+
initValue: model.value
|
|
382
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
383
|
+
className: "titaui-search-dropdown"
|
|
384
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
385
|
+
className: "titaui-search-dropdown__text"
|
|
386
|
+
}, model.label), /*#__PURE__*/_react["default"].createElement("span", {
|
|
387
|
+
className: "tu-icon-sort-down"
|
|
388
|
+
})))), /*#__PURE__*/_react["default"].createElement("div", null, visible && /*#__PURE__*/_react["default"].createElement(_context2.CommonContext.Provider, {
|
|
346
389
|
value: {
|
|
347
390
|
direction: direction,
|
|
348
391
|
showkr: showkr,
|
|
@@ -361,7 +404,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
361
404
|
zoomOnDoubleClick: false,
|
|
362
405
|
paneMoveable: false,
|
|
363
406
|
style: {
|
|
364
|
-
height:
|
|
407
|
+
height: 446,
|
|
365
408
|
width: '100%',
|
|
366
409
|
background: bgColor
|
|
367
410
|
}
|
|
Binary file
|
|
@@ -13,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
13
13
|
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
15
|
|
|
16
|
-
var DefaultWrapper = _styledComponents["default"].button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: inline-flex;\n\n align-items: center;\n justify-content: center;\n color: #6f7886;\n cursor: pointer;\n outline: none;\n transition: color 0.3s ease, border 0.3s ease;\n background: transparent;\n border-radius: 3px;\n border: 1px solid #e9ecf0;\n &.btn-size-m {\n min-width: 90px;\n height: 36px;\n padding: 0 18px;\n font-size: 14px;\n font-weight: 400;\n }\n &.btn-size-s {\n min-width: 68px;\n height: 26px;\n padding: 0 20px;\n font-size: 13px;\n font-weight: 400;\n }\n :hover {\n color: #2879ff;\n border-color: #2879ff;\n }\n :disabled {\n cursor: not-allowed;\n background-color: #f0f2f5;\n color: #a4acb9;\n border: none;\n :hover {\n border: none;\n color: #bfc7d5;\n opacity: 1;\n background-color: #f0f2f5;\n }\n }\n"])));
|
|
16
|
+
var DefaultWrapper = _styledComponents["default"].button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: inline-flex;\n\n align-items: center;\n justify-content: center;\n color: #6f7886;\n cursor: pointer;\n outline: none;\n transition: color 0.3s ease, border 0.3s ease;\n background: transparent;\n border-radius: 3px;\n border: 1px solid #e9ecf0;\n &.btn-size-m {\n min-width: 90px;\n height: 36px;\n border-radius: 18px;\n padding: 0 18px;\n font-size: 14px;\n font-weight: 400;\n }\n &.btn-size-s {\n min-width: 68px;\n height: 26px;\n padding: 0 20px;\n font-size: 13px;\n font-weight: 400;\n }\n :hover {\n color: #2879ff;\n border-color: #2879ff;\n }\n :disabled {\n cursor: not-allowed;\n background-color: #f0f2f5;\n color: #a4acb9;\n border: none;\n :hover {\n border: none;\n color: #bfc7d5;\n opacity: 1;\n background-color: #f0f2f5;\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.DefaultWrapper = DefaultWrapper;
|
|
19
19
|
var PrimaryWrapper = (0, _styledComponents["default"])(DefaultWrapper)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: #ffffff;\n background: #2879ff;\n border: none;\n :hover {\n color: #ffffff;\n background-color: #5c8eff;\n border: none;\n }\n"])));
|
|
@@ -52,9 +52,12 @@ function PeriodSelector(_ref) {
|
|
|
52
52
|
onChange = _ref.onChange,
|
|
53
53
|
getPopupContainer = _ref.getPopupContainer,
|
|
54
54
|
selected = _ref.selected,
|
|
55
|
+
lastSelected = _ref.lastSelected,
|
|
55
56
|
selectorClass = _ref.selectorClass,
|
|
56
57
|
_ref$showCustom = _ref.showCustom,
|
|
57
58
|
showCustom = _ref$showCustom === void 0 ? true : _ref$showCustom,
|
|
59
|
+
_ref$isShowCustom = _ref.isShowCustom,
|
|
60
|
+
isShowCustom = _ref$isShowCustom === void 0 ? true : _ref$isShowCustom,
|
|
58
61
|
_ref$showFullCycle = _ref.showFullCycle,
|
|
59
62
|
showFullCycle = _ref$showFullCycle === void 0 ? true : _ref$showFullCycle,
|
|
60
63
|
_ref$showMonth = _ref.showMonth,
|
|
@@ -110,6 +113,8 @@ function PeriodSelector(_ref) {
|
|
|
110
113
|
(0, _react.useEffect)(function () {
|
|
111
114
|
if (selected) {
|
|
112
115
|
setSelectedPeriod(selected);
|
|
116
|
+
} else if (lastSelected) {
|
|
117
|
+
setSelectedPeriod(lastSelected);
|
|
113
118
|
}
|
|
114
119
|
}, []);
|
|
115
120
|
(0, _react.useEffect)(function () {
|
|
@@ -124,7 +129,7 @@ function PeriodSelector(_ref) {
|
|
|
124
129
|
|
|
125
130
|
if (selected) {
|
|
126
131
|
setSelectedPeriod(selected);
|
|
127
|
-
} else {
|
|
132
|
+
} else if (lastSelected) {} else {
|
|
128
133
|
setSelectedPeriod((0, _common.getDefalutCycle)(res.Data));
|
|
129
134
|
onChange && onChange((0, _common.getDefalutCycle)(res.Data));
|
|
130
135
|
}
|
|
@@ -143,7 +148,7 @@ function PeriodSelector(_ref) {
|
|
|
143
148
|
var popup = /*#__PURE__*/_react["default"].createElement(_selector["default"], {
|
|
144
149
|
className: selectorClass,
|
|
145
150
|
selected: selectedPeriod,
|
|
146
|
-
showCustom: isFetch ? cycleSetting.isOpenCustom : showCustom,
|
|
151
|
+
showCustom: isShowCustom ? isFetch ? cycleSetting.isOpenCustom : showCustom : isShowCustom,
|
|
147
152
|
showFullCycle: showFullCycle,
|
|
148
153
|
showMonth: isFetch ? cycleSetting.isOpenMonth : showMonth,
|
|
149
154
|
showQuarter: isFetch ? cycleSetting.isOpenQuarter : showQuarter,
|
|
@@ -13,6 +13,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
15
15
|
|
|
16
|
+
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
17
|
+
|
|
16
18
|
var _getLocale = require("../../utils/getLocale");
|
|
17
19
|
|
|
18
20
|
require("./index.css");
|
|
@@ -42,7 +44,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
42
44
|
onChangeSelect = props.onChangeSelect,
|
|
43
45
|
items = props.items,
|
|
44
46
|
_props$initText = props.initText,
|
|
45
|
-
initText = _props$initText === void 0 ? (0, _getLocale.getLocale)(
|
|
47
|
+
initText = _props$initText === void 0 ? (0, _getLocale.getLocale)('OKR_MyO_E_Temporarilynone') : _props$initText,
|
|
46
48
|
popupProps = props.popupProps,
|
|
47
49
|
renderPrefixIcon = props.renderPrefixIcon,
|
|
48
50
|
renderSuffixIcon = props.renderSuffixIcon,
|
|
@@ -82,13 +84,25 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
82
84
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
85
|
className: "select-layout__layer-select-wrapper"
|
|
84
86
|
}, items.map(function (item, index) {
|
|
87
|
+
if (item.toolText) return /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
88
|
+
placement: "top",
|
|
89
|
+
overlay: item.toolText
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
+
key: index,
|
|
92
|
+
onClick: function onClick(e) {
|
|
93
|
+
return handleSelectItem(item);
|
|
94
|
+
},
|
|
95
|
+
className: (0, _classnames["default"])('select-layout__layer-select-text', {
|
|
96
|
+
'select-layout__layer-select-text--active': selectItem && item.value === selectItem.value
|
|
97
|
+
})
|
|
98
|
+
}, item.label)));
|
|
85
99
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
100
|
key: index,
|
|
87
101
|
onClick: function onClick(e) {
|
|
88
102
|
return handleSelectItem(item);
|
|
89
103
|
},
|
|
90
|
-
className: (0, _classnames["default"])(
|
|
91
|
-
|
|
104
|
+
className: (0, _classnames["default"])('select-layout__layer-select-text', {
|
|
105
|
+
'select-layout__layer-select-text--active': selectItem && item.value === selectItem.value
|
|
92
106
|
})
|
|
93
107
|
}, item.label);
|
|
94
108
|
}));
|
|
@@ -113,9 +127,9 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
113
127
|
}
|
|
114
128
|
|
|
115
129
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
|
-
className: (0, _classnames["default"])(
|
|
117
|
-
|
|
118
|
-
|
|
130
|
+
className: (0, _classnames["default"])('select-layout__layer-text', {
|
|
131
|
+
'select-layout__layer-text--focus': visible && canEdit,
|
|
132
|
+
'select-layout__layer-text--hidden-border': !canEdit
|
|
119
133
|
}),
|
|
120
134
|
onClick: handleClickText
|
|
121
135
|
}, renderPrefixIcon && /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -136,7 +150,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
136
150
|
// @ts-ignore
|
|
137
151
|
_react["default"].createElement(_popup["default"], _extends({
|
|
138
152
|
popupVisible: visible,
|
|
139
|
-
action: [
|
|
153
|
+
action: ['click'],
|
|
140
154
|
destroyPopupOnHide: true,
|
|
141
155
|
popup: renderSelection,
|
|
142
156
|
mask: false,
|
|
@@ -144,7 +158,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
144
158
|
return popupRef.current;
|
|
145
159
|
},
|
|
146
160
|
popupStyle: {
|
|
147
|
-
width:
|
|
161
|
+
width: '100%'
|
|
148
162
|
}
|
|
149
163
|
}, popupProps, {
|
|
150
164
|
onPopupVisibleChange: function onPopupVisibleChange(visible) {
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.formatDateStr = void 0;
|
|
7
|
-
exports.formatPeriodPlanData = formatPeriodPlanData;
|
|
8
|
-
exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = void 0;
|
|
6
|
+
exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = exports.formatDateStr = void 0;
|
|
9
7
|
exports.momentDate = momentDate;
|
|
10
8
|
exports.workStatus = exports.timeFormat = exports.preCls = exports.okrStatus = void 0;
|
|
11
9
|
|
|
@@ -13,8 +11,6 @@ var _bsGlobal = require("../../utils/bs-global");
|
|
|
13
11
|
|
|
14
12
|
var _getLocale = require("../../utils/getLocale");
|
|
15
13
|
|
|
16
|
-
var _planDataJson = require("../../utils/planDataJson");
|
|
17
|
-
|
|
18
14
|
var preCls = "titaui-task-relation";
|
|
19
15
|
exports.preCls = preCls;
|
|
20
16
|
var isOpenOkrManage = (0, _bsGlobal.getAppHead)("113"); // 开通OKR
|
|
@@ -125,55 +121,4 @@ exports.workStatus = workStatus;
|
|
|
125
121
|
function momentDate(date) {
|
|
126
122
|
var reg = new RegExp('年|月|日', 'g');
|
|
127
123
|
return date.replace(reg, '/').slice(0, -1);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function formatPeriodPlanData(period) {
|
|
131
|
-
var planData; // 获取选取年份的 dataJSON
|
|
132
|
-
|
|
133
|
-
var yearGroup = (0, _planDataJson.PlanDataJson)().find(function (p) {
|
|
134
|
-
return p.GroupName == period.annualNum + '';
|
|
135
|
-
}); // 年份下的 ‘年/季’ data
|
|
136
|
-
|
|
137
|
-
var seasonData = yearGroup ? yearGroup.PlanTableListModels.find(function (item) {
|
|
138
|
-
return item.TagName == (0, _getLocale.getLocale)('Tasks_Menu_Yearseason');
|
|
139
|
-
}) : null;
|
|
140
|
-
|
|
141
|
-
switch (period.cycleType) {
|
|
142
|
-
// case '-1': // 全部周期
|
|
143
|
-
// break;
|
|
144
|
-
case '0':
|
|
145
|
-
planData = {
|
|
146
|
-
StartDate: period.startDate,
|
|
147
|
-
EndDate: period.endDate
|
|
148
|
-
};
|
|
149
|
-
break;
|
|
150
|
-
|
|
151
|
-
case '1':
|
|
152
|
-
// 年度
|
|
153
|
-
planData = seasonData ? seasonData.PlanTableModels[0] : null;
|
|
154
|
-
break;
|
|
155
|
-
|
|
156
|
-
case '2':
|
|
157
|
-
planData = seasonData ? seasonData.PlanTableModels[period.yqmNum] : null; // 季度
|
|
158
|
-
|
|
159
|
-
break;
|
|
160
|
-
|
|
161
|
-
case '3':
|
|
162
|
-
// @ts-ignore
|
|
163
|
-
var monthData = yearGroup ? yearGroup.PlanTableListModels.find(function (p) {
|
|
164
|
-
return p.TagName == period.yqmNum + '月';
|
|
165
|
-
}) : null;
|
|
166
|
-
planData = monthData ? monthData.PlanTableModels[0] : null;
|
|
167
|
-
break;
|
|
168
|
-
|
|
169
|
-
default:
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
return {
|
|
174
|
-
endDate: planData ? period.cycleType == '0' ? planData.EndDate : momentDate(planData.EndDate || '') : '',
|
|
175
|
-
planTableId: planData && planData.PlanTableId,
|
|
176
|
-
planTableType: planData && planData.PlanTableType,
|
|
177
|
-
startDate: planData ? period.cycleType == '0' ? planData.StartDate : momentDate(planData.StartDate || '') : ''
|
|
178
|
-
};
|
|
179
124
|
}
|
|
@@ -21,8 +21,6 @@ var _taskStatusSelect = _interopRequireDefault(require("../../search/task-status
|
|
|
21
21
|
|
|
22
22
|
var _taskRelation = _interopRequireDefault(require("../../search/task-relation"));
|
|
23
23
|
|
|
24
|
-
var _helper = require("../../helper");
|
|
25
|
-
|
|
26
24
|
var _formatTime = require("../../../../utils/format-time");
|
|
27
25
|
|
|
28
26
|
var _getLocale = require("../../../../utils/getLocale");
|
|
@@ -85,12 +83,11 @@ function SearchForm(props) {
|
|
|
85
83
|
|
|
86
84
|
var dilagRef = (0, _react.useRef)(document.createElement('div'));
|
|
87
85
|
(0, _react.useEffect)(function () {
|
|
88
|
-
var planCycle = (0, _helper.formatPeriodPlanData)(cycle);
|
|
89
86
|
onChange(_objectSpread({
|
|
90
87
|
status: status,
|
|
91
88
|
keyWords: keyWords,
|
|
92
89
|
relation: relation
|
|
93
|
-
},
|
|
90
|
+
}, cycle));
|
|
94
91
|
}, [status, keyWords, cycle, relation]);
|
|
95
92
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
93
|
ref: dilagRef
|
|
@@ -32,10 +32,6 @@ var planTableTask = function planTableTask(params, pageNum, pageSize) {
|
|
|
32
32
|
keyWords = _params$keyWords === void 0 ? '' : _params$keyWords,
|
|
33
33
|
_params$status = params.status,
|
|
34
34
|
status = _params$status === void 0 ? 10 : _params$status,
|
|
35
|
-
_params$planTableId = params.planTableId,
|
|
36
|
-
planTableId = _params$planTableId === void 0 ? '' : _params$planTableId,
|
|
37
|
-
_params$planTableType = params.planTableType,
|
|
38
|
-
planTableType = _params$planTableType === void 0 ? '' : _params$planTableType,
|
|
39
35
|
_params$relation = params.relation,
|
|
40
36
|
relation = _params$relation === void 0 ? 0 : _params$relation;
|
|
41
37
|
|
|
@@ -54,8 +50,8 @@ var planTableTask = function planTableTask(params, pageNum, pageSize) {
|
|
|
54
50
|
EndDate: endDate,
|
|
55
51
|
startNum: pageNum,
|
|
56
52
|
count: pageSize,
|
|
57
|
-
planTableId: planTableId,
|
|
58
|
-
planTableType: planTableType,
|
|
53
|
+
// planTableId: planTableId,
|
|
54
|
+
// planTableType: planTableType,
|
|
59
55
|
fromLevel: 1,
|
|
60
56
|
toLevel: 1,
|
|
61
57
|
RelationType: relation,
|
|
@@ -90,7 +90,9 @@ var workData = function workData(params, pageNum, pageSize) {
|
|
|
90
90
|
status = _params$status === void 0 ? 0 : _params$status,
|
|
91
91
|
_params$relation = params.relation,
|
|
92
92
|
relation = _params$relation === void 0 ? 0 : _params$relation,
|
|
93
|
-
userIds = params.userIds
|
|
93
|
+
userIds = params.userIds,
|
|
94
|
+
_params$isGetMileston = params.isGetMilestone,
|
|
95
|
+
isGetMilestone = _params$isGetMileston === void 0 ? false : _params$isGetMileston;
|
|
94
96
|
var url = "work/list?toUserId=".concat(userIds || (0, _helpers.getLoginUserInfo)().Id);
|
|
95
97
|
return (0, _request.rpost)("v1")(url, {
|
|
96
98
|
keyWords: keyWords,
|
|
@@ -99,7 +101,8 @@ var workData = function workData(params, pageNum, pageSize) {
|
|
|
99
101
|
pageSize: pageSize,
|
|
100
102
|
relation: relation,
|
|
101
103
|
status: status,
|
|
102
|
-
userIds: userIds
|
|
104
|
+
userIds: userIds,
|
|
105
|
+
isGetMilestone: isGetMilestone
|
|
103
106
|
}).then(function (res) {
|
|
104
107
|
return res;
|
|
105
108
|
});
|