@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.
Files changed (82) hide show
  1. package/AuthButtonConfig.js +140 -0
  2. package/AuthButtonTree.js +183 -0
  3. package/AuthDataConfig.js +243 -0
  4. package/AuthDataTree.js +160 -0
  5. package/AuthFieldConfig.js +167 -0
  6. package/AuthFieldTree.js +273 -0
  7. package/AuthManagerDrawer.js +125 -0
  8. package/AuthSetterModal.js +317 -0
  9. package/CgformCopyList.js +253 -0
  10. package/CgformModal.js +748 -0
  11. package/CgreportModal.js +673 -0
  12. package/ChartAutoRender.js +69 -0
  13. package/ChartDoubleRender.js +154 -0
  14. package/ChartSingleRender.js +132 -0
  15. package/ChartTabsRender.js +218 -0
  16. package/CheckDictTable.js +121 -0
  17. package/CodeGeneratorModal.js +293 -0
  18. package/CustomButtonList.js +413 -0
  19. package/DBAttributeTable.js +278 -0
  20. package/DbToOnlineModal.js +190 -0
  21. package/EnhanceJavaModal.js +304 -0
  22. package/EnhanceJsHistory.js +231 -0
  23. package/EnhanceJsModal.js +293 -0
  24. package/EnhanceSqlModal.js +305 -0
  25. package/ErrorTip.js +21 -0
  26. package/ExtendConfigModal.js +142 -0
  27. package/FieldTable.js +185 -0
  28. package/FileSelectModal.js +102 -0
  29. package/ForeignKeyTable.js +78 -0
  30. package/FormSchemaFactory.js +938 -0
  31. package/GraphreportAutoChart.js +352 -0
  32. package/GraphreportList.js +239 -0
  33. package/GraphreportModal.js +559 -0
  34. package/IndexTable.js +96 -0
  35. package/JOnlineSearchSelect.js +107 -0
  36. package/LICENSE +7 -0
  37. package/LeftDepart.js +96 -0
  38. package/LeftRole.js +95 -0
  39. package/LeftUser.js +114 -0
  40. package/ModalFormDemo.js +84 -0
  41. package/OnlineAutoList.js +410 -0
  42. package/OnlineAutoModal.js +265 -0
  43. package/OnlineAutoTreeList.js +513 -0
  44. package/OnlineCustomModal.js +269 -0
  45. package/OnlineForm.js +809 -0
  46. package/OnlineQueryForm.js +442 -0
  47. package/OnlineSearchFormItem.js +428 -0
  48. package/OnlineSelectCascade.js +217 -0
  49. package/OnlineSubForm.js +200 -0
  50. package/OnlineSuperQuery.js +912 -0
  51. package/OnlineSuperQueryValComponent.js +8 -0
  52. package/OnlineSuperQueryValComponent.vue_vue_type_script_lang.js +172 -0
  53. package/PageAttributeTable.js +242 -0
  54. package/ParamsTable.js +71 -0
  55. package/ProcessOnlineForm.js +183 -0
  56. package/QueryTable.js +128 -0
  57. package/README.md +23 -0
  58. package/_arrayPush.js +276 -0
  59. package/auth.api.js +43 -0
  60. package/auth.data.js +144 -0
  61. package/cgform.data.js +235 -0
  62. package/cloneDeep.js +475 -0
  63. package/enhance.api.js +120 -0
  64. package/enhance.data.js +196 -0
  65. package/graphreport.api.js +23 -0
  66. package/index.js +64 -0
  67. package/index2.js +336 -0
  68. package/index3.js +799 -0
  69. package/isArray.js +47 -0
  70. package/main.index.js +6 -0
  71. package/package.json +6 -0
  72. package/pick.js +238 -0
  73. package/style.css +1 -0
  74. package/toString.js +31 -0
  75. package/useAutoForm.js +4274 -0
  76. package/useCgformList.js +353 -0
  77. package/useChartRender.js +405 -0
  78. package/useMessageOnline.js +71 -0
  79. package/useOnlineTest.js +26866 -0
  80. package/useSchemas.js +505 -0
  81. package/useTableColumns.js +1154 -0
  82. package/useTableSync.js +105 -0
