@titaui/pc 1.10.81-beta.2 → 1.10.82-beta.11
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/.husky/pre-commit +1 -1
- package/lib/components/button/rect-btn/index.css +11 -25
- package/lib/components/button/rect-btn/index.js +4 -8
- package/lib/components/drawer/index.js +8 -25
- package/lib/components/drawer-manager/index.js +25 -27
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +12 -3
- package/lib/components/dynamic/online-broadcast/data.js +7 -7
- package/lib/components/img-viewer/index.css +6 -0
- package/lib/components/img-viewer/index.js +47 -8
- package/lib/components/menus/export-modules/demo-menus/menus.js +1 -23
- package/lib/components/menus/export-modules/okr-menus/menu-highlight.js +10 -0
- package/lib/components/nav-top/index.js +2 -6
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.css +4 -3
- package/lib/components/okr-detail/detail-header/actions.js +40 -44
- package/lib/components/okr-detail/detail-header/index.css +2 -2
- package/lib/components/okr-detail/detail-header/index.js +205 -194
- package/lib/components/okr-detail/index.js +2 -0
- package/lib/components/okr-progress-modal/index.css +16 -15
- package/lib/components/okrcase-library/okrcases-components/caseLibrary-main.js +14 -8
- package/lib/components/superset-charts/components/chart/index.js +8 -36
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +8 -0
- package/lib/components/task-relation-modal/index.css +2 -2
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/kr-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/o-node/index.css +4 -0
- package/lib/components/task-relation-modal/tree-node/work-node/index.css +4 -0
- package/lib/components/wechat-btn/index.css +14 -0
- package/lib/components/wechat-btn/index.js +315 -0
- package/lib/index.js +7 -37
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +22 -28
- package/lib/pages/new-okr-list/index.js +25 -16
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- package/package.json +1 -1
- package/lib/pages/new-okr-list/header/common.js +0 -52
- package/lib/pages/new-okr-list/header/operate-record.js +0 -88
package/lib/index.js
CHANGED
|
@@ -51,12 +51,6 @@ Object.defineProperty(exports, "Communication", {
|
|
|
51
51
|
return _communication["default"];
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
Object.defineProperty(exports, "ConditionRender", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _conditionRender["default"];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
54
|
Object.defineProperty(exports, "Confidence", {
|
|
61
55
|
enumerable: true,
|
|
62
56
|
get: function get() {
|
|
@@ -69,12 +63,6 @@ Object.defineProperty(exports, "CreateOkrModal", {
|
|
|
69
63
|
return _createOkrModal["default"];
|
|
70
64
|
}
|
|
71
65
|
});
|
|
72
|
-
Object.defineProperty(exports, "DangerousHtml", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function get() {
|
|
75
|
-
return _dangerousHtml["default"];
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
66
|
Object.defineProperty(exports, "DatePicker", {
|
|
79
67
|
enumerable: true,
|
|
80
68
|
get: function get() {
|
|
@@ -171,12 +159,6 @@ Object.defineProperty(exports, "Form", {
|
|
|
171
159
|
return _form["default"];
|
|
172
160
|
}
|
|
173
161
|
});
|
|
174
|
-
Object.defineProperty(exports, "FormatTime", {
|
|
175
|
-
enumerable: true,
|
|
176
|
-
get: function get() {
|
|
177
|
-
return _formatTime["default"];
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
162
|
Object.defineProperty(exports, "GridLayout", {
|
|
181
163
|
enumerable: true,
|
|
182
164
|
get: function get() {
|
|
@@ -327,12 +309,6 @@ Object.defineProperty(exports, "OkrcaseLibraryCard", {
|
|
|
327
309
|
return _okrcaseLibraryCard["default"];
|
|
328
310
|
}
|
|
329
311
|
});
|
|
330
|
-
Object.defineProperty(exports, "OpenData", {
|
|
331
|
-
enumerable: true,
|
|
332
|
-
get: function get() {
|
|
333
|
-
return _openData["default"];
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
312
|
Object.defineProperty(exports, "OperationRecords", {
|
|
337
313
|
enumerable: true,
|
|
338
314
|
get: function get() {
|
|
@@ -399,12 +375,6 @@ Object.defineProperty(exports, "Progress", {
|
|
|
399
375
|
return _progress["default"];
|
|
400
376
|
}
|
|
401
377
|
});
|
|
402
|
-
Object.defineProperty(exports, "PublishDynamicModal", {
|
|
403
|
-
enumerable: true,
|
|
404
|
-
get: function get() {
|
|
405
|
-
return _publishDynamicModal["default"];
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
378
|
Object.defineProperty(exports, "Radio", {
|
|
409
379
|
enumerable: true,
|
|
410
380
|
get: function get() {
|
|
@@ -561,6 +531,12 @@ Object.defineProperty(exports, "VideoModal", {
|
|
|
561
531
|
return _videoModal["default"];
|
|
562
532
|
}
|
|
563
533
|
});
|
|
534
|
+
Object.defineProperty(exports, "WechatBtn", {
|
|
535
|
+
enumerable: true,
|
|
536
|
+
get: function get() {
|
|
537
|
+
return _wechatBtn["default"];
|
|
538
|
+
}
|
|
539
|
+
});
|
|
564
540
|
Object.defineProperty(exports, "WeeklyReport", {
|
|
565
541
|
enumerable: true,
|
|
566
542
|
get: function get() {
|
|
@@ -796,12 +772,6 @@ var _videoModal = _interopRequireDefault(require("./components/video-modal"));
|
|
|
796
772
|
|
|
797
773
|
var _supersetCharts = _interopRequireDefault(require("./components/superset-charts"));
|
|
798
774
|
|
|
799
|
-
var
|
|
800
|
-
|
|
801
|
-
var _publishDynamicModal = _interopRequireDefault(require("./components/publish-dynamic-modal"));
|
|
802
|
-
|
|
803
|
-
var _dangerousHtml = _interopRequireDefault(require("./components/dangerous-html"));
|
|
804
|
-
|
|
805
|
-
var _formatTime = _interopRequireDefault(require("./utils/format-time"));
|
|
775
|
+
var _wechatBtn = _interopRequireDefault(require("./components/wechat-btn"));
|
|
806
776
|
|
|
807
777
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -36,51 +36,6 @@
|
|
|
36
36
|
color: #2879ff;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.tita-okr-list-v2__header-record {
|
|
40
|
-
display: flex;
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
justify-content: center;
|
|
43
|
-
align-items: center;
|
|
44
|
-
transform: rotate(90deg);
|
|
45
|
-
background: #fff;
|
|
46
|
-
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
47
|
-
width: 36px;
|
|
48
|
-
height: 36px;
|
|
49
|
-
margin-left: 12px;
|
|
50
|
-
border-radius: 18px;
|
|
51
|
-
font-size: 20px;
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.tita-okr-list-v2__header-record-popup {
|
|
56
|
-
padding: 16px 12px;
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
background: #ffffff;
|
|
59
|
-
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
60
|
-
border-radius: 12px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.tita-okr-list-v2__header-record-item {
|
|
64
|
-
display: flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
padding: 5px 8px;
|
|
67
|
-
box-sizing: border-box;
|
|
68
|
-
font-size: 14px;
|
|
69
|
-
color: #3f4755;
|
|
70
|
-
line-height: 22px;
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.tita-okr-list-v2__header-record-item:hover {
|
|
75
|
-
color: #2879ff;
|
|
76
|
-
background: #f7f8fa;
|
|
77
|
-
border-radius: 8px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.tita-okr-list-v2__header-record-item-content {
|
|
81
|
-
margin-left: 8px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
39
|
.tita-okr-list-v2__header-filter {
|
|
85
40
|
box-sizing: border-box;
|
|
86
41
|
height: 36px;
|
|
@@ -29,8 +29,6 @@ var _filter = _interopRequireDefault(require("./filter"));
|
|
|
29
29
|
|
|
30
30
|
var _comments = _interopRequireDefault(require("./comments"));
|
|
31
31
|
|
|
32
|
-
var _operateRecord = _interopRequireDefault(require("./operate-record"));
|
|
33
|
-
|
|
34
32
|
var _context = require("../context");
|
|
35
33
|
|
|
36
34
|
var _requestApi = require("../request-api");
|
|
@@ -86,9 +84,9 @@ function Header(props, ref) {
|
|
|
86
84
|
setUserInfo = _useState6[1];
|
|
87
85
|
|
|
88
86
|
(0, _react.useEffect)(function () {
|
|
89
|
-
if (toUserId !== undefined || relation
|
|
87
|
+
if (toUserId !== undefined || relation == 1) {
|
|
90
88
|
var userId = toUserId;
|
|
91
|
-
if (relation
|
|
89
|
+
if (relation == 1) userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
92
90
|
userId && (0, _requestApi.getUserInfoById)(userId).then(function (res) {
|
|
93
91
|
setUserInfo(res.Data);
|
|
94
92
|
});
|
|
@@ -118,56 +116,56 @@ function Header(props, ref) {
|
|
|
118
116
|
var rootNode = {
|
|
119
117
|
rootId: 0,
|
|
120
118
|
// @ts-ignore
|
|
121
|
-
rootName: window.BSGlobal.tenantInfo.Name ||
|
|
119
|
+
rootName: window.BSGlobal.tenantInfo.Name || ""
|
|
122
120
|
};
|
|
123
121
|
var level2Selected = {
|
|
124
122
|
id: 0,
|
|
125
123
|
// @ts-ignore
|
|
126
|
-
name: window.BSGlobal.tenantInfo.Name ||
|
|
124
|
+
name: window.BSGlobal.tenantInfo.Name || ""
|
|
127
125
|
};
|
|
128
|
-
var searchType =
|
|
126
|
+
var searchType = "company";
|
|
129
127
|
|
|
130
|
-
if (departmentId && departmentId
|
|
128
|
+
if (departmentId && departmentId != -1) {
|
|
131
129
|
rootNode.rootId = departmentId;
|
|
132
|
-
rootNode.rootName = departmentName ||
|
|
133
|
-
searchType =
|
|
130
|
+
rootNode.rootName = departmentName || "";
|
|
131
|
+
searchType = "depart";
|
|
134
132
|
level2Selected.id = departmentId;
|
|
135
|
-
level2Selected.name = departmentName ||
|
|
133
|
+
level2Selected.name = departmentName || "";
|
|
136
134
|
}
|
|
137
135
|
|
|
138
136
|
if (toUserId) {
|
|
139
137
|
rootNode.rootId = toUserId;
|
|
140
|
-
rootNode.rootName = userInfo.name ||
|
|
141
|
-
searchType =
|
|
138
|
+
rootNode.rootName = userInfo.name || "";
|
|
139
|
+
searchType = "user";
|
|
142
140
|
level2Selected.id = toUserId;
|
|
143
|
-
level2Selected.name = userInfo.name ||
|
|
141
|
+
level2Selected.name = userInfo.name || "";
|
|
144
142
|
}
|
|
145
143
|
|
|
146
|
-
if (relation
|
|
144
|
+
if (relation == 1) {
|
|
147
145
|
rootNode.rootId = (0, _bsGlobal.getUserInfo)().Id;
|
|
148
|
-
rootNode.rootName = (0, _bsGlobal.getUserInfo)().Name ||
|
|
149
|
-
searchType =
|
|
146
|
+
rootNode.rootName = (0, _bsGlobal.getUserInfo)().Name || "";
|
|
147
|
+
searchType = "user";
|
|
150
148
|
level2Selected.id = (0, _bsGlobal.getUserInfo)().Id;
|
|
151
|
-
level2Selected.name = (0, _bsGlobal.getUserInfo)().Name ||
|
|
149
|
+
level2Selected.name = (0, _bsGlobal.getUserInfo)().Name || "";
|
|
152
150
|
}
|
|
153
151
|
|
|
154
152
|
var urlQuery = ["searchType=".concat(searchType), "period=".concat(JSON.stringify({
|
|
155
153
|
cycleType: cycleType,
|
|
156
154
|
annualNum: annualNum,
|
|
157
155
|
yqmNum: yqmNum
|
|
158
|
-
})), "rootNode=".concat(JSON.stringify(rootNode)), "level2Selected=".concat(JSON.stringify(level2Selected))].join(
|
|
156
|
+
})), "rootNode=".concat(JSON.stringify(rootNode)), "level2Selected=".concat(JSON.stringify(level2Selected))].join("&");
|
|
159
157
|
var origin = window.location.href.split('#')[0];
|
|
160
158
|
window.location.href = "".concat(origin, "/#okr/map?").concat(urlQuery);
|
|
161
159
|
};
|
|
162
160
|
|
|
163
161
|
var getTitle = function getTitle() {
|
|
164
|
-
if (relation
|
|
162
|
+
if (relation == 1) {
|
|
165
163
|
return /*#__PURE__*/_react["default"].createElement(_userTitle["default"], {
|
|
166
164
|
toUserId: (0, _bsGlobal.getUserInfo)().Id
|
|
167
165
|
});
|
|
168
166
|
}
|
|
169
167
|
|
|
170
|
-
if (relation
|
|
168
|
+
if (relation == 2 || relation == 3) {
|
|
171
169
|
return /*#__PURE__*/_react["default"].createElement(_relationTitle["default"], {
|
|
172
170
|
relation: relation
|
|
173
171
|
});
|
|
@@ -199,11 +197,11 @@ function Header(props, ref) {
|
|
|
199
197
|
className: "".concat(_precls.precls, "__header-item")
|
|
200
198
|
}, getTitle())), /*#__PURE__*/_react["default"].createElement("div", {
|
|
201
199
|
className: "".concat(_precls.precls, "__header-right")
|
|
202
|
-
}, departmentId
|
|
200
|
+
}, departmentId == 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
203
201
|
className: "".concat(_precls.precls, "__header-item")
|
|
204
202
|
}, /*#__PURE__*/_react["default"].createElement(_keywordSearch["default"], {
|
|
205
203
|
onSearch: onSearch
|
|
206
|
-
})), relation
|
|
204
|
+
})), relation != 2 && relation != 3 &&
|
|
207
205
|
/*#__PURE__*/
|
|
208
206
|
// 我关注的 我参与的 没有创建按钮
|
|
209
207
|
_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -215,7 +213,7 @@ function Header(props, ref) {
|
|
|
215
213
|
className: "".concat(_precls.precls, "__header-item"),
|
|
216
214
|
onClick: gotoOkrMap
|
|
217
215
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
218
|
-
overlay: (0, _getLocale.getLocale)(
|
|
216
|
+
overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Alignment"),
|
|
219
217
|
placement: "top"
|
|
220
218
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
221
219
|
className: "".concat(_precls.precls, "__header-icon")
|
|
@@ -227,10 +225,6 @@ function Header(props, ref) {
|
|
|
227
225
|
userInfo: userInfo
|
|
228
226
|
}), /*#__PURE__*/_react["default"].createElement(_filter["default"], {
|
|
229
227
|
onSearch: onSearch
|
|
230
|
-
}), /*#__PURE__*/_react["default"].createElement(_operateRecord["default"], {
|
|
231
|
-
toUserId: toUserId,
|
|
232
|
-
userInfo: userInfo,
|
|
233
|
-
relation: relation
|
|
234
228
|
})));
|
|
235
229
|
}
|
|
236
230
|
|
|
@@ -85,8 +85,7 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
85
85
|
var OkrListCmp = props.OkrListCmp,
|
|
86
86
|
OkrCommunicationPush = props.OkrCommunicationPush,
|
|
87
87
|
Empty = props.Empty,
|
|
88
|
-
SetCycleModal = props.SetCycleModal
|
|
89
|
-
OkrOperateRecordDrawer = props.OkrOperateRecordDrawer;
|
|
88
|
+
SetCycleModal = props.SetCycleModal;
|
|
90
89
|
var useLocalStorage = new _localStorage.LocalStorage();
|
|
91
90
|
var formFieldValues = useLocalStorage.getItem("okr-filter-values") || {
|
|
92
91
|
targetType: "",
|
|
@@ -157,12 +156,18 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
157
156
|
setQuery = _useState12[1];
|
|
158
157
|
|
|
159
158
|
var okrsRef = (0, _react.useRef)(okrs);
|
|
160
|
-
var headerRef = (0, _react.useRef)();
|
|
161
159
|
|
|
162
160
|
var _useState13 = (0, _react.useState)(false),
|
|
163
161
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
isInit = _useState14[0],
|
|
163
|
+
setIsInit = _useState14[1];
|
|
164
|
+
|
|
165
|
+
var headerRef = (0, _react.useRef)();
|
|
166
|
+
|
|
167
|
+
var _useState15 = (0, _react.useState)(false),
|
|
168
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
169
|
+
casesVisible = _useState16[0],
|
|
170
|
+
setCasesVisible = _useState16[1];
|
|
166
171
|
|
|
167
172
|
var routerData = (0, _tools.getQueryString)();
|
|
168
173
|
var departmentName = routerData.departmentName,
|
|
@@ -177,20 +182,25 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
177
182
|
relation = locationRelation || 0;
|
|
178
183
|
}
|
|
179
184
|
|
|
185
|
+
(0, _react.useEffect)(function () {
|
|
186
|
+
setPageNum(1);
|
|
187
|
+
}, [relation, toUserId, departmentId, query]);
|
|
188
|
+
|
|
180
189
|
var handleOnSearch = function handleOnSearch(params) {
|
|
181
|
-
setQuery(_objectSpread(_objectSpread(
|
|
182
|
-
|
|
183
|
-
}));
|
|
190
|
+
setQuery(_objectSpread(_objectSpread({}, query), params));
|
|
191
|
+
setPageNum(1);
|
|
184
192
|
};
|
|
185
193
|
|
|
186
194
|
(0, _react.useEffect)(function () {
|
|
187
|
-
|
|
188
|
-
|
|
195
|
+
if (isInit) {
|
|
196
|
+
handleOnSearch({
|
|
197
|
+
keyWords: ""
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}, [relation, toUserId, departmentId]);
|
|
189
201
|
(0, _react.useEffect)(function () {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
});
|
|
193
|
-
}, [relation, toUserId, departmentId]); // 记录访问者数据
|
|
202
|
+
setIsInit(true);
|
|
203
|
+
}, []); // 记录访问者数据
|
|
194
204
|
|
|
195
205
|
var recordVisitUser = function recordVisitUser() {
|
|
196
206
|
if (toUserId) {
|
|
@@ -302,11 +312,10 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
302
312
|
|
|
303
313
|
(0, _react.useEffect)(function () {
|
|
304
314
|
getOkrs();
|
|
305
|
-
}, [pageNum, pageSize, query
|
|
315
|
+
}, [pageNum, pageSize, query]);
|
|
306
316
|
return /*#__PURE__*/_react["default"].createElement(_context.Context.Provider, {
|
|
307
317
|
value: _objectSpread({
|
|
308
318
|
OkrCommunicationPush: OkrCommunicationPush,
|
|
309
|
-
OkrOperateRecordDrawer: OkrOperateRecordDrawer,
|
|
310
319
|
relation: relation,
|
|
311
320
|
departmentName: departmentName,
|
|
312
321
|
departmentId: departmentId,
|
package/lib/utils/format-time.js
CHANGED
|
@@ -167,12 +167,5 @@ var showNextMonthFirstDay = function showNextMonthFirstDay() {
|
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
exports.showNextMonthFirstDay = showNextMonthFirstDay;
|
|
170
|
-
var _default =
|
|
171
|
-
getTimeString: getTimeString,
|
|
172
|
-
timeFormat: timeFormat,
|
|
173
|
-
showWeekFirstDay: showWeekFirstDay,
|
|
174
|
-
showMonthFirstDay: showMonthFirstDay,
|
|
175
|
-
showNextWeekFirstDay: showNextWeekFirstDay,
|
|
176
|
-
showNextMonthFirstDay: showNextMonthFirstDay
|
|
177
|
-
};
|
|
170
|
+
var _default = getTimeString;
|
|
178
171
|
exports["default"] = _default;
|
package/lib/utils/open-data.js
CHANGED
|
@@ -336,10 +336,6 @@ exports.parseHtmlAndTextTag = parseHtmlAndTextTag;
|
|
|
336
336
|
var _default = {
|
|
337
337
|
OpenUserName: OpenUserName,
|
|
338
338
|
OpenDepartmentName: OpenDepartmentName,
|
|
339
|
-
isWechat: isWechat
|
|
340
|
-
isPlatform: isPlatform,
|
|
341
|
-
parseString: parseString,
|
|
342
|
-
parseTag: parseTag,
|
|
343
|
-
parseHtmlAndTextTag: parseHtmlAndTextTag
|
|
339
|
+
isWechat: isWechat
|
|
344
340
|
};
|
|
345
341
|
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.formatPeriod = void 0;
|
|
7
|
-
|
|
8
|
-
var _getLocale = require("../../../utils/getLocale");
|
|
9
|
-
|
|
10
|
-
var _constant = require("../../../utils/constant");
|
|
11
|
-
|
|
12
|
-
var formatPeriod = function formatPeriod(selected) {
|
|
13
|
-
if (!selected) return "";
|
|
14
|
-
var quarter = ["", "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_1stQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_2ndQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_3rdQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_4thQuarter"))];
|
|
15
|
-
var cycleDate = "";
|
|
16
|
-
var annualNum = Number("".concat(selected.annualNum)) === -1 ? "".concat((0, _getLocale.getLocale)("OKR_MyO_Butt_Allyears")) : "".concat(selected.annualNum).concat(_getLocale.isEn ? "" : "年");
|
|
17
|
-
var month = (0, _constant.getMonth)();
|
|
18
|
-
|
|
19
|
-
switch ("".concat(selected.cycleType)) {
|
|
20
|
-
case "-1":
|
|
21
|
-
cycleDate = "".concat((0, _getLocale.getLocale)("OKR_MyO_Butt_AllStatee"));
|
|
22
|
-
break;
|
|
23
|
-
|
|
24
|
-
case "1":
|
|
25
|
-
cycleDate = "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Year"));
|
|
26
|
-
break;
|
|
27
|
-
|
|
28
|
-
case "2":
|
|
29
|
-
// 季度
|
|
30
|
-
cycleDate = quarter[Number(selected.yqmNum)];
|
|
31
|
-
break;
|
|
32
|
-
|
|
33
|
-
case "3":
|
|
34
|
-
cycleDate = month[Number(selected.yqmNum) - 1];
|
|
35
|
-
break;
|
|
36
|
-
|
|
37
|
-
case "4":
|
|
38
|
-
cycleDate = "".concat(month[Number(selected.yqmNum) - 1], " - ").concat(month[((Number(selected.yqmNum) + 1) % 12 || 12) - 1]);
|
|
39
|
-
break;
|
|
40
|
-
|
|
41
|
-
case "5":
|
|
42
|
-
cycleDate = Number("".concat(selected.yqmNum)) === 1 ? "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Firsthalf")) : "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Secondhalf"));
|
|
43
|
-
break;
|
|
44
|
-
|
|
45
|
-
default:
|
|
46
|
-
cycleDate = "".concat((0, _getLocale.getLocale)("Mod_Customization"));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return "".concat(annualNum, " ").concat(cycleDate);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
exports.formatPeriod = formatPeriod;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _popup = _interopRequireDefault(require("../../../components/popup"));
|
|
13
|
-
|
|
14
|
-
var _getLocale = require("../../../utils/getLocale");
|
|
15
|
-
|
|
16
|
-
var _precls = require("../precls");
|
|
17
|
-
|
|
18
|
-
var _context = require("../context");
|
|
19
|
-
|
|
20
|
-
var _common = require("./common");
|
|
21
|
-
|
|
22
|
-
require("./index.css");
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
-
|
|
26
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
30
|
-
var OperateRecord = function OperateRecord(props) {
|
|
31
|
-
var popupRef = (0, _react.useRef)();
|
|
32
|
-
var drawerRef = (0, _react.useRef)();
|
|
33
|
-
var userInfo = props.userInfo,
|
|
34
|
-
toUserId = props.toUserId,
|
|
35
|
-
relation = props.relation;
|
|
36
|
-
|
|
37
|
-
var _useContext = (0, _react.useContext)(_context.Context),
|
|
38
|
-
OkrOperateRecordDrawer = _useContext.OkrOperateRecordDrawer,
|
|
39
|
-
annualNum = _useContext.annualNum,
|
|
40
|
-
cycleType = _useContext.cycleType,
|
|
41
|
-
yqmNum = _useContext.yqmNum;
|
|
42
|
-
|
|
43
|
-
var openOperateRecordPush = function openOperateRecordPush() {
|
|
44
|
-
popupRef.current && popupRef.current.close();
|
|
45
|
-
drawerRef.current && drawerRef.current.showOperateDrawerVisible();
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
49
|
-
className: "".concat(_precls.precls, "__header-record-popup")
|
|
50
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
51
|
-
className: "".concat(_precls.precls, "__header-record-item"),
|
|
52
|
-
onClick: openOperateRecordPush
|
|
53
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
54
|
-
className: "tu-icon-jinzhan-s"
|
|
55
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
56
|
-
className: "".concat(_precls.precls, "__header-record-item-content")
|
|
57
|
-
}, (0, _getLocale.getLocale)('Per_details_OperationRecord'))));
|
|
58
|
-
|
|
59
|
-
if (!toUserId && relation !== 1) return null;
|
|
60
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
61
|
-
ref: popupRef,
|
|
62
|
-
popup: popup,
|
|
63
|
-
popupAlign: {
|
|
64
|
-
offset: [0, 4]
|
|
65
|
-
}
|
|
66
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
67
|
-
className: "".concat(_precls.precls, "__header-record")
|
|
68
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
69
|
-
className: "tu-icon-more1"
|
|
70
|
-
}))), (toUserId !== undefined || relation === 1) && !!userInfo && /*#__PURE__*/_react["default"].createElement(OkrOperateRecordDrawer, {
|
|
71
|
-
ref: drawerRef,
|
|
72
|
-
userInfo: {
|
|
73
|
-
Id: userInfo.userId,
|
|
74
|
-
Name: userInfo.name,
|
|
75
|
-
Color: userInfo.avatar.color,
|
|
76
|
-
AvatarsUrl: userInfo.avatar.original,
|
|
77
|
-
Type: 1
|
|
78
|
-
},
|
|
79
|
-
okrCycle: "\u300C".concat((0, _common.formatPeriod)({
|
|
80
|
-
annualNum: annualNum,
|
|
81
|
-
cycleType: cycleType,
|
|
82
|
-
yqmNum: yqmNum
|
|
83
|
-
}), "\u300D")
|
|
84
|
-
}));
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
var _default = OperateRecord;
|
|
88
|
-
exports["default"] = _default;
|