@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.
Files changed (135) hide show
  1. package/lib/components/change-okr-modal/Item.js +24 -27
  2. package/lib/components/create-okr-modal/fields/index.css +1 -1
  3. package/lib/components/dialog-confirm/index.css +8 -3
  4. package/lib/components/dialog-confirm/index.js +17 -15
  5. package/lib/components/drawer/index.css +1 -1
  6. package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +2 -4
  7. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +2 -4
  8. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +2 -4
  9. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +2 -4
  10. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +2 -4
  11. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +1 -3
  12. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +2 -4
  13. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +2 -4
  14. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +2 -4
  15. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +2 -4
  16. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +2 -4
  17. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +2 -4
  18. package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +2 -4
  19. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +2 -3
  20. package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +2 -4
  21. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +2 -4
  22. package/lib/components/dynamic/dynamic-topping/index.css +1 -1
  23. package/lib/components/grid-layout/okr-align/index.js +1 -1
  24. package/lib/components/grid-layout/okr-progress/index.js +1 -1
  25. package/lib/components/menus/components/menu-tree/index.css +2 -2
  26. package/lib/components/menus/export-modules/okr-menus/depart-menus/index.css +1 -1
  27. package/lib/components/okr-detail/base-info/base-info.js +14 -13
  28. package/lib/components/okr-detail/base-info/o-desc/index.css +1 -1
  29. package/lib/components/okr-detail/components/header/index.css +4 -0
  30. package/lib/components/okr-detail/components/header/index.js +7 -3
  31. package/lib/components/okr-detail/components/header/o-score.js +163 -0
  32. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +1 -1
  33. package/lib/components/okr-detail/components/okr-tree/tree-node/index.css +1 -1
  34. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +1 -1
  35. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +5 -2
  36. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +10 -2
  37. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +6 -6
  38. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.css +1 -1
  39. package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.css +1 -1
  40. package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.css +1 -1
  41. package/lib/components/okr-detail/detail-footer/index.css +1 -1
  42. package/lib/components/okr-detail/e-list/search-form/fields/index.css +1 -0
  43. package/lib/components/okr-detail/okr-list/index.css +2 -2
  44. package/lib/components/okr-detail/request-apis.js +11 -2
  45. package/lib/components/okr-progress-modal/helper.js +2 -2
  46. package/lib/components/okr-progress-modal/index.css +2 -2
  47. package/lib/components/okrcase-library/index.css +1 -1
  48. package/lib/components/pagination/select.css +1 -1
  49. package/lib/components/search-dropdown/index.css +1 -1
  50. package/lib/components/switch/index.css +1 -1
  51. package/lib/components/tabs/index.css +1 -1
  52. package/lib/components/tita-chart/charts/pie.js +3 -1
  53. package/lib/components/tooltip/tooltip-text/index.js +6 -5
  54. package/lib/components/user-selector/export-modules/duties-selector/index.js +69 -10
  55. package/lib/components/user-selector/request-apis.js +11 -2
  56. package/lib/components/version-change-modal/index.css +1 -1
  57. package/lib/components/weekly-report/index.css +1 -1
  58. package/lib/components-v1/confirm/index.js +1 -1
  59. package/lib/components-v1/dropDownSelector/styles/index.js +1 -1
  60. package/lib/pages/appointment-demo/index.css +1 -1
  61. package/lib/pages/group-management/page-view/importGroupStaff/index.css +2 -2
  62. package/lib/pages/okr-map/export-modules/okr-map/header/index.css +1 -1
  63. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +1 -1
  64. package/lib/pages/personal-info/components/base-info/index.js +8 -6
  65. package/lib/pages/personal-info/components/edit-base-info/index.js +26 -22
  66. package/lib/utils/i18n-front-translate.js +18 -0
  67. package/package.json +1 -1
  68. package/src/components/change-okr-modal/Item.tsx +9 -3
  69. package/src/components/create-okr-modal/fields/index.scss +1 -1
  70. package/src/components/dialog-confirm/index.js +95 -58
  71. package/src/components/dialog-confirm/index.scss +16 -12
  72. package/src/components/drawer/index.scss +1 -1
  73. package/src/components/dynamic/dynamic-item/dynamic-align/index.scss +2 -4
  74. package/src/components/dynamic/dynamic-item/dynamic-announcement/index.scss +2 -4
  75. package/src/components/dynamic/dynamic-item/dynamic-assessment/index.scss +2 -4
  76. package/src/components/dynamic/dynamic-item/dynamic-create-o/index.scss +2 -4
  77. package/src/components/dynamic/dynamic-item/dynamic-kr/index.scss +2 -4
  78. package/src/components/dynamic/dynamic-item/dynamic-milestone/index.scss +1 -3
  79. package/src/components/dynamic/dynamic-item/dynamic-okrs-communication/index.scss +2 -4
  80. package/src/components/dynamic/dynamic-item/dynamic-plan-communication/index.scss +2 -4
  81. package/src/components/dynamic/dynamic-item/dynamic-progress/index.scss +2 -4
  82. package/src/components/dynamic/dynamic-item/dynamic-project/index.scss +2 -4
  83. package/src/components/dynamic/dynamic-item/dynamic-relative/index.scss +2 -4
  84. package/src/components/dynamic/dynamic-item/dynamic-replay/index.scss +2 -4
  85. package/src/components/dynamic/dynamic-item/dynamic-report/index.scss +2 -4
  86. package/src/components/dynamic/dynamic-item/dynamic-reward/index.scss +2 -3
  87. package/src/components/dynamic/dynamic-item/dynamic-share/index.scss +2 -4
  88. package/src/components/dynamic/dynamic-item/dynamic-task/index.scss +2 -4
  89. package/src/components/dynamic/dynamic-topping/index.scss +1 -1
  90. package/src/components/form/form-fields/input/index.tsx +1 -1
  91. package/src/components/form/form-fields/textarea/index.tsx +2 -1
  92. package/src/components/grid-layout/okr-align/index.tsx +1 -1
  93. package/src/components/grid-layout/okr-progress/index.tsx +1 -1
  94. package/src/components/menus/components/menu-tree/index.scss +2 -2
  95. package/src/components/menus/export-modules/okr-menus/depart-menus/index.scss +1 -1
  96. package/src/components/okr-detail/base-info/base-info.tsx +39 -27
  97. package/src/components/okr-detail/base-info/o-desc/index.scss +1 -1
  98. package/src/components/okr-detail/components/header/index.js +4 -3
  99. package/src/components/okr-detail/components/header/index.scss +5 -0
  100. package/src/components/okr-detail/components/header/o-score.tsx +115 -0
  101. package/src/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +1 -1
  102. package/src/components/okr-detail/components/okr-tree/tree-node/index.scss +1 -1
  103. package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/index.scss +1 -1
  104. package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.tsx +2 -2
  105. package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.tsx +3 -3
  106. package/src/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +2 -6
  107. package/src/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.scss +1 -1
  108. package/src/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.scss +1 -1
  109. package/src/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.scss +1 -1
  110. package/src/components/okr-detail/detail-footer/index.scss +1 -1
  111. package/src/components/okr-detail/e-list/search-form/fields/index.scss +1 -0
  112. package/src/components/okr-detail/okr-list/index.scss +1 -1
  113. package/src/components/okr-detail/request-apis.ts +7 -0
  114. package/src/components/okr-progress-modal/helper.js +2 -2
  115. package/src/components/okr-progress-modal/index.scss +2 -2
  116. package/src/components/okrcase-library/index.scss +1 -1
  117. package/src/components/pagination/select.scss +1 -1
  118. package/src/components/search-dropdown/index.scss +1 -1
  119. package/src/components/switch/index.scss +1 -1
  120. package/src/components/tabs/index.scss +1 -1
  121. package/src/components/tita-chart/charts/pie.tsx +2 -1
  122. package/src/components/tooltip/tooltip-text/index.tsx +8 -6
  123. package/src/components/user-selector/export-modules/duties-selector/index.tsx +78 -18
  124. package/src/components/user-selector/request-apis.js +7 -0
  125. package/src/components/version-change-modal/index.scss +1 -1
  126. package/src/components/weekly-report/index.scss +1 -1
  127. package/src/components-v1/confirm/index.tsx +0 -1
  128. package/src/components-v1/dropDownSelector/styles/index.tsx +1 -1
  129. package/src/pages/appointment-demo/index.scss +1 -1
  130. package/src/pages/group-management/page-view/importGroupStaff/index.scss +2 -2
  131. package/src/pages/okr-map/export-modules/okr-map/header/index.scss +1 -1
  132. package/src/pages/okr-map/export-modules/share-okr-page/header/index.scss +1 -1
  133. package/src/pages/personal-info/components/base-info/index.tsx +42 -21
  134. package/src/pages/personal-info/components/edit-base-info/index.tsx +151 -141
  135. 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 = decodeURI(encodeURI(okrInfo.description)) === 'null' ? '' : decodeURI(encodeURI(okrInfo.description));
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('Mod_Successfuloperat'), { canClose: false });
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('Mod_Successfuloperat'), { canClose: false });
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('Mod_Successfuloperat'), { canClose: false });
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('Mod_Successfuloperat'), { canClose: false });
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('Pro_detail_Deletsuccess'), { canClose: false });
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
- 确定删除此{delUserType === 1 ? "参与" : getLocale('OKR_MyO_Butt_Follow')}人吗?
380
+ 确定删除此
381
+ {delUserType === 1 ? "参与" : getLocale("OKR_MyO_Butt_Follow")}人吗?
375
382
  </span>
