@titaui/pc 1.9.78 → 1.9.83

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 (32) hide show
  1. package/.eslintrc.js +6 -4
  2. package/lib/components/change-okr-modal/Item.js +26 -24
  3. package/lib/components/change-okr-modal/styledComponents.js +5 -5
  4. package/lib/components/mblog/style.js +2 -2
  5. package/lib/components/okr-detail/detail-header/confirm.js +2 -1
  6. package/lib/components/okr-detail/detail-header/index.js +13 -10
  7. package/lib/components/okr-flow/export-modal/index.js +3 -3
  8. package/lib/components/okr-progress-modal/helper.js +59 -45
  9. package/lib/components/okr-progress-modal/index.js +19 -14
  10. package/lib/components/okr-share/index.js +7 -2
  11. package/lib/components/okrcase-library/image/{/346/224/257/344/273/230/350/203/214/346/231/257/346/265/256/345/207/272.png → payBackgroundImg.png} +0 -0
  12. package/lib/components/okrcase-library/image/{submit/345/260/217/351/251/264.svg → submitLogo.svg} +0 -0
  13. package/lib/components/okrcase-library/image//345/271/277/345/221/212/345/233/276/347/211/207.png +0 -0
  14. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +19 -16
  15. package/lib/pages/personal-info/components/base-info/index.js +5 -3
  16. package/lib/pages/personal-info/components/edit-base-info/index.js +12 -29
  17. package/package.json +2 -1
  18. package/src/components/change-okr-modal/Item.tsx +22 -22
  19. package/src/components/change-okr-modal/styledComponents.ts +11 -5
  20. package/src/components/mblog/style.ts +4 -1
  21. package/src/components/okr-detail/detail-header/confirm.tsx +1 -1
  22. package/src/components/okr-detail/detail-header/index.tsx +19 -13
  23. package/src/components/okr-flow/export-modal/index.tsx +2 -2
  24. package/src/components/okr-progress-modal/helper.js +49 -41
  25. package/src/components/okr-progress-modal/index.tsx +17 -16
  26. package/src/components/okr-share/index.tsx +9 -4
  27. package/src/components/okrcase-library/image/{/346/224/257/344/273/230/350/203/214/346/231/257/346/265/256/345/207/272.png → payBackgroundImg.png} +0 -0
  28. package/src/components/okrcase-library/image/{submit/345/260/217/351/251/264.svg → submitLogo.svg} +0 -0
  29. package/src/components/okrcase-library/image//345/271/277/345/221/212/345/233/276/347/211/207.png +0 -0
  30. package/src/components/okrcase-library/okrcases-components/submitOkr-dialog.tsx +16 -16
  31. package/src/pages/personal-info/components/base-info/index.tsx +8 -3
  32. package/src/pages/personal-info/components/edit-base-info/index.tsx +20 -15
@@ -22,6 +22,10 @@ var _form = _interopRequireDefault(require("../../form"));
22
22
 
23
23
  var _getLocale = require("../../../utils/getLocale");
24
24
 
25
+ var _payBackgroundImg = _interopRequireDefault(require("../image/payBackgroundImg.png"));
26
+
27
+ var _submitLogo = _interopRequireDefault(require("../image/submitLogo.svg"));
28
+
25
29
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
26
30
 
27
31
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -48,8 +52,7 @@ var Fields = _form["default"].Fields;
48
52
 
49
53
  function SubmitDialog(props) {
50
54
  var handleShowSubmitOkrWindow = props.handleShowSubmitOkrWindow,
51
- isShowSubmitOkrWindow = props.isShowSubmitOkrWindow,
52
- allViewAreaRef = props.allViewAreaRef;
55
+ isShowSubmitOkrWindow = props.isShowSubmitOkrWindow;
53
56
 
54
57
  var _useState = (0, _react.useState)(""),
55
58
  _useState2 = _slicedToArray(_useState, 2),
@@ -79,10 +82,8 @@ function SubmitDialog(props) {
79
82
  truonlyFirstErrore: false
80
83
  });
81
84
 
