@titaui/pc 1.9.78 → 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 (115) 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 +2 -2
  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-flow/export-modal/index.js +38 -62
  41. package/lib/components/okr-progress-modal/helper.js +59 -45
  42. package/lib/components/okr-progress-modal/index.js +19 -14
  43. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
  44. package/lib/components/okr-review/ReviewPop/components/Toast/index.js +1 -1
  45. package/lib/components/okr-review/ReviewPop/index.js +1 -1
  46. package/lib/components/okr-review/components/ReviewItem/index.js +1 -1
  47. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +1 -1
  48. package/lib/components/okr-review/index.js +1 -1
  49. package/lib/components/okr-share/index.js +7 -2
  50. package/lib/components/operation-records/OperationRecordItem.js +1 -1
  51. package/lib/components/operation-records/index.js +1 -1
  52. package/lib/components/point-demo/input/index.js +1 -1
  53. package/lib/components/praise-record/PraiseRecordItem.js +1 -1
  54. package/lib/components/praise-record/index.js +1 -1
  55. package/lib/components/range-picker-pop/index.js +1 -1
  56. package/lib/components/range-selector-pop/RangeList.js +1 -1
  57. package/lib/components/range-selector-pop/RangeSelectorPop.js +1 -1
  58. package/lib/components/select/Option.js +1 -1
  59. package/lib/components/select/index.js +1 -1
  60. package/lib/components/tita-chart/errorBoundary/index.js +1 -1
  61. package/lib/components/upload/components/uploadedPreview.js +1 -1
  62. package/lib/components/upload/index.js +1 -1
  63. package/lib/components/viewer/ImageListRender.js +1 -1
  64. package/lib/components/viewer/index.js +1 -1
  65. package/lib/components-v1/animate/AnimateChild.js +1 -1
  66. package/lib/components-v1/animate/animate.js +1 -1
  67. package/lib/components-v1/avatar/index.js +1 -1
  68. package/lib/components-v1/buttonv2/ButtonOutlined.js +1 -1
  69. package/lib/components-v1/buttonv2/ButtonRounded.js +1 -1
  70. package/lib/components-v1/buttonv2/DefaultButton.js +1 -1
  71. package/lib/components-v1/confirm/index.js +1 -1
  72. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +1 -1
  73. package/lib/components-v1/dropDownSelector/dropDownSelector.js +1 -1
  74. package/lib/components-v1/input/Input.js +1 -1
  75. package/lib/components-v1/input/InputNumber.js +1 -1
  76. package/lib/components-v1/placement/placement.js +1 -1
  77. package/lib/components-v1/placement/placementInner.js +1 -1
  78. package/lib/components-v1/pop/Pop.js +1 -1
  79. package/lib/components-v1/pop/PopInner.js +1 -1
  80. package/lib/components-v1/portals/Portals.js +1 -1
  81. package/lib/components-v1/progress/CircleProgress.js +1 -1
  82. package/lib/components-v1/progress/LineProgress.js +1 -1
  83. package/lib/components-v1/progress/index.js +1 -1
  84. package/lib/components-v1/radio/radio.js +1 -1
  85. package/lib/components-v1/radio/radioGroup.js +1 -1
  86. package/lib/components-v1/search/index.js +1 -1
  87. package/lib/components-v1/select/Option.js +1 -1
  88. package/lib/components-v1/select/index.js +1 -1
  89. package/lib/components-v1/tabs/index.js +1 -1
  90. package/lib/components-v1/textarea/index.js +1 -1
  91. package/lib/components-v1/transition/index.js +1 -1
  92. package/lib/components-v1/userSelector/UserSelectorPop.js +1 -1
  93. package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +1 -1
  94. package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +1 -1
  95. package/lib/components-v1/userSelector/components/MultiMode/DepartmentTree.js +1 -1
  96. package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +1 -1
  97. package/lib/components-v1/userSelector/components/MultiMode/index.js +1 -1
  98. package/lib/components-v1/userSelector/components/SearchBar.js +1 -1
  99. package/lib/components-v1/userSelector/components/SingleMode.js +1 -1
  100. package/lib/components-v1/userSelector/components/UserItem.js +1 -1
  101. package/lib/components-v1/userSelector/index.js +1 -1
  102. package/lib/pages/appointment-demo/input/index.js +1 -1
  103. package/lib/pages/group-management/components/input-form/index.js +1 -1
  104. package/lib/utils/auth.js +1 -1
  105. package/package.json +2 -1
  106. package/src/components/change-okr-modal/Item.tsx +22 -22
  107. package/src/components/change-okr-modal/styledComponents.ts +11 -5
  108. package/src/components/mblog/style.ts +4 -1
  109. package/src/components/okr-detail/detail-header/confirm.tsx +1 -1
  110. package/src/components/okr-detail/detail-header/index.tsx +19 -13
  111. package/src/components/okr-flow/export-modal/index.tsx +37 -50
  112. package/src/components/okr-progress-modal/helper.js +49 -41
  113. package/src/components/okr-progress-modal/index.tsx +17 -16
  114. package/src/components/okr-share/index.tsx +9 -4
  115. package/yarn-error.log +103 -0
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
26
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
27
 