376
383
  <CancelButton type="button" onClick={cancelDelPerson}>
377
- {getLocale('Mod_Cancel')}
384
+ {getLocale("Mod_Cancel")}
378
385
  </CancelButton>
379
386
  <WarningButton type="button" onClick={ensureDelPerson}>
380
- {getLocale('Mod_Delete')}
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">{getLocale('Mod_Participants')}</span>
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
- <div className="base-info__person-block">
432
- {!canEditFocusPerson &&
433
- !canEditAllInfo &&
434
- setting.TargetFollowers &&
435
- followers.length === 0 ? null : (
436
- <>
437
- <span className="base-info__person-block-title">{getLocale('Mod_Followers')}</span>
438
- <Person
439
- type="followers"
440
- users={followers}
441
- canEdit={canEditFocusPerson}
442
- onAddUser={handleAddUser}
443
- onDelUser={handleDelFollower}
444
- />
445
- </>
446
- )}
447
- </div>
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>
@@ -6,7 +6,7 @@
6
6
  .o-desc__title {
7
7
  margin-top: 12px;
8
8
  font-size: 14px;
9
- font-weight: 500;
9
+ font-weight: 600;
10
10
  color: #141C28;
11
11
  line-height: 22px;
12
12
  padding-left: 10px;
@@ -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 "../score";
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} />
@@ -163,3 +163,8 @@ $lignt-color: #2879ff;
163
163
  width: auto!important;
