@titaui/pc 1.15.3 → 1.15.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.
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.js +12 -2
- package/lib/components/menus/components/menu-tree/tree-node/same-level-user/index.css +58 -0
- package/lib/components/menus/components/menu-tree/tree-node/same-level-user/index.js +74 -0
- package/lib/components/menus/export-modules/summary-menus/menus.js +18 -18
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +1 -1
- package/package.json +1 -1
|
@@ -57,7 +57,7 @@ var TableRowOKR = function TableRowOKR(_ref) {
|
|
|
57
57
|
onClick: handleClickTitle
|
|
58
58
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
59
59
|
className: "tu-icon-H5-".concat(isO ? "O" : "KR", "-s ").concat(prefix, "__common-icon")
|
|
60
|
-
}), /*#__PURE__*/_react["default"].createElement("p", null, /*#__PURE__*/_react["default"].createElement("span", null, (0, _openData.parseString)(text)), isO && Number(data.CycleType) !== 0
|
|
60
|
+
}), /*#__PURE__*/_react["default"].createElement("p", null, /*#__PURE__*/_react["default"].createElement("span", null, (0, _openData.parseString)(text)), isO && (Number(data.CycleType) !== 0 || Number(data.AnnualNum) !== 0 || Number(data.YqmNum !== 0) || data.StartDate && data.EndDate) && /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
61
|
className: "".concat(prefix, "__common-time")
|
|
62
62
|
}, (0, _utils.formatPeriod)({
|
|
63
63
|
annualNum: data.AnnualNum,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.USER_NODE = exports.USER_CONCERN_NODE = exports.TONGJI_NODE = exports.SUB_MENU_ITEM_NOE = exports.SUBORDINATES_NODE = exports.SHARE_NODE = exports.PARENT_MENU_NODE = exports.NO_SUBORDINATES_NODE = exports.NO_FOLLOWER_NODE = exports.MENU_ITEM_NOE = exports.MENU_ASSESS_TEMPLATE = exports.MENU_ASSESS_MANAGE = exports.LOADING_NODE = exports.GROUP_NAME_NODE = exports.FOLLOWER_NODE = exports.DEPART_NODE = exports.COMPANY_NODE = exports.COMPANY_ALL_NODE = void 0;
|
|
6
|
+
exports.USER_NODE = exports.USER_CONCERN_NODE = exports.TONGJI_NODE = exports.SUB_MENU_ITEM_NOE = exports.SUBORDINATES_NODE = exports.SHARE_NODE = exports.SAME_LEVEL_USER_NODE = exports.PARENT_MENU_NODE = exports.NO_SUBORDINATES_NODE = exports.NO_FOLLOWER_NODE = exports.MENU_ITEM_NOE = exports.MENU_ASSESS_TEMPLATE = exports.MENU_ASSESS_MANAGE = exports.LOADING_NODE = exports.GROUP_NAME_NODE = exports.FOLLOWER_NODE = exports.DEPART_NODE = exports.COMPANY_NODE = exports.COMPANY_ALL_NODE = void 0;
|
|
7
7
|
exports["default"] = _default;
|
|
8
8
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -30,6 +30,8 @@ var _depart = _interopRequireDefault(require("./depart"));
|
|
|
30
30
|
|
|
31
31
|
var _user = _interopRequireDefault(require("./user"));
|
|
32
32
|
|
|
33
|
+
var _sameLevelUser = _interopRequireDefault(require("./same-level-user"));
|
|
34
|
+
|
|
33
35
|
var _companyAll = _interopRequireDefault(require("./company-all"));
|
|
34
36
|
|
|
35
37
|
var _noFollower = _interopRequireDefault(require("./no-follower"));
|
|
@@ -82,6 +84,12 @@ function _default(node, level, _ref) {
|
|
|
82
84
|
onExpand: onExpand
|
|
83
85
|
}));
|
|
84
86
|
|
|
87
|
+
case SAME_LEVEL_USER_NODE:
|
|
88
|
+
return /*#__PURE__*/_react["default"].createElement(_sameLevelUser["default"], _extends({}, node, {
|
|
89
|
+
level: level,
|
|
90
|
+
onExpand: onExpand
|
|
91
|
+
}));
|
|
92
|
+
|
|
85
93
|
case USER_CONCERN_NODE:
|
|
86
94
|
return /*#__PURE__*/_react["default"].createElement(_userConcern["default"], _extends({}, node, {
|
|
87
95
|
level: level,
|
|
@@ -182,4 +190,6 @@ exports.SUBORDINATES_NODE = SUBORDINATES_NODE;
|
|
|
182
190
|
var SHARE_NODE = 'share';
|
|
183
191
|
exports.SHARE_NODE = SHARE_NODE;
|
|
184
192
|
var TONGJI_NODE = 'tongji';
|
|
185
|
-
exports.TONGJI_NODE = TONGJI_NODE;
|
|
193
|
+
exports.TONGJI_NODE = TONGJI_NODE;
|
|
194
|
+
var SAME_LEVEL_USER_NODE = 'same-level-user';
|
|
195
|
+
exports.SAME_LEVEL_USER_NODE = SAME_LEVEL_USER_NODE;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.titaui-menus-tree__user-node {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: 40px;
|
|
5
|
+
line-height: 40px;
|
|
6
|
+
border-radius: 12px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.titaui-menus-tree__user-node:hover .titaui-menus-tree__user-node-username {
|
|
12
|
+
color: #2879ff;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.titaui-menus-tree__user-node-avatar {
|
|
16
|
+
display: inline-block;
|
|
17
|
+
line-height: 24px;
|
|
18
|
+
width: 24px;
|
|
19
|
+
height: 24px;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
border-radius: 50%;
|
|
22
|
+
color: white;
|
|
23
|
+
margin-right: 8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.titaui-menus-tree__user-node-avatar-slice {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
width: 18px;
|
|
29
|
+
text-indent: 6px;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.titaui-menus-tree__user-node-username {
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
color: #3f4755;
|
|
37
|
+
line-height: 20px;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.titaui-menus-tree__user-node-sub {
|
|
44
|
+
position: absolute;
|
|
45
|
+
width: 24px;
|
|
46
|
+
height: 24px;
|
|
47
|
+
color: #2879ff;
|
|
48
|
+
right: 0;
|
|
49
|
+
top: 8px;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-items: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.titaui-menus-tree__user-node-sub:hover {
|
|
57
|
+
color: #5C8EFF;
|
|
58
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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"] = _default;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _openData = require("../../../../../../utils/open-data");
|
|
15
|
+
|
|
16
|
+
var _context = require("../../../../context");
|
|
17
|
+
|
|
18
|
+
var _avatar = _interopRequireDefault(require("../avatar"));
|
|
19
|
+
|
|
20
|
+
var _precls = _interopRequireDefault(require("../../precls"));
|
|
21
|
+
|
|
22
|
+
require("./index.css");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
function _default(props) {
|
|
31
|
+
var user = props.data,
|
|
32
|
+
_props$level = props.level,
|
|
33
|
+
level = _props$level === void 0 ? 0 : _props$level,
|
|
34
|
+
_props$isFlip = props.isFlip,
|
|
35
|
+
isFlip = _props$isFlip === void 0 ? true : _props$isFlip,
|
|
36
|
+
onExpand = props.onExpand;
|
|
37
|
+
var hasSubordinates = user.hasSubordinates;
|
|
38
|
+
|
|
39
|
+
var _useContext = (0, _react.useContext)(_context.FlipContext),
|
|
40
|
+
flipGoNext = _useContext.flipGoNext;
|
|
41
|
+
|
|
42
|
+
var openSubordinate = function openSubordinate(e) {
|
|
43
|
+
e.stopPropagation();
|
|
44
|
+
|
|
45
|
+
if (isFlip) {
|
|
46
|
+
flipGoNext({
|
|
47
|
+
type: "subordinate",
|
|
48
|
+
options: {
|
|
49
|
+
toUserId: user.userId
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
} else {
|
|
53
|
+
onExpand(e);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
|
+
title: "",
|
|
59
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-node")),
|
|
60
|
+
style: {
|
|
61
|
+
paddingLeft: 12 + level * 10
|
|
62
|
+
}
|
|
63
|
+
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
64
|
+
user: user
|
|
65
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
66
|
+
style: {
|
|
67
|
+
width: "calc(100% - ".concat(12 + 13 + 16 + level * 10, "px)")
|
|
68
|
+
},
|
|
69
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-node-username"), "noselect")
|
|
70
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
71
|
+
name: user.name,
|
|
72
|
+
id: user.userId
|
|
73
|
+
})));
|
|
74
|
+
}
|
|
@@ -87,15 +87,6 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
87
87
|
children: [],
|
|
88
88
|
href: "#/summary/subordinates",
|
|
89
89
|
isShow: window.BSGlobal.loginUserInfo.HasSub
|
|
90
|
-
}, {
|
|
91
|
-
icon: "caidan-enjoy",
|
|
92
|
-
label: _i18n.locale.menu_my_share,
|
|
93
|
-
key: this.SHARE,
|
|
94
|
-
type: this.SHARE,
|
|
95
|
-
isLeaf: false,
|
|
96
|
-
children: [],
|
|
97
|
-
href: "#/summary/share",
|
|
98
|
-
isShow: props.isShowShare
|
|
99
90
|
}, {
|
|
100
91
|
icon: "caidan-tongji",
|
|
101
92
|
label: _i18n.locale.menu_summary_tongji,
|
|
@@ -105,6 +96,15 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
105
96
|
children: [],
|
|
106
97
|
href: "#/summary/tongji",
|
|
107
98
|
isShow: props.isShowTongji
|
|
99
|
+
}, {
|
|
100
|
+
icon: "caidan-enjoy",
|
|
101
|
+
label: _i18n.locale.menu_my_share,
|
|
102
|
+
key: this.SHARE,
|
|
103
|
+
type: this.SHARE,
|
|
104
|
+
isLeaf: false,
|
|
105
|
+
children: [],
|
|
106
|
+
href: "#/summary/share",
|
|
107
|
+
isShow: props.isShowShare
|
|
108
108
|
}, {
|
|
109
109
|
icon: "bumen",
|
|
110
110
|
label: _i18n.locale.menu_department,
|
|
@@ -187,10 +187,10 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
187
187
|
}, {
|
|
188
188
|
key: "setShareLoading",
|
|
189
189
|
value: function setShareLoading(loading) {
|
|
190
|
-
this.menus[
|
|
190
|
+
this.menus[4].children = [];
|
|
191
191
|
|
|
192
192
|
if (loading) {
|
|
193
|
-
this.menus[
|
|
193
|
+
this.menus[4].children.push({
|
|
194
194
|
icon: "",
|
|
195
195
|
label: "loading",
|
|
196
196
|
key: "loading-subordinates",
|
|
@@ -203,10 +203,10 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
203
203
|
}, {
|
|
204
204
|
key: "setTongjiLoading",
|
|
205
205
|
value: function setTongjiLoading(loading) {
|
|
206
|
-
this.menus[
|
|
206
|
+
this.menus[3].children = [];
|
|
207
207
|
|
|
208
208
|
if (loading) {
|
|
209
|
-
this.menus[
|
|
209
|
+
this.menus[3].children.push({
|
|
210
210
|
icon: "",
|
|
211
211
|
label: "loading",
|
|
212
212
|
key: "loading-subordinates",
|
|
@@ -220,7 +220,7 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
220
220
|
key: "insertShare",
|
|
221
221
|
value: function insertShare(users) {
|
|
222
222
|
if (!users || !users.length) {
|
|
223
|
-
this.menus[
|
|
223
|
+
this.menus[4].children = [{
|
|
224
224
|
icon: "",
|
|
225
225
|
label: "empty-subordinates",
|
|
226
226
|
key: "empty-subordinates",
|
|
@@ -245,13 +245,13 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
this.menus[
|
|
248
|
+
this.menus[4].children = treeNodeUsers;
|
|
249
249
|
}
|
|
250
250
|
}, {
|
|
251
251
|
key: "insertTongji",
|
|
252
252
|
value: function insertTongji(users) {
|
|
253
253
|
if (!users || !users.length) {
|
|
254
|
-
this.menus[
|
|
254
|
+
this.menus[3].children = [{
|
|
255
255
|
icon: "",
|
|
256
256
|
label: "empty-subordinates",
|
|
257
257
|
key: "empty-subordinates",
|
|
@@ -270,13 +270,13 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
270
270
|
icon: "",
|
|
271
271
|
label: user.name,
|
|
272
272
|
key: "".concat(user.userId),
|
|
273
|
-
type: _index.
|
|
273
|
+
type: _index.SAME_LEVEL_USER_NODE,
|
|
274
274
|
href: "",
|
|
275
275
|
data: user
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
this.menus[
|
|
279
|
+
this.menus[3].children = treeNodeUsers;
|
|
280
280
|
}
|
|
281
281
|
}, {
|
|
282
282
|
key: "getMenus",
|
|
@@ -122,7 +122,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
122
122
|
var nodeType = node.nodeType,
|
|
123
123
|
data = node.data;
|
|
124
124
|
|
|
125
|
-
if (nodeType == _index.USER_NODE || nodeType == _index.FOLLOWER_NODE) {
|
|
125
|
+
if (nodeType == _index.USER_NODE || nodeType == _index.FOLLOWER_NODE || nodeType == _index.SAME_LEVEL_USER_NODE) {
|
|
126
126
|
location.href = "#/summary/manage?toUserId=".concat(data.userId, "&subordinates=1");
|
|
127
127
|
}
|
|
128
128
|
|