28
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
29
29
 
30
30
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
31
 
@@ -33,7 +33,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
33
33
 
34
34
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
35
35
 
36
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
36
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
37
37
 
38
38
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
39
39
 
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
30
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -43,7 +43,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
43
43
 
44
44
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
45
45
 
46
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
46
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
47
47
 
48
48
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
49
49
 
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
23
 
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
 
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
27
 
28
28
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
23
 
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
 
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
27
 
28
28
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
package/lib/utils/auth.js CHANGED
@@ -9,7 +9,7 @@ exports.hasSuperior = exports.OAuth = exports.KRAuth = exports.EAuth = exports.D
9
9
 
10
10
  var _bsGlobal = require("./bs-global");
11
11
 
12
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
12
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
13
13
 
14
14
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.78",
3
+ "version": "1.9.80",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "src/index.js",
@@ -116,6 +116,7 @@
116
116
  "react-content-loader": "^6.0.3",
117
117
  "react-cropper": "^2.1.8",
118
118
  "react-custom-scrollbars": "^4.2.1",
119
+ "react-dom": "^17.0.2",
119
120
  "react-grid-layout": "^1.2.5",
120
121
  "react-perfect-scrollbar": "^1.5.8",
121
122
  "react-sizeme": "^3.0.1",
@@ -4,7 +4,6 @@ import {
4
4
  } from "./styledComponents";
5
5
  import { OkrData } from "./types";
6
6
  import { OpenUserName } from "../../utils/open-data";
7
- import drawerManager from "../../components/drawer-manager";
8
7
  import { getTypeMap } from "./constant";
9
8
  import { getMonth } from "../../utils/constant";
10
9
  import Tooltip from "../tooltip";
@@ -28,6 +27,9 @@ const colorMap = {
28
27
  };
29
28
 
