@titaui/pc 1.11.52-beta.13 → 1.11.52-beta.14

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 (23) hide show
  1. package/lib/components/drop-selector/index.js +1 -2
  2. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +2 -2
  3. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +2 -2
  4. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +3 -1
  5. package/lib/components/okr-detail/components/header/edit-name.js +10 -18
  6. package/lib/components/okr-detail/components/header/index.js +14 -7
  7. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +78 -42
  8. package/lib/components/okr-flow/export-modal/index.js +26 -16
  9. package/lib/components/progress/circle-progress/index.css +2 -0
  10. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +8 -3
  11. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +4 -2
  12. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +3 -3
  13. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +8 -2
  14. package/lib/components/task-tree/task-item-node/index.css +2 -2
  15. package/lib/components/upload/components/uploadedPreview.js +18 -18
  16. package/lib/components/upload/index.js +57 -29
  17. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +14 -15
  18. package/lib/components/user-selector/searched-panel/index.js +12 -6
  19. package/lib/pages/new-okr-list/header/index.js +16 -18
  20. package/lib/utils/auth.js +12 -0
  21. package/lib/utils/hooks.js +19 -5
  22. package/lib/utils/tita-okr-cycle.js +24 -0
  23. package/package.json +2 -2
@@ -156,8 +156,7 @@ function DropSelector(props) {
156
156
  }
157
157
 
158
158
  var handlePopVisibleChange = (0, _react.useCallback)(function (visible) {
159
- console.log('visible' in props);
160
-
159
+ // console.log('visible' in props)
161
160
  if (!('visible' in props)) {
162
161
  setVisible(visible);
163
162
  }
@@ -133,7 +133,7 @@ var DynamicAlign = function DynamicAlign(_ref) {
133
133
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
134
134
  isPercent: true,
135
135
  text: /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
136
- str: (0, _tools.htmlDecodeByRegExp)(parentObjName),
136
+ str: (0, _openData.parseString)((0, _tools.htmlDecodeByRegExp)(parentObjName)),
137
137
  keyWord: searchKeyWord
138
138
  })
139
139
  })), /*#__PURE__*/_react["default"].createElement("div", {
@@ -170,7 +170,7 @@ var DynamicAlign = function DynamicAlign(_ref) {
170
170
  }
171
171
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
172
172
  isPercent: true,
173
- text: (0, _tools.htmlDecodeByRegExp)(okrName)
173
+ text: (0, _openData.parseString)((0, _tools.htmlDecodeByRegExp)(okrName))
174
174
  })), /*#__PURE__*/_react["default"].createElement("div", {
175
175
  className: "".concat(prefix, "__obj-other-info")
176
176
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -176,7 +176,7 @@ var DynamicRelative = function DynamicRelative(_ref) {
176
176
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
177
177
  isPercent: true,
178
178
  text: /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
179
- str: (0, _tools.htmlDecodeByRegExp)(relateObjName),
179
+ str: (0, _openData.parseString)((0, _tools.htmlDecodeByRegExp)(relateObjName)),
180
180
  keyWord: searchKeyWord
181
181
  })
182
182
  })), /*#__PURE__*/_react["default"].createElement("div", {
@@ -213,7 +213,7 @@ var DynamicRelative = function DynamicRelative(_ref) {
213
213
  }
214
214
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
215
215
  isPercent: true,
216
- text: (0, _tools.htmlDecodeByRegExp)(objName)
216
+ text: (0, _openData.parseString)((0, _tools.htmlDecodeByRegExp)(objName))
217
217
  })), /*#__PURE__*/_react["default"].createElement("div", {
218
218
  className: "".concat(prefix, "__obj-other-info")
219
219
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -29,6 +29,8 @@ var _getLocale = require("../../../../utils/getLocale");
29
29
 
30
30
  var _tools = require("../../../../utils/tools");
31
31
 
32
+ var _openData = require("../../../../utils/open-data");
33
+
32
34
  require("./index.css");
33
35
 
34
36
  var _excluded = ["data"];
@@ -95,7 +97,7 @@ var DynamicReply = function DynamicReply(_ref) {
95
97
  className: "".concat(prefix, "__object-name"),
96
98
  onClick: handleClickOTitle
97
99
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
98
- text: (0, _tools.htmlDecodeByRegExp)(data.obj.objName),
100
+ text: (0, _openData.parseString)((0, _tools.htmlDecodeByRegExp)(data.obj.objName)),
99
101
  isPercent: true
100
102
  })), "\u4E0B\u5173\u952E\u6210\u679C\u7684\u590D\u76D8");
