@titaui/pc 1.12.54 → 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 +29 -10
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +39 -2
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.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 -4
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +15 -5
- package/lib/components/menus/export-modules/summary-menus/menus.js +55 -6
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +33 -25
- package/lib/components/menus/request-apis.js +16 -2
- 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/components/select-tags/index.js +4 -2
- package/lib/utils/auth.js +5 -0
- package/package.json +2 -2
|
@@ -17,7 +17,7 @@ var _button = _interopRequireDefault(require("../button"));
|
|
|
17
17
|
|
|
18
18
|
require("./index.css");
|
|
19
19
|
|
|
20
|
-
var _excluded = ["type", "width", "time", "children", "popupPlacement", "classnames", "content", "onClickClose", "buttonTitle"];
|
|
20
|
+
var _excluded = ["type", "width", "time", "children", "popupPlacement", "classnames", "content", "onClickClose", "buttonTitle", "visible"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
@@ -72,6 +72,8 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
72
72
|
onClickClose = props.onClickClose,
|
|
73
73
|
_props$buttonTitle = props.buttonTitle,
|
|
74
74
|
buttonTitle = _props$buttonTitle === void 0 ? '好哒' : _props$buttonTitle,
|
|
75
|
+
_props$visible = props.visible,
|
|
76
|
+
visible = _props$visible === void 0 ? false : _props$visible,
|
|
75
77
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
76
78
|
|
|
77
79
|
var handleCloseGuidePopup = function handleCloseGuidePopup() {
|
|
@@ -92,7 +94,8 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
92
94
|
onClick: handleCloseGuidePopup
|
|
93
95
|
})), type === 'button' && /*#__PURE__*/_react["default"].createElement(_button["default"].Rect, {
|
|
94
96
|
text: buttonTitle,
|
|
95
|
-
size: "small"
|
|
97
|
+
size: "small",
|
|
98
|
+
onClick: handleCloseGuidePopup
|
|
96
99
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
97
100
|
className: (0, _classnames["default"])("".concat(preCls, "__popup-triangle"), "".concat(preCls, "__popup-triangle--").concat(popupPlacement))
|
|
98
101
|
}));
|
|
@@ -111,7 +114,7 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
111
114
|
(0, _react.useEffect)(function () {
|
|
112
115
|
if (type === 'time') {
|
|
113
116
|
setTimeout(function () {
|
|
114
|
-
|
|
117
|
+
popupRef.current.close();
|
|
115
118
|
}, time);
|
|
116
119
|
}
|
|
117
120
|
}, []);
|
|
@@ -120,7 +123,7 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
120
123
|
action: ['focus'],
|
|
121
124
|
popupPlacement: popupPlacement,
|
|
122
125
|
popup: renderPopupContent(),
|
|
123
|
-
popupVisible:
|
|
126
|
+
popupVisible: visible
|
|
124
127
|
}, restProps), children);
|
|
125
128
|
});
|
|
126
129
|
var _default = GuideTip;
|
|
@@ -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,8 +124,7 @@ var _default = function _default() {
|
|
|
124
124
|
});
|
|
125
125
|
} else {
|
|
126
126
|
(0, _requestApis.getMyDepartMent)().then(function (res) {
|
|
127
|
-
|
|
128
|
-
var rawTreeData = (0, _helper.translateDepartsToTreeNode)(res.Data);
|
|
127
|
+
var rawTreeData = (0, _helper.translateDepartsToTreeNode)(res.Data.departments);
|
|
129
128
|
var rootNode = {
|
|
130
129
|
async: true,
|
|
131
130
|
data: {
|
|
@@ -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));
|
|
@@ -166,7 +171,12 @@ var _default = function _default() {
|
|
|
166
171
|
nodes.forEach(function (it) {
|
|
167
172
|
return rawTreeData.push(it);
|
|
168
173
|
});
|
|
169
|
-
|
|
174
|
+
var deWeightData = {};
|
|
175
|
+
rawTreeData.forEach(function (item) {
|
|
176
|
+
deWeightData[item.id] = item;
|
|
177
|
+
});
|
|
178
|
+
var result = Object.values(deWeightData);
|
|
179
|
+
setRawTreeData(_toConsumableArray(result));
|
|
170
180
|
setTreeData((0, _utils.toTree)(rawTreeData));
|
|
171
181
|
resolve(true);
|
|
172
182
|
});
|
|
@@ -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() {
|
|
@@ -64,7 +64,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
64
64
|
maxHeight = _useState2[0],
|
|
65
65
|
setMaxHeight = _useState2[1];
|
|
66
66
|
|
|
67
|
-
var _useState3 = (0, _react.useState)([
|
|
67
|
+
var _useState3 = (0, _react.useState)(['myokr']),
|
|
68
68
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
69
69
|
expandedKeys = _useState4[0],
|
|
70
70
|
setExpandedKeys = _useState4[1];
|
|
@@ -79,27 +79,23 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
79
79
|
isShowShare = _useState8[0],
|
|
80
80
|
setIsShowShare = _useState8[1];
|
|
81
81
|
|
|
82
|
-
var
|
|
83
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
84
|
-
isShowDepartment = _useState10[0],
|
|
85
|
-
setIsShowDepartment = _useState10[1];
|
|
86
|
-
|
|
82
|
+
var isShowDepartment = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isDepartmentLeader() || baseAuth.isHrbp();
|
|
87
83
|
var flipRef = (0, _react.useRef)({
|
|
88
84
|
next: function next() {},
|
|
89
85
|
goback: function goback() {}
|
|
90
86
|
});
|
|
91
87
|
var summaryMenusData = (0, _react.useRef)(_menus.defaultRefObject);
|
|
92
88
|
|
|
93
|
-
var
|
|
89
|
+
var _useState9 = (0, _react.useState)(function () {
|
|
94
90
|
summaryMenusData.current = new _menus["default"]({
|
|
95
91
|
isShowShare: false,
|
|
96
92
|
isShowDept: true
|
|
97
93
|
});
|
|
98
94
|
return summaryMenusData.current.getMenus();
|
|
99
95
|
}),
|
|
100
|
-
|
|
101
|
-
menus =
|
|
102
|
-
setMenus =
|
|
96
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
97
|
+
menus = _useState10[0],
|
|
98
|
+
setMenus = _useState10[1]; // 判断路由高亮菜单
|
|
103
99
|
|
|
104
100
|
|
|
105
101
|
(0, _react.useEffect)(function () {
|
|
@@ -139,7 +135,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
139
135
|
resolve(true); // 获取数据
|
|
140
136
|
|
|
141
137
|
(0, _requestApis.getSubordinates)({
|
|
142
|
-
relationIds:
|
|
138
|
+
relationIds: '1,2'
|
|
143
139
|
}, {
|
|
144
140
|
disabledDottedSubordinatesDig: true
|
|
145
141
|
}).then(function (users) {
|
|
@@ -149,18 +145,41 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
149
145
|
resolve(true);
|
|
150
146
|
})["catch"](reject);
|
|
151
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
|
+
});
|
|
152
167
|
};
|
|
153
168
|
|
|
154
169
|
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
155
170
|
return new Promise(function (resolve) {
|
|
156
|
-
if (treeNode.key
|
|
157
|
-
resolve(true);
|
|
158
|
-
} else if (treeNode.key == summaryMenusData.current.SUBORDINATES) {
|
|
171
|
+
if (treeNode.key == summaryMenusData.current.SUBORDINATES) {
|
|
159
172
|
getSubordinaters().then(function () {
|
|
160
173
|
return resolve(true);
|
|
161
174
|
})["catch"](function () {
|
|
162
175
|
return resolve(true);
|
|
163
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
|
+
});
|
|
164
183
|
} else {
|
|
165
184
|
resolve(true);
|
|
166
185
|
}
|
|
@@ -194,17 +213,6 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
194
213
|
}
|
|
195
214
|
}
|
|
196
215
|
});
|
|
197
|
-
|
|
198
|
-
if (!isShowDepartment) {
|
|
199
|
-
(0, _requestApis.getMyDepartMent)().then(function (resp) {
|
|
200
|
-
if (resp.Code === 1) {
|
|
201
|
-
if (resp.Data.length > 0) {
|
|
202
|
-
setIsShowDepartment(true);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
|
|
208
216
|
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
209
217
|
var _iterator = _createForOfIteratorHelper(entries),
|
|
210
218
|
_step;
|
|
@@ -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: {
|
|
@@ -140,7 +154,7 @@ var getDepsAndUsers = function getDepsAndUsers() {
|
|
|
140
154
|
exports.getDepsAndUsers = getDepsAndUsers;
|
|
141
155
|
|
|
142
156
|
var getMyDepartMent = function getMyDepartMent() {
|
|
143
|
-
return (0, _request.rget)('v2')("department/
|
|
157
|
+
return (0, _request.rget)('v2')("department/sub/depsAndUsersByPrivilege?objType=8&isGetUser=false");
|
|
144
158
|
};
|
|
145
159
|
|
|
146
160
|
exports.getMyDepartMent = getMyDepartMent;
|
|
@@ -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, {
|
|
@@ -21,7 +21,7 @@ var _openData = require("../../utils/open-data");
|
|
|
21
21
|
|
|
22
22
|
require("./index.css");
|
|
23
23
|
|
|
24
|
-
var _excluded = ["selected", "controlValue", "data", "onChange", "style", "mode", "className", "placeholder", "name", "noBorder"];
|
|
24
|
+
var _excluded = ["selected", "controlValue", "data", "onChange", "style", "mode", "className", "placeholder", "name", "noBorder", "isParse"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
27
|
|
|
@@ -69,6 +69,8 @@ var SelectTags = function SelectTags(_ref) {
|
|
|
69
69
|
placeholder = _ref$placeholder === void 0 ? "".concat((0, _getLocale.getLocale)("Mod_Pleaseselect")) : _ref$placeholder,
|
|
70
70
|
name = _ref.name,
|
|
71
71
|
noBorder = _ref.noBorder,
|
|
72
|
+
_ref$isParse = _ref.isParse,
|
|
73
|
+
isParse = _ref$isParse === void 0 ? false : _ref$isParse,
|
|
72
74
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
73
75
|
|
|
74
76
|
var _useState = (0, _react.useState)(selected),
|
|
@@ -112,7 +114,7 @@ var SelectTags = function SelectTags(_ref) {
|
|
|
112
114
|
return /*#__PURE__*/_react["default"].createElement(_rcSelect.Option, {
|
|
113
115
|
key: key,
|
|
114
116
|
value: item.value
|
|
115
|
-
}, (0, _openData.parseString)(item.label));
|
|
117
|
+
}, isParse ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _openData.parseString)(item.label)) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.label));
|
|
116
118
|
})));
|
|
117
119
|
};
|
|
118
120
|
|
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",
|