@titaui/pc 1.11.48-beta.1 → 1.11.48-beta.4

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 (45) hide show
  1. package/lib/components/checkbox/index.css +4 -0
  2. package/lib/{pages/aha2021 → components/contact-kefu}/img/canceled.svg +0 -0
  3. package/lib/{pages/aha2021 → components/contact-kefu}/img/kefu.svg +0 -0
  4. package/lib/{pages/aha2021 → components/contact-kefu}/img/not-try.png +0 -0
  5. package/lib/components/contact-kefu/img/notice.png +0 -0
  6. package/lib/{pages/aha2021 → components/contact-kefu}/img/try.png +0 -0
  7. package/lib/components/contact-kefu/index.css +85 -0
  8. package/lib/components/contact-kefu/index.js +102 -0
  9. package/lib/components/form/form-fields/radios/index.css +4 -0
  10. package/lib/components/form/form-fields/radios/index.js +4 -3
  11. package/lib/components/okr-detail/components/base-okr-type/index.css +4 -0
  12. package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -0
  13. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +9 -5
  14. package/lib/components/radio/index.css +3 -3
  15. package/lib/components/task-relation-modal/helper.js +73 -3
  16. package/lib/components/task-relation-modal/image/loading.gif +0 -0
  17. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +12 -1
  18. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +19 -4
  19. package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +16 -4
  20. package/lib/components/task-relation-modal/okr-relation/request-api.js +18 -5
  21. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +3 -2
  22. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +2 -2
  23. package/lib/components/task-relation-modal/request-api.js +1 -1
  24. package/lib/components/task-relation-modal/search/principal.js +19 -3
  25. package/lib/components/task-relation-modal/search/task-status-select.js +1 -4
  26. package/lib/components/task-relation-modal/search/work-status-select.js +6 -4
  27. package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +15 -2
  28. package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
  29. package/lib/components/task-relation-modal/tree/work-list/index.js +14 -4
  30. package/lib/components/task-relation-modal/tree/work-list/search-form.js +15 -9
  31. package/lib/components/task-relation-modal/tree-node/category-node/index.css +0 -11
  32. package/lib/components/task-relation-modal/tree-node/category-node/index.js +1 -3
  33. package/lib/components/task-relation-modal/tree-node/kr-node/index.css +0 -16
  34. package/lib/components/task-relation-modal/tree-node/kr-node/index.js +0 -6
  35. package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +0 -16
  36. package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +0 -4
  37. package/lib/components/textarea/index.js +38 -35
  38. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +4 -2
  39. package/lib/components-v1/radio/radio.js +1 -1
  40. package/lib/index.js +8 -0
  41. package/lib/pages/aha2021/index.css +1 -26
  42. package/lib/pages/aha2021/index.js +3 -82
  43. package/lib/pages/new-okr-list/header/index.css +1 -1
  44. package/lib/utils/planDataJson.js +11115 -0
  45. package/package.json +1 -1
@@ -9,6 +9,10 @@
9
9
  box-sizing: border-box;
10
10
  }
11
11
 