101
103
  }
@@ -69,13 +69,9 @@ function EditNameCmp(props) {
69
69
  errorTip = _useState4[0],
70
70
  setErrorTip = _useState4[1];
71
71
 
72
- var _useState5 = (0, _react.useState)({
73
- mentionUsers: [],
74
- pureText: '',
75
- pureTextExcludeAt: '',
76
- richText: okrName,
77
- state: 'normal'
78
- }),
72
+ var _useState5 = (0, _react.useState)(_objectSpread(_objectSpread({}, okrName), {}, {
73
+ editorState: 'normal'
74
+ })),
79
75
  _useState6 = _slicedToArray(_useState5, 2),
80
76
  okrNameData = _useState6[0],
81
77
  setOkrNameData = _useState6[1];
@@ -111,19 +107,15 @@ function EditNameCmp(props) {
111
107
  setEditing(false);
112
108
  setErrorTip('');
113
109
  setOkrNameData(function (prevData) {
114
- return {
115
- mentionUsers: [],
116
- pureText: okrName,
117
- pureTextExcludeAt: okrName,
118
- richText: (0, _richEditor.TitaRichEditorInitTextState)(okrName),
119
- state: prevData.state === 'normal' ? 'reset' : 'normal'
120
- };
110
+ return _objectSpread(_objectSpread({}, okrName), {}, {
111
+ editorState: prevData.editorState === 'normal' ? 'reset' : 'normal'
112
+ });
121
113
  });
122
114
  };
123
115
 
124
116
  var confiremEditHandle = /*#__PURE__*/function () {
125
117
  var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
126
- var mentionUsers, pureText, pureTextExcludeAt, richText, data;
118
+ var mentionUsers, pureText, richText, data;
127
119
  return regeneratorRuntime.wrap(function _callee$(_context) {
128
120
  while (1) {
129
121
  switch (_context.prev = _context.next) {
@@ -136,9 +128,9 @@ function EditNameCmp(props) {
136
128
  return _context.abrupt("return");
137
129
 
138
130
  case 2:
139
- mentionUsers = okrNameData.mentionUsers, pureText = okrNameData.pureText, pureTextExcludeAt = okrNameData.pureTextExcludeAt, richText = okrNameData.richText;
131
+ mentionUsers = okrNameData.mentionUsers, pureText = okrNameData.pureText, richText = okrNameData.richText;
140
132
 
141
- if (!(okrName == pureTextExcludeAt)) {
133
+ if (!(okrName.pureText == pureText)) {
142
134
  _context.next = 6;
143
135
  break;
144
136
  }
@@ -187,7 +179,7 @@ function EditNameCmp(props) {
187
179
  }, /*#__PURE__*/_react["default"].createElement("div", {
188
180
  className: (0, _classnames["default"])("".concat(prefixCls, "-input"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-input--editable"), editable), _defineProperty(_classNames, "".concat(prefixCls, "-input--editing"), editing), _defineProperty(_classNames, "".concat(prefixCls, "-input--error"), errorTip.length > 0), _classNames))
189
181
  }, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
190
- key: okrNameData.state,
182
+ key: okrNameData.editorState,
191
183
  editable: editable,
192
184
  initialState: okrNameData.richText,
193
185
  manualWrap: true,
@@ -68,12 +68,19 @@ function Header(props) {
68
68
 
69
69
  // 外部取到的 headInfo
70
70
  var okrInfo = props.okrInfo;
71
- var workNameRichText = okrInfo.workNameRichText ? JSON.parse(okrInfo.workNameRichText) : (0, _richEditor.TitaRichEditorInitTextState)(okrInfo.workName);
72
-
73
- var _useState = (0, _react.useState)(workNameRichText),
71
+ var workName = okrInfo.workName,
72
+ workNameRichText = okrInfo.workNameRichText;
73
+ var richText = workNameRichText ? JSON.parse(workNameRichText) : (0, _richEditor.TitaRichEditorInitTextState)(workName);
74
+
75
+ var _useState = (0, _react.useState)({
76
+ mentionsUsers: [],
77
+ pureText: workName,
78
+ pureTextExcludeAt: workName,
79
+ richText: richText
80
+ }),
74
81
  _useState2 = _slicedToArray(_useState, 2),
75
- okrName = _useState2[0],
76
- setOkrName = _useState2[1];
82
+ okrNameData = _useState2[0],
83
+ setOkrNameData = _useState2[1];
77
84
 
78
85
  var _useContext = (0, _react.useContext)(_context.GeneralDataContext),
79
86
  generalPrincipalUser = _useContext.generalPrincipalUser,
@@ -162,9 +169,9 @@ function Header(props) {
162
169
  className: "".concat(precls, "__content")
163
170
  }, /*#__PURE__*/_react["default"].createElement(_editName["default"], {
164
171
  editable: editable,
165
- okrName: okrName,
172
+ okrName: okrNameData,
166
173
  okrId: okrInfo.workId,
167
- setOkrName: setOkrName
174
+ setOkrName: setOkrNameData
168
175
  }), /*#__PURE__*/_react["default"].createElement("section", {
169
176
  className: "".concat(precls, "__action")
170
177
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -21,6 +21,8 @@ var _precls = _interopRequireDefault(require("../../precls"));
21
21
 
22
22
  var _drawerManager = _interopRequireDefault(require("../../../../../drawer-manager"));
23
23
 
24
+ var _taskRelationModal = _interopRequireDefault(require("../../../../../task-relation-modal"));
25
+
24
26
  var _auth = require("../../../../../../utils/auth");
25
27
 
26
28
  var _tooltipText = _interopRequireDefault(require("../../../../../tooltip/tooltip-text"));
@@ -43,10 +45,25 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
43
45
 
44
46
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
45
47
 
46
- var hasProject = (0, _bsGlobal.hasWebHead)("project");
48
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
49
+
50
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
51
+
52
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
53
+
54
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
55
+
56
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
57
+
58
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
59
+
60
+ var hasProject = (0, _bsGlobal.hasWebHead)('project');
61
+ var RelationTaskModel = _taskRelationModal["default"].RelationTaskModel,
62
+ RelationWorkModel = _taskRelationModal["default"].RelationWorkModel;
63
+ var baseAuth = new _auth.BaseAuth();
47
64
 
48
65
  var EKrNode = function EKrNode(props) {
49
- var _okrInfo$authority;
66
+ var _window, _window$BSGlobal, _window$BSGlobal$Work, _window$BSGlobal$Work2, _okrInfo$authority;
50
67
 
51
68
  var index = props.index,
52
69
  title = props.title,
@@ -62,6 +79,19 @@ var EKrNode = function EKrNode(props) {
62
79
  var _useContext2 = (0, _react.useContext)(_context2.EListContext),
63
80
  refreshEList = _useContext2.refreshEList;
64
81
 
82
+ var _useState = (0, _react.useState)(false),
83
+ _useState2 = _slicedToArray(_useState, 2),
84
+ isShowWork = _useState2[0],
85
+ setIsShowWork = _useState2[1];
86
+
87
+ var _useState3 = (0, _react.useState)(false),
88
+ _useState4 = _slicedToArray(_useState3, 2),
89
+ isShowTask = _useState4[0],
90
+ setIsShowTask = _useState4[1];
91
+
92
+ var onlySuperCreateWork = (_window = window) === null || _window === void 0 ? void 0 : (_window$BSGlobal = _window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$Work = _window$BSGlobal.WorkAdvancedSetting) === null || _window$BSGlobal$Work === void 0 ? void 0 : (_window$BSGlobal$Work2 = _window$BSGlobal$Work.WorkFunctionSetting) === null || _window$BSGlobal$Work2 === void 0 ? void 0 : _window$BSGlobal$Work2.WorkCreate; //开启后,仅超管、目标管理员、老板/助理可创建项目
93
+
94
+ var canCreateWork = baseAuth.isBoss() || baseAuth.isManager() || baseAuth.isWorkManager() || baseAuth.isAssistant() || !onlySuperCreateWork;
65
95
  var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
66
96
  var hasRelativeAuth;
67
97
 
@@ -87,7 +117,7 @@ var EKrNode = function EKrNode(props) {
87
117
  while (1) {
88
118
  switch (_context.prev = _context.next) {
89
119
  case 0:
90
- if (name === "addTask") {
120
+ if (name === 'addTask') {
91
121
  params = {
92
122
  objId: data.workId,
93
123
  objType: 4,
@@ -107,7 +137,7 @@ var EKrNode = function EKrNode(props) {
107
137
  allowObjectOptions: false
108
138
  }
109
139
  }).then(function () {
110
- _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
140
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
111
141
  canClose: false
112
142
  });
113
143
 
@@ -118,7 +148,7 @@ var EKrNode = function EKrNode(props) {
118
148
  okrId: data.workId,
119
149
  krId: data.mileStoneId
120
150
  }).then(function () {
121
- _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
151
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
122
152
  canClose: false
123
153
  });
124
154
 
@@ -139,38 +169,29 @@ var EKrNode = function EKrNode(props) {
139
169
  };
140
170
  }(), []);
141
171
  var openRelatePop = (0, _react.useCallback)(function (name) {
142
- if (name === "relateTask") {
143
- window.openRelateTaskPop(btnRef.current, {
144
- okrId: data.workId,
145
- krId: data.mileStoneId
146
- }).then(function () {
147
- _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
148
- canClose: false
149
- });
150
-
151
- setTimeout(refreshEList, 2000);
152
- })["catch"](function (e) {
153
- _toast["default"].Error(e, {
154
- canClose: false
155
- });
156
- });
172
+ if (name === 'relateTask') {
173
+ setIsShowTask(true);
157
174
  } else {
158
- window.openRelateProjectPop(btnRef.current, {
159
- okrId: data.workId,
160
- krId: data.mileStoneId
161
- }).then(function () {
162
- _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
163
- canClose: false
164
- });
165
-
166
- setTimeout(refreshEList, 2000);
167
- })["catch"](function (e) {
168
- _toast["default"].Error(e.errorMsg, {
169
- canClose: false
170
- });
171
- });
175
+ setIsShowWork(true);
172
176
  }
173
- });
177
+ }, []);
178
+
179
+ var onModelCancel = function onModelCancel() {
180
+ setIsShowTask(false);
181
+ };
182
+
183
+ var onModelWorkCancel = function onModelWorkCancel() {
184
+ setIsShowWork(false);
185
+ };
186
+
187
+ var onModelOk = function onModelOk(data) {
188
+ setTimeout(refreshEList, 2000);
189
+ };
190
+
191
+ var onModelWorkOK = function onModelWorkOK(data) {
192
+ setTimeout(refreshEList, 2000);
193
+ };
194
+
174
195
  return /*#__PURE__*/_react["default"].createElement("div", {
175
196
  key: index,
176
197
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-kr-node"))
@@ -182,7 +203,7 @@ var EKrNode = function EKrNode(props) {
182
203
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-kr-node-title")),
183
204
  onClick: function onClick() {
184
205
  if (data.mileStoneId) {
185
- _drawerManager["default"].open("krDetail", {
206
+ _drawerManager["default"].open('krDetail', {
186
207
  krId: data.mileStoneId
187
208
  });
188
209
  }
@@ -201,32 +222,47 @@ var EKrNode = function EKrNode(props) {
201
222
  ref: btnRef
202
223
  }, /*#__PURE__*/_react["default"].createElement("span", {
203
224
  className: "tu-icon-add1"
204
- }), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Newlybuild"))
225
+ }), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Newlybuild'))
205
226
  }, /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
206
227
  icon: "tu-icon-Add-renwu",
207
228
  exIconClass: "e-kr-node-layer-icon",
208
229
  name: "addTask"
209
- }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Addtask"))), hasProject ? /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
230
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Addtask'))), hasProject && canCreateWork ? /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
210
231
  icon: "tu-icon-Add-xiangmu",
211
232
  exIconClass: "e-kr-node-layer-icon",
212
233
  name: "addProject"
213
- }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Addproject"))) : /*#__PURE__*/_react["default"].createElement("span", null)), hasRelation && /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
234
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Addproject'))) : /*#__PURE__*/_react["default"].createElement("span", null)), hasRelation && /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
214
235
  popupPlacement: "bottomRight",
215
236
  onChange: openRelatePop,
216
237
  trigger: /*#__PURE__*/_react["default"].createElement("span", {
217
238
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-kr-node-actions-connect"))
218
239
  }, /*#__PURE__*/_react["default"].createElement("span", {
219
240
  className: "tu-icon-guanlian e-kr-node__guanlian-icon"
220
- }), (0, _getLocale.getLocale)("Mod_Associate"))
241
+ }), (0, _getLocale.getLocale)('Mod_Associate'))
221
242
  }, /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
222
243
  icon: "tu-icon-GL-renwu",
223
244
  exIconClass: "e-kr-node-layer-icon",
224
245
  name: "relateTask"
225
- }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Assotask"))), hasProject ? /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
246
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Assotask'))), hasProject ? /*#__PURE__*/_react["default"].createElement(_dropSelector.IconItem, {
226
247
  icon: "tu-icon-GL-xiangmu",
227
248
  exIconClass: "e-kr-node-layer-icon",
228
249
  name: "relateProject"
229
- }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_AssProjects"))) : /*#__PURE__*/_react["default"].createElement("span", null))) : null);
250
+ }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_E_Butt_AssProjects'))) : /*#__PURE__*/_react["default"].createElement("span", null)), isShowTask && /*#__PURE__*/_react["default"].createElement(RelationTaskModel, {
251
+ noScreen: true,
252
+ zIndex: 2400,
253
+ krId: data === null || data === void 0 ? void 0 : data.mileStoneId,
254
+ okrId: data.workId,
255
+ defaultVisible: true,
256
+ onCancel: onModelCancel,
257
+ onRelateSuccess: onModelOk
258
+ }), isShowWork && /*#__PURE__*/_react["default"].createElement(RelationWorkModel, {
259
+ zIndex: 2400,
260
+ krId: data === null || data === void 0 ? void 0 : data.mileStoneId,
261
+ okrId: data.workId,
262
+ defaultVisible: true,
263
+ onCancel: onModelWorkCancel,
264
+ onRelateSuccess: onModelWorkOK
265
+ })) : null);
230
266
  };
231
267
 
232
268
  var _default = EKrNode;
@@ -201,31 +201,41 @@ var ExportMapModal = function ExportMapModal(props) {
201
201
  }
202
202
 
203
203
  size = size / 1024 / 1024; // @ts-ignore
204
+ // window.titaTracker && window.titaTracker("action").record({
205
+ // actionName: userId+'租户:'+telentId+'我得到了图片大小为:'+size+',路径为'+imgUrl.slice(1,200),
206
+ // actionGroup: 'okr地图图片',
207
+ // productName: 'okr地图导出',
208
+ // });
204
209
 
205
210
  // @ts-ignore
206
- window.titaTracker && window.titaTracker("action").record({
207
- actionName: userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl.slice(1, 200),
208
- actionGroup: 'okr地图图片',
209
- productName: 'okr地图导出'
210
- });
211
+ // window.titaTracker && window.titaTracker("action").record({
212
+ // actionName: userId+'租户:'+telentId+'我得到了图片大小为:'+size+',路径为'+imgUrl.slice(1,200),
213
+ // actionGroup: 'okr地图图片',
214
+ // productName: 'okr地图导出',
215
+ // });
211
216
  Sentry.withScope(function (scope) {
212
- scope.setTag("error-level", "P0");
213
- scope.setTag("error-type", "地图导出-图片生成");
214
- scope.setExtra("userMessage", userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
217
+ scope.setTag('error-level', "P0");
218
+ scope.setTag('error-type', '地图导出-图片生成');
219
+ scope.setExtra('userMessage', userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
215
220
  });
216
221
  (0, _requestApis.getBase64DownloadUrl)(imgUrl.split(',')[1]).then(function (url) {
217
222
  var image = new Image(); // @ts-ignore
223
+ // window.titaTracker && window.titaTracker("action").record({
224
+ // actionName: userId+'租户:'+telentId+'我获得了地址'+url.Data.obj,
225
+ // actionGroup: 'okr地图接口',
226
+ // productName: 'okr地图导出',
227
+ // });
218
228
 
219
229
  // @ts-ignore
220
- window.titaTracker && window.titaTracker("action").record({
221
- actionName: userId + '租户:' + telentId + '我获得了地址' + url.Data.obj,
222
- actionGroup: 'okr地图接口',
223
- productName: 'okr地图导出'
224
- });
230
+ // window.titaTracker && window.titaTracker("action").record({
231
+ // actionName: userId+'租户:'+telentId+'我获得了地址'+url.Data.obj,
232
+ // actionGroup: 'okr地图接口',
233
+ // productName: 'okr地图导出',
234
+ // });
225
235
  Sentry.withScope(function (scope) {
226
- scope.setTag("error-level", "P0");
227
- scope.setTag("error-type", "地图导出-图片地址");
228
- scope.setExtra("userMessage", userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
236
+ scope.setTag('error-level', "P0");
237
+ scope.setTag('error-type', '地图导出-图片地址');
238
+ scope.setExtra('userMessage', userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
229
239
  });
230
240
 
231
241
  _toast["default"].Warning('图片上传成功,准备本地下载', {
@@ -7,4 +7,6 @@
7
7
  .titaui-progress-circle .text-content {
8
8
  font-size: 12px;
9
9
  color: #89919f;
10
+ overflow: hidden;
11
+ text-overflow: ellipsis;
10
12
  }
@@ -29,7 +29,7 @@ var _getLocale = require("../../../../utils/getLocale");
29
29
 
30
30
  require("./index.css");
31
31
 
32
- var _excluded = ["defaultVisible", "multiple", "onOk", "onCancel", "krId", "okrId", "isRelationOther", "onRelateSuccess", "lastSelected"];
32
+ var _excluded = ["defaultVisible", "multiple", "onOk", "onCancel", "krId", "okrId", "zIndex", "isRelationOther", "onRelateSuccess", "noScreen", "lastSelected"];
33
33
 
34
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
35
 
@@ -76,9 +76,13 @@ function OkrRelationTaskModal(props) {
76
76
  onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel,
77
77
  krId = props.krId,
78
78
  okrId = props.okrId,
79
+ _props$zIndex = props.zIndex,
80
+ zIndex = _props$zIndex === void 0 ? 1000 : _props$zIndex,
79
81
  _props$isRelationOthe = props.isRelationOther,
80
82
  isRelationOther = _props$isRelationOthe === void 0 ? false : _props$isRelationOthe,
81
83
  onRelateSuccess = props.onRelateSuccess,
84
+ _props$noScreen = props.noScreen,
85
+ noScreen = _props$noScreen === void 0 ? false : _props$noScreen,
82
86
  _props$lastSelected = props.lastSelected,
83
87
  lastSelected = _props$lastSelected === void 0 ? [] : _props$lastSelected,
84
88
  restProps = _objectWithoutProperties(props, _excluded);
@@ -220,7 +224,7 @@ function OkrRelationTaskModal(props) {
220
224
  height: '590px'
221
225
  },
222
226
  width: 840,
223
- zIndex: 1000,
227
+ zIndex: zIndex,
224
228
  noHeadLine: true,
225
229
  noFooterLine: true // getContainer={getContainer}
226
230
  ,
@@ -246,7 +250,8 @@ function OkrRelationTaskModal(props) {
246
250
  setSelected: setSelected,
247
251
  data: taskData,
248
252
  multiple: true,
249
- pageSize: pageSize
253
+ pageSize: pageSize,
254
+ noScreen: noScreen
250
255
  })), !!total && /*#__PURE__*/_react["default"].createElement("div", {
251
256
  className: "".concat(preCls, "__content-pagination")
252
257
  }, /*#__PURE__*/_react["default"].createElement(_pagination["default"], {
@@ -21,7 +21,7 @@ var _getLocale = require("../../../../utils/getLocale");
21
21
 
22
22
  require("./index.css");
23
23
 
24
- var _excluded = ["defaultVisible", "multiple", "onOk", "onCancel", "onRelateSuccess", "krId", "okrId", "isRelationOther", "lastSelected"];
24
+ var _excluded = ["defaultVisible", "multiple", "onOk", "onCancel", "onRelateSuccess", "krId", "zIndex", "okrId", "isRelationOther", "lastSelected"];
25
25
 
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
27
 
@@ -59,6 +59,8 @@ function OkrRelationWorkModal(props) {
59
59
  onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel,
60
60
  onRelateSuccess = props.onRelateSuccess,
61
61
  krId = props.krId,
62
+ _props$zIndex = props.zIndex,
63
+ zIndex = _props$zIndex === void 0 ? 1000 : _props$zIndex,
62
64
  okrId = props.okrId,
63
65
  _props$isRelationOthe = props.isRelationOther,
64
66
  isRelationOther = _props$isRelationOthe === void 0 ? false : _props$isRelationOthe,
@@ -111,7 +113,7 @@ function OkrRelationWorkModal(props) {
111
113
  height: '590px'
112
114
  },
113
115
  width: 840,
114
- zIndex: 1000,
116
+ zIndex: zIndex,
115
117
  noHeadLine: true,
116
118
  noFooterLine: true // getContainer={getContainer}
117
119
  ,
@@ -3,13 +3,13 @@
3
3
  display: flex;
4
4
  align-items: center;
5
5
  justify-content: center;
6
- color: #A4ACB9;
6
+ color: #a4acb9;
7
7
  }
8
8
 
9
9
  .okr-relation-tree__header {
10
10
  font-size: 12px;
11
11
  font-weight: 400;
12
- color: #A4ACB9;
12
+ color: #a4acb9;
13
13
  position: relative;
14
14
  display: flex;
15
15
  align-items: center;
@@ -50,7 +50,7 @@
50
50
  .okr-relation-tree__content {
51
51
  margin-right: -32px;
52
52
  margin-left: -4px;
53
- height: 305px;
53
+ height: 320px;
54
54
  font-size: 14px;
55
55
  font-weight: 400;
56
56
  line-height: 22px;
@@ -48,7 +48,9 @@ var TaskTree = function TaskTree(_ref) {
48
48
  setSelected = _ref.setSelected,
49
49
  pageSize = _ref.pageSize,
50
50
  _ref$isWork = _ref.isWork,
51
- isWork = _ref$isWork === void 0 ? false : _ref$isWork;
51
+ isWork = _ref$isWork === void 0 ? false : _ref$isWork,
52
+ _ref$noScreen = _ref.noScreen,
53
+ noScreen = _ref$noScreen === void 0 ? false : _ref$noScreen;
52
54
  var scrollStyle = {
53
55
  height: '100%',
54
56
  backgroundColor: 'transparent',
@@ -59,7 +61,11 @@ var TaskTree = function TaskTree(_ref) {
59
61
  if (isWork) {
60
62
  window.open("#work?work_id=".concat(id, "&to_user_id=").concat((0, _helpers.getLoginUserInfo)().Id, "&status=1"));
61
63
  } else {
62
- window.Talent.app.vent.trigger('global-pull-screen', id, 'task');
64
+ if (noScreen) {
65
+ window.open("https://".concat(location.host).concat(location.pathname, "#more/taskinfo?id=").concat(id));
66
+ } else {
67
+ window.Talent.app.vent.trigger('global-pull-screen', id, 'task');
68
+ }
63
69
  }
64
70
  };
65
71
 
@@ -107,7 +107,7 @@
107
107
  top: 3px;
108
108
  color: #89919f;
109
109
  cursor: auto;
110
- width: 68px;
110
+ width: 72px;
111
111
  margin-left: 20px;
112
112
  }
113
113
 
@@ -263,7 +263,7 @@
263
263
  top: 3px;
264
264
  color: #89919f;
265
265
  cursor: auto;
266
- width: 68px;
266
+ width: 72px;
267
267
  margin-left: 20px;
268
268
  }
269
269