@titaui/pc 1.9.73 → 1.9.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/.eslintrc.js +5 -3
  2. package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +15 -10
  3. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +4 -3
  4. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +5 -3
  5. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +6 -4
  6. package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +15 -10
  7. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +6 -5
  8. package/lib/components/dynamic/dynamic-like-ranking/index.css +2 -5
  9. package/lib/components/dynamic/dynamic.js +7 -2
  10. package/lib/components/mblog/style.js +3 -3
  11. package/lib/components/okr-detail/detail-header/confirm.js +2 -1
  12. package/lib/components/okr-detail/detail-header/index.js +13 -10
  13. package/lib/components/okr-progress-modal/helper.js +59 -45
  14. package/lib/components/okr-progress-modal/index.js +19 -14
  15. package/lib/components/okr-share/index.js +7 -2
  16. package/lib/components/okrcase-library/index.css +3 -1
  17. package/lib/components/part-notice/index.js +6 -0
  18. package/lib/components/part-notice/not-allow-data.js +10 -0
  19. package/lib/components/period-selector/common.js +18 -10
  20. package/lib/pages/okr-map/export-modules/okr-map/header/index.css +12 -11
  21. package/lib/utils/tools.js +94 -45
  22. package/package.json +2 -1
  23. package/src/components/dynamic/dynamic-item/dynamic-project/constant.ts +4 -2
  24. package/src/components/dynamic/dynamic-item/dynamic-project/index.tsx +5 -5
  25. package/src/components/dynamic/dynamic-item/dynamic-replay/index.scss +5 -3
  26. package/src/components/dynamic/dynamic-item/dynamic-replay/index.tsx +6 -5
  27. package/src/components/dynamic/dynamic-item/dynamic-task/constant.ts +4 -2
  28. package/src/components/dynamic/dynamic-item/dynamic-task/index.tsx +6 -6
  29. package/src/components/dynamic/dynamic-like-ranking/index.scss +2 -3
  30. package/src/components/dynamic/dynamic.tsx +8 -3
  31. package/src/components/mblog/style.ts +6 -7
  32. package/src/components/okr-detail/detail-header/confirm.tsx +1 -1
  33. package/src/components/okr-detail/detail-header/index.tsx +19 -13
  34. package/src/components/okr-progress-modal/helper.js +49 -41
  35. package/src/components/okr-progress-modal/index.tsx +17 -16
  36. package/src/components/okr-share/index.tsx +9 -4
  37. package/src/components/okrcase-library/index.scss +9 -7
  38. package/src/components/part-notice/index.tsx +3 -0
  39. package/src/components/part-notice/not-allow-data.tsx +110 -0
  40. package/src/components/period-selector/common.ts +16 -10
  41. package/src/pages/okr-map/export-modules/okr-map/header/index.scss +24 -19
  42. package/src/utils/tools.js +48 -20
  43. package/yarn-error.log +16 -15807
@@ -1,6 +1,6 @@
1
1
  import { getLocale } from "../../../../utils/getLocale";
2
2
 
