@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/OnlineSubFormDetail.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
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 { useMessage } from "/@/hooks/web/useMessage";
|
|
22
|
-
import { ref, watch, resolveComponent, openBlock, createBlock } from "vue";
|
|
23
|
-
import { BasicForm } from "/@/components/Form/index";
|
|
24
|
-
import { defHttp } from "/@/utils/http/axios";
|
|
25
|
-
import { h as getDetailFormSchemas, g as getRefPromise } from "./useExtendComponent.js";
|
|
26
|
-
import { Loading } from "/@/components/Loading";
|
|
27
|
-
import DetailForm from "./DetailForm.js";
|
|
28
|
-
import { _ as _export_sfc } from "./index.js";
|
|
29
|
-
import "/@/components/Form/src/componentMap";
|
|
30
|
-
import "/@/utils/propTypes";
|
|
31
|
-
import "@ant-design/icons-vue";
|
|
32
|
-
import "/@/components/Modal";
|
|
33
|
-
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
34
|
-
import "/@/views/system/user/user.api";
|
|
35
|
-
import "./_commonjsHelpers.js";
|
|
36
|
-
import "/@/store/modules/user";
|
|
37
|
-
import "/@/utils";
|
|
38
|
-
import "/@/utils/desform/customExpression";
|
|
39
|
-
import "/@/store/modules/permission";
|
|
40
|
-
import "/@/utils/dict/JDictSelectUtil";
|
|
41
|
-
import "/@/utils/common/compUtils";
|
|
42
|
-
import "./pick.js";
|
|
43
|
-
import "./_flatRest.js";
|
|
44
|
-
import "./isArray.js";
|
|
45
|
-
import "./toString.js";
|
|
46
|
-
import "./_arrayPush.js";
|
|
47
|
-
import "/@/components/Table";
|
|
48
|
-
import "/@/hooks/system/useListPage";
|
|
49
|
-
import "vue-router";
|
|
50
|
-
import "/@/components/Form/src/utils/Area";
|
|
51
|
-
import "/@/components/Preview/index";
|
|
52
|
-
import "./LinkTableListPiece.js";
|
|
53
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
54
|
-
import "./OnlineSelectCascade.js";
|
|
55
|
-
import "/@/utils/auth";
|
|
56
|
-
import "./JModalTip.js";
|
|
57
|
-
import "ant-design-vue";
|
|
58
|
-
import "@vueuse/core";
|
|
59
|
-
import "/@/utils/dict";
|
|
60
|
-
import "/@/utils/dict/index";
|
|
61
|
-
import "/@/api/common/api";
|
|
62
|
-
const baseUrl = "/online/cgform/api/subform";
|
|
63
|
-
const _sfc_main = {
|
|
64
|
-
name: "OnlineSubFormDetail",
|
|
65
|
-
components: {
|
|
66
|
-
BasicForm,
|
|
67
|
-
Loading,
|
|
68
|
-
DetailForm
|
|
69
|
-
},
|
|
70
|
-
props: {
|
|
71
|
-
properties: {
|
|
72
|
-
type: Object,
|
|
73
|
-
required: true
|
|
74
|
-
},
|
|
75
|
-
mainId: {
|
|
76
|
-
type: String,
|
|
77
|
-
default: ""
|
|
78
|
-
},
|
|
79
|
-
table: {
|
|
80
|
-
type: String,
|
|
81
|
-
default: ""
|
|
82
|
-
},
|
|
83
|
-
formTemplate: {
|
|
84
|
-
type: Number,
|
|
85
|
-
default: 1
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
emits: ["formChange"],
|
|
89
|
-
setup(props) {
|
|
90
|
-
const formRendered = ref(false);
|
|
91
|
-
const { createMessage: $message } = useMessage();
|
|
92
|
-
const tableName = ref("");
|
|
93
|
-
const subFormData = ref({});
|
|
94
|
-
const { detailFormSchemas, createFormSchemas, formSpan } = getDetailFormSchemas(props);
|
|
95
|
-
watch(
|
|
96
|
-
() => props.table,
|
|
97
|
-
() => {
|
|
98
|
-
tableName.value = props.table;
|
|
99
|
-
},
|
|
100
|
-
{ immediate: true }
|
|
101
|
-
);
|
|
102
|
-
watch(
|
|
103
|
-
() => props.properties,
|
|
104
|
-
() => {
|
|
105
|
-
console.log("\u4E3B\u8868properties\u6539\u53D8", props.properties);
|
|
106
|
-
formRendered.value = false;
|
|
107
|
-
createFormSchemas(props.properties);
|
|
108
|
-
formRendered.value = true;
|
|
109
|
-
},
|
|
110
|
-
{ deep: true, immediate: true }
|
|
111
|
-
);
|
|
112
|
-
watch(
|
|
113
|
-
() => props.mainId,
|
|
114
|
-
() => {
|
|
115
|
-
console.log("\u4E3B\u8868ID\u6539\u53D8", props.mainId);
|
|
116
|
-
setTimeout(() => {
|
|
117
|
-
resetSubForm();
|
|
118
|
-
}, 100);
|
|
119
|
-
},
|
|
120
|
-
{ immediate: true }
|
|
121
|
-
);
|
|
122
|
-
function resetSubForm() {
|
|
123
|
-
return __async(this, null, function* () {
|
|
124
|
-
yield getRefPromise(formRendered);
|
|
125
|
-
subFormData.value = {};
|
|
126
|
-
const { table, mainId } = props;
|
|
127
|
-
if (!table || !mainId) {
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
let values = (yield loadData(table, mainId)) || {};
|
|
131
|
-
subFormData.value = values;
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
function loadData(table, mainId) {
|
|
135
|
-
let url = `${baseUrl}/${table}/${mainId}`;
|
|
136
|
-
return new Promise((resolve, reject) => {
|
|
137
|
-
defHttp.get({ url }, { isTransformResponse: false }).then((res) => {
|
|
138
|
-
console.log(res);
|
|
139
|
-
if (res.success) {
|
|
140
|
-
resolve(res.result);
|
|
141
|
-
} else {
|
|
142
|
-
console.log(res.message);
|
|
143
|
-
reject();
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
}).catch(() => {
|
|
147
|
-
$message.warning("\u5B50\u8868\u83B7\u53D6\u6570\u636E\u5931\u8D25:" + table);
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
return {
|
|
151
|
-
detailFormSchemas,
|
|
152
|
-
subFormData,
|
|
153
|
-
formSpan
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
158
|
-
const _component_detail_form = resolveComponent("detail-form");
|
|
159
|
-
return openBlock(), createBlock(_component_detail_form, {
|
|
160
|
-
schemas: $setup.detailFormSchemas,
|
|
161
|
-
data: $setup.subFormData,
|
|
162
|
-
span: $setup.formSpan
|
|
163
|
-
}, null, 8, ["schemas", "data", "span"]);
|
|
164
|
-
}
|
|
165
|
-
var OnlineSubFormDetail = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
166
|
-
export { OnlineSubFormDetail as default };
|
package/PageAttributeTable.js
DELETED
|
@@ -1,486 +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 { defineComponent, ref, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, mergeProps, withCtx, createBlock, createTextVNode, createCommentVNode } from "vue";
|
|
21
|
-
import { JVxeTypes } from "/@/components/jeecg/JVxeTable/types";
|
|
22
|
-
import { u as useTableSync } from "./useTableSync.js";
|
|
23
|
-
import LinkTableConfigModal from "./LinkTableConfigModal.js";
|
|
24
|
-
import LinkTableFieldConfigModal from "./LinkTableFieldConfigModal.js";
|
|
25
|
-
import FieldExtendJsonModal from "./FieldExtendJsonModal.js";
|
|
26
|
-
import { useModal } from "/@/components/Modal";
|
|
27
|
-
import { _ as _export_sfc } from "./index.js";
|
|
28
|
-
import "./cgform.data.js";
|
|
29
|
-
import "/@/utils/dict";
|
|
30
|
-
import "/@/utils/dict/JDictSelectUtil";
|
|
31
|
-
import "/@/utils/uuid";
|
|
32
|
-
import "./pick.js";
|
|
33
|
-
import "./_flatRest.js";
|
|
34
|
-
import "./isArray.js";
|
|
35
|
-
import "./toString.js";
|
|
36
|
-
import "./_arrayPush.js";
|
|
37
|
-
import "/@/components/Form/index";
|
|
38
|
-
import "/@/utils/http/axios";
|
|
39
|
-
import "./omit.js";
|
|
40
|
-
import "./_baseClone.js";
|
|
41
|
-
import "./_baseSlice.js";
|
|
42
|
-
import "/@/hooks/web/useMessage";
|
|
43
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
44
|
-
import "vue-router";
|
|
45
|
-
var PageAttributeTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
46
|
-
const commonPageOptions = [
|
|
47
|
-
{ title: "\u6587\u672C\u6846", value: "text" },
|
|
48
|
-
{ title: "\u5BC6\u7801", value: "password" },
|
|
49
|
-
{ title: "\u4E0B\u62C9\u6846", value: "list" },
|
|
50
|
-
{ title: "\u5355\u9009\u6846", value: "radio" },
|
|
51
|
-
{ title: "\u591A\u9009\u6846", value: "checkbox" },
|
|
52
|
-
{ title: "\u5F00\u5173", value: "switch" },
|
|
53
|
-
{ title: "\u65E5\u671F(\u5E74\u6708\u65E5)", value: "date" },
|
|
54
|
-
{ title: "\u65E5\u671F(\u5E74\u6708\u65E5\u65F6\u5206\u79D2)", value: "datetime" },
|
|
55
|
-
{ title: "\u65F6\u95F4(HH:mm:ss)", value: "time" },
|
|
56
|
-
{ title: "\u6587\u4EF6", value: "file" },
|
|
57
|
-
{ title: "\u56FE\u7247", value: "image" },
|
|
58
|
-
{ title: "\u591A\u884C\u6587\u672C", value: "textarea" },
|
|
59
|
-
{ title: "\u5BCC\u6587\u672C", value: "umeditor" },
|
|
60
|
-
{ title: "MarkDown", value: "markdown" },
|
|
61
|
-
{ title: "\u7528\u6237\u9009\u62E9", value: "sel_user" },
|
|
62
|
-
{ title: "\u90E8\u95E8\u9009\u62E9", value: "sel_depart" },
|
|
63
|
-
{ title: "\u5173\u8054\u8BB0\u5F55", value: "link_table" },
|
|
64
|
-
{ title: "\u4ED6\u8868\u5B57\u6BB5", value: "link_table_field" },
|
|
65
|
-
{ title: "\u7701\u5E02\u533A\u7EC4\u4EF6", value: "pca" },
|
|
66
|
-
{ title: "Popup\u5F39\u6846", value: "popup" },
|
|
67
|
-
{ title: "\u4E0B\u62C9\u591A\u9009\u6846", value: "list_multi" },
|
|
68
|
-
{ title: "\u4E0B\u62C9\u641C\u7D22\u6846", value: "sel_search" },
|
|
69
|
-
{ title: "\u5206\u7C7B\u5B57\u5178\u6811", value: "cat_tree" },
|
|
70
|
-
{ title: "\u81EA\u5B9A\u4E49\u6811\u63A7\u4EF6", value: "sel_tree" },
|
|
71
|
-
{ title: "\u8054\u52A8\u7EC4\u4EF6", value: "link_down" }
|
|
72
|
-
];
|
|
73
|
-
const subTablePageOptions = [
|
|
74
|
-
{ title: "\u6587\u672C\u6846", value: "text" },
|
|
75
|
-
{ title: "\u5355\u9009\u6846", value: "radio" },
|
|
76
|
-
{ title: "\u5F00\u5173", value: "switch" },
|
|
77
|
-
{ title: "\u65E5\u671F(yyyy-MM-dd)", value: "date" },
|
|
78
|
-
{ title: "\u65E5\u671F\uFF08yyyy-MM-dd HH:mm:ss\uFF09", value: "datetime" },
|
|
79
|
-
{ title: "\u65F6\u95F4\uFF08HH:mm:ss\uFF09", value: "time" },
|
|
80
|
-
{ title: "\u6587\u4EF6", value: "file" },
|
|
81
|
-
{ title: "\u56FE\u7247", value: "image" },
|
|
82
|
-
{ title: "\u4E0B\u62C9\u6846", value: "list" },
|
|
83
|
-
{ title: "\u4E0B\u62C9\u591A\u9009\u6846", value: "list_multi" },
|
|
84
|
-
{ title: "\u4E0B\u62C9\u641C\u7D22\u6846", value: "sel_search" },
|
|
85
|
-
{ title: "popup\u5F39\u51FA\u6846", value: "popup" },
|
|
86
|
-
{ title: "\u90E8\u95E8\u9009\u62E9", value: "sel_depart" },
|
|
87
|
-
{ title: "\u7528\u6237\u9009\u62E9", value: "sel_user" },
|
|
88
|
-
{ title: "\u7701\u5E02\u533A\u7EC4\u4EF6", value: "pca" },
|
|
89
|
-
{ title: "\u591A\u884C\u6587\u672C", value: "textarea" }
|
|
90
|
-
];
|
|
91
|
-
const _sfc_main = defineComponent({
|
|
92
|
-
name: "PageAttributeTable",
|
|
93
|
-
components: {
|
|
94
|
-
LinkTableConfigModal,
|
|
95
|
-
LinkTableFieldConfigModal,
|
|
96
|
-
FieldExtendJsonModal
|
|
97
|
-
},
|
|
98
|
-
setup() {
|
|
99
|
-
const columns = ref([
|
|
100
|
-
{ title: "\u5B57\u6BB5\u540D\u79F0", key: "dbFieldName", width: 100 },
|
|
101
|
-
{ title: "\u5B57\u6BB5\u5907\u6CE8", key: "dbFieldTxt", width: 150 },
|
|
102
|
-
{
|
|
103
|
-
title: "\u8868\u5355\u663E\u793A",
|
|
104
|
-
key: "isShowForm",
|
|
105
|
-
width: 80,
|
|
106
|
-
type: JVxeTypes.checkbox,
|
|
107
|
-
align: "center",
|
|
108
|
-
customValue: ["1", "0"],
|
|
109
|
-
defaultChecked: true
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
title: "\u5217\u8868\u663E\u793A",
|
|
113
|
-
key: "isShowList",
|
|
114
|
-
width: 80,
|
|
115
|
-
type: JVxeTypes.checkbox,
|
|
116
|
-
align: "center",
|
|
117
|
-
customValue: ["1", "0"],
|
|
118
|
-
defaultChecked: true
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
title: "\u662F\u5426\u6392\u5E8F",
|
|
122
|
-
key: "sortFlag",
|
|
123
|
-
width: 80,
|
|
124
|
-
type: JVxeTypes.checkbox,
|
|
125
|
-
align: "center",
|
|
126
|
-
customValue: ["1", "0"],
|
|
127
|
-
defaultChecked: false
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
title: "\u662F\u5426\u53EA\u8BFB",
|
|
131
|
-
key: "isReadOnly",
|
|
132
|
-
width: 80,
|
|
133
|
-
type: JVxeTypes.checkbox,
|
|
134
|
-
align: "center",
|
|
135
|
-
customValue: ["1", "0"],
|
|
136
|
-
defaultChecked: false
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
title: "\u63A7\u4EF6\u7C7B\u578B",
|
|
140
|
-
key: "fieldShowType",
|
|
141
|
-
width: 170,
|
|
142
|
-
type: JVxeTypes.select,
|
|
143
|
-
options: commonPageOptions,
|
|
144
|
-
defaultValue: "text",
|
|
145
|
-
placeholder: "\u8BF7\u9009\u62E9${title}",
|
|
146
|
-
validateRules: [{ required: true, message: "\u8BF7\u9009\u62E9${title}" }, { handler: validateFieldShowType }]
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
title: "\u63A7\u4EF6\u957F\u5EA6",
|
|
150
|
-
key: "fieldLength",
|
|
151
|
-
width: 120,
|
|
152
|
-
titleHelp: { message: "\u6B64\u957F\u5EA6\u53EA\u5BF9\u5B50\u8868\u5217\u5B57\u6BB5\u5BBD\u5EA6\u6709\u6548\uFF01" },
|
|
153
|
-
type: JVxeTypes.inputNumber,
|
|
154
|
-
defaultValue: 200,
|
|
155
|
-
placeholder: "\u8BF7\u8F93\u5165${title}",
|
|
156
|
-
validateRules: [{ required: true, message: "${title}\u4E0D\u80FD\u4E3A\u7A7A" }]
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
title: "\u662F\u5426\u67E5\u8BE2",
|
|
160
|
-
key: "isQuery",
|
|
161
|
-
width: 80,
|
|
162
|
-
type: JVxeTypes.checkbox,
|
|
163
|
-
align: "center",
|
|
164
|
-
customValue: ["1", "0"],
|
|
165
|
-
defaultChecked: false
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
title: "\u67E5\u8BE2\u7C7B\u578B",
|
|
169
|
-
key: "queryMode",
|
|
170
|
-
width: 110,
|
|
171
|
-
type: JVxeTypes.select,
|
|
172
|
-
options: [
|
|
173
|
-
{ title: "\u666E\u901A\u67E5\u8BE2", value: "single" },
|
|
174
|
-
{ title: "\u8303\u56F4\u67E5\u8BE2", value: "group" }
|
|
175
|
-
],
|
|
176
|
-
defaultValue: "single",
|
|
177
|
-
placeholder: "\u8BF7\u9009\u62E9${title}",
|
|
178
|
-
validateRules: [{ required: true, message: "\u8BF7\u9009\u62E9${title}" }]
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
title: "\u63A7\u4EF6\u9ED8\u8BA4\u503C",
|
|
182
|
-
key: "fieldDefaultValue",
|
|
183
|
-
width: 120,
|
|
184
|
-
type: JVxeTypes.input,
|
|
185
|
-
defaultValue: ""
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
title: "\u5B9A\u4E49\u8F6C\u6362\u5668",
|
|
189
|
-
key: "converter",
|
|
190
|
-
width: 150,
|
|
191
|
-
type: JVxeTypes.input,
|
|
192
|
-
defaultValue: ""
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
title: "\u6269\u5C55\u53C2\u6570",
|
|
196
|
-
key: "fieldExtendJson",
|
|
197
|
-
width: 120,
|
|
198
|
-
type: JVxeTypes.input,
|
|
199
|
-
defaultValue: ""
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
title: "\u66F4\u591A\u914D\u7F6E",
|
|
203
|
-
minWidth: 100,
|
|
204
|
-
key: "fieldConfig",
|
|
205
|
-
type: JVxeTypes.slot,
|
|
206
|
-
slotName: "fieldConfig"
|
|
207
|
-
}
|
|
208
|
-
]);
|
|
209
|
-
const setup = useTableSync(columns);
|
|
210
|
-
const { tableRef, tables } = setup;
|
|
211
|
-
function validateFieldShowType({ cellValue, row }, callback) {
|
|
212
|
-
let { dbTable } = tables;
|
|
213
|
-
let dbType = dbTable.value.tableRef.getTableData({ rowIds: [row.id] })[0].dbType;
|
|
214
|
-
if (cellValue === "time" && dbType !== "string") {
|
|
215
|
-
callback(false, "\u5F53\u63A7\u4EF6\u7C7B\u578B\u4E3A\u65F6\u95F4\u65F6,\u6570\u636E\u5E93\u5C5E\u6027\u91CC\u7684\u5B57\u6BB5\u7C7B\u578B\u5FC5\u987B\u662FString\uFF01");
|
|
216
|
-
} else if (cellValue === "date" && dbType !== "Date" && dbType !== "Datetime") {
|
|
217
|
-
callback(false, "\u5F53\u63A7\u4EF6\u7C7B\u578B\u4E3A\u65E5\u671F\u65F6\uFF0C\u6570\u636E\u5E93\u5C5E\u6027\u91CC\u7684\u5B57\u6BB5\u7C7B\u578B\u5FC5\u987B\u662FDate\u6216Datetime\uFF01");
|
|
218
|
-
} else if (cellValue === "datetime" && dbType !== "Datetime") {
|
|
219
|
-
callback(false, "\u5F53\u63A7\u4EF6\u7C7B\u578B\u4E3Adatetime\u65F6\uFF0C\u6570\u636E\u5E93\u5C5E\u6027\u91CC\u7684\u5B57\u6BB5\u7C7B\u578B\u5FC5\u987B\u662FDatetime\uFF01");
|
|
220
|
-
} else {
|
|
221
|
-
callback(true);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
function syncFieldShowType(row) {
|
|
225
|
-
let showType = "date";
|
|
226
|
-
if (row.dbType === "Datetime") {
|
|
227
|
-
showType = "datetime";
|
|
228
|
-
}
|
|
229
|
-
tableRef.value.setValues([
|
|
230
|
-
{
|
|
231
|
-
rowKey: row.id,
|
|
232
|
-
values: { fieldShowType: showType }
|
|
233
|
-
}
|
|
234
|
-
]);
|
|
235
|
-
}
|
|
236
|
-
function changePageType(flag) {
|
|
237
|
-
for (let col of columns.value) {
|
|
238
|
-
if (col.key == "fieldShowType") {
|
|
239
|
-
col.options = !flag ? commonPageOptions : subTablePageOptions;
|
|
240
|
-
break;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
function enableQuery(id) {
|
|
245
|
-
tableRef.value.setValues([
|
|
246
|
-
{
|
|
247
|
-
rowKey: id,
|
|
248
|
-
values: { isQuery: "1" }
|
|
249
|
-
}
|
|
250
|
-
]);
|
|
251
|
-
}
|
|
252
|
-
const [registerModal, { openModal }] = useModal();
|
|
253
|
-
const [registerFieldModal, { openModal: openFieldModal }] = useModal();
|
|
254
|
-
const [registerExtJsonModal, { openModal: openExtJsonModal }] = useModal();
|
|
255
|
-
function showConfigButton(props) {
|
|
256
|
-
if (props.row.dbFieldName == "id") {
|
|
257
|
-
return false;
|
|
258
|
-
} else {
|
|
259
|
-
return true;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
function openConfig(props) {
|
|
263
|
-
if (props.row.fieldShowType.indexOf("link_table") >= 0) {
|
|
264
|
-
showFieldConfig(props);
|
|
265
|
-
} else {
|
|
266
|
-
showExtJsonConfig(props);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
function showFieldConfig(props) {
|
|
270
|
-
let { row } = props;
|
|
271
|
-
let { checkTable } = tables;
|
|
272
|
-
if (checkTable) {
|
|
273
|
-
let checkTableValue = checkTable.value.tableRef.getTableData({ rowIds: [row.id] })[0];
|
|
274
|
-
if (props.row.fieldShowType == "link_table") {
|
|
275
|
-
let record = getLinkTableModalData(row, checkTableValue);
|
|
276
|
-
openModal(true, {
|
|
277
|
-
record,
|
|
278
|
-
fieldName: row.dbFieldName
|
|
279
|
-
});
|
|
280
|
-
} else if (props.row.fieldShowType == "link_table_field") {
|
|
281
|
-
let data = getLinkTableFieldData(row, checkTableValue);
|
|
282
|
-
openFieldModal(true, data);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
function getLinkTableFieldData(row, checkTableValue) {
|
|
287
|
-
let tableData = tableRef.value.getTableData();
|
|
288
|
-
let pageTableData = tableData.filter((item) => item.fieldShowType == "link_table");
|
|
289
|
-
let tableAndFieldsMap = {};
|
|
290
|
-
if (pageTableData && pageTableData.length > 0) {
|
|
291
|
-
let checkTableData = tables.checkTable.value.tableRef.getTableData();
|
|
292
|
-
for (let pageTable of pageTableData) {
|
|
293
|
-
let tempArray = checkTableData.filter((i) => i.dbFieldName == pageTable.dbFieldName);
|
|
294
|
-
if (tempArray && tempArray.length > 0) {
|
|
295
|
-
let item = tempArray[0];
|
|
296
|
-
tableAndFieldsMap[item.dbFieldName] = {
|
|
297
|
-
title: pageTable.dbFieldTxt,
|
|
298
|
-
table: item.dictTable,
|
|
299
|
-
fields: item.dictText
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
const { dictTable, dictText } = checkTableValue;
|
|
305
|
-
const { id, dbFieldTxt } = row;
|
|
306
|
-
let record = {
|
|
307
|
-
rowKey: id,
|
|
308
|
-
dbFieldTxt,
|
|
309
|
-
dictText,
|
|
310
|
-
dictTable
|
|
311
|
-
};
|
|
312
|
-
return {
|
|
313
|
-
record,
|
|
314
|
-
tableAndFieldsMap
|
|
315
|
-
};
|
|
316
|
-
}
|
|
317
|
-
function getLinkTableModalData(row, checkTableValue) {
|
|
318
|
-
const { id, dbFieldTxt, fieldExtendJson } = row;
|
|
319
|
-
const { dictTable, dictText } = checkTableValue;
|
|
320
|
-
let result = {
|
|
321
|
-
rowKey: id,
|
|
322
|
-
dbFieldTxt,
|
|
323
|
-
dictTable
|
|
324
|
-
};
|
|
325
|
-
if (dictText) {
|
|
326
|
-
let arr = dictText.split(",");
|
|
327
|
-
result["titleField"] = arr[0];
|
|
328
|
-
if (arr.length > 1) {
|
|
329
|
-
result["otherFields"] = dictText.substring(dictText.indexOf(",") + 1);
|
|
330
|
-
}
|
|
331
|
-
} else {
|
|
332
|
-
result["titleField"] = "";
|
|
333
|
-
result["otherFields"] = "";
|
|
334
|
-
}
|
|
335
|
-
if (fieldExtendJson) {
|
|
336
|
-
try {
|
|
337
|
-
let json = JSON.parse(fieldExtendJson);
|
|
338
|
-
if (json.multiSelect) {
|
|
339
|
-
result["multiSelect"] = json.multiSelect;
|
|
340
|
-
} else {
|
|
341
|
-
result["multiSelect"] = false;
|
|
342
|
-
}
|
|
343
|
-
if (json.showType) {
|
|
344
|
-
result["showType"] = json.showType;
|
|
345
|
-
} else {
|
|
346
|
-
result["showType"] = "card";
|
|
347
|
-
}
|
|
348
|
-
if (json.imageField) {
|
|
349
|
-
result["imageField"] = json.imageField;
|
|
350
|
-
} else {
|
|
351
|
-
result["imageField"] = "";
|
|
352
|
-
}
|
|
353
|
-
} catch (e) {
|
|
354
|
-
console.error("\u89E3\u6790\u6269\u5C55\u53C2\u6570\u51FA\u9519", fieldExtendJson);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
return result;
|
|
358
|
-
}
|
|
359
|
-
function handleConfigData(record) {
|
|
360
|
-
const { multiSelect, showType, imageField, fieldName } = record;
|
|
361
|
-
let extJson = { showType, multiSelect, imageField };
|
|
362
|
-
let values = [{ rowKey: record.rowKey, values: { fieldExtendJson: JSON.stringify(extJson), dbFieldTxt: record.dbFieldTxt } }];
|
|
363
|
-
tableRef.value.setValues(values);
|
|
364
|
-
let { checkTable, dbTable } = tables;
|
|
365
|
-
if (dbTable) {
|
|
366
|
-
let dbTableValues = [{ rowKey: record.rowKey, values: { dbFieldTxt: record.dbFieldTxt } }];
|
|
367
|
-
dbTable.value.tableRef.setValues(dbTableValues);
|
|
368
|
-
}
|
|
369
|
-
if (checkTable) {
|
|
370
|
-
let dictText = record.titleField;
|
|
371
|
-
if (record.otherFields) {
|
|
372
|
-
dictText += "," + record.otherFields;
|
|
373
|
-
}
|
|
374
|
-
const { dictTable, dictField } = record;
|
|
375
|
-
let temp = {
|
|
376
|
-
dictTable,
|
|
377
|
-
dictField,
|
|
378
|
-
dictText,
|
|
379
|
-
dbFieldName: fieldName
|
|
380
|
-
};
|
|
381
|
-
let dbTableValues = [{ rowKey: record.rowKey, values: temp }];
|
|
382
|
-
checkTable.value.tableRef.setValues(dbTableValues);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
function handleFieldConfigData(record) {
|
|
386
|
-
const { dbFieldTxt, dictTable, dictText, rowKey } = record;
|
|
387
|
-
let values = [{ rowKey, values: { dbFieldTxt } }];
|
|
388
|
-
tableRef.value.setValues(values);
|
|
389
|
-
let { checkTable, dbTable } = tables;
|
|
390
|
-
if (dbTable) {
|
|
391
|
-
let tableValues = [{ rowKey, values: { dbFieldTxt, dbIsPersist: "0" } }];
|
|
392
|
-
dbTable.value.tableRef.setValues(tableValues);
|
|
393
|
-
}
|
|
394
|
-
if (checkTable) {
|
|
395
|
-
let tableValues = [{ rowKey, values: { dictTable, dictText } }];
|
|
396
|
-
checkTable.value.tableRef.setValues(tableValues);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
function showExtJsonConfig(props) {
|
|
400
|
-
let jsonStr = props.row.fieldExtendJson || "";
|
|
401
|
-
let id = props.rowId;
|
|
402
|
-
let fieldShowType = props.row.fieldShowType || "";
|
|
403
|
-
let sortFlag = props.row.sortFlag || "0";
|
|
404
|
-
openExtJsonModal(true, {
|
|
405
|
-
jsonStr,
|
|
406
|
-
fieldShowType,
|
|
407
|
-
sortFlag,
|
|
408
|
-
id
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
function handleExtJson(data, rowKey) {
|
|
412
|
-
let values;
|
|
413
|
-
if (data && Object.keys(data).length > 0) {
|
|
414
|
-
values = [{ rowKey, values: { fieldExtendJson: JSON.stringify(data) } }];
|
|
415
|
-
} else {
|
|
416
|
-
values = [{ rowKey, values: { fieldExtendJson: "" } }];
|
|
417
|
-
}
|
|
418
|
-
tableRef.value.setValues(values);
|
|
419
|
-
}
|
|
420
|
-
return __spreadProps(__spreadValues({}, setup), {
|
|
421
|
-
columns,
|
|
422
|
-
enableQuery,
|
|
423
|
-
syncFieldShowType,
|
|
424
|
-
changePageType,
|
|
425
|
-
showConfigButton,
|
|
426
|
-
showFieldConfig,
|
|
427
|
-
registerExtJsonModal,
|
|
428
|
-
handleExtJson,
|
|
429
|
-
openConfig,
|
|
430
|
-
registerModal,
|
|
431
|
-
handleConfigData,
|
|
432
|
-
registerFieldModal,
|
|
433
|
-
handleFieldConfigData
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
});
|
|
437
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
438
|
-
const _component_a_button = resolveComponent("a-button");
|
|
439
|
-
const _component_JVxeTable = resolveComponent("JVxeTable");
|
|
440
|
-
const _component_link_table_config_modal = resolveComponent("link-table-config-modal");
|
|
441
|
-
const _component_link_table_field_config_modal = resolveComponent("link-table-field-config-modal");
|
|
442
|
-
const _component_FieldExtendJsonModal = resolveComponent("FieldExtendJsonModal");
|
|
443
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
444
|
-
createVNode(_component_JVxeTable, mergeProps({
|
|
445
|
-
ref: "tableRef",
|
|
446
|
-
"row-class-name": "online-config-page",
|
|
447
|
-
rowNumber: "",
|
|
448
|
-
keyboardEdit: "",
|
|
449
|
-
maxHeight: _ctx.tableHeight.noToolbar,
|
|
450
|
-
loading: _ctx.loading,
|
|
451
|
-
columns: _ctx.columns,
|
|
452
|
-
dataSource: _ctx.dataSource,
|
|
453
|
-
disabledRows: { dbFieldName: ["id", "has_child"] }
|
|
454
|
-
}, _ctx.tableProps), {
|
|
455
|
-
fieldConfig: withCtx((props) => [
|
|
456
|
-
_ctx.showConfigButton(props) ? (openBlock(), createBlock(_component_a_button, {
|
|
457
|
-
key: 0,
|
|
458
|
-
type: "primary",
|
|
459
|
-
size: "small",
|
|
460
|
-
ghost: "",
|
|
461
|
-
onClick: ($event) => _ctx.openConfig(props)
|
|
462
|
-
}, {
|
|
463
|
-
default: withCtx(() => [
|
|
464
|
-
createTextVNode("\u9AD8\u7EA7\u914D\u7F6E")
|
|
465
|
-
]),
|
|
466
|
-
_: 2
|
|
467
|
-
}, 1032, ["onClick"])) : createCommentVNode("", true)
|
|
468
|
-
]),
|
|
469
|
-
_: 1
|
|
470
|
-
}, 16, ["maxHeight", "loading", "columns", "dataSource"]),
|
|
471
|
-
createVNode(_component_link_table_config_modal, {
|
|
472
|
-
onRegister: _ctx.registerModal,
|
|
473
|
-
onSuccess: _ctx.handleConfigData
|
|
474
|
-
}, null, 8, ["onRegister", "onSuccess"]),
|
|
475
|
-
createVNode(_component_link_table_field_config_modal, {
|
|
476
|
-
onRegister: _ctx.registerFieldModal,
|
|
477
|
-
onSuccess: _ctx.handleFieldConfigData
|
|
478
|
-
}, null, 8, ["onRegister", "onSuccess"]),
|
|
479
|
-
createVNode(_component_FieldExtendJsonModal, {
|
|
480
|
-
onRegister: _ctx.registerExtJsonModal,
|
|
481
|
-
onSuccess: _ctx.handleExtJson
|
|
482
|
-
}, null, 8, ["onRegister", "onSuccess"])
|
|
483
|
-
], 64);
|
|
484
|
-
}
|
|
485
|
-
var PageAttributeTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5c39d0ca"]]);
|
|
486
|
-
export { PageAttributeTable as default };
|