@titaui/pc 1.11.21-beta.2 → 1.11.21-beta.3
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/avatar/name-avatar/index.css +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +6 -12
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -41
- package/lib/components/drawer/index.css +0 -44
- package/lib/components/drawer/index.js +7 -36
- package/lib/components/dynamic/index.js +9 -12
- package/lib/components/dynamic/request-api.js +7 -68
- package/lib/components/nav-top/index.js +5 -6
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -16
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -9
- package/lib/components/okr-detail/components/header/o-name.js +3 -9
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +6 -9
- package/lib/components/okr-detail/detail-header/index.js +195 -206
- package/lib/components/okr-detail/index.js +2 -21
- package/lib/components/okr-detail/okr-list/index.js +3 -8
- package/lib/components/okr-detail/request-apis.js +1 -7
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/task-relation-modal/request-api.js +1 -2
- package/lib/index.js +0 -40
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- package/package.json +2 -2
- package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
- package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/index.css +0 -21
- package/lib/components/dynamic/advertise/index.js +0 -126
- package/lib/components/dynamic/advertise/interface.js +0 -5
- package/lib/components/dynamic/advertise/util.js +0 -28
- package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
- package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
- package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
- package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
- package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
- package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
- package/lib/components/dynamic/dynamic-liking/index.css +0 -81
- package/lib/components/dynamic/dynamic-liking/index.js +0 -79
- package/lib/components/dynamic/dynamic-liking/item.js +0 -75
- package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
- package/lib/components/dynamic/dynamic-topping/index.css +0 -141
- package/lib/components/dynamic/dynamic-topping/index.js +0 -82
- package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
- package/lib/components/dynamic/dynamic-topping/item.js +0 -153
- package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
- package/lib/components/dynamic/dynamic.css +0 -173
- package/lib/components/dynamic/dynamic.js +0 -428
- package/lib/components/dynamic/export-module/index.js +0 -37
- package/lib/components/dynamic/img/dynamic-top.svg +0 -14
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +0 -184
- package/lib/components/dynamic/my-team/index.js +0 -263
- package/lib/components/dynamic/my-team/request-api.js +0 -52
- package/lib/components/dynamic/my-team/util.js +0 -20
- package/lib/components/dynamic/new-ui.css +0 -192
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
- package/lib/components/dynamic/online-broadcast/data.js +0 -77
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +0 -46
- package/lib/components/dynamic/online-broadcast/index.js +0 -61
- package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +0 -44
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +0 -51
- package/lib/components/dynamic/quick-operation/index.js +0 -120
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/helper.js +0 -62
- package/lib/components/textarea/index.css +0 -120
- package/lib/components/textarea/index.js +0 -257
- package/lib/pages/new-okr-list/header/common.js +0 -52
- package/lib/pages/new-okr-list/header/operate-record.js +0 -124
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getApproveStatusTextMap = exports.ApproveStatusColor = exports.ApproveStatus = void 0;
|
|
7
|
-
|
|
8
|
-
var _getLocale = require("../../../utils/getLocale");
|
|
9
|
-
|
|
10
|
-
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; }
|
|
11
|
-
|
|
12
|
-
var ApproveStatus;
|
|
13
|
-
exports.ApproveStatus = ApproveStatus;
|
|
14
|
-
|
|
15
|
-
(function (ApproveStatus) {
|
|
16
|
-
ApproveStatus[ApproveStatus["None"] = 0] = "None";
|
|
17
|
-
ApproveStatus[ApproveStatus["WaitCommit"] = 6] = "WaitCommit";
|
|
18
|
-
ApproveStatus[ApproveStatus["Rejected"] = 3] = "Rejected";
|
|
19
|
-
ApproveStatus[ApproveStatus["UnderApproval"] = 1] = "UnderApproval";
|
|
20
|
-
ApproveStatus[ApproveStatus["ApproveAgree"] = 2] = "ApproveAgree";
|
|
21
|
-
ApproveStatus[ApproveStatus["WithDraw"] = 4] = "WithDraw";
|
|
22
|
-
ApproveStatus[ApproveStatus["Done"] = 5] = "Done";
|
|
23
|
-
})(ApproveStatus || (exports.ApproveStatus = ApproveStatus = {}));
|
|
24
|
-
|
|
25
|
-
var getApproveStatusTextMap = function getApproveStatusTextMap(status) {
|
|
26
|
-
var _ApproveStatusTextMap;
|
|
27
|
-
|
|
28
|
-
var ApproveStatusTextMap = (_ApproveStatusTextMap = {}, _defineProperty(_ApproveStatusTextMap, ApproveStatus.WaitCommit, (0, _getLocale.getLocale)('OKR_MyO_Tobesubmitted')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.Rejected, (0, _getLocale.getLocale)('OKR_MyO_Tobesubmitted')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.UnderApproval, (0, _getLocale.getLocale)('Pro_detail_Approval')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.ApproveAgree, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.WithDraw, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.None, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.Done, ''), _ApproveStatusTextMap);
|
|
29
|
-
return ApproveStatusTextMap[status];
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
exports.getApproveStatusTextMap = getApproveStatusTextMap;
|
|
33
|
-
|
|
34
|
-
var ApproveStatusColor = function ApproveStatusColor(status) {
|
|
35
|
-
var _ApprovalStatusColorM;
|
|
36
|
-
|
|
37
|
-
var ApprovalStatusColorMap = (_ApprovalStatusColorM = {}, _defineProperty(_ApprovalStatusColorM, ApproveStatus.WaitCommit, {
|
|
38
|
-
color: '#F0A326',
|
|
39
|
-
bgColor: 'rgba(240, 163, 38, 0.1)'
|
|
40
|
-
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.Rejected, {
|
|
41
|
-
color: '#F0A326',
|
|
42
|
-
bgColor: 'rgba(240, 163, 38, 0.1)'
|
|
43
|
-
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.UnderApproval, {
|
|
44
|
-
color: '#2879FF',
|
|
45
|
-
bgColor: 'rgba(40, 121, 255, 0.1)'
|
|
46
|
-
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.ApproveAgree, {
|
|
47
|
-
color: '#ffffff',
|
|
48
|
-
bgColor: '#ffffff'
|
|
49
|
-
}), _ApprovalStatusColorM);
|
|
50
|
-
return ApprovalStatusColorMap[status];
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
exports.ApproveStatusColor = ApproveStatusColor;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getApprovalOpenItem = exports.getApprovalIsShow = exports.EApproveStatus = exports.EApprovalTypes = void 0;
|
|
7
|
-
var EApprovalTypes;
|
|
8
|
-
exports.EApprovalTypes = EApprovalTypes;
|
|
9
|
-
|
|
10
|
-
(function (EApprovalTypes) {
|
|
11
|
-
EApprovalTypes[EApprovalTypes["CreateOkr"] = 53] = "CreateOkr";
|
|
12
|
-
EApprovalTypes[EApprovalTypes["ChangeOkrName"] = 54] = "ChangeOkrName";
|
|
13
|
-
EApprovalTypes[EApprovalTypes["ChangeOkrTime"] = 56] = "ChangeOkrTime";
|
|
14
|
-
EApprovalTypes[EApprovalTypes["DeleteOkr"] = 55] = "DeleteOkr";
|
|
15
|
-
})(EApprovalTypes || (exports.EApprovalTypes = EApprovalTypes = {}));
|
|
16
|
-
|
|
17
|
-
var EApproveStatus;
|
|
18
|
-
exports.EApproveStatus = EApproveStatus;
|
|
19
|
-
|
|
20
|
-
(function (EApproveStatus) {
|
|
21
|
-
EApproveStatus[EApproveStatus["None"] = 0] = "None";
|
|
22
|
-
EApproveStatus[EApproveStatus["WaitCommit"] = 6] = "WaitCommit";
|
|
23
|
-
EApproveStatus[EApproveStatus["Rejected"] = 3] = "Rejected";
|
|
24
|
-
EApproveStatus[EApproveStatus["UnderApproval"] = 1] = "UnderApproval";
|
|
25
|
-
EApproveStatus[EApproveStatus["ApproveAgree"] = 2] = "ApproveAgree";
|
|
26
|
-
EApproveStatus[EApproveStatus["WithDraw"] = 4] = "WithDraw";
|
|
27
|
-
EApproveStatus[EApproveStatus["Done"] = 5] = "Done";
|
|
28
|
-
})(EApproveStatus || (exports.EApproveStatus = EApproveStatus = {}));
|
|
29
|
-
|
|
30
|
-
var getApprovalOpenItem = function getApprovalOpenItem(setting) {
|
|
31
|
-
var result = {
|
|
32
|
-
isOpen: setting.isOpened === 1,
|
|
33
|
-
changeOkrName: false,
|
|
34
|
-
changeOkrTime: false,
|
|
35
|
-
deleteOkr: false,
|
|
36
|
-
createOkr: false
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
if (setting !== null && setting !== void 0 && setting.okrApprovalSettings) {
|
|
40
|
-
setting.okrApprovalSettings.forEach(function (item) {
|
|
41
|
-
if (item.approvalType === EApprovalTypes.ChangeOkrName) {
|
|
42
|
-
result.changeOkrName = true;
|
|
43
|
-
} else if (item.approvalType === EApprovalTypes.ChangeOkrTime) {
|
|
44
|
-
result.changeOkrTime = true;
|
|
45
|
-
} else if (item.approvalType === EApprovalTypes.CreateOkr) {
|
|
46
|
-
result.createOkr = true;
|
|
47
|
-
} else if (item.approvalType === EApprovalTypes.DeleteOkr) {
|
|
48
|
-
result.deleteOkr = true;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return result;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
exports.getApprovalOpenItem = getApprovalOpenItem;
|
|
57
|
-
|
|
58
|
-
var getApprovalIsShow = function getApprovalIsShow(approvalSetting, type, applyState) {
|
|
59
|
-
return !approvalSetting.isOpen || approvalSetting.isOpen && !(approvalSetting !== null && approvalSetting !== void 0 && approvalSetting[type]) || approvalSetting.isOpen && (approvalSetting === null || approvalSetting === void 0 ? void 0 : approvalSetting[type]) && applyState !== EApproveStatus.UnderApproval;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
exports.getApprovalIsShow = getApprovalIsShow;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
.titaui-textArea {
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
position: relative;
|
|
4
|
-
min-height: 36px;
|
|
5
|
-
background: #ffffff;
|
|
6
|
-
cursor: text;
|
|
7
|
-
border-radius: 4px;
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
padding: 7px 0;
|
|
11
|
-
transition: border 0.2s ease 0.2s, box-shadow 0.2s ease 0.2s;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.titaui-textArea.has-error {
|
|
15
|
-
border: 1px solid #f05e5e !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.titaui-textArea:hover {
|
|
19
|
-
border: 1px solid #2879ff;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.titaui-textArea > input {
|
|
23
|
-
flex-grow: 1;
|
|
24
|
-
border: none;
|
|
25
|
-
padding: 0 12px;
|
|
26
|
-
margin: 0;
|
|
27
|
-
outline: none;
|
|
28
|
-
width: 0;
|
|
29
|
-
box-sizing: border-box;
|
|
30
|
-
background-color: transparent;
|
|
31
|
-
color: #3f4755;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.titaui-textArea > input ::-webkit-input-placeholder {
|
|
35
|
-
color: #bfc7d5;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.titaui-textArea > input :-ms-input-placeholder {
|
|
39
|
-
color: #bfc7d5;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.titaui-textArea > input :-moz-input-placeholder {
|
|
43
|
-
color: #bfc7d5;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.titaui-textArea textarea {
|
|
47
|
-
flex: 1;
|
|
48
|
-
line-height: 20px;
|
|
49
|
-
min-height: 20px;
|
|
50
|
-
border: none;
|
|
51
|
-
padding: 0;
|
|
52
|
-
margin: 0;
|
|
53
|
-
outline: none;
|
|
54
|
-
resize: none;
|
|
55
|
-
padding: 0 12px;
|
|
56
|
-
width: 100%;
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
background-color: transparent;
|
|
59
|
-
color: #3f4755;
|
|
60
|
-
word-break: break-all;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.titaui-textArea textarea ::-webkit-input-placeholder {
|
|
64
|
-
color: #bfc7d5;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.titaui-textArea textarea :-ms-input-placeholder {
|
|
68
|
-
color: #bfc7d5;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.titaui-textArea textarea :-moz-input-placeholder {
|
|
72
|
-
color: #bfc7d5;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.titaui-textArea.disabled {
|
|
76
|
-
background-color: rgba(240, 242, 245, 0.4);
|
|
77
|
-
border-color: #f0f2f5;
|
|
78
|
-
color: #bfc7d5;
|
|
79
|
-
cursor: default;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.titaui-textArea.disabled > input,
|
|
83
|
-
.titaui-textArea.disabled textarea,
|
|
84
|
-
.titaui-textArea.disabled .tail-wrapper {
|
|
85
|
-
color: #bfc7d5;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.titaui-textArea.disabled:hover {
|
|
89
|
-
border-color: #f0f2f5;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.area-error {
|
|
93
|
-
border: 1px solid #f05e5e !important;
|
|
94
|
-
box-shadow: 0px 0px 6px 0px rgba(240, 94, 94, 0.3);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.area-focus {
|
|
98
|
-
border: 1px solid #2879ff !important;
|
|
99
|
-
box-shadow: 0px 0px 6px 0px rgba(40, 121, 255, 0.3);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.area-normal {
|
|
103
|
-
border: 1px solid #e9ecf0 !important;
|
|
104
|
-
box-shadow: none;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.inner {
|
|
108
|
-
overflow: auto;
|
|
109
|
-
display: flex;
|
|
110
|
-
flex: 1;
|
|
111
|
-
width: 0;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.err-color {
|
|
115
|
-
font-size: 12px;
|
|
116
|
-
font-weight: 400;
|
|
117
|
-
color: #f05e5e;
|
|
118
|
-
line-height: 18px;
|
|
119
|
-
padding-left: 12px;
|
|
120
|
-
}
|
|
@@ -1,257 +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
|
-
require("./index.css");
|
|
13
|
-
|
|
14
|
-
var _excluded = ["disabled", "onFocus", "onBlur", "inputRef", "onChange", "autoHeight", "style", "className", "value", "placeholder", "maxLine", "maxLength", "initValue", "onErrorChange", "validator", "onKeyDown"];
|
|
15
|
-
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
|
-
function _extends() { _extends = Object.assign || 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); }
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
-
|
|
26
|
-
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; }
|
|
27
|
-
|
|
28
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
|
-
|
|
30
|
-
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."); }
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
-
|
|
40
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
41
|
-
|
|
42
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
43
|
-
|
|
44
|
-
var Textarea = function Textarea(p) {
|
|
45
|
-
var disabled = p.disabled,
|
|
46
|
-
_onFocus = p.onFocus,
|
|
47
|
-
_onBlur = p.onBlur,
|
|
48
|
-
inputRef = p.inputRef,
|
|
49
|
-
_onChange = p.onChange,
|
|
50
|
-
_p$autoHeight = p.autoHeight,
|
|
51
|
-
autoHeight = _p$autoHeight === void 0 ? true : _p$autoHeight,
|
|
52
|
-
style = p.style,
|
|
53
|
-
className = p.className,
|
|
54
|
-
value = p.value,
|
|
55
|
-
placeholder = p.placeholder,
|
|
56
|
-
maxLine = p.maxLine,
|
|
57
|
-
maxLength = p.maxLength,
|
|
58
|
-
initValue = p.initValue,
|
|
59
|
-
onErrorChange = p.onErrorChange,
|
|
60
|
-
validator = p.validator,
|
|
61
|
-
_onKeyDown = p.onKeyDown,
|
|
62
|
-
others = _objectWithoutProperties(p, _excluded);
|
|
63
|
-
|
|
64
|
-
var prefixCls = "titaui-textArea";
|
|
65
|
-
|
|
66
|
-
var _useState = (0, _react.useState)(false),
|
|
67
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
-
active = _useState2[0],
|
|
69
|
-
setActive = _useState2[1];
|
|
70
|
-
|
|
71
|
-
var _useState3 = (0, _react.useState)(),
|
|
72
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
-
height = _useState4[0],
|
|
74
|
-
setHeight = _useState4[1];
|
|
75
|
-
|
|
76
|
-
var _useState5 = (0, _react.useState)(initValue || ""),
|
|
77
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
|
-
selfValue = _useState6[0],
|
|
79
|
-
setSelfValue = _useState6[1];
|
|
80
|
-
|
|
81
|
-
var hiddenRef = (0, _react.useRef)();
|
|
82
|
-
var selfInputRef = (0, _react.useRef)();
|
|
83
|
-
var realInputRef = inputRef || selfInputRef;
|
|
84
|
-
var isControlled = ("value" in p);
|
|
85
|
-
var realValue = isControlled ? value : selfValue;
|
|
86
|
-
|
|
87
|
-
var _useState7 = (0, _react.useState)(false),
|
|
88
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
89
|
-
error = _useState8[0],
|
|
90
|
-
setError = _useState8[1];
|
|
91
|
-
|
|
92
|
-
var _useState9 = (0, _react.useState)(""),
|
|
93
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
94
|
-
errorText = _useState10[0],
|
|
95
|
-
setErrorText = _useState10[1];
|
|
96
|
-
|
|
97
|
-
var _useState11 = (0, _react.useState)("auto"),
|
|
98
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
99
|
-
maxHeight = _useState12[0],
|
|
100
|
-
setMaxheight = _useState12[1];
|
|
101
|
-
|
|
102
|
-
var wrapperRef = (0, _react.useRef)();
|
|
103
|
-
|
|
104
|
-
var _useState13 = (0, _react.useState)(false),
|
|
105
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
106
|
-
validateEnable = _useState14[0],
|
|
107
|
-
setvalidateEnable = _useState14[1];
|
|
108
|
-
|
|
109
|
-
var _useState15 = (0, _react.useState)(false),
|
|
110
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
111
|
-
isTrue = _useState16[0],
|
|
112
|
-
setIsTrue = _useState16[1];
|
|
113
|
-
|
|
114
|
-
(0, _react.useEffect)(function () {
|
|
115
|
-
if (autoHeight && hiddenRef.current && realInputRef.current) {
|
|
116
|
-
// 自适应高度
|
|
117
|
-
hiddenRef.current.value = "".concat(realValue || "");
|
|
118
|
-
hiddenRef.current.style.width = window.getComputedStyle(realInputRef.current).width;
|
|
119
|
-
var _height = hiddenRef.current.scrollHeight;
|
|
120
|
-
|
|
121
|
-
if (maxLine && maxLine > 0) {
|
|
122
|
-
var lineHeight = Number(window.getComputedStyle(realInputRef.current).lineHeight.replace("px", "")); // setMaxheight(maxLine * lineHeight + "px");
|
|
123
|
-
|
|
124
|
-
setMaxheight("".concat(maxLine * lineHeight, "px"));
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
setHeight(_height);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if (!validateEnable) return;
|
|
131
|
-
var hasError = false;
|
|
132
|
-
var eText = "";
|
|
133
|
-
|
|
134
|
-
if (maxLength !== undefined) {
|
|
135
|
-
if (realValue.length > maxLength) {
|
|
136
|
-
hasError = true;
|
|
137
|
-
eText = "\u5DF2\u8F93\u5165 ".concat(realValue.length, " \u4E2A\u5B57\uFF0C\u6700\u591A\u53EF\u8F93\u5165 ").concat(maxLength, " \u4E2A\u5B57");
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (!hasError && validator) {
|
|
142
|
-
var _validator = validator(realValue),
|
|
143
|
-
isValid = _validator.isValid,
|
|
144
|
-
_errorText = _validator.errorText;
|
|
145
|
-
|
|
146
|
-
if (!isValid) {
|
|
147
|
-
hasError = true;
|
|
148
|
-
eText = _errorText || "";
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
setErrorText(eText);
|
|
153
|
-
|
|
154
|
-
if (hasError !== error) {
|
|
155
|
-
if (onErrorChange) {
|
|
156
|
-
onErrorChange(hasError);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
setError(hasError);
|
|
160
|
-
}
|
|
161
|
-
}, [realValue]); // 鼠标移入
|
|
162
|
-
|
|
163
|
-
var changeMoveOver = function changeMoveOver() {
|
|
164
|
-
setIsTrue(true);
|
|
165
|
-
}; // 鼠标移出
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
var changeMoveOut = function changeMoveOut() {
|
|
169
|
-
setIsTrue(false);
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
var areaNormal = isTrue ? "area-focus" : "area-normal";
|
|
173
|
-
var areaFocus = active ? "area-focus" : areaNormal;
|
|
174
|
-
var areaError = error ? "area-error" : areaFocus;
|
|
175
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
|
-
className: "\n ".concat(prefixCls, "\n ").concat(areaError, " \n ").concat(disabled ? " disabled" : "", "\n "),
|
|
177
|
-
onFocus: function onFocus() {},
|
|
178
|
-
onBlur: function onBlur() {},
|
|
179
|
-
onMouseOver: changeMoveOver,
|
|
180
|
-
onMouseOut: changeMoveOut,
|
|
181
|
-
ref: wrapperRef,
|
|
182
|
-
onClick: function onClick() {
|
|
183
|
-
var _realInputRef$current;
|
|
184
|
-
|
|
185
|
-
(_realInputRef$current = realInputRef.current) === null || _realInputRef$current === void 0 ? void 0 : _realInputRef$current.focus();
|
|
186
|
-
}
|
|
187
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
188
|
-
className: "inner scrollbar-size-sm",
|
|
189
|
-
style: autoHeight ? {
|
|
190
|
-
maxHeight: maxHeight
|
|
191
|
-
} : {
|
|
192
|
-
height: "100%"
|
|
193
|
-
}
|
|
194
|
-
}, /*#__PURE__*/_react["default"].createElement("textarea", _extends({
|
|
195
|
-
className: "".concat(className, " scrollbar-size-sm"),
|
|
196
|
-
disabled: disabled,
|
|
197
|
-
ref: realInputRef,
|
|
198
|
-
style: _objectSpread(_objectSpread({}, style || {}), autoHeight ? {
|
|
199
|
-
height: height
|
|
200
|
-
} : {
|
|
201
|
-
height: "100%"
|
|
202
|
-
}),
|
|
203
|
-
value: realValue,
|
|
204
|
-
rows: 1,
|
|
205
|
-
placeholder: placeholder,
|
|
206
|
-
onChange: function onChange(e) {
|
|
207
|
-
if (!isControlled) {
|
|
208
|
-
setSelfValue(e.target.value);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
if (_onChange) {
|
|
212
|
-
_onChange(e);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
setvalidateEnable(true);
|
|
216
|
-
},
|
|
217
|
-
onFocus: function onFocus(e) {
|
|
218
|
-
setActive(true);
|
|
219
|
-
|
|
220
|
-
if (_onFocus) {
|
|
221
|
-
_onFocus(e);
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
onKeyDown: function onKeyDown(e) {
|
|
225
|
-
if (_onKeyDown) {
|
|
226
|
-
_onKeyDown(e);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (e.keyCode === 13) {
|
|
230
|
-
e.preventDefault();
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
onBlur: function onBlur(e) {
|
|
234
|
-
setActive(false);
|
|
235
|
-
|
|
236
|
-
if (_onBlur) {
|
|
237
|
-
_onBlur(e);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}, others)), /*#__PURE__*/_react["default"].createElement("textarea", {
|
|
241
|
-
className: className,
|
|
242
|
-
ref: hiddenRef,
|
|
243
|
-
placeholder: placeholder,
|
|
244
|
-
value: realValue,
|
|
245
|
-
rows: 1,
|
|
246
|
-
style: _objectSpread(_objectSpread({}, style || {}), {
|
|
247
|
-
height: "0!important",
|
|
248
|
-
visibility: "hidden",
|
|
249
|
-
position: "absolute"
|
|
250
|
-
})
|
|
251
|
-
}))), error && /*#__PURE__*/_react["default"].createElement("div", {
|
|
252
|
-
className: "err-color"
|
|
253
|
-
}, errorText));
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
var _default = Textarea;
|
|
257
|
-
exports["default"] = _default;
|
|
@@ -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,124 +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
|
-
var _requestApi = require("../request-api");
|
|
23
|
-
|
|
24
|
-
require("./index.css");
|
|
25
|
-
|
|
26
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
|
-
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
|
-
|
|
34
|
-
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."); }
|
|
35
|
-
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
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; }
|
|
41
|
-
|
|
42
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
|
-
|
|
44
|
-
var OperateRecord = function OperateRecord(props) {
|
|
45
|
-
var _useState = (0, _react.useState)(true),
|
|
46
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
47
|
-
showOperateRecord = _useState2[0],
|
|
48
|
-
setShowOperateRecord = _useState2[1];
|
|
49
|
-
|
|
50
|
-
var popupRef = (0, _react.useRef)();
|
|
51
|
-
var drawerRef = (0, _react.useRef)();
|
|
52
|
-
var userInfo = props.userInfo,
|
|
53
|
-
toUserId = props.toUserId,
|
|
54
|
-
relation = props.relation,
|
|
55
|
-
okrFeedParams = props.okrFeedParams;
|
|
56
|
-
|
|
57
|
-
var _useContext = (0, _react.useContext)(_context.Context),
|
|
58
|
-
OkrOperateRecordDrawer = _useContext.OkrOperateRecordDrawer,
|
|
59
|
-
annualNum = _useContext.annualNum,
|
|
60
|
-
cycleType = _useContext.cycleType,
|
|
61
|
-
yqmNum = _useContext.yqmNum;
|
|
62
|
-
|
|
63
|
-
var openOperateRecordPush = function openOperateRecordPush() {
|
|
64
|
-
popupRef.current && popupRef.current.close();
|
|
65
|
-
drawerRef.current && drawerRef.current.showOperateDrawerVisible();
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
69
|
-
className: "".concat(_precls.precls, "__header-record-popup")
|
|
70
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
|
-
className: "".concat(_precls.precls, "__header-record-item"),
|
|
72
|
-
onClick: openOperateRecordPush
|
|
73
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
74
|
-
className: "tu-icon-jinzhan-s"
|
|
75
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
|
-
className: "".concat(_precls.precls, "__header-record-item-content")
|
|
77
|
-
}, (0, _getLocale.getLocale)('Per_details_OperationRecord'))));
|
|
78
|
-
|
|
79
|
-
(0, _react.useEffect)(function () {
|
|
80
|
-
if (toUserId) {
|
|
81
|
-
(0, _requestApi.getOperateRecordAuth)(toUserId).then(function (res) {
|
|
82
|
-
setShowOperateRecord(res.Data.obj);
|
|
83
|
-
});
|
|
84
|
-
} else if (parseInt(cycleType) === -1) {
|
|
85
|
-
setShowOperateRecord(false);
|
|
86
|
-
} else {
|
|
87
|
-
setShowOperateRecord(true);
|
|
88
|
-
}
|
|
89
|
-
}, [toUserId, cycleType]);
|
|
90
|
-
|
|
91
|
-
if (showOperateRecord === false) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
96
|
-
ref: popupRef,
|
|
97
|
-
popup: popup,
|
|
98
|
-
popupAlign: {
|
|
99
|
-
offset: [0, 4]
|
|
100
|
-
}
|
|
101
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
102
|
-
className: "".concat(_precls.precls, "__header-record")
|
|
103
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
104
|
-
className: "tu-icon-more1"
|
|
105
|
-
}))), (toUserId !== undefined || relation === 1) && !!userInfo && /*#__PURE__*/_react["default"].createElement(OkrOperateRecordDrawer, {
|
|
106
|
-
ref: drawerRef,
|
|
107
|
-
userInfo: {
|
|
108
|
-
Id: userInfo.userId,
|
|
109
|
-
Name: userInfo.name,
|
|
110
|
-
Color: userInfo.avatar.color,
|
|
111
|
-
AvatarsUrl: userInfo.avatar.original,
|
|
112
|
-
Type: 1
|
|
113
|
-
},
|
|
114
|
-
okrCycle: "\u300C".concat((0, _common.formatPeriod)({
|
|
115
|
-
annualNum: annualNum,
|
|
116
|
-
cycleType: cycleType,
|
|
117
|
-
yqmNum: yqmNum
|
|
118
|
-
}), "\u300D"),
|
|
119
|
-
okrFeedParams: okrFeedParams
|
|
120
|
-
}));
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
var _default = OperateRecord;
|
|
124
|
-
exports["default"] = _default;
|