12
+ .titaui-checkbox:hover {
13
+ border: 1px solid #2879ff;
14
+ }
15
+
12
16
  .titaui-checkbox--checked {
13
17
  background: url(./checked.svg) transparent no-repeat 50% 50%;
14
18
  border: none;
@@ -0,0 +1,85 @@
1
+ .contact-kefu {
2
+ position: relative;
3
+ height: 100vh;
4
+ background: #f0f4fa;
5
+ overflow: hidden;
6
+ }
7
+
8
+ .contact-kefu__kefu {
9
+ position: absolute;
10
+ bottom: 74px;
11
+ right: 24px;
12
+ z-index: 2;
13
+ }
14
+
15
+ .contact-kefu__try-kefu {
16
+ position: absolute;
17
+ bottom: 134px;
18
+ right: 24px;
19
+ z-index: 2;
20
+ }
21
+
22
+ .contact-kefu__kefu {
23
+ width: 42px;
24
+ height: 42px;
25
+ background: url("./img/kefu.svg") no-repeat;
26
+ background-color: #fff;
27
+ background-size: 42px;
28
+ box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
29
+ cursor: pointer;
30
+ border-radius: 50%;
31
+ }
32
+
33
+ .contact-kefu__hidden {
34
+ background-image: none;
35
+ }
36
+
37
+ .contact-kefu__cancel {
38
+ height: 100%;
39
+ background: url("./img/canceled.svg") 50% 50% no-repeat;
40
+ animation-duration: 0.3s;
41
+ animation-name: kefuActive;
42
+ }
43
+
44
+ .contact-kefu__popup {
45
+ width: 332px;
46
+ height: 376px;
47
+ display: flex;
48
+ flex-direction: column;
49
+ justify-content: center;
50
+ align-items: center;
51
+ background: #ffffff;
52
+ box-shadow: 0px 8px 24px 0px rgba(127, 145, 180, 0.16);
53
+ border-radius: 24px;
54
+ }
55
+
56
+ .contact-kefu__popup-title {
57
+ font-size: 20px;
58
+ font-weight: 600;
59
+ color: #141c28;
60
+ line-height: 30px;
61
+ }
62
+
63
+ .contact-kefu__popup-content {
64
+ margin-top: 4px;
65
+ font-size: 14px;
66
+ font-weight: normal;
67
+ color: #6f7886;
68
+ line-height: 22px;
69
+ }
70
+
71
+ .contact-kefu__popup-img {
72
+ width: 200px;
73
+ height: 200px;
74
+ margin-top: 24px;
75
+ }
76
+
77
+ @keyframes contentOpacity {
78
+ from {
79
+ opacity: 0;
80
+ }
81
+
82
+ to {
83
+ opacity: 1;
84
+ }
85
+ }
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _tooltip = _interopRequireDefault(require("../tooltip"));
15
+
16
+ var _popup = _interopRequireDefault(require("../popup"));
17
+
18
+ var _platform = require("../../utils/platform");
19
+
20
+ var _notTry = _interopRequireDefault(require("./img/not-try.png"));
21
+
22
+ var _try = _interopRequireDefault(require("./img/try.png"));
23
+
24
+ require("./index.css");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
28
+ 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); }
29
+
30
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
+
32
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
33
+
34
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
35
+
36
+ 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."); }
37
+
38
+ 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); }
39
+
40
+ 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; }
41
+
42
+ 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; }
43
+
44
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
+
46
+ var preCls = "contact-kefu";
47
+
48
+ var ContactKefu = function ContactKefu() {
49
+ var _useState = (0, _react.useState)(false),
50
+ _useState2 = _slicedToArray(_useState, 2),
51
+ visible = _useState2[0],
52
+ setVisible = _useState2[1];
53
+
54
+ var handleShowCode = function handleShowCode() {
55
+ setVisible(true);
56
+ };
57
+
58
+ var isTrial = window.BSGlobal.tenantAuthentication.Version === 1 && (0, _platform.isOfficialSite)();
59
+
60
+ var popup = /*#__PURE__*/_react["default"].createElement("div", {
61
+ className: "".concat(preCls, "__popup")
62
+ }, /*#__PURE__*/_react["default"].createElement("div", {
63
+ className: "".concat(preCls, "__popup-title")
64
+ }, "\u5FAE\u4FE1/\u4F01\u4E1A\u5FAE\u4FE1\u626B\u4E00\u626B"), /*#__PURE__*/_react["default"].createElement("div", {
65
+ className: "".concat(preCls, "__popup-content")
66
+ }, "\u4E13\u5C5E\u5BA2\u670D\u4E3A\u4F60\u63D0\u4F9B\u54A8\u8BE2\u670D\u52A1"), /*#__PURE__*/_react["default"].createElement("img", {
67
+ src: isTrial ? _try["default"] : _notTry["default"],
68
+ className: "".concat(preCls, "__popup-img"),
69
+ alt: "\u5FAE\u4FE1\u626B\u7801"
70
+ }));
71
+
72
+ return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
73
+ popup: popup,
74
+ popupTransitionName: "tita-popup-zoom-left-bottom",
75
+ placement: "topLeft",
76
+ popupAlign: {
77
+ offset: [-32, -10],
78
+ overflow: {
79
+ adjustX: 1,
80
+ adjustY: 1
81
+ }
82
+ },
83
+ popupVisible: visible,
84
+ onPopupVisibleChange: function onPopupVisibleChange(bol) {
85
+ return setVisible(bol);
86
+ }
87
+ }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
88
+ overlay: "\u8054\u7CFB\u5BA2\u670D",
89
+ placement: "right",
90
+ align: {
91
+ offset: [0, 0]
92
+ }
93
+ }, /*#__PURE__*/_react["default"].createElement("div", {
94
+ className: (0, _classnames["default"])("".concat(preCls, "__kefu"), _defineProperty({}, "".concat(preCls, "__try-kefu"), isTrial), _defineProperty({}, "".concat(preCls, "__hidden"), visible)),
95
+ onClick: handleShowCode
96
+ }, /*#__PURE__*/_react["default"].createElement("div", {
97
+ className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__cancel"), visible))
98
+ }))));
99
+ };
100
+
101
+ var _default = ContactKefu;
102
+ exports["default"] = _default;
@@ -28,3 +28,7 @@
28
28
  line-height: 22px;
