@titaui/pc 1.12.91-beta.3 → 1.12.93
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/okr-progress/index.css +5 -1
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +6 -4
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +1 -3
- package/lib/components/menus/export-modules/appraisal-menus/index.js +3 -1
- package/lib/components/menus/export-modules/interview-menus/index.js +3 -1
- package/lib/components/menus/export-modules/summary-menus/menus.js +8 -9
- package/lib/components/okr-flow/export-modal/index.js +2 -2
- package/lib/components/rich-editor-at/index.js +14 -102
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
color: #141c28;
|
|
14
14
|
line-height: 24px;
|
|
15
15
|
display: flex;
|
|
16
|
-
justify-content:
|
|
16
|
+
justify-content: flex-start;
|
|
17
17
|
align-items: center;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -68,6 +68,10 @@
|
|
|
68
68
|
transition: all 0.3s;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
.titaui-okr-progress__title-total {
|
|
72
|
+
margin-left: 8px;
|
|
73
|
+
}
|
|
74
|
+
|
|
71
75
|
.titaui-okr-progress__table {
|
|
72
76
|
border: 1px solid #dfe3ea;
|
|
73
77
|
border-radius: 12px;
|
|
@@ -55,7 +55,7 @@ var prefix = 'titaui-okr-progress';
|
|
|
55
55
|
var isImport = false;
|
|
56
56
|
|
|
57
57
|
var OkrProgress = function OkrProgress(_ref) {
|
|
58
|
-
var _rowsData$Rows;
|
|
58
|
+
var _rowsData$Rows, _rowsData$Rows2;
|
|
59
59
|
|
|
60
60
|
var data = _ref.data,
|
|
61
61
|
reportType = _ref.reportType;
|
|
@@ -65,7 +65,7 @@ var OkrProgress = function OkrProgress(_ref) {
|
|
|
65
65
|
rowsData = _useState2[0],
|
|
66
66
|
setRowsData = _useState2[1];
|
|
67
67
|
|
|
68
|
-
var _useState3 = (0, _react.useState)(
|
|
68
|
+
var _useState3 = (0, _react.useState)(false),
|
|
69
69
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
70
70
|
tableVisible = _useState4[0],
|
|
71
71
|
setTableVisible = _useState4[1];
|
|
@@ -177,8 +177,10 @@ var OkrProgress = function OkrProgress(_ref) {
|
|
|
177
177
|
className: (0, _classnames["default"])("".concat(prefix, "__title-arrow"), _defineProperty({}, "".concat(prefix, "__title-arrow--show"), !tableVisible))
|
|
178
178
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
179
179
|
className: (0, _classnames["default"])('tu-icon-caret-down', "".concat(prefix, "__title-arrow-icon"), _defineProperty({}, "".concat(prefix, "__title-arrow-icon--rotate"), !tableVisible))
|
|
180
|
-
}))), renderTitle
|
|
181
|
-
className:
|
|
180
|
+
}))), renderTitle, /*#__PURE__*/_react["default"].createElement("div", {
|
|
181
|
+
className: "".concat(prefix, "__title-total")
|
|
182
|
+
}, rowsData === null || rowsData === void 0 ? void 0 : (_rowsData$Rows2 = rowsData.Rows) === null || _rowsData$Rows2 === void 0 ? void 0 : _rowsData$Rows2.length)), tableVisible && /*#__PURE__*/_react["default"].createElement("div", {
|
|
183
|
+
className: "".concat(prefix, "__table")
|
|
182
184
|
}, renderTable));
|
|
183
185
|
};
|
|
184
186
|
|
|
@@ -54,9 +54,7 @@ var TableRowOKR = function TableRowOKR(_ref) {
|
|
|
54
54
|
onClick: handleClickTitle
|
|
55
55
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
56
56
|
className: "tu-icon-H5-".concat(isO ? "O" : "KR", "-s ").concat(prefix, "__common-icon")
|
|
57
|
-
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _openData.parseString)(text)), /*#__PURE__*/_react["default"].createElement("
|
|
58
|
-
className: "".concat(prefix, "__common-time")
|
|
59
|
-
}, "\u7B2C\u4E00\u5B63\u5EA6")), !isFirstLevel && /*#__PURE__*/_react["default"].createElement("div", {
|
|
57
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _openData.parseString)(text))), !isFirstLevel && /*#__PURE__*/_react["default"].createElement("div", {
|
|
60
58
|
className: (0, _classnames["default"])("".concat(prefix, "__kr")),
|
|
61
59
|
onClick: handleClickTitle
|
|
62
60
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -96,7 +96,9 @@ function AppraisalMenus(props) {
|
|
|
96
96
|
_getQueryString$react = _getQueryString.reactRouterName,
|
|
97
97
|
reactRouterName = _getQueryString$react === void 0 ? '' : _getQueryString$react;
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
var isAppraisalPage = window.location.hash.indexOf('performance') != -1;
|
|
100
|
+
|
|
101
|
+
if (!reactRouterName && isAppraisalPage) {
|
|
100
102
|
window.location.href = newMenus[0].data.href;
|
|
101
103
|
}
|
|
102
104
|
}, [history.location.pathname]); // 判断路由高亮菜单
|
|
@@ -91,7 +91,9 @@ function InterviewMenus(props) {
|
|
|
91
91
|
_getQueryString$react = _getQueryString.reactRouterName,
|
|
92
92
|
reactRouterName = _getQueryString$react === void 0 ? '' : _getQueryString$react;
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
var isInterviewPage = window.location.hash.indexOf('interview') != -1;
|
|
95
|
+
|
|
96
|
+
if (!reactRouterName && isInterviewPage) {
|
|
95
97
|
window.location.href = newMenus[0].data.href;
|
|
96
98
|
}
|
|
97
99
|
}, [history.location.pathname]);
|
|
@@ -115,15 +115,14 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
115
115
|
href: "#/enterprise/manage?reactRouterName=daily",
|
|
116
116
|
isShow: isShowManage,
|
|
117
117
|
openBlank: true
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
];
|
|
118
|
+
}, {
|
|
119
|
+
icon: 'yibiao',
|
|
120
|
+
label: _i18n.locale.menu_summary_dashboard,
|
|
121
|
+
key: PAGE_SUMMARY_DASHBOARD,
|
|
122
|
+
type: _index.MENU_ITEM_NOE,
|
|
123
|
+
href: '#/summary/dashboard',
|
|
124
|
+
isShow: props.isShowDept
|
|
125
|
+
}];
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
_createClass(summaryMenus, [{
|
|
@@ -458,13 +458,13 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
458
458
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__export"), _defineProperty({}, "".concat(_precls["default"], "__dark"), darkTheme)),
|
|
459
459
|
elements: dataSource,
|
|
460
460
|
nodeTypes: _utils.nodeTypes,
|
|
461
|
-
minZoom: 0.
|
|
461
|
+
minZoom: 0.04,
|
|
462
462
|
zoomOnScroll: false,
|
|
463
463
|
zoomOnPinch: false,
|
|
464
464
|
zoomOnDoubleClick: false,
|
|
465
465
|
paneMoveable: false,
|
|
466
466
|
style: {
|
|
467
|
-
height:
|
|
467
|
+
height: 500,
|
|
468
468
|
width: '100%',
|
|
469
469
|
background: bgColor
|
|
470
470
|
}
|
|
@@ -36,107 +36,47 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
36
36
|
var prefix = "titaui-rich-editor-at";
|
|
37
37
|
|
|
38
38
|
var RichEditorAt = function RichEditorAt(_ref) {
|
|
39
|
-
var _users$users;
|
|
40
|
-
|
|
41
39
|
var _ref$users = _ref.users,
|
|
42
|
-
users = _ref$users === void 0 ?
|
|
43
|
-
users: [],
|
|
44
|
-
departments: [],
|
|
45
|
-
groups: []
|
|
46
|
-
} : _ref$users,
|
|
40
|
+
users = _ref$users === void 0 ? [] : _ref$users,
|
|
47
41
|
onChange = _ref.onChange,
|
|
48
42
|
_ref$text = _ref.text,
|
|
49
|
-
text = _ref$text === void 0 ? "" : _ref$text
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
console.log(users);
|
|
53
|
-
|
|
54
|
-
var _useState = (0, _react.useState)((_users$users = users.users) === null || _users$users === void 0 ? void 0 : _users$users.map(function (item) {
|
|
55
|
-
return item.user;
|
|
56
|
-
})),
|
|
43
|
+
text = _ref$text === void 0 ? "" : _ref$text;
|
|
44
|
+
|
|
45
|
+
var _useState = (0, _react.useState)(users),
|
|
57
46
|
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
-
|
|
47
|
+
seleceUsers = _useState2[0],
|
|
59
48
|
setSelectUsers = _useState2[1];
|
|
60
49
|
|
|
61
|
-
var _useState3 = (0, _react.useState)(users.departments),
|
|
62
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
-
selectDepartments = _useState4[0],
|
|
64
|
-
setSelectDepartments = _useState4[1];
|
|
65
|
-
|
|
66
|
-
var _useState5 = (0, _react.useState)(users.groups),
|
|
67
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
68
|
-
selectGroups = _useState6[0],
|
|
69
|
-
setSelectGroups = _useState6[1];
|
|
70
|
-
|
|
71
50
|
var handleSelectUser = function handleSelectUser(_ref2) {
|
|
72
|
-
var users = _ref2.users
|
|
73
|
-
departments = _ref2.departments,
|
|
74
|
-
groups = _ref2.groups;
|
|
51
|
+
var users = _ref2.users;
|
|
75
52
|
setSelectUsers(users);
|
|
76
|
-
console.log(users, 'usersusers');
|
|
77
|
-
setSelectDepartments(departments);
|
|
78
|
-
setSelectGroups(groups);
|
|
79
53
|
|
|
80
54
|
if (onChange) {
|
|
81
|
-
onChange(users
|
|
55
|
+
onChange(users);
|
|
82
56
|
}
|
|
83
57
|
};
|
|
84
58
|
|
|
85
59
|
var handleDeleteUser = function handleDeleteUser(info) {
|
|
86
|
-
var newData =
|
|
60
|
+
var newData = seleceUsers.filter(function (user) {
|
|
87
61
|
return user.userId !== info.userId;
|
|
88
62
|
});
|
|
89
63
|
setSelectUsers(newData);
|
|
90
64
|
|
|
91
65
|
if (onChange) {
|
|
92
|
-
onChange(newData
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
var handleDeleteDepart = function handleDeleteDepart(info) {
|
|
97
|
-
var newData = selectDepartments.filter(function (item) {
|
|
98
|
-
return item.id !== info.id;
|
|
99
|
-
});
|
|
100
|
-
setSelectDepartments(newData);
|
|
101
|
-
|
|
102
|
-
if (onChange) {
|
|
103
|
-
onChange(selectUsers, newData, selectGroups);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
var handleDeleteGroup = function handleDeleteGroup(info) {
|
|
108
|
-
var newData = selectGroups.filter(function (item) {
|
|
109
|
-
return item.id !== info.id;
|
|
110
|
-
});
|
|
111
|
-
setSelectGroups(newData);
|
|
112
|
-
|
|
113
|
-
if (onChange) {
|
|
114
|
-
onChange(selectUsers, selectDepartments, newData);
|
|
66
|
+
onChange(newData);
|
|
115
67
|
}
|
|
116
68
|
};
|
|
117
69
|
|
|
118
70
|
(0, _react.useEffect)(function () {
|
|
119
|
-
|
|
120
|
-
var _users$users2;
|
|
121
|
-
|
|
122
|
-
setSelectUsers((_users$users2 = users.users) === null || _users$users2 === void 0 ? void 0 : _users$users2.map(function (item) {
|
|
123
|
-
return item.user;
|
|
124
|
-
}));
|
|
125
|
-
} else {
|
|
126
|
-
setSelectUsers(users.users);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
setSelectDepartments(users.departments);
|
|
130
|
-
setSelectGroups(users.groups);
|
|
71
|
+
setSelectUsers(users);
|
|
131
72
|
}, [users]);
|
|
132
|
-
console.log(selectUsers, 'selectUsers');
|
|
133
73
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
134
74
|
className: prefix
|
|
135
75
|
}, text && /*#__PURE__*/_react["default"].createElement("div", {
|
|
136
76
|
className: "".concat(prefix, "__title")
|
|
137
77
|
}, text), /*#__PURE__*/_react["default"].createElement("div", {
|
|
138
78
|
className: "".concat(prefix, "__content")
|
|
139
|
-
},
|
|
79
|
+
}, users.map(function (item) {
|
|
140
80
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
141
81
|
className: "".concat(prefix, "__content-user")
|
|
142
82
|
}, /*#__PURE__*/_react["default"].createElement(_components["default"], {
|
|
@@ -150,44 +90,16 @@ var RichEditorAt = function RichEditorAt(_ref) {
|
|
|
150
90
|
},
|
|
151
91
|
color: item.avatar.color
|
|
152
92
|
}));
|
|
153
|
-
}), selectDepartments && selectDepartments.map(function (item) {
|
|
154
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
155
|
-
className: "".concat(prefix, "__content-user")
|
|
156
|
-
}, /*#__PURE__*/_react["default"].createElement(_components["default"], {
|
|
157
|
-
showNameTips: true,
|
|
158
|
-
canDelUser: true,
|
|
159
|
-
onDelUser: function onDelUser() {
|
|
160
|
-
return handleDeleteDepart(item);
|
|
161
|
-
},
|
|
162
|
-
color: '#3296fa',
|
|
163
|
-
name: item.name
|
|
164
|
-
}));
|
|
165
|
-
}), selectGroups && selectGroups.map(function (item) {
|
|
166
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
167
|
-
className: "".concat(prefix, "__content-user")
|
|
168
|
-
}, /*#__PURE__*/_react["default"].createElement(_components["default"], {
|
|
169
|
-
showNameTips: true,
|
|
170
|
-
canDelUser: true,
|
|
171
|
-
onDelUser: function onDelUser() {
|
|
172
|
-
return handleDeleteGroup(item);
|
|
173
|
-
},
|
|
174
|
-
color: 'rgba(90, 216, 166)',
|
|
175
|
-
name: item.name
|
|
176
|
-
}));
|
|
177
93
|
}), /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
178
94
|
multiple: true,
|
|
179
95
|
position: "right",
|
|
180
96
|
onOk: handleSelectUser,
|
|
181
|
-
disabledDepartSelect:
|
|
97
|
+
disabledDepartSelect: true,
|
|
182
98
|
panes: {
|
|
183
|
-
depart: true
|
|
184
|
-
group: !isOnlySelectUser,
|
|
185
|
-
subordinate: !isOnlySelectUser
|
|
99
|
+
depart: true
|
|
186
100
|
},
|
|
187
101
|
selectNodes: {
|
|
188
|
-
users:
|
|
189
|
-
departments: selectDepartments,
|
|
190
|
-
groups: selectGroups
|
|
102
|
+
users: seleceUsers
|
|
191
103
|
},
|
|
192
104
|
trigger: /*#__PURE__*/_react["default"].createElement("div", {
|
|
193
105
|
className: "".concat(prefix, "__import")
|