@titaui/pc 1.12.56 → 1.12.57-beta.1
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/attachments-preview/index.css +5 -0
- package/lib/components/dynamic/constant.js +5 -1
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +42 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +24 -6
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +10 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +61 -39
- package/lib/components/dynamic/dynamic-item/components/summary-header/request-api.js +9 -3
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +89 -43
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +22 -8
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +13 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +42 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +25 -7
- package/lib/components/dynamic/dynamic-item/index.css +1 -1
- package/lib/components/guide-tip/index.css +1 -1
- package/lib/components/guide-tip/index.js +7 -4
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +8 -3
- package/lib/components/menus/export-modules/summary-menus/menus.js +55 -6
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +27 -4
- package/lib/components/menus/request-apis.js +15 -1
- package/lib/components/nav-top/components/app-center/index.css +11 -0
- package/lib/components/nav-top/components/app-center/index.js +59 -12
- package/lib/components/picker/components/panels/year-panel/index.js +3 -34
- package/lib/components/rate/index.css +1 -1
- package/lib/utils/auth.js +5 -0
- package/package.json +2 -2
|
@@ -58,7 +58,7 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
58
58
|
|
|
59
59
|
this.COMPANYALL = _index.COMPANY_ALL_NODE;
|
|
60
60
|
this.SHARE = _index.SHARE_NODE;
|
|
61
|
-
this.SUBORDINATES =
|
|
61
|
+
this.SUBORDINATES = _index.SUBORDINATES_NODE;
|
|
62
62
|
this.menus = [{
|
|
63
63
|
icon: "caidan-my",
|
|
64
64
|
label: _i18n.locale.menu_my_summary,
|
|
@@ -77,7 +77,7 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
77
77
|
icon: "caidan-xiashu",
|
|
78
78
|
label: _i18n.locale.menu_my_subordinates,
|
|
79
79
|
key: this.SUBORDINATES,
|
|
80
|
-
type:
|
|
80
|
+
type: this.SUBORDINATES,
|
|
81
81
|
isLeaf: false,
|
|
82
82
|
children: [],
|
|
83
83
|
href: "#/summary/subordinates",
|
|
@@ -85,8 +85,10 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
85
85
|
}, {
|
|
86
86
|
icon: "caidan-enjoy",
|
|
87
87
|
label: _i18n.locale.menu_my_share,
|
|
88
|
-
key:
|
|
89
|
-
type:
|
|
88
|
+
key: this.SHARE,
|
|
89
|
+
type: this.SHARE,
|
|
90
|
+
isLeaf: false,
|
|
91
|
+
children: [],
|
|
90
92
|
href: "#/summary/share",
|
|
91
93
|
isShow: props.isShowShare
|
|
92
94
|
}, {
|
|
@@ -116,10 +118,10 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
116
118
|
_createClass(summaryMenus, [{
|
|
117
119
|
key: "setSubordinatesLoading",
|
|
118
120
|
value: function setSubordinatesLoading(loading) {
|
|
119
|
-
this.menus[
|
|
121
|
+
this.menus[2].children = [];
|
|
120
122
|
|
|
121
123
|
if (loading) {
|
|
122
|
-
this.menus[
|
|
124
|
+
this.menus[2].children.push({
|
|
123
125
|
icon: "",
|
|
124
126
|
label: "loading",
|
|
125
127
|
key: "loading-subordinates",
|
|
@@ -160,6 +162,53 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
160
162
|
|
|
161
163
|
this.menus[2].children = treeNodeUsers;
|
|
162
164
|
}
|
|
165
|
+
}, {
|
|
166
|
+
key: "setShareLoading",
|
|
167
|
+
value: function setShareLoading(loading) {
|
|
168
|
+
this.menus[3].children = [];
|
|
169
|
+
|
|
170
|
+
if (loading) {
|
|
171
|
+
this.menus[3].children.push({
|
|
172
|
+
icon: "",
|
|
173
|
+
label: "loading",
|
|
174
|
+
key: "loading-subordinates",
|
|
175
|
+
type: _index.LOADING_NODE,
|
|
176
|
+
href: "",
|
|
177
|
+
data: {}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}, {
|
|
182
|
+
key: "insertShare",
|
|
183
|
+
value: function insertShare(users) {
|
|
184
|
+
if (!users || !users.length) {
|
|
185
|
+
this.menus[3].children = [{
|
|
186
|
+
icon: "",
|
|
187
|
+
label: "empty-subordinates",
|
|
188
|
+
key: "empty-subordinates",
|
|
189
|
+
type: _index.NO_SUBORDINATES_NODE,
|
|
190
|
+
href: "",
|
|
191
|
+
data: {}
|
|
192
|
+
}];
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
var treeNodeUsers = [];
|
|
197
|
+
|
|
198
|
+
for (var i = 0; i < users.length; i++) {
|
|
199
|
+
var user = users[i];
|
|
200
|
+
treeNodeUsers.push({
|
|
201
|
+
icon: "",
|
|
202
|
+
label: user.name,
|
|
203
|
+
key: "".concat(user.userId),
|
|
204
|
+
type: _index.USER_NODE,
|
|
205
|
+
href: "",
|
|
206
|
+
data: user
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
this.menus[3].children = treeNodeUsers;
|
|
211
|
+
}
|
|
163
212
|
}, {
|
|
164
213
|
key: "getMenus",
|
|
165
214
|
value: function getMenus() {
|
|
@@ -79,7 +79,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
79
79
|
isShowShare = _useState8[0],
|
|
80
80
|
setIsShowShare = _useState8[1];
|
|
81
81
|
|
|
82
|
-
var isShowDepartment = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isDepartmentLeader();
|
|
82
|
+
var isShowDepartment = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isDepartmentLeader() || baseAuth.isHrbp();
|
|
83
83
|
var flipRef = (0, _react.useRef)({
|
|
84
84
|
next: function next() {},
|
|
85
85
|
goback: function goback() {}
|
|
@@ -145,18 +145,41 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
145
145
|
resolve(true);
|
|
146
146
|
})["catch"](reject);
|
|
147
147
|
});
|
|
148
|
+
}; // 获取共享我的数据列表
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
var getShareUsers = function getShareUsers() {
|
|
152
|
+
return new Promise(function (resolve, reject) {
|
|
153
|
+
var mdata = summaryMenusData.current; // 初始化 Loading
|
|
154
|
+
|
|
155
|
+
mdata.setShareLoading(true);
|
|
156
|
+
setMenus(mdata.getMenus());
|
|
157
|
+
resolve(true); // 获取数据
|
|
158
|
+
|
|
159
|
+
(0, _requestApis.getShareUsersData)().then(function (users) {
|
|
160
|
+
console.log(users);
|
|
161
|
+
mdata.setShareLoading(false);
|
|
162
|
+
mdata.insertShare(users);
|
|
163
|
+
setMenus(mdata.getMenus());
|
|
164
|
+
resolve(true);
|
|
165
|
+
})["catch"](reject);
|
|
166
|
+
});
|
|
148
167
|
};
|
|
149
168
|
|
|
150
169
|
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
151
170
|
return new Promise(function (resolve) {
|
|
152
|
-
if (treeNode.key
|
|
153
|
-
resolve(true);
|
|
154
|
-
} else if (treeNode.key == summaryMenusData.current.SUBORDINATES) {
|
|
171
|
+
if (treeNode.key == summaryMenusData.current.SUBORDINATES) {
|
|
155
172
|
getSubordinaters().then(function () {
|
|
156
173
|
return resolve(true);
|
|
157
174
|
})["catch"](function () {
|
|
158
175
|
return resolve(true);
|
|
159
176
|
});
|
|
177
|
+
} else if (treeNode.key == summaryMenusData.current.SHARE) {
|
|
178
|
+
getShareUsers().then(function () {
|
|
179
|
+
return resolve(true);
|
|
180
|
+
})["catch"](function () {
|
|
181
|
+
return resolve(true);
|
|
182
|
+
});
|
|
160
183
|
} else {
|
|
161
184
|
resolve(true);
|
|
162
185
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.removeFollower = exports.getSubordinates = exports.getMyDepartMent = exports.getFollowerList = exports.getDepsAndUsers = exports.addFollower = void 0;
|
|
6
|
+
exports.removeFollower = exports.getSubordinates = exports.getShareUsersData = exports.getMyDepartMent = exports.getFollowerList = exports.getDepsAndUsers = exports.addFollower = void 0;
|
|
7
7
|
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
|
|
@@ -96,6 +96,20 @@ var getSubordinates = function getSubordinates(_ref) {
|
|
|
96
96
|
|
|
97
97
|
exports.getSubordinates = getSubordinates;
|
|
98
98
|
|
|
99
|
+
var getShareUsersData = function getShareUsersData() {
|
|
100
|
+
return (0, _request.rget)("v1")("summary/getShareUsers?toUserId=".concat(userId)).then(function (res) {
|
|
101
|
+
var users = [];
|
|
102
|
+
|
|
103
|
+
if (res.Code === 1) {
|
|
104
|
+
users = res.Data;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return users;
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
exports.getShareUsersData = getShareUsersData;
|
|
112
|
+
|
|
99
113
|
var addFollower = function addFollower(id) {
|
|
100
114
|
return _axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/follow/addFollower?followerId=").concat(id), null, {
|
|
101
115
|
headers: {
|
|
@@ -145,6 +145,17 @@
|
|
|
145
145
|
background-color: rgba(90, 216, 166, 0.1);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
.app-center__app-guide .titaui-pc__guide-tip__popup-triangle {
|
|
149
|
+
left: 18%;
|
|
150
|
+
bottom: -5px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.app-center__app-guide-content {
|
|
154
|
+
font-size: 14px;
|
|
155
|
+
color: #FFFFFF;
|
|
156
|
+
line-height: 22px;
|
|
157
|
+
}
|
|
158
|
+
|
|
148
159
|
.app-center__drawer {
|
|
149
160
|
transform: translateY(54px);
|
|
150
161
|
}
|
|
@@ -13,6 +13,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _drawer = _interopRequireDefault(require("../../../drawer"));
|
|
15
15
|
|
|
16
|
+
var _conditionRender = _interopRequireDefault(require("../../../condition-render"));
|
|
17
|
+
|
|
18
|
+
var _guideTip = _interopRequireDefault(require("../../../guide-tip"));
|
|
19
|
+
|
|
16
20
|
var _bookDemo = _interopRequireDefault(require("../../../book-demo"));
|
|
17
21
|
|
|
18
22
|
var _errorBoundary = _interopRequireDefault(require("../../../error-boundary"));
|
|
@@ -21,6 +25,8 @@ var _utils = require("../../utils");
|
|
|
21
25
|
|
|
22
26
|
var _errorLevel = _interopRequireDefault(require("../../../../utils/error-level"));
|
|
23
27
|
|
|
28
|
+
var _helpers = require("../../../../utils/helpers");
|
|
29
|
+
|
|
24
30
|
require("./index.css");
|
|
25
31
|
|
|
26
32
|
var _interface = require("./interface");
|
|
@@ -54,6 +60,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
54
60
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
61
|
|
|
56
62
|
var precls = 'app-center';
|
|
63
|
+
var userId = (0, _helpers.getLoginUserInfo)().Id;
|
|
57
64
|
|
|
58
65
|
var AppCenter = function AppCenter(props) {
|
|
59
66
|
var _props$appCenterVisib = props.appCenterVisible,
|
|
@@ -99,10 +106,34 @@ var AppCenter = function AppCenter(props) {
|
|
|
99
106
|
currentAppId = _useState8[0],
|
|
100
107
|
setCurrentAppId = _useState8[1];
|
|
101
108
|
|
|
109
|
+
var _useState9 = (0, _react.useState)(false),
|
|
110
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
111
|
+
summaryGuideVisible = _useState10[0],
|
|
112
|
+
setSummaryGuideVisible = _useState10[1];
|
|
113
|
+
|
|
102
114
|
var bookDemoRef = (0, _react.useRef)();
|
|
115
|
+
|
|
116
|
+
var handleCloseSummaryGuide = function handleCloseSummaryGuide() {
|
|
117
|
+
setSummaryGuideVisible(false);
|
|
118
|
+
var cacheIsKonw = localStorage.getItem("NewSummaryGuide_".concat(userId));
|
|
119
|
+
|
|
120
|
+
if (!cacheIsKonw) {
|
|
121
|
+
localStorage.setItem("NewSummaryGuide_".concat(userId), "".concat(userId));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
103
125
|
(0, _react.useEffect)(function () {
|
|
104
126
|
setInit(true);
|
|
105
127
|
}, []);
|
|
128
|
+
(0, _react.useEffect)(function () {
|
|
129
|
+
var cacheIsKonw = localStorage.getItem("NewSummaryGuide_".concat(userId));
|
|
130
|
+
|
|
131
|
+
if (cacheIsKonw) {
|
|
132
|
+
setSummaryGuideVisible(false);
|
|
133
|
+
} else {
|
|
134
|
+
setSummaryGuideVisible(true);
|
|
135
|
+
}
|
|
136
|
+
}, []);
|
|
106
137
|
(0, _react.useEffect)(function () {
|
|
107
138
|
var _apps$find;
|
|
108
139
|
|
|
@@ -160,18 +191,7 @@ var AppCenter = function AppCenter(props) {
|
|
|
160
191
|
}
|
|
161
192
|
};
|
|
162
193
|
|
|
163
|
-
|
|
164
|
-
className: "".concat(precls, "__drawer"),
|
|
165
|
-
placement: "top",
|
|
166
|
-
onClose: closeAppCenter,
|
|
167
|
-
visible: appCenterVisible,
|
|
168
|
-
width: "100%",
|
|
169
|
-
autoClosable: true
|
|
170
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
|
-
className: precls
|
|
172
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
|
-
className: "".concat(precls, "__app-list")
|
|
174
|
-
}, apps.length > 0 && apps.map(function (app) {
|
|
194
|
+
var renderAppItem = function renderAppItem(app) {
|
|
175
195
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
196
|
className: "".concat(precls, "__app-item ").concat(precls, "__app-item--").concat(app.code),
|
|
177
197
|
onClick: function onClick() {
|
|
@@ -186,6 +206,33 @@ var AppCenter = function AppCenter(props) {
|
|
|
186
206
|
}, app.title), isTrial && /*#__PURE__*/_react["default"].createElement("span", {
|
|
187
207
|
className: "".concat(precls, "__app-item-sub-title")
|
|
188
208
|
}, app.subTitle)));
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
return /*#__PURE__*/_react["default"].createElement(_drawer["default"], {
|
|
212
|
+
className: "".concat(precls, "__drawer"),
|
|
213
|
+
placement: "top",
|
|
214
|
+
onClose: closeAppCenter,
|
|
215
|
+
visible: appCenterVisible,
|
|
216
|
+
width: "100%",
|
|
217
|
+
autoClosable: true
|
|
218
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
219
|
+
className: precls
|
|
220
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
+
className: "".concat(precls, "__app-list")
|
|
222
|
+
}, apps.length > 0 && apps.map(function (app) {
|
|
223
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
224
|
+
condition: app.code === 'daily'
|
|
225
|
+
}, /*#__PURE__*/_react["default"].createElement(_guideTip["default"], {
|
|
226
|
+
visible: summaryGuideVisible,
|
|
227
|
+
content: /*#__PURE__*/_react["default"].createElement("span", {
|
|
228
|
+
className: "".concat(precls, "__app-guide-content")
|
|
229
|
+
}, "\uD83C\uDF89 \u603B\u7ED3\u5347\u7EA7\uFF01\u5168\u65B0\u63A8\u51FA OKR \u603B\u7ED3\u6A21\u7248\uFF0C\u7528\u603B\u7ED3\u6765\u5B9E\u73B0 OKR \u95ED\u73AF\uFF01"),
|
|
230
|
+
type: 'button',
|
|
231
|
+
classnames: "".concat(precls, "__app-guide"),
|
|
232
|
+
onClickClose: handleCloseSummaryGuide
|
|
233
|
+
}, renderAppItem(app))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
234
|
+
condition: app.code !== 'daily'
|
|
235
|
+
}, renderAppItem(app)));
|
|
189
236
|
}), new Array(20).fill(1).map(function () {
|
|
190
237
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
191
238
|
className: "".concat(precls, "__app-item-placeholder")
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
11
|
|
|
@@ -23,10 +21,6 @@ require("./index.css");
|
|
|
23
21
|
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
23
|
|
|
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
24
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
25
|
|
|
32
26
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -35,28 +29,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
35
29
|
|
|
36
30
|
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; }
|
|
37
31
|
|
|
38
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
39
|
-
|
|
40
|
-
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."); }
|
|
41
|
-
|
|
42
|
-
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); }
|
|
43
|
-
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
48
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
|
-
|
|
50
32
|
var YearPanel = function YearPanel(props) {
|
|
51
33
|
var onViewDateChange = props.onViewDateChange,
|
|
52
34
|
viewDate = props.viewDate;
|
|
53
|
-
|
|
54
|
-
var _useState = (0, _react.useState)(),
|
|
55
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
56
|
-
newViewDate = _useState2[0],
|
|
57
|
-
setNewViewDate = _useState2[1];
|
|
58
|
-
|
|
59
|
-
var yearNumber = (0, _moment["default"])(newViewDate).year();
|
|
35
|
+
var yearNumber = (0, _moment["default"])(viewDate).year();
|
|
60
36
|
|
|
61
37
|
var startYear = Math.floor(yearNumber / _utils.YEAR_DECADE_COUNT) * _utils.YEAR_DECADE_COUNT;
|
|
62
38
|
|
|
@@ -64,7 +40,7 @@ var YearPanel = function YearPanel(props) {
|
|
|
64
40
|
|
|
65
41
|
var onDecadeYearChange = function onDecadeYearChange(diff) {
|
|
66
42
|
if (onViewDateChange) {
|
|
67
|
-
onViewDateChange((0, _moment["default"])(
|
|
43
|
+
onViewDateChange((0, _moment["default"])(viewDate).add(diff, 'y'));
|
|
68
44
|
}
|
|
69
45
|
};
|
|
70
46
|
|
|
@@ -73,13 +49,6 @@ var YearPanel = function YearPanel(props) {
|
|
|
73
49
|
endYear: endYear
|
|
74
50
|
}));
|
|
75
51
|
|
|
76
|
-
(0, _react.useEffect)(function () {
|
|
77
|
-
if (typeof viewDate === 'string') {
|
|
78
|
-
setNewViewDate(viewDate.split('~')[0]);
|
|
79
|
-
} else {
|
|
80
|
-
setNewViewDate(viewDate);
|
|
81
|
-
}
|
|
82
|
-
}, []);
|
|
83
52
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
53
|
className: (0, _classnames["default"])("".concat(_utils.PickerPanelClass, "__year"))
|
|
85
54
|
}, /*#__PURE__*/_react["default"].createElement(_yearHead["default"], _extends({}, extendProps, {
|
package/lib/utils/auth.js
CHANGED
|
@@ -67,6 +67,11 @@ var BaseAuth = /*#__PURE__*/function () {
|
|
|
67
67
|
value: function isDepartmentLeader() {
|
|
68
68
|
return !this.loginUserInfor.IsBoss && this.loginUserInfor.IsLeader;
|
|
69
69
|
}
|
|
70
|
+
}, {
|
|
71
|
+
key: "isHrbp",
|
|
72
|
+
value: function isHrbp() {
|
|
73
|
+
return !this.loginUserInfor.IsBoss && this.loginUserInfor.IsHrbp;
|
|
74
|
+
}
|
|
70
75
|
}, {
|
|
71
76
|
key: "isPlanDailyManager",
|
|
72
77
|
value: function isPlanDailyManager() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.57-beta.1",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@titaui/rc-trigger": "5.2.5",
|
|
79
79
|
"@titaui/react-flow-renderer": "9.5.4",
|
|
80
80
|
"@titaui/request": "^1.0.1",
|
|
81
|
-
"@titaui/rich-editor": "0.1.
|
|
81
|
+
"@titaui/rich-editor": "0.1.56",
|
|
82
82
|
"@titaui/toast": "1.0.0",
|
|
83
83
|
"@types/color": "3.0.3",
|
|
84
84
|
"@types/prosemirror-commands": "1.0.4",
|