@titaui/pc 1.11.40-beta.1 → 1.11.40-beta.5
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/dynamic/online-broadcast/data.js +13 -1
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +49 -50
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +12 -8
- package/lib/components/okr-detail/request-apis.js +1 -1
- package/lib/pages/new-okr-list/header/index.js +16 -16
- package/lib/pages/new-okr-list/header/operate-record.js +0 -2
- package/package.json +1 -1
|
@@ -18,10 +18,22 @@ exports.onlineBroadcastData = exports["default"] = void 0;
|
|
|
18
18
|
// href = "https://wiki.tita.com/pages/viewpage.action?pageId=15697741";
|
|
19
19
|
// }
|
|
20
20
|
var onlineBroadcastData = [{
|
|
21
|
+
hasOnline: true,
|
|
22
|
+
preContent: "「OKR」支持上级审批,管理更规范",
|
|
23
|
+
preHref: "https://wiki.tita.com/x/F4SeAQ",
|
|
24
|
+
isNew: true,
|
|
25
|
+
date: "4/29"
|
|
26
|
+
}, {
|
|
27
|
+
hasOnline: true,
|
|
28
|
+
preContent: "「考核」更多位置支持离职人员筛选啦",
|
|
29
|
+
preHref: "https://wiki.tita.com/x/pwDQAQ",
|
|
30
|
+
isNew: true,
|
|
31
|
+
date: "4/29"
|
|
32
|
+
}, {
|
|
21
33
|
hasOnline: true,
|
|
22
34
|
preContent: "「考核」OKR 维度支持按 KR 评分啦",
|
|
23
35
|
preHref: "https://wiki.tita.com/x/JYOeAQ",
|
|
24
|
-
isNew:
|
|
36
|
+
isNew: false,
|
|
25
37
|
date: "4/11"
|
|
26
38
|
}, {
|
|
27
39
|
hasOnline: true,
|
|
@@ -9,14 +9,14 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
15
|
-
|
|
16
12
|
var _getLocale = require("../../../../utils/getLocale");
|
|
17
13
|
|
|
18
14
|
var _dialogConfirm = _interopRequireDefault(require("../../../dialog-confirm"));
|
|
19
15
|
|
|
16
|
+
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
17
|
+
|
|
18
|
+
var _form = _interopRequireDefault(require("../../../form"));
|
|
19
|
+
|
|
20
20
|
require("./index.css");
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -37,24 +37,36 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
37
37
|
|
|
38
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
39
|
|
|
40
|
-
var prefix =
|
|
41
|
-
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
40
|
+
var prefix = 'okr-detail-delete-confirm';
|
|
41
|
+
var Radios = _form["default"].Fields.Radios;
|
|
42
|
+
var radios = [{
|
|
43
|
+
label: /*#__PURE__*/_react["default"].createElement("span", {
|
|
44
|
+
className: "".concat(prefix, "__option-text")
|
|
45
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_OdeletionNTask')),
|
|
46
|
+
value: 0
|
|
47
|
+
}, {
|
|
48
|
+
label: /*#__PURE__*/_react["default"].createElement("span", {
|
|
49
|
+
className: "".concat(prefix, "__option-text")
|
|
50
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_OdeletionTask'), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
51
|
+
overlay: (0, _getLocale.getLocale)('Pro_detail_Tasksapproval'),
|
|
52
|
+
placement: "top",
|
|
53
|
+
zIndex: 15000
|
|
54
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
55
|
+
className: "".concat(prefix, "__icon tu-icon-wiki")
|
|
56
|
+
}))),
|
|
57
|
+
value: 1
|
|
58
|
+
}, {
|
|
59
|
+
label: /*#__PURE__*/_react["default"].createElement("span", {
|
|
60
|
+
className: "".concat(prefix, "__option-text")
|
|
61
|
+
}, (0, _getLocale.getLocale)('Pro_detail_Attheametime'), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
62
|
+
overlay: (0, _getLocale.getLocale)('Pro_detail_Tasksapproval'),
|
|
63
|
+
placement: "top",
|
|
64
|
+
zIndex: 15000
|
|
65
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
66
|
+
className: "".concat(prefix, "__icon tu-icon-wiki")
|
|
67
|
+
}))),
|
|
68
|
+
value: 2
|
|
69
|
+
}];
|
|
58
70
|
var OkrDeletePop = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
59
71
|
var onCancel = _ref.onCancel,
|
|
60
72
|
onConfirm = _ref.onConfirm,
|
|
@@ -96,10 +108,13 @@ var OkrDeletePop = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
96
108
|
};
|
|
97
109
|
|
|
98
110
|
var showApprovalCmp = (0, _react.useMemo)(function () {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return approvalSetting.isOpen && (!(okrInfo !== null && okrInfo !== void 0 && (_okrInfo$OkrAndKrAppr = okrInfo.OkrAndKrApprovalTypes) !== null && _okrInfo$OkrAndKrAppr !== void 0 && _okrInfo$OkrAndKrAppr.includes(53)) || approvalSetting.deleteOkr);
|
|
111
|
+
return approvalSetting.isOpen && approvalSetting.deleteOkr;
|
|
102
112
|
}, [approvalSetting, okrInfo]);
|
|
113
|
+
|
|
114
|
+
var handleChangeDeleteRadios = function handleChangeDeleteRadios(value) {
|
|
115
|
+
setSelected(value);
|
|
116
|
+
};
|
|
117
|
+
|
|
103
118
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
104
119
|
return {
|
|
105
120
|
show: show,
|
|
@@ -110,39 +125,23 @@ var OkrDeletePop = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
110
125
|
return /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
111
126
|
zIndex: 1200,
|
|
112
127
|
visible: showConfirmPop,
|
|
113
|
-
type: "warning"
|
|
128
|
+
type: "warning",
|
|
129
|
+
className: prefix
|
|
114
130
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
115
131
|
type: "title"
|
|
116
|
-
}, showApprovalCmp ? (0, _getLocale.getLocale)(
|
|
132
|
+
}, showApprovalCmp ? (0, _getLocale.getLocale)('OKR_MyO_Deleteoapproval') : (0, _getLocale.getLocale)('OKR_MyO_Determinedeletiono')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
117
133
|
type: "content"
|
|
118
|
-
}, !showApprovalCmp && (0, _getLocale.getLocale)(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
onClick: function onClick() {
|
|
123
|
-
return setSelected(option.id);
|
|
124
|
-
}
|
|
125
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
126
|
-
className: (0, _classnames["default"])("".concat(prefix, "__icon"), {
|
|
127
|
-
"tu-icon-singlebox-avtive": selected === option.id,
|
|
128
|
-
"tu-icon-singlebox-have": selected !== option.id
|
|
129
|
-
})
|
|
130
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
131
|
-
className: "".concat(prefix, "__option-text")
|
|
132
|
-
}, option.text, option.tips && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
133
|
-
overlay: option.tips,
|
|
134
|
-
placement: "top",
|
|
135
|
-
zIndex: 15000
|
|
136
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
137
|
-
className: "".concat(prefix, "__icon tu-icon-warning")
|
|
138
|
-
}))));
|
|
134
|
+
}, !showApprovalCmp && (0, _getLocale.getLocale)('OKR_MyO_Text_Odeletion'), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(Radios, {
|
|
135
|
+
radios: radios,
|
|
136
|
+
value: 0,
|
|
137
|
+
onChange: handleChangeDeleteRadios
|
|
139
138
|
}))), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"].CancelButton, {
|
|
140
139
|
type: "button",
|
|
141
140
|
onClick: handleCancelClick
|
|
142
|
-
}, (0, _getLocale.getLocale)(
|
|
141
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"].SureButton, {
|
|
143
142
|
type: "button",
|
|
144
143
|
onClick: handleConfirmClick
|
|
145
|
-
}, showApprovalCmp ? (0, _getLocale.getLocale)(
|
|
144
|
+
}, showApprovalCmp ? (0, _getLocale.getLocale)('OKR_MyO_Submittedapproval') : (0, _getLocale.getLocale)('Pro_detail_Submission')));
|
|
146
145
|
}, [showConfirmPop, selected]);
|
|
147
146
|
return renderDialogConfirm;
|
|
148
147
|
});
|
|
@@ -8,11 +8,6 @@
|
|
|
8
8
|
font-size: 14px;
|
|
9
9
|
color: #3F4755;
|
|
10
10
|
line-height: 22px;
|
|
11
|
-
margin-left: 6px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.okr-detail-delete-confirm__option-text:hover {
|
|
15
|
-
color: #2879ff;
|
|
16
11
|
}
|
|
17
12
|
|
|
18
13
|
.okr-detail-delete-confirm__icon {
|
|
@@ -27,11 +22,20 @@
|
|
|
27
22
|
color: #2879ff;
|
|
28
23
|
}
|
|
29
24
|
|
|
30
|
-
.okr-detail-delete-confirm__icon.tu-icon-
|
|
31
|
-
|
|
25
|
+
.okr-detail-delete-confirm__icon.tu-icon-singlebox-have {
|
|
26
|
+
color: #BFC7D5;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.okr-detail-delete-confirm__icon.tu-icon-wiki {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
font-size: 16px;
|
|
32
32
|
color: #acb7bf;
|
|
33
33
|
margin-left: 4px;
|
|
34
|
-
|
|
34
|
+
margin-bottom: 2px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.okr-detail-delete-confirm .form-field-radio__radios-item {
|
|
38
|
+
margin-top: 10px;
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
.isApprovalDisabled {
|
|
@@ -89,7 +89,7 @@ exports.updateConfidenceIndex = updateConfidenceIndex;
|
|
|
89
89
|
var updateOkrName = function updateOkrName(_ref4) {
|
|
90
90
|
var workId = _ref4.workId,
|
|
91
91
|
workName = _ref4.workName;
|
|
92
|
-
return (0, _request.rpost)("
|
|
92
|
+
return (0, _request.rpost)("v1")("okr/name", {
|
|
93
93
|
workId: workId,
|
|
94
94
|
workName: workName
|
|
95
95
|
});
|
|
@@ -124,45 +124,45 @@ function Header(props, ref) {
|
|
|
124
124
|
var rootNode = {
|
|
125
125
|
rootId: 0,
|
|
126
126
|
// @ts-ignore
|
|
127
|
-
rootName: window.BSGlobal.tenantInfo.Name ||
|
|
127
|
+
rootName: window.BSGlobal.tenantInfo.Name || ''
|
|
128
128
|
};
|
|
129
129
|
var level2Selected = {
|
|
130
130
|
id: 0,
|
|
131
131
|
// @ts-ignore
|
|
132
|
-
name: window.BSGlobal.tenantInfo.Name ||
|
|
132
|
+
name: window.BSGlobal.tenantInfo.Name || ''
|
|
133
133
|
};
|
|
134
|
-
var searchType =
|
|
134
|
+
var searchType = 'company';
|
|
135
135
|
|
|
136
136
|
if (departmentId && departmentId !== -1) {
|
|
137
137
|
rootNode.rootId = departmentId;
|
|
138
|
-
rootNode.rootName = departmentName ||
|
|
139
|
-
searchType =
|
|
138
|
+
rootNode.rootName = departmentName || '';
|
|
139
|
+
searchType = 'depart';
|
|
140
140
|
level2Selected.id = departmentId;
|
|
141
|
-
level2Selected.name = departmentName ||
|
|
141
|
+
level2Selected.name = departmentName || '';
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
if (toUserId) {
|
|
145
145
|
rootNode.rootId = toUserId;
|
|
146
|
-
rootNode.rootName = userInfo.name ||
|
|
147
|
-
searchType =
|
|
146
|
+
rootNode.rootName = userInfo.name || '';
|
|
147
|
+
searchType = 'user';
|
|
148
148
|
level2Selected.id = toUserId;
|
|
149
|
-
level2Selected.name = userInfo.name ||
|
|
149
|
+
level2Selected.name = userInfo.name || '';
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
if (parseInt(relation, 10) === 1) {
|
|
153
153
|
rootNode.rootId = (0, _bsGlobal.getUserInfo)().Id;
|
|
154
|
-
rootNode.rootName = (0, _bsGlobal.getUserInfo)().Name ||
|
|
155
|
-
searchType =
|
|
154
|
+
rootNode.rootName = (0, _bsGlobal.getUserInfo)().Name || '';
|
|
155
|
+
searchType = 'user';
|
|
156
156
|
level2Selected.id = (0, _bsGlobal.getUserInfo)().Id;
|
|
157
|
-
level2Selected.name = (0, _bsGlobal.getUserInfo)().Name ||
|
|
157
|
+
level2Selected.name = (0, _bsGlobal.getUserInfo)().Name || '';
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
var urlQuery = ["searchType=".concat(searchType), "period=".concat(JSON.stringify({
|
|
161
161
|
cycleType: cycleType,
|
|
162
162
|
annualNum: annualNum,
|
|
163
163
|
yqmNum: yqmNum
|
|
164
|
-
})), "rootNode=".concat(JSON.stringify(rootNode)), "level2Selected=".concat(JSON.stringify(level2Selected))].join(
|
|
165
|
-
var origin = window.location.href.split(
|
|
164
|
+
})), "rootNode=".concat(JSON.stringify(rootNode)), "level2Selected=".concat(JSON.stringify(level2Selected))].join('&');
|
|
165
|
+
var origin = window.location.href.split('#')[0];
|
|
166
166
|
window.location.href = "".concat(origin, "/#okr/map?").concat(urlQuery);
|
|
167
167
|
};
|
|
168
168
|
|
|
@@ -221,7 +221,7 @@ function Header(props, ref) {
|
|
|
221
221
|
className: "".concat(_precls.precls, "__header-item"),
|
|
222
222
|
onClick: gotoOkrMap
|
|
223
223
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
224
|
-
overlay: (0, _getLocale.getLocale)(
|
|
224
|
+
overlay: (0, _getLocale.getLocale)('OKR_MyO_Text_Alignment'),
|
|
225
225
|
placement: "top"
|
|
226
226
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
227
227
|
className: "".concat(_precls.precls, "__header-icon")
|
|
@@ -233,7 +233,7 @@ function Header(props, ref) {
|
|
|
233
233
|
userInfo: userInfo
|
|
234
234
|
}), /*#__PURE__*/_react["default"].createElement(_filter["default"], {
|
|
235
235
|
onSearch: onSearch
|
|
236
|
-
}), /*#__PURE__*/_react["default"].createElement(_operateRecord["default"], {
|
|
236
|
+
}), Number(cycleType) !== -1 && /*#__PURE__*/_react["default"].createElement(_operateRecord["default"], {
|
|
237
237
|
toUserId: toUserId,
|
|
238
238
|
userInfo: userInfo,
|
|
239
239
|
relation: relationShip,
|
|
@@ -85,8 +85,6 @@ var OperateRecord = function OperateRecord(props) {
|
|
|
85
85
|
(0, _requestApi.getOperateRecordAuth)(toUserId).then(function (res) {
|
|
86
86
|
setShowOperateRecord(res.Data.obj);
|
|
87
87
|
});
|
|
88
|
-
} else if (parseInt(cycleType) === -1) {
|
|
89
|
-
setShowOperateRecord(false);
|
|
90
88
|
} else {
|
|
91
89
|
setShowOperateRecord(true);
|
|
92
90
|
}
|