@titaui/pc 1.12.55 → 1.12.57-beta.2
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 +63 -62
- 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/dynamic-new-report/util.js +1 -1
- 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 -21
- 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 +61 -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
|
@@ -100,7 +100,7 @@ var _default = function _default() {
|
|
|
100
100
|
var showCompanyAll = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager();
|
|
101
101
|
(0, _react.useEffect)(function () {
|
|
102
102
|
if (showCompanyAll) {
|
|
103
|
-
window.location.href = '#/summary/manage?departmentName=公司全部&departmentId=0';
|
|
103
|
+
window.location.href = '#/summary/manage?departmentName=公司全部&departmentId=0&modeType=date';
|
|
104
104
|
|
|
105
105
|
var allDepartmentText = window.getLocale && window.getLocale(_i18n.locale.menu_alldeparment) || _i18n.locale.menu_alldeparment;
|
|
106
106
|
|
|
@@ -124,7 +124,6 @@ var _default = function _default() {
|
|
|
124
124
|
});
|
|
125
125
|
} else {
|
|
126
126
|
(0, _requestApis.getMyDepartMent)().then(function (res) {
|
|
127
|
-
location.href = "#/summary/manage?departmentName=".concat(res.Data.departments[0].name, "&departmentId=").concat(res.Data.departments[0].id);
|
|
128
127
|
var rawTreeData = (0, _helper.translateDepartsToTreeNode)(res.Data.departments);
|
|
129
128
|
var rootNode = {
|
|
130
129
|
async: true,
|
|
@@ -133,14 +132,20 @@ var _default = function _default() {
|
|
|
133
132
|
name: '全部管理部门'
|
|
134
133
|
},
|
|
135
134
|
pid: 0,
|
|
136
|
-
id:
|
|
135
|
+
id: -1,
|
|
137
136
|
key: -1,
|
|
137
|
+
isLeaf: true,
|
|
138
138
|
nodeType: _index.DEPART_NODE,
|
|
139
139
|
title: '全部管理部门'
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
if (rawTreeData.length > 1) {
|
|
143
|
+
location.href = "#/summary/manage?departmentName=".concat(res.Data.departments[0].name, "&departmentId=-1&modeType=date");
|
|
143
144
|
rawTreeData.unshift(rootNode);
|
|
145
|
+
setSelectedMenuKeys([-1]);
|
|
146
|
+
} else {
|
|
147
|
+
location.href = "#/summary/manage?departmentName=".concat(res.Data.departments[0].name, "&departmentId=").concat(res.Data.departments[0].id, "&modeType=date");
|
|
148
|
+
setSelectedMenuKeys([rawTreeData[0].id]);
|
|
144
149
|
}
|
|
145
150
|
|
|
146
151
|
setRawTreeData(_toConsumableArray(rawTreeData));
|
|
@@ -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,10 +25,14 @@ 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");
|
|
27
33
|
|
|
34
|
+
var _bsGlobal = require("../../../../utils/bs-global");
|
|
35
|
+
|
|
28
36
|
var _yuyueAward = _interopRequireDefault(require("./images/yuyue-award.png"));
|
|
29
37
|
|
|
30
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -54,6 +62,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
54
62
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
63
|
|
|
56
64
|
var precls = 'app-center';
|
|
65
|
+
var userId = (0, _helpers.getLoginUserInfo)().Id;
|
|
57
66
|
|
|
58
67
|
var AppCenter = function AppCenter(props) {
|
|
59
68
|
var _props$appCenterVisib = props.appCenterVisible,
|
|
@@ -99,10 +108,34 @@ var AppCenter = function AppCenter(props) {
|
|
|
99
108
|
currentAppId = _useState8[0],
|
|
100
109
|
setCurrentAppId = _useState8[1];
|
|
101
110
|
|
|
111
|
+
var _useState9 = (0, _react.useState)(false),
|
|
112
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
113
|
+
summaryGuideVisible = _useState10[0],
|
|
114
|
+
setSummaryGuideVisible = _useState10[1];
|
|
115
|
+
|
|
102
116
|
var bookDemoRef = (0, _react.useRef)();
|
|
117
|
+
|
|
118
|
+
var handleCloseSummaryGuide = function handleCloseSummaryGuide() {
|
|
119
|
+
setSummaryGuideVisible(false);
|
|
120
|
+
var cacheIsKonw = localStorage.getItem("NewSummaryGuide_".concat(userId));
|
|
121
|
+
|
|
122
|
+
if (!cacheIsKonw) {
|
|
123
|
+
localStorage.setItem("NewSummaryGuide_".concat(userId), "".concat(userId));
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
103
127
|
(0, _react.useEffect)(function () {
|
|
104
128
|
setInit(true);
|
|
105
129
|
}, []);
|
|
130
|
+
(0, _react.useEffect)(function () {
|
|
131
|
+
var cacheIsKonw = localStorage.getItem("NewSummaryGuide_".concat(userId));
|
|
132
|
+
|
|
133
|
+
if (cacheIsKonw) {
|
|
134
|
+
setSummaryGuideVisible(false);
|
|
135
|
+
} else {
|
|
136
|
+
setSummaryGuideVisible(true);
|
|
137
|
+
}
|
|
138
|
+
}, []);
|
|
106
139
|
(0, _react.useEffect)(function () {
|
|
107
140
|
var _apps$find;
|
|
108
141
|
|
|
@@ -160,18 +193,7 @@ var AppCenter = function AppCenter(props) {
|
|
|
160
193
|
}
|
|
161
194
|
};
|
|
162
195
|
|
|
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) {
|
|
196
|
+
var renderAppItem = function renderAppItem(app) {
|
|
175
197
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
198
|
className: "".concat(precls, "__app-item ").concat(precls, "__app-item--").concat(app.code),
|
|
177
199
|
onClick: function onClick() {
|
|
@@ -186,6 +208,33 @@ var AppCenter = function AppCenter(props) {
|
|
|
186
208
|
}, app.title), isTrial && /*#__PURE__*/_react["default"].createElement("span", {
|
|
187
209
|
className: "".concat(precls, "__app-item-sub-title")
|
|
188
210
|
}, app.subTitle)));
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
return /*#__PURE__*/_react["default"].createElement(_drawer["default"], {
|
|
214
|
+
className: "".concat(precls, "__drawer"),
|
|
215
|
+
placement: "top",
|
|
216
|
+
onClose: closeAppCenter,
|
|
217
|
+
visible: appCenterVisible,
|
|
218
|
+
width: "100%",
|
|
219
|
+
autoClosable: true
|
|
220
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
+
className: precls
|
|
222
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
223
|
+
className: "".concat(precls, "__app-list")
|
|
224
|
+
}, apps.length > 0 && apps.map(function (app) {
|
|
225
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
226
|
+
condition: app.code === 'summary'
|
|
227
|
+
}, /*#__PURE__*/_react["default"].createElement(_guideTip["default"], {
|
|
228
|
+
visible: summaryGuideVisible,
|
|
229
|
+
content: /*#__PURE__*/_react["default"].createElement("span", {
|
|
230
|
+
className: "".concat(precls, "__app-guide-content")
|
|
231
|
+
}, (0, _bsGlobal.hasWebHead)('okr') ? '🎉 总结升级!全新推出 OKR 总结模版,用总结来实现 OKR闭环!' : '总结升级!查看总结与书写总结都更加轻便啦!'),
|
|
232
|
+
type: 'button',
|
|
233
|
+
classnames: "".concat(precls, "__app-guide"),
|
|
234
|
+
onClickClose: handleCloseSummaryGuide
|
|
235
|
+
}, renderAppItem(app))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
236
|
+
condition: app.code !== 'summary'
|
|
237
|
+
}, renderAppItem(app)));
|
|
189
238
|
}), new Array(20).fill(1).map(function () {
|
|
190
239
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
191
240
|
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.2",
|
|
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",
|