@moluoxixi/ajax-package 0.0.51 → 0.0.53
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/es/SystemErrorDialog.d.ts +8 -0
- package/es/index.mjs +13 -7
- package/package.json +1 -1
|
@@ -47,6 +47,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
47
47
|
type: BooleanConstructor;
|
|
48
48
|
default: boolean;
|
|
49
49
|
};
|
|
50
|
+
baseApi: {
|
|
51
|
+
type: ObjectConstructor;
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
50
54
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
51
55
|
[key: string]: any;
|
|
52
56
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -103,6 +107,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
103
107
|
type: BooleanConstructor;
|
|
104
108
|
default: boolean;
|
|
105
109
|
};
|
|
110
|
+
baseApi: {
|
|
111
|
+
type: ObjectConstructor;
|
|
112
|
+
required: true;
|
|
113
|
+
};
|
|
106
114
|
}>> & Readonly<{
|
|
107
115
|
onClose?: (() => any) | undefined;
|
|
108
116
|
onConfirm?: ((data: any) => any) | undefined;
|
package/es/index.mjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document !== "undefined") {
|
|
5
|
-
if (!document.getElementById("
|
|
5
|
+
if (!document.getElementById("0166050c-669a-4845-8c7b-200d305364ca")) {
|
|
6
6
|
var elementStyle = document.createElement("style");
|
|
7
|
-
elementStyle.id = "
|
|
7
|
+
elementStyle.id = "0166050c-669a-4845-8c7b-200d305364ca";
|
|
8
8
|
elementStyle.appendChild(document.createTextNode("._root_11p33_1 .el-dialog__header {\n padding: 0 12px 12px;\n}\n\n._root_11p33_1 .el-dialog__body {\n border-top: 1px solid #e5e7eb;\n border-bottom: 1px solid #e5e7eb;\n padding: 0 12px;\n}\n\n._root_11p33_1 .el-dialog__footer {\n padding: 0 12px;\n}"));
|
|
9
9
|
document.head.appendChild(elementStyle);
|
|
10
10
|
}
|
|
@@ -7535,7 +7535,6 @@ const _BaseHttpClient = class _BaseHttpClient {
|
|
|
7535
7535
|
this.containerId = `ajaxPackage-container-${targetElementId}`;
|
|
7536
7536
|
this.popoverContainerId = `ajaxPackage-popover-${targetElementId}`;
|
|
7537
7537
|
this.messageContainerId = `ajaxPackage-message-${targetElementId}`;
|
|
7538
|
-
/* @__PURE__ */ console.log("333333333333333333333", this.messageContainerId);
|
|
7539
7538
|
}
|
|
7540
7539
|
let container = document.getElementById(this.containerId);
|
|
7541
7540
|
if (!container) {
|
|
@@ -8033,6 +8032,7 @@ const _BaseApi = class _BaseApi extends BaseHttpClient {
|
|
|
8033
8032
|
props: {
|
|
8034
8033
|
title: "系统异常信息",
|
|
8035
8034
|
width: 600,
|
|
8035
|
+
baseApi: this,
|
|
8036
8036
|
...errorInfoData
|
|
8037
8037
|
}
|
|
8038
8038
|
}).then((result) => {
|
|
@@ -8489,6 +8489,10 @@ const SystemErrorDialog = defineComponent({
|
|
|
8489
8489
|
modelValue: {
|
|
8490
8490
|
type: Boolean,
|
|
8491
8491
|
default: false
|
|
8492
|
+
},
|
|
8493
|
+
baseApi: {
|
|
8494
|
+
type: Object,
|
|
8495
|
+
required: true
|
|
8492
8496
|
}
|
|
8493
8497
|
},
|
|
8494
8498
|
emits: {
|
|
@@ -8525,7 +8529,7 @@ const SystemErrorDialog = defineComponent({
|
|
|
8525
8529
|
{ label: "请求URL路径", value: props.requestUrl },
|
|
8526
8530
|
{ label: "链路ID", value: props.traceId }
|
|
8527
8531
|
]);
|
|
8528
|
-
const
|
|
8532
|
+
const baseApiObj = new BaseApi({
|
|
8529
8533
|
baseURL: "/ompBase",
|
|
8530
8534
|
responseFields: {
|
|
8531
8535
|
code: "statusCode",
|
|
@@ -8534,6 +8538,7 @@ const SystemErrorDialog = defineComponent({
|
|
|
8534
8538
|
},
|
|
8535
8539
|
enableSystemErrorDialog: false
|
|
8536
8540
|
});
|
|
8541
|
+
const { baseApi } = props;
|
|
8537
8542
|
function handleClose() {
|
|
8538
8543
|
emit("close");
|
|
8539
8544
|
emit("update:modelValue", false);
|
|
@@ -8549,7 +8554,7 @@ const SystemErrorDialog = defineComponent({
|
|
|
8549
8554
|
function getAjaxPackagePopoverContainer() {
|
|
8550
8555
|
if (typeof document === "undefined")
|
|
8551
8556
|
return null;
|
|
8552
|
-
return document.getElementById(
|
|
8557
|
+
return (baseApi == null ? void 0 : baseApi.popoverContainerId) ? document.getElementById(baseApi == null ? void 0 : baseApi.popoverContainerId) : null;
|
|
8553
8558
|
}
|
|
8554
8559
|
function showMessage(options) {
|
|
8555
8560
|
const container = getAjaxPackageMessageContainer();
|
|
@@ -8559,7 +8564,7 @@ const SystemErrorDialog = defineComponent({
|
|
|
8559
8564
|
ElMessage(finalOptions);
|
|
8560
8565
|
}
|
|
8561
8566
|
async function handleReport() {
|
|
8562
|
-
await
|
|
8567
|
+
await baseApiObj.post("/upgGlobalExceptionReports", {
|
|
8563
8568
|
username: userInfo.value.userName,
|
|
8564
8569
|
userId: userInfo.value.userId,
|
|
8565
8570
|
workDeptName: userInfo.value.deptName,
|
|
@@ -8613,7 +8618,7 @@ const SystemErrorDialog = defineComponent({
|
|
|
8613
8618
|
return typeof props.width === "number" ? `${props.width}px` : props.width;
|
|
8614
8619
|
});
|
|
8615
8620
|
return () => {
|
|
8616
|
-
getAjaxPackagePopoverContainer();
|
|
8621
|
+
const popoverContainer = getAjaxPackagePopoverContainer();
|
|
8617
8622
|
return h(
|
|
8618
8623
|
ElDialog,
|
|
8619
8624
|
{
|
|
@@ -8624,6 +8629,7 @@ const SystemErrorDialog = defineComponent({
|
|
|
8624
8629
|
"closeOnClickModal": false,
|
|
8625
8630
|
"closeOnPressEscape": false,
|
|
8626
8631
|
"style": { padding: "16px 0" },
|
|
8632
|
+
"appendTo": popoverContainer || void 0,
|
|
8627
8633
|
"onUpdate:modelValue": handleModelValueChange
|
|
8628
8634
|
},
|
|
8629
8635
|
{
|