@jeecg/online 1.0.1
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/AuthButtonConfig.js +140 -0
- package/AuthButtonTree.js +183 -0
- package/AuthDataConfig.js +243 -0
- package/AuthDataTree.js +160 -0
- package/AuthFieldConfig.js +167 -0
- package/AuthFieldTree.js +273 -0
- package/AuthManagerDrawer.js +125 -0
- package/AuthSetterModal.js +317 -0
- package/CgformCopyList.js +253 -0
- package/CgformModal.js +748 -0
- package/CgreportModal.js +673 -0
- package/ChartAutoRender.js +69 -0
- package/ChartDoubleRender.js +154 -0
- package/ChartSingleRender.js +132 -0
- package/ChartTabsRender.js +218 -0
- package/CheckDictTable.js +121 -0
- package/CodeGeneratorModal.js +293 -0
- package/CustomButtonList.js +413 -0
- package/DBAttributeTable.js +278 -0
- package/DbToOnlineModal.js +190 -0
- package/EnhanceJavaModal.js +304 -0
- package/EnhanceJsHistory.js +231 -0
- package/EnhanceJsModal.js +293 -0
- package/EnhanceSqlModal.js +305 -0
- package/ErrorTip.js +21 -0
- package/ExtendConfigModal.js +142 -0
- package/FieldTable.js +185 -0
- package/FileSelectModal.js +102 -0
- package/ForeignKeyTable.js +78 -0
- package/FormSchemaFactory.js +938 -0
- package/GraphreportAutoChart.js +352 -0
- package/GraphreportList.js +239 -0
- package/GraphreportModal.js +559 -0
- package/IndexTable.js +96 -0
- package/JOnlineSearchSelect.js +107 -0
- package/LICENSE +7 -0
- package/LeftDepart.js +96 -0
- package/LeftRole.js +95 -0
- package/LeftUser.js +114 -0
- package/ModalFormDemo.js +84 -0
- package/OnlineAutoList.js +410 -0
- package/OnlineAutoModal.js +265 -0
- package/OnlineAutoTreeList.js +513 -0
- package/OnlineCustomModal.js +269 -0
- package/OnlineForm.js +809 -0
- package/OnlineQueryForm.js +442 -0
- package/OnlineSearchFormItem.js +428 -0
- package/OnlineSelectCascade.js +217 -0
- package/OnlineSubForm.js +200 -0
- package/OnlineSuperQuery.js +912 -0
- package/OnlineSuperQueryValComponent.js +8 -0
- package/OnlineSuperQueryValComponent.vue_vue_type_script_lang.js +172 -0
- package/PageAttributeTable.js +242 -0
- package/ParamsTable.js +71 -0
- package/ProcessOnlineForm.js +183 -0
- package/QueryTable.js +128 -0
- package/README.md +23 -0
- package/_arrayPush.js +276 -0
- package/auth.api.js +43 -0
- package/auth.data.js +144 -0
- package/cgform.data.js +235 -0
- package/cloneDeep.js +475 -0
- package/enhance.api.js +120 -0
- package/enhance.data.js +196 -0
- package/graphreport.api.js +23 -0
- package/index.js +64 -0
- package/index2.js +336 -0
- package/index3.js +799 -0
- package/isArray.js +47 -0
- package/main.index.js +6 -0
- package/package.json +6 -0
- package/pick.js +238 -0
- package/style.css +1 -0
- package/toString.js +31 -0
- package/useAutoForm.js +4274 -0
- package/useCgformList.js +353 -0
- package/useChartRender.js +405 -0
- package/useMessageOnline.js +71 -0
- package/useOnlineTest.js +26866 -0
- package/useSchemas.js +505 -0
- package/useTableColumns.js +1154 -0
- package/useTableSync.js +105 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { _ as _sfc_main } from "./OnlineSuperQueryValComponent.vue_vue_type_script_lang.js";
|
|
2
|
+
export { _ as default } from "./OnlineSuperQueryValComponent.vue_vue_type_script_lang.js";
|
|
3
|
+
import "vue";
|
|
4
|
+
import "/@/components/Form/src/componentMap";
|
|
5
|
+
import "/@/components/Form/src/helper";
|
|
6
|
+
import "/@/utils/is";
|
|
7
|
+
import "./toString.js";
|
|
8
|
+
import "./isArray.js";
|
|
@@ -0,0 +1,172 @@
|
|
|
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
|
+
import { defineComponent, computed, createVNode, unref } from "vue";
|
|
21
|
+
import { componentMap } from "/@/components/Form/src/componentMap";
|
|
22
|
+
import { createPlaceholderMessage } from "/@/components/Form/src/helper";
|
|
23
|
+
import { isFunction } from "/@/utils/is";
|
|
24
|
+
import { t as toString } from "./toString.js";
|
|
25
|
+
function baseSlice(array, start, end) {
|
|
26
|
+
var index = -1, length = array.length;
|
|
27
|
+
if (start < 0) {
|
|
28
|
+
start = -start > length ? 0 : length + start;
|
|
29
|
+
}
|
|
30
|
+
end = end > length ? length : end;
|
|
31
|
+
if (end < 0) {
|
|
32
|
+
end += length;
|
|
33
|
+
}
|
|
34
|
+
length = start > end ? 0 : end - start >>> 0;
|
|
35
|
+
start >>>= 0;
|
|
36
|
+
var result = Array(length);
|
|
37
|
+
while (++index < length) {
|
|
38
|
+
result[index] = array[index + start];
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
function castSlice(array, start, end) {
|
|
43
|
+
var length = array.length;
|
|
44
|
+
end = end === void 0 ? length : end;
|
|
45
|
+
return !start && end >= length ? array : baseSlice(array, start, end);
|
|
46
|
+
}
|
|
47
|
+
var rsAstralRange$1 = "\\ud800-\\udfff", rsComboMarksRange$1 = "\\u0300-\\u036f", reComboHalfMarksRange$1 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$1 = "\\u20d0-\\u20ff", rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1, rsVarRange$1 = "\\ufe0e\\ufe0f";
|
|
48
|
+
var rsZWJ$1 = "\\u200d";
|
|
49
|
+
var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
|
|
50
|
+
function hasUnicode(string) {
|
|
51
|
+
return reHasUnicode.test(string);
|
|
52
|
+
}
|
|
53
|
+
function asciiToArray(string) {
|
|
54
|
+
return string.split("");
|
|
55
|
+
}
|
|
56
|
+
var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = "\\ufe0e\\ufe0f";
|
|
57
|
+
var rsAstral = "[" + rsAstralRange + "]", rsCombo = "[" + rsComboRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsZWJ = "\\u200d";
|
|
58
|
+
var reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
|
|
59
|
+
var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
|
|
60
|
+
function unicodeToArray(string) {
|
|
61
|
+
return string.match(reUnicode) || [];
|
|
62
|
+
}
|
|
63
|
+
function stringToArray(string) {
|
|
64
|
+
return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
|
|
65
|
+
}
|
|
66
|
+
function createCaseFirst(methodName) {
|
|
67
|
+
return function(string) {
|
|
68
|
+
string = toString(string);
|
|
69
|
+
var strSymbols = hasUnicode(string) ? stringToArray(string) : void 0;
|
|
70
|
+
var chr = strSymbols ? strSymbols[0] : string.charAt(0);
|
|
71
|
+
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
|
|
72
|
+
return chr[methodName]() + trailing;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
var upperFirst = createCaseFirst("toUpperCase");
|
|
76
|
+
var upperFirst$1 = upperFirst;
|
|
77
|
+
var _sfc_main = defineComponent({
|
|
78
|
+
name: "OnlineSuperQueryValComponent",
|
|
79
|
+
inheritAttrs: false,
|
|
80
|
+
props: {
|
|
81
|
+
schema: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: () => ({})
|
|
84
|
+
},
|
|
85
|
+
formModel: {
|
|
86
|
+
type: Object,
|
|
87
|
+
default: () => ({})
|
|
88
|
+
},
|
|
89
|
+
setFormModel: {
|
|
90
|
+
type: Function,
|
|
91
|
+
default: null
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
setup(props) {
|
|
95
|
+
const getComponentsProps = computed(() => {
|
|
96
|
+
var _a;
|
|
97
|
+
const {
|
|
98
|
+
schema,
|
|
99
|
+
formModel
|
|
100
|
+
} = props;
|
|
101
|
+
let {
|
|
102
|
+
componentProps = {}
|
|
103
|
+
} = schema;
|
|
104
|
+
if (isFunction(componentProps)) {
|
|
105
|
+
componentProps = (_a = componentProps({
|
|
106
|
+
schema,
|
|
107
|
+
formModel
|
|
108
|
+
})) != null ? _a : {};
|
|
109
|
+
}
|
|
110
|
+
return componentProps;
|
|
111
|
+
});
|
|
112
|
+
const getValues = computed(() => {
|
|
113
|
+
const {
|
|
114
|
+
formModel,
|
|
115
|
+
schema
|
|
116
|
+
} = props;
|
|
117
|
+
let obj = {
|
|
118
|
+
field: schema.field,
|
|
119
|
+
model: formModel,
|
|
120
|
+
values: __spreadValues({}, formModel),
|
|
121
|
+
schema
|
|
122
|
+
};
|
|
123
|
+
return obj;
|
|
124
|
+
});
|
|
125
|
+
function renderComponent() {
|
|
126
|
+
var _a;
|
|
127
|
+
const {
|
|
128
|
+
component,
|
|
129
|
+
changeEvent = "change",
|
|
130
|
+
valueField
|
|
131
|
+
} = props.schema;
|
|
132
|
+
const field = "val";
|
|
133
|
+
const isCheck = component && ["Switch", "Checkbox"].includes(component);
|
|
134
|
+
const eventKey = `on${upperFirst$1(changeEvent)}`;
|
|
135
|
+
const on = {
|
|
136
|
+
[eventKey]: (...args) => {
|
|
137
|
+
const [e] = args;
|
|
138
|
+
if (propsData[eventKey]) {
|
|
139
|
+
propsData[eventKey](...args);
|
|
140
|
+
}
|
|
141
|
+
const target = e ? e.target : null;
|
|
142
|
+
const value = target ? isCheck ? target.checked : target.value : e;
|
|
143
|
+
props.setFormModel(field, value);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
const Comp = componentMap.get(component);
|
|
147
|
+
const propsData = __spreadValues({
|
|
148
|
+
allowClear: true,
|
|
149
|
+
getPopupContainer: (trigger) => trigger.parentNode
|
|
150
|
+
}, unref(getComponentsProps));
|
|
151
|
+
const isCreatePlaceholder = !propsData.disabled;
|
|
152
|
+
if (isCreatePlaceholder && component !== "RangePicker" && component) {
|
|
153
|
+
propsData.placeholder = ((_a = unref(getComponentsProps)) == null ? void 0 : _a.placeholder) || createPlaceholderMessage(component) + props.schema.label;
|
|
154
|
+
}
|
|
155
|
+
propsData.codeField = field;
|
|
156
|
+
propsData.formValues = unref(getValues);
|
|
157
|
+
const bindValue = {
|
|
158
|
+
[valueField || (isCheck ? "checked" : "value")]: props.formModel[field]
|
|
159
|
+
};
|
|
160
|
+
const compAttr = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, propsData), on), bindValue), {
|
|
161
|
+
allowClear: true
|
|
162
|
+
});
|
|
163
|
+
return createVNode(Comp, compAttr, null);
|
|
164
|
+
}
|
|
165
|
+
return () => {
|
|
166
|
+
return createVNode("div", {
|
|
167
|
+
"style": "width:100%"
|
|
168
|
+
}, [renderComponent()]);
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
export { _sfc_main as _ };
|
|
@@ -0,0 +1,242 @@
|
|
|
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
|
+
import { defineComponent, ref, resolveComponent, openBlock, createBlock } from "vue";
|
|
21
|
+
import { JVxeTypes } from "/@/components/jeecg/JVxeTable/types";
|
|
22
|
+
import { u as useTableSync } from "./useTableSync.js";
|
|
23
|
+
import { _ as _export_sfc } from "./index.js";
|
|
24
|
+
import "./cgform.data.js";
|
|
25
|
+
import "/@/utils/dict";
|
|
26
|
+
import "/@/utils/dict/JDictSelectUtil";
|
|
27
|
+
import "/@/utils/uuid";
|
|
28
|
+
import "./pick.js";
|
|
29
|
+
import "./isArray.js";
|
|
30
|
+
import "./toString.js";
|
|
31
|
+
import "./_arrayPush.js";
|
|
32
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
33
|
+
import "/@/hooks/web/useMessage";
|
|
34
|
+
import "vue-router";
|
|
35
|
+
const commonPageOptions = [
|
|
36
|
+
{ title: "\u6587\u672C\u6846", value: "text" },
|
|
37
|
+
{ title: "\u5BC6\u7801", value: "password" },
|
|
38
|
+
{ title: "\u4E0B\u62C9\u6846", value: "list" },
|
|
39
|
+
{ title: "\u5355\u9009\u6846", value: "radio" },
|
|
40
|
+
{ title: "\u591A\u9009\u6846", value: "checkbox" },
|
|
41
|
+
{ title: "\u5F00\u5173", value: "switch" },
|
|
42
|
+
{ title: "\u65E5\u671F(yyyy-MM-dd)", value: "date" },
|
|
43
|
+
{ title: "\u65E5\u671F\uFF08yyyy-MM-dd HH:mm:ss\uFF09", value: "datetime" },
|
|
44
|
+
{ title: "\u65F6\u95F4\uFF08HH:mm:ss\uFF09", value: "time" },
|
|
45
|
+
{ title: "\u6587\u4EF6", value: "file" },
|
|
46
|
+
{ title: "\u56FE\u7247", value: "image" },
|
|
47
|
+
{ title: "\u591A\u884C\u6587\u672C", value: "textarea" },
|
|
48
|
+
{ title: "\u4E0B\u62C9\u591A\u9009\u6846", value: "list_multi" },
|
|
49
|
+
{ title: "\u4E0B\u62C9\u641C\u7D22\u6846", value: "sel_search" },
|
|
50
|
+
{ title: "Popup\u5F39\u6846", value: "popup" },
|
|
51
|
+
{ title: "\u5206\u7C7B\u5B57\u5178\u6811", value: "cat_tree" },
|
|
52
|
+
{ title: "\u90E8\u95E8\u9009\u62E9", value: "sel_depart" },
|
|
53
|
+
{ title: "\u7528\u6237\u9009\u62E9", value: "sel_user" },
|
|
54
|
+
{ title: "\u5BCC\u6587\u672C", value: "umeditor" },
|
|
55
|
+
{ title: "MarkDown", value: "markdown" },
|
|
56
|
+
{ title: "\u7701\u5E02\u533A\u7EC4\u4EF6", value: "pca" },
|
|
57
|
+
{ title: "\u8054\u52A8\u7EC4\u4EF6", value: "link_down" },
|
|
58
|
+
{ title: "\u81EA\u5B9A\u4E49\u6811\u63A7\u4EF6", value: "sel_tree" }
|
|
59
|
+
];
|
|
60
|
+
const subTablePageOptions = [
|
|
61
|
+
{ title: "\u6587\u672C\u6846", value: "text" },
|
|
62
|
+
{ title: "\u5355\u9009\u6846", value: "radio" },
|
|
63
|
+
{ title: "\u5F00\u5173", value: "switch" },
|
|
64
|
+
{ title: "\u65E5\u671F(yyyy-MM-dd)", value: "date" },
|
|
65
|
+
{ title: "\u65E5\u671F\uFF08yyyy-MM-dd HH:mm:ss\uFF09", value: "datetime" },
|
|
66
|
+
{ title: "\u65F6\u95F4\uFF08HH:mm:ss\uFF09", value: "time" },
|
|
67
|
+
{ title: "\u6587\u4EF6", value: "file" },
|
|
68
|
+
{ title: "\u56FE\u7247", value: "image" },
|
|
69
|
+
{ title: "\u4E0B\u62C9\u6846", value: "list" },
|
|
70
|
+
{ title: "\u4E0B\u62C9\u591A\u9009\u6846", value: "list_multi" },
|
|
71
|
+
{ title: "\u4E0B\u62C9\u641C\u7D22\u6846", value: "sel_search" },
|
|
72
|
+
{ title: "popup\u5F39\u51FA\u6846", value: "popup" },
|
|
73
|
+
{ title: "\u90E8\u95E8\u9009\u62E9", value: "sel_depart" },
|
|
74
|
+
{ title: "\u7528\u6237\u9009\u62E9", value: "sel_user" },
|
|
75
|
+
{ title: "\u591A\u884C\u6587\u672C", value: "textarea" }
|
|
76
|
+
];
|
|
77
|
+
const _sfc_main = defineComponent({
|
|
78
|
+
name: "PageAttributeTable",
|
|
79
|
+
components: {},
|
|
80
|
+
setup() {
|
|
81
|
+
const columns = ref([
|
|
82
|
+
{ title: "\u5B57\u6BB5\u540D\u79F0", key: "dbFieldName", width: 100 },
|
|
83
|
+
{ title: "\u5B57\u6BB5\u5907\u6CE8", key: "dbFieldTxt", width: 100 },
|
|
84
|
+
{
|
|
85
|
+
title: "\u8868\u5355\u663E\u793A",
|
|
86
|
+
key: "isShowForm",
|
|
87
|
+
width: 80,
|
|
88
|
+
type: JVxeTypes.checkbox,
|
|
89
|
+
align: "center",
|
|
90
|
+
customValue: ["1", "0"],
|
|
91
|
+
defaultChecked: true
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: "\u5217\u8868\u663E\u793A",
|
|
95
|
+
key: "isShowList",
|
|
96
|
+
width: 80,
|
|
97
|
+
type: JVxeTypes.checkbox,
|
|
98
|
+
align: "center",
|
|
99
|
+
customValue: ["1", "0"],
|
|
100
|
+
defaultChecked: true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
title: "\u662F\u5426\u6392\u5E8F",
|
|
104
|
+
key: "sortFlag",
|
|
105
|
+
width: 80,
|
|
106
|
+
type: JVxeTypes.checkbox,
|
|
107
|
+
align: "center",
|
|
108
|
+
customValue: ["1", "0"],
|
|
109
|
+
defaultChecked: false
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
title: "\u662F\u5426\u53EA\u8BFB",
|
|
113
|
+
key: "isReadOnly",
|
|
114
|
+
width: 80,
|
|
115
|
+
type: JVxeTypes.checkbox,
|
|
116
|
+
align: "center",
|
|
117
|
+
customValue: ["1", "0"],
|
|
118
|
+
defaultChecked: false
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
title: "\u63A7\u4EF6\u7C7B\u578B",
|
|
122
|
+
key: "fieldShowType",
|
|
123
|
+
width: 170,
|
|
124
|
+
type: JVxeTypes.select,
|
|
125
|
+
options: commonPageOptions,
|
|
126
|
+
defaultValue: "text",
|
|
127
|
+
placeholder: "\u8BF7\u9009\u62E9${title}",
|
|
128
|
+
validateRules: [
|
|
129
|
+
{ required: true, message: "\u8BF7\u9009\u62E9${title}" },
|
|
130
|
+
{ handler: validateFieldShowType }
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: "\u63A7\u4EF6\u957F\u5EA6",
|
|
135
|
+
key: "fieldLength",
|
|
136
|
+
width: 120,
|
|
137
|
+
type: JVxeTypes.inputNumber,
|
|
138
|
+
defaultValue: 120,
|
|
139
|
+
placeholder: "\u8BF7\u8F93\u5165${title}",
|
|
140
|
+
validateRules: [{ required: true, message: "${title}\u4E0D\u80FD\u4E3A\u7A7A" }]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
title: "\u662F\u5426\u67E5\u8BE2",
|
|
144
|
+
key: "isQuery",
|
|
145
|
+
width: 80,
|
|
146
|
+
type: JVxeTypes.checkbox,
|
|
147
|
+
align: "center",
|
|
148
|
+
customValue: ["1", "0"],
|
|
149
|
+
defaultChecked: false
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
title: "\u67E5\u8BE2\u7C7B\u578B",
|
|
153
|
+
key: "queryMode",
|
|
154
|
+
width: 110,
|
|
155
|
+
type: JVxeTypes.select,
|
|
156
|
+
options: [
|
|
157
|
+
{ title: "\u666E\u901A\u67E5\u8BE2", value: "single" },
|
|
158
|
+
{ title: "\u8303\u56F4\u67E5\u8BE2", value: "group" }
|
|
159
|
+
],
|
|
160
|
+
defaultValue: "single",
|
|
161
|
+
placeholder: "\u8BF7\u9009\u62E9${title}",
|
|
162
|
+
validateRules: [{ required: true, message: "\u8BF7\u9009\u62E9${title}" }]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
title: "\u63A7\u4EF6\u9ED8\u8BA4\u503C",
|
|
166
|
+
key: "fieldDefaultValue",
|
|
167
|
+
width: 180,
|
|
168
|
+
type: JVxeTypes.input,
|
|
169
|
+
defaultValue: ""
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
title: "\u6269\u5C55\u53C2\u6570",
|
|
173
|
+
key: "fieldExtendJson",
|
|
174
|
+
width: 160,
|
|
175
|
+
type: JVxeTypes.input,
|
|
176
|
+
defaultValue: ""
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
title: "\u81EA\u5B9A\u4E49\u8F6C\u6362\u5668",
|
|
180
|
+
key: "converter",
|
|
181
|
+
minWidth: 160,
|
|
182
|
+
type: JVxeTypes.input,
|
|
183
|
+
defaultValue: ""
|
|
184
|
+
}
|
|
185
|
+
]);
|
|
186
|
+
const setup = useTableSync(columns);
|
|
187
|
+
const { tableRef, tables } = setup;
|
|
188
|
+
function validateFieldShowType({ cellValue, row }, callback) {
|
|
189
|
+
let { dbTable } = tables;
|
|
190
|
+
let dbType = dbTable.value.tableRef.getTableData({ rowIds: [row.id] })[0].dbType;
|
|
191
|
+
if (cellValue === "time" && dbType !== "string") {
|
|
192
|
+
callback(false, "\u5F53\u63A7\u4EF6\u7C7B\u578B\u4E3A\u65F6\u95F4\u65F6,\u6570\u636E\u5E93\u5C5E\u6027\u91CC\u7684\u5B57\u6BB5\u7C7B\u578B\u5FC5\u987B\u662FString\uFF01");
|
|
193
|
+
} else if (cellValue === "date" && dbType !== "Date" && dbType !== "Datetime") {
|
|
194
|
+
callback(false, "\u5F53\u63A7\u4EF6\u7C7B\u578B\u4E3A\u65E5\u671F\u65F6\uFF0C\u6570\u636E\u5E93\u5C5E\u6027\u91CC\u7684\u5B57\u6BB5\u7C7B\u578B\u5FC5\u987B\u662FDate\u6216Datetime\uFF01");
|
|
195
|
+
} else if (cellValue === "datetime" && dbType !== "Datetime") {
|
|
196
|
+
callback(false, "\u5F53\u63A7\u4EF6\u7C7B\u578B\u4E3Adatetime\u65F6\uFF0C\u6570\u636E\u5E93\u5C5E\u6027\u91CC\u7684\u5B57\u6BB5\u7C7B\u578B\u5FC5\u987B\u662FDatetime\uFF01");
|
|
197
|
+
} else {
|
|
198
|
+
callback(true);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function syncFieldShowType(row) {
|
|
202
|
+
let showType = "date";
|
|
203
|
+
if (row.dbType === "Datetime") {
|
|
204
|
+
showType = "datetime";
|
|
205
|
+
}
|
|
206
|
+
tableRef.value.setValues([{
|
|
207
|
+
rowKey: row.id,
|
|
208
|
+
values: { fieldShowType: showType }
|
|
209
|
+
}]);
|
|
210
|
+
}
|
|
211
|
+
function changePageType(flag) {
|
|
212
|
+
for (let col of columns.value) {
|
|
213
|
+
if (col.key == "fieldShowType") {
|
|
214
|
+
col.options = !flag ? commonPageOptions : subTablePageOptions;
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function enableQuery(id) {
|
|
220
|
+
tableRef.value.setValues([{
|
|
221
|
+
rowKey: id,
|
|
222
|
+
values: { isQuery: "1" }
|
|
223
|
+
}]);
|
|
224
|
+
}
|
|
225
|
+
return __spreadProps(__spreadValues({}, setup), { columns, enableQuery, syncFieldShowType, changePageType });
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
229
|
+
const _component_JVxeTable = resolveComponent("JVxeTable");
|
|
230
|
+
return openBlock(), createBlock(_component_JVxeTable, {
|
|
231
|
+
ref: "tableRef",
|
|
232
|
+
rowNumber: "",
|
|
233
|
+
keyboardEdit: "",
|
|
234
|
+
maxHeight: _ctx.tableHeight.noToolbar,
|
|
235
|
+
loading: _ctx.loading,
|
|
236
|
+
columns: _ctx.columns,
|
|
237
|
+
dataSource: _ctx.dataSource,
|
|
238
|
+
disabledRows: { dbFieldName: ["id", "has_child"] }
|
|
239
|
+
}, null, 8, ["maxHeight", "loading", "columns", "dataSource"]);
|
|
240
|
+
}
|
|
241
|
+
var PageAttributeTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
242
|
+
export { PageAttributeTable as default };
|
package/ParamsTable.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, createElementVNode } from "vue";
|
|
2
|
+
import { JVxeTypes } from "/@/components/jeecg/JVxeTable/types";
|
|
3
|
+
import { _ as _export_sfc } from "./index.js";
|
|
4
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
5
|
+
import "/@/hooks/web/useMessage";
|
|
6
|
+
import "vue-router";
|
|
7
|
+
const _sfc_main = defineComponent({
|
|
8
|
+
name: "FieldTable",
|
|
9
|
+
props: {
|
|
10
|
+
loading: Boolean,
|
|
11
|
+
dataSource: Array
|
|
12
|
+
},
|
|
13
|
+
setup() {
|
|
14
|
+
const tableRef = ref();
|
|
15
|
+
const columns = ref([
|
|
16
|
+
{
|
|
17
|
+
title: "\u53C2\u6570",
|
|
18
|
+
key: "paramName",
|
|
19
|
+
width: 230,
|
|
20
|
+
type: JVxeTypes.input,
|
|
21
|
+
defaultValue: "",
|
|
22
|
+
placeholder: "\u8BF7\u8F93\u5165${title}",
|
|
23
|
+
validateRules: [{ required: true, message: "${title}\u4E0D\u80FD\u4E3A\u7A7A" }]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: "\u53C2\u6570\u6587\u672C",
|
|
27
|
+
key: "paramTxt",
|
|
28
|
+
width: 230,
|
|
29
|
+
type: JVxeTypes.input,
|
|
30
|
+
defaultValue: "",
|
|
31
|
+
placeholder: "\u8BF7\u8F93\u5165${title}",
|
|
32
|
+
validateRules: [{ required: true, message: "${title}\u4E0D\u80FD\u4E3A\u7A7A" }]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: "\u9ED8\u8BA4\u503C",
|
|
36
|
+
key: "paramValue",
|
|
37
|
+
type: JVxeTypes.input,
|
|
38
|
+
defaultValue: "",
|
|
39
|
+
placeholder: "\u8BF7\u8F93\u5165${title}"
|
|
40
|
+
}
|
|
41
|
+
]);
|
|
42
|
+
return { tableRef, columns };
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const _hoisted_1 = /* @__PURE__ */ createElementVNode("br", null, null, -1);
|
|
46
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
47
|
+
const _component_a_alert = resolveComponent("a-alert");
|
|
48
|
+
const _component_JVxeTable = resolveComponent("JVxeTable");
|
|
49
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
50
|
+
createVNode(_component_a_alert, {
|
|
51
|
+
type: "info",
|
|
52
|
+
showIcon: "",
|
|
53
|
+
message: "\u76EE\u524D\u53EA\u6709SQL\u6A21\u5F0F\u624D\u652F\u6301\u62A5\u8868\u53C2\u6570\uFF01"
|
|
54
|
+
}),
|
|
55
|
+
_hoisted_1,
|
|
56
|
+
createVNode(_component_JVxeTable, {
|
|
57
|
+
ref: "tableRef",
|
|
58
|
+
toolbar: "",
|
|
59
|
+
rowNumber: "",
|
|
60
|
+
rowSelection: "",
|
|
61
|
+
dragSort: "",
|
|
62
|
+
sortKey: "orderNum",
|
|
63
|
+
loading: _ctx.loading,
|
|
64
|
+
columns: _ctx.columns,
|
|
65
|
+
dataSource: _ctx.dataSource,
|
|
66
|
+
height: 336
|
|
67
|
+
}, null, 8, ["loading", "columns", "dataSource"])
|
|
68
|
+
], 64);
|
|
69
|
+
}
|
|
70
|
+
var ParamsTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
71
|
+
export { ParamsTable as default };
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
var fulfilled = (value) => {
|
|
4
|
+
try {
|
|
5
|
+
step(generator.next(value));
|
|
6
|
+
} catch (e) {
|
|
7
|
+
reject(e);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var rejected = (value) => {
|
|
11
|
+
try {
|
|
12
|
+
step(generator.throw(value));
|
|
13
|
+
} catch (e) {
|
|
14
|
+
reject(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { O as OnlineForm } from "./OnlineForm.js";
|
|
22
|
+
import { defineComponent, ref, watch, nextTick, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createCommentVNode, createTextVNode } from "vue";
|
|
23
|
+
import { defHttp } from "/@/utils/http/axios";
|
|
24
|
+
import { g as getRefPromise } from "./useAutoForm.js";
|
|
25
|
+
import { _ as _export_sfc } from "./index.js";
|
|
26
|
+
import "/@/hooks/web/useMessage";
|
|
27
|
+
import "/@/components/Form/index";
|
|
28
|
+
import "./FormSchemaFactory.js";
|
|
29
|
+
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
30
|
+
import "/@/components/Loading";
|
|
31
|
+
import "./OnlineSubForm.js";
|
|
32
|
+
import "/@/views/system/user/user.api";
|
|
33
|
+
import "/@/store/modules/user";
|
|
34
|
+
import "/@/utils";
|
|
35
|
+
import "/@/utils/desform/customExpression";
|
|
36
|
+
import "/@/components/Form/src/componentMap";
|
|
37
|
+
import "./OnlineSelectCascade.js";
|
|
38
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
39
|
+
import "vue-router";
|
|
40
|
+
import "./pick.js";
|
|
41
|
+
import "./isArray.js";
|
|
42
|
+
import "./toString.js";
|
|
43
|
+
import "./_arrayPush.js";
|
|
44
|
+
var ProcessOnlineForm_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
45
|
+
const _sfc_main = defineComponent({
|
|
46
|
+
name: "ProcessOnlineForm",
|
|
47
|
+
inheritAttrs: false,
|
|
48
|
+
components: {
|
|
49
|
+
OnlineForm
|
|
50
|
+
},
|
|
51
|
+
props: {
|
|
52
|
+
dataId: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: ""
|
|
55
|
+
},
|
|
56
|
+
tableName: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: ""
|
|
59
|
+
},
|
|
60
|
+
taskId: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ""
|
|
63
|
+
},
|
|
64
|
+
disabled: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
setup(props) {
|
|
70
|
+
const onlineFormCompRef = ref();
|
|
71
|
+
const formId = ref("");
|
|
72
|
+
const formTemplate = ref(1);
|
|
73
|
+
const isTreeForm = ref(false);
|
|
74
|
+
const pidFieldName = ref("");
|
|
75
|
+
const spinLoading = ref(false);
|
|
76
|
+
watch(() => props.tableName, (val) => {
|
|
77
|
+
if (!val) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
loadFormItems();
|
|
81
|
+
}, { immediate: true });
|
|
82
|
+
function loadFormItems() {
|
|
83
|
+
return __async(this, null, function* () {
|
|
84
|
+
spinLoading.value = true;
|
|
85
|
+
const url = `/online/cgform/api/getFormItemBytbname/${props.tableName}`;
|
|
86
|
+
const params = { taskId: props.taskId };
|
|
87
|
+
try {
|
|
88
|
+
let result = yield defHttp.get({ url, params });
|
|
89
|
+
console.log("\u52A8\u6001\u8868\u5355\u67E5\u8BE2\u7ED3\u679C\u662F\uFF1A", result);
|
|
90
|
+
formId.value = result.head.id;
|
|
91
|
+
formTemplate.value = Number(result.head.formTemplate || 1);
|
|
92
|
+
isTreeForm.value = result.head.isTree === "Y";
|
|
93
|
+
pidFieldName.value = result.head.treeParentIdField || "";
|
|
94
|
+
yield nextTick(() => __async(this, null, function* () {
|
|
95
|
+
let myForm = yield getRefPromise(onlineFormCompRef);
|
|
96
|
+
myForm.createRootProperties(result);
|
|
97
|
+
}));
|
|
98
|
+
} catch (e) {
|
|
99
|
+
console.error("\u6D41\u7A0B\u8868\u5355\u67E5\u8BE2\u5F02\u5E38", e);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function renderSuccess() {
|
|
104
|
+
return __async(this, null, function* () {
|
|
105
|
+
let myForm = yield getRefPromise(onlineFormCompRef);
|
|
106
|
+
spinLoading.value = false;
|
|
107
|
+
myForm.show(true, {
|
|
108
|
+
id: props.dataId
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
const buttonLoading = ref(false);
|
|
113
|
+
function handleSubmit() {
|
|
114
|
+
return __async(this, null, function* () {
|
|
115
|
+
buttonLoading.value = true;
|
|
116
|
+
onlineFormCompRef.value.handleSubmit();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
function handleSuccess() {
|
|
120
|
+
buttonLoading.value = false;
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
onlineFormCompRef,
|
|
124
|
+
formId,
|
|
125
|
+
formTemplate,
|
|
126
|
+
isTreeForm,
|
|
127
|
+
pidFieldName,
|
|
128
|
+
renderSuccess,
|
|
129
|
+
handleSuccess,
|
|
130
|
+
handleSubmit,
|
|
131
|
+
buttonLoading,
|
|
132
|
+
spinLoading
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
const _hoisted_1 = { class: "cust-onl-form" };
|
|
137
|
+
const _hoisted_2 = {
|
|
138
|
+
key: 0,
|
|
139
|
+
style: { "width": "100%", "text-align": "center", "margin-top": "5px" }
|
|
140
|
+
};
|
|
141
|
+
const _hoisted_3 = /* @__PURE__ */ createTextVNode(" \u63D0 \u4EA4 ");
|
|
142
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
143
|
+
const _component_a_button = resolveComponent("a-button");
|
|
144
|
+
const _component_online_form = resolveComponent("online-form");
|
|
145
|
+
const _component_a_spin = resolveComponent("a-spin");
|
|
146
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
147
|
+
createVNode(_component_a_spin, { spinning: _ctx.spinLoading }, {
|
|
148
|
+
default: withCtx(() => [
|
|
149
|
+
createVNode(_component_online_form, {
|
|
150
|
+
ref: "onlineFormCompRef",
|
|
151
|
+
id: _ctx.formId,
|
|
152
|
+
disabled: _ctx.disabled,
|
|
153
|
+
"form-template": _ctx.formTemplate,
|
|
154
|
+
isTree: _ctx.isTreeForm,
|
|
155
|
+
pidField: _ctx.pidFieldName,
|
|
156
|
+
onRendered: _ctx.renderSuccess,
|
|
157
|
+
onSuccess: _ctx.handleSuccess
|
|
158
|
+
}, {
|
|
159
|
+
bottom: withCtx(() => [
|
|
160
|
+
!_ctx.disabled && !_ctx.spinLoading ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
161
|
+
createVNode(_component_a_button, {
|
|
162
|
+
preIcon: "ant-design:check",
|
|
163
|
+
style: { "width": "126px" },
|
|
164
|
+
type: "primary",
|
|
165
|
+
onClick: _ctx.handleSubmit,
|
|
166
|
+
loading: _ctx.buttonLoading
|
|
167
|
+
}, {
|
|
168
|
+
default: withCtx(() => [
|
|
169
|
+
_hoisted_3
|
|
170
|
+
]),
|
|
171
|
+
_: 1
|
|
172
|
+
}, 8, ["onClick", "loading"])
|
|
173
|
+
])) : createCommentVNode("", true)
|
|
174
|
+
]),
|
|
175
|
+
_: 1
|
|
176
|
+
}, 8, ["id", "disabled", "form-template", "isTree", "pidField", "onRendered", "onSuccess"])
|
|
177
|
+
]),
|
|
178
|
+
_: 1
|
|
179
|
+
}, 8, ["spinning"])
|
|
180
|
+
]);
|
|
181
|
+
}
|
|
182
|
+
var ProcessOnlineForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9b256bc4"]]);
|
|
183
|
+
export { ProcessOnlineForm as default };
|