@titaui/pc 1.9.71 → 1.9.75
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/create-okr-modal/fields/okr-case.js +8 -9
- package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +15 -10
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +4 -3
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +5 -3
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +6 -4
- package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +15 -10
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +6 -5
- package/lib/components/dynamic/dynamic-like-ranking/index.css +2 -5
- package/lib/components/dynamic/dynamic-liking/item.js +1 -2
- package/lib/components/dynamic/dynamic.js +7 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +1 -1
- package/lib/components/photo-card/index.js +3 -6
- package/lib/components/photo-card/request.apis.js +2 -2
- package/lib/pages/new-okr-list/index.js +2 -2
- package/lib/utils/helpers.js +12 -6
- package/lib/utils/tools.js +94 -45
- package/package.json +1 -1
- package/src/components/create-okr-modal/fields/okr-case.tsx +7 -7
- package/src/components/dynamic/constant.ts +18 -18
- package/src/components/dynamic/dynamic-item/dynamic-project/constant.ts +4 -2
- package/src/components/dynamic/dynamic-item/dynamic-project/index.tsx +5 -5
- package/src/components/dynamic/dynamic-item/dynamic-replay/index.scss +5 -3
- package/src/components/dynamic/dynamic-item/dynamic-replay/index.tsx +6 -5
- package/src/components/dynamic/dynamic-item/dynamic-task/constant.ts +4 -2
- package/src/components/dynamic/dynamic-item/dynamic-task/index.tsx +6 -6
- package/src/components/dynamic/dynamic-like-ranking/index.scss +2 -3
- package/src/components/dynamic/dynamic-liking/item.tsx +1 -2
- package/src/components/dynamic/dynamic.tsx +8 -3
- package/src/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.tsx +1 -1
- package/src/components/photo-card/index.tsx +5 -6
- package/src/components/photo-card/request.apis.ts +1 -1
- package/src/pages/new-okr-list/index.tsx +2 -2
- package/src/utils/helpers.ts +6 -4
- package/src/utils/tools.js +48 -20
- package/yarn-error.log +0 -103
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = OkrCase;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -41,7 +41,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
41
41
|
|
|
42
42
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
43
|
|
|
44
|
-
function
|
|
44
|
+
function OkrCase(_ref) {
|
|
45
45
|
var onOkrApply = _ref.onOkrApply,
|
|
46
46
|
okrTemplateEnabled = _ref.okrTemplateEnabled;
|
|
47
47
|
|
|
@@ -59,13 +59,13 @@ function _default(_ref) {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
var OnOkrApplyHandler = function OnOkrApplyHandler(data) {
|
|
62
|
-
onOkrApply
|
|
62
|
+
onOkrApply === null || onOkrApply === void 0 ? void 0 : onOkrApply(data);
|
|
63
63
|
setVisible(false);
|
|
64
64
|
|
|
65
65
|
_toast["default"].Success("成功套用");
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
return /*#__PURE__*/_react["default"].createElement(_style.Line, null, okrTemplateEnabled && !(0, _helpers.isLocal)() ? /*#__PURE__*/_react["default"].createElement(_style.CaseLink, {
|
|
68
|
+
return /*#__PURE__*/_react["default"].createElement(_style.Line, null, okrTemplateEnabled && !(0, _helpers.isLocal)() && !(0, _helpers.isTencentHr)() ? /*#__PURE__*/_react["default"].createElement(_style.CaseLink, {
|
|
69
69
|
onClick: okrCaseClickHandler,
|
|
70
70
|
className: "tu-icon-shoushi"
|
|
71
71
|
}, (0, _getLocale.getLocale)("OKR_MyO_Pop_Butt_AddfromOKR")) : null, okrTemplateEnabled && /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
@@ -95,8 +95,7 @@ function _default(_ref) {
|
|
|
95
95
|
// offsetPosition={{ 'top': 41 }}
|
|
96
96
|
// fullSize={true}
|
|
97
97
|
// >
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
} // </OldModal>
|
|
98
|
+
// {
|
|
99
|
+
// /* <OKRCases onClose={onCasesCloseHandler} onApplyTpl={OnOkrApplyHandler} /> */
|
|
100
|
+
// }
|
|
101
|
+
// </OldModal>
|
|
@@ -3,17 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getEStatusClass2StatusTypeText = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("../../../../utils/getLocale");
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
var getEStatusClass2StatusTypeText = function getEStatusClass2StatusTypeText() {
|
|
11
|
+
return {
|
|
12
|
+
2: (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed"),
|
|
13
|
+
1: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
14
|
+
4: (0, _getLocale.getLocale)("OKR_MyO_E_From_Cancelled"),
|
|
15
|
+
3: (0, _getLocale.getLocale)("OKR_MyO_E_From_Delayed"),
|
|
16
|
+
6: (0, _getLocale.getLocale)("OKR_MyO_E_From_Suspended"),
|
|
17
|
+
0: (0, _getLocale.getLocale)("OKR_MyO_E_From_NotStarted"),
|
|
18
|
+
5: (0, _getLocale.getLocale)("OKR_MyO_E_From_Notaccepted")
|
|
19
|
+
};
|
|
18
20
|
};
|
|
19
|
-
|
|
21
|
+
|
|
22
|
+
exports.getEStatusClass2StatusTypeText = getEStatusClass2StatusTypeText;
|
|
23
|
+
var _default = getEStatusClass2StatusTypeText;
|
|
24
|
+
exports["default"] = _default;
|
|
@@ -65,7 +65,7 @@ var DynamicProject = function DynamicProject(_ref) {
|
|
|
65
65
|
feedTypeColor = _getFeedTypeAndTypeCo.feedTypeColor;
|
|
66
66
|
|
|
67
67
|
var handleClickTitle = function handleClickTitle() {
|
|
68
|
-
window.open(window.location.href.replace(location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(data.obj.objId)));
|
|
68
|
+
window.open(window.location.href.replace(window.location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(data.obj.objId)));
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
var renderName = (0, _react.useMemo)(function () {
|
|
@@ -98,7 +98,8 @@ var DynamicProject = function DynamicProject(_ref) {
|
|
|
98
98
|
className: "".concat(prefix, "__content")
|
|
99
99
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
100
100
|
className: "".concat(prefix, "__content-img"),
|
|
101
|
-
src: _dynamicProject["default"]
|
|
101
|
+
src: _dynamicProject["default"],
|
|
102
|
+
alt: ""
|
|
102
103
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
104
|
className: "".concat(prefix, "__content-info")
|
|
104
105
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -113,7 +114,7 @@ var DynamicProject = function DynamicProject(_ref) {
|
|
|
113
114
|
className: (0, _classnames["default"])(_constant2.EStatusStatus2ClassType[status])
|
|
114
115
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
115
116
|
className: "".concat(prefix, "__content-status-text")
|
|
116
|
-
}, _constant.
|
|
117
|
+
}, (0, _constant.getEStatusClass2StatusTypeText)()[status]), /*#__PURE__*/_react["default"].createElement("i", {
|
|
117
118
|
className: (0, _classnames["default"])("tu-icon-deferred")
|
|
118
119
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
119
120
|
className: "".concat(prefix, "__content-time-range")
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.titaui-dynamic-reply-item__detail-tasks-item::before {
|
|
32
|
-
content:
|
|
32
|
+
content: '';
|
|
33
33
|
display: inline-block;
|
|
34
34
|
width: 6px;
|
|
35
35
|
height: 6px;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.titaui-dynamic-reply-item__detail-block-title::before {
|
|
56
|
-
content:
|
|
56
|
+
content: '';
|
|
57
57
|
display: inline-block;
|
|
58
58
|
width: 4px;
|
|
59
59
|
height: 12px;
|
|
@@ -71,10 +71,11 @@
|
|
|
71
71
|
color: #3f4755;
|
|
72
72
|
line-height: 22px;
|
|
73
73
|
margin-left: 8px;
|
|
74
|
+
white-space: pre-wrap;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
.titaui-dynamic-reply-item__detail-block-title--sub::before {
|
|
77
|
-
content:
|
|
78
|
+
content: '';
|
|
78
79
|
display: inline-block;
|
|
79
80
|
width: 6px;
|
|
80
81
|
height: 6px;
|
|
@@ -90,6 +91,7 @@
|
|
|
90
91
|
line-height: 22px;
|
|
91
92
|
margin-bottom: 4px;
|
|
92
93
|
margin-left: 8px;
|
|
94
|
+
white-space: pre-wrap;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
.titaui-dynamic-reply-item__detail-block-content--sub {
|
|
@@ -29,6 +29,8 @@ var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
|
29
29
|
|
|
30
30
|
var _getLocale = require("../../../../utils/getLocale");
|
|
31
31
|
|
|
32
|
+
var _tools = require("../../../../utils/tools");
|
|
33
|
+
|
|
32
34
|
require("./index.css");
|
|
33
35
|
|
|
34
36
|
var _excluded = ["data"];
|
|
@@ -135,7 +137,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
135
137
|
}, (0, _getLocale.getLocale)("OKR_MyO_KRP_Pop_Value")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
136
138
|
className: "".concat(prefix, "__detail-block-content")
|
|
137
139
|
}, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
138
|
-
str: data.gains,
|
|
140
|
+
str: (0, _tools.htmlDecodeByHtmlRegExp)(data.gains),
|
|
139
141
|
keyWord: searchKeyWord
|
|
140
142
|
}))), /*#__PURE__*/_react["default"].createElement("div", null, data.drawbacks && data.drawbacks.map(function (item, index) {
|
|
141
143
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -146,21 +148,21 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
146
148
|
}, (0, _getLocale.getLocale)("OKR_MyO_KRP_Pop_Problems"), " ", index + 1), /*#__PURE__*/_react["default"].createElement("div", {
|
|
147
149
|
className: "".concat(prefix, "__detail-block-content")
|
|
148
150
|
}, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
149
|
-
str: item.drawback,
|
|
151
|
+
str: (0, _tools.htmlDecodeByHtmlRegExp)(item.drawback),
|
|
150
152
|
keyWord: searchKeyWord
|
|
151
153
|
})), item.cause && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
152
154
|
className: "".concat(prefix, "__detail-block-title--sub")
|
|
153
155
|
}, "\u6839\u672C\u539F\u56E0:"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
154
156
|
className: (0, _classnames["default"])("".concat(prefix, "__detail-block-content"), "".concat(prefix, "__detail-block-content--sub"))
|
|
155
157
|
}, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
156
|
-
str: item.cause,
|
|
158
|
+
str: (0, _tools.htmlDecodeByHtmlRegExp)(item.cause),
|
|
157
159
|
keyWord: searchKeyWord
|
|
158
160
|
}))), item.measures && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
159
161
|
className: "".concat(prefix, "__detail-block-title--sub")
|
|
160
162
|
}, "\u76F8\u5E94\u63AA\u65BD:"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
163
|
className: (0, _classnames["default"])("".concat(prefix, "__detail-block-content"), "".concat(prefix, "__detail-block-content--sub"))
|
|
162
164
|
}, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
|
|
163
|
-
str: item.measures,
|
|
165
|
+
str: (0, _tools.htmlDecodeByHtmlRegExp)(item.measures),
|
|
164
166
|
keyWord: searchKeyWord
|
|
165
167
|
}))));
|
|
166
168
|
})), data.tasks && data.tasks.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -3,17 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getEStatusClass2StatusTypeText = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("../../../../utils/getLocale");
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
var getEStatusClass2StatusTypeText = function getEStatusClass2StatusTypeText() {
|
|
11
|
+
return {
|
|
12
|
+
2: (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed"),
|
|
13
|
+
1: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
|
|
14
|
+
4: (0, _getLocale.getLocale)("OKR_MyO_E_From_Cancelled"),
|
|
15
|
+
3: (0, _getLocale.getLocale)("OKR_MyO_E_From_Delayed"),
|
|
16
|
+
6: (0, _getLocale.getLocale)("OKR_MyO_E_From_Suspended"),
|
|
17
|
+
0: (0, _getLocale.getLocale)("OKR_MyO_E_From_NotStarted"),
|
|
18
|
+
5: (0, _getLocale.getLocale)("OKR_MyO_E_From_Notaccepted")
|
|
19
|
+
};
|
|
18
20
|
};
|
|
19
|
-
|
|
21
|
+
|
|
22
|
+
exports.getEStatusClass2StatusTypeText = getEStatusClass2StatusTypeText;
|
|
23
|
+
var _default = getEStatusClass2StatusTypeText;
|
|
24
|
+
exports["default"] = _default;
|
|
@@ -92,17 +92,17 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
if (objType === _constant2.EObjType.Project) {
|
|
95
|
-
window.open(window.location.href.replace(location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(objId)));
|
|
95
|
+
window.open(window.location.href.replace(window.location.hash, "#work?iTalentNavCode=tita-work&work_id=".concat(objId)));
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
if (objType === _constant2.EObjType.MileStone) {
|
|
99
99
|
if (workId <= 0) return;
|
|
100
|
-
window.open(window.location.href.replace(location.hash, "#work?work_id=".concat(workId, "&detail_type=milepost")));
|
|
100
|
+
window.open(window.location.href.replace(window.location.hash, "#work?work_id=".concat(workId, "&detail_type=milepost")));
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
if (objType === _constant2.EObjType.KanBan) {
|
|
104
104
|
if (workId <= 0) return;
|
|
105
|
-
window.open(window.location.href.replace(location.hash, "#work?work_id=".concat(workId, "&detail_type=kanban")));
|
|
105
|
+
window.open(window.location.href.replace(window.location.hash, "#work?work_id=".concat(workId, "&detail_type=kanban")));
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
|
|
@@ -152,7 +152,8 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
152
152
|
className: "".concat(prefix, "__content")
|
|
153
153
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
154
154
|
className: "".concat(prefix, "__content-img"),
|
|
155
|
-
src: _taskIcon["default"]
|
|
155
|
+
src: _taskIcon["default"],
|
|
156
|
+
alt: ""
|
|
156
157
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
158
|
className: "".concat(prefix, "__content-info")
|
|
158
159
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -167,7 +168,7 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
167
168
|
className: (0, _classnames["default"])(_constant2.EStatusStatus2ClassType[status])
|
|
168
169
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
169
170
|
className: "".concat(prefix, "__content-status-text")
|
|
170
|
-
}, _constant.
|
|
171
|
+
}, (0, _constant.getEStatusClass2StatusTypeText)()[status]), /*#__PURE__*/_react["default"].createElement("i", {
|
|
171
172
|
className: (0, _classnames["default"])("tu-icon-deferred")
|
|
172
173
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
173
174
|
className: "".concat(prefix, "__content-time-range")
|
|
@@ -69,8 +69,9 @@
|
|
|
69
69
|
|
|
70
70
|
.danamic-like-ranking__content-table-items {
|
|
71
71
|
display: grid;
|
|
72
|
-
grid-template-columns: auto
|
|
72
|
+
grid-template-columns: auto 28px auto auto;
|
|
73
73
|
grid-row-gap: 16px;
|
|
74
|
+
margin-left: -8px;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
.danamic-like-ranking__item:last-of-type {
|
|
@@ -92,10 +93,6 @@
|
|
|
92
93
|
font-size: 14px;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
|
-
.danamic-like-ranking__item-avatar {
|
|
96
|
-
margin-left: 9px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
96
|
.danamic-like-ranking__item-avatar .titaui-pc-avator-container {
|
|
100
97
|
display: inline-flex !important;
|
|
101
98
|
}
|
|
@@ -43,7 +43,6 @@ var Item = function Item(_ref) {
|
|
|
43
43
|
// window.open(url, "_blank");
|
|
44
44
|
// };
|
|
45
45
|
|
|
46
|
-
var ObjectTypeText = (0, _constant.ObjectType)();
|
|
47
46
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
48
47
|
className: "".concat(preCls)
|
|
49
48
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -65,7 +64,7 @@ var Item = function Item(_ref) {
|
|
|
65
64
|
text: /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("Feed_Kudos"), /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
66
65
|
id: toUserId,
|
|
67
66
|
name: toUserName
|
|
68
|
-
}), "".concat(
|
|
67
|
+
}), "".concat((0, _constant.ObjectType)()[pariseObjType] || "feed")),
|
|
69
68
|
maxWidth: 150
|
|
70
69
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
70
|
className: "".concat(preCls, "-center-time")
|
|
@@ -185,9 +185,14 @@ var Dynamic = function Dynamic() {
|
|
|
185
185
|
};
|
|
186
186
|
|
|
187
187
|
var handleDeleteFeed = function handleDeleteFeed(feedId) {
|
|
188
|
-
|
|
188
|
+
var newDatas = dynamicData.filter(function (item) {
|
|
189
189
|
return item.feedId !== feedId;
|
|
190
|
-
})
|
|
190
|
+
});
|
|
191
|
+
setDynamicData([]); // 动画效果如果直接设置新的数据,diff时间会比较长,所以直接清空再赋值,这样不会出现删除时等待长时间空白
|
|
192
|
+
|
|
193
|
+
setTimeout(function () {
|
|
194
|
+
setDynamicData(_toConsumableArray(newDatas));
|
|
195
|
+
}, 0);
|
|
191
196
|
};
|
|
192
197
|
|
|
193
198
|
var getDynamicData = function getDynamicData(needResetValue) {
|
|
@@ -270,7 +270,7 @@ function EditChildOkrWeight(props) {
|
|
|
270
270
|
onChange: onChangeHandler
|
|
271
271
|
})));
|
|
272
272
|
}))), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
273
|
-
zIndex:
|
|
273
|
+
zIndex: 2301,
|
|
274
274
|
visible: showDialogConfirm,
|
|
275
275
|
type: "warning",
|
|
276
276
|
className: "".concat(precls, "__confirm")
|
|
@@ -95,17 +95,14 @@ function PhotoCard(props) {
|
|
|
95
95
|
|
|
96
96
|
(0, _react.useEffect)(function () {
|
|
97
97
|
(0, _request.getOtherUserInfo)(userId).then(function (res) {
|
|
98
|
-
var currentUser;
|
|
99
|
-
|
|
100
98
|
if (res.Code === 1) {
|
|
101
|
-
currentUser = res.Data;
|
|
102
99
|
setUserInfo(res.Data);
|
|
103
100
|
}
|
|
104
101
|
|
|
105
|
-
(0, _request.getAttentionData)().then(function (res) {
|
|
102
|
+
(0, _request.getAttentionData)(userId).then(function (res) {
|
|
106
103
|
if (res.Code === 1) {
|
|
107
|
-
|
|
108
|
-
if (item.userId ===
|
|
104
|
+
res.Data.followerUsers.forEach(function (item) {
|
|
105
|
+
if (item.userId === userownInfo.Id) {
|
|
109
106
|
setIsAttention(true);
|
|
110
107
|
}
|
|
111
108
|
});
|
|
@@ -7,8 +7,8 @@ exports.postAttention = exports.getVisitData = exports.getOtherUserInfo = export
|
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
10
|
-
var getAttentionData = function getAttentionData() {
|
|
11
|
-
return (0, _request.rget)("v1")("follow/
|
|
10
|
+
var getAttentionData = function getAttentionData(userId) {
|
|
11
|
+
return (0, _request.rget)("v1")("follow/getFollowerList?toUserId=".concat(userId));
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.getAttentionData = getAttentionData;
|
|
@@ -205,7 +205,7 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
205
205
|
params.Searchpage = 2;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
if (departmentId
|
|
208
|
+
if (departmentId != 0) {
|
|
209
209
|
params.keyWords = '';
|
|
210
210
|
}
|
|
211
211
|
|
|
@@ -331,7 +331,7 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
331
331
|
replaceOkr: replaceOkr,
|
|
332
332
|
isShowPrincple: isShowPrincple,
|
|
333
333
|
isShowPeriod: isShowPeriod,
|
|
334
|
-
isShowEasyCreate: relation !== 2 && relation !== 3,
|
|
334
|
+
isShowEasyCreate: relation !== "2" && relation !== "3",
|
|
335
335
|
openCreateModal: openCreateModal
|
|
336
336
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
337
337
|
className: "".concat(_precls.precls, "__pagination")
|
package/lib/utils/helpers.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.escapeHtml = escapeHtml;
|
|
|
8
8
|
exports.getLoginUserInfo = void 0;
|
|
9
9
|
exports.getTenantInfo = getTenantInfo;
|
|
10
10
|
exports.getUploadMaxSize = getUploadMaxSize;
|
|
11
|
-
exports.isLocal = exports.isDingDing = void 0;
|
|
11
|
+
exports.isTencentHr = exports.isLocal = exports.isDingDing = void 0;
|
|
12
12
|
|
|
13
13
|
var _bsGlobal = require("./bs-global");
|
|
14
14
|
|
|
@@ -25,8 +25,8 @@ function cssSupport(attr, value) {
|
|
|
25
25
|
|
|
26
26
|
function getUploadMaxSize() {
|
|
27
27
|
var info = (0, _bsGlobal.getBSGlobal)("tenantInfo");
|
|
28
|
-
var isDingDing = info.Source
|
|
29
|
-
var isDingZhi = window.dingZhiSize && window.dingZhiSize.indexOf(info.Id)
|
|
28
|
+
var isDingDing = info.Source === 861;
|
|
29
|
+
var isDingZhi = window.dingZhiSize && window.dingZhiSize.indexOf(info.Id) !== -1;
|
|
30
30
|
if (isDingDing) return 20;
|
|
31
31
|
if (isDingZhi) return 100;
|
|
32
32
|
return 50;
|
|
@@ -37,7 +37,7 @@ function getTenantInfo() {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
var isDingDing = function isDingDing() {
|
|
40
|
-
return getTenantInfo().Source
|
|
40
|
+
return getTenantInfo().Source === 861;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
exports.isDingDing = isDingDing;
|
|
@@ -48,6 +48,12 @@ var isLocal = function isLocal() {
|
|
|
48
48
|
|
|
49
49
|
exports.isLocal = isLocal;
|
|
50
50
|
|
|
51
|
+
var isTencentHr = function isTencentHr() {
|
|
52
|
+
return getTenantInfo().Source === 964;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
exports.isTencentHr = isTencentHr;
|
|
56
|
+
|
|
51
57
|
function escapeHtml(str) {
|
|
52
58
|
var htmlEscapes = {
|
|
53
59
|
"&": "&",
|
|
@@ -56,8 +62,8 @@ function escapeHtml(str) {
|
|
|
56
62
|
""": "\"",
|
|
57
63
|
"'": "'"
|
|
58
64
|
};
|
|
59
|
-
return str.replace(/(&|<|>|"|')/g, function (
|
|
60
|
-
return htmlEscapes[
|
|
65
|
+
return str.replace(/(&|<|>|"|')/g, function (s) {
|
|
66
|
+
return htmlEscapes[s];
|
|
61
67
|
});
|
|
62
68
|
}
|
|
63
69
|
|