@titaui/pc 1.9.75 → 1.9.80

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 (123) hide show
  1. package/.eslintrc.js +6 -4
  2. package/lib/components/change-okr-modal/Filter.js +1 -1
  3. package/lib/components/change-okr-modal/Item.js +27 -25
  4. package/lib/components/change-okr-modal/filterTab.js +1 -1
  5. package/lib/components/change-okr-modal/index.js +1 -1
  6. package/lib/components/change-okr-modal/styledComponents.js +5 -5
  7. package/lib/components/communication/CommunicationAttachments.js +1 -1
  8. package/lib/components/communication/ConvertUserName.js +1 -1
  9. package/lib/components/communication/index.js +1 -1
  10. package/lib/components/create-okr-modal/objectType.js +1 -1
  11. package/lib/components/date-picker/BodyItem.js +1 -1
  12. package/lib/components/date-picker/CalendarBody.js +1 -1
  13. package/lib/components/date-picker/CalendarHeader.js +1 -1
  14. package/lib/components/date-picker/index.js +1 -1
  15. package/lib/components/date-range-picker/index.js +1 -1
  16. package/lib/components/delete-confirm-pop/ConfirmPop.js +1 -1
  17. package/lib/components/eReport/eReportListEmpty.js +1 -1
  18. package/lib/components/eReport/eReportLists/reportList.js +1 -1
  19. package/lib/components/eReport/eReportShare/index.js +1 -1
  20. package/lib/components/eReport/eReportShare/toast/index.js +1 -1
  21. package/lib/components/edit-kr-wight/EditKrWightModal.js +1 -1
  22. package/lib/components/edit-kr-wight/FormItemV2.js +1 -1
  23. package/lib/components/emotions-selector/selector-content.js +1 -1
  24. package/lib/components/emotions-selector/selector-pop.js +1 -1
  25. package/lib/components/ereport-list/index.js +1 -1
  26. package/lib/components/error-boundary/index.js +1 -1
  27. package/lib/components/mblog/components/ConfirmPop.js +1 -1
  28. package/lib/components/mblog/components/MblogAction.js +1 -1
  29. package/lib/components/mblog/components/MblogContent.js +1 -1
  30. package/lib/components/mblog/index.js +1 -1
  31. package/lib/components/mblog/style.js +3 -3
  32. package/lib/components/okr-detail/auth.js +1 -1
  33. package/lib/components/okr-detail/components/base-okr-type/confirm/buttonv2.js +1 -1
  34. package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
  35. package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -1
  36. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +1 -1
  37. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/kr-push-score.js +1 -1
  38. package/lib/components/okr-detail/detail-header/confirm.js +2 -1
  39. package/lib/components/okr-detail/detail-header/index.js +13 -10
  40. package/lib/components/okr-progress-modal/helper.js +59 -45
  41. package/lib/components/okr-progress-modal/index.js +19 -14
  42. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
  43. package/lib/components/okr-review/ReviewPop/components/Toast/index.js +1 -1
  44. package/lib/components/okr-review/ReviewPop/index.js +1 -1
  45. package/lib/components/okr-review/components/ReviewItem/index.js +1 -1
  46. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +1 -1
  47. package/lib/components/okr-review/index.js +1 -1
  48. package/lib/components/okr-share/index.js +7 -2
  49. package/lib/components/okrcase-library/index.css +3 -1
  50. package/lib/components/operation-records/OperationRecordItem.js +1 -1
  51. package/lib/components/operation-records/index.js +1 -1
  52. package/lib/components/part-notice/index.js +6 -0
  53. package/lib/components/part-notice/not-allow-data.js +10 -0
  54. package/lib/components/period-selector/common.js +18 -10
  55. package/lib/components/point-demo/input/index.js +1 -1
  56. package/lib/components/praise-record/PraiseRecordItem.js +1 -1
  57. package/lib/components/praise-record/index.js +1 -1
  58. package/lib/components/range-picker-pop/index.js +1 -1
  59. package/lib/components/range-selector-pop/RangeList.js +1 -1
  60. package/lib/components/range-selector-pop/RangeSelectorPop.js +1 -1
  61. package/lib/components/select/Option.js +1 -1
  62. package/lib/components/select/index.js +1 -1
  63. package/lib/components/tita-chart/errorBoundary/index.js +1 -1
  64. package/lib/components/upload/components/uploadedPreview.js +1 -1
  65. package/lib/components/upload/index.js +1 -1
  66. package/lib/components/viewer/ImageListRender.js +1 -1
  67. package/lib/components/viewer/index.js +1 -1
  68. package/lib/components-v1/animate/AnimateChild.js +1 -1
  69. package/lib/components-v1/animate/animate.js +1 -1
  70. package/lib/components-v1/avatar/index.js +1 -1
  71. package/lib/components-v1/buttonv2/ButtonOutlined.js +1 -1
  72. package/lib/components-v1/buttonv2/ButtonRounded.js +1 -1
  73. package/lib/components-v1/buttonv2/DefaultButton.js +1 -1
  74. package/lib/components-v1/confirm/index.js +1 -1
  75. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +1 -1
  76. package/lib/components-v1/dropDownSelector/dropDownSelector.js +1 -1
  77. package/lib/components-v1/input/Input.js +1 -1
  78. package/lib/components-v1/input/InputNumber.js +1 -1
  79. package/lib/components-v1/placement/placement.js +1 -1
  80. package/lib/components-v1/placement/placementInner.js +1 -1
  81. package/lib/components-v1/pop/Pop.js +1 -1
  82. package/lib/components-v1/pop/PopInner.js +1 -1
  83. package/lib/components-v1/portals/Portals.js +1 -1
  84. package/lib/components-v1/progress/CircleProgress.js +1 -1
  85. package/lib/components-v1/progress/LineProgress.js +1 -1
  86. package/lib/components-v1/progress/index.js +1 -1
  87. package/lib/components-v1/radio/radio.js +1 -1
  88. package/lib/components-v1/radio/radioGroup.js +1 -1
  89. package/lib/components-v1/search/index.js +1 -1
  90. package/lib/components-v1/select/Option.js +1 -1
  91. package/lib/components-v1/select/index.js +1 -1
  92. package/lib/components-v1/tabs/index.js +1 -1
  93. package/lib/components-v1/textarea/index.js +1 -1
  94. package/lib/components-v1/transition/index.js +1 -1
  95. package/lib/components-v1/userSelector/UserSelectorPop.js +1 -1
  96. package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +1 -1
  97. package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +1 -1
  98. package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +1 -1
  99. package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +1 -1
  100. package/lib/components-v1/userSelector/components/MultiMode/index.js +1 -1
  101. package/lib/components-v1/userSelector/components/SearchBar.js +1 -1
  102. package/lib/components-v1/userSelector/components/SingleMode.js +1 -1
  103. package/lib/components-v1/userSelector/components/UserItem.js +1 -1
  104. package/lib/components-v1/userSelector/index.js +1 -1
  105. package/lib/pages/appointment-demo/input/index.js +1 -1
  106. package/lib/pages/group-management/components/input-form/index.js +1 -1
  107. package/lib/pages/okr-map/export-modules/okr-map/header/index.css +12 -11
  108. package/lib/utils/auth.js +1 -1
  109. package/package.json +2 -1
  110. package/src/components/change-okr-modal/Item.tsx +22 -22
  111. package/src/components/change-okr-modal/styledComponents.ts +11 -5
  112. package/src/components/mblog/style.ts +6 -7
  113. package/src/components/okr-detail/detail-header/confirm.tsx +1 -1
  114. package/src/components/okr-detail/detail-header/index.tsx +19 -13
  115. package/src/components/okr-progress-modal/helper.js +49 -41
  116. package/src/components/okr-progress-modal/index.tsx +17 -16
  117. package/src/components/okr-share/index.tsx +9 -4
  118. package/src/components/okrcase-library/index.scss +9 -7
  119. package/src/components/part-notice/index.tsx +3 -0
  120. package/src/components/part-notice/not-allow-data.tsx +110 -0
  121. package/src/components/period-selector/common.ts +16 -10
  122. package/src/pages/okr-map/export-modules/okr-map/header/index.scss +24 -19
  123. package/yarn-error.log +103 -0
