@titaui/pc 1.9.69 → 1.9.70
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 +1 -1
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +2 -1
- package/lib/components/photo-card/index.js +6 -3
- package/lib/components/photo-card/request.apis.js +2 -2
- package/lib/pages/aha2021/index.js +2 -45
- package/package.json +1 -1
- package/src/components/create-okr-modal/fields/okr-case.tsx +1 -1
- package/src/components/okrcase-library/okrcases-components/submitOkr-dialog.tsx +1 -1
- package/src/components/photo-card/index.tsx +6 -5
- package/src/components/photo-card/request.apis.ts +1 -1
- package/src/pages/aha2021/index.tsx +3 -27
- package/yarn-error.log +16 -15807
|
@@ -69,7 +69,7 @@ function _default(_ref) {
|
|
|
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"], {
|
|
72
|
-
zIndex:
|
|
72
|
+
zIndex: 1200,
|
|
73
73
|
noHeadLine: true,
|
|
74
74
|
visible: visible,
|
|
75
75
|
onClose: onCasesCloseHandler,
|
|
@@ -100,7 +100,8 @@ function SubmitDialog(props) {
|
|
|
100
100
|
noCloseIcon: true,
|
|
101
101
|
getContainer: function getContainer() {
|
|
102
102
|
return document.body;
|
|
103
|
-
}
|
|
103
|
+
},
|
|
104
|
+
zIndex: 1200
|
|
104
105
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
105
106
|
className: "okr-cases-library__submitWindow"
|
|
106
107
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
@@ -95,14 +95,17 @@ function PhotoCard(props) {
|
|
|
95
95
|
|
|
96
96
|
(0, _react.useEffect)(function () {
|
|
97
97
|
(0, _request.getOtherUserInfo)(userId).then(function (res) {
|
|
98
|
+
var currentUser;
|
|
99
|
+
|
|
98
100
|
if (res.Code === 1) {
|
|
101
|
+
currentUser = res.Data;
|
|
99
102
|
setUserInfo(res.Data);
|
|
100
103
|
}
|
|
101
104
|
|
|
102
|
-
(0, _request.getAttentionData)(
|
|
105
|
+
(0, _request.getAttentionData)().then(function (res) {
|
|
103
106
|
if (res.Code === 1) {
|
|
104
|
-
res.Data.
|
|
105
|
-
if (item.userId ===
|
|
107
|
+
(res.Data || []).forEach(function (item) {
|
|
108
|
+
if (item.userId === currentUser.userId) {
|
|
106
109
|
setIsAttention(true);
|
|
107
110
|
}
|
|
108
111
|
});
|
|
@@ -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() {
|
|
11
|
+
return (0, _request.rget)("v1")("follow/followerList");
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.getAttentionData = getAttentionData;
|
|
@@ -25,8 +25,6 @@ var _pointDemo = _interopRequireDefault(require("../../components/point-demo/poi
|
|
|
25
25
|
|
|
26
26
|
var _platform = require("../../utils/platform");
|
|
27
27
|
|
|
28
|
-
var _topGlobalPrompt = _interopRequireDefault(require("../../components/top-global-prompt"));
|
|
29
|
-
|
|
30
28
|
require("./index.css");
|
|
31
29
|
|
|
32
30
|
var _helpers = require("../../utils/helpers");
|
|
@@ -35,28 +33,13 @@ var _hrHeader = _interopRequireDefault(require("../../components/hr-header"));
|
|
|
35
33
|
|
|
36
34
|
var _hrMessage = _interopRequireDefault(require("../../components/nav-top/components/user-message/hrMessage"));
|
|
37
35
|
|
|
38
|
-
var _localStorage = require("../../utils/local-storage");
|
|
39
|
-
|
|
40
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
41
37
|
|
|
42
38
|
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); }
|
|
43
39
|
|
|
44
40
|
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; }
|
|
45
41
|
|
|
46
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
47
|
-
|
|
48
|
-
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."); }
|
|
49
|
-
|
|
50
|
-
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); }
|
|
51
|
-
|
|
52
|
-
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; }
|
|
53
|
-
|
|
54
|
-
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; }
|
|
55
|
-
|
|
56
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
57
|
-
|
|
58
42
|
var preCls = "titaui-aha-2021";
|
|
59
|
-
var storage = new _localStorage.LocalStorage();
|
|
60
43
|
|
|
61
44
|
function ContentTemplate(props) {
|
|
62
45
|
var children = props.children,
|
|
@@ -81,28 +64,6 @@ function ContentTemplate(props) {
|
|
|
81
64
|
|
|
82
65
|
function PageLayout(props) {
|
|
83
66
|
var children = props.children;
|
|
84
|
-
|
|
85
|
-
var _useState = (0, _react.useState)(function () {
|
|
86
|
-
if ((0, _helpers.getTenantInfo)().Source === 964) return false;
|
|
87
|
-
var stopTaking = storage.getItem("topGlobalCard");
|
|
88
|
-
|
|
89
|
-
if (stopTaking !== null && stopTaking !== void 0 && stopTaking.date) {
|
|
90
|
-
var oldDate = new Date(stopTaking === null || stopTaking === void 0 ? void 0 : stopTaking.date).getDate();
|
|
91
|
-
var newDate = new Date().getDate();
|
|
92
|
-
|
|
93
|
-
if (newDate > oldDate) {
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return true;
|
|
101
|
-
}),
|
|
102
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
103
|
-
topCardVisible = _useState2[0],
|
|
104
|
-
setTopCardVisible = _useState2[1];
|
|
105
|
-
|
|
106
67
|
var isTrial = window.BSGlobal.tenantAuthentication.Version === 1 && (0, _platform.isOfficialSite)();
|
|
107
68
|
var isTencentHr = window.BSGlobal.tenantInfo.Source === 964;
|
|
108
69
|
|
|
@@ -120,16 +81,12 @@ function PageLayout(props) {
|
|
|
120
81
|
className: (0, _classnames["default"])(preCls)
|
|
121
82
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
83
|
className: (0, _classnames["default"])("".concat(preCls, "__header"))
|
|
123
|
-
},
|
|
124
|
-
text: "\u4E3A\u4E86\u7ED9\u60A8\u5E26\u6765\u5B89\u5168\u4E0E\u7A33\u5B9A\u7684\u4F53\u9A8C\uFF0C\u6211\u4EEC\u5C06\u4E8E 1.21 23:00 - 1.22 23:59 \u8FDB\u884C\u505C\u670D\u5347\u7EA7\uFF0C\u8BF7\u60A8\u63D0\u524D\u5B89\u6392\u597D\u5DE5\u4F5C\uFF0C\u611F\u8C22\u60A8\u7684\u652F\u6301\u4E0E\u7406\u89E3\uFF01",
|
|
125
|
-
link: "https://wiki.tita.com/x/RICeAQ",
|
|
126
|
-
setTopCardVisible: setTopCardVisible
|
|
127
|
-
}) : null, (0, _helpers.getTenantInfo)().Source === 964 ? /*#__PURE__*/_react["default"].createElement(_hrHeader["default"], null) : /*#__PURE__*/_react["default"].createElement(_navTop["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
+
}, (0, _helpers.getTenantInfo)().Source === 964 ? /*#__PURE__*/_react["default"].createElement(_hrHeader["default"], null) : /*#__PURE__*/_react["default"].createElement(_navTop["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
128
85
|
className: (0, _classnames["default"])("".concat(preCls, "__message"))
|
|
129
86
|
}, /*#__PURE__*/_react["default"].createElement(_followerVisitor["default"], null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
130
87
|
className: (0, _classnames["default"])("".concat(preCls, "__body")),
|
|
131
88
|
style: {
|
|
132
|
-
height: "calc(100vh - ".concat(
|
|
89
|
+
height: "calc(100vh - ".concat(74, "px)")
|
|
133
90
|
}
|
|
134
91
|
}, children), !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
|
|
135
92
|
className: (0, _classnames["default"])("".concat(preCls, "__help"))
|
package/package.json
CHANGED
|
@@ -44,7 +44,7 @@ export function SubmitDialog(props: Props1) {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
return (
|
|
47
|
-
<Dialog visible={isShowSubmitOkrWindow} noFooter width="480px" destroyOnClose noCloseIcon getContainer={() => document.body}>
|
|
47
|
+
<Dialog visible={isShowSubmitOkrWindow} noFooter width="480px" destroyOnClose noCloseIcon getContainer={() => document.body} zIndex={1200}>
|
|
48
48
|
<div className="okr-cases-library__submitWindow">
|
|
49
49
|
<img src={require("../image/submit小驴.svg")} />
|
|
50
50
|
<div className="tu-icon-canceled" onClick={() => handleShowSubmitOkrWindow(false)} />
|
|
@@ -6,7 +6,7 @@ import Tooltip from "../tooltip";
|
|
|
6
6
|
import ConditionRender from "../condition-render";
|
|
7
7
|
import Avatar from "../../components/avatar";
|
|
8
8
|
import { OpenUserName } from "../../utils/open-data";
|
|
9
|
-
import { getUserInfo } from "../../utils/bs-global";
|
|
9
|
+
import { getBSGlobal, getUserInfo } from "../../utils/bs-global";
|
|
10
10
|
import Card from "./components/card";
|
|
11
11
|
import {
|
|
12
12
|
getAttentionData,
|
|
@@ -32,7 +32,6 @@ interface IProps {
|
|
|
32
32
|
|
|
33
33
|
function PhotoCard(props: IProps) {
|
|
34
34
|
const { userId, isNameVisible = true } = props;
|
|
35
|
-
|
|
36
35
|
const [userInfo, setUserInfo] = useState<any>();
|
|
37
36
|
const [isAttention, setIsAttention] = useState(false);
|
|
38
37
|
|
|
@@ -51,13 +50,15 @@ function PhotoCard(props: IProps) {
|
|
|
51
50
|
|
|
52
51
|
useEffect(() => {
|
|
53
52
|
getOtherUserInfo(userId).then((res) => {
|
|
53
|
+
let currentUser;
|
|
54
54
|
if (res.Code === 1) {
|
|
55
|
+
currentUser = res.Data;
|
|
55
56
|
setUserInfo(res.Data);
|
|
56
57
|
}
|
|
57
|
-
getAttentionData(
|
|
58
|
+
getAttentionData().then((res) => {
|
|
58
59
|
if (res.Code === 1) {
|
|
59
|
-
res.Data.
|
|
60
|
-
if (item.userId ===
|
|
60
|
+
(res.Data || []).forEach((item) => {
|
|
61
|
+
if (item.userId === currentUser.userId) {
|
|
61
62
|
setIsAttention(true);
|
|
62
63
|
}
|
|
63
64
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { rget, rpost } from "../../utils/request";
|
|
2
2
|
|
|
3
|
-
export const getAttentionData = (
|
|
3
|
+
export const getAttentionData = () => rget("v1")(`follow/followerList`);
|
|
4
4
|
|
|
5
5
|
export const getVisitData = (userId) => rget("v1")(`okr/okrCyclePageVisitor?toUserId=${userId}`);
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, {
|
|
2
|
-
Children, ReactChild, useEffect,
|
|
2
|
+
Children, ReactChild, useEffect,
|
|
3
3
|
} from "react";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import Tooltip from "../../components/tooltip";
|
|
@@ -9,15 +9,12 @@ import InvitePeople from "../../components/invite-people";
|
|
|
9
9
|
import HelpCard from "../../components/help-card";
|
|
10
10
|
import PointDemo from "../../components/point-demo/point-demo";
|
|
11
11
|
import { isOfficialSite } from "../../utils/platform";
|
|
12
|
-
import TopGlobalCard from "../../components/top-global-prompt";
|
|
13
12
|
import "./index.scss";
|
|
14
13
|
import { getTenantInfo } from "../../utils/helpers";
|
|
15
14
|
import HrHeader from "../../components/hr-header";
|
|
16
15
|
import HrMessage from "../../components/nav-top/components/user-message/hrMessage";
|
|
17
|
-
import { LocalStorage } from "../../utils/local-storage";
|
|
18
16
|
|
|
19
17
|
const preCls = "titaui-aha-2021";
|
|
20
|
-
const storage = new LocalStorage();
|
|
21
18
|
|
|
22
19
|
function ContentTemplate(props: {
|
|
23
20
|
children: ReactChild,
|
|
@@ -50,19 +47,7 @@ function PageLayout(props: {
|
|
|
50
47
|
children: ReactChild
|
|
51
48
|
}) {
|
|
52
49
|
const { children } = props;
|
|
53
|
-
|
|
54
|
-
if (getTenantInfo().Source === 964) return false;
|
|
55
|
-
const stopTaking: any = storage.getItem("topGlobalCard");
|
|
56
|
-
if (stopTaking?.date) {
|
|
57
|
-
const oldDate = new Date(stopTaking?.date).getDate();
|
|
58
|
-
const newDate = new Date().getDate();
|
|
59
|
-
if (newDate > oldDate) {
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
return true;
|
|
65
|
-
});
|
|
50
|
+
|
|
66
51
|
const isTrial = window.BSGlobal.tenantAuthentication.Version === 1 && isOfficialSite();
|
|
67
52
|
const isTencentHr = window.BSGlobal.tenantInfo.Source === 964;
|
|
68
53
|
|
|
@@ -82,21 +67,12 @@ function PageLayout(props: {
|
|
|
82
67
|
return (
|
|
83
68
|
<div className={classNames(preCls)}>
|
|
84
69
|
<div className={classNames(`${preCls}__header`)}>
|
|
85
|
-
{topCardVisible
|
|
86
|
-
? (
|
|
87
|
-
<TopGlobalCard
|
|
88
|
-
text="为了给您带来安全与稳定的体验,我们将于 1.21 23:00 - 1.22 23:59 进行停服升级,请您提前安排好工作,感谢您的支持与理解!"
|
|
89
|
-
link="https://wiki.tita.com/x/RICeAQ"
|
|
90
|
-
setTopCardVisible={setTopCardVisible}
|
|
91
|
-
/>
|
|
92
|
-
)
|
|
93
|
-
: null}
|
|
94
70
|
{getTenantInfo().Source === 964 ? <HrHeader /> : <NavTop />}
|
|
95
71
|
</div>
|
|
96
72
|
<div className={classNames(`${preCls}__message`)}>
|
|
97
73
|
<FollowerVisitor />
|
|
98
74
|
</div>
|
|
99
|
-
<div className={classNames(`${preCls}__body`)} style={{ height: `calc(100vh - ${
|
|
75
|
+
<div className={classNames(`${preCls}__body`)} style={{ height: `calc(100vh - ${74}px)` }}>
|
|
100
76
|
{children}
|
|
101
77
|
</div>
|
|
102
78
|
{!isTencentHr && (
|