3
- export const EStatusClass2StatusTypeText = {
3
+ export const getEStatusClass2StatusTypeText = () => ({
4
4
  2: getLocale("OKR_MyO_E_From_Completed"),
5
5
  1: getLocale("Per_MyRe_text_Inprogress"),
6
6
  4: getLocale("OKR_MyO_E_From_Cancelled"),
@@ -8,4 +8,6 @@ export const EStatusClass2StatusTypeText = {
8
8
  6: getLocale("OKR_MyO_E_From_Suspended"),
9
9
  0: getLocale("OKR_MyO_E_From_NotStarted"),
10
10
  5: getLocale("OKR_MyO_E_From_Notaccepted"),
11
- };
11
+ });
12
+
13
+ export default getEStatusClass2StatusTypeText;
@@ -4,7 +4,7 @@ import React, {
4
4
  import classNames from "classnames";
5
5
  import { IDynamicItemContentProps } from "../../interface";
6
6
  import DynamicItemHeader from "../components/header";
7
- import { EStatusClass2StatusTypeText } from "./constant";
7
+ import { getEStatusClass2StatusTypeText } from "./constant";
8
8
  import TaskPng from "./img/task-icon.png";
9
9
  import {
10
10
  EObjType,
@@ -51,7 +51,7 @@ const DynamicTask: FC<IDynamicItemContentProps> = ({ data, ...restProps }) => {
51
51
  if (objType === EObjType.Project) {
52
52
  window.open(
53
53
  window.location.href.replace(
54
- location.hash,
54
+ window.location.hash,
55
55
  `#work?iTalentNavCode=tita-work&work_id=${objId}`,
56
56
  ),
57
57
  );
@@ -60,7 +60,7 @@ const DynamicTask: FC<IDynamicItemContentProps> = ({ data, ...restProps }) => {
60
60
  if (workId <= 0) return;
61
61
  window.open(
62
62
  window.location.href.replace(
63
- location.hash,
63
+ window.location.hash,
64
64
  `#work?work_id=${workId}&detail_type=milepost`,
65
65
  ),
66
66
  );
@@ -70,7 +70,7 @@ const DynamicTask: FC<IDynamicItemContentProps> = ({ data, ...restProps }) => {
70
70
  if (workId <= 0) return;
71
71
  window.open(
72
72
  window.location.href.replace(
73
- location.hash,
73
+ window.location.hash,
74
74
  `#work?work_id=${workId}&detail_type=kanban`,
75
75
  ),
76
76
  );
@@ -125,7 +125,7 @@ const DynamicTask: FC<IDynamicItemContentProps> = ({ data, ...restProps }) => {
125
125
  user={principalUser}
126
126
  />
127
127
  <div className={`${prefix}__content`}>
128
- <img className={`${prefix}__content-img`} src={TaskPng} />
128
+ <img className={`${prefix}__content-img`} src={TaskPng} alt="" />
129
129
  <div className={`${prefix}__content-info`}>
130
130
  <div className={`${prefix}__content-title`}>
131
131
  <Tooltip.Text isPercent text={renderName} minusWidth={30} />
@@ -133,7 +133,7 @@ const DynamicTask: FC<IDynamicItemContentProps> = ({ data, ...restProps }) => {
133
133
  <div className={`${prefix}__content-status-and-time-range`}>
134
134
  <i className={classNames(EStatusStatus2ClassType[status])} />
135
135
  <span className={`${prefix}__content-status-text`}>
136
- {EStatusClass2StatusTypeText[status]}
136
+ {getEStatusClass2StatusTypeText()[status]}
137
137
  </span>
138
138
  <i className={classNames("tu-icon-deferred")} />
139
139
  <span className={`${prefix}__content-time-range`}>
@@ -66,8 +66,9 @@
66
66
  }
67
67
  &-items {
68
68
  display: grid;
69
- grid-template-columns: auto auto auto auto;
69
+ grid-template-columns: auto 28px auto auto;
70
70
  grid-row-gap: 16px;
71
+ margin-left: -8px;
71
72
  }
72
73
  }
73
74
  }
@@ -93,8 +94,6 @@
93
94
  }
94
95
 
95
96
  &-avatar {
96
- margin-left: 9px;
97
-
98
97
  .titaui-pc-avator-container {
99
98
  display: inline-flex !important;
100
99
  }
@@ -80,9 +80,14 @@ const Dynamic: FC = () => {
80
80
  };
81
81
 
82
82
  const handleDeleteFeed = (feedId) => {
83
- setDynamicData([
84
- ...dynamicData.filter((item: any) => item.feedId !== feedId),
85
- ]);
83
+ const newDatas = dynamicData.filter((item: any) => item.feedId !== feedId);
84
+ setDynamicData([]);
85
+ // 动画效果如果直接设置新的数据,diff时间会比较长,所以直接清空再赋值,这样不会出现删除时等待长时间空白
86
+ setTimeout(() => {
87
+ setDynamicData([
88
+ ...newDatas,
89
+ ]);
90
+ }, 0);
86
91
  };
87
92
 
88
93
  const getDynamicData = (needResetValue) => {
@@ -26,7 +26,7 @@ export const DivMblogContent = styled.div`
26
26
  background-color: #fff;
27
27
  position: relative;
28
28
  transition: all .2s ease-in-out;
29
- height: 124px;
29
+ height: 200px;
30
30
  box-sizing: border-box;
31
31
 
32
32
  &.input_default-active {
@@ -60,20 +60,19 @@ export const Textarea = styled.textarea`
60
60
  resize: none;
61
61
  word-break: break-all;
62
62
  word-wrap: break-word;
63
- height: 86px;
63
+ height: 160px;
64
+ font-size: 14px;
65
+ line-height: 22px;
64
66
 
65
67
  &.textarea-setheight {
66
68
  visibility: hidden;
67
69
  position: absolute;
68
70
  }
69
- /*
70
- &.private__bg {
71
- background: url(${require("./assets/lock-radius.png")}) no-repeat right top;
72
- } */
73
71
  `;
74
72
 
75
73
  export const Tips = styled.div`
76
- line-height: 18px;
74
+ font-size: 14px;
75
+ line-height: 22px;
77
76
  color: ${(p: any) => p.color};
78
77
  text-align: right;
79
78
  `;
@@ -18,7 +18,7 @@ function OkrDetailHeaderConfirm({ onConfirm, title = "", content = "" }: Props):
18
18
  }, []);
19
19
 
20
20
  return (
21
- <Confirm visible={visible} type="warning">
21
+ <Confirm visible={visible} type="warning" zIndex={2400}>
22
22
  {
23
23
  // @ts-ignore
24
24
  <span type="title">{title}</span>
@@ -71,13 +71,15 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
71
71
  visibility: context.generalVisibility.visibility,
72
72
  detailInfo,
73
73
  openShareModal: async () => {
74
- const krs = await getKrs({ okrId: detailInfo.workId });
75
- setKrs(krs);
74
+ const krss = await getKrs({ okrId: detailInfo.workId });
75
+ setKrs(krss);
76
76
  setShareVisible(true);
77
77
  },
78
78
  changeVisiblilty: (visibility) => {
79
- if (visibility == 4) {
80
- userSelectRef.current && userSelectRef.current.open();
79
+ if (visibility === 4) {
80
+ if (userSelectRef.current) {
81
+ userSelectRef.current.open();
82
+ }
81
83
  return;
82
84
  }
83
85
  changVisiblity(detailInfo.workId, visibility);
@@ -100,10 +102,11 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
100
102
  : getLocale("OKR_MyO_Err_Progress"),
101
103
  );
102
104
  if (res) {
103
- follow
104
- // @ts-ignore
105
- ? await addUser(loginUserId, detailInfo.workId, 3)
106
- : await deleteUser(loginUserId, detailInfo.workId, 3);
105
+ if (follow) {
106
+ await addUser(loginUserId, detailInfo.workId, 3);
107
+ } else {
108
+ await deleteUser(loginUserId, detailInfo.workId, 3);
109
+ }
107
110
  context.setGeneralRoleType(follow ? 3 : 0);
108
111
  // 关注
109
112
  Toast.Success(getLocale("Mod_Successfuloperat"));
@@ -117,9 +120,11 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
117
120
  isFinish ? getLocale("OKR_MyO_Areycloseobjective") : getLocale("OKR_MyO_Err_Restart"),
118
121
  );
119
122
  if (res) {
120
- isFinish
121
- ? await close(detailInfo.workId)
122
- : await start(detailInfo.workId);
123
+ if (isFinish) {
124
+ await close(detailInfo.workId);
125
+ } else {
126
+ await start(detailInfo.workId);
127
+ }
123
128
  commonContext.refreshAll();
124
129
  // 刷新
125
130
  Toast.Success(getLocale("Mod_Successfuloperat"));
@@ -172,7 +177,7 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
172
177
  <span className="okr-detail-head-parent">
173
178
  <i className="tu-icon-liebiao-duiqinubiao" />
174
179
  <span
175
- onClick={() => (parent.type == "okr"
180
+ onClick={() => (parent.type === "okr"
176
181
  ? drawerManager.open("okrDetail", {
177
182
  okrId: parent.id,
178
183
  })
@@ -180,7 +185,7 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
180
185
  krId: parent.id,
181
186
  }))}
182
187
  >
183
- <span>{parent.type == "okr" ? "O " : "KR "}</span>
188
+ <span>{parent.type === "okr" ? "O " : "KR "}</span>
184
189
  {parent.name}
185
190
  </span>
186
191
  </span>
@@ -202,6 +207,7 @@ function OkrDetailHeader({ detailInfo }: Props): ReactElement {
202
207
  },
203
208
  },
204
209
  }}
210
+ zIndex={2400}
205
211
  />
206
212
  <PopConfirm
207
213
  ref={popRef}
@@ -1,7 +1,7 @@
1
1
  import React, { Fragment } from "react";
2
2
  import { getLocale } from "../../utils/getLocale";
3
3
 
4
- export const 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}`}>