@titaui/pc 1.10.80 → 1.10.84

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.
@@ -31,6 +31,8 @@ var _default = /*#__PURE__*/function () {
31
31
  cb(_menus.PAGE_MY_PART_OKR);
32
32
  } else if (this.isMyTargetOkr()) {
33
33
  cb(_menus.PAGE_MY_TARGET_OKR);
34
+ } else if (this.isTargetUser()) {
35
+ return null;
34
36
  } else {
35
37
  cb(_menus.PAGE_MY_OWNER_OKR);
36
38
  }
@@ -43,6 +45,8 @@ var _default = /*#__PURE__*/function () {
43
45
  } else if (this.isOkrCases()) {
44
46
  cb(_menus.PAGE_OKR_CASES);
45
47
  }
48
+
49
+ return null;
46
50
  }
47
51
  }, {
48
52
  key: "isMyOkr",
@@ -62,6 +66,12 @@ var _default = /*#__PURE__*/function () {
62
66
  var search = this.history.location.search;
63
67
  return !!search.match(/relation[\s]*?=[\s]*?3/);
64
68
  }
69
+ }, {
70
+ key: "isTargetUser",
71
+ value: function isTargetUser() {
72
+ var search = this.history.location.search;
73
+ return !!search.match(/toUserId[\s]*?=[\d]+/);
74
+ }
65
75
  }, {
66
76
  key: "isOkr",
67
77
  value: function isOkr() {
@@ -97,9 +97,13 @@ function _default(props) {
97
97
  }, {
98
98
  disabledDottedSubordinatesDig: true
99
99
  }).then(function (users) {
100
- var rawTreeData = (0, _helper.transToTreeNode)(users);
101
- setRawTreeData(rawTreeData);
102
- setTreeData((0, _utils.toTree)(rawTreeData));
100
+ var rawTreeData = (0, _helper.transToTreeNode)(users); // 要过滤掉那些既是登录者的虚线下级,又是登录者下属的下级,让他默认展开的时候重新获取
101
+
102
+ var newRawTreeData = rawTreeData.filter(function (item) {
103
+ return item.pid === loginUserId;
104
+ });
105
+ setRawTreeData(newRawTreeData);
106
+ setTreeData((0, _utils.toTree)(newRawTreeData));
103
107
  setLoading(false);
104
108
  });
105
109
  }, []);
@@ -54,7 +54,7 @@
54
54
  }
55
55
 
56
56
  .tita-okrdt-tree__o-child-node-prefix::before {
57
- content: "";
57
+ content: '';
58
58
  width: 9px;
59
59
  height: 12px;
60
60
  background: url(../../images/O.svg) transparent no-repeat 50% 50%;
@@ -73,11 +73,12 @@
73
73
 
74
74
  .child-okrs-weight__content {
75
75
  padding: 10px 32px 8px;
76
+ max-height: 300px;
76
77
  min-height: 90px;
78
+ overflow: auto;
77
79
  box-sizing: border-box;
78
80
  display: flex;
79
81
  flex-direction: column;
80
- justify-content: center;
81
82
  }
82
83
 
83
84
  .child-okrs-weight__item {
@@ -105,7 +106,7 @@
105
106
  }
106
107
 
107
108
  .child-okrs-weight__item-precls:before {
108
- content: "";
109
+ content: '';
109
110
  width: 10px;
110
111
  height: 8px;
111
112
  border-radius: 50%;
@@ -47,6 +47,10 @@ var fetchAssetsVersion = function fetchAssetsVersion() {
47
47
  },
48
48
  objectName: "superset_assets_version"
49
49
  }).then(function (res) {
50
+ if (!res.data) {
51
+ return [];
52
+ }
53
+
50
54
  return transMetasToTableData(res.data.list);
51
55
  });
52
56
  };
@@ -70,6 +74,10 @@ var fetchAssetsUri = function fetchAssetsUri(version) {
70
74
  },
71
75
  objectName: "superset_assets"
72
76
  }).then(function (res) {
77
+ if (!res.data) {
78
+ return [];
79
+ }
80
+
73
81
  sessionStorage.setItem("".concat(storageKey, "version"), JSON.stringify(transMetasToTableData(res.data.list)));
74
82
  return transMetasToTableData(res.data.list);
75
83
  });
@@ -183,7 +183,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
183
183
  }), /*#__PURE__*/_react["default"].createElement("label", {
184
184
  htmlFor: "total",
185
185
  className: "text"
186
- }, (0, _getLocale.getLocale)("Pro_page_Plan_Allpersonnel"))), /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_titaUi.Radio, {
186
+ }, (0, _getLocale.getLocale)("Backst_Visibletoall"))), /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_titaUi.Radio, {
187
187
  id: "scope",
188
188
  checked: scopeChecked == 1,
189
189
  onChange: function onChange() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.10.80",
3
+ "version": "1.10.84",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",