29
29
  color: #3f4755;
30
30
  }
31
+
32
+ .form-field-radio__radios-item {
33
+ display: flex;
34
+ }
@@ -33,17 +33,18 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
33
33
 
34
34
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
35
 
36
- var prefixCls = "form-field-radio";
36
+ var prefixCls = 'form-field-radio';
37
37
 
38
38
  var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
39
39
  var _props$className = props.className,
40
- className = _props$className === void 0 ? "" : _props$className,
40
+ className = _props$className === void 0 ? '' : _props$className,
41
41
  label = props.label,
42
42
  onChange = props.onChange,
43
43
  radios = props.radios,
44
44
  require = props.require,
45
45
  value = props.value,
46
- radioClass = props.radioClass;
46
+ _props$radioClass = props.radioClass,
47
+ radioClass = _props$radioClass === void 0 ? '' : _props$radioClass;
47
48
 
48
49
  var _useState = (0, _react.useState)(value),
49
50
  _useState2 = _slicedToArray(_useState, 2),
@@ -14,3 +14,7 @@
14
14
  justify-content: space-between;
15
15
  height: 17px;
16
16
  }
17
+
18
+ .confim-radio {
19
+ display: flex;
20
+ }
@@ -248,6 +248,7 @@ var ObjectType = /*#__PURE__*/function (_Component) {
248
248
 
249
249
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_radio.RadioGroup, {
250
250
  name: "okrType",
251
+ className: "confim-radio",
251
252
  labelText: (0, _getLocale.getLocale)("Mod_Type"),
252
253
  style: {
253
254
  marginBottom: 8
@@ -6,7 +6,7 @@
6
6
 
7
7
  .okr-detail-delete-confirm__option-text {
8
8
  font-size: 14px;
9
- color: #3F4755;
9
+ color: #3f4755;
10
10
  line-height: 22px;
11
11
  }
12
12
 
@@ -23,7 +23,7 @@
23
23
  }
24
24
 
25
25
  .okr-detail-delete-confirm__icon.tu-icon-singlebox-have {
26
- color: #BFC7D5;
26
+ color: #bfc7d5;
27
27
  }
28
28
 
29
29
  .okr-detail-delete-confirm__icon.tu-icon-wiki {
@@ -38,13 +38,17 @@
38
38
  margin-top: 10px;
39
39
  }
40
40
 
41
+ .okr-detail-delete-confirm .tita-radio:hover .tita-radio-inner {
42
+ color: #2879ff;
43
+ }
44
+
41
45
  .isApprovalDisabled {
42
46
  margin-bottom: 0;
43
47
  padding: 5px 24px;
44
48
  font-size: 14px;
45
49
  line-height: 22px;
46
- transition: all .3s ease-in;
47
- color: #BFC7D5;
50
+ transition: all 0.3s ease-in;
51
+ color: #bfc7d5;
48
52
  cursor: pointer;
49
53
  display: flex;
50
54
  align-items: center;
@@ -54,6 +58,6 @@
54
58
  .isApprovalDisabled .options-icon {
55
59
  margin-right: 12px;
56
60
  font-size: 14px;
57
- transition: all .3s ease-in;
61
+ transition: all 0.3s ease-in;
58
62
  color: #89919f;
59
63
  }
@@ -30,7 +30,7 @@
30
30
  }
31
31
 
32
32
  .titaui-radio-wrapper .titaui-radio:hover > .titaui-radio-inner {
33
- border: 1px solid #96d0fa;
33
+ border: 1px solid #2879ff;
34
34
  }
35
35
 
36
36
  .titaui-radio-wrapper .titaui-radio .titaui-radio-input {
@@ -59,14 +59,14 @@
59
59
  height: 10px;
60
60
  min-height: 10px;
61
61
  border-radius: 50%;
62
- background-color: #1687d9;
62
+ background-color: #2879ff;
63
63
  transform: scale(0);
64
64
  opacity: 0;
65
65
  transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
66
66
  }
67
67
 
68
68
  .titaui-radio-wrapper .titaui-radio .titaui-radio-input:checked + .titaui-radio-inner {
69
- border-color: #1687d9;
69
+ border-color: #2879ff;
70
70
  }
71
71
 
72
72
  .titaui-radio-wrapper .titaui-radio .titaui-radio-input:checked + .titaui-radio-inner:after {
@@ -3,12 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.workStatus = exports.timeFormat = exports.preCls = exports.okrStatus = exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = exports.formatDateStr = void 0;
6
+ exports.formatDateStr = void 0;
7
+ exports.formatPeriodPlanData = formatPeriodPlanData;
8
+ exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = void 0;
9
+ exports.momentDate = momentDate;
10
+ exports.workStatus = exports.timeFormat = exports.preCls = exports.okrStatus = void 0;
7
11
 
8
12
  var _bsGlobal = require("../../utils/bs-global");
9
13
 
10
14
  var _getLocale = require("../../utils/getLocale");
11
15
 
16
+ var _planDataJson = require("../../utils/planDataJson");
17
+
12
18
  var preCls = "titaui-task-relation";
13
19
  exports.preCls = preCls;
14
20
  var isOpenOkrManage = (0, _bsGlobal.getAppHead)("113"); // 开通OKR
@@ -31,6 +37,14 @@ var lableTypeMap = {
31
37
  };
32
38
  exports.lableTypeMap = lableTypeMap;
33
39
 
40
+ var strFormat = function strFormat(num) {
41
+ if (num < 10) {
42
+ return '0' + num;
43
+ }
44
+
45
+ return num;
46
+ };
47
+
34
48
  var timeFormat = function timeFormat(NowDate) {
35
49
  var date = new Date(NowDate);
36
50
  var y = date.getFullYear(); // 年
@@ -39,7 +53,7 @@ var timeFormat = function timeFormat(NowDate) {
39
53
 
40
54
  var d = date.getDate(); // 日
41
55
 
42
- return "".concat(y, "/").concat(m, "/").concat(d);
56
+ return "".concat(y, "/").concat(strFormat(m), "/").concat(strFormat(d));
43
57
  };
44
58
 
45
59
  exports.timeFormat = timeFormat;
@@ -106,4 +120,60 @@ var workStatus = function workStatus() {
106
120
  };
107
121
  };
108
122
 
109
- exports.workStatus = workStatus;
123
+ exports.workStatus = workStatus;
124
+
125
+ function momentDate(date) {
126
+ var reg = new RegExp('年|月|日', 'g');
127
+ return date.replace(reg, '/').slice(0, -1);
128
+ }
129
+
130
+ function formatPeriodPlanData(period) {
131
+ var planData; // 获取选取年份的 dataJSON
132
+
133
+ var yearGroup = (0, _planDataJson.PlanDataJson)().find(function (p) {
134
+ return p.GroupName == period.annualNum + '';
135
+ }); // 年份下的 ‘年/季’ data
136
+
137
+ var seasonData = yearGroup ? yearGroup.PlanTableListModels.find(function (item) {
138
+ return item.TagName == (0, _getLocale.getLocale)('Tasks_Menu_Yearseason');
139
+ }) : null;
140
+
141
+ switch (period.cycleType) {
142
+ // case '-1': // 全部周期
143
+ // break;
144
+ case '0':
145
+ planData = {
146
+ StartDate: period.startDate,
147
+ EndDate: period.endDate
148
+ };
149
+ break;
150
+
151
+ case '1':
152
+ // 年度
153
+ planData = seasonData ? seasonData.PlanTableModels[0] : null;
154
+ break;
155
+
156
+ case '2':
157
+ planData = seasonData ? seasonData.PlanTableModels[period.yqmNum] : null; // 季度
158
+
159
+ break;
160
+
161
+ case '3':
162
+ // @ts-ignore
163
+ var monthData = yearGroup ? yearGroup.PlanTableListModels.find(function (p) {
164
+ return p.TagName == period.yqmNum + '月';
165
+ }) : null;
166
+ planData = monthData ? monthData.PlanTableModels[0] : null;
167
+ break;
168
+
169
+ default:
170
+ break;
171
+ }
172
+
173
+ return {
174
+ endDate: planData ? period.cycleType == '0' ? planData.EndDate : momentDate(planData.EndDate || '') : '',
175
+ planTableId: planData && planData.PlanTableId,
176
+ planTableType: planData && planData.PlanTableType,
177
+ startDate: planData ? period.cycleType == '0' ? planData.StartDate : momentDate(planData.StartDate || '') : ''
178
+ };
179
+ }
@@ -1,7 +1,18 @@
1
1
  .relation-task__content {
2
- padding: 0 32px;
2
+ padding: 10px 32px 0;
3
3
  }
4
4
 
5
5
  .relation-task__content-tree {
6
6
  margin-top: 16px;
7
7
  }
8
+
9
+ .relation-task__content-empty {
10
+ height: 382px;
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ }
15
+
16
+ .relation-task__content-empty > img {
17
+ width: 60px;
18
+ }
@@ -23,6 +23,8 @@ var _helper = require("../../helper");
23
23
 
24
24
  var _requestApi = require("../request-api");
25
25
 
26
+ var _loading = _interopRequireDefault(require("../../image/loading.gif"));
27
+
26
28
  var _getLocale = require("../../../../utils/getLocale");
27
29
 
28
30
  require("./index.css");
@@ -119,7 +121,12 @@ function OkrRelationTaskModal(props) {
119
121
  var _useState15 = (0, _react.useState)(1),
120
122
  _useState16 = _slicedToArray(_useState15, 2),
121
123
  pageNum = _useState16[0],
122
- setPageNum = _useState16[1]; // useEffect(() => {
124
+ setPageNum = _useState16[1];
125
+
126
+ var _useState17 = (0, _react.useState)(false),
127
+ _useState18 = _slicedToArray(_useState17, 2),
128
+ isloading = _useState18[0],
129
+ setIsLoading = _useState18[1]; // useEffect(() => {
123
130
  // // const roots = selected.reduce((res, cur) => [...res, cur.workId], []);
124
131
  // // setSelectedRoots(roots);
125
132
  // console.log(selected)
@@ -146,7 +153,10 @@ function OkrRelationTaskModal(props) {
146
153
  };
147
154
 
148
155
  var getTaskData = function getTaskData() {
149
- (0, _requestApi.planTableTask)(krId, query, pageNum, pageSize).then(function (res) {
156
+ setIsLoading(true);
157
+ (0, _requestApi.planTableTask)(query, pageNum, pageSize).then(function (res) {
158
+ setIsLoading(false);
159
+
150
160
  if (res) {
151
161
  var tasks = res.tasks,
152
162
  _total = res.total;
@@ -218,7 +228,12 @@ function OkrRelationTaskModal(props) {
218
228
  }
219
229
  }, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
220
230
  onChange: onQueryChangeHandler
221
- }), /*#__PURE__*/_react["default"].createElement("div", {
231
+ }), isloading ? /*#__PURE__*/_react["default"].createElement("div", {
232
+ className: "".concat(preCls, "__content-empty")
233
+ }, /*#__PURE__*/_react["default"].createElement("img", {
234
+ src: _loading["default"],
235
+ alt: ""
236
+ })) : /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
222
237
  className: "".concat(preCls, "__content-tree")
223
238
  }, /*#__PURE__*/_react["default"].createElement(_taskTree.TaskTree, {
224
239
  selected: selected,
@@ -234,7 +249,7 @@ function OkrRelationTaskModal(props) {
234
249
  onChange: onPageChangeHandler,
235
250
  current: pageNum,
236
251
  pageSize: pageSize
237
- }))));
252
+ })))));
238
253
  }
