@titaui/pc 1.10.6-3.beta-1 → 1.10.6-3.beta-2

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.
@@ -38,7 +38,6 @@
38
38
  color: #2879ff;
39
39
  line-height: 18px;
40
40
  cursor: pointer;
41
- margin-right: 20px;
42
41
  display: inline-flex;
43
42
  align-items: center;
44
43
  }
@@ -58,6 +57,7 @@
58
57
  color: #2879ff;
59
58
  line-height: 18px;
60
59
  cursor: pointer;
60
+ margin-left: 20px;
61
61
  display: inline-flex;
62
62
  align-items: center;
63
63
  }
@@ -47,8 +47,13 @@ var EKrNode = function EKrNode(props) {
47
47
  var index = props.index,
48
48
  title = props.title,
49
49
  data = props.data,
50
- isOTask = props.isOTask;
50
+ isOTask = props.isOTask,
51
+ _props$hasAddProject = props.hasAddProject,
52
+ hasAddProject = _props$hasAddProject === void 0 ? true : _props$hasAddProject,
53
+ _props$hasRelation = props.hasRelation,
54
+ hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation;
51
55
  var btnRef = (0, _react.useRef)();
56
+ hasProject = hasProject && hasAddProject;
52
57
 
53
58
  var _useContext = (0, _react.useContext)(_context2.CommonContext),
54
59
  okrInfo = _useContext.okrInfo;
@@ -202,7 +207,7 @@ var EKrNode = function EKrNode(props) {
202
207
  icon: "tu-icon-Add-xiangmu",
203
208
  exIconClass: "e-kr-node-layer-icon",
204
209
  name: "addProject"
205
- }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Addproject"))) : /*#__PURE__*/_react["default"].createElement("span", null)), /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
210
+ }, /*#__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"], {
206
211
  popupPlacement: "bottomRight",
207
212
  onChange: openRelatePop,
208
213
  trigger: /*#__PURE__*/_react["default"].createElement("span", {
@@ -87,7 +87,11 @@ function ETaskNode(props) {
87
87
  title = props.title,
88
88
  data = props.data,
89
89
  createUserId = props.createUserId,
90
- krUser = props.krUser;
90
+ krUser = props.krUser,
91
+ _props$hasProgress = props.hasProgress,
92
+ hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
93
+ _props$hasRelation = props.hasRelation,
94
+ hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation;
91
95
 
92
96
  var _useState = (0, _react.useState)(false),
93
97
  _useState2 = _slicedToArray(_useState, 2),
@@ -369,7 +373,7 @@ function ETaskNode(props) {
369
373
  isLongTerm: dataInfo.isLongTerm,
370
374
  isCancel: dataInfo.status === 4,
371
375
  isComplete: dataInfo.status === 2
372
- })), /*#__PURE__*/_react["default"].createElement("span", {
376
+ })), hasProgress && /*#__PURE__*/_react["default"].createElement("span", {
373
377
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-progress ").concat((isGray || isCancel) && "".concat(_precls["default"], "__e-project-node-gray")))
374
378
  }, /*#__PURE__*/_react["default"].createElement(_progress["default"].Circle, {
375
379
  size: 22,
@@ -380,7 +384,7 @@ function ETaskNode(props) {
380
384
  linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearStartColor", dataInfo.status),
381
385
  linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearEndColor", dataInfo.status),
382
386
  backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "backgroundColor", dataInfo.status)
383
- })), okrInfo.status === 1 && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
387
+ })), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
384
388
  overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel"),
385
389
  placement: "top"
386
390
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -52,9 +52,19 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
52
52
  var preCls = "okr-detail-e";
53
53
 
