@titaui/pc 1.11.61 → 1.11.64
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/contact-kefu/index.css +1 -1
- package/lib/components/contact-kefu/index.js +2 -2
- package/lib/components/create-okr-modal/index.js +3 -1
- package/lib/components/dynamic/constant.js +1 -1
- package/lib/components/dynamic/dynamic-list/index.js +14 -7
- package/lib/components/dynamic/index.js +9 -12
- package/lib/components/dynamic/request-api.js +7 -68
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +11 -9
- package/lib/components/nav-top/components/menu/index.js +16 -14
- package/lib/components/nav-top/index.js +2 -2
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
- package/lib/components/task-relation-modal/tree/category-tree/index.css +3 -3
- package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
- package/lib/components/task-relation-modal/tree/work-tree/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +1 -1
- package/lib/components/user-selector/category-selector-panel/index.js +6 -1
- package/lib/components/{dynamic/quick-operation/components/create-task/index.js → user-selector/category-selector-panel/subordinate-tree.js} +37 -20
- package/lib/components/user-selector/constant.js +10 -2
- package/lib/components/user-selector/empty/index.css +5 -0
- package/lib/components/user-selector/empty/index.js +9 -3
- package/lib/components/user-selector/export-modules/depart-search-selector/index.js +45 -17
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
- package/lib/components/user-selector/images/no-auth.png +0 -0
- package/lib/components/user-selector/request-apis.js +28 -9
- package/lib/components/user-selector/searched-panel/index.js +21 -7
- 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 -95
- 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/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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getPanesConfig = void 0;
|
|
6
|
+
exports.getPanesConfig = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _getLocale = require("../../utils/getLocale");
|
|
9
9
|
|
|
@@ -11,6 +11,8 @@ var _departTree = _interopRequireDefault(require("./category-selector-panel/depa
|
|
|
11
11
|
|
|
12
12
|
var _groupTree = _interopRequireDefault(require("./category-selector-panel/group-tree"));
|
|
13
13
|
|
|
14
|
+
var _subordinateTree = _interopRequireDefault(require("./category-selector-panel/subordinate-tree"));
|
|
15
|
+
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
17
|
|
|
16
18
|
var getPanesConfig = function getPanesConfig() {
|
|
@@ -22,8 +24,14 @@ var getPanesConfig = function getPanesConfig() {
|
|
|
22
24
|
group: {
|
|
23
25
|
label: (0, _getLocale.getLocale)("Mod_Groups"),
|
|
24
26
|
Component: _groupTree["default"]
|
|
27
|
+
},
|
|
28
|
+
subordinate: {
|
|
29
|
+
label: (0, _getLocale.getLocale)("OKR_MyO_Butt_Subordinate"),
|
|
30
|
+
Component: _subordinateTree["default"]
|
|
25
31
|
}
|
|
26
32
|
};
|
|
27
33
|
};
|
|
28
34
|
|
|
29
|
-
exports.getPanesConfig = getPanesConfig;
|
|
35
|
+
exports.getPanesConfig = getPanesConfig;
|
|
36
|
+
var _default = getPanesConfig;
|
|
37
|
+
exports["default"] = _default;
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
background: url(../images/empty-131.png) transparent no-repeat 50% 50%;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.persel-empty > span.empty-special {
|
|
16
|
+
background-image: url("../images/no-auth.png");
|
|
17
|
+
background-size: contain;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.add-group {
|
|
16
21
|
display: inline-block;
|
|
17
22
|
color: #2879ff;
|
|
@@ -7,13 +7,17 @@ exports["default"] = _default;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
10
12
|
var _getLocale = require("../../../utils/getLocale");
|
|
11
13
|
|
|
12
14
|
require("./index.css");
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
17
|
|
|
16
|
-
function _default() {
|
|
18
|
+
function _default(_ref) {
|
|
19
|
+
var _ref$errorTip = _ref.errorTip,
|
|
20
|
+
errorTip = _ref$errorTip === void 0 ? "" : _ref$errorTip;
|
|
17
21
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
18
22
|
style: {
|
|
19
23
|
textAlign: "center"
|
|
@@ -21,8 +25,10 @@ function _default() {
|
|
|
21
25
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
22
26
|
className: "persel-empty"
|
|
23
27
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
24
|
-
className: "icon"
|
|
28
|
+
className: (0, _classnames["default"])("icon", {
|
|
29
|
+
"empty-special": !!errorTip
|
|
30
|
+
})
|
|
25
31
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
26
32
|
className: "empty-tip"
|
|
27
|
-
}, (0, _getLocale.getLocale)("OKR_MyO_Thnothinghere")));
|
|
33
|
+
}, errorTip || (0, _getLocale.getLocale)("OKR_MyO_Thnothinghere")));
|
|
28
34
|
}
|
|
@@ -19,6 +19,8 @@ var _resultPart = _interopRequireDefault(require("./result-part"));
|
|
|
19
19
|
|
|
20
20
|
var _chooseTree = _interopRequireDefault(require("../../select-tree/choose-tree"));
|
|
21
21
|
|
|
22
|
+
var _empty = _interopRequireDefault(require("../../empty"));
|
|
23
|
+
|
|
22
24
|
var _selectorInput = _interopRequireDefault(require("../../../selector-input"));
|
|
23
25
|
|
|
24
26
|
var _layout = require("../../layout");
|
|
@@ -29,6 +31,8 @@ var _utils = require("../../utils");
|
|
|
29
31
|
|
|
30
32
|
var _requestApis = require("../../request-apis");
|
|
31
33
|
|
|
34
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
35
|
+
|
|
32
36
|
require("rc-tabs/assets/index.css");
|
|
33
37
|
|
|
34
38
|
require("./index.css");
|
|
@@ -102,12 +106,17 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
102
106
|
users = _useState10[0],
|
|
103
107
|
setUsers = _useState10[1];
|
|
104
108
|
|
|
105
|
-
var _useState11 = (0, _react.useState)(
|
|
109
|
+
var _useState11 = (0, _react.useState)(false),
|
|
110
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
111
|
+
noAuth = _useState12[0],
|
|
112
|
+
setNoAuth = _useState12[1];
|
|
113
|
+
|
|
114
|
+
var _useState13 = (0, _react.useState)(function () {
|
|
106
115
|
if (!auth) return [];
|
|
107
116
|
return ["-1"];
|
|
108
117
|
}),
|
|
109
|
-
|
|
110
|
-
defaultExpandedKeys =
|
|
118
|
+
_useState14 = _slicedToArray(_useState13, 1),
|
|
119
|
+
defaultExpandedKeys = _useState14[0];
|
|
111
120
|
|
|
112
121
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
113
122
|
return {
|
|
@@ -120,12 +129,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
120
129
|
};
|
|
121
130
|
});
|
|
122
131
|
|
|
123
|
-
var
|
|
132
|
+
var _useState15 = (0, _react.useState)(function () {
|
|
124
133
|
if (props.selected) return props.selected;
|
|
125
134
|
}),
|
|
126
|
-
|
|
127
|
-
selected =
|
|
128
|
-
setSelected =
|
|
135
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
136
|
+
selected = _useState16[0],
|
|
137
|
+
setSelected = _useState16[1]; // 获取数据的API
|
|
129
138
|
|
|
130
139
|
|
|
131
140
|
var searchTreeData = function searchTreeData() {
|
|
@@ -134,9 +143,17 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
134
143
|
departOnly: true,
|
|
135
144
|
sourceFrom: sourceFrom
|
|
136
145
|
}).then(function (res) {
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
|
|
146
|
+
var Code = res.Code,
|
|
147
|
+
Data = res.Data;
|
|
148
|
+
|
|
149
|
+
if (Code === 401) {
|
|
150
|
+
setNoAuth(true);
|
|
151
|
+
} else {
|
|
152
|
+
setNoAuth(false);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
var departments = Data.departments,
|
|
156
|
+
users = Data.users;
|
|
140
157
|
|
|
141
158
|
if (searchDepart) {
|
|
142
159
|
setDeparts((0, _utils.translateDepartsToTreeNode)(departments || []));
|
|
@@ -197,18 +214,29 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
197
214
|
onGetTreeDataDone(departs);
|
|
198
215
|
});
|
|
199
216
|
}
|
|
200
|
-
}, []);
|
|
217
|
+
}, []);
|
|
218
|
+
|
|
219
|
+
var getResult = function getResult() {
|
|
220
|
+
if (noAuth) {
|
|
221
|
+
return /*#__PURE__*/_react["default"].createElement(_empty["default"], {
|
|
222
|
+
errorTip: (0, _getLocale.getLocale)("Mod_Nopermissiondep")
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return /*#__PURE__*/_react["default"].createElement(_resultPart["default"], {
|
|
227
|
+
treeData: searchDepart ? departs : searchUser ? users : [],
|
|
228
|
+
onSelect: onSelectHandler,
|
|
229
|
+
departOnly: true,
|
|
230
|
+
height: height - 44
|
|
231
|
+
});
|
|
232
|
+
}; // 选人组件内容
|
|
233
|
+
|
|
201
234
|
|
|
202
235
|
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
203
236
|
className: (0, _classnames["default"])("persel-box", "perspm-depart-search-selector")
|
|
204
237
|
}, /*#__PURE__*/_react["default"].createElement(_layout.SinglePersonalLayout, null, /*#__PURE__*/_react["default"].createElement(_selectorInput["default"], {
|
|
205
238
|
onChange: onSearchChangeHandler
|
|
206
|
-
}), searchKey ? loading ? /*#__PURE__*/_react["default"].createElement(_loading["default"], null) : /*#__PURE__*/_react["default"].createElement(
|
|
207
|
-
treeData: searchDepart ? departs : searchUser ? users : [],
|
|
208
|
-
onSelect: onSelectHandler,
|
|
209
|
-
departOnly: true,
|
|
210
|
-
height: height - 44
|
|
211
|
-
}) : /*#__PURE__*/_react["default"].createElement(_context.TreeNodeContext.Provider, {
|
|
239
|
+
}), searchKey ? loading ? /*#__PURE__*/_react["default"].createElement(_loading["default"], null) : getResult() : /*#__PURE__*/_react["default"].createElement(_context.TreeNodeContext.Provider, {
|
|
212
240
|
value: {}
|
|
213
241
|
}, /*#__PURE__*/_react["default"].createElement(_chooseTree["default"], {
|
|
214
242
|
onSelect: onSelectHandler,
|
|
@@ -81,7 +81,8 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
81
81
|
_props$panes = props.panes,
|
|
82
82
|
panes = _props$panes === void 0 ? {
|
|
83
83
|
depart: true,
|
|
84
|
-
group: true
|
|
84
|
+
group: true,
|
|
85
|
+
subordinate: true
|
|
85
86
|
} : _props$panes,
|
|
86
87
|
_props$searchedPanes = props.searchedPanes,
|
|
87
88
|
searchedPanes = _props$searchedPanes === void 0 ? {
|
|
@@ -214,6 +215,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
214
215
|
});
|
|
215
216
|
|
|
216
217
|
var onOkHandler = function onOkHandler(selectNodes, e) {
|
|
218
|
+
debugger;
|
|
217
219
|
setVisible(false);
|
|
218
220
|
setSelected(selectNodes);
|
|
219
221
|
var texts = [];
|
|
Binary file
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.searchGroups = exports.searchDuties = exports.search = exports.getTreeData = exports.getGourps = exports.getDuties = void 0;
|
|
6
|
+
exports.searchGroups = exports.searchDuties = exports.search = exports.getTreeData = exports.getSubordinateData = exports.getGourps = exports.getDuties = void 0;
|
|
7
7
|
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
|
|
@@ -137,10 +137,29 @@ var getTreeData = function getTreeData(id, opts, resolve) {
|
|
|
137
137
|
|
|
138
138
|
exports.getTreeData = getTreeData;
|
|
139
139
|
|
|
140
|
-
var
|
|
141
|
-
var
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
var getSubordinateData = function getSubordinateData(_ref3) {
|
|
141
|
+
var auth = _ref3.auth,
|
|
142
|
+
authType = _ref3.authType;
|
|
143
|
+
var authTypeId;
|
|
144
|
+
if (auth && !authType) authType = "okr";
|
|
145
|
+
if (authType == "okr") authTypeId = "62";
|
|
146
|
+
if (authType == "performance") authTypeId = "31";
|
|
147
|
+
if (authType == "total") authTypeId = "0";
|
|
148
|
+
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/org/GetDepartmentSubordinates?objtype=").concat(authTypeId)).then(function (res) {
|
|
149
|
+
var _res$data$Data$users = res.data.Data.users,
|
|
150
|
+
users = _res$data$Data$users === void 0 ? [] : _res$data$Data$users;
|
|
151
|
+
var transUsers = (0, _utils.translateUsersToTreeNode)(users || []); // resolve && resolve([...transUsers]);
|
|
152
|
+
|
|
153
|
+
return _toConsumableArray(transUsers);
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
exports.getSubordinateData = getSubordinateData;
|
|
158
|
+
|
|
159
|
+
var search = function search(_ref4) {
|
|
160
|
+
var searchKey = _ref4.searchKey,
|
|
161
|
+
departOnly = _ref4.departOnly,
|
|
162
|
+
sourceFrom = _ref4.sourceFrom;
|
|
144
163
|
var args = [];
|
|
145
164
|
if (departOnly) args.push("isGetUser=false");
|
|
146
165
|
if (sourceFrom) args.push("sourceFrom=".concat(sourceFrom)); // 追加来源,用于企业微信搜索
|
|
@@ -153,8 +172,8 @@ var search = function search(_ref3) {
|
|
|
153
172
|
|
|
154
173
|
exports.search = search;
|
|
155
174
|
|
|
156
|
-
var searchGroups = function searchGroups(
|
|
157
|
-
var searchKey =
|
|
175
|
+
var searchGroups = function searchGroups(_ref5) {
|
|
176
|
+
var searchKey = _ref5.searchKey;
|
|
158
177
|
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/map/group?keyWork=").concat(searchKey)).then(function (searchRes) {
|
|
159
178
|
return searchRes.data;
|
|
160
179
|
});
|
|
@@ -170,8 +189,8 @@ var getDuties = function getDuties() {
|
|
|
170
189
|
|
|
171
190
|
exports.getDuties = getDuties;
|
|
172
191
|
|
|
173
|
-
var searchDuties = function searchDuties(
|
|
174
|
-
var searchKey =
|
|
192
|
+
var searchDuties = function searchDuties(_ref6) {
|
|
193
|
+
var searchKey = _ref6.searchKey;
|
|
175
194
|
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/position/search?status=1&pageNum=1&pageSize=100&filter=").concat(searchKey)).then(function (res) {
|
|
176
195
|
return res.data;
|
|
177
196
|
});
|
|
@@ -85,6 +85,11 @@ function _default(props) {
|
|
|
85
85
|
group = _useState8[0],
|
|
86
86
|
setGroup = _useState8[1];
|
|
87
87
|
|
|
88
|
+
var _useState9 = (0, _react.useState)(false),
|
|
89
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
90
|
+
noAuth = _useState10[0],
|
|
91
|
+
setNoAuth = _useState10[1];
|
|
92
|
+
|
|
88
93
|
(0, _react.useEffect)(function () {
|
|
89
94
|
setLoading(true);
|
|
90
95
|
(0, _requestApis.search)({
|
|
@@ -92,10 +97,18 @@ function _default(props) {
|
|
|
92
97
|
departOnly: departOnly,
|
|
93
98
|
sourceFrom: sourceFrom
|
|
94
99
|
}).then(function (res) {
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
var Code = res.Code,
|
|
101
|
+
Data = res.Data;
|
|
102
|
+
var departments = Data.departments,
|
|
103
|
+
groups = Data.groups,
|
|
104
|
+
users = Data.users;
|
|
105
|
+
|
|
106
|
+
if (Code === 401) {
|
|
107
|
+
setNoAuth(true);
|
|
108
|
+
} else {
|
|
109
|
+
setNoAuth(false);
|
|
110
|
+
}
|
|
111
|
+
|
|
99
112
|
setPerson((0, _utils.translateUsersToTreeNode)(users || []));
|
|
100
113
|
setGroup((0, _utils.translateGroupsToTreeNode)(groups || []));
|
|
101
114
|
setDeparts((0, _utils.translateDepartsToTreeNode)(departments || []));
|
|
@@ -103,7 +116,6 @@ function _default(props) {
|
|
|
103
116
|
});
|
|
104
117
|
}, [searchKey]); // 计算结果,是否显示空值
|
|
105
118
|
|
|
106
|
-
var showEmpty = false;
|
|
107
119
|
var itemCount = 0;
|
|
108
120
|
|
|
109
121
|
if (searchedPanes.user && person) {
|
|
@@ -120,7 +132,7 @@ function _default(props) {
|
|
|
120
132
|
|
|
121
133
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
134
|
className: "persel-searched"
|
|
123
|
-
}, loading
|
|
135
|
+
}, loading && /*#__PURE__*/_react["default"].createElement(_loading["default"], null), !loading && /*#__PURE__*/_react["default"].createElement("div", null, searchedPanes.user && person && person.length ? /*#__PURE__*/_react["default"].createElement(_resultPart["default"], {
|
|
124
136
|
title: (0, _getLocale.getLocale)("Per_Ma_form_detail_Personnel"),
|
|
125
137
|
treeData: person,
|
|
126
138
|
onSelect: onNodeSelect,
|
|
@@ -135,5 +147,7 @@ function _default(props) {
|
|
|
135
147
|
treeData: group,
|
|
136
148
|
onSelect: onNodeSelect,
|
|
137
149
|
selected: selected
|
|
138
|
-
}) : undefined, itemCount == 0 && /*#__PURE__*/_react["default"].createElement(_empty["default"], null)
|
|
150
|
+
}) : undefined, itemCount == 0 && !noAuth && /*#__PURE__*/_react["default"].createElement(_empty["default"], null), itemCount == 0 && noAuth && /*#__PURE__*/_react["default"].createElement(_empty["default"], {
|
|
151
|
+
errorTip: (0, _getLocale.getLocale)("Mod_Nopermissiondep")
|
|
152
|
+
})));
|
|
139
153
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@titaui/pc",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.64",
|
|
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;
|