@@ -0,0 +1,305 @@
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 { defineComponent, ref, reactive, computed, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementBlock, createCommentVNode, normalizeProps, guardReactiveProps, createTextVNode, nextTick } from "vue";
38
+ import { BasicModal, useModalInner, useModal } from "/@/components/Modal";
39
+ import { BasicForm, useForm } from "/@/components/Form";
40
+ import { BasicTable, TableAction } from "/@/components/Table";
41
+ import { useListPage } from "/@/hooks/system/useListPage";
42
+ import { u as useOnlineTest } from "./useOnlineTest.js";
43
+ import { b as useSqlFormSchemas, c as useSqlColumns } from "./enhance.data.js";
44
+ import { c as getEnhanceSqlByCode, e as saveEnhanceSql, f as doEnhanceSqlBatchDelete } from "./enhance.api.js";
45
+ import { _ as _export_sfc } from "./index.js";
46
+ import "/@/utils/http/axios";
47
+ import "/@/hooks/web/useMessage";
48
+ import "/@/utils/cache";
49
+ import "./cgform.data.js";
50
+ import "/@/utils/dict";
51
+ import "/@/utils/dict/JDictSelectUtil";
52
+ import "/@/utils/uuid";
53
+ import "/@/utils/is";
54
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
55
+ import "vue-router";
56
+ const _sfc_main = defineComponent({
57
+ name: "EnhanceSqlModal",
58
+ components: { BasicModal, BasicTable, BasicForm, TableAction },
59
+ emits: ["register"],
60
+ setup() {
61
+ const code = ref("");
62
+ const tableName = ref("");
63
+ const btnList = ref([]);
64
+ const { columns } = useSqlColumns(btnList);
65
+ const { doRequest, doDeleteRecord, tableContext } = useListPage({
66
+ tableProps: {
67
+ api: (params) => __async(this, null, function* () {
68
+ let { dataSource, btnList: $btnList } = yield getEnhanceSqlByCode(code.value, params);
69
+ btnList.value = $btnList;
70
+ return dataSource;
71
+ }),
72
+ columns,
73
+ canResize: false,
74
+ useSearchForm: false,
75
+ beforeFetch(params) {
76
+ return Object.assign(params, { column: "orderNum", order: "asc" });
77
+ }
78
+ }
79
+ });
80
+ const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
81
+ const [registerModal, { closeModal }] = useModalInner((data) => __async(this, null, function* () {
82
+ code.value = data.row.id;
83
+ tableName.value = data.row.tableName;
84
+ reload();
85
+ }));
86
+ const { aiTestMode, genEnhanceSqlData } = useOnlineTest({}, { reload }, null);
87
+ const [registerFormModal, formModal] = useModal();
88
+ const isUpdate = ref(false);
89
+ const formModalProps = reactive({
90
+ onRegister: registerFormModal,
91
+ title: computed(() => (isUpdate == null ? void 0 : isUpdate.value) ? "\u4FEE\u6539" : "\u65B0\u589E"),
92
+ width: 800,
93
+ confirmLoading: false,
94
+ onOk: onSubmit,
95
+ onCancel: formModal.closeModal
96
+ });
97
+ let formRecord = {};
98
+ const { formSchemas } = useSqlFormSchemas(btnList);
99
+ const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
100
+ schemas: formSchemas,
101
+ showActionButtonGroup: false
102
+ });
103
+ function onCancel() {
104
+ closeModal();
105
+ }
106
+ function openFormModal(data) {
107
+ return __async(this, null, function* () {
108
+ var _a;
109
+ isUpdate.value = data.isUpdate;
110
+ formRecord = __spreadValues({}, (_a = data.record) != null ? _a : {});
111
+ formModal.openModal();
112
+ yield nextTick();
113
+ yield resetFields();
114
+ setFieldsValue(formRecord);
115
+ });
116
+ }
117
+ function onAdd() {
118
+ openFormModal({ isUpdate: false });
119
+ }
120
+ function onEdit(record) {
121
+ openFormModal({ isUpdate: true, record });
122
+ }
123
+ function onGenEnhanceSqlData() {
124
+ genEnhanceSqlData(code.value, tableName.value);
125
+ }
126
+ function onBatchDelete() {
127
+ return __async(this, null, function* () {
128
+ doRequest(() => doEnhanceSqlBatchDelete(selectedRowKeys.value));
129
+ });
130
+ }
131
+ function onSubmit() {
132
+ return __async(this, null, function* () {
133
+ try {
134
+ formModalProps.confirmLoading = true;
135
+ let values = yield validate();
136
+ values = Object.assign({}, formRecord, values);
137
+ yield saveEnhanceSql(code.value, values, isUpdate.value);
138
+ reload();
139
+ formModal.closeModal();
140
+ } finally {
141
+ formModalProps.confirmLoading = false;
142
+ }
143
+ });
144
+ }
145
+ function getTableAction(record) {
146
+ return [
147
+ {
148
+ label: "\u7F16\u8F91",
149
+ onClick: () => onEdit(record)
150
+ }
151
+ ];
152
+ }
153
+ function getDropDownAction(record) {
154
+ return [
155
+ {
156
+ label: "\u5220\u9664",
157
+ popConfirm: {
158
+ title: "\u786E\u5B9A\u5220\u9664\u5417\uFF1F",
159
+ placement: "left",
160
+ confirm: () => doDeleteRecord(() => doEnhanceSqlBatchDelete([record.id]))
161
+ }
162
+ }
163
+ ];
164
+ }
165
+ return {
166
+ rowSelection,
167
+ selectedRowKeys,
168
+ aiTestMode,
169
+ onCancel,
170
+ onAdd,
171
+ onGenEnhanceSqlData,
172
+ onBatchDelete,
173
+ getTableAction,
174
+ getDropDownAction,
175
+ formModalProps,
176
+ registerModal,
177
+ registerTable,
178
+ registerForm
179
+ };
180
+ },
181
+ computed: {
182
+ tableScroll() {
183
+ let height = window.innerHeight;
184
+ return {
185
+ y: height - 320
186
+ };
187
+ }
188
+ }
189
+ });
190
+ const _hoisted_1 = /* @__PURE__ */ createTextVNode("\u65B0\u589E");
191
+ const _hoisted_2 = /* @__PURE__ */ createTextVNode(" \u5220\u9664 ");
192
+ const _hoisted_3 = /* @__PURE__ */ createTextVNode(" \u6279\u91CF\u64CD\u4F5C ");
193
+ const _hoisted_4 = /* @__PURE__ */ createTextVNode("\u5173\u95ED");
194
+ const _hoisted_5 = {
195
+ key: 0,
196
+ style: { "float": "left" }
197
+ };
198
+ const _hoisted_6 = /* @__PURE__ */ createTextVNode("\u751F\u6210\u6D4B\u8BD5\u6570\u636E");
199
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
200
+ const _component_a_button = resolveComponent("a-button");
201
+ const _component_a_icon = resolveComponent("a-icon");
202
+ const _component_a_menu_item = resolveComponent("a-menu-item");
203
+ const _component_a_menu = resolveComponent("a-menu");
204
+ const _component_a_dropdown = resolveComponent("a-dropdown");
205
+ const _component_TableAction = resolveComponent("TableAction");
206
+ const _component_BasicTable = resolveComponent("BasicTable");
207
+ const _component_BasicForm = resolveComponent("BasicForm");
208
+ const _component_a_spin = resolveComponent("a-spin");
209
+ const _component_BasicModal = resolveComponent("BasicModal");
210
+ return openBlock(), createBlock(_component_BasicModal, {
211
+ onRegister: _ctx.registerModal,
212
+ title: "SQL\u589E\u5F3A",
213
+ width: 1200,
214
+ defaultFullscreen: "",
215
+ onCancel: _ctx.onCancel
216
+ }, {
217
+ footer: withCtx(() => [
218
+ createVNode(_component_a_button, { onClick: _ctx.onCancel }, {
219
+ default: withCtx(() => [
220
+ _hoisted_4
221
+ ]),
222
+ _: 1
223
+ }, 8, ["onClick"]),
224
+ _ctx.aiTestMode ? (openBlock(), createElementBlock("div", _hoisted_5, [
225
+ createVNode(_component_a_button, { onClick: _ctx.onGenEnhanceSqlData }, {
226
+ default: withCtx(() => [
227
+ _hoisted_6
228
+ ]),
229
+ _: 1
230
+ }, 8, ["onClick"])
231
+ ])) : createCommentVNode("", true)
232
+ ]),
233
+ default: withCtx(() => [
234
+ createVNode(_component_BasicTable, {
235
+ onRegister: _ctx.registerTable,
236
+ rowSelection: _ctx.rowSelection
237
+ }, {
238
+ tableTitle: withCtx(() => [
239
+ createVNode(_component_a_button, {
240
+ onClick: _ctx.onAdd,
241
+ type: "primary",
242
+ preIcon: "ant-design:plus"
243
+ }, {
244
+ default: withCtx(() => [
245
+ _hoisted_1
246
+ ]),
247
+ _: 1
248
+ }, 8, ["onClick"]),
249
+ _ctx.selectedRowKeys.length > 0 ? (openBlock(), createBlock(_component_a_dropdown, { key: 0 }, {
250
+ overlay: withCtx(() => [
251
+ createVNode(_component_a_menu, null, {
252
+ default: withCtx(() => [
253
+ createVNode(_component_a_menu_item, {
254
+ key: "1",
255
+ onClick: _ctx.onBatchDelete
256
+ }, {
257
+ default: withCtx(() => [
258
+ createVNode(_component_a_icon, { type: "delete" }),
259
+ _hoisted_2
260
+ ]),
261
+ _: 1
262
+ }, 8, ["onClick"])
263
+ ]),
264
+ _: 1
265
+ })
266
+ ]),
267
+ default: withCtx(() => [
268
+ createVNode(_component_a_button, { style: { "margin-left": "8px" } }, {
269
+ default: withCtx(() => [
270
+ _hoisted_3,
271
+ createVNode(_component_a_icon, { type: "down" })
272
+ ]),
273
+ _: 1
274
+ })
275
+ ]),
276
+ _: 1
277
+ })) : createCommentVNode("", true)
278
+ ]),
279
+ action: withCtx(({ record }) => [
280
+ createVNode(_component_TableAction, {
281
+ actions: _ctx.getTableAction(record),
282
+ dropDownActions: _ctx.getDropDownAction(record)
283
+ }, null, 8, ["actions", "dropDownActions"])
284
+ ]),
285
+ _: 1
286
+ }, 8, ["onRegister", "rowSelection"]),
287
+ createVNode(_component_BasicModal, normalizeProps(guardReactiveProps(_ctx.formModalProps)), {
288
+ default: withCtx(() => [
289
+ createVNode(_component_a_spin, {
290
+ spinning: _ctx.formModalProps.confirmLoading
291
+ }, {
292
+ default: withCtx(() => [
293
+ createVNode(_component_BasicForm, { onRegister: _ctx.registerForm }, null, 8, ["onRegister"])
294
+ ]),
295
+ _: 1
296
+ }, 8, ["spinning"])
297
+ ]),
298
+ _: 1
299
+ }, 16)
300
+ ]),
301
+ _: 1
302
+ }, 8, ["onRegister", "onCancel"]);
303
+ }
304
+ var EnhanceSqlModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
305
+ export { EnhanceSqlModal as default };
package/ErrorTip.js ADDED
@@ -0,0 +1,21 @@
1
+ import { defineComponent, h } from "vue";
2
+ import { _ as _export_sfc } from "./index.js";
3
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
4
+ import "/@/hooks/web/useMessage";
5
+ import "vue-router";
6
+ var ErrorTip_vue_vue_type_style_index_0_scoped_true_lang = "";
7
+ const _sfc_main = defineComponent({
8
+ name: "ErrorTip",
9
+ props: {
10
+ tip: String,
11
+ tag: { type: String, default: "div" }
12
+ },
13
+ render() {
14
+ var _a;
15
+ return h(this.tag, {
16
+ class: ["error-tip"]
17
+ }, h("span", {}, (_a = this.tip) != null ? _a : this.$slots.default));
18
+ }
19
+ });
20
+ var ErrorTip = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7e37d703"]]);
21
+ export { ErrorTip as default };
@@ -0,0 +1,142 @@
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 { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createVNode, nextTick } from "vue";
22
+ import { BasicModal, useModalInner } from "/@/components/Modal";
23
+ import { BasicForm, useForm } from "/@/components/Form";
24
+ import { useMessage } from "/@/hooks/web/useMessage";
25
+ import { a as useExtendConfigFormSchemas } from "./useSchemas.js";
26
+ import { _ as _export_sfc } from "./index.js";
27
+ import "ant-design-vue";
28
+ import "@ant-design/icons-vue";
29
+ import "/@/utils/common/compUtils";
30
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
31
+ import "vue-router";
32
+ var ExtendConfigModal_vue_vue_type_style_index_0_scoped_true_lang = "";
33
+ const _sfc_main = defineComponent({
34
+ name: "CgformExtConfigModel",
35
+ components: { BasicModal, BasicForm },
36
+ props: {
37
+ parentForm: {
38
+ type: Object,
39
+ required: true
40
+ }
41
+ },
42
+ emits: ["register", "ok"],
43
+ setup(props, { emit }) {
44
+ const { createMessage: $message } = useMessage();
45
+ const { formSchemas } = useExtendConfigFormSchemas(props, {
46
+ onIsDesformChange,
47
+ onJoinQueryChange,
48
+ onReportPrintShowChange
49
+ });
50
+ const [registerForm, { resetFields, setFieldsValue, clearValidate, validate }] = useForm({
51
+ schemas: formSchemas,
52
+ showActionButtonGroup: false,
53
+ labelAlign: "right"
54
+ });
55
+ const [registerModal, { closeModal }] = useModalInner((data) => __async(this, null, function* () {
56
+ yield resetFields();
57
+ yield setFieldsValue(data.extConfigJson);
58
+ }));
59
+ function handleOk() {
60
+ return __async(this, null, function* () {
61
+ yield clearValidate();
62
+ yield nextTick();
63
+ try {
64
+ const values = yield validate();
65
+ emit("ok", values);
66
+ closeModal();
67
+ } catch (e) {
68
+ }
69
+ });
70
+ }
71
+ function handleCancel() {
72
+ closeModal();
73
+ }
74
+ function onIsDesformChange(value) {
75
+ if (value === "Y") {
76
+ let { themeTemplate } = props.parentForm.getFieldsValue(["themeTemplate"]);
77
+ if (themeTemplate === "erp") {
78
+ props.parentForm.setFieldsValue({ themeTemplate: "normal" });
79
+ $message.warning("\u8BF7\u6CE8\u610F\uFF1Aerp\u98CE\u683C\u4E0D\u652F\u6301\u5BF9\u63A5\u8868\u5355\u8BBE\u8BA1\uFF0C\u5DF2\u81EA\u52A8\u6539\u4E3A\u9ED8\u8BA4\u98CE\u683C\uFF01");
80
+ }
81
+ } else {
82
+ clearValidate("desFormCode");
83
+ }
84
+ }
85
+ function onReportPrintShowChange(value) {
86
+ if (value === 0) {
87
+ clearValidate("reportPrintUrl");
88
+ }
89
+ }
90
+ function onJoinQueryChange(value) {
91
+ if (value === 1) {
92
+ let {
93
+ themeTemplate,
94
+ isTree,
95
+ tableType
96
+ } = props.parentForm.getFieldsValue(["themeTemplate", "isTree", "tableType"]);
97
+ if (themeTemplate === "erp") {
98
+ $message.warning("\u8BF7\u6CE8\u610F\uFF1Aerp\u98CE\u683C\u4E0D\u652F\u6301\u8054\u5408\u67E5\u8BE2\uFF0C\u914D\u7F6E\u65E0\u6548!");
99
+ setFieldsValue({ joinQuery: 0 });
100
+ }
101
+ if (themeTemplate === "innerTable") {
102
+ $message.warning("\u8BF7\u6CE8\u610F\uFF1A\u5185\u5D4C\u98CE\u683C\u4E0D\u652F\u6301\u8054\u5408\u67E5\u8BE2\uFF0C\u914D\u7F6E\u65E0\u6548!");
103
+ setFieldsValue({ joinQuery: 0 });
104
+ }
105
+ if (tableType === 1) {
106
+ $message.warning("\u8BF7\u6CE8\u610F\uFF1A\u5355\u8868\u4E0D\u652F\u6301\u8054\u5408\u67E5\u8BE2\uFF0C\u914D\u7F6E\u65E0\u6548!");
107
+ setFieldsValue({ joinQuery: 0 });
108
+ } else if (tableType === 3) {
109
+ $message.warning("\u8BF7\u6CE8\u610F\uFF1A\u5F53\u524D\u8868\u4E3A\u9644\u8868\uFF0C\u8BF7\u5728\u5BF9\u5E94\u4E3B\u8868\u914D\u7F6E!");
110
+ setFieldsValue({ joinQuery: 0 });
111
+ } else if (isTree === "Y") {
112
+ $message.warning("\u8BF7\u6CE8\u610F\uFF1A\u6811\u5F62\u5217\u8868\u4E0D\u652F\u6301\u8054\u5408\u67E5\u8BE2\uFF0C\u914D\u7F6E\u65E0\u6548!");
113
+ setFieldsValue({ joinQuery: 0 });
114
+ }
115
+ }
116
+ }
117
+ return {
118
+ handleOk,
119
+ handleCancel,
120
+ registerModal,
121
+ registerForm
122
+ };
123
+ }
124
+ });
125
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
126
+ const _component_BasicForm = resolveComponent("BasicForm");
127
+ const _component_BasicModal = resolveComponent("BasicModal");
128
+ return openBlock(), createBlock(_component_BasicModal, {
129
+ onRegister: _ctx.registerModal,
130
+ title: "\u6269\u5C55\u914D\u7F6E",
131
+ width: 1e3,
132
+ onOk: _ctx.handleOk,
133
+ onCancel: _ctx.handleCancel
134
+ }, {
135
+ default: withCtx(() => [
136
+ createVNode(_component_BasicForm, { onRegister: _ctx.registerForm }, null, 8, ["onRegister"])
137
+ ]),
138
+ _: 1
139
+ }, 8, ["onRegister", "onOk", "onCancel"]);
140
+ }
141
+ var ExtendConfigModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5fbb254e"]]);
142
+ export { ExtendConfigModal as default };
package/FieldTable.js ADDED
@@ -0,0 +1,185 @@
1
+ import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, createTextVNode } from "vue";
2
+ import { JVxeTypes } from "/@/components/jeecg/JVxeTable/types";
3
+ import { useMessageOnline } from "./useMessageOnline.js";
4
+ import { _ as _export_sfc } from "./index.js";
5
+ import "ant-design-vue";
6
+ import "@ant-design/icons-vue";
7
+ import "/@/utils/is";
8
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
9
+ import "/@/hooks/web/useMessage";
10
+ import "vue-router";
11
+ const _sfc_main = defineComponent({
12
+ name: "ParamsTable",
13
+ props: {
14
+ loading: Boolean,
15
+ dataSource: Array
16
+ },
17
+ setup() {
18
+ const tableRef = ref();
19
+ const columns = ref([
20
+ {
21
+ title: "\u5B57\u6BB5\u540D",
22
+ key: "fieldName",
23
+ width: 180,
24
+ type: JVxeTypes.input,
25
+ defaultValue: "",
26
+ validateRules: [{ required: true, message: "${title}\u4E0D\u80FD\u4E3A\u7A7A" }],
27
+ placeholder: "\u8BF7\u8F93\u5165${title}"
28
+ },
29
+ {
30
+ title: "\u5B57\u6BB5\u6587\u672C",
31
+ key: "fieldTxt",
32
+ width: 180,
33
+ type: JVxeTypes.input,
34
+ defaultValue: "",
35
+ placeholder: "\u8BF7\u8F93\u5165${title}"
36
+ },
37
+ {
38
+ title: "\u5B57\u6BB5\u7C7B\u578B",
39
+ key: "fieldType",
40
+ width: 200,
41
+ type: JVxeTypes.select,
42
+ options: [
43
+ { title: "\u6570\u503C\u7C7B\u578B", value: "Integer" },
44
+ { title: "\u65E5\u671F\u7C7B\u578B", value: "Date" },
45
+ { title: "\u5B57\u7B26\u7C7B\u578B", value: "String" },
46
+ { title: "\u957F\u6574\u578B", value: "Long" }
47
+ ],
48
+ defaultValue: "",
49
+ placeholder: "\u8BF7\u9009\u62E9${title}"
50
+ },
51
+ {
52
+ title: "\u8BA1\u7B97\u603B\u8BA1",
53
+ key: "isTotal",
54
+ width: 80,
55
+ type: JVxeTypes.checkbox,
56
+ defaultChecked: false,
57
+ customValue: ["Y", "N"]
58
+ },
59
+ {
60
+ title: "\u662F\u5426\u67E5\u8BE2",
61
+ key: "searchFlag",
62
+ width: 80,
63
+ type: JVxeTypes.checkbox,
64
+ defaultChecked: false,
65
+ customValue: ["Y", "N"]
66
+ },
67
+ {
68
+ title: "\u67E5\u8BE2\u6A21\u5F0F",
69
+ key: "searchMode",
70
+ width: 180,
71
+ type: JVxeTypes.select,
72
+ options: [
73
+ { title: "\u5355\u6761\u4EF6\u67E5\u8BE2", value: "single" },
74
+ { title: "\u8303\u56F4\u67E5\u8BE2", value: "group" }
75
+ ],
76
+ defaultValue: "",
77
+ placeholder: "\u8BF7\u9009\u62E9${title}"
78
+ },
79
+ {
80
+ title: "\u5B57\u5178Code",
81
+ key: "dictCode",
82
+ width: 200,
83
+ type: JVxeTypes.input,
84
+ defaultValue: "",
85
+ placeholder: "\u8BF7\u9009\u62E9${title}"
86
+ },
87
+ {
88
+ title: "\u662F\u5426\u663E\u793A",
89
+ key: "isShow",
90
+ type: JVxeTypes.checkbox,
91
+ defaultChecked: true,
92
+ customValue: ["Y", "N"]
93
+ }
94
+ ]);
95
+ const { createConfirm: $confirm } = useMessageOnline();
96
+ function fieldNameConvertCase(convertCase, name) {
97
+ $confirm({
98
+ iconType: "info",
99
+ title: "\u8F6C\u6362\u5B57\u6BB5\u540D",
100
+ content: `\u786E\u5B9A\u8981\u5C06\u6240\u6709\u7684\u5B57\u6BB5\u540D\u90FD\u8F6C\u6362\u4E3A${name}\u5417\uFF1F`,
101
+ onOk() {
102
+ let fn = `to${convertCase}Case`;
103
+ let values = tableRef.value.getTableData();
104
+ let newValues = values.map((item) => {
105
+ return {
106
+ rowKey: item.id,
107
+ values: {
108
+ fieldName: item["fieldName"][fn]()
109
+ }
110
+ };
111
+ });
112
+ tableRef.value.setValues(newValues);
113
+ }
114
+ });
115
+ }
116
+ return { tableRef, columns, fieldNameConvertCase };
117
+ }
118
+ });
119
+ const _hoisted_1 = /* @__PURE__ */ createElementVNode("span", null, "\u8F6C\u6362\u4E3A\u5927\u5199", -1);
120
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", null, "\u8F6C\u6362\u4E3A\u5C0F\u5199", -1);
121
+ const _hoisted_3 = /* @__PURE__ */ createTextVNode("\u8F6C\u6362\u5B57\u6BB5\u540D");
122
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
123
+ const _component_a_icon = resolveComponent("a-icon");
124
+ const _component_a_menu_item = resolveComponent("a-menu-item");
125
+ const _component_a_menu = resolveComponent("a-menu");
126
+ const _component_a_button = resolveComponent("a-button");
127
+ const _component_a_dropdown = resolveComponent("a-dropdown");
128
+ const _component_JVxeTable = resolveComponent("JVxeTable");
129
+ return openBlock(), createBlock(_component_JVxeTable, {
130
+ ref: "tableRef",
131
+ toolbar: "",
132
+ rowNumber: "",
133
+ rowSelection: "",
134
+ dragSort: "",
135
+ sortKey: "orderNum",
136
+ loading: _ctx.loading,
137
+ columns: _ctx.columns,
138
+ dataSource: _ctx.dataSource,
139
+ height: 398
140
+ }, {
141
+ toolbarSuffix: withCtx(() => [
142
+ createVNode(_component_a_dropdown, null, {
143
+ overlay: withCtx(() => [
144
+ createVNode(_component_a_menu, null, {
145
+ default: withCtx(() => [
146
+ createVNode(_component_a_menu_item, {
147
+ key: "1",
148
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.fieldNameConvertCase("Upper", "\u5927\u5199"))
149
+ }, {
150
+ default: withCtx(() => [
151
+ createVNode(_component_a_icon, { type: "sort-descending" }),
152
+ _hoisted_1
153
+ ]),
154
+ _: 1
155
+ }),
156
+ createVNode(_component_a_menu_item, {
157
+ key: "2",
158
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.fieldNameConvertCase("Lower", "\u5C0F\u5199"))
159
+ }, {
160
+ default: withCtx(() => [
161
+ createVNode(_component_a_icon, { type: "sort-ascending" }),
162
+ _hoisted_2
163
+ ]),
164
+ _: 1
165
+ })
166
+ ]),
167
+ _: 1
168
+ })
169
+ ]),
170
+ default: withCtx(() => [
171
+ createVNode(_component_a_button, { preIcon: "ant-design:down" }, {
172
+ default: withCtx(() => [
173
+ _hoisted_3
174
+ ]),
175
+ _: 1
176
+ })
177
+ ]),
178
+ _: 1
179
+ })
180
+ ]),
181
+ _: 1
182
+ }, 8, ["loading", "columns", "dataSource"]);
183
+ }
184
+ var FieldTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
185
+ export { FieldTable as default };