@titaui/pc 1.11.44 → 1.11.47
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.
|
@@ -504,7 +504,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
504
504
|
|
|
505
505
|
this.getListData = /*#__PURE__*/function () {
|
|
506
506
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(isLoading) {
|
|
507
|
-
var _this4$state2, keywords, type, users, departments, data, nextPage, toUserId, _this4$state3, status, cycle, year, okrPopType, url;
|
|
507
|
+
var _this4$state2, keywords, type, users, departments, data, nextPage, toUserId, _this4$state3, status, cycle, year, _this4$props2, okrPopType, _this4$props2$include, includeCreateFailApprovalOkr, url;
|
|
508
508
|
|
|
509
509
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
510
510
|
while (1) {
|
|
@@ -520,7 +520,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
520
520
|
case 2:
|
|
521
521
|
_this4$state2 = _this4.state, keywords = _this4$state2.keywords, type = _this4$state2.type, users = _this4$state2.users, departments = _this4$state2.departments, data = _this4$state2.data, nextPage = _this4$state2.nextPage, toUserId = _this4$state2.toUserId;
|
|
522
522
|
_this4$state3 = _this4.state, status = _this4$state3.status, cycle = _this4$state3.cycle, year = _this4$state3.year;
|
|
523
|
-
|
|
523
|
+
_this4$props2 = _this4.props, okrPopType = _this4$props2.okrPopType, _this4$props2$include = _this4$props2.includeCreateFailApprovalOkr, includeCreateFailApprovalOkr = _this4$props2$include === void 0 ? false : _this4$props2$include;
|
|
524
524
|
cycle = cycle || '-1';
|
|
525
525
|
year = year || -1;
|
|
526
526
|
status = status || 0;
|
|
@@ -565,7 +565,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
565
565
|
searchKr: okrPopType,
|
|
566
566
|
// 是否搜索KR:默认为0-不搜索,1-只有对齐目标弹层可以搜索KR
|
|
567
567
|
toUserId: toUserId,
|
|
568
|
-
includeCreateFailApprovalOkr:
|
|
568
|
+
includeCreateFailApprovalOkr: includeCreateFailApprovalOkr
|
|
569
569
|
}).then(function (res) {
|
|
570
570
|
_this4.pending = false;
|
|
571
571
|
var resData = res && res.Data && res.Data.works || [];
|
|
@@ -630,9 +630,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
630
630
|
var _this4$state4 = _this4.state,
|
|
631
631
|
selected = _this4$state4.selected,
|
|
632
632
|
selectOkr = _this4$state4.selectOkr;
|
|
633
|
-
var _this4$
|
|
634
|
-
onConfirm = _this4$
|
|
635
|
-
parentId = _this4$
|
|
633
|
+
var _this4$props3 = _this4.props,
|
|
634
|
+
onConfirm = _this4$props3.onConfirm,
|
|
635
|
+
parentId = _this4$props3.parentId;
|
|
636
636
|
var parentType = selected && selected.mileStoneId ? 2 : 1; // 临时注入
|
|
637
637
|
|
|
638
638
|
var data = _objectSpread(_objectSpread({}, selected), {}, {
|
|
@@ -37,6 +37,8 @@ var _requestApi = require("../request-api");
|
|
|
37
37
|
|
|
38
38
|
var _getLocale = require("../../../utils/getLocale");
|
|
39
39
|
|
|
40
|
+
var _tools = require("../../../utils/tools");
|
|
41
|
+
|
|
40
42
|
require("./index.css");
|
|
41
43
|
|
|
42
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -124,45 +126,45 @@ function Header(props, ref) {
|
|
|
124
126
|
var rootNode = {
|
|
125
127
|
rootId: 0,
|
|
126
128
|
// @ts-ignore
|
|
127
|
-
rootName: window.BSGlobal.tenantInfo.Name ||
|
|
129
|
+
rootName: window.BSGlobal.tenantInfo.Name || ""
|
|
128
130
|
};
|
|
129
131
|
var level2Selected = {
|
|
130
132
|
id: 0,
|
|
131
133
|
// @ts-ignore
|
|
132
|
-
name: window.BSGlobal.tenantInfo.Name ||
|
|
134
|
+
name: window.BSGlobal.tenantInfo.Name || ""
|
|
133
135
|
};
|
|
134
|
-
var searchType =
|
|
136
|
+
var searchType = "company";
|
|
135
137
|
|
|
136
138
|
if (departmentId && departmentId !== -1) {
|
|
137
139
|
rootNode.rootId = departmentId;
|
|
138
|
-
rootNode.rootName = departmentName ||
|
|
139
|
-
searchType =
|
|
140
|
+
rootNode.rootName = departmentName || "";
|
|
141
|
+
searchType = "depart";
|
|
140
142
|
level2Selected.id = departmentId;
|
|
141
|
-
level2Selected.name = departmentName ||
|
|
143
|
+
level2Selected.name = departmentName || "";
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
if (toUserId) {
|
|
145
147
|
rootNode.rootId = toUserId;
|
|
146
|
-
rootNode.rootName = userInfo.name ||
|
|
147
|
-
searchType =
|
|
148
|
+
rootNode.rootName = userInfo.name || "";
|
|
149
|
+
searchType = "user";
|
|
148
150
|
level2Selected.id = toUserId;
|
|
149
|
-
level2Selected.name = userInfo.name ||
|
|
151
|
+
level2Selected.name = userInfo.name || "";
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
if (parseInt(relation, 10) === 1) {
|
|
153
155
|
rootNode.rootId = (0, _bsGlobal.getUserInfo)().Id;
|
|
154
|
-
rootNode.rootName = (0, _bsGlobal.getUserInfo)().Name ||
|
|
155
|
-
searchType =
|
|
156
|
+
rootNode.rootName = (0, _bsGlobal.getUserInfo)().Name || "";
|
|
157
|
+
searchType = "user";
|
|
156
158
|
level2Selected.id = (0, _bsGlobal.getUserInfo)().Id;
|
|
157
|
-
level2Selected.name = (0, _bsGlobal.getUserInfo)().Name ||
|
|
159
|
+
level2Selected.name = (0, _bsGlobal.getUserInfo)().Name || "";
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
var urlQuery = ["searchType=".concat(searchType), "period=".concat(JSON.stringify({
|
|
161
163
|
cycleType: cycleType,
|
|
162
164
|
annualNum: annualNum,
|
|
163
165
|
yqmNum: yqmNum
|
|
164
|
-
})), "rootNode=".concat(JSON.stringify(rootNode)), "level2Selected=".concat(JSON.stringify(level2Selected))].join(
|
|
165
|
-
var origin = window.location.href.split(
|
|
166
|
+
})), "rootNode=".concat(JSON.stringify(rootNode)), "level2Selected=".concat(JSON.stringify(level2Selected))].join("&");
|
|
167
|
+
var origin = window.location.href.split("#")[0];
|
|
166
168
|
window.location.href = "".concat(origin, "/#okr/map?").concat(urlQuery);
|
|
167
169
|
};
|
|
168
170
|
|
|
@@ -221,7 +223,7 @@ function Header(props, ref) {
|
|
|
221
223
|
className: "".concat(_precls.precls, "__header-item"),
|
|
222
224
|
onClick: gotoOkrMap
|
|
223
225
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
224
|
-
overlay: (0, _getLocale.getLocale)(
|
|
226
|
+
overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Alignment"),
|
|
225
227
|
placement: "top"
|
|
226
228
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
227
229
|
className: "".concat(_precls.precls, "__header-icon")
|
|
@@ -233,7 +235,7 @@ function Header(props, ref) {
|
|
|
233
235
|
userInfo: userInfo
|
|
234
236
|
}), /*#__PURE__*/_react["default"].createElement(_filter["default"], {
|
|
235
237
|
onSearch: onSearch
|
|
236
|
-
}), Number(cycleType) !== -1 && relation ===
|
|
238
|
+
}), Number(cycleType) !== -1 && (Number(relation) === 1 || Object.keys((0, _tools.getQueryString)()).length === 0) && /*#__PURE__*/_react["default"].createElement(_operateRecord["default"], {
|
|
237
239
|
toUserId: toUserId,
|
|
238
240
|
userInfo: userInfo,
|
|
239
241
|
relation: relationShip,
|
|
@@ -23,6 +23,8 @@ var _common = require("./common");
|
|
|
23
23
|
|
|
24
24
|
var _requestApi = require("../request-api");
|
|
25
25
|
|
|
26
|
+
var _tools = require("../../../utils/tools");
|
|
27
|
+
|
|
26
28
|
require("./index.css");
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -63,10 +65,15 @@ var OperateRecord = function OperateRecord(props) {
|
|
|
63
65
|
yqmNum = _useContext.yqmNum;
|
|
64
66
|
|
|
65
67
|
var openOperateRecordPush = function openOperateRecordPush() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
if (popupRef.current) {
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
popupRef.current.close();
|
|
71
|
+
}
|
|
68
72
|
|
|
69
|
-
|
|
73
|
+
if (drawerRef.current) {
|
|
74
|
+
// @ts-ignore
|
|
75
|
+
drawerRef.current.showOperateDrawerVisible();
|
|
76
|
+
}
|
|
70
77
|
};
|
|
71
78
|
|
|
72
79
|
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -78,7 +85,7 @@ var OperateRecord = function OperateRecord(props) {
|
|
|
78
85
|
className: "tu-icon-jinzhan-s"
|
|
79
86
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
80
87
|
className: "".concat(_precls.precls, "__header-record-item-content")
|
|
81
|
-
}, (0, _getLocale.getLocale)(
|
|
88
|
+
}, (0, _getLocale.getLocale)("Per_details_OperationRecord"))));
|
|
82
89
|
|
|
83
90
|
(0, _react.useEffect)(function () {
|
|
84
91
|
if (toUserId) {
|
|
@@ -101,13 +108,13 @@ var OperateRecord = function OperateRecord(props) {
|
|
|
101
108
|
offset: [0, 4]
|
|
102
109
|
}
|
|
103
110
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
104
|
-
overlay: (0, _getLocale.getLocale)(
|
|
111
|
+
overlay: (0, _getLocale.getLocale)("Feed_Set_Pop_Butt_More"),
|
|
105
112
|
placement: "top"
|
|
106
113
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
107
114
|
className: "".concat(_precls.precls, "__header-record")
|
|
108
115
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
109
116
|
className: "tu-icon-more1"
|
|
110
|
-
})))), (toUserId !== undefined || relation === 1) && !!userInfo && /*#__PURE__*/_react["default"].createElement(OkrOperateRecordDrawer, {
|
|
117
|
+
})))), (toUserId !== undefined || Number(relation) === 1 || Object.keys((0, _tools.getQueryString)()).length === 0) && !!userInfo && /*#__PURE__*/_react["default"].createElement(OkrOperateRecordDrawer, {
|
|
111
118
|
ref: drawerRef,
|
|
112
119
|
userInfo: {
|
|
113
120
|
id: userInfo.userId,
|