tx-sider 2.1.26 → 2.1.29
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/TXUI.mjs +144 -202
- package/lib/TXUI.umd.js +2 -2
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/TXUI.mjs
CHANGED
|
@@ -8002,11 +8002,11 @@ var useInjectTrigger = function useInjectTrigger2() {
|
|
|
8002
8002
|
};
|
|
8003
8003
|
var PortalContextKey = Symbol("PortalContextKey");
|
|
8004
8004
|
var useProvidePortal = function useProvidePortal2(instance) {
|
|
8005
|
-
var
|
|
8005
|
+
var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
8006
8006
|
inTriggerContext: true
|
|
8007
8007
|
};
|
|
8008
8008
|
provide(PortalContextKey, {
|
|
8009
|
-
inTriggerContext:
|
|
8009
|
+
inTriggerContext: config.inTriggerContext,
|
|
8010
8010
|
shouldRender: computed(function() {
|
|
8011
8011
|
var _ref = instance || {}, sPopupVisible = _ref.sPopupVisible, popupRef = _ref.popupRef, forceRender = _ref.forceRender, autoDestroy = _ref.autoDestroy;
|
|
8012
8012
|
var shouldRender = false;
|
|
@@ -9845,8 +9845,8 @@ function getOverflowOptions(autoAdjustOverflow2) {
|
|
|
9845
9845
|
}
|
|
9846
9846
|
return _extends$1(_extends$1({}, autoAdjustOverflowDisabled), autoAdjustOverflow2);
|
|
9847
9847
|
}
|
|
9848
|
-
function getPlacements(
|
|
9849
|
-
var _config$arrowWidth =
|
|
9848
|
+
function getPlacements(config) {
|
|
9849
|
+
var _config$arrowWidth = config.arrowWidth, arrowWidth = _config$arrowWidth === void 0 ? 4 : _config$arrowWidth, _config$horizontalArr = config.horizontalArrowShift, horizontalArrowShift = _config$horizontalArr === void 0 ? 16 : _config$horizontalArr, _config$verticalArrow = config.verticalArrowShift, verticalArrowShift = _config$verticalArrow === void 0 ? 8 : _config$verticalArrow, autoAdjustOverflow2 = config.autoAdjustOverflow, arrowPointAtCenter = config.arrowPointAtCenter;
|
|
9850
9850
|
var placementMap = {
|
|
9851
9851
|
left: {
|
|
9852
9852
|
points: ["cr", "cl"],
|
|
@@ -18345,9 +18345,9 @@ const ConfirmDialog = defineComponent({
|
|
|
18345
18345
|
};
|
|
18346
18346
|
}
|
|
18347
18347
|
});
|
|
18348
|
-
var confirm = function confirm2(
|
|
18348
|
+
var confirm = function confirm2(config) {
|
|
18349
18349
|
var container = document.createDocumentFragment();
|
|
18350
|
-
var currentConfig = _extends$1(_extends$1({}, omit$2(
|
|
18350
|
+
var currentConfig = _extends$1(_extends$1({}, omit$2(config, ["parentContext", "appContext"])), {
|
|
18351
18351
|
close: close3,
|
|
18352
18352
|
visible: true
|
|
18353
18353
|
});
|
|
@@ -18364,8 +18364,8 @@ var confirm = function confirm2(config2) {
|
|
|
18364
18364
|
var triggerCancel = args.some(function(param) {
|
|
18365
18365
|
return param && param.triggerCancel;
|
|
18366
18366
|
});
|
|
18367
|
-
if (
|
|
18368
|
-
|
|
18367
|
+
if (config.onCancel && triggerCancel) {
|
|
18368
|
+
config.onCancel.apply(config, args);
|
|
18369
18369
|
}
|
|
18370
18370
|
for (var i2 = 0; i2 < destroyFns.length; i2++) {
|
|
18371
18371
|
var fn = destroyFns[i2];
|
|
@@ -18383,8 +18383,8 @@ var confirm = function confirm2(config2) {
|
|
|
18383
18383
|
currentConfig = _extends$1(_extends$1({}, currentConfig), {
|
|
18384
18384
|
visible: false,
|
|
18385
18385
|
afterClose: function afterClose() {
|
|
18386
|
-
if (typeof
|
|
18387
|
-
|
|
18386
|
+
if (typeof config.afterClose === "function") {
|
|
18387
|
+
config.afterClose();
|
|
18388
18388
|
}
|
|
18389
18389
|
destroy3.apply(_this, args);
|
|
18390
18390
|
}
|
|
@@ -18420,7 +18420,7 @@ var confirm = function confirm2(config2) {
|
|
|
18420
18420
|
};
|
|
18421
18421
|
function render$1(props) {
|
|
18422
18422
|
var vm = createVNode(Wrapper, _extends$1({}, props));
|
|
18423
|
-
vm.appContext =
|
|
18423
|
+
vm.appContext = config.parentContext || config.appContext || vm.appContext;
|
|
18424
18424
|
render(vm, container);
|
|
18425
18425
|
return vm;
|
|
18426
18426
|
}
|
|
@@ -21159,61 +21159,6 @@ const moduleTest3 = [
|
|
|
21159
21159
|
}
|
|
21160
21160
|
];
|
|
21161
21161
|
const index = "";
|
|
21162
|
-
var TYPE_ENUM = /* @__PURE__ */ ((TYPE_ENUM2) => {
|
|
21163
|
-
TYPE_ENUM2[TYPE_ENUM2["List"] = 0] = "List";
|
|
21164
|
-
TYPE_ENUM2[TYPE_ENUM2["Create"] = 1] = "Create";
|
|
21165
|
-
TYPE_ENUM2[TYPE_ENUM2["Update"] = 2] = "Update";
|
|
21166
|
-
TYPE_ENUM2[TYPE_ENUM2["Delete"] = 3] = "Delete";
|
|
21167
|
-
TYPE_ENUM2[TYPE_ENUM2["Detail"] = 4] = "Detail";
|
|
21168
|
-
TYPE_ENUM2[TYPE_ENUM2["Export"] = 5] = "Export";
|
|
21169
|
-
return TYPE_ENUM2;
|
|
21170
|
-
})(TYPE_ENUM || {});
|
|
21171
|
-
let permissionList = localStorage.getItem("AccessData") ? JSON.parse(localStorage.getItem("AccessData")) : [];
|
|
21172
|
-
let selectModule = localStorage.getItem("selectModule") ? JSON.parse(localStorage.getItem("selectModule")) : {};
|
|
21173
|
-
let config = {
|
|
21174
|
-
// SYSTEM: "BussinessCenter",
|
|
21175
|
-
// MANAGEMENT: "YieldModule",
|
|
21176
|
-
SYSTEM: selectModule.key ? selectModule.key.split(".")[0] : "",
|
|
21177
|
-
// 系统配置
|
|
21178
|
-
MANAGEMENT: selectModule.key ? selectModule.key.split(".")[1] : ""
|
|
21179
|
-
// 权限配置
|
|
21180
|
-
};
|
|
21181
|
-
function getBasePermission() {
|
|
21182
|
-
const centerList = permissionList.find(
|
|
21183
|
-
(_e) => _e.name === config.SYSTEM
|
|
21184
|
-
);
|
|
21185
|
-
if (!(centerList == null ? void 0 : centerList.isGranted))
|
|
21186
|
-
return { moduleList: null };
|
|
21187
|
-
const managementList = centerList == null ? void 0 : centerList.permissions;
|
|
21188
|
-
const moduleList = managementList.filter(
|
|
21189
|
-
(_e) => _e.name.includes(config.MANAGEMENT)
|
|
21190
|
-
);
|
|
21191
|
-
return { moduleList };
|
|
21192
|
-
}
|
|
21193
|
-
function hasPermission(value, funcInfo, funcKey, type4, def = true) {
|
|
21194
|
-
permissionList = localStorage.getItem("AccessData") ? JSON.parse(localStorage.getItem("AccessData")) : [];
|
|
21195
|
-
selectModule = localStorage.getItem("selectModule") ? JSON.parse(localStorage.getItem("selectModule")) : {};
|
|
21196
|
-
config.SYSTEM = selectModule.key ? selectModule.key.split(".")[0] : "";
|
|
21197
|
-
config.MANAGEMENT = selectModule.key ? selectModule.key.split(".")[1] : "";
|
|
21198
|
-
console.log(permissionList, "----hasPermission---permissionList");
|
|
21199
|
-
console.log(selectModule, "----hasPermission---selectModule");
|
|
21200
|
-
const { moduleList } = getBasePermission();
|
|
21201
|
-
const funcList = moduleList.filter((_e) => _e.name.includes(funcInfo));
|
|
21202
|
-
const itemList = funcList.filter((_e) => _e.name.includes(value));
|
|
21203
|
-
if (type4 === 0) {
|
|
21204
|
-
const result = itemList.find((_e) => _e.name.endsWith(value));
|
|
21205
|
-
return result == null ? void 0 : result.isGranted;
|
|
21206
|
-
} else {
|
|
21207
|
-
const result = itemList.find(
|
|
21208
|
-
(_e) => _e.name.includes(TYPE_ENUM[type4])
|
|
21209
|
-
);
|
|
21210
|
-
if (result) {
|
|
21211
|
-
return result.isGranted;
|
|
21212
|
-
} else {
|
|
21213
|
-
return false;
|
|
21214
|
-
}
|
|
21215
|
-
}
|
|
21216
|
-
}
|
|
21217
21162
|
var axios$3 = { exports: {} };
|
|
21218
21163
|
var bind$4 = function bind(fn, thisArg) {
|
|
21219
21164
|
return function wrap() {
|
|
@@ -21449,8 +21394,8 @@ var normalizeHeaderName$1 = function normalizeHeaderName(headers, normalizedName
|
|
|
21449
21394
|
}
|
|
21450
21395
|
});
|
|
21451
21396
|
};
|
|
21452
|
-
var enhanceError$1 = function enhanceError(error,
|
|
21453
|
-
error.config =
|
|
21397
|
+
var enhanceError$1 = function enhanceError(error, config, code, request3, response) {
|
|
21398
|
+
error.config = config;
|
|
21454
21399
|
if (code) {
|
|
21455
21400
|
error.code = code;
|
|
21456
21401
|
}
|
|
@@ -21490,9 +21435,9 @@ function requireCreateError() {
|
|
|
21490
21435
|
return createError;
|
|
21491
21436
|
hasRequiredCreateError = 1;
|
|
21492
21437
|
var enhanceError3 = enhanceError$1;
|
|
21493
|
-
createError = function createError2(message2,
|
|
21438
|
+
createError = function createError2(message2, config, code, request3, response) {
|
|
21494
21439
|
var error = new Error(message2);
|
|
21495
|
-
return enhanceError3(error,
|
|
21440
|
+
return enhanceError3(error, config, code, request3, response);
|
|
21496
21441
|
};
|
|
21497
21442
|
return createError;
|
|
21498
21443
|
}
|
|
@@ -21743,32 +21688,32 @@ function requireXhr() {
|
|
|
21743
21688
|
var createError2 = requireCreateError();
|
|
21744
21689
|
var transitionalDefaults2 = transitional;
|
|
21745
21690
|
var Cancel2 = requireCancel();
|
|
21746
|
-
xhr = function xhrAdapter(
|
|
21691
|
+
xhr = function xhrAdapter(config) {
|
|
21747
21692
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
21748
|
-
var requestData =
|
|
21749
|
-
var requestHeaders =
|
|
21750
|
-
var responseType =
|
|
21693
|
+
var requestData = config.data;
|
|
21694
|
+
var requestHeaders = config.headers;
|
|
21695
|
+
var responseType = config.responseType;
|
|
21751
21696
|
var onCanceled;
|
|
21752
21697
|
function done() {
|
|
21753
|
-
if (
|
|
21754
|
-
|
|
21698
|
+
if (config.cancelToken) {
|
|
21699
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
21755
21700
|
}
|
|
21756
|
-
if (
|
|
21757
|
-
|
|
21701
|
+
if (config.signal) {
|
|
21702
|
+
config.signal.removeEventListener("abort", onCanceled);
|
|
21758
21703
|
}
|
|
21759
21704
|
}
|
|
21760
21705
|
if (utils2.isFormData(requestData)) {
|
|
21761
21706
|
delete requestHeaders["Content-Type"];
|
|
21762
21707
|
}
|
|
21763
21708
|
var request3 = new XMLHttpRequest();
|
|
21764
|
-
if (
|
|
21765
|
-
var username =
|
|
21766
|
-
var password =
|
|
21709
|
+
if (config.auth) {
|
|
21710
|
+
var username = config.auth.username || "";
|
|
21711
|
+
var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
|
|
21767
21712
|
requestHeaders.Authorization = "Basic " + btoa(username + ":" + password);
|
|
21768
21713
|
}
|
|
21769
|
-
var fullPath = buildFullPath2(
|
|
21770
|
-
request3.open(
|
|
21771
|
-
request3.timeout =
|
|
21714
|
+
var fullPath = buildFullPath2(config.baseURL, config.url);
|
|
21715
|
+
request3.open(config.method.toUpperCase(), buildURL3(fullPath, config.params, config.paramsSerializer), true);
|
|
21716
|
+
request3.timeout = config.timeout;
|
|
21772
21717
|
function onloadend() {
|
|
21773
21718
|
if (!request3) {
|
|
21774
21719
|
return;
|
|
@@ -21780,7 +21725,7 @@ function requireXhr() {
|
|
|
21780
21725
|
status: request3.status,
|
|
21781
21726
|
statusText: request3.statusText,
|
|
21782
21727
|
headers: responseHeaders,
|
|
21783
|
-
config
|
|
21728
|
+
config,
|
|
21784
21729
|
request: request3
|
|
21785
21730
|
};
|
|
21786
21731
|
settle2(function _resolve(value) {
|
|
@@ -21809,31 +21754,31 @@ function requireXhr() {
|
|
|
21809
21754
|
if (!request3) {
|
|
21810
21755
|
return;
|
|
21811
21756
|
}
|
|
21812
|
-
reject(createError2("Request aborted",
|
|
21757
|
+
reject(createError2("Request aborted", config, "ECONNABORTED", request3));
|
|
21813
21758
|
request3 = null;
|
|
21814
21759
|
};
|
|
21815
21760
|
request3.onerror = function handleError() {
|
|
21816
|
-
reject(createError2("Network Error",
|
|
21761
|
+
reject(createError2("Network Error", config, null, request3));
|
|
21817
21762
|
request3 = null;
|
|
21818
21763
|
};
|
|
21819
21764
|
request3.ontimeout = function handleTimeout() {
|
|
21820
|
-
var timeoutErrorMessage =
|
|
21821
|
-
var transitional3 =
|
|
21822
|
-
if (
|
|
21823
|
-
timeoutErrorMessage =
|
|
21765
|
+
var timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
|
|
21766
|
+
var transitional3 = config.transitional || transitionalDefaults2;
|
|
21767
|
+
if (config.timeoutErrorMessage) {
|
|
21768
|
+
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
21824
21769
|
}
|
|
21825
21770
|
reject(createError2(
|
|
21826
21771
|
timeoutErrorMessage,
|
|
21827
|
-
|
|
21772
|
+
config,
|
|
21828
21773
|
transitional3.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
|
|
21829
21774
|
request3
|
|
21830
21775
|
));
|
|
21831
21776
|
request3 = null;
|
|
21832
21777
|
};
|
|
21833
21778
|
if (utils2.isStandardBrowserEnv()) {
|
|
21834
|
-
var xsrfValue = (
|
|
21779
|
+
var xsrfValue = (config.withCredentials || isURLSameOrigin2(fullPath)) && config.xsrfCookieName ? cookies2.read(config.xsrfCookieName) : void 0;
|
|
21835
21780
|
if (xsrfValue) {
|
|
21836
|
-
requestHeaders[
|
|
21781
|
+
requestHeaders[config.xsrfHeaderName] = xsrfValue;
|
|
21837
21782
|
}
|
|
21838
21783
|
}
|
|
21839
21784
|
if ("setRequestHeader" in request3) {
|
|
@@ -21845,19 +21790,19 @@ function requireXhr() {
|
|
|
21845
21790
|
}
|
|
21846
21791
|
});
|
|
21847
21792
|
}
|
|
21848
|
-
if (!utils2.isUndefined(
|
|
21849
|
-
request3.withCredentials = !!
|
|
21793
|
+
if (!utils2.isUndefined(config.withCredentials)) {
|
|
21794
|
+
request3.withCredentials = !!config.withCredentials;
|
|
21850
21795
|
}
|
|
21851
21796
|
if (responseType && responseType !== "json") {
|
|
21852
|
-
request3.responseType =
|
|
21797
|
+
request3.responseType = config.responseType;
|
|
21853
21798
|
}
|
|
21854
|
-
if (typeof
|
|
21855
|
-
request3.addEventListener("progress",
|
|
21799
|
+
if (typeof config.onDownloadProgress === "function") {
|
|
21800
|
+
request3.addEventListener("progress", config.onDownloadProgress);
|
|
21856
21801
|
}
|
|
21857
|
-
if (typeof
|
|
21858
|
-
request3.upload.addEventListener("progress",
|
|
21802
|
+
if (typeof config.onUploadProgress === "function" && request3.upload) {
|
|
21803
|
+
request3.upload.addEventListener("progress", config.onUploadProgress);
|
|
21859
21804
|
}
|
|
21860
|
-
if (
|
|
21805
|
+
if (config.cancelToken || config.signal) {
|
|
21861
21806
|
onCanceled = function(cancel) {
|
|
21862
21807
|
if (!request3) {
|
|
21863
21808
|
return;
|
|
@@ -21866,9 +21811,9 @@ function requireXhr() {
|
|
|
21866
21811
|
request3.abort();
|
|
21867
21812
|
request3 = null;
|
|
21868
21813
|
};
|
|
21869
|
-
|
|
21870
|
-
if (
|
|
21871
|
-
|
|
21814
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
21815
|
+
if (config.signal) {
|
|
21816
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
|
|
21872
21817
|
}
|
|
21873
21818
|
}
|
|
21874
21819
|
if (!requestData) {
|
|
@@ -22004,53 +21949,53 @@ var transformData2 = transformData$1;
|
|
|
22004
21949
|
var isCancel = requireIsCancel();
|
|
22005
21950
|
var defaults$3 = defaults_1;
|
|
22006
21951
|
var Cancel = requireCancel();
|
|
22007
|
-
function throwIfCancellationRequested(
|
|
22008
|
-
if (
|
|
22009
|
-
|
|
21952
|
+
function throwIfCancellationRequested(config) {
|
|
21953
|
+
if (config.cancelToken) {
|
|
21954
|
+
config.cancelToken.throwIfRequested();
|
|
22010
21955
|
}
|
|
22011
|
-
if (
|
|
21956
|
+
if (config.signal && config.signal.aborted) {
|
|
22012
21957
|
throw new Cancel("canceled");
|
|
22013
21958
|
}
|
|
22014
21959
|
}
|
|
22015
|
-
var dispatchRequest$1 = function dispatchRequest(
|
|
22016
|
-
throwIfCancellationRequested(
|
|
22017
|
-
|
|
22018
|
-
|
|
22019
|
-
|
|
22020
|
-
|
|
22021
|
-
|
|
22022
|
-
|
|
21960
|
+
var dispatchRequest$1 = function dispatchRequest(config) {
|
|
21961
|
+
throwIfCancellationRequested(config);
|
|
21962
|
+
config.headers = config.headers || {};
|
|
21963
|
+
config.data = transformData2.call(
|
|
21964
|
+
config,
|
|
21965
|
+
config.data,
|
|
21966
|
+
config.headers,
|
|
21967
|
+
config.transformRequest
|
|
22023
21968
|
);
|
|
22024
|
-
|
|
22025
|
-
|
|
22026
|
-
|
|
22027
|
-
|
|
21969
|
+
config.headers = utils$6.merge(
|
|
21970
|
+
config.headers.common || {},
|
|
21971
|
+
config.headers[config.method] || {},
|
|
21972
|
+
config.headers
|
|
22028
21973
|
);
|
|
22029
21974
|
utils$6.forEach(
|
|
22030
21975
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
22031
21976
|
function cleanHeaderConfig(method4) {
|
|
22032
|
-
delete
|
|
21977
|
+
delete config.headers[method4];
|
|
22033
21978
|
}
|
|
22034
21979
|
);
|
|
22035
|
-
var adapter =
|
|
22036
|
-
return adapter(
|
|
22037
|
-
throwIfCancellationRequested(
|
|
21980
|
+
var adapter = config.adapter || defaults$3.adapter;
|
|
21981
|
+
return adapter(config).then(function onAdapterResolution(response) {
|
|
21982
|
+
throwIfCancellationRequested(config);
|
|
22038
21983
|
response.data = transformData2.call(
|
|
22039
|
-
|
|
21984
|
+
config,
|
|
22040
21985
|
response.data,
|
|
22041
21986
|
response.headers,
|
|
22042
|
-
|
|
21987
|
+
config.transformResponse
|
|
22043
21988
|
);
|
|
22044
21989
|
return response;
|
|
22045
21990
|
}, function onAdapterRejection(reason) {
|
|
22046
21991
|
if (!isCancel(reason)) {
|
|
22047
|
-
throwIfCancellationRequested(
|
|
21992
|
+
throwIfCancellationRequested(config);
|
|
22048
21993
|
if (reason && reason.response) {
|
|
22049
21994
|
reason.response.data = transformData2.call(
|
|
22050
|
-
|
|
21995
|
+
config,
|
|
22051
21996
|
reason.response.data,
|
|
22052
21997
|
reason.response.headers,
|
|
22053
|
-
|
|
21998
|
+
config.transformResponse
|
|
22054
21999
|
);
|
|
22055
22000
|
}
|
|
22056
22001
|
}
|
|
@@ -22060,7 +22005,7 @@ var dispatchRequest$1 = function dispatchRequest(config2) {
|
|
|
22060
22005
|
var utils$5 = utils$c;
|
|
22061
22006
|
var mergeConfig$2 = function mergeConfig(config1, config2) {
|
|
22062
22007
|
config2 = config2 || {};
|
|
22063
|
-
var
|
|
22008
|
+
var config = {};
|
|
22064
22009
|
function getMergedValue(target, source) {
|
|
22065
22010
|
if (utils$5.isPlainObject(target) && utils$5.isPlainObject(source)) {
|
|
22066
22011
|
return utils$5.merge(target, source);
|
|
@@ -22128,9 +22073,9 @@ var mergeConfig$2 = function mergeConfig(config1, config2) {
|
|
|
22128
22073
|
utils$5.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
|
22129
22074
|
var merge4 = mergeMap[prop] || mergeDeepProperties;
|
|
22130
22075
|
var configValue = merge4(prop);
|
|
22131
|
-
utils$5.isUndefined(configValue) && merge4 !== mergeDirectKeys || (
|
|
22076
|
+
utils$5.isUndefined(configValue) && merge4 !== mergeDirectKeys || (config[prop] = configValue);
|
|
22132
22077
|
});
|
|
22133
|
-
return
|
|
22078
|
+
return config;
|
|
22134
22079
|
};
|
|
22135
22080
|
var data2;
|
|
22136
22081
|
var hasRequiredData;
|
|
@@ -22211,22 +22156,22 @@ function Axios$1(instanceConfig) {
|
|
|
22211
22156
|
response: new InterceptorManager()
|
|
22212
22157
|
};
|
|
22213
22158
|
}
|
|
22214
|
-
Axios$1.prototype.request = function request(configOrUrl,
|
|
22159
|
+
Axios$1.prototype.request = function request(configOrUrl, config) {
|
|
22215
22160
|
if (typeof configOrUrl === "string") {
|
|
22216
|
-
|
|
22217
|
-
|
|
22161
|
+
config = config || {};
|
|
22162
|
+
config.url = configOrUrl;
|
|
22218
22163
|
} else {
|
|
22219
|
-
|
|
22164
|
+
config = configOrUrl || {};
|
|
22220
22165
|
}
|
|
22221
|
-
|
|
22222
|
-
if (
|
|
22223
|
-
|
|
22166
|
+
config = mergeConfig$1(this.defaults, config);
|
|
22167
|
+
if (config.method) {
|
|
22168
|
+
config.method = config.method.toLowerCase();
|
|
22224
22169
|
} else if (this.defaults.method) {
|
|
22225
|
-
|
|
22170
|
+
config.method = this.defaults.method.toLowerCase();
|
|
22226
22171
|
} else {
|
|
22227
|
-
|
|
22172
|
+
config.method = "get";
|
|
22228
22173
|
}
|
|
22229
|
-
var transitional3 =
|
|
22174
|
+
var transitional3 = config.transitional;
|
|
22230
22175
|
if (transitional3 !== void 0) {
|
|
22231
22176
|
validator.assertOptions(transitional3, {
|
|
22232
22177
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
@@ -22237,7 +22182,7 @@ Axios$1.prototype.request = function request(configOrUrl, config2) {
|
|
|
22237
22182
|
var requestInterceptorChain = [];
|
|
22238
22183
|
var synchronousRequestInterceptors = true;
|
|
22239
22184
|
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
22240
|
-
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(
|
|
22185
|
+
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
|
|
22241
22186
|
return;
|
|
22242
22187
|
}
|
|
22243
22188
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
@@ -22252,13 +22197,13 @@ Axios$1.prototype.request = function request(configOrUrl, config2) {
|
|
|
22252
22197
|
var chain = [dispatchRequest2, void 0];
|
|
22253
22198
|
Array.prototype.unshift.apply(chain, requestInterceptorChain);
|
|
22254
22199
|
chain = chain.concat(responseInterceptorChain);
|
|
22255
|
-
promise = Promise.resolve(
|
|
22200
|
+
promise = Promise.resolve(config);
|
|
22256
22201
|
while (chain.length) {
|
|
22257
22202
|
promise = promise.then(chain.shift(), chain.shift());
|
|
22258
22203
|
}
|
|
22259
22204
|
return promise;
|
|
22260
22205
|
}
|
|
22261
|
-
var newConfig =
|
|
22206
|
+
var newConfig = config;
|
|
22262
22207
|
while (requestInterceptorChain.length) {
|
|
22263
22208
|
var onFulfilled = requestInterceptorChain.shift();
|
|
22264
22209
|
var onRejected = requestInterceptorChain.shift();
|
|
@@ -22279,22 +22224,22 @@ Axios$1.prototype.request = function request(configOrUrl, config2) {
|
|
|
22279
22224
|
}
|
|
22280
22225
|
return promise;
|
|
22281
22226
|
};
|
|
22282
|
-
Axios$1.prototype.getUri = function getUri(
|
|
22283
|
-
|
|
22284
|
-
return buildURL2(
|
|
22227
|
+
Axios$1.prototype.getUri = function getUri(config) {
|
|
22228
|
+
config = mergeConfig$1(this.defaults, config);
|
|
22229
|
+
return buildURL2(config.url, config.params, config.paramsSerializer).replace(/^\?/, "");
|
|
22285
22230
|
};
|
|
22286
22231
|
utils$4.forEach(["delete", "get", "head", "options"], function forEachMethodNoData2(method4) {
|
|
22287
|
-
Axios$1.prototype[method4] = function(url2,
|
|
22288
|
-
return this.request(mergeConfig$1(
|
|
22232
|
+
Axios$1.prototype[method4] = function(url2, config) {
|
|
22233
|
+
return this.request(mergeConfig$1(config || {}, {
|
|
22289
22234
|
method: method4,
|
|
22290
22235
|
url: url2,
|
|
22291
|
-
data: (
|
|
22236
|
+
data: (config || {}).data
|
|
22292
22237
|
}));
|
|
22293
22238
|
};
|
|
22294
22239
|
});
|
|
22295
22240
|
utils$4.forEach(["post", "put", "patch"], function forEachMethodWithData2(method4) {
|
|
22296
|
-
Axios$1.prototype[method4] = function(url2, data3,
|
|
22297
|
-
return this.request(mergeConfig$1(
|
|
22241
|
+
Axios$1.prototype[method4] = function(url2, data3, config) {
|
|
22242
|
+
return this.request(mergeConfig$1(config || {}, {
|
|
22298
22243
|
method: method4,
|
|
22299
22244
|
url: url2,
|
|
22300
22245
|
data: data3
|
|
@@ -22453,7 +22398,7 @@ const httpCode = {
|
|
|
22453
22398
|
504: "网关超时"
|
|
22454
22399
|
};
|
|
22455
22400
|
class Request {
|
|
22456
|
-
constructor(
|
|
22401
|
+
constructor(config) {
|
|
22457
22402
|
// axios 实例
|
|
22458
22403
|
__publicField(this, "instance");
|
|
22459
22404
|
// 拦截器对象
|
|
@@ -22475,8 +22420,8 @@ class Request {
|
|
|
22475
22420
|
var _a, _b, _c, _d;
|
|
22476
22421
|
this.requestUrlList = [];
|
|
22477
22422
|
this.cancelRequestSourceList = [];
|
|
22478
|
-
this.instance = axios$1.create(
|
|
22479
|
-
this.interceptorsObj =
|
|
22423
|
+
this.instance = axios$1.create(config);
|
|
22424
|
+
this.interceptorsObj = config.interceptors;
|
|
22480
22425
|
this.instance.interceptors.request.use(
|
|
22481
22426
|
(res) => res,
|
|
22482
22427
|
(err) => err
|
|
@@ -22538,26 +22483,26 @@ class Request {
|
|
|
22538
22483
|
urlIndex !== -1 && ((_b = this.requestUrlList) == null ? void 0 : _b.splice(urlIndex, 1));
|
|
22539
22484
|
sourceIndex !== -1 && ((_c = this.cancelRequestSourceList) == null ? void 0 : _c.splice(sourceIndex, 1));
|
|
22540
22485
|
}
|
|
22541
|
-
request(
|
|
22486
|
+
request(config) {
|
|
22542
22487
|
return new Promise((resolve, reject) => {
|
|
22543
22488
|
var _a, _b;
|
|
22544
|
-
if ((_a =
|
|
22545
|
-
|
|
22489
|
+
if ((_a = config.interceptors) == null ? void 0 : _a.requestInterceptors) {
|
|
22490
|
+
config = config.interceptors.requestInterceptors(config);
|
|
22546
22491
|
}
|
|
22547
|
-
const url2 =
|
|
22492
|
+
const url2 = config.url;
|
|
22548
22493
|
if (url2) {
|
|
22549
22494
|
(_b = this.requestUrlList) == null ? void 0 : _b.push(url2);
|
|
22550
|
-
|
|
22495
|
+
config.cancelToken = new axios$1.CancelToken((c2) => {
|
|
22551
22496
|
var _a2;
|
|
22552
22497
|
(_a2 = this.cancelRequestSourceList) == null ? void 0 : _a2.push({
|
|
22553
22498
|
[url2]: c2
|
|
22554
22499
|
});
|
|
22555
22500
|
});
|
|
22556
22501
|
}
|
|
22557
|
-
this.instance.request(
|
|
22502
|
+
this.instance.request(config).then((res) => {
|
|
22558
22503
|
var _a2;
|
|
22559
|
-
if ((_a2 =
|
|
22560
|
-
res =
|
|
22504
|
+
if ((_a2 = config.interceptors) == null ? void 0 : _a2.responseInterceptors) {
|
|
22505
|
+
res = config.interceptors.responseInterceptors(res);
|
|
22561
22506
|
}
|
|
22562
22507
|
resolve(res);
|
|
22563
22508
|
}).catch((err) => {
|
|
@@ -24324,21 +24269,21 @@ const request2 = new Request({
|
|
|
24324
24269
|
},
|
|
24325
24270
|
interceptors: {
|
|
24326
24271
|
// 请求拦截器
|
|
24327
|
-
requestInterceptors: (
|
|
24328
|
-
|
|
24329
|
-
if (
|
|
24330
|
-
|
|
24272
|
+
requestInterceptors: (config) => {
|
|
24273
|
+
config.headers.authorization = localStorage.getItem("token") ? "Bearer " + localStorage.getItem("token") : null;
|
|
24274
|
+
if (config.requestBase == "USER_BASE_URL") {
|
|
24275
|
+
config.baseURL = process.env.NODE_ENV == "development" ? "/user" : `${protocol}//basis.${hostname[1]}.${hostname[2]}`;
|
|
24331
24276
|
}
|
|
24332
|
-
if (
|
|
24333
|
-
|
|
24277
|
+
if (config.requestBase == "MRP2_BASE_URL") {
|
|
24278
|
+
config.baseURL = process.env.NODE_ENV == "development" ? "/mrp2" : `${protocol}//mrp2.${hostname[1]}.${hostname[2]}`;
|
|
24334
24279
|
}
|
|
24335
|
-
if (
|
|
24336
|
-
|
|
24280
|
+
if (config.requestBase == "ROOT_BASE_URL") {
|
|
24281
|
+
config.baseURL = process.env.NODE_ENV == "development" ? "/root" : `${protocol}//basis.${hostname[1]}.${hostname[2]}`;
|
|
24337
24282
|
}
|
|
24338
|
-
if (
|
|
24339
|
-
|
|
24283
|
+
if (config.requestBase == "GATEWAY_URL") {
|
|
24284
|
+
config.baseURL = process.env.NODE_ENV == "development" ? "/gateway" : `${protocol}//gateway.${hostname[1]}.${hostname[2]}`;
|
|
24340
24285
|
}
|
|
24341
|
-
return
|
|
24286
|
+
return config;
|
|
24342
24287
|
},
|
|
24343
24288
|
// 响应拦截器
|
|
24344
24289
|
responseInterceptors: (result) => {
|
|
@@ -24346,20 +24291,20 @@ const request2 = new Request({
|
|
|
24346
24291
|
}
|
|
24347
24292
|
}
|
|
24348
24293
|
});
|
|
24349
|
-
const cwRequest = (
|
|
24350
|
-
const { method: method4 = "GET" } =
|
|
24294
|
+
const cwRequest = (config) => {
|
|
24295
|
+
const { method: method4 = "GET" } = config;
|
|
24351
24296
|
if (method4 === "get" || method4 === "GET") {
|
|
24352
|
-
|
|
24297
|
+
config.paramsSerializer = (params) => {
|
|
24353
24298
|
return qs.stringify(params, { arrayFormat: "repeat" });
|
|
24354
24299
|
};
|
|
24355
|
-
for (const i2 in
|
|
24356
|
-
if (
|
|
24357
|
-
delete
|
|
24300
|
+
for (const i2 in config.data) {
|
|
24301
|
+
if (config.data[i2] === null || config.data[i2] === void 0) {
|
|
24302
|
+
delete config.data[i2];
|
|
24358
24303
|
}
|
|
24359
24304
|
}
|
|
24360
|
-
|
|
24305
|
+
config.params = config.data;
|
|
24361
24306
|
}
|
|
24362
|
-
return request2.request(
|
|
24307
|
+
return request2.request(config);
|
|
24363
24308
|
};
|
|
24364
24309
|
const getUserInfo = () => {
|
|
24365
24310
|
return cwRequest({
|
|
@@ -24505,28 +24450,23 @@ const _sfc_main$1 = {
|
|
|
24505
24450
|
menuTitle.value = props.menuTitle;
|
|
24506
24451
|
}
|
|
24507
24452
|
);
|
|
24508
|
-
watch(
|
|
24509
|
-
|
|
24510
|
-
|
|
24453
|
+
watch(
|
|
24454
|
+
() => props.module,
|
|
24455
|
+
() => {
|
|
24456
|
+
if (props.module) {
|
|
24457
|
+
getMenuList();
|
|
24458
|
+
}
|
|
24511
24459
|
}
|
|
24512
|
-
|
|
24460
|
+
);
|
|
24513
24461
|
const menuList = ref([]);
|
|
24514
24462
|
const getMenuList = async () => {
|
|
24515
24463
|
const { items } = await getPermissionSetOfBookMenuList(props.module);
|
|
24516
24464
|
menuList.value = items;
|
|
24517
24465
|
};
|
|
24518
24466
|
function toProjectPages(routerPush) {
|
|
24467
|
+
console.log("routerPush", routerPush);
|
|
24519
24468
|
ctx.emit("routerPush", routerPush);
|
|
24520
24469
|
}
|
|
24521
|
-
function isAdd(item) {
|
|
24522
|
-
const permissionList2 = localStorage.getItem("AccessData") ? JSON.parse(localStorage.getItem("AccessData")) : [];
|
|
24523
|
-
const selectModule2 = localStorage.getItem("selectModule") ? JSON.parse(localStorage.getItem("selectModule")) : null;
|
|
24524
|
-
if (permissionList2.length && selectModule2) {
|
|
24525
|
-
return hasPermission(item.moduleName, item.moduleN, item.moduleId, 1);
|
|
24526
|
-
} else {
|
|
24527
|
-
return true;
|
|
24528
|
-
}
|
|
24529
|
-
}
|
|
24530
24470
|
const ccflowShowData = ref({
|
|
24531
24471
|
menuNumsList: []
|
|
24532
24472
|
});
|
|
@@ -24541,13 +24481,13 @@ const _sfc_main$1 = {
|
|
|
24541
24481
|
toProjectPages,
|
|
24542
24482
|
menuTitle,
|
|
24543
24483
|
activeKey,
|
|
24544
|
-
isAdd,
|
|
24484
|
+
// isAdd,
|
|
24545
24485
|
ccflowShowData,
|
|
24546
24486
|
menuList
|
|
24547
24487
|
};
|
|
24548
24488
|
}
|
|
24549
24489
|
};
|
|
24550
|
-
const _withScopeId$1 = (n2) => (pushScopeId("data-v-
|
|
24490
|
+
const _withScopeId$1 = (n2) => (pushScopeId("data-v-26f2a376"), n2 = n2(), popScopeId(), n2);
|
|
24551
24491
|
const _hoisted_1$1 = {
|
|
24552
24492
|
key: 0,
|
|
24553
24493
|
class: "w-[80px] flex flex-col justify-center focusTC bb-f5f5f5 br-f5f5f5",
|
|
@@ -24668,7 +24608,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
24668
24608
|
}, 8, ["activeKey"])
|
|
24669
24609
|
]);
|
|
24670
24610
|
}
|
|
24671
|
-
const EconomicsSider = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
24611
|
+
const EconomicsSider = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-26f2a376"]]);
|
|
24672
24612
|
window.location.hostname.split(".");
|
|
24673
24613
|
function encryptionStr(data3) {
|
|
24674
24614
|
if (data3 === null || data3 === void 0) {
|
|
@@ -27979,6 +27919,7 @@ const _sfc_main = {
|
|
|
27979
27919
|
ifRemoveToken();
|
|
27980
27920
|
};
|
|
27981
27921
|
const ifRemoveToken = () => {
|
|
27922
|
+
console.log("关闭", props.isLogin);
|
|
27982
27923
|
if (props.isLogin) {
|
|
27983
27924
|
localStorage.removeItem("token");
|
|
27984
27925
|
}
|
|
@@ -28224,6 +28165,7 @@ const _sfc_main = {
|
|
|
28224
28165
|
data3.moduleVisible = true;
|
|
28225
28166
|
};
|
|
28226
28167
|
const routerPush = (url2) => {
|
|
28168
|
+
console.log("rout🚀🚀🚀erPushurl", url2);
|
|
28227
28169
|
ctx.emit("routerPush", url2);
|
|
28228
28170
|
};
|
|
28229
28171
|
const fileList = ref([]);
|
|
@@ -28339,7 +28281,7 @@ const _sfc_main = {
|
|
|
28339
28281
|
};
|
|
28340
28282
|
}
|
|
28341
28283
|
};
|
|
28342
|
-
const _withScopeId = (n2) => (pushScopeId("data-v-
|
|
28284
|
+
const _withScopeId = (n2) => (pushScopeId("data-v-cdd1838c"), n2 = n2(), popScopeId(), n2);
|
|
28343
28285
|
const _hoisted_1 = {
|
|
28344
28286
|
class: "bg-white defaultTS funcTC relative",
|
|
28345
28287
|
style: { "padding-bottom": "10px", "margin-bottom": "10px" }
|
|
@@ -29292,7 +29234,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
29292
29234
|
}, 8, ["show"])
|
|
29293
29235
|
], 64);
|
|
29294
29236
|
}
|
|
29295
|
-
const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
29237
|
+
const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-cdd1838c"]]);
|
|
29296
29238
|
const components = [TSider];
|
|
29297
29239
|
installComponents();
|
|
29298
29240
|
function installComponents() {
|