@jeecg/online 1.0.1 → 3.4.3-GA
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 +14 -7
- package/AuthButtonTree.js +3 -5
- package/AuthDataConfig.js +9 -6
- package/AuthDataTree.js +3 -5
- package/AuthFieldConfig.js +15 -12
- package/AuthFieldTree.js +24 -18
- package/AuthManagerDrawer.js +1 -1
- package/AuthSetterModal.js +1 -0
- package/CgformCopyList.js +34 -22
- package/CgformModal.js +57 -50
- package/CgreportModal.js +32 -39
- package/CheckDictTable.js +144 -24
- package/CodeFileListModal.js +175 -0
- package/CodeFileViewModal.js +325 -0
- package/CodeGeneratorModal.js +41 -38
- package/CustomButtonList.js +19 -22
- package/DBAttributeTable.js +248 -12
- package/DbToOnlineModal.js +27 -25
- package/DetailForm.js +609 -0
- package/EnhanceJavaModal.js +11 -17
- package/EnhanceJsHistory.js +6 -8
- package/EnhanceJsModal.js +16 -16
- package/EnhanceSqlModal.js +11 -17
- package/ExtendConfigModal.js +24 -15
- package/ForeignKeyTable.js +4 -3
- package/FormSchemaFactory.js +163 -30
- package/IndexTable.js +6 -5
- package/JModalTip.js +54 -0
- package/JOnlineSearchSelect.js +18 -10
- package/LeftDepart.js +1 -1
- package/LeftRole.js +7 -4
- package/LeftUser.js +7 -4
- package/LinkTableConfigModal.js +289 -0
- package/LinkTableFieldConfigModal.js +218 -0
- package/LinkTableListPiece.js +36 -0
- package/ModalFormDemo.js +3 -2
- package/OnlineAutoList.js +154 -55
- package/OnlineAutoModal.js +92 -131
- package/OnlineAutoTreeList.js +93 -53
- package/OnlineCustomModal.js +30 -14
- package/OnlineDetailModal.js +184 -0
- package/OnlineForm.js +274 -141
- package/OnlineFormDetail.js +326 -0
- package/OnlineQueryForm.js +72 -40
- package/OnlineSearchFormItem.js +26 -18
- package/OnlineSelectCascade.js +37 -26
- package/OnlineSubFormDetail.js +167 -0
- package/OnlineSuperQuery.js +70 -75
- package/OnlineSuperQueryValComponent.js +1 -0
- package/OnlineSuperQueryValComponent.vue_vue_type_script_lang.js +1 -17
- package/PageAttributeTable.js +233 -30
- package/ProcessOnlineForm.js +41 -16
- package/QueryTable.js +4 -3
- package/README.md +3 -8
- package/_arrayPush.js +5 -3
- package/{cloneDeep.js → _baseClone.js} +5 -9
- package/_baseSlice.js +18 -0
- package/_commonjsHelpers.js +5 -0
- package/_flatRest.js +174 -0
- package/auth.data.js +1 -3
- package/cgform.data.js +18 -9
- package/enhance.api.js +27 -18
- package/index.js +27 -8
- package/index2.js +48 -45
- package/index3.js +29 -26
- package/isArray.js +1 -1
- package/main.index.js +2 -2
- package/omit.js +60 -0
- package/package.json +1 -1
- package/pick.js +3 -173
- package/style.css +1 -1
- package/toString.js +2 -2
- package/useAutoForm.js +3457 -3791
- package/useCgformList.js +44 -31
- package/{useTableColumns.js → useListButton.js} +218 -409
- package/useOnlineTest.js +5 -26827
- package/useSchemas.js +382 -234
- package/useTableSync.js +19 -7
- package/ChartAutoRender.js +0 -69
- package/ChartDoubleRender.js +0 -154
- package/ChartSingleRender.js +0 -132
- package/ChartTabsRender.js +0 -218
- package/ErrorTip.js +0 -21
- package/FieldTable.js +0 -185
- package/GraphreportAutoChart.js +0 -352
- package/GraphreportList.js +0 -239
- package/GraphreportModal.js +0 -559
- package/LICENSE +0 -7
- package/OnlineSubForm.js +0 -200
- package/ParamsTable.js +0 -71
- package/graphreport.api.js +0 -23
- package/useChartRender.js +0 -405
- package/useMessageOnline.js +0 -71
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __async = (__this, __arguments, generator) => {
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
var fulfilled = (value) => {
|
|
20
|
+
try {
|
|
21
|
+
step(generator.next(value));
|
|
22
|
+
} catch (e) {
|
|
23
|
+
reject(e);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var rejected = (value) => {
|
|
27
|
+
try {
|
|
28
|
+
step(generator.throw(value));
|
|
29
|
+
} catch (e) {
|
|
30
|
+
reject(e);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
34
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
import { useMessage } from "/@/hooks/web/useMessage";
|
|
38
|
+
import { ref, reactive, resolveComponent, openBlock, createElementBlock, createVNode, createCommentVNode, createBlock, withCtx, Fragment, renderList, normalizeStyle, renderSlot } from "vue";
|
|
39
|
+
import { Loading } from "/@/components/Loading";
|
|
40
|
+
import { getToken } from "/@/utils/auth";
|
|
41
|
+
import { goJmReportViewPage } from "/@/utils";
|
|
42
|
+
import { PrinterOutlined } from "@ant-design/icons-vue";
|
|
43
|
+
import DetailForm from "./DetailForm.js";
|
|
44
|
+
import OnlineSubFormDetail from "./OnlineSubFormDetail.js";
|
|
45
|
+
import { d as getDetailFormSchemas } from "./useAutoForm.js";
|
|
46
|
+
import { defHttp } from "/@/utils/http/axios";
|
|
47
|
+
import { _ as _export_sfc } from "./index.js";
|
|
48
|
+
import "/@/utils/propTypes";
|
|
49
|
+
import "/@/utils/dict";
|
|
50
|
+
import "/@/utils/dict/JDictSelectUtil";
|
|
51
|
+
import "/@/utils/dict/index";
|
|
52
|
+
import "/@/api/common/api";
|
|
53
|
+
import "/@/components/Form/src/utils/Area";
|
|
54
|
+
import "/@/utils/common/compUtils";
|
|
55
|
+
import "/@/components/Preview/index";
|
|
56
|
+
import "/@/components/Form/index";
|
|
57
|
+
import "./FormSchemaFactory.js";
|
|
58
|
+
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
59
|
+
import "/@/views/system/user/user.api";
|
|
60
|
+
import "./_commonjsHelpers.js";
|
|
61
|
+
import "/@/store/modules/user";
|
|
62
|
+
import "/@/utils/desform/customExpression";
|
|
63
|
+
import "/@/components/Form/src/componentMap";
|
|
64
|
+
import "./OnlineSelectCascade.js";
|
|
65
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
66
|
+
import "vue-router";
|
|
67
|
+
import "/@/store/modules/permission";
|
|
68
|
+
import "/@/components/Modal";
|
|
69
|
+
import "./pick.js";
|
|
70
|
+
import "./_flatRest.js";
|
|
71
|
+
import "./isArray.js";
|
|
72
|
+
import "./toString.js";
|
|
73
|
+
import "./_arrayPush.js";
|
|
74
|
+
import "/@/components/Table";
|
|
75
|
+
import "/@/hooks/system/useListPage";
|
|
76
|
+
import "./LinkTableListPiece.js";
|
|
77
|
+
import "./JModalTip.js";
|
|
78
|
+
import "ant-design-vue";
|
|
79
|
+
import "@vueuse/core";
|
|
80
|
+
const _sfc_main = {
|
|
81
|
+
name: "OnlineFormDetail",
|
|
82
|
+
components: {
|
|
83
|
+
DetailForm,
|
|
84
|
+
Loading,
|
|
85
|
+
PrinterOutlined,
|
|
86
|
+
OnlineSubFormDetail
|
|
87
|
+
},
|
|
88
|
+
props: {
|
|
89
|
+
id: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: ""
|
|
92
|
+
},
|
|
93
|
+
formTemplate: {
|
|
94
|
+
type: Number,
|
|
95
|
+
default: 1
|
|
96
|
+
},
|
|
97
|
+
disabled: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: false
|
|
100
|
+
},
|
|
101
|
+
isTree: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: false
|
|
104
|
+
},
|
|
105
|
+
pidField: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: ""
|
|
108
|
+
},
|
|
109
|
+
submitTip: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: true
|
|
112
|
+
},
|
|
113
|
+
showSub: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: true
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
emits: ["success", "rendered"],
|
|
119
|
+
setup(props, { emit }) {
|
|
120
|
+
console.log("onlineForm-setup\u300B\u300B");
|
|
121
|
+
const { createMessage: $message } = useMessage();
|
|
122
|
+
const tableName = ref("");
|
|
123
|
+
const single = ref(true);
|
|
124
|
+
const loading = ref(false);
|
|
125
|
+
const tableType = ref(1);
|
|
126
|
+
const formData = ref({});
|
|
127
|
+
const subFormHeight = ref(300);
|
|
128
|
+
const subTableHeight = ref(340);
|
|
129
|
+
const onlineExtConfigJson = reactive({
|
|
130
|
+
reportPrintShow: 0,
|
|
131
|
+
reportPrintUrl: "",
|
|
132
|
+
joinQuery: 0,
|
|
133
|
+
modelFullscreen: 0,
|
|
134
|
+
modalMinWidth: ""
|
|
135
|
+
});
|
|
136
|
+
const { detailFormSchemas, hasSubTable, subTabInfo, refMap, subDataSource, createFormSchemas, formSpan } = getDetailFormSchemas(props);
|
|
137
|
+
function handleExtConfigJson(jsonStr) {
|
|
138
|
+
let extConfigJson = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen: 1, modalMinWidth: "" };
|
|
139
|
+
if (jsonStr) {
|
|
140
|
+
extConfigJson = JSON.parse(jsonStr);
|
|
141
|
+
}
|
|
142
|
+
Object.keys(extConfigJson).map((k) => {
|
|
143
|
+
onlineExtConfigJson[k] = extConfigJson[k];
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function createRootProperties(data) {
|
|
147
|
+
return __async(this, null, function* () {
|
|
148
|
+
tableType.value = data.head.tableType;
|
|
149
|
+
tableName.value = data.head.tableName;
|
|
150
|
+
single.value = data.head.tableType == 1;
|
|
151
|
+
handleExtConfigJson(data.head.extConfigJson);
|
|
152
|
+
createFormSchemas(data.schema.properties);
|
|
153
|
+
emit("rendered", onlineExtConfigJson);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function show(_status, record) {
|
|
157
|
+
return __async(this, null, function* () {
|
|
158
|
+
console.log("\u8FDB\u5165\u8868\u5355\u8BE6\u60C5\u300B\u300Bform", record);
|
|
159
|
+
yield edit(record);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
function getFormData(dataId) {
|
|
163
|
+
let url = `/online/cgform/api/detail/${props.id}/${dataId}`;
|
|
164
|
+
return new Promise((resolve, reject) => {
|
|
165
|
+
defHttp.get({ url }, { isTransformResponse: false }).then((res) => {
|
|
166
|
+
if (res.success) {
|
|
167
|
+
resolve(res.result);
|
|
168
|
+
} else {
|
|
169
|
+
reject();
|
|
170
|
+
$message.warning(res.message);
|
|
171
|
+
}
|
|
172
|
+
}).catch(() => {
|
|
173
|
+
reject();
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
function edit(record) {
|
|
178
|
+
return __async(this, null, function* () {
|
|
179
|
+
let temp = yield getFormData(record.id);
|
|
180
|
+
formData.value = __spreadValues({}, temp);
|
|
181
|
+
editSubVxeTableData(temp);
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function editSubVxeTableData(record) {
|
|
185
|
+
if (!record) {
|
|
186
|
+
record = {};
|
|
187
|
+
}
|
|
188
|
+
let keys = Object.keys(subDataSource.value);
|
|
189
|
+
if (keys && keys.length > 0) {
|
|
190
|
+
let obj = {};
|
|
191
|
+
for (let key of keys) {
|
|
192
|
+
obj[key] = record[key] || [];
|
|
193
|
+
}
|
|
194
|
+
subDataSource.value = obj;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function getSubTableAuthPre(table) {
|
|
198
|
+
return "online_" + table + ":";
|
|
199
|
+
}
|
|
200
|
+
function onOpenReportPrint() {
|
|
201
|
+
let url = onlineExtConfigJson.reportPrintUrl;
|
|
202
|
+
let temp = formData.value;
|
|
203
|
+
if (temp) {
|
|
204
|
+
let id = temp.id;
|
|
205
|
+
let token = getToken();
|
|
206
|
+
goJmReportViewPage(url, id, token);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function getSubTableForeignKeyValue(key) {
|
|
210
|
+
let temp = formData.value;
|
|
211
|
+
console.log("getValueIgnoreCase(temp, key)", temp, key, getValueIgnoreCase(temp, key));
|
|
212
|
+
return getValueIgnoreCase(temp, key);
|
|
213
|
+
}
|
|
214
|
+
function getValueIgnoreCase(data, key) {
|
|
215
|
+
if (data) {
|
|
216
|
+
let temp = data[key];
|
|
217
|
+
if (!temp && temp !== 0) {
|
|
218
|
+
temp = data[key.toLowerCase()];
|
|
219
|
+
if (!temp && temp !== 0) {
|
|
220
|
+
temp = data[key.toUpperCase()];
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return temp;
|
|
224
|
+
}
|
|
225
|
+
return "";
|
|
226
|
+
}
|
|
227
|
+
return {
|
|
228
|
+
detailFormSchemas,
|
|
229
|
+
formData,
|
|
230
|
+
formSpan,
|
|
231
|
+
tableName,
|
|
232
|
+
loading,
|
|
233
|
+
hasSubTable,
|
|
234
|
+
subTabInfo,
|
|
235
|
+
subFormHeight,
|
|
236
|
+
subTableHeight,
|
|
237
|
+
refMap,
|
|
238
|
+
subDataSource,
|
|
239
|
+
getSubTableAuthPre,
|
|
240
|
+
show,
|
|
241
|
+
createRootProperties,
|
|
242
|
+
onOpenReportPrint,
|
|
243
|
+
onlineExtConfigJson,
|
|
244
|
+
getSubTableForeignKeyValue
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
const _hoisted_1 = ["id"];
|
|
249
|
+
const _hoisted_2 = {
|
|
250
|
+
key: 0,
|
|
251
|
+
style: { "text-align": "right", "position": "absolute", "top": "15px", "right": "20px", "z-index": "999" }
|
|
252
|
+
};
|
|
253
|
+
const _hoisted_3 = { key: 1 };
|
|
254
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
255
|
+
const _component_PrinterOutlined = resolveComponent("PrinterOutlined");
|
|
256
|
+
const _component_detail_form = resolveComponent("detail-form");
|
|
257
|
+
const _component_online_sub_form_detail = resolveComponent("online-sub-form-detail");
|
|
258
|
+
const _component_JVxeTable = resolveComponent("JVxeTable");
|
|
259
|
+
const _component_a_tab_pane = resolveComponent("a-tab-pane");
|
|
260
|
+
const _component_a_tabs = resolveComponent("a-tabs");
|
|
261
|
+
const _component_Loading = resolveComponent("Loading");
|
|
262
|
+
return openBlock(), createElementBlock("div", {
|
|
263
|
+
id: $setup.tableName + "_form"
|
|
264
|
+
}, [
|
|
265
|
+
!!$setup.formData.id && !!$setup.onlineExtConfigJson.reportPrintShow ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
266
|
+
createVNode(_component_PrinterOutlined, {
|
|
267
|
+
title: "\u6253\u5370",
|
|
268
|
+
onClick: $setup.onOpenReportPrint,
|
|
269
|
+
style: { "font-size": "16px" }
|
|
270
|
+
}, null, 8, ["onClick"])
|
|
271
|
+
])) : createCommentVNode("", true),
|
|
272
|
+
createVNode(_component_detail_form, {
|
|
273
|
+
schemas: $setup.detailFormSchemas,
|
|
274
|
+
data: $setup.formData,
|
|
275
|
+
span: $setup.formSpan
|
|
276
|
+
}, null, 8, ["schemas", "data", "span"]),
|
|
277
|
+
$setup.hasSubTable && $props.showSub ? (openBlock(), createBlock(_component_a_tabs, { key: 1 }, {
|
|
278
|
+
default: withCtx(() => [
|
|
279
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.subTabInfo, (sub, index) => {
|
|
280
|
+
return openBlock(), createBlock(_component_a_tab_pane, {
|
|
281
|
+
tab: sub.describe,
|
|
282
|
+
key: index + "",
|
|
283
|
+
forceRender: true
|
|
284
|
+
}, {
|
|
285
|
+
default: withCtx(() => [
|
|
286
|
+
sub.relationType == 1 ? (openBlock(), createElementBlock("div", {
|
|
287
|
+
key: 0,
|
|
288
|
+
style: normalizeStyle({ "overflow-y": "auto", "overflow-x": "hidden", "max-height": $setup.subFormHeight + "px" })
|
|
289
|
+
}, [
|
|
290
|
+
createVNode(_component_online_sub_form_detail, {
|
|
291
|
+
table: sub.key,
|
|
292
|
+
"form-template": $props.formTemplate,
|
|
293
|
+
"main-id": $setup.getSubTableForeignKeyValue(sub.foreignKey),
|
|
294
|
+
properties: sub.properties
|
|
295
|
+
}, null, 8, ["table", "form-template", "main-id", "properties"])
|
|
296
|
+
], 4)) : (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
297
|
+
createVNode(_component_JVxeTable, {
|
|
298
|
+
ref_for: true,
|
|
299
|
+
ref: $setup.refMap[sub.key],
|
|
300
|
+
toolbar: "",
|
|
301
|
+
"keep-source": "",
|
|
302
|
+
"row-number": "",
|
|
303
|
+
"row-selection": "",
|
|
304
|
+
height: $setup.subTableHeight,
|
|
305
|
+
disabled: true,
|
|
306
|
+
columns: sub.columns,
|
|
307
|
+
dataSource: $setup.subDataSource[sub.key],
|
|
308
|
+
authPre: $setup.getSubTableAuthPre(sub.key)
|
|
309
|
+
}, null, 8, ["height", "columns", "dataSource", "authPre"])
|
|
310
|
+
]))
|
|
311
|
+
]),
|
|
312
|
+
_: 2
|
|
313
|
+
}, 1032, ["tab"]);
|
|
314
|
+
}), 128))
|
|
315
|
+
]),
|
|
316
|
+
_: 1
|
|
317
|
+
})) : createCommentVNode("", true),
|
|
318
|
+
createVNode(_component_Loading, {
|
|
319
|
+
loading: $setup.loading,
|
|
320
|
+
absolute: false
|
|
321
|
+
}, null, 8, ["loading"]),
|
|
322
|
+
renderSlot(_ctx.$slots, "bottom")
|
|
323
|
+
], 8, _hoisted_1);
|
|
324
|
+
}
|
|
325
|
+
var OnlineFormDetail = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
326
|
+
export { OnlineFormDetail as default };
|
package/OnlineQueryForm.js
CHANGED
|
@@ -38,11 +38,12 @@ import { BasicForm, useForm } from "/@/components/Form/index";
|
|
|
38
38
|
import { ref, reactive, watch, toRaw, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, pushScopeId, popScopeId } from "vue";
|
|
39
39
|
import { defHttp } from "/@/utils/http/axios";
|
|
40
40
|
import { useMessage } from "/@/hooks/web/useMessage";
|
|
41
|
-
import {
|
|
42
|
-
import { g as getRefPromise,
|
|
41
|
+
import { c as FORM_VIEW_TO_QUERY_VIEW, F as FormSchemaFactory } from "./FormSchemaFactory.js";
|
|
42
|
+
import { g as getRefPromise, e as loadOneFieldDefVal, f as LINK_DOWN, h as handleLinkDown, i as getFieldIndex } from "./useAutoForm.js";
|
|
43
43
|
import { _ as _export_sfc } from "./index.js";
|
|
44
44
|
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
45
45
|
import "/@/views/system/user/user.api";
|
|
46
|
+
import "./_commonjsHelpers.js";
|
|
46
47
|
import "/@/store/modules/user";
|
|
47
48
|
import "/@/utils";
|
|
48
49
|
import "/@/utils/desform/customExpression";
|
|
@@ -50,6 +51,27 @@ import "/@/components/Form/src/componentMap";
|
|
|
50
51
|
import "./OnlineSelectCascade.js";
|
|
51
52
|
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
52
53
|
import "vue-router";
|
|
54
|
+
import "/@/store/modules/permission";
|
|
55
|
+
import "/@/utils/propTypes";
|
|
56
|
+
import "@ant-design/icons-vue";
|
|
57
|
+
import "/@/components/Modal";
|
|
58
|
+
import "/@/utils/dict/JDictSelectUtil";
|
|
59
|
+
import "/@/utils/common/compUtils";
|
|
60
|
+
import "./pick.js";
|
|
61
|
+
import "./_flatRest.js";
|
|
62
|
+
import "./isArray.js";
|
|
63
|
+
import "./toString.js";
|
|
64
|
+
import "./_arrayPush.js";
|
|
65
|
+
import "/@/components/Table";
|
|
66
|
+
import "/@/hooks/system/useListPage";
|
|
67
|
+
import "/@/components/Form/src/utils/Area";
|
|
68
|
+
import "/@/components/Preview/index";
|
|
69
|
+
import "./LinkTableListPiece.js";
|
|
70
|
+
import "/@/components/Loading";
|
|
71
|
+
import "/@/utils/auth";
|
|
72
|
+
import "./JModalTip.js";
|
|
73
|
+
import "ant-design-vue";
|
|
74
|
+
import "@vueuse/core";
|
|
53
75
|
var OnlineQueryForm_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
54
76
|
const _sfc_main = {
|
|
55
77
|
name: "OnlineQueryForm",
|
|
@@ -64,27 +86,31 @@ const _sfc_main = {
|
|
|
64
86
|
},
|
|
65
87
|
emits: ["search", "loaded"],
|
|
66
88
|
setup(props, { emit }) {
|
|
67
|
-
const { createMessage: $message } = useMessage();
|
|
68
89
|
const LOAD_URL = "/online/cgform/api/getQueryInfoVue3/";
|
|
69
90
|
const onlineQueryFormRef = ref(null);
|
|
70
91
|
const formSchemas = ref([]);
|
|
71
|
-
const baseColProps = ref({ sm: 24, md: 8 });
|
|
92
|
+
const baseColProps = ref({ xs: 24, sm: 24, md: 12, lg: 8, xl: 8 });
|
|
72
93
|
const toggleButtonShow = ref(false);
|
|
73
94
|
const toggleSearchStatus = ref(false);
|
|
74
95
|
const queryParams = ref({});
|
|
75
96
|
const hideList = ref([]);
|
|
97
|
+
const { createMessage: $message } = useMessage();
|
|
76
98
|
const defaultValues = reactive({
|
|
77
99
|
config: {},
|
|
78
100
|
cache: {},
|
|
79
101
|
param: {},
|
|
80
102
|
status: false
|
|
81
103
|
});
|
|
82
|
-
watch(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
104
|
+
watch(
|
|
105
|
+
() => defaultValues.status,
|
|
106
|
+
(val) => __async(this, null, function* () {
|
|
107
|
+
console.log("-------------defaultValues\u53D1\u751F\u6539\u53D8,\u9700\u8981\u91CD\u7F6E\u8868\u5355---------------");
|
|
108
|
+
const { config, cache, param } = toRaw(defaultValues);
|
|
109
|
+
let rawValues = Object.assign({}, config, cache, param);
|
|
110
|
+
yield customSetFieldsValue(rawValues);
|
|
111
|
+
}),
|
|
112
|
+
{ immediate: true, deep: true }
|
|
113
|
+
);
|
|
88
114
|
function initDefaultValues(cache, param) {
|
|
89
115
|
return __async(this, null, function* () {
|
|
90
116
|
defaultValues.cache = __spreadValues({}, cache);
|
|
@@ -92,13 +118,17 @@ const _sfc_main = {
|
|
|
92
118
|
defaultValues.status = !defaultValues.status;
|
|
93
119
|
});
|
|
94
120
|
}
|
|
95
|
-
watch(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
121
|
+
watch(
|
|
122
|
+
() => props.id,
|
|
123
|
+
(val) => {
|
|
124
|
+
if (val) {
|
|
125
|
+
resetForm();
|
|
126
|
+
} else {
|
|
127
|
+
formSchemas.value = [];
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{ immediate: true }
|
|
131
|
+
);
|
|
102
132
|
function initSchemas(formProperties) {
|
|
103
133
|
return __async(this, null, function* () {
|
|
104
134
|
let arr = [];
|
|
@@ -111,7 +141,7 @@ const _sfc_main = {
|
|
|
111
141
|
item.view = FORM_VIEW_TO_QUERY_VIEW[view];
|
|
112
142
|
}
|
|
113
143
|
yield loadOneFieldDefVal(key, item, configValue);
|
|
114
|
-
if (item.mode == "group" && (
|
|
144
|
+
if (item.mode == "group" && ("date" == view || "datetime" == view || "number" == view)) {
|
|
115
145
|
let temp = FormSchemaFactory.createSlotFormSchema(key, item);
|
|
116
146
|
arr.push(temp);
|
|
117
147
|
} else {
|
|
@@ -286,19 +316,23 @@ const _sfc_main = {
|
|
|
286
316
|
});
|
|
287
317
|
return data;
|
|
288
318
|
}
|
|
289
|
-
watch(
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
let
|
|
293
|
-
|
|
294
|
-
arr
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
319
|
+
watch(
|
|
320
|
+
() => toggleSearchStatus.value,
|
|
321
|
+
(status) => {
|
|
322
|
+
let names = hideList.value;
|
|
323
|
+
if (names && names.length > 0) {
|
|
324
|
+
let arr = [];
|
|
325
|
+
for (let name of names) {
|
|
326
|
+
arr.push({
|
|
327
|
+
field: name,
|
|
328
|
+
show: status
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
updateSchema(arr);
|
|
298
332
|
}
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
|
|
333
|
+
},
|
|
334
|
+
{ immediate: false }
|
|
335
|
+
);
|
|
302
336
|
return {
|
|
303
337
|
onlineQueryFormRef,
|
|
304
338
|
registerForm,
|
|
@@ -312,7 +346,7 @@ const _sfc_main = {
|
|
|
312
346
|
};
|
|
313
347
|
}
|
|
314
348
|
};
|
|
315
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
349
|
+
const _withScopeId = (n) => (pushScopeId("data-v-01d37a80"), n = n(), popScopeId(), n);
|
|
316
350
|
const _hoisted_1 = {
|
|
317
351
|
key: 0,
|
|
318
352
|
class: "jeecg-basic-table-form-container p-0"
|
|
@@ -324,8 +358,6 @@ const _hoisted_5 = {
|
|
|
324
358
|
style: { "float": "left", "overflow": "hidden", "margin-left": "10px" },
|
|
325
359
|
class: "table-page-search-submitButtons"
|
|
326
360
|
};
|
|
327
|
-
const _hoisted_6 = /* @__PURE__ */ createTextVNode("\u67E5\u8BE2");
|
|
328
|
-
const _hoisted_7 = /* @__PURE__ */ createTextVNode("\u91CD\u7F6E");
|
|
329
361
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
330
362
|
const _component_a_date_picker = resolveComponent("a-date-picker");
|
|
331
363
|
const _component_a_input_number = resolveComponent("a-input-number");
|
|
@@ -345,7 +377,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
345
377
|
placeholder: "\u5F00\u59CB\u65E5\u671F",
|
|
346
378
|
value: model[field + "_begin"],
|
|
347
379
|
"onUpdate:value": ($event) => model[field + "_begin"] = $event,
|
|
348
|
-
style: { "width": "calc(50% - 15px)" }
|
|
380
|
+
style: { "width": "calc(50% - 15px)", "min-width": "100px" }
|
|
349
381
|
}, null, 8, ["value", "onUpdate:value"]),
|
|
350
382
|
_hoisted_2,
|
|
351
383
|
createVNode(_component_a_date_picker, {
|
|
@@ -354,7 +386,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
354
386
|
placeholder: "\u7ED3\u675F\u65E5\u671F",
|
|
355
387
|
value: model[field + "_end"],
|
|
356
388
|
"onUpdate:value": ($event) => model[field + "_end"] = $event,
|
|
357
|
-
style: { "width": "calc(50% - 15px)" }
|
|
389
|
+
style: { "width": "calc(50% - 15px)", "min-width": "100px" }
|
|
358
390
|
}, null, 8, ["value", "onUpdate:value"])
|
|
359
391
|
]),
|
|
360
392
|
groupDatetime: withCtx(({ model, field }) => [
|
|
@@ -364,7 +396,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
364
396
|
placeholder: "\u5F00\u59CB\u65F6\u95F4",
|
|
365
397
|
value: model[field + "_begin"],
|
|
366
398
|
"onUpdate:value": ($event) => model[field + "_begin"] = $event,
|
|
367
|
-
style: { "width": "calc(50% - 15px)" }
|
|
399
|
+
style: { "min-width": "100px", "width": "calc(50% - 15px)" }
|
|
368
400
|
}, null, 8, ["value", "onUpdate:value"]),
|
|
369
401
|
_hoisted_3,
|
|
370
402
|
createVNode(_component_a_date_picker, {
|
|
@@ -373,7 +405,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
373
405
|
placeholder: "\u7ED3\u675F\u65F6\u95F4",
|
|
374
406
|
value: model[field + "_end"],
|
|
375
407
|
"onUpdate:value": ($event) => model[field + "_end"] = $event,
|
|
376
|
-
style: { "width": "calc(50% - 15px)" }
|
|
408
|
+
style: { "min-width": "100px", "width": "calc(50% - 15px)" }
|
|
377
409
|
}, null, 8, ["value", "onUpdate:value"])
|
|
378
410
|
]),
|
|
379
411
|
groupNumber: withCtx(({ model, field }) => [
|
|
@@ -404,7 +436,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
404
436
|
onClick: $setup.doSearch
|
|
405
437
|
}, {
|
|
406
438
|
default: withCtx(() => [
|
|
407
|
-
|
|
439
|
+
createTextVNode("\u67E5\u8BE2")
|
|
408
440
|
]),
|
|
409
441
|
_: 1
|
|
410
442
|
}, 8, ["onClick"]),
|
|
@@ -415,7 +447,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
415
447
|
style: { "margin-left": "8px" }
|
|
416
448
|
}, {
|
|
417
449
|
default: withCtx(() => [
|
|
418
|
-
|
|
450
|
+
createTextVNode("\u91CD\u7F6E")
|
|
419
451
|
]),
|
|
420
452
|
_: 1
|
|
421
453
|
}, 8, ["onClick"]),
|
|
@@ -438,5 +470,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
438
470
|
}, 8, ["onRegister"])
|
|
439
471
|
])) : createCommentVNode("", true);
|
|
440
472
|
}
|
|
441
|
-
var OnlineQueryForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
473
|
+
var OnlineQueryForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-01d37a80"]]);
|
|
442
474
|
export { OnlineQueryForm as default };
|
package/OnlineSearchFormItem.js
CHANGED
|
@@ -75,21 +75,29 @@ const __default__ = defineComponent({
|
|
|
75
75
|
let innerValue = ref("");
|
|
76
76
|
let beginValue = ref("");
|
|
77
77
|
let endValue = ref("");
|
|
78
|
-
watch(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
78
|
+
watch(
|
|
79
|
+
() => props.value,
|
|
80
|
+
() => {
|
|
81
|
+
if (isEasySelect()) {
|
|
82
|
+
innerValue.value = !!props.value ? props.value : void 0;
|
|
83
|
+
} else {
|
|
84
|
+
innerValue.value = props.value;
|
|
85
|
+
}
|
|
86
|
+
if (!props.value) {
|
|
87
|
+
beginValue.value = "";
|
|
88
|
+
endValue.value = "";
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{ deep: true, immediate: true }
|
|
92
|
+
);
|
|
93
|
+
watch(
|
|
94
|
+
innerValue,
|
|
95
|
+
(newVal) => {
|
|
96
|
+
console.log("innerValue-change", newVal);
|
|
97
|
+
emit("update:value", newVal);
|
|
98
|
+
},
|
|
99
|
+
{ immediate: true }
|
|
100
|
+
);
|
|
93
101
|
watch(beginValue, (newVal) => {
|
|
94
102
|
emit("change", props.item.field + "_begin", newVal);
|
|
95
103
|
emit("update:value", "1");
|
|
@@ -211,7 +219,7 @@ const __default__ = defineComponent({
|
|
|
211
219
|
});
|
|
212
220
|
const __injectCSSVars__ = () => {
|
|
213
221
|
useCssVars((_ctx) => ({
|
|
214
|
-
"
|
|
222
|
+
"0c8831e5": _ctx.labelTextMaxWidth
|
|
215
223
|
}));
|
|
216
224
|
};
|
|
217
225
|
const __setup__ = __default__.setup;
|
|
@@ -220,7 +228,7 @@ __default__.setup = __setup__ ? (props, ctx) => {
|
|
|
220
228
|
return __setup__(props, ctx);
|
|
221
229
|
} : __injectCSSVars__;
|
|
222
230
|
const _sfc_main = __default__;
|
|
223
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
231
|
+
const _withScopeId = (n) => (pushScopeId("data-v-31eb536e"), n = n(), popScopeId(), n);
|
|
224
232
|
const _hoisted_1 = ["title"];
|
|
225
233
|
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "group-query-strig" }, "~", -1));
|
|
226
234
|
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "group-query-strig" }, "~", -1));
|
|
@@ -424,5 +432,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
424
432
|
_: 1
|
|
425
433
|
}, 8, ["labelCol"]);
|
|
426
434
|
}
|
|
427
|
-
var OnlineSearchFormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
435
|
+
var OnlineSearchFormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-31eb536e"]]);
|
|
428
436
|
export { OnlineSearchFormItem as default };
|