@titaui/pc 1.12.9-beta.4 → 1.12.9-beta.5
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/menus/export-modules/demo-menus/menu-highlight.js +19 -1
- package/lib/components/menus/export-modules/demo-menus/menus.js +34 -1
- package/lib/components/okr-flow/export-modal/index.js +31 -26
- package/lib/components/user-selector/category-selector-panel/index.js +1 -0
- package/lib/components/user-selector/request-apis.js +23 -11
- package/lib/components/user-selector/searched-panel/index.js +3 -1
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ var _default = /*#__PURE__*/function () {
|
|
|
25
25
|
_createClass(_default, [{
|
|
26
26
|
key: "highlight",
|
|
27
27
|
value: function highlight(cb) {
|
|
28
|
-
if (this.isUnAssigned()) cb(_menus.PAGE_UNASSIGNED_DEMOFREE);else if (this.isAssigned()) cb(_menus.PAGE_ASSIGNED_DEMOFREE);else if (this.isReserved()) cb(_menus.PAGE_RESERVED_DEMOFREE);else if (this.isDone()) cb(_menus.PAGE_DONE_DEMOFREE);else if (this.isIgnore()) cb(_menus.PAGE_IGNORED_DEMOFREE);else if (this.isChart()) cb(_menus.PAGE_CHARTS_DEMOFREE);else if (this.isRechargeList()) cb(_menus.PAGE_RECHARGE_LIST);else if (this.isRechargeStatistics()) cb(_menus.PAGE_RECHARGE_STATISTICS);else if (this.isRechargeStatus()) cb(_menus.PAGE_RECHARGE_STATUS);else if (this.isDueDateOrder()) cb(_menus.PAGE_DUEDATE_ORDER);
|
|
28
|
+
if (this.isUnAssigned()) cb(_menus.PAGE_UNASSIGNED_DEMOFREE);else if (this.isAssigned()) cb(_menus.PAGE_ASSIGNED_DEMOFREE);else if (this.isReserved()) cb(_menus.PAGE_RESERVED_DEMOFREE);else if (this.isDone()) cb(_menus.PAGE_DONE_DEMOFREE);else if (this.isIgnore()) cb(_menus.PAGE_IGNORED_DEMOFREE);else if (this.isChart()) cb(_menus.PAGE_CHARTS_DEMOFREE);else if (this.isRechargeList()) cb(_menus.PAGE_RECHARGE_LIST);else if (this.isRechargeStatistics()) cb(_menus.PAGE_RECHARGE_STATISTICS);else if (this.isRechargeStatus()) cb(_menus.PAGE_RECHARGE_STATUS);else if (this.isDueDateOrder()) cb(_menus.PAGE_DUEDATE_ORDER);else if (this.isAllCustomer()) cb(_menus.PAGE_ALL_CUSTOMER);else if (this.isPublicCustomer()) cb(_menus.PAGE_PUBLIC_CUSTOMER);else if (this.isMyCustomer()) cb(_menus.PAGE_MY_CUSTOMER);
|
|
29
29
|
}
|
|
30
30
|
}, {
|
|
31
31
|
key: "isChart",
|
|
@@ -102,6 +102,24 @@ var _default = /*#__PURE__*/function () {
|
|
|
102
102
|
search = _this$history$locatio5.search;
|
|
103
103
|
return pathname.match(/demofree/) && search.match(/selected[\s]*?=[\s]*?ignore/);
|
|
104
104
|
}
|
|
105
|
+
}, {
|
|
106
|
+
key: "isPublicCustomer",
|
|
107
|
+
value: function isPublicCustomer() {
|
|
108
|
+
var pathname = this.history.location.pathname;
|
|
109
|
+
return pathname.match(/demofree\/customer\/public/);
|
|
110
|
+
}
|
|
111
|
+
}, {
|
|
112
|
+
key: "isMyCustomer",
|
|
113
|
+
value: function isMyCustomer() {
|
|
114
|
+
var pathname = this.history.location.pathname;
|
|
115
|
+
return pathname.match(/demofree\/customer\/my/);
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "isAllCustomer",
|
|
119
|
+
value: function isAllCustomer() {
|
|
120
|
+
var pathname = this.history.location.pathname;
|
|
121
|
+
return pathname.match(/demofree\/customer\/all/);
|
|
122
|
+
}
|
|
105
123
|
}]);
|
|
106
124
|
|
|
107
125
|
return _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.defaultRefObject = exports["default"] = exports.PAGE_UNASSIGNED_DEMOFREE = exports.PAGE_RESERVED_DEMOFREE = exports.PAGE_RECHARGE_STATUS = exports.PAGE_RECHARGE_STATISTICS = exports.PAGE_RECHARGE_LIST = exports.PAGE_IGNORED_DEMOFREE = exports.PAGE_DUEDATE_ORDER = exports.PAGE_DONE_DEMOFREE = exports.PAGE_CHARTS_DEMOFREE = exports.PAGE_ASSIGNED_DEMOFREE = void 0;
|
|
6
|
+
exports.defaultRefObject = exports["default"] = exports.PAGE_UNASSIGNED_DEMOFREE = exports.PAGE_RESERVED_DEMOFREE = exports.PAGE_RECHARGE_STATUS = exports.PAGE_RECHARGE_STATISTICS = exports.PAGE_RECHARGE_LIST = exports.PAGE_PUBLIC_CUSTOMER = exports.PAGE_MY_CUSTOMER = exports.PAGE_IGNORED_DEMOFREE = exports.PAGE_DUEDATE_ORDER = exports.PAGE_DONE_DEMOFREE = exports.PAGE_CHARTS_DEMOFREE = exports.PAGE_CHARTS = exports.PAGE_ASSIGNED_DEMOFREE = exports.PAGE_ALL_CUSTOMER = void 0;
|
|
7
7
|
|
|
8
8
|
var _index = require("../../components/menu-tree/tree-node/index");
|
|
9
9
|
|
|
@@ -40,6 +40,14 @@ var PAGE_IGNORED_DEMOFREE = "ignore";
|
|
|
40
40
|
exports.PAGE_IGNORED_DEMOFREE = PAGE_IGNORED_DEMOFREE;
|
|
41
41
|
var PAGE_CHARTS_DEMOFREE = "charts";
|
|
42
42
|
exports.PAGE_CHARTS_DEMOFREE = PAGE_CHARTS_DEMOFREE;
|
|
43
|
+
var PAGE_ALL_CUSTOMER = "allCustomer";
|
|
44
|
+
exports.PAGE_ALL_CUSTOMER = PAGE_ALL_CUSTOMER;
|
|
45
|
+
var PAGE_PUBLIC_CUSTOMER = "publicCustomer";
|
|
46
|
+
exports.PAGE_PUBLIC_CUSTOMER = PAGE_PUBLIC_CUSTOMER;
|
|
47
|
+
var PAGE_MY_CUSTOMER = "myCustomer";
|
|
48
|
+
exports.PAGE_MY_CUSTOMER = PAGE_MY_CUSTOMER;
|
|
49
|
+
var PAGE_CHARTS = "charts";
|
|
50
|
+
exports.PAGE_CHARTS = PAGE_CHARTS;
|
|
43
51
|
var PAGE_RECHARGE_LIST = "rechargeList";
|
|
44
52
|
exports.PAGE_RECHARGE_LIST = PAGE_RECHARGE_LIST;
|
|
45
53
|
var PAGE_DUEDATE_ORDER = "dueDateOrder";
|
|
@@ -91,6 +99,31 @@ var DemoMenuData = /*#__PURE__*/function () {
|
|
|
91
99
|
href: "#/demofree/list?selected=ignore",
|
|
92
100
|
isShow: this.isManager === EManagerType.Manager
|
|
93
101
|
}]
|
|
102
|
+
}, {
|
|
103
|
+
icon: "KH-help",
|
|
104
|
+
label: "公海资源",
|
|
105
|
+
key: "customer",
|
|
106
|
+
href: "#/demofree/customer/public",
|
|
107
|
+
isShow: true,
|
|
108
|
+
children: [{
|
|
109
|
+
icon: "",
|
|
110
|
+
label: "全部客户",
|
|
111
|
+
key: PAGE_ALL_CUSTOMER,
|
|
112
|
+
href: "#/demofree/customer/all",
|
|
113
|
+
isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager
|
|
114
|
+
}, {
|
|
115
|
+
icon: "",
|
|
116
|
+
label: "公海资源",
|
|
117
|
+
key: PAGE_PUBLIC_CUSTOMER,
|
|
118
|
+
href: "#/demofree/customer/public",
|
|
119
|
+
isShow: this.isManager !== EManagerType.ReCharge
|
|
120
|
+
}, {
|
|
121
|
+
icon: "",
|
|
122
|
+
label: "我的资源",
|
|
123
|
+
key: PAGE_MY_CUSTOMER,
|
|
124
|
+
href: "#/demofree/customer/my",
|
|
125
|
+
isShow: this.isManager !== EManagerType.ReCharge
|
|
126
|
+
}]
|
|
94
127
|
}, {
|
|
95
128
|
icon: "KH-help",
|
|
96
129
|
label: "客户续费",
|
|
@@ -232,41 +232,29 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
232
232
|
scope.setExtra('userMessage', userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
|
|
233
233
|
});
|
|
234
234
|
(0, _requestApis.getBase64DownloadUrl)(imgUrl.split(',')[1]).then(function (url) {
|
|
235
|
-
|
|
235
|
+
// const image = new Image()
|
|
236
|
+
// @ts-ignore
|
|
236
237
|
// window.titaTracker && window.titaTracker("action").record({
|
|
237
238
|
// actionName: userId+'租户:'+telentId+'我获得了地址'+url.Data.obj,
|
|
238
239
|
// actionGroup: 'okr地图接口',
|
|
239
240
|
// productName: 'okr地图导出',
|
|
240
241
|
// });
|
|
241
|
-
|
|
242
242
|
Sentry.withScope(function (scope) {
|
|
243
243
|
scope.setTag('error-level', "P0");
|
|
244
244
|
scope.setTag('error-type', '地图导出-图片地址');
|
|
245
245
|
scope.setExtra('userMessage', userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
|
|
246
246
|
});
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
var a = document.createElement('a'); // 生成一个a元素
|
|
262
|
-
|
|
263
|
-
var event = new MouseEvent('click'); // 创建一个单击事件
|
|
264
|
-
|
|
265
|
-
a.download = 'okr地图'; // 设置图片名称
|
|
266
|
-
|
|
267
|
-
a.href = url.Data.obj; // 将生成的URL设置为a
|
|
268
|
-
|
|
269
|
-
a.dispatchEvent(event); // 触发a的单击事件
|
|
247
|
+
var newUrl = url.Data.obj;
|
|
248
|
+
var x = new XMLHttpRequest();
|
|
249
|
+
x.open("GET", newUrl, true);
|
|
250
|
+
x.responseType = 'blob';
|
|
251
|
+
|
|
252
|
+
x.onload = function (e) {
|
|
253
|
+
var url = window.URL.createObjectURL(x.response);
|
|
254
|
+
var a = document.createElement('a');
|
|
255
|
+
a.href = url;
|
|
256
|
+
a.download = model.value === 20 ? '高清图片' : '标准图片';
|
|
257
|
+
a.click();
|
|
270
258
|
|
|
271
259
|
_toast["default"].Success('导出成功');
|
|
272
260
|
|
|
@@ -277,7 +265,24 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
277
265
|
}
|
|
278
266
|
};
|
|
279
267
|
|
|
280
|
-
image.
|
|
268
|
+
x.send(); // image.setAttribute('crossOrigin', 'anonymous')
|
|
269
|
+
// image.onload = async() => {
|
|
270
|
+
// if (!url.Data.obj) {
|
|
271
|
+
// Toast.Error('导出失败,请稍后重试', { canClose: false })
|
|
272
|
+
// }
|
|
273
|
+
// await downloadFile(url.Data.obj,model.value===20?'高清分享图片':'标准分享图片')
|
|
274
|
+
// // const a = document.createElement('a') // 生成一个a元素
|
|
275
|
+
// // const event = new MouseEvent('click') // 创建一个单击事件
|
|
276
|
+
// // a.download = '123' // 设置图片名称
|
|
277
|
+
// // a.href = url.Data.obj // 将生成的URL设置为a
|
|
278
|
+
// // a.dispatchEvent(event) // 触发a的单击事件
|
|
279
|
+
// Toast.Success('导出成功')
|
|
280
|
+
// setIsExport(false)
|
|
281
|
+
// if (onCloseHandler) {
|
|
282
|
+
// onCloseHandler()
|
|
283
|
+
// }
|
|
284
|
+
// }
|
|
285
|
+
// image.src = imgUrl
|
|
281
286
|
});
|
|
282
287
|
})["catch"](function (err) {
|
|
283
288
|
setIsExport(false);
|
|
@@ -80,6 +80,7 @@ function _default(props) {
|
|
|
80
80
|
tabPane: true
|
|
81
81
|
}
|
|
82
82
|
}, Object.keys(panes).map(function (panelKey) {
|
|
83
|
+
if (!panes[panelKey]) return;
|
|
83
84
|
var _getPanesConfig$panel = (0, _constant.getPanesConfig)()[panelKey],
|
|
84
85
|
label = _getPanesConfig$panel.label,
|
|
85
86
|
Component = _getPanesConfig$panel.Component;
|
|
@@ -160,27 +160,39 @@ var search = function search(_ref4) {
|
|
|
160
160
|
var searchKey = _ref4.searchKey,
|
|
161
161
|
departOnly = _ref4.departOnly,
|
|
162
162
|
searchUserOnly = _ref4.searchUserOnly,
|
|
163
|
-
|
|
163
|
+
panes = _ref4.panes,
|
|
164
|
+
_ref4$auth = _ref4.auth,
|
|
165
|
+
auth = _ref4$auth === void 0 ? false : _ref4$auth,
|
|
164
166
|
_ref4$isVerify = _ref4.isVerify,
|
|
165
167
|
isVerify = _ref4$isVerify === void 0 ? false : _ref4$isVerify;
|
|
166
|
-
var
|
|
168
|
+
var isGetUser = true;
|
|
169
|
+
var isGetDep = false;
|
|
170
|
+
var isGetGroup = false;
|
|
171
|
+
var depart = panes.depart,
|
|
172
|
+
group = panes.group;
|
|
173
|
+
|
|
174
|
+
if (depart) {
|
|
175
|
+
isGetDep = true;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (group) {
|
|
179
|
+
isGetGroup = true;
|
|
180
|
+
}
|
|
167
181
|
|
|
168
182
|
if (departOnly) {
|
|
169
|
-
|
|
170
|
-
} else if (searchUserOnly) {
|
|
171
|
-
args.push("isGetUser=true&isGetDep=false&isGetGroup=false");
|
|
172
|
-
} else {
|
|
173
|
-
args.push("isGetUser=true&isGetDep=true&isGetGroup=true");
|
|
183
|
+
isGetUser = false;
|
|
174
184
|
}
|
|
175
185
|
|
|
176
|
-
|
|
186
|
+
if (searchUserOnly) {
|
|
187
|
+
isGetDep = false;
|
|
188
|
+
isGetGroup = false;
|
|
189
|
+
}
|
|
177
190
|
|
|
178
|
-
if (
|
|
179
|
-
// 这个是遗留的管控群组的,后面逐步替换掉
|
|
191
|
+
if (auth) {
|
|
180
192
|
isVerify = true;
|
|
181
193
|
}
|
|
182
194
|
|
|
183
|
-
return _axios["default"].get("".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/search/searchAll?keyWord=").concat(searchKey, "&isVerify=").concat(isVerify, "&").concat(
|
|
195
|
+
return _axios["default"].get("".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/search/searchAll?keyWord=").concat(searchKey, "&isVerify=").concat(isVerify, "&isGetUser=").concat(isGetUser, "&isGetDep=").concat(isGetDep, "&isGetGroup=").concat(isGetGroup)).then(function (searchRes) {
|
|
184
196
|
return searchRes.data;
|
|
185
197
|
});
|
|
186
198
|
};
|
|
@@ -61,6 +61,7 @@ function _default(props) {
|
|
|
61
61
|
departOnly = _useContext.departOnly,
|
|
62
62
|
searchUserOnly = _useContext.searchUserOnly,
|
|
63
63
|
sourceFrom = _useContext.sourceFrom,
|
|
64
|
+
auth = _useContext.auth,
|
|
64
65
|
isVerify = _useContext.isVerify,
|
|
65
66
|
_useContext$panes = _useContext.panes,
|
|
66
67
|
panes = _useContext$panes === void 0 ? {
|
|
@@ -100,7 +101,8 @@ function _default(props) {
|
|
|
100
101
|
searchKey: searchKey,
|
|
101
102
|
departOnly: departOnly,
|
|
102
103
|
searchUserOnly: searchUserOnly,
|
|
103
|
-
|
|
104
|
+
auth: auth,
|
|
105
|
+
panes: panes,
|
|
104
106
|
isVerify: isVerify
|
|
105
107
|
}).then(function (res) {
|
|
106
108
|
var Code = res.Code,
|