slw 0.10.2 → 0.10.4
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.
|
@@ -44458,7 +44458,7 @@ var js = js$1.exports;
|
|
|
44458
44458
|
})(H);
|
|
44459
44459
|
})(js$1);
|
|
44460
44460
|
var jsExports = js$1.exports;
|
|
44461
|
-
const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports),
|
|
44461
|
+
const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_24f25ab8_lang = "", _withScopeId$7 = (H) => (pushScopeId("data-v-24f25ab8"), H = H(), popScopeId(), H), _hoisted_1$l0 = { class: "slw-window-form" }, _hoisted_2$kX = {
|
|
44462
44462
|
key: 0,
|
|
44463
44463
|
class: "form-title"
|
|
44464
44464
|
}, _hoisted_3$hX = ["onClick"], _hoisted_4$ax = ["onClick"], _hoisted_5$4X = ["onClick"], _hoisted_6$20 = ["onClick"], _hoisted_7$13 = ["onClick"], _sfc_main$c = {
|
|
@@ -44476,7 +44476,7 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
|
|
|
44476
44476
|
setup(__props, { expose: __expose, emit: emits }) {
|
|
44477
44477
|
const props = __props, axios = inject("$axios"), hiprint = inject("$hiprint"), serverPrint = inject("$serverPrint"), showPreView = inject("$showPreView"), showPreViewClose = inject("$showPreViewClose"), preViewCloseCallback = inject("$preViewCloseCallback"), $Modal = inject("$modal"), $qs = inject("$qs"), $ElMessage = inject("$ElMessage"), $vxeMessage = inject("$vxeMessage"), base64Encode = inject("$base64Encode"), base64Decode = inject("$base64Decode"), $vxeConfirm = inject("$vxeConfirm"), $T = inject("$t"), openModal = inject("$openModal"), closeModal = inject("$closeModal"), focusInput = inject("$focusInput"), evalDefaultValue = inject("$evalDefaultValue");
|
|
44478
44478
|
let regionMap = inject("$regionMap");
|
|
44479
|
-
const ElMessageBox = inject("$ElMessageBox"), addOnActivatedFun = inject("$addOnActivatedFun"), debounce = inject("$debounce"), router = inject("$router"), $externalFun = inject("$externalFun"), route = useRoute(), $components = inject("$components"), $componentsPath = inject("$componentsPath"), executeFun = inject("$executeFun");
|
|
44479
|
+
const ElMessageBox = inject("$ElMessageBox"), addOnActivatedFun = inject("$addOnActivatedFun"), debounce = inject("$debounce"), router = inject("$router"), $externalFun = inject("$externalFun"), route = useRoute(), $components = inject("$components"), $componentsPath = inject("$componentsPath"), executeFun = inject("$executeFun"), $VXETableConfig = inject("$VXETableConfig");
|
|
44480
44480
|
let formConfig = useVModel$1(props, "formConfig", emits), gridData = ref(formConfig.value), formData = ref({}), fieldColumnMap = ref({}), formDataClone = ref({}), formLoading = ref(!1), queryTimeout = ref(null);
|
|
44481
44481
|
const $modal = $Modal;
|
|
44482
44482
|
let uploadConfig = ref({
|
|
@@ -44644,7 +44644,7 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
|
|
|
44644
44644
|
formConfig.value.openType === "view" && ((Q = G.itemRender) == null ? void 0 : Q.name) == "ElInput" && (G.itemRender.props.readonly = !0), G.dataType === "EDITOR" ? formData.value[G.field] == null ? formData.value[G.field] = "" : G.language == "javascript" && (formData.value[G.field] = jsExports.js_beautify(
|
|
44645
44645
|
formData.value[G.field],
|
|
44646
44646
|
codeBeautifyConfig
|
|
44647
|
-
)) : ((Z = G.itemRender) == null ? void 0 : Z.name) == "ElSelect" && G.itemRender.props.multiple ? formData.value[G.field] = (X = formData.value[G.field]) == null ? void 0 : X.split(",") : (G.dataType === "FILE" || G.dataType === "IMG") && (formData.value[G.field] = []);
|
|
44647
|
+
)) : ((Z = G.itemRender) == null ? void 0 : Z.name) == "ElSelect" && G.itemRender.props.multiple ? formData.value[G.field] = formData.value[G.field] == "" ? [] : (X = formData.value[G.field]) == null ? void 0 : X.split(",") : (G.dataType === "FILE" || G.dataType === "IMG") && (formData.value[G.field] = []);
|
|
44648
44648
|
} else
|
|
44649
44649
|
for (const G of formConfig.value.columns)
|
|
44650
44650
|
G.type !== "seq" && G.type !== "checkbox" ? formData.value[G.field] = "" : (G.dataType === "FILE" || G.dataType === "IMG") && (formData.value[G.field] = []);
|
|
@@ -44705,42 +44705,44 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
|
|
|
44705
44705
|
...assembleParentData()
|
|
44706
44706
|
}), form = ref(), submitData = (H) => {
|
|
44707
44707
|
form.value.validate(async (Q) => {
|
|
44708
|
+
var Z;
|
|
44708
44709
|
if (typeof Q > "u") {
|
|
44709
|
-
let
|
|
44710
|
+
let X = await evalEvent(
|
|
44710
44711
|
formConfig.value.params.formEvents.beginSubmit,
|
|
44711
44712
|
formData.value
|
|
44712
44713
|
);
|
|
44713
|
-
if (typeof
|
|
44714
|
+
if (typeof X < "u" && X === !1) {
|
|
44714
44715
|
emits("saveLoadingChange");
|
|
44715
44716
|
return;
|
|
44716
44717
|
}
|
|
44717
|
-
let
|
|
44718
|
-
formConfig.value.openType === "new" && formConfig.value.params.newRequestPath && (
|
|
44719
|
-
let
|
|
44720
|
-
for (let
|
|
44721
|
-
|
|
44722
|
-
|
|
44723
|
-
|
|
44718
|
+
let G = "/window/submit";
|
|
44719
|
+
formConfig.value.openType === "new" && formConfig.value.params.newRequestPath && (G = formConfig.value.params.newRequestPath), formConfig.value.openType === "edit" && formConfig.value.params.editRequestPath && (G = formConfig.value.params.editRequestPath), formConfig.value.openType === "submit" && formConfig.value.params.submitRequestPath && (G = formConfig.value.params.submitRequestPath);
|
|
44720
|
+
let K = XEUtils$1.clone(toRaw(formData.value), !0);
|
|
44721
|
+
for (let te in K)
|
|
44722
|
+
K[te] instanceof Array && (K[te] = K[te].toString());
|
|
44723
|
+
const ee = ((Z = $VXETableConfig == null ? void 0 : $VXETableConfig.form) == null ? void 0 : Z.submitContentType) || "json";
|
|
44724
|
+
axios.post(G, K, ee).then((te) => {
|
|
44725
|
+
emits("saveLoadingChange"), typeof H < "u" && H instanceof Object && (formConfig.value.showEdit = !te.data.result, showPreViewClose()), te.data.result ? ($message.success(te.data.msg), uploadConfig.value.isHaveImgField && !uploadConfig.value.dataId && updatePictureDataId(te.data.id), evalEvent(
|
|
44724
44726
|
formConfig.value.params.formEvents.afterSubmit,
|
|
44725
44727
|
formData.value,
|
|
44726
|
-
|
|
44728
|
+
te.data
|
|
44727
44729
|
), typeof H < "u" && (H instanceof Object || H === !0) && emits(
|
|
44728
44730
|
"gridReload",
|
|
44729
44731
|
formData.value._region_id,
|
|
44730
44732
|
formConfig.value.openType === "new" ? 0 : null
|
|
44731
|
-
)) : $message.error(
|
|
44733
|
+
)) : $message.error(te.data.msg), nextTick(() => {
|
|
44732
44734
|
formDataClone.value = XEUtils$1.clone(toRaw(formData.value), !0);
|
|
44733
44735
|
});
|
|
44734
|
-
}).catch((
|
|
44735
|
-
emits("saveLoadingChange"), console.error(
|
|
44736
|
+
}).catch((te) => {
|
|
44737
|
+
emits("saveLoadingChange"), console.error(te);
|
|
44736
44738
|
}).finally(() => {
|
|
44737
44739
|
});
|
|
44738
44740
|
} else {
|
|
44739
|
-
for (let
|
|
44740
|
-
const
|
|
44741
|
+
for (let X in Object.values(Q)) {
|
|
44742
|
+
const G = Object.values(Q)[X];
|
|
44741
44743
|
setTimeout(() => {
|
|
44742
|
-
$message.error(
|
|
44743
|
-
},
|
|
44744
|
+
$message.error(G[0][0].rule.$options.message);
|
|
44745
|
+
}, X * 800);
|
|
44744
44746
|
}
|
|
44745
44747
|
emits("saveLoadingChange");
|
|
44746
44748
|
}
|
|
@@ -45488,7 +45490,7 @@ const index$o = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
|
|
|
45488
45490
|
]);
|
|
45489
45491
|
};
|
|
45490
45492
|
}
|
|
45491
|
-
}, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
45493
|
+
}, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-24f25ab8"]]);
|
|
45492
45494
|
WindowForm.name = "slw-window-form";
|
|
45493
45495
|
WindowForm.install = (H) => {
|
|
45494
45496
|
H.component(WindowForm.name, WindowForm);
|
|
@@ -62632,7 +62634,7 @@ const windowDesigner_vue_vue_type_style_index_0_scoped_a3ebe962_lang = "", _with
|
|
|
62632
62634
|
emits: ["update:type", "update:rootLayout", "update:viewData", "update:rowData"],
|
|
62633
62635
|
setup(H, { emit: Q }) {
|
|
62634
62636
|
const Z = H, X = defineAsyncComponent(
|
|
62635
|
-
() => import("./index-
|
|
62637
|
+
() => import("./index-a971a565.js")
|
|
62636
62638
|
);
|
|
62637
62639
|
let G = useVModel(Z, "type", Q), K = useVModel(Z, "rootLayout", Q), ee = useVModel(Z, "viewData", Q), te = useVModel(Z, "rowData", Q), ne = ref(0), re = ref(null);
|
|
62638
62640
|
re.value = createDesigner();
|
|
@@ -147761,7 +147763,7 @@ function reConsole() {
|
|
|
147761
147763
|
}
|
|
147762
147764
|
}
|
|
147763
147765
|
console.info(
|
|
147764
|
-
`%cSLW %cVer 0.10.
|
|
147766
|
+
`%cSLW %cVer 0.10.04%c
|
|
147765
147767
|
%c指引文档:%chttp://slwdoc.js.sforcecon.com:5900/%c
|
|
147766
147768
|
%c启光文档:%chttp://docs.js.sforcecon.com:5900/notepad/view/592`,
|
|
147767
147769
|
"color:#409EFF;font-size: 22px;font-weight:bolder;text-shadow: 2px 2px 4px #84c1ff;",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pushScopeId as P, popScopeId as V, createElementVNode as h, resolveComponent as g, openBlock as o, createElementBlock as p, createBlock as f, normalizeClass as T, normalizeStyle as A, withModifiers as R, withCtx as r, renderSlot as q, createCommentVNode as _, Fragment as B, createVNode as s, mergeProps as k, renderList as j, toDisplayString as E, normalizeProps as K, guardReactiveProps as Q, resolveDynamicComponent as Z, defineAsyncComponent as $, computed as F, unref as D, withDirectives as ee, vShow as te } from "vue";
|
|
2
|
-
import { _ as x, d as S, a as L, u as N } from "./index-
|
|
2
|
+
import { _ as x, d as S, a as L, u as N } from "./index-6869eb23.js";
|
|
3
3
|
import "vue-router";
|
|
4
4
|
const I = {
|
|
5
5
|
computed: {},
|
package/lib/index.js
CHANGED