dfs-page-config 0.5.77 → 0.5.79
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/dist/dfs-page-config.js +89 -34
- package/dist/dfs-page-config.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/dfs-page-config.js
CHANGED
|
@@ -27295,11 +27295,11 @@ Store.prototype._withCommit = function Ff(kh) {
|
|
|
27295
27295
|
Object.defineProperties(Store.prototype, prototypeAccessors);
|
|
27296
27296
|
const elBadge = "", elMessage = "";
|
|
27297
27297
|
function errorHandle(Ff, kh, tAe) {
|
|
27298
|
-
var sAe, pAe;
|
|
27298
|
+
var sAe, pAe, hAe, AAe, vAe;
|
|
27299
27299
|
let oAe = ((sAe = Ff == null ? void 0 : Ff.data) == null ? void 0 : sAe.message) || ((pAe = Ff == null ? void 0 : Ff.data) == null ? void 0 : pAe.msg);
|
|
27300
27300
|
ElMessage({
|
|
27301
27301
|
type: "error",
|
|
27302
|
-
message: oAe,
|
|
27302
|
+
message: (((hAe = Ff == null ? void 0 : Ff.data) == null ? void 0 : hAe.status) || "") + " " + (oAe || ((AAe = Ff.data) == null ? void 0 : AAe.statusText) || ((vAe = Ff.data) == null ? void 0 : vAe.error) || ""),
|
|
27303
27303
|
duration: tAe || 2e3,
|
|
27304
27304
|
onClose: () => {
|
|
27305
27305
|
kh && kh();
|
|
@@ -27340,23 +27340,63 @@ service.interceptors.response.use(
|
|
|
27340
27340
|
return errorHandle(Ff), window.location.href = window.location.origin, Promise.reject(Ff.data.message);
|
|
27341
27341
|
if (Ff.data.code === 204)
|
|
27342
27342
|
return errorHandle(Ff.data.msg, () => window.location.href = "/"), Promise.reject(Ff);
|
|
27343
|
-
if (Ff.data
|
|
27344
|
-
|
|
27345
|
-
|
|
27346
|
-
|
|
27347
|
-
|
|
27348
|
-
|
|
27349
|
-
|
|
27350
|
-
|
|
27351
|
-
|
|
27352
|
-
|
|
27343
|
+
if (Object.prototype.toString.call(Ff.data) === "[object Blob]") {
|
|
27344
|
+
if (Ff.data.type === "application/json") {
|
|
27345
|
+
const kh = new FileReader();
|
|
27346
|
+
return kh.readAsText(Ff.data, "utf-8"), new Promise((tAe, oAe) => {
|
|
27347
|
+
kh.onload = function() {
|
|
27348
|
+
try {
|
|
27349
|
+
const sAe = JSON.parse(kh.result);
|
|
27350
|
+
tAe(sAe);
|
|
27351
|
+
} catch (sAe) {
|
|
27352
|
+
oAe(sAe);
|
|
27353
|
+
}
|
|
27354
|
+
};
|
|
27355
|
+
});
|
|
27353
27356
|
}
|
|
27354
|
-
return
|
|
27355
|
-
} else
|
|
27356
|
-
|
|
27357
|
+
return Ff.data;
|
|
27358
|
+
} else {
|
|
27359
|
+
if (Ff.data.code !== 0)
|
|
27360
|
+
return errorHandle(Ff), Promise.reject(Ff.data);
|
|
27361
|
+
if (Object.prototype.toString.call(Ff.data.data).toLowerCase() == "[object object]")
|
|
27362
|
+
return Ff.data.data;
|
|
27363
|
+
if (typeof Ff.data.data == "string" && Ff.data.data != "") {
|
|
27364
|
+
let kh = {};
|
|
27365
|
+
try {
|
|
27366
|
+
kh = JSON.parse(Ff.data.data);
|
|
27367
|
+
} catch {
|
|
27368
|
+
kh = Ff.data.data;
|
|
27369
|
+
}
|
|
27370
|
+
return kh;
|
|
27371
|
+
} else
|
|
27372
|
+
return Ff.data.data;
|
|
27373
|
+
}
|
|
27357
27374
|
}
|
|
27358
27375
|
},
|
|
27359
|
-
(Ff) =>
|
|
27376
|
+
(Ff) => {
|
|
27377
|
+
if (Object.prototype.toString.call(Ff.response.data) === "[object Blob]") {
|
|
27378
|
+
const kh = new FileReader();
|
|
27379
|
+
return kh.readAsText(Ff.response.data, "utf-8"), new Promise((tAe, oAe) => {
|
|
27380
|
+
kh.onload = function() {
|
|
27381
|
+
try {
|
|
27382
|
+
if (Ff.response.data.type === "application/json") {
|
|
27383
|
+
const sAe = JSON.parse(kh.result);
|
|
27384
|
+
errorHandle({ data: sAe }), oAe({ data: sAe });
|
|
27385
|
+
} else if (Ff.response.data.type === "text/html" && typeof kh.result == "string") {
|
|
27386
|
+
const sAe = kh.result.match(/<body[^>]*>([\s\S]*?)<\/body>/i);
|
|
27387
|
+
if (sAe && sAe[1]) {
|
|
27388
|
+
const pAe = sAe[1].replace(/<[^>]+>/g, "").replace(/\s+/g, " ").trim();
|
|
27389
|
+
errorHandle({ data: { msg: pAe } }), oAe({ data: { msg: pAe } });
|
|
27390
|
+
}
|
|
27391
|
+
}
|
|
27392
|
+
} catch (sAe) {
|
|
27393
|
+
oAe(sAe);
|
|
27394
|
+
}
|
|
27395
|
+
};
|
|
27396
|
+
});
|
|
27397
|
+
} else
|
|
27398
|
+
return errorHandle(Ff.response), Promise.reject(Ff);
|
|
27399
|
+
}
|
|
27360
27400
|
);
|
|
27361
27401
|
const initPage = (Ff, kh) => {
|
|
27362
27402
|
kh.dispatch("_INIT_PAGE", {
|
|
@@ -52660,7 +52700,23 @@ const __unplugin_components_2$3 = { name: "ep-download", render: render$5 }, _ho
|
|
|
52660
52700
|
function render$4(Ff, kh) {
|
|
52661
52701
|
return openBlock(), createElementBlock("svg", _hoisted_1$k, _hoisted_3$b);
|
|
52662
52702
|
}
|
|
52663
|
-
const __unplugin_components_2$2 = { name: "ep-upload", render: render$4 },
|
|
52703
|
+
const __unplugin_components_2$2 = { name: "ep-upload", render: render$4 }, httpRequest = (Ff, kh) => {
|
|
52704
|
+
const tAe = new FormData();
|
|
52705
|
+
tAe.append("file", Ff.file), service({
|
|
52706
|
+
url: kh,
|
|
52707
|
+
method: "POST",
|
|
52708
|
+
data: tAe,
|
|
52709
|
+
responseType: "blob"
|
|
52710
|
+
}).then((oAe) => {
|
|
52711
|
+
if (Object.prototype.toString.call(oAe) === "[object Blob]") {
|
|
52712
|
+
const sAe = new Blob([oAe], { type: "application/xlsx" }), pAe = window.URL.createObjectURL(sAe), hAe = document.createElement("a");
|
|
52713
|
+
hAe.href = pAe, hAe.download = Ff.file.name + "失败原因.xlsx" || "下载文件", document.body.appendChild(hAe), hAe.click(), document.body.removeChild(hAe), window.URL.revokeObjectURL(pAe), store.commit("setLoading", !1), ElMessage.error("上传失败"), Ff.onError("上传失败");
|
|
52714
|
+
} else
|
|
52715
|
+
oAe.code == 0 ? Ff.onSuccess(oAe) : (ElMessage.error(oAe.msg), Ff.onError(oAe));
|
|
52716
|
+
}).catch((oAe) => {
|
|
52717
|
+
Ff.onError(oAe);
|
|
52718
|
+
});
|
|
52719
|
+
}, _sfc_main$j = defineComponent({
|
|
52664
52720
|
name: "Upload",
|
|
52665
52721
|
props: {
|
|
52666
52722
|
url: String,
|
|
@@ -52703,11 +52759,7 @@ const __unplugin_components_2$2 = { name: "ep-upload", render: render$4 }, _sfc_
|
|
|
52703
52759
|
},
|
|
52704
52760
|
emits: ["onSuccess", "onError"],
|
|
52705
52761
|
setup(Ff, kh) {
|
|
52706
|
-
const { t: tAe } = getCurrentInstance().appContext.config.globalProperties.useI18n(), oAe = useStore(), sAe = ref(), pAe =
|
|
52707
|
-
uploadUrl: computed$1(
|
|
52708
|
-
() => handleProxy(oAe.state._BASE_URL + Ff.url)
|
|
52709
|
-
)
|
|
52710
|
-
}), hAe = ref(!1), AAe = getRequestHeaders(pAe.uploadUrl);
|
|
52762
|
+
const { t: tAe } = getCurrentInstance().appContext.config.globalProperties.useI18n(), oAe = useStore(), sAe = ref(), pAe = computed$1(() => handleProxy(oAe.state._BASE_URL + Ff.url)), hAe = ref(!1), AAe = getRequestHeaders(pAe.value);
|
|
52711
52763
|
async function vAe() {
|
|
52712
52764
|
if (Ff.disabled)
|
|
52713
52765
|
return;
|
|
@@ -52723,18 +52775,18 @@ const __unplugin_components_2$2 = { name: "ep-upload", render: render$4 }, _sfc_
|
|
|
52723
52775
|
_Ae.code == 0 ? (ElMessage.success(_Ae.msg || tAe("上传成功")), kh.emit("onSuccess", _Ae)) : (ElMessage.error(_Ae.msg), kh.emit("onError", _Ae)), hAe.value = !1, oAe.commit("setLoading", !1);
|
|
52724
52776
|
}
|
|
52725
52777
|
function EAe(_Ae) {
|
|
52726
|
-
|
|
52727
|
-
PAe && ElMessage.error(PAe[1]), hAe.value = !1, oAe.commit("setLoading", !1), kh.emit("onError", _Ae);
|
|
52778
|
+
hAe.value = !1, oAe.commit("setLoading", !1), kh.emit("onError", _Ae);
|
|
52728
52779
|
}
|
|
52729
52780
|
return {
|
|
52730
|
-
|
|
52781
|
+
uploadUrl: pAe,
|
|
52731
52782
|
uploadButtonRef: sAe,
|
|
52732
52783
|
headers: AAe,
|
|
52733
52784
|
uploading: hAe,
|
|
52734
52785
|
validate: vAe,
|
|
52735
52786
|
beforeUpload: CAe,
|
|
52736
52787
|
uploadSuccess: wAe,
|
|
52737
|
-
uploadError: EAe
|
|
52788
|
+
uploadError: EAe,
|
|
52789
|
+
httpRequest
|
|
52738
52790
|
};
|
|
52739
52791
|
}
|
|
52740
52792
|
});
|
|
@@ -52743,7 +52795,7 @@ function _sfc_render$h(Ff, kh, tAe, oAe, sAe, pAe) {
|
|
|
52743
52795
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
52744
52796
|
createVNode(AAe, {
|
|
52745
52797
|
style: { display: "inline-flex" },
|
|
52746
|
-
|
|
52798
|
+
"http-request": (wAe) => Ff.httpRequest(wAe, Ff.uploadUrl),
|
|
52747
52799
|
accept: Ff.accept,
|
|
52748
52800
|
"with-credentials": !0,
|
|
52749
52801
|
multiple: "",
|
|
@@ -52770,7 +52822,7 @@ function _sfc_render$h(Ff, kh, tAe, oAe, sAe, pAe) {
|
|
|
52770
52822
|
}, 8, ["size", "type", "loading"])
|
|
52771
52823
|
]),
|
|
52772
52824
|
_: 1
|
|
52773
|
-
}, 8, ["
|
|
52825
|
+
}, 8, ["http-request", "accept", "before-upload", "on-success", "on-error", "disabled", "headers", "data"]),
|
|
52774
52826
|
Ff.type === "text" ? (openBlock(), createElementBlock("span", {
|
|
52775
52827
|
key: 0,
|
|
52776
52828
|
class: normalizeClass(["dfs-text-btn", { disabled: Ff.disabled }]),
|
|
@@ -52908,12 +52960,14 @@ const Upload = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_rende
|
|
|
52908
52960
|
}
|
|
52909
52961
|
if (OAe.openDownloadCenter) {
|
|
52910
52962
|
let IAe = (OAe.method || "post").toUpperCase(), LAe = IAe == "GET" ? "params" : "data";
|
|
52911
|
-
service({
|
|
52963
|
+
store.commit("setLoading", !0), service({
|
|
52912
52964
|
url: store.state._BASE_URL + OAe.url,
|
|
52913
52965
|
[LAe]: { taskParam: FAe },
|
|
52914
52966
|
method: IAe
|
|
52915
52967
|
}).then((jAe) => {
|
|
52916
|
-
store.commit("setUploadDownloadDialogVisible", !0);
|
|
52968
|
+
store.commit("setUploadDownloadDialogVisible", !0), ElMessage.success(kh("导出成功,请稍后在下载中心查看"));
|
|
52969
|
+
}).finally(() => {
|
|
52970
|
+
store.commit("setLoading", !1);
|
|
52917
52971
|
});
|
|
52918
52972
|
} else {
|
|
52919
52973
|
const IAe = {
|
|
@@ -52966,7 +53020,7 @@ const Upload = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["render", _sfc_rende
|
|
|
52966
53020
|
// exportData
|
|
52967
53021
|
};
|
|
52968
53022
|
}
|
|
52969
|
-
}),
|
|
53023
|
+
}), ButtonGroup_vue_vue_type_style_index_0_scoped_8b2b85de_lang = "", ButtonGroup_vue_vue_type_style_index_1_lang = "", _hoisted_1$j = ["onClick"];
|
|
52970
53024
|
function _sfc_render$g(Ff, kh, tAe, oAe, sAe, pAe) {
|
|
52971
53025
|
const hAe = Upload, AAe = ElIcon, vAe = __unplugin_components_2$3, CAe = ElButton;
|
|
52972
53026
|
return openBlock(), createElementBlock("div", {
|
|
@@ -53028,7 +53082,7 @@ function _sfc_render$g(Ff, kh, tAe, oAe, sAe, pAe) {
|
|
|
53028
53082
|
renderSlot(Ff.$slots, "default", {}, void 0, !0)
|
|
53029
53083
|
], 4);
|
|
53030
53084
|
}
|
|
53031
|
-
const ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["render", _sfc_render$g], ["__scopeId", "data-v-
|
|
53085
|
+
const ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["render", _sfc_render$g], ["__scopeId", "data-v-8b2b85de"]]), _sfc_main$h = defineComponent({
|
|
53032
53086
|
props: {
|
|
53033
53087
|
gridApi: {
|
|
53034
53088
|
type: Object,
|
|
@@ -129185,7 +129239,7 @@ const _sfc_main = defineComponent({
|
|
|
129185
129239
|
stopPolling: sAe
|
|
129186
129240
|
};
|
|
129187
129241
|
}
|
|
129188
|
-
}),
|
|
129242
|
+
}), UploadDownloadCenter_vue_vue_type_style_index_0_scoped_2de6e482_lang = "", _withScopeId = (Ff) => (pushScopeId("data-v-2de6e482"), Ff = Ff(), popScopeId(), Ff), _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("p", { class: "drag-button-text" }, "上传\\下载", -1)), _hoisted_2 = [
|
|
129189
129243
|
_hoisted_1
|
|
129190
129244
|
], _hoisted_3 = { style: { height: "76vh" } };
|
|
129191
129245
|
function _sfc_render(Ff, kh, tAe, oAe, sAe, pAe) {
|
|
@@ -129205,6 +129259,7 @@ function _sfc_render(Ff, kh, tAe, oAe, sAe, pAe) {
|
|
|
129205
129259
|
modelValue: Ff.dialogVisible,
|
|
129206
129260
|
"onUpdate:modelValue": kh[1] || (kh[1] = (vAe) => Ff.dialogVisible = vAe),
|
|
129207
129261
|
width: "80%",
|
|
129262
|
+
"max-width": "1200px",
|
|
129208
129263
|
"destroy-on-close": !0,
|
|
129209
129264
|
top: "8vh",
|
|
129210
129265
|
center: "",
|
|
@@ -129220,7 +129275,7 @@ function _sfc_render(Ff, kh, tAe, oAe, sAe, pAe) {
|
|
|
129220
129275
|
}, 8, ["modelValue", "onOpen", "onClose"])
|
|
129221
129276
|
], 64);
|
|
129222
129277
|
}
|
|
129223
|
-
const UploadDownloadCenter = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
129278
|
+
const UploadDownloadCenter = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2de6e482"]]);
|
|
129224
129279
|
UploadDownloadCenter.install = (Ff) => Ff.component(UploadDownloadCenter.name, UploadDownloadCenter);
|
|
129225
129280
|
let timer = null, staticResourceMonitor = 2e3, apiRequestThreshold = 3e3;
|
|
129226
129281
|
const userInfo = JSON.parse(localStorage.getItem("userInfo") || "{}"), username = userInfo.name || userInfo.displayName || "", PERFORMANCE_SERVER_URL = "https://performance-monitor.prod.doublefs.com/api/performance";
|