@@ -1,7 +1,7 @@
1
1
  import React, { Fragment } from "react";
2
2
  import { getLocale } from "../../utils/getLocale";
3
3
 
4
- export const getO_SETTING = () => ({
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, recommandProgressObj) => {
19
+ getRecommandText: (recommandProgressObj, autoUpdate = true, updateWay = 1) => {
20
20
  if (autoUpdate) {
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
- } else {
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 getKR_SETTING = () => ({
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, recommandProgressObj) => {
62
+ getRecommandText: (recommandProgressObj, autoUpdate = true, updateWay = 1) => {
59
63
  if (autoUpdate) {
60
- if (updateWay == 1) return <span className="auto-update__recommand-tip">{getLocale("OKR_MyO_Automatic")}</span>;
61
- if (updateWay == 2) return <span className="auto-update__recommand-tip">{getLocale("OKR_MyO_calculationSubO")}</span>;
62
- } else {
63
- const { childOkrProgress, childEProgress } = recommandProgressObj;
64
- const textArr = [];
65
- childEProgress !== -1 && textArr.push(`${getLocale("OKR_MyO_Ecompletion")}${childEProgress}${getLocale("OKR_MyO_Pop_Upd_Percentage")}`);
66
- childOkrProgress !== -1 && textArr.push(`${getLocale("OKR_MyO_Ew_SubobjCom")}${childOkrProgress}${getLocale("OKR_MyO_Pop_Upd_Percentage")}`);
67
- if (textArr.length == 0) return "";
68
- return (
69
- <>
70
- <span className="auto-update__recommand-icon">{getLocale("Per_Ass_Pop_title_Recommend")}</span>
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 == -1 ? 0 : 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
- getO_SETTING, getKR_SETTING, transProgress, getKrOptions, getOptions,
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: React.FC<IProgressModalProps> = (props) => {
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 ? getKR_SETTING() : getO_SETTING();
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 == 1) {
46
+ if (data.Code === 1) {
50
47
  const { UpdateProgressWay, Progress } = data.Data;
51
48
  setRecommandProgressObj(data.Data);
52
- setUpdate(UpdateProgressWay != 0);
53
- setUpdateWay(UpdateProgressWay == 0 ? 1 : 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 == 1
70
- && setProgress(isKr ? transProgress(childEProgress) : transProgress(childkrProgress));
71
- updateWay == 2 && setProgress(transProgress(childOkrProgress));
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 == option.id ? "tu-icon-singlebox-avtive" : "tu-icon-singlebox-have"
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 == option.key ? "--selected" : ""
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 = function ({ closeModal, getModalRef, data }: Props) {
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> = ({ data, visible, onClose }) => {
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;
@@ -25,7 +25,7 @@
25
25
  // url("./image/head-background-right1.png");
26
26
  background-repeat: no-repeat;
27
27
  // background-position: center bottom, left bottom, right bottom;
28
- background-image: url("./image/head-background.png");
28
+ background-image: url('./image/head-background.png');
29
29
  background-position: center top;
30
30
  // &-mask {
31
31
  // height: 100%;
@@ -135,7 +135,7 @@
135
135
  position: relative;
136
136
  font-weight: 600;
137
137
  &::after {
138
- content: "";
138
+ content: '';
139
139
  position: absolute;
140
140
  bottom: -14px;
141
141
  left: 0;
@@ -253,6 +253,7 @@
253
253
  font-weight: 600;
254
254
  }
255
255
  &__btn {
256
+ font-size: 14px;
256
257
  position: absolute;
257
258
  right: 15px;
258
259
  top: 60px;
@@ -265,6 +266,7 @@
265
266
  cursor: pointer;
266
267
  opacity: 0;
267
268
  transition: all 0.5s;
269
+ font-weight: 500;
268
270
  &-show {
269
271
  top: 37px;
270
272
  opacity: 1;
@@ -287,12 +289,12 @@
287
289
  }
288
290
  }
289
291
  &-blue {
290
- background-image: url("./image/蓝.png");
292
+ background-image: url('./image/蓝.png');
291
293
  background-color: #f4f8ff;
292
294
  color: #2879ff;
293
295
  }
294
296
  &-red {
295
- background-image: url("./image/红.png");
297
+ background-image: url('./image/红.png');
296
298
  background-color: rgba(240, 94, 94, 0.1);
297
299
  color: #f05e5e;
298
300
  }
@@ -415,7 +417,7 @@
415
417
  height: 64px;
416
418
  box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
417
419
  border-radius: 6px;
418
- background-image: url("./image/会员背景.png");
420
+ background-image: url('./image/会员背景.png');
419
421
  background-size: 100%;
420
422
  background-repeat: no-repeat;
421
423
  background-position: center;
@@ -439,7 +441,7 @@
439
441
  width: 100%;
440
442
  height: 114px;
441
443
  background-color: #fff;
442
- background-image: url("./image/广告图片.png");
444
+ background-image: url('./image/广告图片.png');
443
445
  background-size: 100%;
444
446
  background-repeat: no-repeat;
445
447
  background-position: center;
@@ -536,7 +538,7 @@
536
538
  flex-direction: column;
537
539
  justify-content: start;
538
540
  align-items: center;
539
- background-image: url("./image/支付背景.svg");
541
+ background-image: url('./image/支付背景.svg');
540
542
  background-repeat: no-repeat;
541
543
  background-position: center;
542
544
  background-size: 100%;
@@ -1,5 +1,6 @@
1
1
  import React, { FC, useState, useCallback } from "react";
2
2
  import { LocalStorage } from "../../utils/local-storage";
3
+ import { notAllowData } from "./not-allow-data";
3
4
  import "./index.scss";
4
5
 
5
6
  interface Props {
@@ -10,6 +11,7 @@ interface Props {
10
11
 
11
12
  const preCls = "part-notice";
12
13
  const storage = new LocalStorage();
14
+ const tenantId = window.BSGlobal.tenantInfo.Id;
13
15
 
14
16
  const PartNotice: FC<Props> = ({ storageName, text, link }) => {
15
17
  const [visible, setVisible] = useState(() => {
@@ -33,6 +35,7 @@ const PartNotice: FC<Props> = ({ storageName, text, link }) => {
33
35
  const handleOpenLink = () => {
34
36
  window.open(link, "_target");
35
37
  };
38
+ if (!notAllowData.find((item) => item === tenantId)) return <span />;
36
39
  if (!visible) return <span />;
37
40
  return (
38
41
  <div className={`${preCls}`}>
@@ -0,0 +1,110 @@
1
+ export const notAllowData = [
2
+ 366131,
3
+ 307425,
4
+ 386434,
5
+ 318995,
6
+ 516911,
7
+ 520530,
8
+ 529247,
9
+ 283929,
10
+ 521974,
11
+ 525553,
12
+ 524783,
13
+ 533197,
14
+ 506389,
15
+ 541245,
16
+ 265530,
17
+ 542555,
18
+ 322665,
19
+ 388103,
20
+ 523558,
21
+ 521070,
22
+ 547650,
23
+ 527324,
24
+ 543000,
25
+ 536771,
26
+ 377798,
27
+ 548066,
28
+ 541479,
29
+ 538509,
30
+ 509148,
31
+ 383549,
32
+ 533456,
33
+ 395251,
34
+ 516682,
35
+ 546877,
36
+ 521818,
37
+ 552965,
38
+ 551336,
39
+ 518051,
40
+ 544736,
41
+ 552455,
42
+ 534044,
43
+ 529329,
44
+ 554018,
45
+ 518791,
46
+ 392024,
47
+ 553462,
48
+ 504585,
49
+ 551576,
50
+ 547861,
51
+ 504087,
52
+ 555603,
53
+ 526408,
54
+ 536559,
55
+ 555641,
56
+ 553800,
57
+ 553083,
58
+ 554654,
59
+ 552158,
60
+ 542587,
61
+ 379998,
62
+ 510788,
63
+ 553836,
64
+ 529906,
65
+ 511358,
66
+ 551913,
67
+ 543085,
68
+ 514568,
69
+ 397292,
70
+ 556796,
71
+ 538802,
72
+ 546456,
73
+ 549378,
74
+ 542520,
75
+ 560327,
76
+ 548612,
77
+ 522327,
78
+ 555225,
79
+ 530370,
80
+ 565991,
81
+ 547082,
82
+ 564585,
83
+ 535986,
84
+ 502385,
85
+ 391420,
86
+ 560552,
87
+ 558317,
88
+ 564416,
89
+ 552974,
90
+ 318867,
91
+ 570075,
92
+ 560793,
93
+ 565994,
94
+ 533855,
95
+ 375844,
96
+ 549354,
97
+ 571823,
98
+ 537982,
99
+ 528567,
100
+ 568168,
101
+ 569066,
102
+ 515852,
103
+ 566360,
104
+ 548969,
105
+ 553532,
106
+ 352728,
107
+ 562259,
108
+ 521375,
109
+ ];
110
+ export default notAllowData;
@@ -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 == "-1" ? "-1" : period.substring(0, 1);
9
- option.yqmNum = period.substring(2) == "" ? "0" : period.substring(2);
8
+ option.cycleType = Number(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 == "-1" ? `${getLocale("OKR_MyO_Butt_Allyears")}` : `${selected.annualNum}${isEn ? "" : "年"}`;
54
+ const annualNum = Number(`${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 == "1" ? `${getLocale("OKR_MyO_Pop_Firsthalf")}` : `${getLocale("OKR_MyO_Pop_Secondhalf")}`;
76
+ cycleDate = Number(`${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) == currentYear,
91
+ (item) => Number(item.title) === currentYear,
92
92
  );
93
- if (computeType == "add") {
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 == "2") start.add(6, "M");
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 == 1) {
214
- month -= (month % 2 == 1 ? 0 : 1);
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, sans-serif, PingFang SC, Microsoft YaHei;
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 #E9ECF0;
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: #2879FF;
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,&-level {
107
-
107
+ &-showkr,
108
+ &-level {
108
109
  padding: 5px 20px;
109
110
  &:hover {
110
- background: #F7F8FA;
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: #3F4755;
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 no-repeat 50% 50%;
129
- content: "";
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: #FFFFFF;
150
+ background: #ffffff;
149
151
  box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
150
- border: 1px solid #E9ECF0;
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 no-repeat 50% 50%;
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 50% 50%;
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: #5c8EFF;
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: #515A69;
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: #FFBC00;
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: #6F7886;
288
+ color: #6f7886;
285
289
  line-height: 20px;
286
290
  padding: 0 32px;
291
+ display: block;
287
292
  }
288
293
  }