30
29
  export default class Item extends PureComponent<Props, State> {
30
+ // @ts-ignore
31
+ isObjectiveRelevanceKr: boolean = window.BSGlobal.OkrAdvancedSetting.KRSetting.ObjectiveRelevanceKr;
32
+
31
33
  constructor(props: Props) {
32
34
  super(props);
33
35
  this.state = {
@@ -35,9 +37,6 @@ export default class Item extends PureComponent<Props, State> {
35
37
  };
36
38
  }
37
39
 
38
- // @ts-ignore
39
- isObjectiveRelevanceKr: boolean = BSGlobal.OkrAdvancedSetting.KRSetting.ObjectiveRelevanceKr;
40
-
41
40
  componentDidMount() {
42
41
  this.isExtend();
43
42
  }
@@ -66,7 +65,7 @@ export default class Item extends PureComponent<Props, State> {
66
65
  const { data, active } = this.props;
67
66
  const { isExpand } = this.state;
68
67
  if (data.Krs.length > 0) {
69
- const isRelatedKr = data.Krs.some((item) => item.mileStoneId == (active.workId || active.mileStoneId));
68
+ const isRelatedKr = data.Krs.some((item) => item.mileStoneId === (active.workId || active.mileStoneId));
70
69
  this.setState({
71
70
  isExpand: isRelatedKr ? true : isExpand || data.isOpen,
72
71
  });
@@ -76,8 +75,8 @@ export default class Item extends PureComponent<Props, State> {
76
75
  htmlToText = (text) => {
77
76
  const div = document.createElement("div");
78
77
  div.innerHTML = text;
79
- text = div.innerText || div.textContent;
80
- return text;
78
+ const newtext = div.innerText || div.textContent;
79
+ return newtext;
81
80
  };
82
81
 
83
82
  getCycleText = () => {
@@ -93,7 +92,7 @@ export default class Item extends PureComponent<Props, State> {
93
92
  case 2: return hzNum[data.yqmnum - 1];
94
93
  case 3: return getMonth()[data.yqmnum - 1];
95
94
  case 4: return `${getMonth()[data.yqmnum - 1]}-${getMonth()[((data.yqmnum + 1) % 12 || 12) - 1]}月`;
96
- case 5: return data.yqmnum == 1 ? getLocale("OKR_MyO_Pop_Firsthalf") : getLocale("OKR_MyO_Pop_Secondhalf");
95
+ case 5: return data.yqmnum === 1 ? getLocale("OKR_MyO_Pop_Firsthalf") : getLocale("OKR_MyO_Pop_Secondhalf");
97
96
  default: return getLocale("Mod_Customization");
98
97
  }
99
98
  };
@@ -111,17 +110,18 @@ export default class Item extends PureComponent<Props, State> {
111
110
  return newstr;
112
111
  };
113
112
 
114
- _dealOkrData = (data: OkrData, keyWords: string) => {
113
+ dealOkrData = (data: OkrData, keyWords: string) => {
114
+ const newData = data;
115
115
  if (keyWords) {
116
- data.workName = this.formatKeywordsFunc(data.workName, keyWords);
117
- data.Krs.forEach((item) => {
116
+ newData.workName = this.formatKeywordsFunc(data.workName, keyWords);
117
+ newData.Krs.forEach((item) => {
118
118
  item.mileStoneName = this.formatKeywordsFunc(item.mileStoneName, keyWords);
119
119
  });
120
120
  }
121
121
  return data;
122
122
  };
123
123
 
124
- okrData: any = this._dealOkrData(this.props.data, this.props.keywords);
124
+ okrData: any = this.dealOkrData(this.props.data, this.props.keywords);
125
125
 
126
126
  render() {
127
127
  const { data, active, isShowKr } = this.props;
@@ -130,12 +130,12 @@ export default class Item extends PureComponent<Props, State> {
130
130
  <ItemWrapper>
131
131
  <ItemObjectiveContainer onClick={() => this.setState({ isExpand: !isExpand })}>
132
132
  <ItemTop>
133
- <Radio onClick={(e: any) => this.onSelect(e, data)} active={active && data.workId == active.workId} />
133
+ <Radio onClick={(e: any) => this.onSelect(e, data)} active={active && data.workId === active.workId} />
134
134
  <Tag color={colorMap[data.cycleType] || colorMap[4]}>{this.getCycleText()}</Tag>
135
135
  <WorkNameWrapper isShowKr={isShowKr}>
136
- <Tooltip.Text isPercent overlayText={this.htmlToText(this.okrData.workName)}>
136
+ <Tooltip placement="top" overlay={this.htmlToText(this.okrData.workName)}>
137
137
  <OkrName isKr={false} isShowKr={isShowKr} dangerouslySetInnerHTML={{ __html: this.okrData.workName }} />
138
- </Tooltip.Text>
138
+ </Tooltip>
139
139
  </WorkNameWrapper>
140
140
  {this.isObjectiveRelevanceKr && isShowKr && data.Krs.length > 0 && <span className={`${this.state.isExpand ? "tu-icon-arrow-up" : "tu-icon-arrow-down"}`} />}
141
141
  </ItemTop>
@@ -167,20 +167,20 @@ export default class Item extends PureComponent<Props, State> {
167
167
  {
168
168
  this.okrData.Krs.length > 0 && this.okrData.Krs.map((item: any, index: number) => (this.isObjectiveRelevanceKr ? (
169
169
  <ItemTop key={item.mileStoneId}>
170
- <Radio onClick={(e: any) => this.onSelect(e, data.Krs[index])} active={active && item.mileStoneId == (active.workId || active.mileStoneId)} />
170
+ <Radio onClick={(e: any) => this.onSelect(e, data.Krs[index])} active={active && item.mileStoneId === (active.workId || active.mileStoneId)} />
171
171
  <WorkNameWrapper isShowKr={isShowKr}>
172
- <Tooltip.Text isPercent overlayText={this.htmlToText(item.mileStoneName)}>
172
+ <Tooltip placement="top" overlay={this.htmlToText(item.mileStoneName)}>
173
173
  <OkrName isKr isShowKr={isShowKr} dangerouslySetInnerHTML={{ __html: `KR${index + 1}:${item.mileStoneName}` }} />
174
- </Tooltip.Text>
174
+ </Tooltip>
175
175
  </WorkNameWrapper>
176
176
  </ItemTop>
177
- ) : active && item.mileStoneId == (active.workId || active.mileStoneId) ? (
177
+ ) : active && item.mileStoneId === (active.workId || active.mileStoneId) ? (
178
178
  <ItemTop key={item.mileStoneId}>
179
- <Radio onClick={(e: any) => this.onSelect(e, data.Krs[index])} active={active && item.mileStoneId == (active.workId || active.mileStoneId)} />
179
+ <Radio onClick={(e: any) => this.onSelect(e, data.Krs[index])} active={active && item.mileStoneId === (active.workId || active.mileStoneId)} />
180
180
  <WorkNameWrapper isShowKr={isShowKr}>
181
- <Tooltip.Text isPercent overlayText={this.htmlToText(item.mileStoneName)}>
181
+ <Tooltip placement="top" overlay={this.htmlToText(item.mileStoneName)}>
182
182
  <OkrName isKr isShowKr={isShowKr} dangerouslySetInnerHTML={{ __html: `KR${index + 1}:${item.mileStoneName}` }} />
183
- </Tooltip.Text>
183
+ </Tooltip>
184
184
  </WorkNameWrapper>
185
185
  </ItemTop>
186
186
  ) : ""))
@@ -3,7 +3,7 @@ import styled from "styled-components";
3
3
  export const Wrapper = styled.div`
4
4
  width: 589px;
5
5
  height: 488px;
6
- margin-top: ${(p: any) => (p.okrPopType == 1 ? 0 : "32px")};
6
+ margin-top: ${(p: any) => (p.okrPopType === 1 ? 0 : "32px")};
7
7
  background: #ffffff;
8
8
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.2);
9
9
  border-radius: 4px;
@@ -230,11 +230,17 @@ export const Tag = styled.div`
230
230
  margin: 0 12px 0 9px;
231
231
  `;
232
232
  export const OkrName = styled.span`
233
+ display: inline-block
233
234
  flex: 1;
234
- width: 0;
235
+ max-width: 400px;
235
236
  font-size: 13px;
236
237
  font-weight: ${(p: any) => (p.isShowKr ? "normal" : "600")};
237
238
  color: #33383d;
239
+ white-space: nowrap;
240
+ overflow: hidden;
241
+ word-break: keep-all;
242
+ text-overflow: ellipsis;
243
+ line-height: 1;
238
244
  `;
239
245
  export const ItemBottom = styled.div`
240
246
  padding-left: 102px;
@@ -274,14 +280,14 @@ export const Button = styled.a`
274
280
  padding: 0 15px;
275
281
  box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.21);
276
282
  border-radius: 2px;
277
- background-color: ${(p: any) => (p.type != "confirm" ? "#FAFBFC" : p.disabled ? "#E7EEF3" : "#2879FF")};
278
- color: ${(p: any) => (p.type != "confirm" ? "#565E66" : "#FFF")};
283
+ background-color: ${(p: any) => (p.type !== "confirm" ? "#FAFBFC" : p.disabled ? "#E7EEF3" : "#2879FF")};
284
+ color: ${(p: any) => (p.type !== "confirm" ? "#565E66" : "#FFF")};
279
285
  cursor: pointer;
280
286
  text-align: center;
281
287
  white-space: nowrap;
282
288
  line-height: 27px;
283
289
  &:hover {
284
- color: ${(p: any) => (p.type != "confirm" ? "#565E66" : "#FFF")};
290
+ color: ${(p: any) => (p.type !== "confirm" ? "#565E66" : "#FFF")};
285
291
  }
286
292
  `;
287
293
  export const KrItemWrapper = styled.div`
@@ -61,6 +61,8 @@ export const Textarea = styled.textarea`
61
61
  word-break: break-all;
62
62
  word-wrap: break-word;
63
63
  height: 160px;
64
+ font-size: 14px;
65
+ line-height: 22px;
64
66
 
65
67
  &.textarea-setheight {
66
68
  visibility: hidden;
@@ -69,7 +71,8 @@ export const Textarea = styled.textarea`
69
71
  `;
70
72
 
71
73
  export const Tips = styled.div`
72
- line-height: 18px;
74
+ font-size: 14px;
75
+ line-height: 22px;
73
76
  color: ${(p: any) => p.color};
74
77
  text-align: right;
75
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,5 +1,5 @@
1
1
  import React, {
2
- useState, useEffect, useRef, FC,
2
+ useState, useEffect, useRef, Fragment,
3
3
  } from "react";
4
4
  import classNames from "classnames";
5
5
  import Html2Canvas from "html2canvas";
@@ -25,7 +25,7 @@ interface IProps {
25
25
  showkr: boolean;
26
26
  }
27
27
 
28
- const ExportMapModal: FC<IProps> = (props: IProps) => {
28
+ function ExportMapModal(props: IProps) {
29
29
  const {
30
30
  visible = false,
31
31
  onCloseHandler,
@@ -39,19 +39,17 @@ const ExportMapModal: FC<IProps> = (props: IProps) => {
39
39
  const [isExport, setIsExport] = useState(false);
40
40
  const modalRef = useRef();
41
41
  useEffect(() => {
42
- if (isWx() && window.WWOpenData) {
43
- if (window.WWOpenData.enableCanvasSharing) {
44
- window.WWOpenData.enableCanvasSharing();
45
- }
46
- if (window.WWOpenData.initCanvas) {
47
- window.WWOpenData.initCanvas();
48
- }
42
+ if (isWx()) {
43
+ window.WWOpenData
44
+ && window.WWOpenData.enableCanvasSharing
45
+ && window.WWOpenData.enableCanvasSharing();
46
+ window.WWOpenData
47
+ && window.WWOpenData.initCanvas
48
+ && window.WWOpenData.initCanvas();
49
49
  }
50
50
  }, []);
51
51
  useEffect(() => {
52
- if (visible && mapInstance) {
53
- mapInstance.fitView();
54
- }
52
+ visible && mapInstance && mapInstance.fitView();
55
53
  }, [visible, mapInstance]);
56
54
 
57
55
  const downloadImg = async () => {
@@ -74,41 +72,34 @@ const ExportMapModal: FC<IProps> = (props: IProps) => {
74
72
  useCORS: true, // 【重要】开启跨域配置
75
73
  };
76
74
 
77
- await Html2Canvas(okrMapRef, opts).then((result) => {
78
- if (isWx() && window.WWOpenData) {
79
- if (window.WWOpenData.enableCanvasSharing) {
80
- window.WWOpenData.enableCanvasSharing();
81
- }
82
- if (window.WWOpenData.initCanvas) {
83
- window.WWOpenData.initCanvas();
84
- }
85
- }
86
- const imgUrl = result.toDataURL("image/png"); // 得到图片的base64编码数据
87
- getBase64DownloadUrl(imgUrl.split(",")[1]).then((url) => {
88
- const image = new Image();
75
+ const result = await Html2Canvas(okrMapRef, opts);
76
+ if (isWx()) {
77
+ window.WWOpenData
78
+ && window.WWOpenData.enableCanvasSharing
79
+ && window.WWOpenData.enableCanvasSharing();
80
+ window.WWOpenData
81
+ && window.WWOpenData.initCanvas
82
+ && window.WWOpenData.initCanvas();
83
+ }
84
+ const imgUrl = result.toDataURL("image/png"); // 得到图片的base64编码数据
85
+ const url = await getBase64DownloadUrl(imgUrl.split(",")[1]);
86
+ const image = new Image();
89
87
 
90
- image.setAttribute("crossOrigin", "anonymous");
91
- image.onload = () => {
92
- if (!url.Data.obj) {
93
- Toast.Error("导出失败,请稍后重试", { canClose: false });
94
- }
95
- const a = document.createElement("a"); // 生成一个a元素
96
- const event = new MouseEvent("click"); // 创建一个单击事件
97
- a.download = "okr地图"; // 设置图片名称
98
- a.href = url.Data.obj; // 将生成的URL设置为a.href属性
99
- a.dispatchEvent(event); // 触发a的单击事件
100
- Toast.Success("导出成功");
101
- setIsExport(false);
102
- if (onCloseHandler) {
103
- onCloseHandler();
104
- }
105
- };
106
- image.src = imgUrl;
107
- });
108
- }).catch((err) => {
88
+ image.setAttribute("crossOrigin", "anonymous");
89
+ image.onload = () => {
90
+ if (!url.Data.obj) {
91
+ Toast.Error("导出失败,请稍后重试", { canClose: false });
92
+ }
93
+ const a = document.createElement("a"); // 生成一个a元素
94
+ const event = new MouseEvent("click"); // 创建一个单击事件
95
+ a.download = "okr地图"; // 设置图片名称
96
+ a.href = url.Data.obj; // 将生成的URL设置为a.href属性
97
+ a.dispatchEvent(event); // 触发a的单击事件
98
+ Toast.Success("导出成功");
109
99
  setIsExport(false);
110
- Toast.Error(err, { canClose: false });
111
- });
100
+ onCloseHandler && onCloseHandler();
101
+ };
102
+ image.src = imgUrl;
112
103
  };
113
104
 
114
105
  const confirmHandler = () => {
@@ -187,9 +178,5 @@ const ExportMapModal: FC<IProps> = (props: IProps) => {
187
178
  </>
188
179
  </Dialog>
189
180
  );
190
- };
191
-
192
- ExportMapModal.defaultProps = {
193
- onCloseHandler: () => {},
194
- };
181
+ }
195
182
  export default ExportMapModal;
@@ -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
  {