@titaui/pc 1.11.28 → 1.11.31-beta.1
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 +1 -0
- package/lib/components/avatar/name-avatar/index.js +22 -13
- package/lib/components/button/rect-btn/index.css +45 -11
- package/lib/components/button/rect-btn/index.js +12 -6
- package/lib/components/change-okr-modal/index.js +2 -1
- package/lib/components/checkbox/index.css +3 -3
- package/lib/components/create-okr-modal/index.js +3 -1
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +5 -1
- package/lib/components/drawer/headerDrop.js +42 -4
- package/lib/components/drawer/index.css +33 -0
- package/lib/components/drawer/index.js +26 -3
- package/lib/components/dynamic/dynamic-list/index.js +14 -6
- package/lib/components/dynamic/index.js +9 -12
- package/lib/components/dynamic/request-api.js +7 -68
- package/lib/components/nav-top/index.js +8 -4
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +20 -4
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
- package/lib/components/okr-detail/components/header/index.js +10 -3
- package/lib/components/okr-detail/components/header/o-name.js +10 -3
- package/lib/components/okr-detail/components/o-classify.js +5 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +15 -9
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/constant.js +53 -0
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +98 -43
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +55 -0
- package/lib/components/okr-detail/detail-header/index.css +11 -0
- package/lib/components/okr-detail/detail-header/index.js +228 -234
- package/lib/components/okr-detail/helper.js +108 -0
- package/lib/components/okr-detail/index.js +21 -2
- package/lib/components/okr-detail/okr-list/index.js +13 -6
- package/lib/components/okr-detail/request-apis.js +10 -4
- package/lib/components/okr-flow/export-modal/index.js +21 -3
- package/lib/components/okr-period-selector/index.js +9 -5
- package/lib/components/okr-period-selector/select-cycle.js +23 -19
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
- package/lib/components/task-relation-modal/request-api.js +2 -1
- package/lib/components/textarea/index.css +142 -0
- package/lib/components/textarea/index.js +259 -0
- package/lib/components/toast/index.js +5 -3
- package/lib/index.js +40 -0
- package/lib/pages/new-okr-list/header/common.js +52 -0
- package/lib/pages/new-okr-list/header/index.css +45 -0
- package/lib/pages/new-okr-list/header/index.js +38 -16
- package/lib/{components/dynamic/dynamic-liking/index.js → pages/new-okr-list/header/operate-record.js} +91 -39
- package/lib/pages/new-okr-list/index.js +3 -1
- package/lib/pages/new-okr-list/list/index.js +19 -2
- package/lib/pages/new-okr-list/request-api.js +8 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +3 -5
- package/lib/utils/format-time.js +8 -1
- package/lib/utils/open-data.js +5 -1
- 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/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/delete-confirm/style.js +0 -38
|
@@ -9,15 +9,21 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _popup = _interopRequireDefault(require("../../../components/popup"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _tooltip = _interopRequireDefault(require("../../../components/tooltip"));
|
|
17
17
|
|
|
18
|
-
require("
|
|
18
|
+
var _precls = require("../precls");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _context = require("../context");
|
|
21
|
+
|
|
22
|
+
var _common = require("./common");
|
|
23
|
+
|
|
24
|
+
var _requestApi = require("../request-api");
|
|
25
|
+
|
|
26
|
+
require("./index.css");
|
|
21
27
|
|
|
22
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
29
|
|
|
@@ -37,43 +43,89 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
37
43
|
|
|
38
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
45
|
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
var DynamicLiking = function DynamicLiking() {
|
|
43
|
-
var _useState = (0, _react.useState)([]),
|
|
46
|
+
var OperateRecord = function OperateRecord(props) {
|
|
47
|
+
var _useState = (0, _react.useState)(true),
|
|
44
48
|
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
(0, _react.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
showOperateRecord = _useState2[0],
|
|
50
|
+
setShowOperateRecord = _useState2[1];
|
|
51
|
+
|
|
52
|
+
var popupRef = (0, _react.useRef)();
|
|
53
|
+
var drawerRef = (0, _react.useRef)();
|
|
54
|
+
var userInfo = props.userInfo,
|
|
55
|
+
toUserId = props.toUserId,
|
|
56
|
+
relation = props.relation,
|
|
57
|
+
okrFeedParams = props.okrFeedParams;
|
|
58
|
+
|
|
59
|
+
var _useContext = (0, _react.useContext)(_context.Context),
|
|
60
|
+
OkrOperateRecordDrawer = _useContext.OkrOperateRecordDrawer,
|
|
61
|
+
annualNum = _useContext.annualNum,
|
|
62
|
+
cycleType = _useContext.cycleType,
|
|
63
|
+
yqmNum = _useContext.yqmNum;
|
|
64
|
+
|
|
65
|
+
var openOperateRecordPush = function openOperateRecordPush() {
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
popupRef.current && popupRef.current.close(); // @ts-ignore
|
|
68
|
+
|
|
69
|
+
drawerRef.current && drawerRef.current.showOperateDrawerVisible();
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
73
|
+
className: "".concat(_precls.precls, "__header-record-popup")
|
|
58
74
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
59
|
-
className:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
className: (0, _classnames["default"])("".concat(preCls, "__header-image")),
|
|
64
|
-
src: require("./image/like-dynamic.svg")
|
|
75
|
+
className: "".concat(_precls.precls, "__header-record-item"),
|
|
76
|
+
onClick: openOperateRecordPush
|
|
77
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
78
|
+
className: "tu-icon-jinzhan-s"
|
|
65
79
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
66
|
-
className:
|
|
67
|
-
}, (0, _getLocale.getLocale)(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
})
|
|
75
|
-
|
|
80
|
+
className: "".concat(_precls.precls, "__header-record-item-content")
|
|
81
|
+
}, (0, _getLocale.getLocale)('Per_details_OperationRecord'))));
|
|
82
|
+
|
|
83
|
+
(0, _react.useEffect)(function () {
|
|
84
|
+
if (toUserId) {
|
|
85
|
+
(0, _requestApi.getOperateRecordAuth)(toUserId).then(function (res) {
|
|
86
|
+
setShowOperateRecord(res.Data.obj);
|
|
87
|
+
});
|
|
88
|
+
} else if (parseInt(cycleType) === -1) {
|
|
89
|
+
setShowOperateRecord(false);
|
|
90
|
+
} else {
|
|
91
|
+
setShowOperateRecord(true);
|
|
92
|
+
}
|
|
93
|
+
}, [toUserId, cycleType]);
|
|
94
|
+
|
|
95
|
+
if (showOperateRecord === false) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
100
|
+
ref: popupRef,
|
|
101
|
+
popup: popup,
|
|
102
|
+
popupAlign: {
|
|
103
|
+
offset: [0, 4]
|
|
104
|
+
}
|
|
105
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
106
|
+
overlay: (0, _getLocale.getLocale)('Feed_Set_Pop_Butt_More'),
|
|
107
|
+
placement: "top"
|
|
108
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
109
|
+
className: "".concat(_precls.precls, "__header-record")
|
|
110
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
111
|
+
className: "tu-icon-more1"
|
|
112
|
+
})))), (toUserId !== undefined || relation === 1) && !!userInfo && /*#__PURE__*/_react["default"].createElement(OkrOperateRecordDrawer, {
|
|
113
|
+
ref: drawerRef,
|
|
114
|
+
userInfo: {
|
|
115
|
+
id: userInfo.userId,
|
|
116
|
+
name: userInfo.name,
|
|
117
|
+
color: userInfo.avatar.color,
|
|
118
|
+
avatarsUrl: userInfo.avatar.original,
|
|
119
|
+
type: 1
|
|
120
|
+
},
|
|
121
|
+
okrCycle: "\u300C".concat((0, _common.formatPeriod)({
|
|
122
|
+
annualNum: annualNum,
|
|
123
|
+
cycleType: cycleType,
|
|
124
|
+
yqmNum: yqmNum
|
|
125
|
+
}), "\u300D"),
|
|
126
|
+
okrFeedParams: okrFeedParams
|
|
127
|
+
}));
|
|
76
128
|
};
|
|
77
129
|
|
|
78
|
-
var _default =
|
|
130
|
+
var _default = OperateRecord;
|
|
79
131
|
exports["default"] = _default;
|
|
@@ -85,7 +85,8 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
85
85
|
var OkrListCmp = props.OkrListCmp,
|
|
86
86
|
OkrCommunicationPush = props.OkrCommunicationPush,
|
|
87
87
|
Empty = props.Empty,
|
|
88
|
-
SetCycleModal = props.SetCycleModal
|
|
88
|
+
SetCycleModal = props.SetCycleModal,
|
|
89
|
+
OkrOperateRecordDrawer = props.OkrOperateRecordDrawer;
|
|
89
90
|
var useLocalStorage = new _localStorage.LocalStorage();
|
|
90
91
|
var formFieldValues = useLocalStorage.getItem("okr-filter-values") || {
|
|
91
92
|
targetType: "",
|
|
@@ -316,6 +317,7 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
316
317
|
return /*#__PURE__*/_react["default"].createElement(_context.Context.Provider, {
|
|
317
318
|
value: _objectSpread({
|
|
318
319
|
OkrCommunicationPush: OkrCommunicationPush,
|
|
320
|
+
OkrOperateRecordDrawer: OkrOperateRecordDrawer,
|
|
319
321
|
relation: relation,
|
|
320
322
|
departmentName: departmentName,
|
|
321
323
|
departmentId: departmentId,
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _context = require("../context");
|
|
13
|
+
|
|
14
|
+
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); }
|
|
9
15
|
|
|
10
|
-
function
|
|
16
|
+
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; }
|
|
11
17
|
|
|
12
18
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
19
|
|
|
@@ -31,8 +37,19 @@ function List(props) {
|
|
|
31
37
|
refreshList = props.refreshList,
|
|
32
38
|
replaceOkr = props.replaceOkr;
|
|
33
39
|
var OkrListCmp = props.OkrListCmp;
|
|
40
|
+
|
|
41
|
+
var _useContext = (0, _react.useContext)(_context.Context),
|
|
42
|
+
annualNum = _useContext.annualNum,
|
|
43
|
+
cycleType = _useContext.cycleType,
|
|
44
|
+
yqmNum = _useContext.yqmNum;
|
|
45
|
+
|
|
34
46
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(OkrListCmp, {
|
|
35
47
|
okrData: okrs,
|
|
48
|
+
cycle: {
|
|
49
|
+
annualNum: annualNum,
|
|
50
|
+
cycleType: cycleType,
|
|
51
|
+
yqmNum: yqmNum
|
|
52
|
+
},
|
|
36
53
|
addOkr: function addOkr(okr) {
|
|
37
54
|
setOkrs([].concat(_toConsumableArray(okrs), [okr]));
|
|
38
55
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.visitOkrCyclePag = exports.okrSearch = exports.okrList = exports.okrCrowd = exports.getUserInfoById = exports.getOkrInfoWithListData = exports.getCycleSetting = void 0;
|
|
6
|
+
exports.visitOkrCyclePag = exports.okrSearch = exports.okrList = exports.okrCrowd = exports.getUserInfoById = exports.getOperateRecordAuth = exports.getOkrInfoWithListData = exports.getCycleSetting = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
@@ -224,4 +224,10 @@ var getCycleSetting = /*#__PURE__*/function () {
|
|
|
224
224
|
};
|
|
225
225
|
}();
|
|
226
226
|
|
|
227
|
-
exports.getCycleSetting = getCycleSetting;
|
|
227
|
+
exports.getCycleSetting = getCycleSetting;
|
|
228
|
+
|
|
229
|
+
var getOperateRecordAuth = function getOperateRecordAuth(toUserId) {
|
|
230
|
+
return (0, _request.rget)('v1')("okr/cycleComment/checkRole?touser_id=".concat(toUserId));
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
exports.getOperateRecordAuth = getOperateRecordAuth;
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _okrFlow = _interopRequireDefault(require("../../../components/okr-flow"));
|
|
15
15
|
|
|
16
16
|
require("./index.css");
|
|
17
17
|
|
|
@@ -61,10 +61,8 @@ function _default(props) {
|
|
|
61
61
|
isIE && setIsIE(true);
|
|
62
62
|
setLoading(false);
|
|
63
63
|
} else {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
setLoading(false);
|
|
67
|
-
});
|
|
64
|
+
okrMapCmp.current = _okrFlow["default"];
|
|
65
|
+
setLoading(false);
|
|
68
66
|
}
|
|
69
67
|
}, []);
|
|
70
68
|
if (loading) return /*#__PURE__*/_react["default"].createElement("span", null);
|
package/lib/utils/format-time.js
CHANGED
|
@@ -167,5 +167,12 @@ var showNextMonthFirstDay = function showNextMonthFirstDay() {
|
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
exports.showNextMonthFirstDay = showNextMonthFirstDay;
|
|
170
|
-
var _default =
|
|
170
|
+
var _default = {
|
|
171
|
+
getTimeString: getTimeString,
|
|
172
|
+
timeFormat: timeFormat,
|
|
173
|
+
showWeekFirstDay: showWeekFirstDay,
|
|
174
|
+
showMonthFirstDay: showMonthFirstDay,
|
|
175
|
+
showNextWeekFirstDay: showNextWeekFirstDay,
|
|
176
|
+
showNextMonthFirstDay: showNextMonthFirstDay
|
|
177
|
+
};
|
|
171
178
|
exports["default"] = _default;
|
package/lib/utils/open-data.js
CHANGED
|
@@ -356,6 +356,10 @@ exports.parseHtmlAndTextTag = parseHtmlAndTextTag;
|
|
|
356
356
|
var _default = {
|
|
357
357
|
OpenUserName: OpenUserName,
|
|
358
358
|
OpenDepartmentName: OpenDepartmentName,
|
|
359
|
-
isWechat: isWechat
|
|
359
|
+
isWechat: isWechat,
|
|
360
|
+
isPlatform: isPlatform,
|
|
361
|
+
parseString: parseString,
|
|
362
|
+
parseTag: parseTag,
|
|
363
|
+
parseHtmlAndTextTag: parseHtmlAndTextTag
|
|
360
364
|
};
|
|
361
365
|
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.31-beta.1",
|
|
4
4
|
"nameCN": "",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"react-transition-group": "4.4.2",
|
|
145
145
|
"resize-observer-polyfill": "1.5.1",
|
|
146
146
|
"slick-carousel": "1.8.1",
|
|
147
|
-
"tita-ui": "1.2.
|
|
147
|
+
"tita-ui": "1.2.56",
|
|
148
148
|
"url-parse": "1.5.1",
|
|
149
149
|
"uuid": "3.1.0",
|
|
150
150
|
"viewerjs": "1.10.1",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
.titaui-dynamic-advertise-next-btn {
|
|
2
|
-
width: 24px;
|
|
3
|
-
height: 24px;
|
|
4
|
-
background: rgba(0, 0, 0, 0.4);
|
|
5
|
-
border-radius: 50%;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
position: absolute;
|
|
11
|
-
top: 50%;
|
|
12
|
-
transform: translateY(-50%);
|
|
13
|
-
z-index: 1;
|
|
14
|
-
right: 16px;
|
|
15
|
-
opacity: 1;
|
|
16
|
-
transition: all 0.3s linear;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.titaui-dynamic-advertise-next-btn__icon {
|
|
20
|
-
font-size: 16px;
|
|
21
|
-
transform: rotate(180deg);
|
|
22
|
-
color: #ffffff;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.titaui-dynamic-advertise-next-btn--hidden {
|
|
26
|
-
opacity: 0;
|
|
27
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
|
-
require("./index.css");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
|
-
var prefix = "titaui-dynamic-advertise-next-btn";
|
|
19
|
-
|
|
20
|
-
var NextBtn = function NextBtn(_ref) {
|
|
21
|
-
var onClick = _ref.onClick,
|
|
22
|
-
isShow = _ref.isShow;
|
|
23
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
-
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--hidden"), !isShow)),
|
|
25
|
-
onClick: onClick
|
|
26
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
27
|
-
className: (0, _classnames["default"])("tu-icon-left", "".concat(prefix, "__icon"))
|
|
28
|
-
}));
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
var _default = NextBtn;
|
|
32
|
-
exports["default"] = _default;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.titaui-dynamic-advertise-pre-btn {
|
|
2
|
-
width: 24px;
|
|
3
|
-
height: 24px;
|
|
4
|
-
background: rgba(0, 0, 0, 0.4);
|
|
5
|
-
border-radius: 50%;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
position: absolute;
|
|
11
|
-
top: 50%;
|
|
12
|
-
left: 16px;
|
|
13
|
-
transform: translateY(-50%);
|
|
14
|
-
z-index: 1;
|
|
15
|
-
opacity: 1;
|
|
16
|
-
transition: all 0.3s linear;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.titaui-dynamic-advertise-pre-btn__icon {
|
|
20
|
-
font-size: 16px;
|
|
21
|
-
color: #ffffff;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.titaui-dynamic-advertise-pre-btn--hidden {
|
|
25
|
-
opacity: 0;
|
|
26
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
-
|
|
12
|
-
require("./index.css");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
|
-
var prefix = "titaui-dynamic-advertise-pre-btn";
|
|
19
|
-
|
|
20
|
-
var PreBtn = function PreBtn(_ref) {
|
|
21
|
-
var onClick = _ref.onClick,
|
|
22
|
-
isShow = _ref.isShow;
|
|
23
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
-
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--hidden"), !isShow)),
|
|
25
|
-
onClick: onClick
|
|
26
|
-
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
27
|
-
className: (0, _classnames["default"])("tu-icon-left", "".concat(prefix, "__icon"))
|
|
28
|
-
}));
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
var _default = PreBtn;
|
|
32
|
-
exports["default"] = _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.tutaui-dynamic-advertise {
|
|
2
|
-
width: 278px;
|
|
3
|
-
border-radius: 12px;
|
|
4
|
-
position: relative;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.tutaui-dynamic-advertise--not-empty {
|
|
8
|
-
box-shadow: 0px 2px 12px 0px rgba(127, 145, 180, 0.2);
|
|
9
|
-
margin-top: 10px;
|
|
10
|
-
height: 136px;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.tutaui-dynamic-advertise *:focus {
|
|
14
|
-
outline: none !important;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.tutaui-dynamic-advertise__img {
|
|
18
|
-
border-radius: 12px;
|
|
19
|
-
width: 278px;
|
|
20
|
-
height: 136px;
|
|
21
|
-
}
|
|
@@ -1,126 +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 _reactSlick = _interopRequireDefault(require("react-slick"));
|
|
13
|
-
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
|
-
var _requestApi = require("../request-api");
|
|
17
|
-
|
|
18
|
-
var _toast = _interopRequireDefault(require("../../toast"));
|
|
19
|
-
|
|
20
|
-
var _util = require("./util");
|
|
21
|
-
|
|
22
|
-
var _nextBtn = _interopRequireDefault(require("./components/next-btn"));
|
|
23
|
-
|
|
24
|
-
var _preBtn = _interopRequireDefault(require("./components/pre-btn"));
|
|
25
|
-
|
|
26
|
-
require("slick-carousel/slick/slick.css");
|
|
27
|
-
|
|
28
|
-
require("slick-carousel/slick/slick-theme.css");
|
|
29
|
-
|
|
30
|
-
require("./index.css");
|
|
31
|
-
|
|
32
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
|
-
|
|
34
|
-
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); }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
|
-
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; }
|
|
41
|
-
|
|
42
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
-
|
|
44
|
-
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."); }
|
|
45
|
-
|
|
46
|
-
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); }
|
|
47
|
-
|
|
48
|
-
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; }
|
|
49
|
-
|
|
50
|
-
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; }
|
|
51
|
-
|
|
52
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
-
|
|
54
|
-
var prefix = "tutaui-dynamic-advertise";
|
|
55
|
-
var settings = {
|
|
56
|
-
dots: false,
|
|
57
|
-
infinite: true,
|
|
58
|
-
speed: 1000,
|
|
59
|
-
slidesToShow: 1,
|
|
60
|
-
slidesToScroll: 1,
|
|
61
|
-
// arrows: false,
|
|
62
|
-
autoplay: true
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
var DynamicAdvertise = function DynamicAdvertise() {
|
|
66
|
-
var _useState = (0, _react.useState)([]),
|
|
67
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
68
|
-
sliderData = _useState2[0],
|
|
69
|
-
setSliderData = _useState2[1];
|
|
70
|
-
|
|
71
|
-
var _useState3 = (0, _react.useState)(false),
|
|
72
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
-
isMouseEnter = _useState4[0],
|
|
74
|
-
setIsMouseEnter = _useState4[1];
|
|
75
|
-
|
|
76
|
-
var handleImgClick = function handleImgClick(link) {
|
|
77
|
-
window.open(link, "_blank");
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
var handleMouseEnter = function handleMouseEnter() {
|
|
81
|
-
setIsMouseEnter(true);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
var handleMouseLeave = function handleMouseLeave() {
|
|
85
|
-
setIsMouseEnter(false);
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
(0, _react.useEffect)(function () {
|
|
89
|
-
(0, _requestApi.getAdvertise)().then(function (resp) {
|
|
90
|
-
if (resp.Code === 1 && resp.Data.length > 0) {
|
|
91
|
-
setSliderData((0, _util.formatResp)(resp.Data));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (resp.Code !== 1) {
|
|
95
|
-
_toast["default"].Error(resp.Message, {
|
|
96
|
-
canClose: false
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}, []);
|
|
101
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
102
|
-
className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--not-empty"), sliderData.length > 0)),
|
|
103
|
-
onMouseEnter: handleMouseEnter,
|
|
104
|
-
onMouseLeave: handleMouseLeave
|
|
105
|
-
}, sliderData.length > 0 && /*#__PURE__*/_react["default"].createElement(_reactSlick["default"], _extends({}, settings, {
|
|
106
|
-
nextArrow: /*#__PURE__*/_react["default"].createElement(_nextBtn["default"], {
|
|
107
|
-
isShow: isMouseEnter
|
|
108
|
-
}),
|
|
109
|
-
prevArrow: /*#__PURE__*/_react["default"].createElement(_preBtn["default"], {
|
|
110
|
-
isShow: isMouseEnter
|
|
111
|
-
})
|
|
112
|
-
}), sliderData.map(function (item) {
|
|
113
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
|
-
onClick: function onClick() {
|
|
115
|
-
handleImgClick(item.link);
|
|
116
|
-
}
|
|
117
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
118
|
-
className: "".concat(prefix, "__img"),
|
|
119
|
-
src: item.img,
|
|
120
|
-
alt: item.name
|
|
121
|
-
}));
|
|
122
|
-
})));
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
var _default = DynamicAdvertise;
|
|
126
|
-
exports["default"] = _default;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.formatResp = void 0;
|
|
7
|
-
|
|
8
|
-
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; }
|
|
9
|
-
|
|
10
|
-
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; }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
13
|
-
|
|
14
|
-
var formatResp = function formatResp(data) {
|
|
15
|
-
if (!data || data.length === 0) {
|
|
16
|
-
return [];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return data.map(function (item) {
|
|
20
|
-
var content = JSON.parse(item.content);
|
|
21
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
22
|
-
img: content.picUrl,
|
|
23
|
-
link: content.link
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
exports.formatResp = formatResp;
|