@titaui/pc 1.9.76 → 1.9.77
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/.eslintrc.js +6 -4
- package/lib/components/change-okr-modal/Filter.js +1 -1
- package/lib/components/change-okr-modal/Item.js +1 -1
- package/lib/components/change-okr-modal/filterTab.js +1 -1
- package/lib/components/change-okr-modal/index.js +1 -1
- package/lib/components/communication/CommunicationAttachments.js +1 -1
- package/lib/components/communication/ConvertUserName.js +1 -1
- package/lib/components/communication/index.js +1 -1
- package/lib/components/create-okr-modal/objectType.js +1 -1
- package/lib/components/date-picker/BodyItem.js +1 -1
- package/lib/components/date-picker/CalendarBody.js +1 -1
- package/lib/components/date-picker/CalendarHeader.js +1 -1
- package/lib/components/date-picker/index.js +1 -1
- package/lib/components/date-range-picker/index.js +1 -1
- package/lib/components/delete-confirm-pop/ConfirmPop.js +1 -1
- package/lib/components/eReport/eReportListEmpty.js +1 -1
- package/lib/components/eReport/eReportLists/reportList.js +1 -1
- package/lib/components/eReport/eReportShare/index.js +1 -1
- package/lib/components/eReport/eReportShare/toast/index.js +1 -1
- package/lib/components/edit-kr-wight/EditKrWightModal.js +1 -1
- package/lib/components/edit-kr-wight/FormItemV2.js +1 -1
- package/lib/components/emotions-selector/selector-content.js +1 -1
- package/lib/components/emotions-selector/selector-pop.js +1 -1
- package/lib/components/ereport-list/index.js +1 -1
- package/lib/components/error-boundary/index.js +1 -1
- package/lib/components/mblog/components/ConfirmPop.js +1 -1
- package/lib/components/mblog/components/MblogAction.js +1 -1
- package/lib/components/mblog/components/MblogContent.js +1 -1
- package/lib/components/mblog/index.js +1 -1
- package/lib/components/mblog/style.js +2 -2
- package/lib/components/okr-detail/auth.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +1 -1
- package/lib/components/okr-detail/detail-header/confirm.js +2 -1
- package/lib/components/okr-detail/detail-header/index.js +13 -10
- package/lib/components/okr-progress-modal/helper.js +59 -45
- package/lib/components/okr-progress-modal/index.js +19 -14
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
- package/lib/components/okr-review/ReviewPop/components/Toast/index.js +1 -1
- package/lib/components/okr-review/ReviewPop/index.js +1 -1
- package/lib/components/okr-review/components/ReviewItem/index.js +1 -1
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +1 -1
- package/lib/components/okr-review/index.js +1 -1
- package/lib/components/okr-share/index.js +7 -2
- package/lib/components/operation-records/OperationRecordItem.js +1 -1
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/period-selector/common.js +18 -10
- package/lib/components/point-demo/input/index.js +1 -1
- package/lib/components/praise-record/PraiseRecordItem.js +1 -1
- package/lib/components/praise-record/index.js +1 -1
- package/lib/components/range-picker-pop/index.js +1 -1
- package/lib/components/range-selector-pop/RangeList.js +1 -1
- package/lib/components/range-selector-pop/RangeSelectorPop.js +1 -1
- package/lib/components/select/Option.js +1 -1
- package/lib/components/select/index.js +1 -1
- package/lib/components/tita-chart/errorBoundary/index.js +1 -1
- package/lib/components/upload/components/uploadedPreview.js +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/viewer/ImageListRender.js +1 -1
- package/lib/components/viewer/index.js +1 -1
- package/lib/components-v1/animate/AnimateChild.js +1 -1
- package/lib/components-v1/animate/animate.js +1 -1
- package/lib/components-v1/avatar/index.js +1 -1
- package/lib/components-v1/buttonv2/ButtonOutlined.js +1 -1
- package/lib/components-v1/buttonv2/ButtonRounded.js +1 -1
- package/lib/components-v1/buttonv2/DefaultButton.js +1 -1
- package/lib/components-v1/confirm/index.js +1 -1
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +1 -1
- package/lib/components-v1/dropDownSelector/dropDownSelector.js +1 -1
- package/lib/components-v1/input/Input.js +1 -1
- package/lib/components-v1/input/InputNumber.js +1 -1
- package/lib/components-v1/placement/placement.js +1 -1
- package/lib/components-v1/placement/placementInner.js +1 -1
- package/lib/components-v1/pop/Pop.js +1 -1
- package/lib/components-v1/pop/PopInner.js +1 -1
- package/lib/components-v1/portals/Portals.js +1 -1
- package/lib/components-v1/progress/CircleProgress.js +1 -1
- package/lib/components-v1/progress/LineProgress.js +1 -1
- package/lib/components-v1/progress/index.js +1 -1
- package/lib/components-v1/radio/radio.js +1 -1
- package/lib/components-v1/radio/radioGroup.js +1 -1
- package/lib/components-v1/search/index.js +1 -1
- package/lib/components-v1/select/Option.js +1 -1
- package/lib/components-v1/select/index.js +1 -1
- package/lib/components-v1/tabs/index.js +1 -1
- package/lib/components-v1/textarea/index.js +1 -1
- package/lib/components-v1/transition/index.js +1 -1
- package/lib/components-v1/userSelector/UserSelectorPop.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/index.js +1 -1
- package/lib/components-v1/userSelector/components/SearchBar.js +1 -1
- package/lib/components-v1/userSelector/components/SingleMode.js +1 -1
- package/lib/components-v1/userSelector/components/UserItem.js +1 -1
- package/lib/components-v1/userSelector/index.js +1 -1
- package/lib/pages/appointment-demo/input/index.js +1 -1
- package/lib/pages/group-management/components/input-form/index.js +1 -1
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +12 -11
- package/lib/utils/auth.js +1 -1
- package/package.json +2 -1
- package/src/components/mblog/style.ts +4 -5
- package/src/components/okr-detail/detail-header/confirm.tsx +1 -1
- package/src/components/okr-detail/detail-header/index.tsx +19 -13
- package/src/components/okr-progress-modal/helper.js +49 -41
- package/src/components/okr-progress-modal/index.tsx +17 -16
- package/src/components/okr-share/index.tsx +9 -4
- package/src/components/period-selector/common.ts +16 -10
- package/src/pages/okr-map/export-modules/okr-map/header/index.scss +24 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.77",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
"react-content-loader": "^6.0.3",
|
|
117
117
|
"react-cropper": "^2.1.8",
|
|
118
118
|
"react-custom-scrollbars": "^4.2.1",
|
|
119
|
+
"react-dom": "^17.0.2",
|
|
119
120
|
"react-grid-layout": "^1.2.5",
|
|
120
121
|
"react-perfect-scrollbar": "^1.5.8",
|
|
121
122
|
"react-sizeme": "^3.0.1",
|
|
@@ -61,19 +61,18 @@ export const Textarea = styled.textarea`
|
|
|
61
61
|
word-break: break-all;
|
|
62
62
|
word-wrap: break-word;
|
|
63
63
|
height: 160px;
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
line-height: 22px;
|
|
64
66
|
|
|
65
67
|
&.textarea-setheight {
|
|
66
68
|
visibility: hidden;
|
|
67
69
|
position: absolute;
|
|
68
70
|
}
|
|
69
|
-
/*
|
|
70
|
-
&.private__bg {
|
|
71
|
-
background: url(${require("./assets/lock-radius.png")}) no-repeat right top;
|
|
72
|
-
} */
|
|
73
71
|
`;
|
|
74
72
|
|
|
75
73
|
export const Tips = styled.div`
|
|
76
|
-
|
|
74
|
+
font-size: 14px;
|
|
75
|
+
line-height: 22px;
|
|
77
76
|
color: ${(p: any) => p.color};
|
|
78
77
|
text-align: right;
|
|
79
78
|
`;
|
|
@@ -18,7 +18,7 @@ function OkrDetailHeaderConfirm({ onConfirm, title = "", content = "" }: Props):
|
|
|
18
18
|
}, []);
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<Confirm visible={visible} type="warning">
|
|
21
|
+
<Confirm visible={visible} type="warning" zIndex={2400}>
|
|
22
22
|
{
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
<span type="title">{title}</span>
|
|
@@ -71,13 +71,15 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
|
|
|
71
71
|
visibility: context.generalVisibility.visibility,
|
|
72
72
|
detailInfo,
|
|
73
73
|
openShareModal: async () => {
|
|
74
|
-
const
|
|
75
|
-
setKrs(
|
|
74
|
+
const krss = await getKrs({ okrId: detailInfo.workId });
|
|
75
|
+
setKrs(krss);
|
|
76
76
|
setShareVisible(true);
|
|
77
77
|
},
|
|
78
78
|
changeVisiblilty: (visibility) => {
|
|
79
|
-
if (visibility
|
|
80
|
-
|
|
79
|
+
if (visibility === 4) {
|
|
80
|
+
if (userSelectRef.current) {
|
|
81
|
+
userSelectRef.current.open();
|
|
82
|
+
}
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
85
|
changVisiblity(detailInfo.workId, visibility);
|
|
@@ -100,10 +102,11 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
|
|
|
100
102
|
: getLocale("OKR_MyO_Err_Progress"),
|
|
101
103
|
);
|
|
102
104
|
if (res) {
|
|
103
|
-
follow
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
if (follow) {
|
|
106
|
+
await addUser(loginUserId, detailInfo.workId, 3);
|
|
107
|
+
} else {
|
|
108
|
+
await deleteUser(loginUserId, detailInfo.workId, 3);
|
|
109
|
+
}
|
|
107
110
|
context.setGeneralRoleType(follow ? 3 : 0);
|
|
108
111
|
// 关注
|
|
109
112
|
Toast.Success(getLocale("Mod_Successfuloperat"));
|
|
@@ -117,9 +120,11 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
|
|
|
117
120
|
isFinish ? getLocale("OKR_MyO_Areycloseobjective") : getLocale("OKR_MyO_Err_Restart"),
|
|
118
121
|
);
|
|
119
122
|
if (res) {
|
|
120
|
-
isFinish
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
if (isFinish) {
|
|
124
|
+
await close(detailInfo.workId);
|
|
125
|
+
} else {
|
|
126
|
+
await start(detailInfo.workId);
|
|
127
|
+
}
|
|
123
128
|
commonContext.refreshAll();
|
|
124
129
|
// 刷新
|
|
125
130
|
Toast.Success(getLocale("Mod_Successfuloperat"));
|
|
@@ -172,7 +177,7 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
|
|
|
172
177
|
<span className="okr-detail-head-parent">
|
|
173
178
|
<i className="tu-icon-liebiao-duiqinubiao" />
|
|
174
179
|
<span
|
|
175
|
-
onClick={() => (parent.type
|
|
180
|
+
onClick={() => (parent.type === "okr"
|
|
176
181
|
? drawerManager.open("okrDetail", {
|
|
177
182
|
okrId: parent.id,
|
|
178
183
|
})
|
|
@@ -180,7 +185,7 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
|
|
|
180
185
|
krId: parent.id,
|
|
181
186
|
}))}
|
|
182
187
|
>
|
|
183
|
-
<span>{parent.type
|
|
188
|
+
<span>{parent.type === "okr" ? "O " : "KR "}</span>
|
|
184
189
|
{parent.name}
|
|
185
190
|
</span>
|
|
186
191
|
</span>
|
|
@@ -202,6 +207,7 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
|
|
|
202
207
|
},
|
|
203
208
|
},
|
|
204
209
|
}}
|
|
210
|
+
zIndex={2400}
|
|
205
211
|
/>
|
|
206
212
|
<PopConfirm
|
|
207
213
|
ref={popRef}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Fragment } from "react";
|
|
2
2
|
import { getLocale } from "../../utils/getLocale";
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const getOSetting = () => ({
|
|
5
5
|
settingTitle: getLocale("OKR_MyO_Pop_Upd_Setmatically"),
|
|
6
6
|
switchLabel: getLocale("OKR_MyO_Pop_Upd_Setmatically"),
|
|
7
7
|
options: [
|
|
@@ -16,31 +16,35 @@ export const getO_SETTING = () => ({
|
|
|
16
16
|
tooltip: getLocale("OKR_MyO_Pop_Upd_SubO"),
|
|
17
17
|
},
|
|
18
18
|
],
|
|
19
|
-
getRecommandText: (autoUpdate = true, updateWay = 1
|
|
19
|
+
getRecommandText: (recommandProgressObj, autoUpdate = true, updateWay = 1) => {
|
|
20
20
|
if (autoUpdate) {
|
|
21
|
-
if (updateWay
|
|
22
|
-
if (updateWay
|
|
23
|
-
|
|
24
|
-
const { childOkrProgress, childkrProgress } = recommandProgressObj;
|
|
25
|
-
const textArr = [];
|
|
26
|
-
childkrProgress !== -1 && textArr.push(`${getLocale("OKR_MyO_Pop_Upd_KRCom")}${childkrProgress}${getLocale("OKR_MyO_Pop_Upd_Percentage")}`);
|
|
27
|
-
childOkrProgress !== -1 && textArr.push(`${getLocale("OKR_MyO_Ew_SubobjCom")}${childOkrProgress}${getLocale("OKR_MyO_Pop_Upd_Percentage")}`);
|
|
28
|
-
if (textArr.length == 0) return "";
|
|
29
|
-
return (
|
|
30
|
-
<>
|
|
31
|
-
<span className="auto-update__recommand-icon">{getLocale("Per_Ass_Pop_title_Recommend")}</span>
|
|
32
|
-
<span className="auto-update__recommand-tip">
|
|
33
|
-
(
|
|
34
|
-
{textArr.join(",")}
|
|
35
|
-
)
|
|
36
|
-
</span>
|
|
37
|
-
</>
|
|
38
|
-
);
|
|
21
|
+
if (updateWay === 1) return <span className="auto-update__recommand-tip">{getLocale("OKR_MyO_Pop_Upd_Automatic")}</span>;
|
|
22
|
+
if (updateWay === 2) return <span className="auto-update__recommand-tip">{getLocale("OKR_MyO_calculationSubO")}</span>;
|
|
23
|
+
return <span />;
|
|
39
24
|
}
|
|
25
|
+
const { childOkrProgress, childkrProgress } = recommandProgressObj;
|
|
26
|
+
const textArr = [];
|
|
27
|
+
if (childkrProgress !== -1) {
|
|
28
|
+
textArr.push(`${getLocale("OKR_MyO_Pop_Upd_KRCom")}${childkrProgress}${getLocale("OKR_MyO_Pop_Upd_Percentage")}`);
|
|
29
|
+
}
|
|
30
|
+
if (childOkrProgress !== -1) {
|
|
31
|
+
textArr.push(`${getLocale("OKR_MyO_Ew_SubobjCom")}${childOkrProgress}${getLocale("OKR_MyO_Pop_Upd_Percentage")}`);
|
|
32
|
+
}
|
|
33
|
+
if (textArr.length === 0) return "";
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
<span className="auto-update__recommand-icon">{getLocale("Per_Ass_Pop_title_Recommend")}</span>
|
|
37
|
+
<span className="auto-update__recommand-tip">
|
|
38
|
+
(
|
|
39
|
+
{textArr.join(",")}
|
|
40
|
+
)
|
|
41
|
+
</span>
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
40
44
|
},
|
|
41
45
|
});
|
|
42
46
|
|
|
43
|
-
export const
|
|
47
|
+
export const getKrSetting = () => ({
|
|
44
48
|
settingTitle: getLocale("OKR_MyO_KRCompletion"),
|
|
45
49
|
switchLabel: getLocale("OKR_MyO_SetKRcompletion"),
|
|
46
50
|
options: [
|
|
@@ -55,31 +59,35 @@ export const getKR_SETTING = () => ({
|
|
|
55
59
|
tooltip: getLocale("OKR_MyO_KRcompletionde"),
|
|
56
60
|
},
|
|
57
61
|
],
|
|
58
|
-
getRecommandText: (autoUpdate = true, updateWay = 1
|
|
62
|
+
getRecommandText: (recommandProgressObj, autoUpdate = true, updateWay = 1) => {
|
|
59
63
|
if (autoUpdate) {
|
|
60
|
-
if (updateWay
|
|
61
|
-
if (updateWay
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<span className="auto-update__recommand-tip" style={{ marginLeft: 0 }}>
|
|
72
|
-
(
|
|
73
|
-
{textArr.join(",")}
|
|
74
|
-
)
|
|
75
|
-
</span>
|
|
76
|
-
</>
|
|
77
|
-
);
|
|
64
|
+
if (updateWay === 1) return <span className="auto-update__recommand-tip">{getLocale("OKR_MyO_Automatic")}</span>;
|
|
65
|
+
if (updateWay === 2) return <span className="auto-update__recommand-tip">{getLocale("OKR_MyO_calculationSubO")}</span>;
|
|
66
|
+
return <span />;
|
|
67
|
+
}
|
|
68
|
+
const { childOkrProgress, childEProgress } = recommandProgressObj;
|
|
69
|
+
const textArr = [];
|
|
70
|
+
if (childEProgress !== -1) {
|
|
71
|
+
textArr.push(`${getLocale("OKR_MyO_Ecompletion")}${childEProgress}${getLocale("OKR_MyO_Pop_Upd_Percentage")}`);
|
|
72
|
+
}
|
|
73
|
+
if (childOkrProgress !== -1) {
|
|
74
|
+
textArr.push(`${getLocale("OKR_MyO_Ew_SubobjCom")}${childOkrProgress}${getLocale("OKR_MyO_Pop_Upd_Percentage")}`);
|
|
78
75
|
}
|
|
76
|
+
if (textArr.length === 0) return "";
|
|
77
|
+
return (
|
|
78
|
+
<>
|
|
79
|
+
<span className="auto-update__recommand-icon">{getLocale("Per_Ass_Pop_title_Recommend")}</span>
|
|
80
|
+
<span className="auto-update__recommand-tip" style={{ marginLeft: 0 }}>
|
|
81
|
+
(
|
|
82
|
+
{textArr.join(",")}
|
|
83
|
+
)
|
|
84
|
+
</span>
|
|
85
|
+
</>
|
|
86
|
+
);
|
|
79
87
|
},
|
|
80
88
|
});
|
|
81
89
|
|
|
82
|
-
export const transProgress = (progress) => (progress
|
|
90
|
+
export const transProgress = (progress) => (progress === -1 ? 0 : progress);
|
|
83
91
|
|
|
84
92
|
export const getKrOptions = () => [
|
|
85
93
|
{
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
|
1
|
+
import React, { useEffect, useState, FC } from "react";
|
|
2
2
|
import { Input, Modal, Tooltip } from "tita-ui";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { getKrRecommandProgress, getORecommandProgress } from "./request-apis";
|
|
5
5
|
import Switch from "../switch";
|
|
6
6
|
import Textarea from "./textarea";
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
getOSetting, getKrSetting, transProgress, getKrOptions, getOptions,
|
|
9
9
|
} from "./helper";
|
|
10
10
|
import {
|
|
11
11
|
ErrorTip, List, Item, Icon, Options, OptionsWrapper,
|
|
@@ -15,12 +15,12 @@ import { getLocale } from "../../utils/getLocale";
|
|
|
15
15
|
import { inputWordTrans } from "../../utils/i18n-front-translate";
|
|
16
16
|
import "./index.scss";
|
|
17
17
|
|
|
18
|
-
const ProgressModal:
|
|
18
|
+
const ProgressModal: FC<IProgressModalProps> = (props:IProgressModalProps) => {
|
|
19
19
|
const {
|
|
20
20
|
maxLength, okrInfo, onClose, onOk, title = window.getLocale("OKR_MyO_Prog_Butt_Update"), visible, isKr,
|
|
21
21
|
} = props;
|
|
22
22
|
|
|
23
|
-
const configure = isKr ?
|
|
23
|
+
const configure = isKr ? getKrSetting() : getOSetting();
|
|
24
24
|
|
|
25
25
|
const reg = /^[0-9]*[1-9][0-9]*$/;
|
|
26
26
|
const [errorProgress, setErrorProgress] = useState(false);
|
|
@@ -34,10 +34,7 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
34
34
|
const [selected, setSelected] = useState<number>(
|
|
35
35
|
isKr ? okrInfo.riskLevel : okrInfo.manualRiskLevel,
|
|
36
36
|
);
|
|
37
|
-
const [ShowKrProgress] = useState(
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
window.BSGlobal.OkrAdvancedSetting.KRSetting.ShowKrProgress);
|
|
40
|
-
|
|
37
|
+
const [ShowKrProgress] = useState(window?.BSGlobal?.OkrAdvancedSetting?.KRSetting?.ShowKrProgress);
|
|
41
38
|
const [autoUpdate, setUpdate] = useState(true); // 设置自动更新
|
|
42
39
|
const [updateWay, setUpdateWay] = useState(0); // 自动更新方式 0: 关闭, 1: 根据关见成果, 2: 子目标
|
|
43
40
|
const [settingFolded, setSettingFold] = useState(false);
|
|
@@ -46,11 +43,11 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
46
43
|
const getRecommendProgress = async () => {
|
|
47
44
|
const getRecommandHandler = isKr ? getKrRecommandProgress : getORecommandProgress;
|
|
48
45
|
const data = await getRecommandHandler(isKr ? okrInfo.mileStoneId : okrInfo.workId);
|
|
49
|
-
if (data.Code
|
|
46
|
+
if (data.Code === 1) {
|
|
50
47
|
const { UpdateProgressWay, Progress } = data.Data;
|
|
51
48
|
setRecommandProgressObj(data.Data);
|
|
52
|
-
setUpdate(UpdateProgressWay
|
|
53
|
-
setUpdateWay(UpdateProgressWay
|
|
49
|
+
setUpdate(UpdateProgressWay !== 0);
|
|
50
|
+
setUpdateWay(UpdateProgressWay === 0 ? 1 : UpdateProgressWay);
|
|
54
51
|
setProgress(Progress);
|
|
55
52
|
}
|
|
56
53
|
};
|
|
@@ -66,9 +63,12 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
66
63
|
useEffect(() => {
|
|
67
64
|
if (!autoUpdate) return;
|
|
68
65
|
const { childOkrProgress, childkrProgress, childEProgress } = recommandProgressObj;
|
|
69
|
-
updateWay
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
if (updateWay === 1) {
|
|
67
|
+
setProgress(isKr ? transProgress(childEProgress) : transProgress(childkrProgress));
|
|
68
|
+
}
|
|
69
|
+
if (updateWay === 2) {
|
|
70
|
+
setProgress(transProgress(childOkrProgress));
|
|
71
|
+
}
|
|
72
72
|
}, [updateWay, autoUpdate, recommandProgressObj]);
|
|
73
73
|
|
|
74
74
|
let descriptionText = (
|
|
@@ -131,6 +131,7 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
131
131
|
title={title}
|
|
132
132
|
visible={visible}
|
|
133
133
|
width={600}
|
|
134
|
+
zIndex={2400}
|
|
134
135
|
>
|
|
135
136
|
<List>
|
|
136
137
|
<Item>
|
|
@@ -165,7 +166,7 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
165
166
|
<Icon
|
|
166
167
|
color={option.color}
|
|
167
168
|
className={
|
|
168
|
-
selected
|
|
169
|
+
selected === option.id ? "tu-icon-singlebox-avtive" : "tu-icon-singlebox-have"
|
|
169
170
|
}
|
|
170
171
|
/>
|
|
171
172
|
<p>{option.text}</p>
|
|
@@ -195,7 +196,7 @@ const ProgressModal: React.FC<IProgressModalProps> = (props) => {
|
|
|
195
196
|
<span
|
|
196
197
|
className={classNames(
|
|
197
198
|
"auto-update-setting__radio",
|
|
198
|
-
`auto-update-setting__radio${updateWay
|
|
199
|
+
`auto-update-setting__radio${updateWay === option.key ? "--selected" : ""
|
|
199
200
|
}`,
|
|
200
201
|
)}
|
|
201
202
|
/>
|
|
@@ -11,7 +11,7 @@ interface Props {
|
|
|
11
11
|
data: any;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const ShareContent =
|
|
14
|
+
const ShareContent = ({ closeModal, getModalRef, data }: Props) => {
|
|
15
15
|
const [shareImg, setShareImg] = useState<string>();
|
|
16
16
|
const [showPublish, setShowPublish] = useState(false);
|
|
17
17
|
return (
|
|
@@ -43,12 +43,14 @@ const ShareContent = function ({ closeModal, getModalRef, data }: Props) {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
interface ShareProps {
|
|
46
|
-
shareComponent
|
|
47
46
|
data: any;
|
|
48
47
|
visible:boolean;
|
|
48
|
+
zIndex?: number;
|
|
49
49
|
onClose: () => void
|
|
50
50
|
}
|
|
51
|
-
const OkrShare: React.FC<ShareProps> = ({
|
|
51
|
+
const OkrShare: React.FC<ShareProps> = ({
|
|
52
|
+
data, visible, onClose, zIndex,
|
|
53
|
+
}) => {
|
|
52
54
|
const modalRef = useRef<any>();
|
|
53
55
|
|
|
54
56
|
return (
|
|
@@ -60,6 +62,7 @@ const OkrShare: React.FC<ShareProps> = ({ data, visible, onClose }) => {
|
|
|
60
62
|
// maskClosable
|
|
61
63
|
onCancel={() => onClose()}
|
|
62
64
|
ref={modalRef}
|
|
65
|
+
zIndex={zIndex}
|
|
63
66
|
>
|
|
64
67
|
{visible ? (
|
|
65
68
|
<ShareContent
|
|
@@ -71,5 +74,7 @@ const OkrShare: React.FC<ShareProps> = ({ data, visible, onClose }) => {
|
|
|
71
74
|
</Modal>
|
|
72
75
|
);
|
|
73
76
|
};
|
|
74
|
-
|
|
77
|
+
OkrShare.defaultProps = {
|
|
78
|
+
zIndex: 1300,
|
|
79
|
+
};
|
|
75
80
|
export default OkrShare;
|
|
@@ -5,8 +5,8 @@ import { getMonth } from "../../utils/constant";
|
|
|
5
5
|
|
|
6
6
|
export const dealSelectedPeriodData = (period: string) => {
|
|
7
7
|
const option: any = {};
|
|
8
|
-
option.cycleType = period
|
|
9
|
-
option.yqmNum = period.substring(2)
|
|
8
|
+
option.cycleType = period === "-1" ? "-1" : period.substring(0, 1);
|
|
9
|
+
option.yqmNum = period.substring(2) === "" ? "0" : period.substring(2);
|
|
10
10
|
return option;
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -27,7 +27,7 @@ export const dealYearsRange = (
|
|
|
27
27
|
}
|
|
28
28
|
const startYear = yearsRange[0];
|
|
29
29
|
const endYear = yearsRange[yearsRange.length - 1];
|
|
30
|
-
for (let i = startYear; i <= endYear; i
|
|
30
|
+
for (let i = startYear; i <= endYear; i += 1) {
|
|
31
31
|
yearsData.push({
|
|
32
32
|
checked: false,
|
|
33
33
|
order: [`${i}`],
|
|
@@ -51,7 +51,7 @@ export const formatPeriod = (selected: SelectedInterface) => {
|
|
|
51
51
|
if (!selected) return "";
|
|
52
52
|
const quarter = ["", `${getLocale("OKR_MyO_Pop_1stQuarter")}`, `${getLocale("OKR_MyO_Pop_2ndQuarter")}`, `${getLocale("OKR_MyO_Pop_3rdQuarter")}`, `${getLocale("OKR_MyO_Pop_4thQuarter")}`];
|
|
53
53
|
let cycleDate = "";
|
|
54
|
-
const annualNum = selected.annualNum
|
|
54
|
+
const annualNum = selected.annualNum === "-1" ? `${getLocale("OKR_MyO_Butt_Allyears")}` : `${selected.annualNum}${isEn ? "" : "年"}`;
|
|
55
55
|
const month = getMonth();
|
|
56
56
|
switch (`${selected.cycleType}`) {
|
|
57
57
|
case "-1":
|
|
@@ -73,7 +73,7 @@ export const formatPeriod = (selected: SelectedInterface) => {
|
|
|
73
73
|
}`;
|
|
74
74
|
break;
|
|
75
75
|
case "5":
|
|
76
|
-
cycleDate = selected.yqmNum
|
|
76
|
+
cycleDate = selected.yqmNum === "1" ? `${getLocale("OKR_MyO_Pop_Firsthalf")}` : `${getLocale("OKR_MyO_Pop_Secondhalf")}`;
|
|
77
77
|
break;
|
|
78
78
|
default:
|
|
79
79
|
cycleDate = `${getLocale("Mod_Customization")}`;
|
|
@@ -88,9 +88,9 @@ export const computeYearIndex = (
|
|
|
88
88
|
) => {
|
|
89
89
|
let newIndex;
|
|
90
90
|
const currentYearIndex = yearsData.findIndex(
|
|
91
|
-
(item) => Number(item.title)
|
|
91
|
+
(item) => Number(item.title) === currentYear,
|
|
92
92
|
);
|
|
93
|
-
if (computeType
|
|
93
|
+
if (computeType === "add") {
|
|
94
94
|
newIndex = currentYearIndex + 1;
|
|
95
95
|
} else {
|
|
96
96
|
newIndex = currentYearIndex - 1;
|
|
@@ -112,6 +112,12 @@ export const getDateRangeByCycle = (cycle: ICycle, startMonth: number = 1) => {
|
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
switch (cycle.cycleType) {
|
|
115
|
+
case "-1": {
|
|
116
|
+
return {
|
|
117
|
+
startDate: "",
|
|
118
|
+
endDate: "",
|
|
119
|
+
};
|
|
120
|
+
}
|
|
115
121
|
case "1": {
|
|
116
122
|
const start = moment()
|
|
117
123
|
.year(Number(cycle.annualNum))
|
|
@@ -159,7 +165,7 @@ export const getDateRangeByCycle = (cycle: ICycle, startMonth: number = 1) => {
|
|
|
159
165
|
.year(Number(cycle.annualNum))
|
|
160
166
|
.month(startMonth - 1)
|
|
161
167
|
.date(1);
|
|
162
|
-
if (cycle.yqmNum
|
|
168
|
+
if (cycle.yqmNum === "2") start.add(6, "M");
|
|
163
169
|
return {
|
|
164
170
|
startDate: start.format("YYYY/MM/DD"),
|
|
165
171
|
endDate: start.add(5, "month").endOf("M").format("YYYY/MM/DD"),
|
|
@@ -210,8 +216,8 @@ export function getDefalutCycle(setting) {
|
|
|
210
216
|
};
|
|
211
217
|
} if (setting.isOpenBimonthly) {
|
|
212
218
|
let month = new Date().getMonth() + 1;
|
|
213
|
-
if (setting.yearStartMonth % 2
|
|
214
|
-
month -= (month % 2
|
|
219
|
+
if (setting.yearStartMonth % 2 === 1) {
|
|
220
|
+
month -= (month % 2 === 1 ? 0 : 1);
|
|
215
221
|
} else {
|
|
216
222
|
month = month - (month % 2) || 12;
|
|
217
223
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
$font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
1
|
+
$font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
2
|
+
sans-serif, PingFang SC, Microsoft YaHei;
|
|
2
3
|
|
|
3
4
|
.titapage-okr-map {
|
|
4
5
|
&__header {
|
|
@@ -6,7 +7,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
6
7
|
background: #ffffff;
|
|
7
8
|
box-shadow: 0px 0px 8px 0px #e9eef3;
|
|
8
9
|
position: relative;
|
|
9
|
-
border-bottom: 1px solid #
|
|
10
|
+
border-bottom: 1px solid #e9ecf0;
|
|
10
11
|
&__folded {
|
|
11
12
|
// top: -114px;
|
|
12
13
|
height: 0;
|
|
@@ -65,7 +66,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
65
66
|
vertical-align: middle;
|
|
66
67
|
}
|
|
67
68
|
&:hover {
|
|
68
|
-
color: #
|
|
69
|
+
color: #2879ff;
|
|
69
70
|
&:before {
|
|
70
71
|
background-image: url('../../../images/trigger-hover.svg');
|
|
71
72
|
}
|
|
@@ -103,11 +104,11 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
|
-
&-showkr
|
|
107
|
-
|
|
107
|
+
&-showkr,
|
|
108
|
+
&-level {
|
|
108
109
|
padding: 5px 20px;
|
|
109
110
|
&:hover {
|
|
110
|
-
background: #
|
|
111
|
+
background: #f7f8fa;
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
&--show-more {
|
|
@@ -119,21 +120,22 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
119
120
|
height: 30px;
|
|
120
121
|
line-height: 30px;
|
|
121
122
|
cursor: pointer;
|
|
122
|
-
color: #
|
|
123
|
+
color: #3f4755;
|
|
123
124
|
font-family: $font-family;
|
|
124
125
|
font-size: 12px;
|
|
125
126
|
&:after {
|
|
126
127
|
position: absolute;
|
|
127
128
|
display: inline-block;
|
|
128
|
-
background: url('../../../images/line-down-arrow.svg') transparent
|
|
129
|
-
|
|
129
|
+
background: url('../../../images/line-down-arrow.svg') transparent
|
|
130
|
+
no-repeat 50% 50%;
|
|
131
|
+
content: '';
|
|
130
132
|
height: 6px;
|
|
131
133
|
width: 10px;
|
|
132
134
|
right: 0;
|
|
133
135
|
top: calc(50% - 3px);
|
|
134
136
|
}
|
|
135
137
|
}
|
|
136
|
-
|
|
138
|
+
|
|
137
139
|
&-btns {
|
|
138
140
|
position: absolute;
|
|
139
141
|
vertical-align: middle;
|
|
@@ -145,22 +147,24 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
145
147
|
}
|
|
146
148
|
&__show-more-popup {
|
|
147
149
|
padding: 11px 0;
|
|
148
|
-
background: #
|
|
150
|
+
background: #ffffff;
|
|
149
151
|
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
150
|
-
border: 1px solid #
|
|
152
|
+
border: 1px solid #e9ecf0;
|
|
151
153
|
border-radius: 2px;
|
|
152
154
|
}
|
|
153
155
|
}
|
|
154
156
|
.titapage-okr-map__dark {
|
|
155
157
|
.titapage-okr-map__content-search {
|
|
156
158
|
&:before {
|
|
157
|
-
background: url(../../../images/line-down-arrow-dark.svg) transparent
|
|
159
|
+
background: url(../../../images/line-down-arrow-dark.svg) transparent
|
|
160
|
+
no-repeat 50% 50%;
|
|
158
161
|
background-size: 100%;
|
|
159
162
|
}
|
|
160
163
|
}
|
|
161
164
|
.tui-select-selector {
|
|
162
165
|
&:before {
|
|
163
|
-
background: url(../../../images/down-arrow-dark.svg) transparent no-repeat
|
|
166
|
+
background: url(../../../images/down-arrow-dark.svg) transparent no-repeat
|
|
167
|
+
50% 50%;
|
|
164
168
|
background-size: 100%;
|
|
165
169
|
}
|
|
166
170
|
}
|
|
@@ -212,7 +216,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
212
216
|
border: none;
|
|
213
217
|
color: #fff;
|
|
214
218
|
&:hover {
|
|
215
|
-
background: #
|
|
219
|
+
background: #5c8eff;
|
|
216
220
|
}
|
|
217
221
|
}
|
|
218
222
|
.titaui-period-selector__down-arrow {
|
|
@@ -242,7 +246,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
242
246
|
}
|
|
243
247
|
}
|
|
244
248
|
&:hover {
|
|
245
|
-
background-color: #
|
|
249
|
+
background-color: #515a69;
|
|
246
250
|
}
|
|
247
251
|
}
|
|
248
252
|
}
|
|
@@ -261,14 +265,14 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
261
265
|
top: 0;
|
|
262
266
|
bottom: 0;
|
|
263
267
|
}
|
|
264
|
-
.titapage-okr-map--kr-dialog{
|
|
268
|
+
.titapage-okr-map--kr-dialog {
|
|
265
269
|
&--title {
|
|
266
270
|
&:before {
|
|
267
271
|
display: inline-block;
|
|
268
272
|
content: 'i';
|
|
269
273
|
width: 16px;
|
|
270
274
|
height: 16px;
|
|
271
|
-
background-color: #
|
|
275
|
+
background-color: #ffbc00;
|
|
272
276
|
color: #fff;
|
|
273
277
|
text-align: center;
|
|
274
278
|
line-height: 16px;
|
|
@@ -281,8 +285,9 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
281
285
|
&--content {
|
|
282
286
|
font-size: 14px;
|
|
283
287
|
font-family: $font-family;
|
|
284
|
-
color: #
|
|
288
|
+
color: #6f7886;
|
|
285
289
|
line-height: 20px;
|
|
286
290
|
padding: 0 32px;
|
|
291
|
+
display: block;
|
|
287
292
|
}
|
|
288
293
|
}
|