@titaui/pc 1.11.21-beta.1 → 1.11.21-beta.3
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 +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/button/rect-btn/index.css +11 -25
- package/lib/components/button/rect-btn/index.js +4 -8
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -41
- package/lib/components/drawer/index.css +0 -44
- package/lib/components/drawer/index.js +7 -36
- package/lib/components/dynamic/index.js +9 -12
- package/lib/components/dynamic/request-api.js +7 -68
- package/lib/components/nav-top/index.js +5 -6
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -16
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -9
- package/lib/components/okr-detail/components/header/o-name.js +3 -9
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +6 -9
- package/lib/components/okr-detail/detail-header/index.js +1 -12
- package/lib/components/okr-detail/index.js +2 -21
- package/lib/components/okr-detail/okr-list/index.js +3 -8
- package/lib/components/okr-detail/request-apis.js +1 -7
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/index.js +0 -40
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- 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/index.js +0 -79
- 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/constant.js +0 -53
- package/lib/components/okr-detail/helper.js +0 -62
- package/lib/components/textarea/index.css +0 -120
- package/lib/components/textarea/index.js +0 -257
- package/lib/pages/new-okr-list/header/common.js +0 -52
- package/lib/pages/new-okr-list/header/operate-record.js +0 -124
|
@@ -36,51 +36,6 @@
|
|
|
36
36
|
color: #2879ff;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.tita-okr-list-v2__header-record {
|
|
40
|
-
display: flex;
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
justify-content: center;
|
|
43
|
-
align-items: center;
|
|
44
|
-
transform: rotate(90deg);
|
|
45
|
-
background: #fff;
|
|
46
|
-
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
47
|
-
width: 36px;
|
|
48
|
-
height: 36px;
|
|
49
|
-
margin-left: 12px;
|
|
50
|
-
border-radius: 18px;
|
|
51
|
-
font-size: 20px;
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.tita-okr-list-v2__header-record-popup {
|
|
56
|
-
padding: 16px 12px;
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
background: #ffffff;
|
|
59
|
-
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
60
|
-
border-radius: 12px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.tita-okr-list-v2__header-record-item {
|
|
64
|
-
display: flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
padding: 5px 8px;
|
|
67
|
-
box-sizing: border-box;
|
|
68
|
-
font-size: 14px;
|
|
69
|
-
color: #3f4755;
|
|
70
|
-
line-height: 22px;
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.tita-okr-list-v2__header-record-item:hover {
|
|
75
|
-
color: #2879ff;
|
|
76
|
-
background: #f7f8fa;
|
|
77
|
-
border-radius: 8px;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.tita-okr-list-v2__header-record-item-content {
|
|
81
|
-
margin-left: 8px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
39
|
.tita-okr-list-v2__header-filter {
|
|
85
40
|
box-sizing: border-box;
|
|
86
41
|
height: 36px;
|
|
@@ -29,8 +29,6 @@ var _filter = _interopRequireDefault(require("./filter"));
|
|
|
29
29
|
|
|
30
30
|
var _comments = _interopRequireDefault(require("./comments"));
|
|
31
31
|
|
|
32
|
-
var _operateRecord = _interopRequireDefault(require("./operate-record"));
|
|
33
|
-
|
|
34
32
|
var _context = require("../context");
|
|
35
33
|
|
|
36
34
|
var _requestApi = require("../request-api");
|
|
@@ -67,7 +65,6 @@ function Header(props, ref) {
|
|
|
67
65
|
cycleType = _useContext.cycleType,
|
|
68
66
|
yqmNum = _useContext.yqmNum;
|
|
69
67
|
|
|
70
|
-
var relationShip = parseInt(relation, 10);
|
|
71
68
|
var onSearch = props.onSearch,
|
|
72
69
|
onFrontAddOKR = props.onFrontAddOKR;
|
|
73
70
|
|
|
@@ -87,26 +84,21 @@ function Header(props, ref) {
|
|
|
87
84
|
setUserInfo = _useState6[1];
|
|
88
85
|
|
|
89
86
|
(0, _react.useEffect)(function () {
|
|
90
|
-
if (toUserId !== undefined ||
|
|
87
|
+
if (toUserId !== undefined || relation == 1) {
|
|
91
88
|
var userId = toUserId;
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
setUserInfo(res.Data);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
89
|
+
if (relation == 1) userId = (0, _bsGlobal.getUserInfo)().Id;
|
|
90
|
+
userId && (0, _requestApi.getUserInfoById)(userId).then(function (res) {
|
|
91
|
+
setUserInfo(res.Data);
|
|
92
|
+
});
|
|
99
93
|
}
|
|
100
94
|
}, [toUserId, relation]);
|
|
101
95
|
(0, _react.useEffect)(function () {
|
|
102
96
|
setInit(true);
|
|
103
97
|
}, []);
|
|
104
98
|
(0, _react.useEffect)(function () {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
});
|
|
109
|
-
}
|
|
99
|
+
init && onSearch({
|
|
100
|
+
onlyThisDept: onlyThisDept
|
|
101
|
+
});
|
|
110
102
|
}, [onlyThisDept]);
|
|
111
103
|
var createOkrRef = (0, _react.useRef)();
|
|
112
104
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
@@ -133,7 +125,7 @@ function Header(props, ref) {
|
|
|
133
125
|
};
|
|
134
126
|
var searchType = "company";
|
|
135
127
|
|
|
136
|
-
if (departmentId && departmentId
|
|
128
|
+
if (departmentId && departmentId != -1) {
|
|
137
129
|
rootNode.rootId = departmentId;
|
|
138
130
|
rootNode.rootName = departmentName || "";
|
|
139
131
|
searchType = "depart";
|
|
@@ -149,7 +141,7 @@ function Header(props, ref) {
|
|
|
149
141
|
level2Selected.name = userInfo.name || "";
|
|
150
142
|
}
|
|
151
143
|
|
|
152
|
-
if (
|
|
144
|
+
if (relation == 1) {
|
|
153
145
|
rootNode.rootId = (0, _bsGlobal.getUserInfo)().Id;
|
|
154
146
|
rootNode.rootName = (0, _bsGlobal.getUserInfo)().Name || "";
|
|
155
147
|
searchType = "user";
|
|
@@ -162,18 +154,18 @@ function Header(props, ref) {
|
|
|
162
154
|
annualNum: annualNum,
|
|
163
155
|
yqmNum: yqmNum
|
|
164
156
|
})), "rootNode=".concat(JSON.stringify(rootNode)), "level2Selected=".concat(JSON.stringify(level2Selected))].join("&");
|
|
165
|
-
var origin = window.location.href.split(
|
|
157
|
+
var origin = window.location.href.split('#')[0];
|
|
166
158
|
window.location.href = "".concat(origin, "/#okr/map?").concat(urlQuery);
|
|
167
159
|
};
|
|
168
160
|
|
|
169
161
|
var getTitle = function getTitle() {
|
|
170
|
-
if (
|
|
162
|
+
if (relation == 1) {
|
|
171
163
|
return /*#__PURE__*/_react["default"].createElement(_userTitle["default"], {
|
|
172
164
|
toUserId: (0, _bsGlobal.getUserInfo)().Id
|
|
173
165
|
});
|
|
174
166
|
}
|
|
175
167
|
|
|
176
|
-
if (
|
|
168
|
+
if (relation == 2 || relation == 3) {
|
|
177
169
|
return /*#__PURE__*/_react["default"].createElement(_relationTitle["default"], {
|
|
178
170
|
relation: relation
|
|
179
171
|
});
|
|
@@ -205,11 +197,11 @@ function Header(props, ref) {
|
|
|
205
197
|
className: "".concat(_precls.precls, "__header-item")
|
|
206
198
|
}, getTitle())), /*#__PURE__*/_react["default"].createElement("div", {
|
|
207
199
|
className: "".concat(_precls.precls, "__header-right")
|
|
208
|
-
}, departmentId
|
|
200
|
+
}, departmentId == 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
209
201
|
className: "".concat(_precls.precls, "__header-item")
|
|
210
202
|
}, /*#__PURE__*/_react["default"].createElement(_keywordSearch["default"], {
|
|
211
203
|
onSearch: onSearch
|
|
212
|
-
})),
|
|
204
|
+
})), relation != 2 && relation != 3 &&
|
|
213
205
|
/*#__PURE__*/
|
|
214
206
|
// 我关注的 我参与的 没有创建按钮
|
|
215
207
|
_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -229,24 +221,10 @@ function Header(props, ref) {
|
|
|
229
221
|
className: "tu-icon-yangshi-ditu"
|
|
230
222
|
}))))), /*#__PURE__*/_react["default"].createElement(_comments["default"], {
|
|
231
223
|
toUserId: toUserId,
|
|
232
|
-
relation:
|
|
224
|
+
relation: relation,
|
|
233
225
|
userInfo: userInfo
|
|
234
226
|
}), /*#__PURE__*/_react["default"].createElement(_filter["default"], {
|
|
235
227
|
onSearch: onSearch
|
|
236
|
-
}), /*#__PURE__*/_react["default"].createElement(_operateRecord["default"], {
|
|
237
|
-
toUserId: toUserId,
|
|
238
|
-
userInfo: userInfo,
|
|
239
|
-
relation: relationShip,
|
|
240
|
-
okrFeedParams: {
|
|
241
|
-
objId: departmentId === undefined ? Number(toUserId || (0, _bsGlobal.getUserInfo)().Id) : Number(departmentId),
|
|
242
|
-
// 人员或部门Id
|
|
243
|
-
objType: departmentId === undefined ? 1 : 2,
|
|
244
|
-
// 1:负责人,2:部门
|
|
245
|
-
cycleType: Number(cycleType),
|
|
246
|
-
// 目标周期:0-自定义,1-年度,2-季度,3-月度
|
|
247
|
-
yqmNum: Number(yqmNum),
|
|
248
|
-
annualNum: Number(annualNum)
|
|
249
|
-
}
|
|
250
228
|
})));
|
|
251
229
|
}
|
|
252
230
|
|
|
@@ -85,8 +85,7 @@ 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
|
|
89
|
-
OkrOperateRecordDrawer = props.OkrOperateRecordDrawer;
|
|
88
|
+
SetCycleModal = props.SetCycleModal;
|
|
90
89
|
var useLocalStorage = new _localStorage.LocalStorage();
|
|
91
90
|
var formFieldValues = useLocalStorage.getItem("okr-filter-values") || {
|
|
92
91
|
targetType: "",
|
|
@@ -317,7 +316,6 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
317
316
|
return /*#__PURE__*/_react["default"].createElement(_context.Context.Provider, {
|
|
318
317
|
value: _objectSpread({
|
|
319
318
|
OkrCommunicationPush: OkrCommunicationPush,
|
|
320
|
-
OkrOperateRecordDrawer: OkrOperateRecordDrawer,
|
|
321
319
|
relation: relation,
|
|
322
320
|
departmentName: departmentName,
|
|
323
321
|
departmentId: departmentId,
|
|
@@ -1,19 +1,13 @@
|
|
|
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
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var _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); }
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
9
|
|
|
16
|
-
function
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
11
|
|
|
18
12
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
13
|
|
|
@@ -37,19 +31,8 @@ function List(props) {
|
|
|
37
31
|
refreshList = props.refreshList,
|
|
38
32
|
replaceOkr = props.replaceOkr;
|
|
39
33
|
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
|
-
|
|
46
34
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(OkrListCmp, {
|
|
47
35
|
okrData: okrs,
|
|
48
|
-
cycle: {
|
|
49
|
-
annualNum: annualNum,
|
|
50
|
-
cycleType: cycleType,
|
|
51
|
-
yqmNum: yqmNum
|
|
52
|
-
},
|
|
53
36
|
addOkr: function addOkr(okr) {
|
|
54
37
|
setOkrs([].concat(_toConsumableArray(okrs), [okr]));
|
|
55
38
|
},
|
|
@@ -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.
|
|
6
|
+
exports.visitOkrCyclePag = exports.okrSearch = exports.okrList = exports.okrCrowd = exports.getUserInfoById = exports.getOkrInfoWithListData = exports.getCycleSetting = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("../../utils/request");
|
|
9
9
|
|
|
@@ -224,10 +224,4 @@ var getCycleSetting = /*#__PURE__*/function () {
|
|
|
224
224
|
};
|
|
225
225
|
}();
|
|
226
226
|
|
|
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;
|
|
227
|
+
exports.getCycleSetting = getCycleSetting;
|
package/lib/utils/format-time.js
CHANGED
|
@@ -167,12 +167,5 @@ var showNextMonthFirstDay = function showNextMonthFirstDay() {
|
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
exports.showNextMonthFirstDay = showNextMonthFirstDay;
|
|
170
|
-
var _default =
|
|
171
|
-
getTimeString: getTimeString,
|
|
172
|
-
timeFormat: timeFormat,
|
|
173
|
-
showWeekFirstDay: showWeekFirstDay,
|
|
174
|
-
showMonthFirstDay: showMonthFirstDay,
|
|
175
|
-
showNextWeekFirstDay: showNextWeekFirstDay,
|
|
176
|
-
showNextMonthFirstDay: showNextMonthFirstDay
|
|
177
|
-
};
|
|
170
|
+
var _default = getTimeString;
|
|
178
171
|
exports["default"] = _default;
|
package/lib/utils/open-data.js
CHANGED
|
@@ -356,10 +356,6 @@ exports.parseHtmlAndTextTag = parseHtmlAndTextTag;
|
|
|
356
356
|
var _default = {
|
|
357
357
|
OpenUserName: OpenUserName,
|
|
358
358
|
OpenDepartmentName: OpenDepartmentName,
|
|
359
|
-
isWechat: isWechat
|
|
360
|
-
isPlatform: isPlatform,
|
|
361
|
-
parseString: parseString,
|
|
362
|
-
parseTag: parseTag,
|
|
363
|
-
parseHtmlAndTextTag: parseHtmlAndTextTag
|
|
359
|
+
isWechat: isWechat
|
|
364
360
|
};
|
|
365
361
|
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.11.21-beta.
|
|
3
|
+
"version": "1.11.21-beta.3",
|
|
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;
|