164
164
  }
165
165
  }
166
+ .okr-detail-o-score{
167
+ &__form{
168
+ padding: 10px 32px 8px;
169
+ }
170
+ }
@@ -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;
@@ -88,7 +88,7 @@ export default (props) => {
88
88
  setTimeout(refreshEList, 2000);
89
89
  })
90
90
  .catch((e) => {
91
- Toast.Error(e.errorMsg, { canClose: false });
91
+ Toast.Error(e, { canClose: false });
92
92
  });
93
93
  } else {
94
94
  window
@@ -11,7 +11,7 @@
11
11
  height: 22px;
12
12
  font-size: 14px;
13
13
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
14
- font-weight: 500;
14
+ font-weight: 600;
15
15
  color: #a4acb9;
16
16
  line-height: 22px;
17
17
  }
@@ -90,7 +90,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
90
90
  margin-left: 8px;
91
91
  font-size: 14px;
92
92
  font-family: $font-family;
93
- font-weight: 500;
93
+ font-weight: 600;
94
94
  color: #3f4755;
95
95
  line-height: 22px;
96
96
  vertical-align: top;
@@ -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' ? undefined : { position: 'relative', top: '3px' }}>{inputName}</InputName>
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')}
@@ -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: 297px;
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: 297px;
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: 500;
99
+ font-weight: 600;
100
100
  color: #3f4755;
