@jeecg/online 3.4.3-beta → 3.4.4-beta
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/AuthFieldConfig.js +1 -1
- package/CgformCopyList.js +3 -1
- package/CgformModal.js +19 -2
- package/CgreportModal.js +1 -0
- package/CheckDictTable.js +1 -1
- package/DetailForm.js +14 -10
- package/EnhanceJsHistory.js +1 -1
- package/EnhanceJsModal.js +7 -0
- package/ExtendConfigModal.js +1 -1
- package/FieldExtendJsonModal.js +270 -0
- package/FormSchemaFactory.js +150 -10
- package/LinkTableConfigModal.js +1 -1
- package/OnlineAutoList.js +3 -2
- package/OnlineAutoModal.js +7 -3
- package/OnlineAutoTreeList.js +3 -2
- package/OnlineDetailModal.js +1 -1
- package/OnlineForm.js +64 -41
- package/OnlineFormDetail.js +1 -1
- package/OnlineQueryForm.js +8 -4
- package/OnlineSearchFormItem.js +3 -3
- package/OnlineSelectCascade.js +27 -30
- package/PageAttributeTable.js +68 -27
- package/README.md +1 -0
- package/{OnlineSuperQuery.js → SuperQuery.js} +215 -126
- package/{OnlineSuperQueryValComponent.js → SuperQueryValComponent.js} +2 -2
- package/{OnlineSuperQueryValComponent.vue_vue_type_script_lang.js → SuperQueryValComponent.vue_vue_type_script_lang.js} +8 -2
- package/cgform.data.js +8 -8
- package/clipboard.js +565 -0
- package/index.js +15 -5
- package/index2.js +3 -1
- package/index3.js +33 -571
- package/main.index.js +2 -2
- package/package.json +1 -1
- package/style.css +1 -1
- package/useAutoForm.js +84 -48
- package/useCgformList.js +97 -5
- package/useListButton.js +8 -4
- package/useSchemas.js +18 -4
package/AuthFieldConfig.js
CHANGED
|
@@ -166,5 +166,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
166
166
|
}, 8, ["onRegister"])
|
|
167
167
|
]);
|
|
168
168
|
}
|
|
169
|
-
var AuthFieldConfig = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
169
|
+
var AuthFieldConfig = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-63e05357"]]);
|
|
170
170
|
export { AuthFieldConfig as default };
|
package/CgformCopyList.js
CHANGED
|
@@ -10,6 +10,7 @@ import AuthManagerDrawer from "./AuthManagerDrawer.js";
|
|
|
10
10
|
import AuthSetterModal from "./AuthSetterModal.js";
|
|
11
11
|
import { C as CgformPageType, u as useCgformList } from "./useCgformList.js";
|
|
12
12
|
import { _ as _export_sfc } from "./index.js";
|
|
13
|
+
import "/@/components/Icon";
|
|
13
14
|
import "/@/components/Modal";
|
|
14
15
|
import "/@/components/Form/index";
|
|
15
16
|
import "/@/hooks/web/useMessage";
|
|
@@ -38,6 +39,7 @@ import "./omit.js";
|
|
|
38
39
|
import "./_baseClone.js";
|
|
39
40
|
import "./_baseSlice.js";
|
|
40
41
|
import "./LinkTableFieldConfigModal.js";
|
|
42
|
+
import "./FieldExtendJsonModal.js";
|
|
41
43
|
import "./CheckDictTable.js";
|
|
42
44
|
import "/@/components/jeecg/JPrompt";
|
|
43
45
|
import "/@/hooks/web/useDesign";
|
|
@@ -89,7 +91,7 @@ import "./LeftUser.js";
|
|
|
89
91
|
import "./AuthFieldTree.js";
|
|
90
92
|
import "./AuthButtonTree.js";
|
|
91
93
|
import "./AuthDataTree.js";
|
|
92
|
-
import "
|
|
94
|
+
import "./clipboard.js";
|
|
93
95
|
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
94
96
|
const _sfc_main = defineComponent({
|
|
95
97
|
name: "CgformCopyList",
|
package/CgformModal.js
CHANGED
|
@@ -38,6 +38,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
import { defineComponent, ref, computed, provide, reactive, nextTick, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createTextVNode, createElementBlock, Fragment, renderList, toDisplayString, createCommentVNode, createElementVNode, toRaw } from "vue";
|
|
41
|
+
import { Icon } from "/@/components/Icon";
|
|
41
42
|
import { BasicModal, useModalInner, useModal } from "/@/components/Modal";
|
|
42
43
|
import { BasicForm, useForm } from "/@/components/Form/index";
|
|
43
44
|
import { useMessage } from "/@/hooks/web/useMessage";
|
|
@@ -100,7 +101,8 @@ const _sfc_main = defineComponent({
|
|
|
100
101
|
ForeignKeyTable,
|
|
101
102
|
IndexTable,
|
|
102
103
|
QueryTable,
|
|
103
|
-
ExtendConfigModal
|
|
104
|
+
ExtendConfigModal,
|
|
105
|
+
Icon
|
|
104
106
|
},
|
|
105
107
|
emits: ["success", "register"],
|
|
106
108
|
props: {
|
|
@@ -547,6 +549,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
547
549
|
const _component_CheckDictTable = resolveComponent("CheckDictTable");
|
|
548
550
|
const _component_ForeignKeyTable = resolveComponent("ForeignKeyTable");
|
|
549
551
|
const _component_IndexTable = resolveComponent("IndexTable");
|
|
552
|
+
const _component_Icon = resolveComponent("Icon");
|
|
553
|
+
const _component_a_tooltip = resolveComponent("a-tooltip");
|
|
550
554
|
const _component_QueryTable = resolveComponent("QueryTable");
|
|
551
555
|
const _component_a_tabs = resolveComponent("a-tabs");
|
|
552
556
|
const _component_a_spin = resolveComponent("a-spin");
|
|
@@ -717,10 +721,23 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
717
721
|
_: 1
|
|
718
722
|
}),
|
|
719
723
|
createVNode(_component_a_tab_pane, {
|
|
720
|
-
tab: "\u67E5\u8BE2\u914D\u7F6E",
|
|
721
724
|
key: "queryTable",
|
|
722
725
|
forceRender: ""
|
|
723
726
|
}, {
|
|
727
|
+
tab: withCtx(() => [
|
|
728
|
+
createElementVNode("span", null, [
|
|
729
|
+
createTextVNode(" \u4E2A\u6027\u67E5\u8BE2\u914D\u7F6E "),
|
|
730
|
+
createVNode(_component_a_tooltip, null, {
|
|
731
|
+
title: withCtx(() => [
|
|
732
|
+
createTextVNode("\u5141\u8BB8\u81EA\u5B9A\u4E49\uFF0C\u67E5\u8BE2\u8868\u5355\u5B57\u6BB5\u63A7\u4EF6\u7C7B\u578B\uFF01")
|
|
733
|
+
]),
|
|
734
|
+
default: withCtx(() => [
|
|
735
|
+
createVNode(_component_Icon, { icon: "bx:help-circle" })
|
|
736
|
+
]),
|
|
737
|
+
_: 1
|
|
738
|
+
})
|
|
739
|
+
])
|
|
740
|
+
]),
|
|
724
741
|
default: withCtx(() => [
|
|
725
742
|
createVNode(_component_QueryTable, {
|
|
726
743
|
ref: "queryTable",
|
package/CgreportModal.js
CHANGED
|
@@ -601,6 +601,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
601
601
|
createVNode(_component_a_tabs, {
|
|
602
602
|
activeKey: activeKey.value,
|
|
603
603
|
"onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => activeKey.value = $event),
|
|
604
|
+
animated: "",
|
|
604
605
|
onChange: unref(handleChangeTabs)
|
|
605
606
|
}, {
|
|
606
607
|
default: withCtx(() => [
|
package/CheckDictTable.js
CHANGED
|
@@ -237,5 +237,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
237
237
|
_: 1
|
|
238
238
|
}, 16, ["class", "maxHeight", "loading", "columns", "dataSource"]);
|
|
239
239
|
}
|
|
240
|
-
var CheckDictTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
240
|
+
var CheckDictTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8470723a"]]);
|
|
241
241
|
export { CheckDictTable as default };
|
package/DetailForm.js
CHANGED
|
@@ -493,9 +493,11 @@ const _hoisted_14 = { class: "ant-upload-list ant-upload-list-text" };
|
|
|
493
493
|
const _hoisted_15 = { class: "" };
|
|
494
494
|
const _hoisted_16 = { class: "ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-text" };
|
|
495
495
|
const _hoisted_17 = { class: "ant-upload-list-item-info" };
|
|
496
|
-
const _hoisted_18 =
|
|
497
|
-
const _hoisted_19 = { class: "ant-upload-
|
|
498
|
-
const _hoisted_20 =
|
|
496
|
+
const _hoisted_18 = { class: "ant-upload-span" };
|
|
497
|
+
const _hoisted_19 = { class: "ant-upload-text-icon" };
|
|
498
|
+
const _hoisted_20 = ["href"];
|
|
499
|
+
const _hoisted_21 = { class: "ant-upload-list-item-card-actions" };
|
|
500
|
+
const _hoisted_22 = {
|
|
499
501
|
key: 4,
|
|
500
502
|
class: "item-content"
|
|
501
503
|
};
|
|
@@ -570,15 +572,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
570
572
|
createElementVNode("span", null, [
|
|
571
573
|
createElementVNode("div", _hoisted_16, [
|
|
572
574
|
createElementVNode("div", _hoisted_17, [
|
|
573
|
-
createElementVNode("span",
|
|
574
|
-
|
|
575
|
+
createElementVNode("span", _hoisted_18, [
|
|
576
|
+
createElementVNode("div", _hoisted_19, [
|
|
577
|
+
createVNode(_component_paper_clip_outlined)
|
|
578
|
+
]),
|
|
575
579
|
createElementVNode("a", {
|
|
576
580
|
href: url,
|
|
577
581
|
target: "_blank",
|
|
578
582
|
rel: "noopener noreferrer",
|
|
579
|
-
class: "ant-upload-list-item-name
|
|
580
|
-
}, toDisplayString(_ctx.getFilename(url)), 9,
|
|
581
|
-
createElementVNode("span",
|
|
583
|
+
class: "ant-upload-list-item-name"
|
|
584
|
+
}, toDisplayString(_ctx.getFilename(url)), 9, _hoisted_20),
|
|
585
|
+
createElementVNode("span", _hoisted_21, [
|
|
582
586
|
createVNode(_component_download_outlined, {
|
|
583
587
|
onClick: ($event) => _ctx.handleDownloadFile(url)
|
|
584
588
|
}, null, 8, ["onClick"])
|
|
@@ -590,7 +594,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
590
594
|
]);
|
|
591
595
|
}), 256))
|
|
592
596
|
])
|
|
593
|
-
])) : (openBlock(), createElementBlock("div",
|
|
597
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_22, toDisplayString(_ctx.detailFormData[item.field]), 1))
|
|
594
598
|
])
|
|
595
599
|
]),
|
|
596
600
|
_: 2
|
|
@@ -601,5 +605,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
601
605
|
})
|
|
602
606
|
], 2);
|
|
603
607
|
}
|
|
604
|
-
var DetailForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
608
|
+
var DetailForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-47915cc7"]]);
|
|
605
609
|
export { DetailForm as default };
|
package/EnhanceJsHistory.js
CHANGED
|
@@ -221,7 +221,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
221
221
|
_: 1
|
|
222
222
|
}, 8, ["onRegister", "confirmLoading", "onCancel"]);
|
|
223
223
|
}
|
|
224
|
-
var EnhanceJsHistory = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
224
|
+
var EnhanceJsHistory = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0e8e9411"]]);
|
|
225
225
|
var EnhanceJsHistory$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
226
226
|
__proto__: null,
|
|
227
227
|
"default": EnhanceJsHistory
|
package/EnhanceJsModal.js
CHANGED
|
@@ -124,6 +124,13 @@ const _sfc_main = defineComponent({
|
|
|
124
124
|
} catch (e) {
|
|
125
125
|
console.error(e);
|
|
126
126
|
}
|
|
127
|
+
setTimeout(() => {
|
|
128
|
+
if (type == "list") {
|
|
129
|
+
listEditorRef.value.refresh();
|
|
130
|
+
} else {
|
|
131
|
+
formEditorRef.value.refresh();
|
|
132
|
+
}
|
|
133
|
+
}, 150);
|
|
127
134
|
});
|
|
128
135
|
}
|
|
129
136
|
function onShowHistory() {
|
package/ExtendConfigModal.js
CHANGED
|
@@ -147,5 +147,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
147
147
|
_: 1
|
|
148
148
|
}, 8, ["onRegister", "onOk", "onCancel"]);
|
|
149
149
|
}
|
|
150
|
-
var ExtendConfigModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
150
|
+
var ExtendConfigModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1eeac864"]]);
|
|
151
151
|
export { ExtendConfigModal as default };
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __async = (__this, __arguments, generator) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
var fulfilled = (value) => {
|
|
23
|
+
try {
|
|
24
|
+
step(generator.next(value));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
reject(e);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var rejected = (value) => {
|
|
30
|
+
try {
|
|
31
|
+
step(generator.throw(value));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
reject(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
37
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
import { defineComponent, ref, reactive, toRaw, toRefs, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode } from "vue";
|
|
41
|
+
import { BasicModal, useModalInner } from "/@/components/Modal";
|
|
42
|
+
import { BasicForm, useForm } from "/@/components/Form/index";
|
|
43
|
+
import { _ as _export_sfc } from "./index.js";
|
|
44
|
+
import { p as pick } from "./pick.js";
|
|
45
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
46
|
+
import "/@/hooks/web/useMessage";
|
|
47
|
+
import "vue-router";
|
|
48
|
+
import "./_flatRest.js";
|
|
49
|
+
import "./isArray.js";
|
|
50
|
+
import "./toString.js";
|
|
51
|
+
import "./_arrayPush.js";
|
|
52
|
+
const _sfc_main = defineComponent({
|
|
53
|
+
name: "FieldExtendJsonModal",
|
|
54
|
+
components: {
|
|
55
|
+
BasicModal,
|
|
56
|
+
BasicForm
|
|
57
|
+
},
|
|
58
|
+
emits: ["success", "register"],
|
|
59
|
+
setup(_p, { emit }) {
|
|
60
|
+
const spinningLoading = ref(false);
|
|
61
|
+
function initExtendConfig() {
|
|
62
|
+
extendConfig.uploadnum = 0;
|
|
63
|
+
extendConfig.showLength = "";
|
|
64
|
+
extendConfig.popupMulti = true;
|
|
65
|
+
extendConfig.multiSelect = true;
|
|
66
|
+
extendConfig.store = "";
|
|
67
|
+
extendConfig.text = "";
|
|
68
|
+
extendConfig.orderRule = "";
|
|
69
|
+
extendConfig.validateError = "";
|
|
70
|
+
}
|
|
71
|
+
const extendConfig = reactive({
|
|
72
|
+
uploadnum: 0,
|
|
73
|
+
showLength: "",
|
|
74
|
+
popupMulti: true,
|
|
75
|
+
store: "",
|
|
76
|
+
text: "",
|
|
77
|
+
multiSelect: true,
|
|
78
|
+
orderRule: "",
|
|
79
|
+
validateError: ""
|
|
80
|
+
});
|
|
81
|
+
const fieldShowType = ref("");
|
|
82
|
+
const rowKey = ref("");
|
|
83
|
+
const sortFlag = ref("0");
|
|
84
|
+
const formSchemas = [
|
|
85
|
+
{
|
|
86
|
+
label: "rowKey",
|
|
87
|
+
field: "rowKey",
|
|
88
|
+
component: "Input",
|
|
89
|
+
show: false
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: "\u6587\u4EF6\u4E0A\u4F20\u6570\u91CF",
|
|
93
|
+
field: "uploadnum",
|
|
94
|
+
component: "InputNumber",
|
|
95
|
+
componentProps: {
|
|
96
|
+
style: {
|
|
97
|
+
width: "100%"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
ifShow: () => {
|
|
101
|
+
return fieldShowType.value === "file" || fieldShowType.value === "image";
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: "\u662F\u5426\u591A\u9009",
|
|
106
|
+
field: "popupMulti",
|
|
107
|
+
component: "RadioGroup",
|
|
108
|
+
defaultValue: true,
|
|
109
|
+
componentProps: {
|
|
110
|
+
options: [
|
|
111
|
+
{ label: "\u5426", value: false },
|
|
112
|
+
{ label: "\u662F", value: true }
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
ifShow: () => {
|
|
116
|
+
return fieldShowType.value === "popup";
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: "\u662F\u5426\u591A\u9009",
|
|
121
|
+
field: "multiSelect",
|
|
122
|
+
component: "RadioGroup",
|
|
123
|
+
defaultValue: true,
|
|
124
|
+
componentProps: {
|
|
125
|
+
options: [
|
|
126
|
+
{ label: "\u5426", value: false },
|
|
127
|
+
{ label: "\u662F", value: true }
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
ifShow: () => {
|
|
131
|
+
return fieldShowType.value === "sel_user" || fieldShowType.value === "sel_depart";
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
label: "\u5B58\u50A8\u5B57\u6BB5",
|
|
136
|
+
field: "store",
|
|
137
|
+
component: "Input",
|
|
138
|
+
ifShow: () => {
|
|
139
|
+
return fieldShowType.value === "sel_user" || fieldShowType.value === "sel_depart";
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
label: "\u5C55\u793A\u5B57\u6BB5",
|
|
144
|
+
field: "text",
|
|
145
|
+
component: "Input",
|
|
146
|
+
ifShow: () => {
|
|
147
|
+
return fieldShowType.value === "sel_user" || fieldShowType.value === "sel_depart";
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
label: "\u9ED8\u8BA4\u6392\u5E8F",
|
|
152
|
+
field: "orderRule",
|
|
153
|
+
component: "RadioGroup",
|
|
154
|
+
defaultValue: "",
|
|
155
|
+
componentProps: {
|
|
156
|
+
options: [
|
|
157
|
+
{ label: "\u964D\u5E8F", value: "desc" },
|
|
158
|
+
{ label: "\u5347\u5E8F", value: "asc" },
|
|
159
|
+
{ label: "\u4E0D\u9ED8\u8BA4\u6392\u5E8F", value: "" }
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
ifShow: () => {
|
|
163
|
+
return sortFlag.value === "1";
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
label: "\u6821\u9A8C\u63D0\u793A",
|
|
168
|
+
field: "validateError",
|
|
169
|
+
component: "Input",
|
|
170
|
+
componentProps: {
|
|
171
|
+
placeholder: "\u8BF7\u8F93\u5165\u6821\u9A8C\u63D0\u793A\u6587\u672C"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
];
|
|
175
|
+
const [registerForm, { validate, setFieldsValue, resetFields }] = useForm({
|
|
176
|
+
schemas: formSchemas,
|
|
177
|
+
showActionButtonGroup: false,
|
|
178
|
+
labelAlign: "right",
|
|
179
|
+
labelWidth: 100
|
|
180
|
+
});
|
|
181
|
+
const [registerModal, { closeModal }] = useModalInner((data) => __async(this, null, function* () {
|
|
182
|
+
console.log("extend json", data);
|
|
183
|
+
initExtendConfig();
|
|
184
|
+
if (data.jsonStr) {
|
|
185
|
+
let json = JSON.parse(data.jsonStr);
|
|
186
|
+
Object.keys(json).map((k) => {
|
|
187
|
+
console.log("\u6269\u5C55\u53C2\u6570:" + k + "=" + json[k]);
|
|
188
|
+
extendConfig[k] = json[k];
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
fieldShowType.value = data.fieldShowType;
|
|
192
|
+
rowKey.value = data.id;
|
|
193
|
+
sortFlag.value = data.sortFlag;
|
|
194
|
+
let temp = toRaw(extendConfig);
|
|
195
|
+
yield resetFields();
|
|
196
|
+
yield setFieldsValue(__spreadProps(__spreadValues({}, temp), {
|
|
197
|
+
rowKey: data.id
|
|
198
|
+
}));
|
|
199
|
+
}));
|
|
200
|
+
function handleSubmit() {
|
|
201
|
+
return __async(this, null, function* () {
|
|
202
|
+
let data = yield validate();
|
|
203
|
+
console.log("datga", data);
|
|
204
|
+
let type = fieldShowType.value;
|
|
205
|
+
let obj = {};
|
|
206
|
+
if (type === "file" || type === "image") {
|
|
207
|
+
if (data.uploadnum && data.uploadnum > 0) {
|
|
208
|
+
obj.uploadnum = data.uploadnum;
|
|
209
|
+
}
|
|
210
|
+
} else if (type === "textarea" || type === "text") {
|
|
211
|
+
if (data.showLength && data.showLength > 0) {
|
|
212
|
+
obj.showLength = data.showLength;
|
|
213
|
+
}
|
|
214
|
+
} else if (type === "sel_user" || type === "sel_depart") {
|
|
215
|
+
obj = pick(data, "store", "text", "multiSelect");
|
|
216
|
+
} else if (type === "popup") {
|
|
217
|
+
obj.popupMulti = data.popupMulti;
|
|
218
|
+
}
|
|
219
|
+
if (sortFlag.value === "1" && data.orderRule) {
|
|
220
|
+
obj.orderRule = data.orderRule;
|
|
221
|
+
}
|
|
222
|
+
if (data.validateError) {
|
|
223
|
+
obj.validateError = data.validateError;
|
|
224
|
+
}
|
|
225
|
+
console.log("obj....", obj);
|
|
226
|
+
for (let key in obj) {
|
|
227
|
+
if (obj[key] === "") {
|
|
228
|
+
delete obj[key];
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
console.log(obj);
|
|
232
|
+
emit("success", obj, data.rowKey);
|
|
233
|
+
closeModal();
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return __spreadValues({
|
|
237
|
+
spinningLoading,
|
|
238
|
+
registerModal,
|
|
239
|
+
registerForm,
|
|
240
|
+
fieldShowType,
|
|
241
|
+
rowKey,
|
|
242
|
+
handleSubmit
|
|
243
|
+
}, toRefs(extendConfig));
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
247
|
+
const _component_BasicForm = resolveComponent("BasicForm");
|
|
248
|
+
const _component_a_spin = resolveComponent("a-spin");
|
|
249
|
+
const _component_BasicModal = resolveComponent("BasicModal");
|
|
250
|
+
return openBlock(), createBlock(_component_BasicModal, mergeProps({ wrapClassName: "field-extend-config-modal" }, _ctx.$attrs, {
|
|
251
|
+
title: "\u6269\u5C55\u53C2\u6570\u914D\u7F6E",
|
|
252
|
+
onRegister: _ctx.registerModal,
|
|
253
|
+
keyboard: "",
|
|
254
|
+
canFullscreen: false,
|
|
255
|
+
cancelText: "\u5173\u95ED",
|
|
256
|
+
onOk: _ctx.handleSubmit
|
|
257
|
+
}), {
|
|
258
|
+
default: withCtx(() => [
|
|
259
|
+
createVNode(_component_a_spin, { spinning: _ctx.spinningLoading }, {
|
|
260
|
+
default: withCtx(() => [
|
|
261
|
+
createVNode(_component_BasicForm, { onRegister: _ctx.registerForm }, null, 8, ["onRegister"])
|
|
262
|
+
]),
|
|
263
|
+
_: 1
|
|
264
|
+
}, 8, ["spinning"])
|
|
265
|
+
]),
|
|
266
|
+
_: 1
|
|
267
|
+
}, 16, ["onRegister", "onOk"]);
|
|
268
|
+
}
|
|
269
|
+
var FieldExtendJsonModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
270
|
+
export { FieldExtendJsonModal as default };
|