@jeecg/online 3.5.3-beta3 → 3.6.0-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/AuthButtonConfig-b6a674fa.mjs +125 -0
- package/AuthButtonTree-09e57bc4.mjs +156 -0
- package/AuthDataConfig-6e7e61ec.mjs +212 -0
- package/AuthDataTree-e83286c5.mjs +139 -0
- package/AuthFieldConfig-f1ec2708.mjs +139 -0
- package/AuthFieldTree-bb72e21f.mjs +232 -0
- package/AuthManagerDrawer-28a2d108.mjs +114 -0
- package/AuthSetterModal-2990d553.mjs +261 -0
- package/CgformCopyList-36a4cbf0.mjs +246 -0
- package/CgformModal-7399a5ac.mjs +611 -0
- package/CgreportModal-2eb9c9e1.mjs +13 -0
- package/CgreportModal.vue_vue_type_script_setup_true_lang-c2ceb064.mjs +566 -0
- package/CheckDictTable-3a8a54b3.mjs +211 -0
- package/CodeFileListModal-72f0d3bb.mjs +158 -0
- package/CodeFileViewModal-9eb88c47.mjs +244 -0
- package/CodeGeneratorModal-a89958f5.mjs +233 -0
- package/CustomButtonList-c44aec5a.mjs +363 -0
- package/DBAttributeTable-7d285e8d.mjs +473 -0
- package/DbToOnlineModal-d23cbeb1.mjs +160 -0
- package/DetailForm-2901d215.mjs +461 -0
- package/EnhanceJavaModal-153899a9.mjs +264 -0
- package/EnhanceJsHistory-7f5db3b1.mjs +184 -0
- package/EnhanceJsModal-c2fb75b8.mjs +311 -0
- package/EnhanceSqlModal-965e9b0a.mjs +268 -0
- package/ExtendConfigModal-8f08466f.mjs +111 -0
- package/FieldExtendJsonModal-adfcf5a7.mjs +219 -0
- package/FileSelectModal-432d4521.mjs +103 -0
- package/ForeignKeyTable-faab7ccf.mjs +69 -0
- package/IndexTable-0a2d3718.mjs +89 -0
- package/JModalTip-e1938b49.mjs +46 -0
- package/JOnlineSearchSelect-7e908492.mjs +95 -0
- package/LeftDepart-54f245b3.mjs +82 -0
- package/LeftRole-c138f892.mjs +86 -0
- package/LeftUser-9c812f8a.mjs +105 -0
- package/LinkTableConfigModal-c2c5c7e6.mjs +230 -0
- package/LinkTableFieldConfigModal-a3553b1f.mjs +176 -0
- package/LinkTableListPiece-7f793b08.mjs +34 -0
- package/ModalFormDemo-65685b0e.mjs +78 -0
- package/OnlCgformErpList-52c87ed3.mjs +449 -0
- package/OnlCgformErpSubTable-6e7fb17b.mjs +398 -0
- package/OnlCgformInnerSubTable-f0727b8f.mjs +248 -0
- package/OnlCgformInnerTableList-9f89c173.mjs +430 -0
- package/OnlCgformTabList-15516315.mjs +390 -0
- package/OnlineAutoList-63a0224f.mjs +474 -0
- package/OnlineAutoModal-ffe19c3f.mjs +206 -0
- package/OnlineAutoTreeList-317c7105.mjs +495 -0
- package/OnlineCustomModal-3939ce78.mjs +227 -0
- package/OnlineDetailModal-bfb1375f.mjs +177 -0
- package/OnlineForm-069f6092.mjs +749 -0
- package/OnlineFormDetail-ad5735fb.mjs +296 -0
- package/OnlineQueryForm-0771c80f.mjs +385 -0
- package/OnlineSearchFormItem-0db5834f.mjs +348 -0
- package/OnlineSelectCascade-a05c30f4.mjs +159 -0
- package/OnlineSubFormDetail-583d01eb.mjs +142 -0
- package/OnlineTabAutoModal-747e071d.mjs +253 -0
- package/OnlineTabDetailModal-887f0174.mjs +222 -0
- package/OnlineTabForm-b1dcd4b4.mjs +765 -0
- package/OnlineTabFormDetail-8e494a96.mjs +323 -0
- package/PageAttributeTable-5966b201.mjs +404 -0
- package/ProcessOnlineForm-4382bea7.mjs +177 -0
- package/QueryTable-6e8053ad.mjs +115 -0
- package/README.md +2 -1
- package/SuperQuery-78db6998.mjs +841 -0
- package/SuperQueryValComponent-471110b5.mjs +8 -0
- package/SuperQueryValComponent.vue_vue_type_script_lang-e3ad7ee8.mjs +101 -0
- package/auth.api-d3a6c4b3.mjs +39 -0
- package/auth.data-8be5c9e3.mjs +141 -0
- package/{cgform.data.js → cgform.data-cbdd88c3.mjs} +93 -62
- package/constant-754f1a9d.mjs +9 -0
- package/enhance.api-138e6826.mjs +104 -0
- package/enhance.data-efc7e155.mjs +175 -0
- package/index-0a93652b.mjs +237 -0
- package/index-7e9a23f2.mjs +1494 -0
- package/index-b70302f2.mjs +56 -0
- package/main.index.js +7 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList-0c603af1.mjs +424 -0
- package/useCustomHook-acb00837.mjs +53 -0
- package/useExtendComponent-aa1cdfc8.mjs +3917 -0
- package/useListButton-0f18bf6a.mjs +671 -0
- package/useOnlinePopEvent-687070b7.mjs +19 -0
- package/useOnlineTest-e4bd8be3.mjs +42 -0
- package/useSchemas-43429d80.mjs +685 -0
- package/useTableSync-774c3774.mjs +87 -0
- package/AuthButtonConfig.js +0 -147
- package/AuthButtonTree.js +0 -183
- package/AuthDataConfig.js +0 -246
- package/AuthDataTree.js +0 -160
- package/AuthFieldConfig.js +0 -170
- package/AuthFieldTree.js +0 -281
- package/AuthManagerDrawer.js +0 -125
- package/AuthSetterModal.js +0 -316
- package/CgformCopyList.js +0 -266
- package/CgformModal.js +0 -780
- package/CgreportModal.js +0 -667
- package/CheckDictTable.js +0 -242
- package/CodeFileListModal.js +0 -175
- package/CodeFileViewModal.js +0 -325
- package/CodeGeneratorModal.js +0 -297
- package/CustomButtonList.js +0 -410
- package/DBAttributeTable.js +0 -526
- package/DbToOnlineModal.js +0 -192
- package/DetailForm.js +0 -608
- package/EnhanceJavaModal.js +0 -298
- package/EnhanceJsHistory.js +0 -229
- package/EnhanceJsModal.js +0 -293
- package/EnhanceSqlModal.js +0 -299
- package/ExtendConfigModal.js +0 -151
- package/FieldExtendJsonModal.js +0 -283
- package/FileSelectModal.js +0 -102
- package/ForeignKeyTable.js +0 -79
- package/IndexTable.js +0 -97
- package/JModalTip.js +0 -54
- package/JOnlineSearchSelect.js +0 -115
- package/LICENSE +0 -9
- package/LeftDepart.js +0 -96
- package/LeftRole.js +0 -98
- package/LeftUser.js +0 -117
- package/LinkTableConfigModal.js +0 -289
- package/LinkTableFieldConfigModal.js +0 -218
- package/LinkTableListPiece.js +0 -36
- package/ModalFormDemo.js +0 -85
- package/OnlineAutoList.js +0 -523
- package/OnlineAutoModal.js +0 -226
- package/OnlineAutoTreeList.js +0 -552
- package/OnlineCustomModal.js +0 -286
- package/OnlineDetailModal.js +0 -190
- package/OnlineForm.js +0 -1016
- package/OnlineFormDetail.js +0 -347
- package/OnlineQueryForm.js +0 -484
- package/OnlineSearchFormItem.js +0 -436
- package/OnlineSelectCascade.js +0 -228
- package/OnlineSubFormDetail.js +0 -166
- package/PageAttributeTable.js +0 -486
- package/ProcessOnlineForm.js +0 -208
- package/QueryTable.js +0 -129
- package/SuperQuery.js +0 -1020
- package/SuperQueryValComponent.js +0 -8
- package/SuperQueryValComponent.vue_vue_type_script_lang.js +0 -168
- package/_arrayPush.js +0 -278
- package/_baseClone.js +0 -471
- package/_baseSlice.js +0 -18
- package/_commonjsHelpers.js +0 -5
- package/_flatRest.js +0 -174
- package/auth.api.js +0 -43
- package/auth.data.js +0 -142
- package/clipboard.js +0 -565
- package/enhance.api.js +0 -129
- package/enhance.data.js +0 -196
- package/index.js +0 -87
- package/index2.js +0 -340
- package/index3.js +0 -264
- package/isArray.js +0 -47
- package/omit.js +0 -60
- package/pick.js +0 -68
- package/toString.js +0 -31
- package/useCgformList.js +0 -470
- package/useExtendComponent.js +0 -5205
- package/useListButton.js +0 -923
- package/useOnlineTest.js +0 -44
- package/useSchemas.js +0 -653
- package/useTableSync.js +0 -117
package/SuperQuery.js
DELETED
|
@@ -1,1020 +0,0 @@
|
|
|
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 { ref, reactive, watch, toRaw, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode, createBlock, withCtx, createVNode, createTextVNode, Teleport, createCommentVNode, normalizeClass, withDirectives, vShow, renderList, toDisplayString, pushScopeId, popScopeId } from "vue";
|
|
21
|
-
import { useModalInner, BasicModal, useModal } from "/@/components/Modal";
|
|
22
|
-
import { randomString } from "/@/utils/common/compUtils";
|
|
23
|
-
import { useMessage } from "/@/hooks/web/useMessage";
|
|
24
|
-
import { Modal, Divider, Empty } from "ant-design-vue";
|
|
25
|
-
import { createLocalStorage } from "/@/utils/cache";
|
|
26
|
-
import { useRoute } from "vue-router";
|
|
27
|
-
import { u as useExtendComponent, F as FormSchemaFactory } from "./useExtendComponent.js";
|
|
28
|
-
import { _ as _sfc_main$1 } from "./SuperQueryValComponent.vue_vue_type_script_lang.js";
|
|
29
|
-
import { MinusCircleOutlined, PlusOutlined, FileTextOutlined, CloseCircleOutlined, AppstoreTwoTone } from "@ant-design/icons-vue";
|
|
30
|
-
import { _ as _export_sfc } from "./index.js";
|
|
31
|
-
import "/@/components/Form/src/componentMap";
|
|
32
|
-
import "/@/utils/propTypes";
|
|
33
|
-
import "/@/components/Form/index";
|
|
34
|
-
import "/@/utils/http/axios";
|
|
35
|
-
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
36
|
-
import "/@/views/system/user/user.api";
|
|
37
|
-
import "./_commonjsHelpers.js";
|
|
38
|
-
import "/@/store/modules/user";
|
|
39
|
-
import "/@/utils";
|
|
40
|
-
import "/@/utils/desform/customExpression";
|
|
41
|
-
import "/@/store/modules/permission";
|
|
42
|
-
import "/@/utils/dict/JDictSelectUtil";
|
|
43
|
-
import "./pick.js";
|
|
44
|
-
import "./_flatRest.js";
|
|
45
|
-
import "./isArray.js";
|
|
46
|
-
import "./toString.js";
|
|
47
|
-
import "./_arrayPush.js";
|
|
48
|
-
import "/@/components/Table";
|
|
49
|
-
import "/@/hooks/system/useListPage";
|
|
50
|
-
import "/@/components/Form/src/utils/Area";
|
|
51
|
-
import "/@/components/Preview/index";
|
|
52
|
-
import "./LinkTableListPiece.js";
|
|
53
|
-
import "./OnlineSelectCascade.js";
|
|
54
|
-
import "/@/components/Loading";
|
|
55
|
-
import "/@/utils/auth";
|
|
56
|
-
import "./JModalTip.js";
|
|
57
|
-
import "@vueuse/core";
|
|
58
|
-
import "/@/utils/is";
|
|
59
|
-
import "./_baseSlice.js";
|
|
60
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
61
|
-
const FORM_VIEW_TO_QUERY_VIEW = {
|
|
62
|
-
"password": "text",
|
|
63
|
-
"file": "text",
|
|
64
|
-
"image": "text",
|
|
65
|
-
"textarea": "text",
|
|
66
|
-
"umeditor": "text",
|
|
67
|
-
"markdown": "text",
|
|
68
|
-
"checkbox": "list_multi",
|
|
69
|
-
"radio": "list"
|
|
70
|
-
};
|
|
71
|
-
const SAVE_CODE_PRE = "JSuperQuerySaved_";
|
|
72
|
-
function useSuperQuery() {
|
|
73
|
-
const { linkTableCard2Select } = useExtendComponent();
|
|
74
|
-
const { createMessage: $message } = useMessage();
|
|
75
|
-
const formRef = ref();
|
|
76
|
-
const dynamicRowValues = reactive({
|
|
77
|
-
values: []
|
|
78
|
-
});
|
|
79
|
-
const matchType = ref("and");
|
|
80
|
-
const [registerModal, { setModalProps }] = useModalInner(() => {
|
|
81
|
-
setModalProps({ confirmLoading: false });
|
|
82
|
-
});
|
|
83
|
-
const view2QueryViewMap = Object.assign({}, { "link_down": "text" }, FORM_VIEW_TO_QUERY_VIEW);
|
|
84
|
-
function handleSubmit() {
|
|
85
|
-
console.log("handleSubmit", dynamicRowValues.values);
|
|
86
|
-
}
|
|
87
|
-
function handleCancel() {
|
|
88
|
-
}
|
|
89
|
-
function setFormModel(key, value, item) {
|
|
90
|
-
console.log("setFormModel", key, value);
|
|
91
|
-
item["val"] = value;
|
|
92
|
-
}
|
|
93
|
-
const fieldProperties = ref({});
|
|
94
|
-
const fieldTreeData = ref([]);
|
|
95
|
-
function init(json) {
|
|
96
|
-
console.log("=============");
|
|
97
|
-
console.log("=============", json);
|
|
98
|
-
console.log("=============");
|
|
99
|
-
let { allFields, treeData } = getAllFields(json);
|
|
100
|
-
fieldProperties.value = allFields;
|
|
101
|
-
fieldTreeData.value = treeData;
|
|
102
|
-
}
|
|
103
|
-
function addOne(index) {
|
|
104
|
-
let item = {
|
|
105
|
-
field: void 0,
|
|
106
|
-
rule: "eq",
|
|
107
|
-
val: "",
|
|
108
|
-
key: randomString(16)
|
|
109
|
-
};
|
|
110
|
-
if (index === false) {
|
|
111
|
-
dynamicRowValues.values = [];
|
|
112
|
-
dynamicRowValues.values.push(item);
|
|
113
|
-
} else if (index === true) {
|
|
114
|
-
if (dynamicRowValues.values.length == 0) {
|
|
115
|
-
dynamicRowValues.values.push(item);
|
|
116
|
-
}
|
|
117
|
-
} else {
|
|
118
|
-
dynamicRowValues.values.splice(++index, 0, item);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function removeOne(item) {
|
|
122
|
-
let arr = toRaw(dynamicRowValues.values);
|
|
123
|
-
let index = -1;
|
|
124
|
-
for (let i = 0; i < arr.length; i++) {
|
|
125
|
-
if (item.key == arr[i].key) {
|
|
126
|
-
index = i;
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if (index != -1) {
|
|
131
|
-
dynamicRowValues.values.splice(index, 1);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
const defaultInput = {
|
|
135
|
-
field: "val",
|
|
136
|
-
label: "\u6D4B\u8BD5",
|
|
137
|
-
component: "Input"
|
|
138
|
-
};
|
|
139
|
-
function getSchema(item, index) {
|
|
140
|
-
let map = fieldProperties.value;
|
|
141
|
-
let prop = map[item.field];
|
|
142
|
-
if (!prop) {
|
|
143
|
-
return defaultInput;
|
|
144
|
-
}
|
|
145
|
-
if (view2QueryViewMap[prop.view]) {
|
|
146
|
-
prop.view = view2QueryViewMap[prop.view];
|
|
147
|
-
}
|
|
148
|
-
let temp = FormSchemaFactory.createFormSchema(item.field, prop);
|
|
149
|
-
temp.noChange();
|
|
150
|
-
temp.asSearchForm();
|
|
151
|
-
temp.updateField(item.field + index);
|
|
152
|
-
const setFieldValue = (values) => {
|
|
153
|
-
item["val"] = values[item.field];
|
|
154
|
-
};
|
|
155
|
-
temp.setFunctionForFieldValue(setFieldValue);
|
|
156
|
-
let schema = temp.getFormItemSchema();
|
|
157
|
-
if (["empty", "not_empty"].includes(item.rule)) {
|
|
158
|
-
schema.componentProps = __spreadProps(__spreadValues({}, schema.componentProps), { disabled: true });
|
|
159
|
-
}
|
|
160
|
-
linkTableCard2Select(schema);
|
|
161
|
-
return schema;
|
|
162
|
-
}
|
|
163
|
-
const saveTreeData = ref("");
|
|
164
|
-
const $ls = createLocalStorage();
|
|
165
|
-
const saveInfo = reactive({
|
|
166
|
-
visible: false,
|
|
167
|
-
title: "",
|
|
168
|
-
content: "",
|
|
169
|
-
saveCode: ""
|
|
170
|
-
});
|
|
171
|
-
const loading = ref(false);
|
|
172
|
-
const route = useRoute();
|
|
173
|
-
watch(() => route.fullPath, (val) => {
|
|
174
|
-
console.log("fullpath", val);
|
|
175
|
-
initSaveQueryInfoCode();
|
|
176
|
-
});
|
|
177
|
-
const currentPageSavedArray = ref([]);
|
|
178
|
-
watch(() => currentPageSavedArray.value, (val) => {
|
|
179
|
-
let temp = [];
|
|
180
|
-
if (val && val.length > 0) {
|
|
181
|
-
val.map((item) => {
|
|
182
|
-
let key = randomString(16);
|
|
183
|
-
temp.push({
|
|
184
|
-
title: item.title,
|
|
185
|
-
slots: { icon: "custom" },
|
|
186
|
-
value: key
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
saveTreeData.value = temp;
|
|
191
|
-
}, { immediate: true, deep: true });
|
|
192
|
-
function initSaveQueryInfoCode() {
|
|
193
|
-
let code = SAVE_CODE_PRE + route.fullPath;
|
|
194
|
-
saveInfo.saveCode = code;
|
|
195
|
-
let list = $ls.get(code);
|
|
196
|
-
if (list && list instanceof Array) {
|
|
197
|
-
currentPageSavedArray.value = list;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
initSaveQueryInfoCode();
|
|
201
|
-
function handleSave() {
|
|
202
|
-
let fieldArray = getQueryInfo();
|
|
203
|
-
if (!fieldArray) {
|
|
204
|
-
$message.warning("\u7A7A\u6761\u4EF6\u4E0D\u80FD\u4FDD\u5B58");
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
let content = JSON.stringify(fieldArray);
|
|
208
|
-
openSaveInfoModal(content);
|
|
209
|
-
}
|
|
210
|
-
function openSaveInfoModal(content) {
|
|
211
|
-
saveInfo.visible = true;
|
|
212
|
-
saveInfo.title = "";
|
|
213
|
-
saveInfo.content = content;
|
|
214
|
-
}
|
|
215
|
-
function doSaveQueryInfo() {
|
|
216
|
-
let { title, content, saveCode } = saveInfo;
|
|
217
|
-
let index = getTitleIndex(title);
|
|
218
|
-
if (index >= 0) {
|
|
219
|
-
Modal.confirm({
|
|
220
|
-
title: "\u63D0\u793A",
|
|
221
|
-
content: `${title} \u5DF2\u5B58\u5728\uFF0C\u662F\u5426\u8986\u76D6\uFF1F`,
|
|
222
|
-
okText: "\u786E\u8BA4",
|
|
223
|
-
cancelText: "\u53D6\u6D88",
|
|
224
|
-
onOk: () => {
|
|
225
|
-
currentPageSavedArray.value.splice(index, 1, {
|
|
226
|
-
content,
|
|
227
|
-
title,
|
|
228
|
-
type: matchType.value
|
|
229
|
-
});
|
|
230
|
-
$ls.set(saveCode, currentPageSavedArray.value);
|
|
231
|
-
saveInfo.visible = false;
|
|
232
|
-
$message.success("\u4FDD\u5B58\u6210\u529F");
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
} else {
|
|
236
|
-
currentPageSavedArray.value.push({
|
|
237
|
-
content,
|
|
238
|
-
title,
|
|
239
|
-
type: matchType.value
|
|
240
|
-
});
|
|
241
|
-
$ls.set(saveCode, currentPageSavedArray.value);
|
|
242
|
-
saveInfo.visible = false;
|
|
243
|
-
$message.success("\u4FDD\u5B58\u6210\u529F");
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
function getTitleIndex(title) {
|
|
247
|
-
let savedArray = currentPageSavedArray.value;
|
|
248
|
-
let index = -1;
|
|
249
|
-
for (let i = 0; i < savedArray.length; i++) {
|
|
250
|
-
if (savedArray[i].title == title) {
|
|
251
|
-
index = i;
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
return index;
|
|
256
|
-
}
|
|
257
|
-
function getQueryInfo(isEmit = false) {
|
|
258
|
-
var _a;
|
|
259
|
-
let arr = dynamicRowValues.values;
|
|
260
|
-
if (!arr || arr.length == 0) {
|
|
261
|
-
return false;
|
|
262
|
-
}
|
|
263
|
-
let fieldArray = [];
|
|
264
|
-
let fieldProps = fieldProperties.value;
|
|
265
|
-
for (let item of arr) {
|
|
266
|
-
let allowEmpty = ["empty", "not_empty"].includes(item.rule);
|
|
267
|
-
if (item.field && (allowEmpty || item.val || item.val === 0) && item.rule) {
|
|
268
|
-
let prop = fieldProps[item.field];
|
|
269
|
-
let formatValue = (_a = prop == null ? void 0 : prop.formatValue) != null ? _a : (v) => v;
|
|
270
|
-
let tempVal = toRaw(item.val);
|
|
271
|
-
if (tempVal instanceof Array) {
|
|
272
|
-
tempVal = tempVal.map((v) => formatValue(v)).join(",");
|
|
273
|
-
} else {
|
|
274
|
-
tempVal = formatValue(tempVal);
|
|
275
|
-
}
|
|
276
|
-
let fieldName = getRealFieldName(item);
|
|
277
|
-
let obj = {
|
|
278
|
-
field: fieldName,
|
|
279
|
-
rule: item.rule,
|
|
280
|
-
val: tempVal
|
|
281
|
-
};
|
|
282
|
-
if (isEmit === true) {
|
|
283
|
-
let prop2 = fieldProps[item.field];
|
|
284
|
-
if (prop2) {
|
|
285
|
-
obj["type"] = prop2.view;
|
|
286
|
-
obj["dbType"] = prop2.type;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
fieldArray.push(obj);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
if (fieldArray.length == 0) {
|
|
293
|
-
return false;
|
|
294
|
-
}
|
|
295
|
-
return fieldArray;
|
|
296
|
-
}
|
|
297
|
-
function getRealFieldName(item) {
|
|
298
|
-
let fieldName = item.field;
|
|
299
|
-
if (fieldName.indexOf("@") > 0) {
|
|
300
|
-
fieldName = fieldName.replace("@", ",");
|
|
301
|
-
}
|
|
302
|
-
return fieldName;
|
|
303
|
-
}
|
|
304
|
-
function handleTreeSelect(key, { node }) {
|
|
305
|
-
console.log(key, node);
|
|
306
|
-
let title = node.dataRef.title;
|
|
307
|
-
let arr = currentPageSavedArray.value.filter((item) => item.title == title);
|
|
308
|
-
if (arr && arr.length > 0) {
|
|
309
|
-
let { content, type } = arr[0];
|
|
310
|
-
let data = JSON.parse(content);
|
|
311
|
-
let rowsValues = [];
|
|
312
|
-
for (let item of data) {
|
|
313
|
-
rowsValues.push(Object.assign({}, { key: randomString(16) }, item));
|
|
314
|
-
}
|
|
315
|
-
dynamicRowValues.values = rowsValues;
|
|
316
|
-
matchType.value = type;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
function handleRemoveSaveInfo(title) {
|
|
320
|
-
console.log(title);
|
|
321
|
-
let index = getTitleIndex(title);
|
|
322
|
-
if (index >= 0) {
|
|
323
|
-
currentPageSavedArray.value.splice(index, 1);
|
|
324
|
-
$ls.set(saveInfo.saveCode, currentPageSavedArray.value);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
function getAllFields(properties) {
|
|
328
|
-
let allFields = {};
|
|
329
|
-
let order = 1;
|
|
330
|
-
let treeData = [];
|
|
331
|
-
if (properties.properties) {
|
|
332
|
-
properties = properties.properties;
|
|
333
|
-
}
|
|
334
|
-
Object.keys(properties).map((field) => {
|
|
335
|
-
let item = properties[field];
|
|
336
|
-
if (item.view == "table") {
|
|
337
|
-
let subProps = item["properties"] || item["fields"];
|
|
338
|
-
let subTableOrder = order * 100;
|
|
339
|
-
let subNode = {
|
|
340
|
-
title: item.title,
|
|
341
|
-
value: field,
|
|
342
|
-
disabled: true,
|
|
343
|
-
children: [],
|
|
344
|
-
order: subTableOrder
|
|
345
|
-
};
|
|
346
|
-
Object.keys(subProps).map((subField) => {
|
|
347
|
-
let subItem = subProps[subField];
|
|
348
|
-
subItem["order"] = subTableOrder + subItem["order"];
|
|
349
|
-
let subFieldKey = field + "@" + subField;
|
|
350
|
-
allFields[subFieldKey] = subItem;
|
|
351
|
-
subNode.children.push({
|
|
352
|
-
title: subItem.title,
|
|
353
|
-
value: subFieldKey,
|
|
354
|
-
isLeaf: true,
|
|
355
|
-
order: subItem["order"]
|
|
356
|
-
});
|
|
357
|
-
});
|
|
358
|
-
orderField(subNode);
|
|
359
|
-
treeData.push(subNode);
|
|
360
|
-
order++;
|
|
361
|
-
} else {
|
|
362
|
-
let fieldKey = field;
|
|
363
|
-
allFields[fieldKey] = item;
|
|
364
|
-
treeData.push({
|
|
365
|
-
title: item.title,
|
|
366
|
-
value: fieldKey,
|
|
367
|
-
isLeaf: true,
|
|
368
|
-
order: item.order
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
orderField(treeData);
|
|
373
|
-
return { allFields, treeData };
|
|
374
|
-
}
|
|
375
|
-
function orderField(data) {
|
|
376
|
-
let arr = data.children || data;
|
|
377
|
-
arr.sort(function(a, b) {
|
|
378
|
-
return a.order - b.order;
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
function initDefaultValues(values) {
|
|
382
|
-
const { params, matchType: matchType2 } = values;
|
|
383
|
-
if (params) {
|
|
384
|
-
let rowsValues = [];
|
|
385
|
-
for (let item of params) {
|
|
386
|
-
rowsValues.push(Object.assign({}, { key: randomString(16) }, item));
|
|
387
|
-
}
|
|
388
|
-
dynamicRowValues.values = rowsValues;
|
|
389
|
-
matchType2.value = matchType2;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
return {
|
|
393
|
-
formRef,
|
|
394
|
-
init,
|
|
395
|
-
dynamicRowValues,
|
|
396
|
-
matchType,
|
|
397
|
-
registerModal,
|
|
398
|
-
handleSubmit,
|
|
399
|
-
handleCancel,
|
|
400
|
-
handleSave,
|
|
401
|
-
doSaveQueryInfo,
|
|
402
|
-
saveInfo,
|
|
403
|
-
saveTreeData,
|
|
404
|
-
handleRemoveSaveInfo,
|
|
405
|
-
handleTreeSelect,
|
|
406
|
-
fieldTreeData,
|
|
407
|
-
addOne,
|
|
408
|
-
removeOne,
|
|
409
|
-
setFormModel,
|
|
410
|
-
getSchema,
|
|
411
|
-
loading,
|
|
412
|
-
getQueryInfo,
|
|
413
|
-
initDefaultValues
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
var SuperQuery_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
417
|
-
const _sfc_main = {
|
|
418
|
-
name: "OnlineSuperQuery",
|
|
419
|
-
props: {
|
|
420
|
-
config: {
|
|
421
|
-
type: Object,
|
|
422
|
-
default: []
|
|
423
|
-
},
|
|
424
|
-
status: {
|
|
425
|
-
type: Boolean,
|
|
426
|
-
default: false
|
|
427
|
-
},
|
|
428
|
-
online: {
|
|
429
|
-
type: Boolean,
|
|
430
|
-
default: false
|
|
431
|
-
}
|
|
432
|
-
},
|
|
433
|
-
components: {
|
|
434
|
-
BasicModal,
|
|
435
|
-
MinusCircleOutlined,
|
|
436
|
-
PlusOutlined,
|
|
437
|
-
OnlineSuperQueryValComponent: _sfc_main$1,
|
|
438
|
-
FileTextOutlined,
|
|
439
|
-
CloseCircleOutlined,
|
|
440
|
-
AppstoreTwoTone,
|
|
441
|
-
Divider
|
|
442
|
-
},
|
|
443
|
-
emits: ["search"],
|
|
444
|
-
setup(props, { emit }) {
|
|
445
|
-
const [registerFormModal, formModal] = useModal();
|
|
446
|
-
const { createMessage: $message } = useMessage();
|
|
447
|
-
const historyCollapsed = ref(true);
|
|
448
|
-
function handleCancel() {
|
|
449
|
-
formModal.closeModal();
|
|
450
|
-
}
|
|
451
|
-
function handleSubmit() {
|
|
452
|
-
if (props.online === true) {
|
|
453
|
-
let dataArray = getQueryInfo(true);
|
|
454
|
-
if (dataArray && dataArray.length > 0) {
|
|
455
|
-
emit("search", dataArray, matchType.value);
|
|
456
|
-
} else {
|
|
457
|
-
$message.warning("\u7A7A\u6761\u4EF6\u65E0\u6CD5\u67E5\u8BE2\uFF01");
|
|
458
|
-
}
|
|
459
|
-
} else {
|
|
460
|
-
let dataArray = getQueryInfo(true);
|
|
461
|
-
if (dataArray && dataArray.length > 0) {
|
|
462
|
-
let result = getSuperQueryParams(dataArray);
|
|
463
|
-
emit("search", result);
|
|
464
|
-
} else {
|
|
465
|
-
$message.warning("\u7A7A\u6761\u4EF6\u65E0\u6CD5\u67E5\u8BE2\uFF01");
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
function getSuperQueryParams(dataArray) {
|
|
470
|
-
let arr = [];
|
|
471
|
-
for (let item of dataArray) {
|
|
472
|
-
let field = item.field;
|
|
473
|
-
let val = item.val;
|
|
474
|
-
if (val instanceof Array) {
|
|
475
|
-
val = val.join(",");
|
|
476
|
-
}
|
|
477
|
-
arr.push(__spreadProps(__spreadValues({}, item), {
|
|
478
|
-
field,
|
|
479
|
-
val
|
|
480
|
-
}));
|
|
481
|
-
}
|
|
482
|
-
if (arr.length > 0) {
|
|
483
|
-
superQueryFlag.value = true;
|
|
484
|
-
} else {
|
|
485
|
-
superQueryFlag.value = false;
|
|
486
|
-
}
|
|
487
|
-
let result = {
|
|
488
|
-
superQueryMatchType: matchType.value,
|
|
489
|
-
superQueryParams: encodeURI(JSON.stringify(arr))
|
|
490
|
-
};
|
|
491
|
-
return result;
|
|
492
|
-
}
|
|
493
|
-
function handleReset() {
|
|
494
|
-
dynamicRowValues.values = [];
|
|
495
|
-
addOne(false);
|
|
496
|
-
let result = getSuperQueryParams([]);
|
|
497
|
-
emit("search", result);
|
|
498
|
-
}
|
|
499
|
-
const {
|
|
500
|
-
formRef,
|
|
501
|
-
init,
|
|
502
|
-
dynamicRowValues,
|
|
503
|
-
matchType,
|
|
504
|
-
registerModal,
|
|
505
|
-
handleSave,
|
|
506
|
-
doSaveQueryInfo,
|
|
507
|
-
saveInfo,
|
|
508
|
-
saveTreeData,
|
|
509
|
-
handleTreeSelect,
|
|
510
|
-
handleRemoveSaveInfo,
|
|
511
|
-
fieldTreeData,
|
|
512
|
-
addOne,
|
|
513
|
-
removeOne,
|
|
514
|
-
setFormModel,
|
|
515
|
-
getSchema,
|
|
516
|
-
loading,
|
|
517
|
-
getQueryInfo,
|
|
518
|
-
initDefaultValues
|
|
519
|
-
} = useSuperQuery();
|
|
520
|
-
const superQueryFlag = ref(false);
|
|
521
|
-
watch(() => props.status, (val) => {
|
|
522
|
-
superQueryFlag.value = val;
|
|
523
|
-
}, { immediate: true });
|
|
524
|
-
function handleOpen() {
|
|
525
|
-
formModal.openModal();
|
|
526
|
-
addOne(true);
|
|
527
|
-
}
|
|
528
|
-
function getPopupContainer() {
|
|
529
|
-
return document.getElementsByClassName("jee-super-query-form")[0];
|
|
530
|
-
}
|
|
531
|
-
function onFinish(a) {
|
|
532
|
-
console.log("onfinish", a);
|
|
533
|
-
}
|
|
534
|
-
function handleChangeField(item) {
|
|
535
|
-
item["val"] = "";
|
|
536
|
-
}
|
|
537
|
-
watch(() => props.config, (val) => {
|
|
538
|
-
if (val) {
|
|
539
|
-
init(val);
|
|
540
|
-
}
|
|
541
|
-
}, { immediate: true });
|
|
542
|
-
return {
|
|
543
|
-
formRef,
|
|
544
|
-
registerFormModal,
|
|
545
|
-
init,
|
|
546
|
-
handleChangeField,
|
|
547
|
-
dynamicRowValues,
|
|
548
|
-
matchType,
|
|
549
|
-
historyCollapsed,
|
|
550
|
-
registerModal,
|
|
551
|
-
handleSubmit,
|
|
552
|
-
handleCancel,
|
|
553
|
-
handleSave,
|
|
554
|
-
handleReset,
|
|
555
|
-
doSaveQueryInfo,
|
|
556
|
-
saveInfo,
|
|
557
|
-
saveTreeData,
|
|
558
|
-
handleTreeSelect,
|
|
559
|
-
handleRemoveSaveInfo,
|
|
560
|
-
fieldTreeData,
|
|
561
|
-
addOne,
|
|
562
|
-
removeOne,
|
|
563
|
-
setFormModel,
|
|
564
|
-
getSchema,
|
|
565
|
-
loading,
|
|
566
|
-
onFinish,
|
|
567
|
-
getPopupContainer,
|
|
568
|
-
superQueryFlag,
|
|
569
|
-
handleOpen,
|
|
570
|
-
initDefaultValues,
|
|
571
|
-
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE
|
|
572
|
-
};
|
|
573
|
-
}
|
|
574
|
-
};
|
|
575
|
-
const _withScopeId = (n) => (pushScopeId("data-v-31ffc821"), n = n(), popScopeId(), n);
|
|
576
|
-
const _hoisted_1 = { class: "j-super-query-button" };
|
|
577
|
-
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, "\u5DF2\u6709\u9AD8\u7EA7\u67E5\u8BE2\u6761\u4EF6\u751F\u6548", -1));
|
|
578
|
-
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, "\u9AD8\u7EA7\u67E5\u8BE2", -1));
|
|
579
|
-
const _hoisted_4 = { style: { "float": "left" } };
|
|
580
|
-
const _hoisted_5 = { slot: "description" };
|
|
581
|
-
const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, "\u6CA1\u6709\u4EFB\u4F55\u67E5\u8BE2\u6761\u4EF6", -1));
|
|
582
|
-
const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "\u4FDD\u5B58\u7684\u67E5\u8BE2", -1));
|
|
583
|
-
const _hoisted_8 = ["title"];
|
|
584
|
-
const _hoisted_9 = { class: "icon-cancle" };
|
|
585
|
-
const _hoisted_10 = { style: { "height": "80px", "line-height": "75px", "width": "100%", "text-align": "center" } };
|
|
586
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
587
|
-
const _component_divider = resolveComponent("divider");
|
|
588
|
-
const _component_AppstoreTwoTone = resolveComponent("AppstoreTwoTone");
|
|
589
|
-
const _component_a_button = resolveComponent("a-button");
|
|
590
|
-
const _component_a_button_group = resolveComponent("a-button-group");
|
|
591
|
-
const _component_a_tooltip = resolveComponent("a-tooltip");
|
|
592
|
-
const _component_a_divider = resolveComponent("a-divider");
|
|
593
|
-
const _component_a_empty = resolveComponent("a-empty");
|
|
594
|
-
const _component_a_select_option = resolveComponent("a-select-option");
|
|
595
|
-
const _component_a_select = resolveComponent("a-select");
|
|
596
|
-
const _component_a_form_item = resolveComponent("a-form-item");
|
|
597
|
-
const _component_a_col = resolveComponent("a-col");
|
|
598
|
-
const _component_a_row = resolveComponent("a-row");
|
|
599
|
-
const _component_a_tree_select = resolveComponent("a-tree-select");
|
|
600
|
-
const _component_online_super_query_val_component = resolveComponent("online-super-query-val-component");
|
|
601
|
-
const _component_PlusOutlined = resolveComponent("PlusOutlined");
|
|
602
|
-
const _component_MinusCircleOutlined = resolveComponent("MinusCircleOutlined");
|
|
603
|
-
const _component_a_space = resolveComponent("a-space");
|
|
604
|
-
const _component_a_form = resolveComponent("a-form");
|
|
605
|
-
const _component_close_circle_outlined = resolveComponent("close-circle-outlined");
|
|
606
|
-
const _component_file_text_outlined = resolveComponent("file-text-outlined");
|
|
607
|
-
const _component_a_tree = resolveComponent("a-tree");
|
|
608
|
-
const _component_Icon = resolveComponent("Icon");
|
|
609
|
-
const _component_a_card = resolveComponent("a-card");
|
|
610
|
-
const _component_BasicModal = resolveComponent("BasicModal");
|
|
611
|
-
const _component_a_input = resolveComponent("a-input");
|
|
612
|
-
const _component_a_modal = resolveComponent("a-modal");
|
|
613
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
614
|
-
createElementVNode("div", _hoisted_1, [
|
|
615
|
-
$setup.superQueryFlag ? (openBlock(), createBlock(_component_a_tooltip, {
|
|
616
|
-
key: 0,
|
|
617
|
-
mouseLeaveDelay: 0.2
|
|
618
|
-
}, {
|
|
619
|
-
title: withCtx(() => [
|
|
620
|
-
_hoisted_2,
|
|
621
|
-
createVNode(_component_divider, {
|
|
622
|
-
type: "vertical",
|
|
623
|
-
style: { "background-color": "#fff" }
|
|
624
|
-
}),
|
|
625
|
-
createElementVNode("a", {
|
|
626
|
-
onClick: _cache[0] || (_cache[0] = (...args) => $setup.handleReset && $setup.handleReset(...args))
|
|
627
|
-
}, "\u6E05\u7A7A")
|
|
628
|
-
]),
|
|
629
|
-
default: withCtx(() => [
|
|
630
|
-
createVNode(_component_a_button_group, null, {
|
|
631
|
-
default: withCtx(() => [
|
|
632
|
-
createVNode(_component_a_button, {
|
|
633
|
-
type: "primary",
|
|
634
|
-
onClick: $setup.handleOpen
|
|
635
|
-
}, {
|
|
636
|
-
default: withCtx(() => [
|
|
637
|
-
createVNode(_component_AppstoreTwoTone, { spin: true }),
|
|
638
|
-
_hoisted_3
|
|
639
|
-
]),
|
|
640
|
-
_: 1
|
|
641
|
-
}, 8, ["onClick"])
|
|
642
|
-
]),
|
|
643
|
-
_: 1
|
|
644
|
-
})
|
|
645
|
-
]),
|
|
646
|
-
_: 1
|
|
647
|
-
}, 8, ["mouseLeaveDelay"])) : (openBlock(), createBlock(_component_a_button, {
|
|
648
|
-
key: 1,
|
|
649
|
-
type: "primary",
|
|
650
|
-
preIcon: "ant-design:filter-outlined",
|
|
651
|
-
onClick: $setup.handleOpen
|
|
652
|
-
}, {
|
|
653
|
-
default: withCtx(() => [
|
|
654
|
-
createTextVNode(" \u9AD8\u7EA7\u67E5\u8BE2 ")
|
|
655
|
-
]),
|
|
656
|
-
_: 1
|
|
657
|
-
}, 8, ["onClick"]))
|
|
658
|
-
]),
|
|
659
|
-
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
660
|
-
createVNode(_component_BasicModal, {
|
|
661
|
-
title: "\u9AD8\u7EA7\u67E5\u8BE2\u6784\u9020\u5668",
|
|
662
|
-
canFullscreen: false,
|
|
663
|
-
width: 750,
|
|
664
|
-
onRegister: $setup.registerFormModal,
|
|
665
|
-
onOk: $setup.handleSubmit
|
|
666
|
-
}, {
|
|
667
|
-
footer: withCtx(() => [
|
|
668
|
-
createElementVNode("div", _hoisted_4, [
|
|
669
|
-
createVNode(_component_a_button, {
|
|
670
|
-
loading: $setup.loading,
|
|
671
|
-
onClick: $setup.handleReset
|
|
672
|
-
}, {
|
|
673
|
-
default: withCtx(() => [
|
|
674
|
-
createTextVNode("\u91CD\u7F6E")
|
|
675
|
-
]),
|
|
676
|
-
_: 1
|
|
677
|
-
}, 8, ["loading", "onClick"]),
|
|
678
|
-
createVNode(_component_a_button, {
|
|
679
|
-
loading: $setup.loading,
|
|
680
|
-
onClick: $setup.handleSave
|
|
681
|
-
}, {
|
|
682
|
-
default: withCtx(() => [
|
|
683
|
-
createTextVNode("\u4FDD\u5B58\u67E5\u8BE2")
|
|
684
|
-
]),
|
|
685
|
-
_: 1
|
|
686
|
-
}, 8, ["loading", "onClick"])
|
|
687
|
-
]),
|
|
688
|
-
createVNode(_component_a_button, {
|
|
689
|
-
key: "submit",
|
|
690
|
-
type: "primary",
|
|
691
|
-
onClick: $setup.handleSubmit
|
|
692
|
-
}, {
|
|
693
|
-
default: withCtx(() => [
|
|
694
|
-
createTextVNode("\u786E\u5B9A")
|
|
695
|
-
]),
|
|
696
|
-
_: 1
|
|
697
|
-
}, 8, ["onClick"]),
|
|
698
|
-
createVNode(_component_a_button, {
|
|
699
|
-
key: "back",
|
|
700
|
-
onClick: $setup.handleCancel
|
|
701
|
-
}, {
|
|
702
|
-
default: withCtx(() => [
|
|
703
|
-
createTextVNode("\u5173\u95ED")
|
|
704
|
-
]),
|
|
705
|
-
_: 1
|
|
706
|
-
}, 8, ["onClick"])
|
|
707
|
-
]),
|
|
708
|
-
default: withCtx(() => [
|
|
709
|
-
$setup.dynamicRowValues.values.length == 0 ? (openBlock(), createBlock(_component_a_empty, { key: 0 }, {
|
|
710
|
-
default: withCtx(() => [
|
|
711
|
-
createElementVNode("div", _hoisted_5, [
|
|
712
|
-
_hoisted_6,
|
|
713
|
-
createVNode(_component_a_divider, { type: "vertical" }),
|
|
714
|
-
createElementVNode("a", {
|
|
715
|
-
onClick: _cache[1] || (_cache[1] = ($event) => $setup.addOne(-1))
|
|
716
|
-
}, "\u70B9\u51FB\u65B0\u589E")
|
|
717
|
-
])
|
|
718
|
-
]),
|
|
719
|
-
_: 1
|
|
720
|
-
})) : createCommentVNode("", true),
|
|
721
|
-
createVNode(_component_a_row, {
|
|
722
|
-
class: normalizeClass("j-super-query-modal-content")
|
|
723
|
-
}, {
|
|
724
|
-
default: withCtx(() => [
|
|
725
|
-
createVNode(_component_a_col, {
|
|
726
|
-
sm: 24,
|
|
727
|
-
md: 24
|
|
728
|
-
}, {
|
|
729
|
-
default: withCtx(() => [
|
|
730
|
-
withDirectives(createVNode(_component_a_row, null, {
|
|
731
|
-
default: withCtx(() => [
|
|
732
|
-
createVNode(_component_a_col, {
|
|
733
|
-
md: 12,
|
|
734
|
-
xs: 24
|
|
735
|
-
}, {
|
|
736
|
-
default: withCtx(() => [
|
|
737
|
-
createVNode(_component_a_form_item, {
|
|
738
|
-
label: "\u5339\u914D\u6A21\u5F0F",
|
|
739
|
-
labelCol: { md: 6, xs: 24 },
|
|
740
|
-
wrapperCol: { md: 18, xs: 24 },
|
|
741
|
-
style: { "width": "100%" }
|
|
742
|
-
}, {
|
|
743
|
-
default: withCtx(() => [
|
|
744
|
-
createVNode(_component_a_select, {
|
|
745
|
-
value: $setup.matchType,
|
|
746
|
-
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => $setup.matchType = $event),
|
|
747
|
-
getPopupContainer: (node) => node.parentNode,
|
|
748
|
-
style: { "width": "100%" }
|
|
749
|
-
}, {
|
|
750
|
-
default: withCtx(() => [
|
|
751
|
-
createVNode(_component_a_select_option, { value: "and" }, {
|
|
752
|
-
default: withCtx(() => [
|
|
753
|
-
createTextVNode("AND\uFF08\u6240\u6709\u6761\u4EF6\u5339\u914D\uFF09")
|
|
754
|
-
]),
|
|
755
|
-
_: 1
|
|
756
|
-
}),
|
|
757
|
-
createVNode(_component_a_select_option, { value: "or" }, {
|
|
758
|
-
default: withCtx(() => [
|
|
759
|
-
createTextVNode("OR\uFF08\u4EFB\u610F\u4E00\u4E2A\u5339\u914D\uFF09")
|
|
760
|
-
]),
|
|
761
|
-
_: 1
|
|
762
|
-
})
|
|
763
|
-
]),
|
|
764
|
-
_: 1
|
|
765
|
-
}, 8, ["value", "getPopupContainer"])
|
|
766
|
-
]),
|
|
767
|
-
_: 1
|
|
768
|
-
})
|
|
769
|
-
]),
|
|
770
|
-
_: 1
|
|
771
|
-
})
|
|
772
|
-
]),
|
|
773
|
-
_: 1
|
|
774
|
-
}, 512), [
|
|
775
|
-
[vShow, $setup.dynamicRowValues.values.length > 0]
|
|
776
|
-
]),
|
|
777
|
-
withDirectives(createVNode(_component_a_form, {
|
|
778
|
-
ref: "formRef",
|
|
779
|
-
class: normalizeClass("jee-super-query-form"),
|
|
780
|
-
model: $setup.dynamicRowValues,
|
|
781
|
-
onFinish: $setup.onFinish
|
|
782
|
-
}, {
|
|
783
|
-
default: withCtx(() => [
|
|
784
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.dynamicRowValues.values, (item, index) => {
|
|
785
|
-
return openBlock(), createBlock(_component_a_space, {
|
|
786
|
-
key: item.key,
|
|
787
|
-
style: { "display": "flex", "margin-bottom": "8px" },
|
|
788
|
-
align: "baseline"
|
|
789
|
-
}, {
|
|
790
|
-
default: withCtx(() => [
|
|
791
|
-
createVNode(_component_a_form_item, {
|
|
792
|
-
name: ["values", index, "field"],
|
|
793
|
-
style: { "width": "150px" }
|
|
794
|
-
}, {
|
|
795
|
-
default: withCtx(() => [
|
|
796
|
-
createVNode(_component_a_tree_select, {
|
|
797
|
-
style: { "width": "100%" },
|
|
798
|
-
placeholder: "\u8BF7\u9009\u62E9\u5B57\u6BB5",
|
|
799
|
-
value: item.field,
|
|
800
|
-
"onUpdate:value": ($event) => item.field = $event,
|
|
801
|
-
"show-search": "",
|
|
802
|
-
"tree-node-filter-prop": "title",
|
|
803
|
-
"allow-clear": "",
|
|
804
|
-
"tree-default-expand-all": "",
|
|
805
|
-
"dropdown-style": { maxHeight: "180px", overflow: "auto" },
|
|
806
|
-
onChange: ($event) => $setup.handleChangeField(item),
|
|
807
|
-
"tree-data": $setup.fieldTreeData
|
|
808
|
-
}, null, 8, ["value", "onUpdate:value", "onChange", "tree-data"])
|
|
809
|
-
]),
|
|
810
|
-
_: 2
|
|
811
|
-
}, 1032, ["name"]),
|
|
812
|
-
createVNode(_component_a_form_item, {
|
|
813
|
-
name: ["values", index, "rule"],
|
|
814
|
-
style: { "width": "100px" }
|
|
815
|
-
}, {
|
|
816
|
-
default: withCtx(() => [
|
|
817
|
-
createVNode(_component_a_select, {
|
|
818
|
-
style: { "width": "100%" },
|
|
819
|
-
placeholder: "\u8BF7\u9009\u62E9\u5339\u914D\u89C4\u5219",
|
|
820
|
-
value: item.rule,
|
|
821
|
-
"onUpdate:value": ($event) => item.rule = $event
|
|
822
|
-
}, {
|
|
823
|
-
default: withCtx(() => [
|
|
824
|
-
createVNode(_component_a_select_option, { value: "eq" }, {
|
|
825
|
-
default: withCtx(() => [
|
|
826
|
-
createTextVNode("\u7B49\u4E8E")
|
|
827
|
-
]),
|
|
828
|
-
_: 1
|
|
829
|
-
}),
|
|
830
|
-
createVNode(_component_a_select_option, { value: "like" }, {
|
|
831
|
-
default: withCtx(() => [
|
|
832
|
-
createTextVNode("\u6A21\u7CCA")
|
|
833
|
-
]),
|
|
834
|
-
_: 1
|
|
835
|
-
}),
|
|
836
|
-
createVNode(_component_a_select_option, { value: "right_like" }, {
|
|
837
|
-
default: withCtx(() => [
|
|
838
|
-
createTextVNode("\u4EE5..\u5F00\u59CB")
|
|
839
|
-
]),
|
|
840
|
-
_: 1
|
|
841
|
-
}),
|
|
842
|
-
createVNode(_component_a_select_option, { value: "left_like" }, {
|
|
843
|
-
default: withCtx(() => [
|
|
844
|
-
createTextVNode("\u4EE5..\u7ED3\u5C3E")
|
|
845
|
-
]),
|
|
846
|
-
_: 1
|
|
847
|
-
}),
|
|
848
|
-
createVNode(_component_a_select_option, { value: "in" }, {
|
|
849
|
-
default: withCtx(() => [
|
|
850
|
-
createTextVNode("\u5728...\u4E2D")
|
|
851
|
-
]),
|
|
852
|
-
_: 1
|
|
853
|
-
}),
|
|
854
|
-
createVNode(_component_a_select_option, { value: "ne" }, {
|
|
855
|
-
default: withCtx(() => [
|
|
856
|
-
createTextVNode("\u4E0D\u7B49\u4E8E")
|
|
857
|
-
]),
|
|
858
|
-
_: 1
|
|
859
|
-
}),
|
|
860
|
-
createVNode(_component_a_select_option, { value: "gt" }, {
|
|
861
|
-
default: withCtx(() => [
|
|
862
|
-
createTextVNode("\u5927\u4E8E")
|
|
863
|
-
]),
|
|
864
|
-
_: 1
|
|
865
|
-
}),
|
|
866
|
-
createVNode(_component_a_select_option, { value: "ge" }, {
|
|
867
|
-
default: withCtx(() => [
|
|
868
|
-
createTextVNode("\u5927\u4E8E\u7B49\u4E8E")
|
|
869
|
-
]),
|
|
870
|
-
_: 1
|
|
871
|
-
}),
|
|
872
|
-
createVNode(_component_a_select_option, { value: "lt" }, {
|
|
873
|
-
default: withCtx(() => [
|
|
874
|
-
createTextVNode("\u5C0F\u4E8E")
|
|
875
|
-
]),
|
|
876
|
-
_: 1
|
|
877
|
-
}),
|
|
878
|
-
createVNode(_component_a_select_option, { value: "le" }, {
|
|
879
|
-
default: withCtx(() => [
|
|
880
|
-
createTextVNode("\u5C0F\u4E8E\u7B49\u4E8E")
|
|
881
|
-
]),
|
|
882
|
-
_: 1
|
|
883
|
-
})
|
|
884
|
-
]),
|
|
885
|
-
_: 2
|
|
886
|
-
}, 1032, ["value", "onUpdate:value"])
|
|
887
|
-
]),
|
|
888
|
-
_: 2
|
|
889
|
-
}, 1032, ["name"]),
|
|
890
|
-
createVNode(_component_a_form_item, {
|
|
891
|
-
name: ["values", index, "val"],
|
|
892
|
-
style: { "width": "300px" }
|
|
893
|
-
}, {
|
|
894
|
-
default: withCtx(() => [
|
|
895
|
-
createVNode(_component_online_super_query_val_component, {
|
|
896
|
-
style: { "width": "100%" },
|
|
897
|
-
schema: $setup.getSchema(item, index),
|
|
898
|
-
formModel: item,
|
|
899
|
-
setFormModel: (key, value) => {
|
|
900
|
-
$setup.setFormModel(key, value, item);
|
|
901
|
-
},
|
|
902
|
-
onSubmit: $setup.handleSubmit
|
|
903
|
-
}, null, 8, ["schema", "formModel", "setFormModel", "onSubmit"])
|
|
904
|
-
]),
|
|
905
|
-
_: 2
|
|
906
|
-
}, 1032, ["name"]),
|
|
907
|
-
createVNode(_component_a_form_item, null, {
|
|
908
|
-
default: withCtx(() => [
|
|
909
|
-
createVNode(_component_a_button, {
|
|
910
|
-
onClick: ($event) => $setup.addOne(index),
|
|
911
|
-
style: { "margin-right": "6px" }
|
|
912
|
-
}, {
|
|
913
|
-
default: withCtx(() => [
|
|
914
|
-
createVNode(_component_PlusOutlined)
|
|
915
|
-
]),
|
|
916
|
-
_: 2
|
|
917
|
-
}, 1032, ["onClick"]),
|
|
918
|
-
createVNode(_component_a_button, {
|
|
919
|
-
onClick: ($event) => $setup.removeOne(item)
|
|
920
|
-
}, {
|
|
921
|
-
default: withCtx(() => [
|
|
922
|
-
createVNode(_component_MinusCircleOutlined)
|
|
923
|
-
]),
|
|
924
|
-
_: 2
|
|
925
|
-
}, 1032, ["onClick"])
|
|
926
|
-
]),
|
|
927
|
-
_: 2
|
|
928
|
-
}, 1024)
|
|
929
|
-
]),
|
|
930
|
-
_: 2
|
|
931
|
-
}, 1024);
|
|
932
|
-
}), 128))
|
|
933
|
-
]),
|
|
934
|
-
_: 1
|
|
935
|
-
}, 8, ["model", "onFinish"]), [
|
|
936
|
-
[vShow, $setup.dynamicRowValues.values.length > 0]
|
|
937
|
-
])
|
|
938
|
-
]),
|
|
939
|
-
_: 1
|
|
940
|
-
})
|
|
941
|
-
]),
|
|
942
|
-
_: 1
|
|
943
|
-
}),
|
|
944
|
-
createVNode(_component_a_card, {
|
|
945
|
-
class: normalizeClass(["j-super-query-history-card", { "collapsed": $setup.historyCollapsed }]),
|
|
946
|
-
bordered: false
|
|
947
|
-
}, {
|
|
948
|
-
title: withCtx(() => [
|
|
949
|
-
_hoisted_7
|
|
950
|
-
]),
|
|
951
|
-
default: withCtx(() => [
|
|
952
|
-
$setup.saveTreeData.length === 0 ? (openBlock(), createBlock(_component_a_empty, {
|
|
953
|
-
key: 0,
|
|
954
|
-
class: "j-super-query-history-empty",
|
|
955
|
-
image: $setup.simpleImage,
|
|
956
|
-
description: "\u6CA1\u6709\u4FDD\u5B58\u7684\u67E5\u8BE2"
|
|
957
|
-
}, null, 8, ["image"])) : (openBlock(), createBlock(_component_a_tree, {
|
|
958
|
-
key: 1,
|
|
959
|
-
class: "j-super-query-history-tree",
|
|
960
|
-
treeData: $setup.saveTreeData,
|
|
961
|
-
selectedKeys: [],
|
|
962
|
-
"show-icon": true,
|
|
963
|
-
onSelect: $setup.handleTreeSelect
|
|
964
|
-
}, {
|
|
965
|
-
title: withCtx(({ title }) => [
|
|
966
|
-
createElementVNode("div", null, [
|
|
967
|
-
createElementVNode("span", { title }, toDisplayString(title.length > 10 ? title.substring(0, 10) + "..." : title), 9, _hoisted_8),
|
|
968
|
-
createElementVNode("span", _hoisted_9, [
|
|
969
|
-
createVNode(_component_close_circle_outlined, {
|
|
970
|
-
onClick: ($event) => $setup.handleRemoveSaveInfo(title)
|
|
971
|
-
}, null, 8, ["onClick"])
|
|
972
|
-
])
|
|
973
|
-
])
|
|
974
|
-
]),
|
|
975
|
-
custom: withCtx(() => [
|
|
976
|
-
createVNode(_component_file_text_outlined)
|
|
977
|
-
]),
|
|
978
|
-
_: 1
|
|
979
|
-
}, 8, ["treeData", "onSelect"])),
|
|
980
|
-
createElementVNode("div", {
|
|
981
|
-
class: "collapse-box",
|
|
982
|
-
onClick: _cache[3] || (_cache[3] = ($event) => $setup.historyCollapsed = !$setup.historyCollapsed)
|
|
983
|
-
}, [
|
|
984
|
-
$setup.historyCollapsed ? (openBlock(), createBlock(_component_Icon, {
|
|
985
|
-
key: 0,
|
|
986
|
-
icon: "ant-design:caret-left"
|
|
987
|
-
})) : (openBlock(), createBlock(_component_Icon, {
|
|
988
|
-
key: 1,
|
|
989
|
-
icon: "ant-design:caret-right"
|
|
990
|
-
}))
|
|
991
|
-
])
|
|
992
|
-
]),
|
|
993
|
-
_: 1
|
|
994
|
-
}, 8, ["class"])
|
|
995
|
-
]),
|
|
996
|
-
_: 1
|
|
997
|
-
}, 8, ["onRegister", "onOk"])
|
|
998
|
-
])),
|
|
999
|
-
createVNode(_component_a_modal, {
|
|
1000
|
-
title: "\u8BF7\u8F93\u5165\u4FDD\u5B58\u7684\u540D\u79F0",
|
|
1001
|
-
visible: $setup.saveInfo.visible,
|
|
1002
|
-
onCancel: _cache[5] || (_cache[5] = ($event) => $setup.saveInfo.visible = false),
|
|
1003
|
-
onOk: $setup.doSaveQueryInfo
|
|
1004
|
-
}, {
|
|
1005
|
-
default: withCtx(() => [
|
|
1006
|
-
createElementVNode("div", _hoisted_10, [
|
|
1007
|
-
createVNode(_component_a_input, {
|
|
1008
|
-
value: $setup.saveInfo.title,
|
|
1009
|
-
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => $setup.saveInfo.title = $event),
|
|
1010
|
-
style: { "width": "90%" },
|
|
1011
|
-
placeholder: "\u8BF7\u8F93\u5165\u4FDD\u5B58\u7684\u540D\u79F0"
|
|
1012
|
-
}, null, 8, ["value"])
|
|
1013
|
-
])
|
|
1014
|
-
]),
|
|
1015
|
-
_: 1
|
|
1016
|
-
}, 8, ["visible", "onOk"])
|
|
1017
|
-
], 64);
|
|
1018
|
-
}
|
|
1019
|
-
var OnlineSuperQuery = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-31ffc821"]]);
|
|
1020
|
-
export { OnlineSuperQuery as default };
|