82
- if (err.length) {
83
- console.log(err);
84
- } else {
85
- (0, _network.postSurvey)(body).then(function (res) {
85
+ if (!err.length) {
86
+ (0, _network.postSurvey)(body).then(function () {
86
87
  _toast["default"].Success("发送成功");
87
88
 
88
89
  handleShowSubmitOkrWindow(false);
@@ -105,7 +106,8 @@ function SubmitDialog(props) {
105
106
  }, /*#__PURE__*/_react["default"].createElement("div", {
106
107
  className: "okr-cases-library__submitWindow"
107
108
  }, /*#__PURE__*/_react["default"].createElement("img", {
108
- src: require("../image/submit\u5C0F\u9A74.svg")
109
+ src: _submitLogo["default"],
110
+ alt: "submit\u5C0F\u9A74"
109
111
  }), /*#__PURE__*/_react["default"].createElement("div", {
110
112
  className: "tu-icon-canceled",
111
113
  onClick: function onClick() {
@@ -166,7 +168,7 @@ function PayDialog(props) {
166
168
  var tenantType = window.BSGlobal.tenantInfo.tenantType; // 外部注冊賬號使用的產品ID不同
167
169
 
168
170
  // 外部注冊賬號使用的產品ID不同
169
- if (Version == 1 && tenantType == 3) return "D9E059E4-4303-4EE2-9275-AE2FA74BBAA6";
171
+ if (Version === 1 && tenantType === 3) return "D9E059E4-4303-4EE2-9275-AE2FA74BBAA6";
170
172
  return "60AFAD35-5273-4A06-B2F4-9A3193096BE7";
171
173
  }),
172
174
  _useState10 = _slicedToArray(_useState9, 1),
@@ -205,18 +207,18 @@ function PayDialog(props) {
205
207
  Total: 1
206
208
  }]
207
209
  }).then(function (orderInfo) {
208
- var orderId = orderInfo.Id,
210
+ var Id = orderInfo.Id,
209
211
  AliModel = orderInfo.AliModel;
210
212
  var PayCode = AliModel.PayCode,
211
213
  PayName = AliModel.PayName;
212
214
  setPayCode(PayCode);
213
- setOrderId(orderId);
215
+ setOrderId(Id);
214
216
  setPayName(PayName);
215
217
  });
216
218
  });
217
219
  }, []); // 点击立即支付后,2分钟内,每个10s,循环获取订单信息
218
220
 
219
- var loopOrderInfo = function loopOrderInfo(orderId) {
221
+ var loopOrderInfo = function loopOrderInfo(id) {
220
222
  if (getOrderInfoTimers.current === 12) {
221
223
  getOrderInfoTimers.current = 1;
222
224
  }
@@ -224,13 +226,13 @@ function PayDialog(props) {
224
226
  setTimeout(function () {
225
227
  // 循环获取订单信息 2 分钟
226
228
  if (getOrderInfoTimers.current < 12) {
227
- (0, _network.getOkrOrderInfo)(orderId).then(function (res) {
229
+ (0, _network.getOkrOrderInfo)(id).then(function (res) {
228
230
  getOrderInfoTimers.current += 1; // @ts-ignore
229
231
 
230
232
  var OrderStatus = res.OrderStatus; // 未支付成功重新获取订单
231
233
 
232
- if (OrderStatus != 2) {
233
- loopOrderInfo(orderId);
234
+ if (OrderStatus !== 2) {
235
+ loopOrderInfo(id);
234
236
  } else {
235
237
  // 订单已支付
236
238
  _titaUi.Modal.success({
@@ -279,7 +281,8 @@ function PayDialog(props) {
279
281
  }, /*#__PURE__*/_react["default"].createElement("div", {
280
282
  className: "okr-cases-library__payWindow"
281
283
  }, /*#__PURE__*/_react["default"].createElement("img", {
282
- src: require("../image/\u652F\u4ED8\u80CC\u666F\u6D6E\u51FA.png")
284
+ src: _payBackgroundImg["default"],
285
+ alt: "\u652F\u4ED8\u80CC\u666F\u6D6E\u51FA"
283
286
  }), /*#__PURE__*/_react["default"].createElement("div", {
284
287
  className: "tu-icon-canceled",
285
288
  onClick: function onClick() {
@@ -303,7 +306,7 @@ function PayDialog(props) {
303
306
  style: {
304
307
  fontSize: "32px"
305
308
  }
306
- }, "19.8"), "\u5143/\u5E74")), /*#__PURE__*/_react["default"].createElement("a", {
309
+ }, "29.8"), "\u5143/\u5E74")), /*#__PURE__*/_react["default"].createElement("a", {
307
310
  className: "okr-cases-library__payWindow__payButton",
308
311
  onClick: function onClick() {
309
312
  return loopOrderInfo(orderId);
@@ -71,15 +71,17 @@ var BaseInfo = function BaseInfo() {
71
71
  setVisible(false);
72
72
  };
73
73
 
74
- var handleSuccessEditBaseInfo = function handleSuccessEditBaseInfo(userInfo) {
75
- setUserInfo(_objectSpread({}, userInfo));
74
+ var handleSuccessEditBaseInfo = function handleSuccessEditBaseInfo(data) {
75
+ setUserInfo(_objectSpread({}, data));
76
76
  };
77
77
 
78
78
  (0, _react.useEffect)(function () {
79
79
  (0, _requestApi.getUserInfoFun)().then(function (resp) {
80
80
  if (resp.Code === 1 && resp.Data) {
81
81
  setUserInfo(_objectSpread(_objectSpread({}, resp.Data), {}, {
82
- position: resp.Data.positionCode
82
+ position: resp.Data.positionCode,
83
+ deparmentId: resp.Data.departmentId,
84
+ deparmentName: resp.Data.departmentName
83
85
  }));
84
86
  }
85
87
  });
@@ -50,7 +50,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
50
50
  var Fields = _form["default"].Fields;
51
51
  var prefix = "titaui-edit-personal-info";
52
52
 
53
- function EditBaseInfo(props) {
53
+ var EditBaseInfo = function EditBaseInfo(props) {
54
54
  var visible = props.visible,
55
55
  _onCancel = props.onCancel,
56
56
  handleSuccessEditBaseInfo = props.handleSuccessEditBaseInfo,
@@ -62,21 +62,13 @@ function EditBaseInfo(props) {
62
62
  var _useState = (0, _react.useState)(false),
63
63
  _useState2 = _slicedToArray(_useState, 2),
64
64
  isDisable = _useState2[0],
65
- setIsDisable = _useState2[1];
65
+ setIsDisable = _useState2[1]; // const [isEdit, setIsEdit] = useState(false);
66
66
 
67
- var _useState3 = (0, _react.useState)(false),
67
+
68
+ var _useState3 = (0, _react.useState)(info),
68
69
  _useState4 = _slicedToArray(_useState3, 2),
69
- isEdit = _useState4[0],
70
- setIsEdit = _useState4[1];
71
-
72
- var _useState5 = (0, _react.useState)({
73
- name: "",
74
- email: "",
75
- mobile: ""
76
- }),
77
- _useState6 = _slicedToArray(_useState5, 2),
78
- userInfo = _useState6[0],
79
- setUserInfo = _useState6[1];
70
+ userInfo = _useState4[0],
71
+ setUserInfo = _useState4[1];
80
72
 
81
73
  var handleNameChange = function handleNameChange(value) {
82
74
  setUserInfo(_objectSpread(_objectSpread({}, userInfo), {}, {
@@ -87,9 +79,8 @@ function EditBaseInfo(props) {
87
79
  setIsDisable(true);
88
80
  } else {
89
81
  setIsDisable(false);
90
- }
82
+ } // setIsEdit(true);
91
83
 
92
- setIsEdit(true);
93
84
  };
94
85
 
95
86
  var handlePhoneChange = function handlePhoneChange(value) {
@@ -101,16 +92,14 @@ function EditBaseInfo(props) {
101
92
  setIsDisable(true);
102
93
  } else {
103
94
  setIsDisable(false);
104
- }
95
+ } // setIsEdit(true);
105
96
 
106
- setIsEdit(true);
107
97
  };
108
98
 
109
99
  var handleEmailChange = function handleEmailChange(value) {
110
100
  setUserInfo(_objectSpread(_objectSpread({}, userInfo), {}, {
111
101
  email: value || ""
112
- }));
113
- setIsEdit(true);
102
+ })); // setIsEdit(true);
114
103
  };
115
104
 
116
105
  var handleSaveUserInfo = function handleSaveUserInfo() {
@@ -138,14 +127,8 @@ function EditBaseInfo(props) {
138
127
  };
139
128
 
140
129
  (0, _react.useEffect)(function () {
141
- (0, _requestApi.getUserInfoFun)().then(function (resp) {
142
- if (resp.Code === 1 && resp.Data) {
143
- setUserInfo(_objectSpread(_objectSpread({}, resp.Data), {}, {
144
- position: resp.Data.positionCode
145
- }));
146
- }
147
- });
148
- }, []);
130
+ setUserInfo(info);
131
+ }, [info]);
149
132
  return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
150
133
  visible: visible,
151
134
  ref: modalRef,
@@ -233,7 +216,7 @@ function EditBaseInfo(props) {
233
216
  }],
234
217
  onChange: handleEmailChange
235
218
  }))));
236
- }
219
+ };
237
220
 
238
221
  var _default = EditBaseInfo;
239
222
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.78",
3
+ "version": "1.9.83",
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}
@@ -59,7 +59,7 @@ const ExportMapModal: FC<IProps> = (props: IProps) => {
59
59
  const width = okrMapRef.clientWidth; // 获取dom 宽度
60
60
  const height = okrMapRef.clientHeight; // 获取dom 高度
61
61
  const canvas = document.createElement("canvas"); // 创建一个canvas节点
62
- const scale = 20; // 定义任意放大倍数 支持小数
62
+ const scale = 10; // 定义任意放大倍数 支持小数 设置成20之后企业微信工作台导出不了
63
63
  canvas.width = width * scale; // 定义canvas 宽度 * 缩放
64
64
  canvas.height = height * scale; // 定义canvas高度 *缩放
65
65
  canvas.style.width = `${width}px`;
@@ -116,7 +116,7 @@ const ExportMapModal: FC<IProps> = (props: IProps) => {
116
116
  Toast.Warning("正在导出中", { canClose: true });
117
117
  return;
118
118
  }
119
- setIsExport(true);
119
+ // setIsExport(true);
120
120
  downloadImg();
121
121
  };
122
122
  const fitViewHandler = (instance) => {
@@ -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
  {