@titaui/pc 1.9.18 → 1.9.22
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/Item.js +24 -27
- package/lib/components/create-okr-modal/fields/index.css +1 -1
- package/lib/components/dialog-confirm/index.css +8 -3
- package/lib/components/dialog-confirm/index.js +17 -15
- package/lib/components/drawer/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +1 -3
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +2 -3
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +2 -4
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +2 -4
- package/lib/components/dynamic/dynamic-topping/index.css +1 -1
- package/lib/components/grid-layout/okr-align/index.js +1 -1
- package/lib/components/grid-layout/okr-progress/index.js +1 -1
- package/lib/components/menus/components/menu-tree/index.css +2 -2
- package/lib/components/menus/export-modules/okr-menus/depart-menus/index.css +1 -1
- package/lib/components/okr-detail/base-info/base-info.js +14 -13
- package/lib/components/okr-detail/base-info/o-desc/index.css +1 -1
- package/lib/components/okr-detail/components/header/index.css +4 -0
- package/lib/components/okr-detail/components/header/index.js +7 -3
- package/lib/components/okr-detail/components/header/o-score.js +163 -0
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/index.css +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +5 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +10 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +6 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.css +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.css +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.css +1 -1
- package/lib/components/okr-detail/detail-footer/index.css +1 -1
- package/lib/components/okr-detail/e-list/search-form/fields/index.css +1 -0
- package/lib/components/okr-detail/okr-list/index.css +2 -2
- package/lib/components/okr-detail/request-apis.js +11 -2
- package/lib/components/okr-progress-modal/helper.js +2 -2
- package/lib/components/okr-progress-modal/index.css +2 -2
- package/lib/components/okrcase-library/index.css +1 -1
- package/lib/components/pagination/select.css +1 -1
- package/lib/components/search-dropdown/index.css +1 -1
- package/lib/components/switch/index.css +1 -1
- package/lib/components/tabs/index.css +1 -1
- package/lib/components/tita-chart/charts/pie.js +3 -1
- package/lib/components/tooltip/tooltip-text/index.js +6 -5
- package/lib/components/user-selector/export-modules/duties-selector/index.js +69 -10
- package/lib/components/user-selector/request-apis.js +11 -2
- package/lib/components/version-change-modal/index.css +1 -1
- package/lib/components/weekly-report/index.css +1 -1
- package/lib/components-v1/confirm/index.js +1 -1
- package/lib/components-v1/dropDownSelector/styles/index.js +1 -1
- package/lib/pages/appointment-demo/index.css +1 -1
- package/lib/pages/group-management/page-view/importGroupStaff/index.css +2 -2
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +1 -1
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +1 -1
- package/lib/pages/personal-info/components/base-info/index.js +8 -6
- package/lib/pages/personal-info/components/edit-base-info/index.js +26 -22
- package/lib/utils/i18n-front-translate.js +18 -0
- package/package.json +1 -1
- package/src/components/change-okr-modal/Item.tsx +9 -3
- package/src/components/create-okr-modal/fields/index.scss +1 -1
- package/src/components/dialog-confirm/index.js +95 -58
- package/src/components/dialog-confirm/index.scss +16 -12
- package/src/components/drawer/index.scss +1 -1
- package/src/components/dynamic/dynamic-item/dynamic-align/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-announcement/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-assessment/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-create-o/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-kr/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-milestone/index.scss +1 -3
- package/src/components/dynamic/dynamic-item/dynamic-okrs-communication/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-plan-communication/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-progress/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-project/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-relative/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-replay/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-report/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-reward/index.scss +2 -3
- package/src/components/dynamic/dynamic-item/dynamic-share/index.scss +2 -4
- package/src/components/dynamic/dynamic-item/dynamic-task/index.scss +2 -4
- package/src/components/dynamic/dynamic-topping/index.scss +1 -1
- package/src/components/form/form-fields/input/index.tsx +1 -1
- package/src/components/form/form-fields/textarea/index.tsx +2 -1
- package/src/components/grid-layout/okr-align/index.tsx +1 -1
- package/src/components/grid-layout/okr-progress/index.tsx +1 -1
- package/src/components/menus/components/menu-tree/index.scss +2 -2
- package/src/components/menus/export-modules/okr-menus/depart-menus/index.scss +1 -1
- package/src/components/okr-detail/base-info/base-info.tsx +39 -27
- package/src/components/okr-detail/base-info/o-desc/index.scss +1 -1
- package/src/components/okr-detail/components/header/index.js +4 -3
- package/src/components/okr-detail/components/header/index.scss +5 -0
- package/src/components/okr-detail/components/header/o-score.tsx +115 -0
- package/src/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +1 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/index.scss +1 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/index.scss +1 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.tsx +2 -2
- package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.tsx +3 -3
- package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +2 -6
- package/src/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.scss +1 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.scss +1 -1
- package/src/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.scss +1 -1
- package/src/components/okr-detail/detail-footer/index.scss +1 -1
- package/src/components/okr-detail/e-list/search-form/fields/index.scss +1 -0
- package/src/components/okr-detail/okr-list/index.scss +1 -1
- package/src/components/okr-detail/request-apis.ts +7 -0
- package/src/components/okr-progress-modal/helper.js +2 -2
- package/src/components/okr-progress-modal/index.scss +2 -2
- package/src/components/okrcase-library/index.scss +1 -1
- package/src/components/pagination/select.scss +1 -1
- package/src/components/search-dropdown/index.scss +1 -1
- package/src/components/switch/index.scss +1 -1
- package/src/components/tabs/index.scss +1 -1
- package/src/components/tita-chart/charts/pie.tsx +2 -1
- package/src/components/tooltip/tooltip-text/index.tsx +8 -6
- package/src/components/user-selector/export-modules/duties-selector/index.tsx +78 -18
- package/src/components/user-selector/request-apis.js +7 -0
- package/src/components/version-change-modal/index.scss +1 -1
- package/src/components/weekly-report/index.scss +1 -1
- package/src/components-v1/confirm/index.tsx +0 -1
- package/src/components-v1/dropDownSelector/styles/index.tsx +1 -1
- package/src/pages/appointment-demo/index.scss +1 -1
- package/src/pages/group-management/page-view/importGroupStaff/index.scss +2 -2
- package/src/pages/okr-map/export-modules/okr-map/header/index.scss +1 -1
- package/src/pages/okr-map/export-modules/share-okr-page/header/index.scss +1 -1
- package/src/pages/personal-info/components/base-info/index.tsx +42 -21
- package/src/pages/personal-info/components/edit-base-info/index.tsx +151 -141
- package/src/utils/i18n-front-translate.ts +8 -0
|
@@ -58,7 +58,10 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
58
58
|
|
|
59
59
|
const { okrInfo, setOkrInfo } = useContext(CommonContext);
|
|
60
60
|
|
|
61
|
-
const originDesc =
|
|
61
|
+
const originDesc =
|
|
62
|
+
decodeURI(encodeURI(okrInfo.description)) === "null"
|
|
63
|
+
? ""
|
|
64
|
+
: decodeURI(encodeURI(okrInfo.description));
|
|
62
65
|
const [originalDesc, setOriginalDesc] = useState(originDesc || "");
|
|
63
66
|
const [participant, setParticipant] = useState<IUser[]>([]);
|
|
64
67
|
const [followers, setFollowers] = useState<IUser[]>([]);
|
|
@@ -82,6 +85,7 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
82
85
|
const oldGeneralRoleTypeRef = useRef(generalRoleType);
|
|
83
86
|
const loginUser = getUserInfo();
|
|
84
87
|
const setting = getOkrAdvancedSetting().KRSetting;
|
|
88
|
+
console.log(setting.TargetFollowers);
|
|
85
89
|
|
|
86
90
|
useEffect(() => {
|
|
87
91
|
setOriginalDesc(okrInfo.description);
|
|
@@ -92,7 +96,7 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
92
96
|
if (desc.trim().length > 5000) return;
|
|
93
97
|
saveODesc(okrInfo.workId, desc).then((resp) => {
|
|
94
98
|
if (resp.Code === 1) {
|
|
95
|
-
Toast.Success(getLocale(
|
|
99
|
+
Toast.Success(getLocale("Mod_Successfuloperat"), { canClose: false });
|
|
96
100
|
setOkrInfo({ ...okrInfo, description: desc });
|
|
97
101
|
} else {
|
|
98
102
|
Toast.Error("操作失败", { canClose: false });
|
|
@@ -106,7 +110,7 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
106
110
|
(user) => {
|
|
107
111
|
transferPrincipal(okrInfo.workId, user.email, user.id).then((resp) => {
|
|
108
112
|
if (resp.Code === 1) {
|
|
109
|
-
Toast.Success(getLocale(
|
|
113
|
+
Toast.Success(getLocale("Mod_Successfuloperat"), { canClose: false });
|
|
110
114
|
let tempParticipant = [...participant];
|
|
111
115
|
// 当前登录的是有权限的人,将负责人转为参与人或者关注人中的一个
|
|
112
116
|
const isParticipantIndex = findUserIndex(tempParticipant, user.id);
|
|
@@ -144,7 +148,7 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
144
148
|
const handleChangeClassify = useCallback((classify) => {
|
|
145
149
|
updateOClassify(classify, okrInfo.workId).then((resp) => {
|
|
146
150
|
if (resp.Code === 1) {
|
|
147
|
-
Toast.Success(getLocale(
|
|
151
|
+
Toast.Success(getLocale("Mod_Successfuloperat"), { canClose: false });
|
|
148
152
|
setGeneralOkrClassify(classify);
|
|
149
153
|
} else {
|
|
150
154
|
Toast.Error(resp.Message, { canClose: false });
|
|
@@ -170,7 +174,7 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
170
174
|
areaGroupIds
|
|
171
175
|
).then((resp) => {
|
|
172
176
|
if (resp.Code === 1) {
|
|
173
|
-
Toast.Success(getLocale(
|
|
177
|
+
Toast.Success(getLocale("Mod_Successfuloperat"), { canClose: false });
|
|
174
178
|
setGeneralVisibility({
|
|
175
179
|
visibility: visiableValue,
|
|
176
180
|
visibilityScope: data,
|
|
@@ -287,7 +291,9 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
287
291
|
deleteUser(delUser.id, okrInfo.workId, delUserType === 1 ? 2 : 3)
|
|
288
292
|
.then((resp) => {
|
|
289
293
|
if (resp.Code === 1) {
|
|
290
|
-
Toast.Success(getLocale(
|
|
294
|
+
Toast.Success(getLocale("Pro_detail_Deletsuccess"), {
|
|
295
|
+
canClose: false,
|
|
296
|
+
});
|
|
291
297
|
setGeneralRoleType(delUser.id === loginUser.Id ? 0 : generalRoleType);
|
|
292
298
|
if (delUserType === 1) {
|
|
293
299
|
participant.splice(userIndex, 1);
|
|
@@ -371,13 +377,14 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
371
377
|
<DialogConfirm visible={showDialogConfirm} type="warning">
|
|
372
378
|
{/* @ts-ignore */}
|
|
373
379
|
<span type="title">
|
|
374
|
-
确定删除此
|
|
380
|
+
确定删除此
|
|
381
|
+
{delUserType === 1 ? "参与" : getLocale("OKR_MyO_Butt_Follow")}人吗?
|
|
375
382
|
</span>
|
|
376
383
|
<CancelButton type="button" onClick={cancelDelPerson}>
|
|
377
|
-
{getLocale(
|
|
384
|
+
{getLocale("Mod_Cancel")}
|
|
378
385
|
</CancelButton>
|
|
379
386
|
<WarningButton type="button" onClick={ensureDelPerson}>
|
|
380
|
-
{getLocale(
|
|
387
|
+
{getLocale("Mod_Delete")}
|
|
381
388
|
</WarningButton>
|
|
382
389
|
</DialogConfirm>
|
|
383
390
|
);
|
|
@@ -418,7 +425,9 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
418
425
|
!canEditAllInfo &&
|
|
419
426
|
participant.length === 0 ? null : (
|
|
420
427
|
<>
|
|
421
|
-
<span className="base-info__person-block-title">
|
|
428
|
+
<span className="base-info__person-block-title">
|
|
429
|
+
{getLocale("Mod_Participants")}
|
|
430
|
+
</span>
|
|
422
431
|
<Person
|
|
423
432
|
users={participant}
|
|
424
433
|
canEdit={canEditPerson}
|
|
@@ -428,23 +437,26 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
428
437
|
</>
|
|
429
438
|
)}
|
|
430
439
|
</div>
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
440
|
+
{setting.TargetFollowers && (
|
|
441
|
+
<div className="base-info__person-block">
|
|
442
|
+
{!canEditFocusPerson &&
|
|
443
|
+
!canEditAllInfo &&
|
|
444
|
+
followers.length === 0 ? null : (
|
|
445
|
+
<>
|
|
446
|
+
<span className="base-info__person-block-title">
|
|
447
|
+
{getLocale("Mod_Followers")}
|
|
448
|
+
</span>
|
|
449
|
+
<Person
|
|
450
|
+
type="followers"
|
|
451
|
+
users={followers}
|
|
452
|
+
canEdit={canEditFocusPerson}
|
|
453
|
+
onAddUser={handleAddUser}
|
|
454
|
+
onDelUser={handleDelFollower}
|
|
455
|
+
/>
|
|
456
|
+
</>
|
|
457
|
+
)}
|
|
458
|
+
</div>
|
|
459
|
+
)}
|
|
448
460
|
</div>
|
|
449
461
|
{renderDialogConfirm}
|
|
450
462
|
</div>
|
|
@@ -7,7 +7,7 @@ import OAvatar from "./o-avatar";
|
|
|
7
7
|
import OType from "../okr-type";
|
|
8
8
|
import OCycle from "./o-cycle";
|
|
9
9
|
import EditNameCmp from "./edit-name";
|
|
10
|
-
import Score from "
|
|
10
|
+
import Score from "./o-score";
|
|
11
11
|
import Progress from "../../../progress";
|
|
12
12
|
import { OkrRiskMapping } from "../../../progress/utils";
|
|
13
13
|
|
|
@@ -34,7 +34,7 @@ const Header = (props) => {
|
|
|
34
34
|
setGeneralOkrClassify,
|
|
35
35
|
showOkrEvalute,
|
|
36
36
|
} = useContext(GeneralDataContext);
|
|
37
|
-
|
|
37
|
+
const showOScore = window.BSGlobal.OkrAdvancedSetting.KRSetting.OScore
|
|
38
38
|
const { progressGrow = 0, progress } = okrInfo;
|
|
39
39
|
|
|
40
40
|
const [auth, setAuth] = useState(false);
|
|
@@ -115,6 +115,7 @@ const Header = (props) => {
|
|
|
115
115
|
</span>
|
|
116
116
|
);
|
|
117
117
|
};
|
|
118
|
+
|
|
118
119
|
return (
|
|
119
120
|
<div className={precls} draggable={false}>
|
|
120
121
|
<div className={`${precls}__avatar`}>
|
|
@@ -148,7 +149,7 @@ const Header = (props) => {
|
|
|
148
149
|
<OCycle editable={editable} okrId={okrInfo.workId} />
|
|
149
150
|
</span>
|
|
150
151
|
<span className={`${precls}__action-item`}>
|
|
151
|
-
{showOkrEvalute && <Score score={okrInfo.evaluateValue} />}
|
|
152
|
+
{(showOkrEvalute || showOScore) && <Score editable={editable} okrId={okrInfo.workId} score={okrInfo.evaluateValue} isEvaluate={okrInfo.manualEvaluateValue||!!okrInfo.evaluateValue} />}
|
|
152
153
|
</span>
|
|
153
154
|
</span>
|
|
154
155
|
<OProgressUpdate okrInfo={okrInfo} renderContent={renderContent} />
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React, { Fragment, useState, useRef, useContext } from "react";
|
|
2
|
+
import { CommonContext } from "../../context";
|
|
3
|
+
import { getLocale } from "../../../../utils/getLocale";
|
|
4
|
+
import Score from "../score";
|
|
5
|
+
import Toast from "../../../toast";
|
|
6
|
+
import Dialog from "../../../dialog";
|
|
7
|
+
import Form from "../../../form";
|
|
8
|
+
import { updateOScore } from "../../request-apis";
|
|
9
|
+
import "./index.scss";
|
|
10
|
+
|
|
11
|
+
const FormFields = Form.Fields;
|
|
12
|
+
const preCls = "okr-detail-o-score";
|
|
13
|
+
|
|
14
|
+
interface IOScoreProps {
|
|
15
|
+
score: number;
|
|
16
|
+
okrId: string | number;
|
|
17
|
+
editable: any;
|
|
18
|
+
}
|
|
19
|
+
interface FormFields {
|
|
20
|
+
score: string | number;
|
|
21
|
+
describe: string;
|
|
22
|
+
}
|
|
23
|
+
const OScore = (props: IOScoreProps) => {
|
|
24
|
+
const { score, okrId, editable, ...restProps } = props;
|
|
25
|
+
const [visible, setVisible] = useState(false);
|
|
26
|
+
const { refreshAll } = useContext(CommonContext);
|
|
27
|
+
const [formFiedlsValue, setFormFiedlsValue] = useState<FormFields>({
|
|
28
|
+
score: score.toFixed(2),
|
|
29
|
+
describe: "",
|
|
30
|
+
});
|
|
31
|
+
const formContainerRef = useRef<any>();
|
|
32
|
+
const formRef = useRef<any>();
|
|
33
|
+
const changeOScore = () => {
|
|
34
|
+
setVisible(true);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const handleCancel = () => {
|
|
38
|
+
setVisible(false);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const handleOk = () => {
|
|
42
|
+
updateOScore(formFiedlsValue.score, okrId)
|
|
43
|
+
.then((res) => {
|
|
44
|
+
if (!!res.Code) {
|
|
45
|
+
Toast.Success(`${getLocale("OKR_MyO_Ew_Success")}`);
|
|
46
|
+
handleCancel();
|
|
47
|
+
refreshAll();
|
|
48
|
+
} else {
|
|
49
|
+
Toast.Error(res.Message || `${getLocale("OKR_MyO_Ew_Fail")}`);
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
.catch((err) => {
|
|
53
|
+
console.log(err);
|
|
54
|
+
Toast.Error(`${getLocale("OKR_MyO_Ew_Fail")}`);
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const onFieldsChangeHandler = (fields) => {
|
|
59
|
+
const newFields = { ...fields };
|
|
60
|
+
setFormFiedlsValue(newFields);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<Fragment>
|
|
65
|
+
<Score
|
|
66
|
+
editable={editable}
|
|
67
|
+
score={score}
|
|
68
|
+
onClick={changeOScore}
|
|
69
|
+
{...restProps}
|
|
70
|
+
/>
|
|
71
|
+
<Dialog
|
|
72
|
+
title={`O ${getLocale("Per_Ass_New_Appr_detail_Scor")}`}
|
|
73
|
+
visible={visible}
|
|
74
|
+
animation="slide-fade"
|
|
75
|
+
maskAnimation="fade"
|
|
76
|
+
destroyOnClose={true}
|
|
77
|
+
width={538}
|
|
78
|
+
onClose={handleCancel}
|
|
79
|
+
onOk={handleOk}
|
|
80
|
+
onCancel={handleCancel}
|
|
81
|
+
noHeadLine
|
|
82
|
+
noFooterLine
|
|
83
|
+
>
|
|
84
|
+
<div ref={formContainerRef} className={`${preCls}__form`}>
|
|
85
|
+
<Form
|
|
86
|
+
ref={formRef}
|
|
87
|
+
getFormContainer={() => formContainerRef.current}
|
|
88
|
+
onFieldsChange={onFieldsChangeHandler}
|
|
89
|
+
>
|
|
90
|
+
<FormFields.Input
|
|
91
|
+
name="score"
|
|
92
|
+
label={`${getLocale("Per_Ass_New_Appr_detail_Scor")}`}
|
|
93
|
+
className={`${preCls}__form-item`}
|
|
94
|
+
placeholder={`${getLocale("OKR_MyO_Ew_PleaEnterRat")}`}
|
|
95
|
+
value={formFiedlsValue.score}
|
|
96
|
+
require={true}
|
|
97
|
+
layout="row"
|
|
98
|
+
verifies={[
|
|
99
|
+
{
|
|
100
|
+
tip: `${getLocale("OKR_MyO_Ew_RatEmpty")}`,
|
|
101
|
+
test: /^[\s\S]+$/,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
tip: `${getLocale("OKR_MyO_KRP_Please0and1")}`,
|
|
105
|
+
test: /^(1|0(\.\d{1,2})?)$/,
|
|
106
|
+
},
|
|
107
|
+
]}
|
|
108
|
+
/>
|
|
109
|
+
</Form>
|
|
110
|
+
</div>
|
|
111
|
+
</Dialog>
|
|
112
|
+
</Fragment>
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
export default OScore;
|
package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react'
|
|
2
2
|
import Popup from '../../../../../../popup';
|
|
3
3
|
import styled from 'styled-components'
|
|
4
|
-
import { getLocale } from "../../../../../../../utils/getLocale";
|
|
4
|
+
import { getLocale, isEn } from "../../../../../../../utils/getLocale";
|
|
5
5
|
|
|
6
6
|
const Wrapper = styled.div`
|
|
7
7
|
min-width: 343px;
|
|
@@ -207,7 +207,7 @@ export default class EditPop extends PureComponent<Props> {
|
|
|
207
207
|
</Header>
|
|
208
208
|
<Body>
|
|
209
209
|
<Line>
|
|
210
|
-
<InputName style={type == 'line' ?
|
|
210
|
+
<InputName style={type == 'line' ? {width: isEn ? '75px' : '30px'} : { position: 'relative', top: '3px' ,width: isEn ? '75px' : '30px'}}>{inputName}</InputName>
|
|
211
211
|
{
|
|
212
212
|
type == 'line' &&
|
|
213
213
|
<LineInputWrapper style={showError ? { borderColor: '#D0021B' } : undefined}>
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
AvatarWrapper,
|
|
18
18
|
IconEdit
|
|
19
19
|
} from './style';
|
|
20
|
-
import { getLocale } from "../../../../../../../utils/getLocale";
|
|
20
|
+
import { getLocale, isEn } from "../../../../../../../utils/getLocale";
|
|
21
21
|
|
|
22
22
|
interface Props {
|
|
23
23
|
setRefInParent: Function
|
|
@@ -219,7 +219,7 @@ export default class Score extends PureComponent<Props, State> {
|
|
|
219
219
|
information: (this.state.showScoreInfoError ?
|
|
220
220
|
|
|
221
221
|
<ScoreInfoWrapperError data-length={`已输入 ${this.state.areaLength} 个字,最多可输入 1000 个字`}>
|
|
222
|
-
<ScoreInfoSpanText>{getLocale('OKR_MyO_Description')}</ScoreInfoSpanText>
|
|
222
|
+
<ScoreInfoSpanText style={{minWidth: isEn ? '75px' : '30px'}}>{getLocale('OKR_MyO_Description')}</ScoreInfoSpanText>
|
|
223
223
|
<ScoreInfoSpanTextareaError
|
|
224
224
|
ref={this.state.scoreInfoErrorRef}
|
|
225
225
|
placeholder={getLocale('OKR_MyO_scoredescription')}
|
|
@@ -227,7 +227,7 @@ export default class Score extends PureComponent<Props, State> {
|
|
|
227
227
|
value={htmlDecodeByRegExp(this.state.scoreInfoText)} />
|
|
228
228
|
</ScoreInfoWrapperError> :
|
|
229
229
|
<ScoreInfoWrapper>
|
|
230
|
-
<ScoreInfoSpanText>{getLocale('OKR_MyO_Description')}</ScoreInfoSpanText>
|
|
230
|
+
<ScoreInfoSpanText style={{minWidth: isEn ? '75px' : '30px'}}>{getLocale('OKR_MyO_Description')}</ScoreInfoSpanText>
|
|
231
231
|
<ScoreInfoSpanTextarea
|
|
232
232
|
ref={this.state.scoreInfoRef}
|
|
233
233
|
placeholder={getLocale('OKR_MyO_scoredescription')}
|
package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js
CHANGED
|
@@ -17,14 +17,12 @@ export const ExtraWrapper = styled.div`
|
|
|
17
17
|
新增评分弹层的div --start
|
|
18
18
|
*/
|
|
19
19
|
export const ScoreInfoWrapper = styled.div`
|
|
20
|
-
width: 312px;
|
|
21
20
|
height: 75px;
|
|
22
21
|
display: flex;
|
|
23
22
|
margin-bottom: 20px;
|
|
24
23
|
`;
|
|
25
24
|
|
|
26
25
|
export const ScoreInfoWrapperError = styled.div`
|
|
27
|
-
width: 312px;
|
|
28
26
|
height: 75px;
|
|
29
27
|
display: flex;
|
|
30
28
|
margin-bottom: 20px;
|
|
@@ -43,14 +41,13 @@ export const ScoreInfoWrapperError = styled.div`
|
|
|
43
41
|
export const ScoreInfoSpanText = styled.span`
|
|
44
42
|
width: 30px;
|
|
45
43
|
height: 20px;
|
|
46
|
-
font-family: PingFangSC-Regular;
|
|
47
44
|
font-size: 14px;
|
|
48
45
|
color: #83898F;
|
|
49
46
|
margin-right: 4px;
|
|
50
47
|
`;
|
|
51
48
|
|
|
52
49
|
export const ScoreInfoSpanTextarea = styled.textarea`
|
|
53
|
-
width:
|
|
50
|
+
width: 100%;
|
|
54
51
|
box-sizing: border-box;
|
|
55
52
|
padding: 1px 7px;
|
|
56
53
|
border: 1px solid #F0F2F5;
|
|
@@ -60,7 +57,7 @@ export const ScoreInfoSpanTextarea = styled.textarea`
|
|
|
60
57
|
`;
|
|
61
58
|
|
|
62
59
|
export const ScoreInfoSpanTextareaError = styled.textarea`
|
|
63
|
-
width:
|
|
60
|
+
width: 100%;
|
|
64
61
|
box-sizing: border-box;
|
|
65
62
|
padding: 1px 7px;
|
|
66
63
|
border: 1px solid #F0F2F5;
|
|
@@ -74,7 +71,6 @@ export const ScoreInfoSpanTextareaError = styled.textarea`
|
|
|
74
71
|
新增评分弹层的div --end
|
|
75
72
|
*/
|
|
76
73
|
export const CallSomeoneSpan = styled.span`
|
|
77
|
-
font-family: PingFangSC-Regular;
|
|
78
74
|
font-size: 14px;
|
|
79
75
|
color: #83898F;
|
|
80
76
|
padding-right: 15px;
|
|
@@ -96,7 +96,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
96
96
|
margin-left: 8px;
|
|
97
97
|
font-size: 14px;
|
|
98
98
|
font-family: $font-family;
|
|
99
|
-
font-weight:
|
|
99
|
+
font-weight: 600;
|
|
100
100
|
color: #3f4755;
|
|
101
101
|
line-height: 22px;
|
|
102
102
|
vertical-align: top;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
.okr-detail-drawer-bottom-mblog-wrapper {
|
|
22
22
|
background: #FFFFFF;
|
|
23
23
|
box-shadow: 0px -2px 8px 0px rgba(127, 145, 180, 0.15);
|
|
24
|
-
padding: 18px 32px
|
|
24
|
+
padding: 18px 32px 20px;
|
|
25
25
|
z-index: 11;
|
|
26
26
|
.okr-detail-reply-to-user {
|
|
27
27
|
// height: ${(p: any) => p.height};
|
|
@@ -414,3 +414,10 @@ export const updateChildOkrWeight = (data: { OkrId: number, Weight: number }[])
|
|
|
414
414
|
"transformRequest": qs.stringify,
|
|
415
415
|
})
|
|
416
416
|
}
|
|
417
|
+
|
|
418
|
+
export const updateOScore = (score,workId) => {
|
|
419
|
+
return rpost('v2')('work/score', {
|
|
420
|
+
manualScore: score,
|
|
421
|
+
workId:workId
|
|
422
|
+
})
|
|
423
|
+
}
|
|
@@ -25,7 +25,7 @@ export const getO_SETTING = () => {
|
|
|
25
25
|
const { childOkrProgress, childkrProgress } = recommandProgressObj;
|
|
26
26
|
const textArr = [];
|
|
27
27
|
childkrProgress !== -1 && textArr.push(`${getLocale('OKR_MyO_Pop_Upd_KRCom')}${childkrProgress}${getLocale('OKR_MyO_Pop_Upd_Percentage')}`);
|
|
28
|
-
childOkrProgress !== -1 && textArr.push(
|
|
28
|
+
childOkrProgress !== -1 && textArr.push(`${getLocale('OKR_MyO_Ew_SubobjCom')}${childOkrProgress}${getLocale('OKR_MyO_Pop_Upd_Percentage')}`);
|
|
29
29
|
if (textArr.length == 0) return '';
|
|
30
30
|
return (
|
|
31
31
|
<Fragment>
|
|
@@ -62,7 +62,7 @@ export const getKR_SETTING = () => {
|
|
|
62
62
|
const { childOkrProgress, childEProgress } = recommandProgressObj;
|
|
63
63
|
const textArr = [];
|
|
64
64
|
childEProgress !== -1 && textArr.push(`${getLocale('OKR_MyO_Ecompletion')}${childEProgress}${getLocale('OKR_MyO_Pop_Upd_Percentage')}`);
|
|
65
|
-
childOkrProgress !== -1 && textArr.push(
|
|
65
|
+
childOkrProgress !== -1 && textArr.push(`${getLocale('OKR_MyO_Ew_SubobjCom')}${childOkrProgress}${getLocale('OKR_MyO_Pop_Upd_Percentage')}`);
|
|
66
66
|
if (textArr.length == 0) return '';
|
|
67
67
|
return (
|
|
68
68
|
<Fragment>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
margin-bottom: 0;
|
|
6
6
|
margin-right: 16px;
|
|
7
7
|
font-size: 14px;
|
|
8
|
-
font-weight:
|
|
8
|
+
font-weight: 600;
|
|
9
9
|
line-height: 20px;
|
|
10
10
|
color: #3f4755;
|
|
11
11
|
text-align: right;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
border-color: #E9ECF0;
|
|
29
29
|
}
|
|
30
30
|
input {
|
|
31
|
-
color: #
|
|
31
|
+
color: #A4ACB9 !important;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
&__suffix {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PieChart from '../plots/pie';
|
|
3
|
+
import { getLocale } from '../../../utils/getLocale';
|
|
3
4
|
|
|
4
5
|
interface Props {
|
|
5
6
|
size?: React.CSSProperties;//容器样式
|
|
@@ -71,7 +72,7 @@ export default function TitaPieChart(props: Props) {
|
|
|
71
72
|
fontSize: '12px'
|
|
72
73
|
},
|
|
73
74
|
offsetY: -10,
|
|
74
|
-
content: '
|
|
75
|
+
content: getLocale('HP_Onumber')
|
|
75
76
|
},
|
|
76
77
|
content: {
|
|
77
78
|
style: {
|
|
@@ -11,18 +11,18 @@ interface ITooltipTextProps {
|
|
|
11
11
|
minusWidth?: number;
|
|
12
12
|
overlayClassName?: string;
|
|
13
13
|
mouseEnterDelay?: number;
|
|
14
|
-
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
const TooltipText: FC<ITooltipTextProps> = ({
|
|
18
17
|
text,
|
|
19
|
-
overlayText="",
|
|
18
|
+
overlayText = "",
|
|
20
19
|
maxWidth = 0,
|
|
21
20
|
exClass,
|
|
22
21
|
isPercent = false,
|
|
23
22
|
minusWidth = 0,
|
|
24
23
|
overlayClassName = "",
|
|
25
24
|
mouseEnterDelay = 0,
|
|
25
|
+
children,
|
|
26
26
|
}) => {
|
|
27
27
|
const [hasTooltip, setHasTooltip] = useState(false);
|
|
28
28
|
const domRef = useRef<any>();
|
|
@@ -59,7 +59,7 @@ const TooltipText: FC<ITooltipTextProps> = ({
|
|
|
59
59
|
{hasTooltip && (
|
|
60
60
|
<Tooltip
|
|
61
61
|
overlayClassName={overlayClassName}
|
|
62
|
-
overlay={
|
|
62
|
+
overlay={overlayText ? overlayText : text}
|
|
63
63
|
placement="top"
|
|
64
64
|
mouseEnterDelay={mouseEnterDelay}
|
|
65
65
|
>
|
|
@@ -69,18 +69,20 @@ const TooltipText: FC<ITooltipTextProps> = ({
|
|
|
69
69
|
maxWidth: isPercent ? `calc(100% - ${minusWidth}px)` : maxWidth,
|
|
70
70
|
}}
|
|
71
71
|
>
|
|
72
|
-
{text}
|
|
72
|
+
{children ? children : text}
|
|
73
73
|
</span>
|
|
74
74
|
</Tooltip>
|
|
75
75
|
)}
|
|
76
76
|
{!hasTooltip && (
|
|
77
|
-
<span className={`tooltip-text-wrapper ${exClass}`}>
|
|
77
|
+
<span className={`tooltip-text-wrapper ${exClass}`}>
|
|
78
|
+
{children ? children : text}
|
|
79
|
+
</span>
|
|
78
80
|
)}
|
|
79
81
|
<span
|
|
80
82
|
className={`tooltip-text-wrapper tooltip-text-wrapper--hidden ${exClass}`}
|
|
81
83
|
ref={domRef}
|
|
82
84
|
>
|
|
83
|
-
{text}
|
|
85
|
+
{children ? children : text}
|
|
84
86
|
</span>
|
|
85
87
|
{isPercent && (
|
|
86
88
|
<span
|