54
54
  function _default(props) {
55
- var okrId = props.okrId;
55
+ var okrId = props.okrId,
56
+ _props$hasSearch = props.hasSearch,
57
+ hasSearch = _props$hasSearch === void 0 ? true : _props$hasSearch,
58
+ _props$formatTree = props.formatTree,
59
+ formatTree = _props$formatTree === void 0 ? _util.formatEListDataToSelectTree : _props$formatTree,
60
+ _props$startDate = props.startDate,
61
+ startDate = _props$startDate === void 0 ? '' : _props$startDate,
62
+ _props$endDate = props.endDate,
63
+ endDate = _props$endDate === void 0 ? '' : _props$endDate,
64
+ _props$toLevel = props.toLevel,
65
+ toLevel = _props$toLevel === void 0 ? 999 : _props$toLevel;
56
66
  var loginUser = (0, _bsGlobal.getUserInfo)().Id;
57
- var hasCondition = localStorage.getItem("hasRememberCondition".concat(loginUser));
67
+ var hasCondition = hasSearch && localStorage.getItem("hasRememberCondition".concat(loginUser));
58
68
 
59
69
  var _useState = (0, _react.useState)([]),
60
70
  _useState2 = _slicedToArray(_useState, 2),
@@ -111,8 +121,9 @@ function _default(props) {
111
121
  totalDataNum = _useState22[0],
112
122
  setTotalDataNum = _useState22[1];
113
123
 
114
- var getKrEsData = function getKrEsData() {
124
+ var getKrEsData = function getKrEsData(formatTree) {
115
125
  setLoading(true);
126
+ var formatEList = formatTree ? formatTree : _util.formatEListDataToSelectTree;
116
127
  (0, _requestApis.getKrsByCondition)({
117
128
  okrId: okrId,
118
129
  condition: (0, _util.formatCondition)({
@@ -121,11 +132,14 @@ function _default(props) {
121
132
  selectName: selectName,
122
133
  checkedStatus: checkedStatus,
123
134
  users: selectUsers,
124
- keyWord: searchKey
135
+ keyWord: searchKey,
136
+ startDate: startDate,
137
+ endDate: endDate,
138
+ toLevel: toLevel
125
139
  })
126
140
  }).then(function (krs) {
127
141
  debugger;
128
- var formatKrs = (0, _util.formatEListDataToSelectTree)(krs, okrId, (0, _util.getIfInitCondition)(selectName, checkedStatus, selectUsers, searchKey));
142
+ var formatKrs = formatEList(krs, okrId, (0, _util.getIfInitCondition)(selectName, checkedStatus, selectUsers, searchKey));
129
143
  var expandedKrEs = (formatKrs.krsEList || []).map(function (it) {
130
144
  return it.key;
131
145
  });
@@ -141,7 +155,8 @@ function _default(props) {
141
155
  };
142
156
 
143
157
  (0, _react.useEffect)(function () {
144
- getKrEsData();
158
+ // 可以接收一个格式化方法
159
+ getKrEsData(formatTree);
145
160
  }, [noteOrder, searchKey, selectName, checkedStatus, selectUsers]);
146
161
  (0, _react.useEffect)(function () {
147
162
  var oElistLength = oEList[0] && oEList[0].length || 0;
@@ -153,7 +168,7 @@ function _default(props) {
153
168
  }
154
169
  }, /*#__PURE__*/_react["default"].createElement("div", {
155
170
  className: preCls
156
- }, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
171
+ }, hasSearch && /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
157
172
  checkedStatus: checkedStatus,
158
173
  setCheckedStatus: setCheckedStatus,
159
174
  selectName: selectName,
@@ -163,7 +163,10 @@ var formatCondition = function formatCondition(_ref) {
163
163
  selectName = _ref.selectName,
164
164
  checkedStatus = _ref.checkedStatus,
165
165
  users = _ref.users,
166
- keyWord = _ref.keyWord;
166
+ keyWord = _ref.keyWord,
167
+ startDate = _ref.startDate,
168
+ endDate = _ref.endDate,
169
+ toLevel = _ref.toLevel;
167
170
  var resultStatus = [];
168
171
 
169
172
  if (checkedStatus.includes("all")) {
@@ -189,10 +192,12 @@ var formatCondition = function formatCondition(_ref) {
189
192
  pageIndex: 1,
190
193
  FeedId: 0,
191
194
  filter: 1,
192
- toLevel: 999,
195
+ toLevel: toLevel || 999,
193
196
  app_id: 1,
194
197
  app_type: 1,
195
198
  FilterKey: keyWord,
199
+ startDate: startDate || '',
200
+ endDate: endDate || '',
196
201
  status: resultStatus.join(","),
197
202
  userObjects: users.map(function (user) {
198
203
  return {
@@ -25,6 +25,8 @@ var _utils = require("./utils");
25
25
 
26
26
  var _getLocale = require("../../utils/getLocale");
27
27
 
28
+ var _dangerousHtml = _interopRequireDefault(require("../dynamic/components/dangerous-html"));
29
+
28
30
  require("./index.css");
29
31
 
30
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -128,7 +130,9 @@ var Detail = function Detail(_ref) {
128
130
  src: _progressLeftQuoto["default"]
129
131
  }) : null, /*#__PURE__*/_react["default"].createElement("span", {
130
132
  className: "".concat($prefix, "__content")
131
- }, content && content.trim())), /*#__PURE__*/_react["default"].createElement("div", {
133
+ }, content && /*#__PURE__*/_react["default"].createElement(_dangerousHtml["default"], {
134
+ htmlText: content.trim()
135
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
132
136
  className: "".concat($prefix, "__content-bottom")
133
137
  }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _utils.getTimeString)(time, nowTime)), canEdit && isMouseEnterDetail ? /*#__PURE__*/_react["default"].createElement("span", {
134
138
  className: "".concat($prefix, "__bottom-func-btns")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.10.63.beta-1",
3
+ "version": "1.10.63.beta-2",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",