239
254
 
240
255
  var _default = OkrRelationTaskModal;
@@ -21,6 +21,10 @@ var _taskStatusSelect = _interopRequireDefault(require("../../search/task-status
21
21
 
22
22
  var _relation = _interopRequireDefault(require("../../search/relation"));
23
23
 
24
+ var _helper = require("../../helper");
25
+
26
+ var _formatTime = require("../../../../utils/format-time");
27
+
24
28
  var _getLocale = require("../../../../utils/getLocale");
25
29
 
26
30
  require("./index.css");
@@ -56,13 +60,15 @@ function SearchForm(props) {
56
60
  annualNum: new Date().getFullYear(),
57
61
  // 默认当前年份全部周期
58
62
  yqmNum: 0,
59
- cycleType: '-1'
63
+ cycleType: '1',
64
+ startDate: (0, _formatTime.getFirstDayOfYear)(),
65
+ endDate: (0, _formatTime.getNextDayOfYear)()
60
66
  }),
61
67
  _useState2 = _slicedToArray(_useState, 2),
62
68
  cycle = _useState2[0],
63
69
  setCycle = _useState2[1];
64
70
 
65
- var _useState3 = (0, _react.useState)(''),
71
+ var _useState3 = (0, _react.useState)(10),
66
72
  _useState4 = _slicedToArray(_useState3, 2),
67
73
  status = _useState4[0],
68
74
  setStatus = _useState4[1];
@@ -79,11 +85,12 @@ function SearchForm(props) {
79
85
 
80
86
  var dilagRef = (0, _react.useRef)(document.createElement('div'));
81
87
  (0, _react.useEffect)(function () {
88
+ var planCycle = (0, _helper.formatPeriodPlanData)(cycle);
82
89
  onChange(_objectSpread({
83
90
  status: status,
84
91
  keyWords: keyWords,
85
92
  relation: relation
86
- }, cycle));
93
+ }, planCycle));
87
94
  }, [status, keyWords, cycle, relation]);