101
101
  line-height: 22px;
102
102
  vertical-align: top;
@@ -7,7 +7,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
7
7
  height: 22px;
8
8
  font-size: 14px;
9
9
  font-family: PingFangSC-Medium, PingFang SC;
10
- font-weight: 500;
10
+ font-weight: 600;
11
11
  color: #3f4755;
12
12
  line-height: 22px;
13
13
  }
@@ -6,7 +6,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
6
6
  height: 22px;
7
7
  font-size: 14px;
8
8
  font-family: $font-family;
9
- font-weight: 500;
9
+ font-weight: 600;
10
10
  color: #3f4755;
11
11
  line-height: 22px;
12
12
  }
@@ -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 3px;
24
+ padding: 18px 32px 20px;
25
25
  z-index: 11;
26
26
  .okr-detail-reply-to-user {
27
27
  // height: ${(p: any) => p.height};
@@ -8,6 +8,7 @@
8
8
 
9
9
  &-text {
10
10
  display: inline-block;
11
+ margin-right: 20px;
11
12
  }
12
13
 
13
14
  &-o {
@@ -4,7 +4,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
4
4
  height: 22px;
5
5
  font-size: 14px;
6
6
  font-family: $font-family;
7
- font-weight: 500;
7
+ font-weight: 600;
8
8
  color: #a4acb9;
9
9
  line-height: 22px;
10
10
  }
@@ -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(`子目标完成度${childOkrProgress}${getLocale('OKR_MyO_Pop_Upd_Percentage')}`);
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(`子目标完成度${childOkrProgress}${getLocale('OKR_MyO_Pop_Upd_Percentage')}`);
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: 500;
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: #BFC7D5 !important;
31
+ color: #A4ACB9 !important;
32
32
  }
33
33
  }
34
34
  &__suffix {
@@ -559,7 +559,7 @@
559
559
  &__head {
560
560
  margin-top: 46px;
561
561
  font-size: 26px;
562
- font-weight: 500;
562
+ font-weight: 600;
563
563
  color: #141c28;
564
564
  }
565
565
  &__detail {
@@ -279,7 +279,7 @@
279
279
  left: unset !important;
280
280
  height: 22px;
281
281
  font-size: 16px;
282
- font-weight: 500;
282
+ font-weight: 600;
283
283
  line-height: 22px;
284
284
  color: #3f4755;
285
285
  }
@@ -42,7 +42,7 @@
42
42
  left: unset !important;
43
43
  height: 22px;
44
44
  font-size: 16px;
45
- font-weight: 500;
45
+ font-weight: 600;
46
46
  line-height: 22px;
47
47
  color: #3f4755;
48
48
  }
@@ -5,7 +5,7 @@
5
5
  vertical-align: bottom;
6
6
  margin-right: 8px;
7
7
  font-size: 16px;
8
- font-weight: 500;
8
+ font-weight: 600;
9
9
  color: #3F4755;
10
10
  line-height: 22px;
11
11
  }
@@ -4,7 +4,7 @@
4
4
  &--big {
5
5
  div.rc-tabs-tab-btn {
6
6
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
7
- font-weight: 500;
7
+ font-weight: 600;
8
8
  color: #89919f;
9
9
  margin-bottom: 8px;
10
10
  }
@@ -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={!!overlayText?overlayText:text}
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}`}>{text}</span>
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