dfs-page-config 0.4.99 → 0.5.0
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 +34 -30
- package/dist/dfs-page-config.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/dfs-page-config.js
CHANGED
|
@@ -27145,6 +27145,7 @@ function getRelationComp(k, L, ie) {
|
|
|
27145
27145
|
}
|
|
27146
27146
|
let obj = {};
|
|
27147
27147
|
function getSelectOption(k, L, ie) {
|
|
27148
|
+
var xe;
|
|
27148
27149
|
let ae = {};
|
|
27149
27150
|
L.relation && (ae = getRelationComp(k, ie, L.relation));
|
|
27150
27151
|
const pe = typeof L.params == "function" ? L.params(ae) : L.params, _e = L.url + (L.dataKey ? "-" + L.dataKey : "") + (pe ? "-" + JSON.stringify(pe) : "");
|
|
@@ -27156,18 +27157,19 @@ function getSelectOption(k, L, ie) {
|
|
|
27156
27157
|
return;
|
|
27157
27158
|
} else
|
|
27158
27159
|
L.params || (obj[L.url] = [L]);
|
|
27159
|
-
|
|
27160
|
-
|
|
27161
|
-
|
|
27162
|
-
|
|
27163
|
-
|
|
27164
|
-
|
|
27165
|
-
|
|
27166
|
-
|
|
27167
|
-
|
|
27168
|
-
|
|
27169
|
-
|
|
27170
|
-
|
|
27160
|
+
const Oe = ((xe = L.method) == null ? void 0 : xe.toUpperCase()) || "GET";
|
|
27161
|
+
let Ie = Oe == "GET" ? "params" : "data", Ne = L.baseUrl || k.state._BASE_URL;
|
|
27162
|
+
L.service === "c2" && (Ne = Ne.replace("c1", "c2")), service({
|
|
27163
|
+
url: Ne + L.url,
|
|
27164
|
+
[Ie]: pe || {},
|
|
27165
|
+
method: Oe
|
|
27166
|
+
}).then((ze) => {
|
|
27167
|
+
const Et = ze[L.dataKey] || ze.items || ze;
|
|
27168
|
+
k.state[_e] = Et;
|
|
27169
|
+
const qe = obj[L.url];
|
|
27170
|
+
qe ? (qe.forEach((Dt) => {
|
|
27171
|
+
Dt.options = ze[Dt.dataKey] || Et;
|
|
27172
|
+
}), delete obj[L.url]) : L.options = Et;
|
|
27171
27173
|
});
|
|
27172
27174
|
}
|
|
27173
27175
|
}
|
|
@@ -27262,6 +27264,7 @@ const store = createStore$1({
|
|
|
27262
27264
|
},
|
|
27263
27265
|
// 查询列表查询
|
|
27264
27266
|
_TABLE_QUERY(k, { tableComp: L, pageKey: ie, row: ae, partialUpdate: pe }) {
|
|
27267
|
+
var Et;
|
|
27265
27268
|
let _e = {}, xe = {};
|
|
27266
27269
|
if (L.dependencies && (xe = getTargetComp(k, ie, L.dependencies), _e = getFormData(xe)), L.previousFormData = { ...L.formData }, L.formData = _e, L.searchBefore && L.searchBefore(L, ae) === !1)
|
|
27267
27270
|
return;
|
|
@@ -27270,23 +27273,24 @@ const store = createStore$1({
|
|
|
27270
27273
|
let Ie = handleParams(L);
|
|
27271
27274
|
if (pe) {
|
|
27272
27275
|
Ie = { ...Ie };
|
|
27273
|
-
const
|
|
27274
|
-
Ie[pe.searchKey] =
|
|
27276
|
+
const qe = L.selectedRows.map((Dt) => Dt[pe.searchKey]);
|
|
27277
|
+
Ie[pe.searchKey] = qe.toString();
|
|
27275
27278
|
}
|
|
27276
|
-
|
|
27279
|
+
const Ne = ((Et = L.method) == null ? void 0 : Et.toUpperCase()) || "POST";
|
|
27280
|
+
let ze = Ne == "GET" ? "params" : "data";
|
|
27277
27281
|
k.commit("setLoading", !0), service({
|
|
27278
27282
|
url: k.state._BASE_URL + L.url,
|
|
27279
|
-
[
|
|
27280
|
-
method:
|
|
27281
|
-
}).then((
|
|
27282
|
-
var
|
|
27283
|
-
const
|
|
27284
|
-
L.searchAfter && L.searchAfter(
|
|
27285
|
-
for (let
|
|
27286
|
-
const
|
|
27287
|
-
|
|
27288
|
-
}
|
|
27289
|
-
}) : k.commit("updateRowData", { tableComp: L, res:
|
|
27283
|
+
[ze]: Ie || {},
|
|
27284
|
+
method: Ne
|
|
27285
|
+
}).then((qe) => {
|
|
27286
|
+
var Ue;
|
|
27287
|
+
const Dt = filterRes(qe, L);
|
|
27288
|
+
L.searchAfter && L.searchAfter(Dt, qe, L) === !1 || (pe ? (Ue = L.selectedNodes) == null || Ue.forEach((kt) => {
|
|
27289
|
+
for (let jt = 0; jt < Dt.result.length; jt++) {
|
|
27290
|
+
const tr = Dt.result[jt];
|
|
27291
|
+
kt.data[pe.dataKey] == tr[pe.dataKey] && kt.setData(tr);
|
|
27292
|
+
}
|
|
27293
|
+
}) : k.commit("updateRowData", { tableComp: L, res: Dt }));
|
|
27290
27294
|
}).finally(() => {
|
|
27291
27295
|
k.commit("setLoading", !1);
|
|
27292
27296
|
});
|
|
@@ -27418,7 +27422,7 @@ const padding = (k, L) => (new Array(L).join("0") + k).slice(-L), formatDate = (
|
|
|
27418
27422
|
}, downLoadData = (k) => {
|
|
27419
27423
|
const { url: L, fileName: ie, params: ae, store: pe } = k;
|
|
27420
27424
|
pe.commit("setLoading", !0), axios.defaults.withCredentials = !0, axios.defaults.timeout = 6e4, axios.defaults.responseType = "blob", axios.defaults.headers = getRequestHeaders(L);
|
|
27421
|
-
let _e = k.method || "post";
|
|
27425
|
+
let _e = (k.method || "post").toLowerCase();
|
|
27422
27426
|
axios[_e](handleProxy(L), ae).then(function(xe) {
|
|
27423
27427
|
var ze;
|
|
27424
27428
|
const Oe = (ze = xe.headers["content-disposition"]) == null ? void 0 : ze.split("filename=")[1], Ie = URL.createObjectURL(xe.data);
|
|
@@ -28858,7 +28862,7 @@ const _sfc_main$l = defineComponent({
|
|
|
28858
28862
|
}, tr = (wr, hr) => {
|
|
28859
28863
|
wr.code ? ElMessage.error(ae("上传失败")) : (wr.data.url = wr.data.cnUrl, wr.data.name = wr.data.fileName = hr.raw.name, Dt.value.push(wr.data), L.emit("fileUrlInfo", Dt.value), ElMessage.success(ae("上传成功"))), ie.commit("setLoading", !1);
|
|
28860
28864
|
}, nr = (wr) => {
|
|
28861
|
-
wr.type.includes("image") ? Ie.value = k.fileUrl || ie.state._BASE_URL + "/media-service/dfsGoodsCenterCn/image/upload" : Ie.value = k.fileUrl || ie.state._BASE_URL + "/media-service/dfsGoodsCenterCn/file/upload", Ne.value = getRequestHeaders(Ie.value)
|
|
28865
|
+
wr.type.includes("image") ? Ie.value = k.fileUrl || ie.state._BASE_URL + "/media-service/dfsGoodsCenterCn/image/upload" : Ie.value = k.fileUrl || ie.state._BASE_URL + "/media-service/dfsGoodsCenterCn/file/upload", Ne.value = getRequestHeaders(Ie.value);
|
|
28862
28866
|
const hr = _e.value.includes(wr.type), Ar = wr.size / 1024 / 1024 < xe.value;
|
|
28863
28867
|
return hr ? Ar ? !0 : (ElMessage.error(`${ae("上传图片大小不能超过")} ${xe.value}MB!`), !1) : (ElMessage.error(ae("上传图片格式错误") + "!"), !1);
|
|
28864
28868
|
}, er = () => {
|
|
@@ -28895,7 +28899,7 @@ const _sfc_main$l = defineComponent({
|
|
|
28895
28899
|
handleChange: lr
|
|
28896
28900
|
};
|
|
28897
28901
|
}
|
|
28898
|
-
}),
|
|
28902
|
+
}), UploadComp_vue_vue_type_style_index_0_scoped_9c9f75fc_lang = "", UploadComp_vue_vue_type_style_index_1_lang = "", _export_sfc = (k, L) => {
|
|
28899
28903
|
const ie = k.__vccOpts || k;
|
|
28900
28904
|
for (const [ae, pe] of L)
|
|
28901
28905
|
ie[ae] = pe;
|
|
@@ -28972,7 +28976,7 @@ function _sfc_render$k(k, L, ie, ae, pe, _e) {
|
|
|
28972
28976
|
}, null, 8, ["modelValue", "title"])
|
|
28973
28977
|
], 64);
|
|
28974
28978
|
}
|
|
28975
|
-
const UploadComp = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-
|
|
28979
|
+
const UploadComp = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-9c9f75fc"]]), elSwitch = "", elTimeSelect = "", elScrollbar = "", elPopper = "", elInput = "", elTag = "", elOption = "", elOptionGroup = "", elSelect = "", elDatePicker = "", elCheckboxGroup = "", elCheckbox = "", elRadioButton = "", elRadioGroup = "", elRadio = "", elCascader = "", elCascaderPanel = "", elInputNumber = "", _sfc_main$k = defineComponent({
|
|
28976
28980
|
props: {
|
|
28977
28981
|
option: Object,
|
|
28978
28982
|
formComp: Object,
|