88
95
  return /*#__PURE__*/_react["default"].createElement("div", {
89
96
  ref: dilagRef
@@ -91,7 +98,12 @@ function SearchForm(props) {
91
98
  className: "rel-okr-tree__search-item"
92
99
  }, /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
93
100
  selected: cycle,
94
- yearsRange: [2019, 2030],
101
+ yearsRange: [2019, new Date().getFullYear() + 10],
102
+ isFetch: false,
103
+ showBimonthly: false,
104
+ showHalfYear: false,
105
+ showCustom: false,
106
+ showFullCycle: false,
95
107
  onChange: setCycle,
96
108
  getPopupContainer: function getPopupContainer() {
97
109
  return dilagRef.current;
@@ -22,8 +22,8 @@ var dealMessage = function dealMessage(res) {
22
22
 
23
23
  var id = (0, _helpers.getLoginUserInfo)().Id;
24
24
 
25
- var planTableTask = function planTableTask(planTableId, params, pageNum, pageSize) {
26
- var url = "PlanTableTask/PersionTask?to_user_id=".concat(id);
25
+ var planTableTask = function planTableTask(params, pageNum, pageSize) {
26
+ var url = "task/search";
27
27
  var _params$startDate = params.startDate,
28
28
  startDate = _params$startDate === void 0 ? '' : _params$startDate,
29
29
  _params$endDate = params.endDate,
@@ -31,9 +31,22 @@ var planTableTask = function planTableTask(planTableId, params, pageNum, pageSiz
31
31
  _params$keyWords = params.keyWords,
32
32
  keyWords = _params$keyWords === void 0 ? '' : _params$keyWords,
33
33
  _params$status = params.status,
34
- status = _params$status === void 0 ? '' : _params$status,
34
+ status = _params$status === void 0 ? 10 : _params$status,
35
+ _params$planTableId = params.planTableId,
36
+ planTableId = _params$planTableId === void 0 ? '' : _params$planTableId,
37
+ _params$planTableType = params.planTableType,
38
+ planTableType = _params$planTableType === void 0 ? '' : _params$planTableType,
35
39
  _params$relation = params.relation,
36
40
  relation = _params$relation === void 0 ? 0 : _params$relation;
41
+
42
+ if (status == 10) {
43
+ status = '0,1,2,3,4,6';
44
+ }
45
+
46
+ if (!relation) {
47
+ relation = '1,2,3';
48
+ }
49
+
37
50
  return (0, _request.rpost)('v2')(url, {
38
51
  type: 'personal',
39
52
  to_user_id: id,
@@ -41,8 +54,8 @@ var planTableTask = function planTableTask(planTableId, params, pageNum, pageSiz
41
54
  EndDate: endDate,
42
55
  startNum: pageNum,
43
56
  count: pageSize,
44
- planTableId: '7aaa839f-cea4-4203-8d9c-ab55f957905c',
45
- planTableType: 4,
57
+ planTableId: planTableId,
58
+ planTableType: planTableType,
46
59
  fromLevel: 1,
47
60
  toLevel: 1,
48
61
  RelationType: relation,
@@ -1,8 +1,9 @@
1
1
  .okr-relation-tree__empty {
2
- height: 400px;
2
+ height: 382px;
3
3
  display: flex;
4
4
  align-items: center;
5
5
  justify-content: center;
6
+ color: #A4ACB9;
6
7
  }
7
8
 
8
9
  .okr-relation-tree__header {
@@ -49,7 +50,7 @@
49
50
  .okr-relation-tree__content {
50
51
  margin-right: -32px;
51
52
  margin-left: -4px;
52
- height: 350px;
53
+ height: 315px;
53
54
  font-size: 14px;
54
55
  font-weight: 400;
55
56
  line-height: 22px;
@@ -128,7 +128,7 @@ var TaskTree = function TaskTree(_ref) {
128
128
  checked: isSelectedAll()
129
129
  })), /*#__PURE__*/_react["default"].createElement("span", {
130
130
  className: "".concat(preCls, "__header-name")
131
- }, isWork ? '任务' : '项目'), /*#__PURE__*/_react["default"].createElement("span", {
131
+ }, isWork ? '项目' : '任务'), /*#__PURE__*/_react["default"].createElement("span", {
132
132
  className: "".concat(preCls, "__header-status")
133
133
  }, "\u72B6\u6001"), /*#__PURE__*/_react["default"].createElement("span", {
134
134
  className: "".concat(preCls, "__header-principer")
@@ -138,7 +138,7 @@ var TaskTree = function TaskTree(_ref) {
138
138
  className: "".concat(preCls, "__content")
139
139
  }, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"].Mask, {
140
140
  style: scrollStyle,
141
- maskHeight: 32
141
+ maskHeight: 16
142
142
  }, data.map(function (item) {
143
143
  var _item$principalUser, _item$principalUser2, _item$principalUser3, _item$principalUser4;
144
144