@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
package/QueryTable.js ADDED
@@ -0,0 +1,128 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, ref, resolveComponent, openBlock, createBlock } from "vue";
21
+ import { JVxeTypes } from "/@/components/jeecg/JVxeTable/types";
22
+ import { u as useTableSync } from "./useTableSync.js";
23
+ import { _ as _export_sfc } from "./index.js";
24
+ import "./cgform.data.js";
25
+ import "/@/utils/dict";
26
+ import "/@/utils/dict/JDictSelectUtil";
27
+ import "/@/utils/uuid";
28
+ import "./pick.js";
29
+ import "./isArray.js";
30
+ import "./toString.js";
31
+ import "./_arrayPush.js";
32
+ import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
33
+ import "/@/hooks/web/useMessage";
34
+ import "vue-router";
35
+ const _sfc_main = defineComponent({
36
+ name: "QueryTable",
37
+ emits: ["query"],
38
+ setup(_, { emit }) {
39
+ const columns = ref([
40
+ { title: "\u5B57\u6BB5\u540D\u79F0", key: "dbFieldName", width: 130 },
41
+ { title: "\u5B57\u6BB5\u5907\u6CE8", key: "dbFieldTxt", width: 130 },
42
+ {
43
+ title: "\u63A7\u4EF6\u7C7B\u578B",
44
+ key: "queryShowType",
45
+ width: 170,
46
+ type: JVxeTypes.select,
47
+ options: [
48
+ { title: "\u6587\u672C\u6846", value: "text" },
49
+ { title: "\u65E5\u671F(yyyy-MM-dd)", value: "date" },
50
+ { title: "\u65E5\u671F\uFF08yyyy-MM-dd HH:mm:ss\uFF09", value: "datetime" },
51
+ { title: "\u65F6\u95F4\uFF08HH:mm:ss\uFF09", value: "time" },
52
+ { title: "\u4E0B\u62C9\u6846", value: "list" },
53
+ { title: "\u4E0B\u62C9\u591A\u9009\u6846", value: "list_multi" },
54
+ { title: "\u4E0B\u62C9\u641C\u7D22\u6846", value: "sel_search" },
55
+ { title: "\u5206\u7C7B\u5B57\u5178\u6811", value: "cat_tree" },
56
+ { title: "Popup\u5F39\u6846", value: "popup" },
57
+ { title: "\u90E8\u95E8\u9009\u62E9", value: "sel_depart" },
58
+ { title: "\u7528\u6237\u9009\u62E9", value: "sel_user" },
59
+ { title: "\u7701\u5E02\u533A\u7EC4\u4EF6", value: "pca" },
60
+ { title: "\u81EA\u5B9A\u4E49\u6811\u63A7\u4EF6", value: "sel_tree" }
61
+ ],
62
+ defaultValue: "text",
63
+ placeholder: "\u8BF7\u9009\u62E9${title}"
64
+ },
65
+ {
66
+ title: "\u5B57\u5178Table",
67
+ key: "queryDictTable",
68
+ width: 130,
69
+ type: JVxeTypes.textarea,
70
+ defaultValue: ""
71
+ },
72
+ {
73
+ title: "\u5B57\u5178Code",
74
+ key: "queryDictField",
75
+ width: 130,
76
+ type: JVxeTypes.input,
77
+ defaultValue: ""
78
+ },
79
+ {
80
+ title: "\u5B57\u5178Text",
81
+ key: "queryDictText",
82
+ width: 130,
83
+ type: JVxeTypes.input,
84
+ defaultValue: ""
85
+ },
86
+ {
87
+ title: "\u9ED8\u8BA4\u503C",
88
+ key: "queryDefVal",
89
+ width: 130,
90
+ type: JVxeTypes.input,
91
+ defaultValue: ""
92
+ },
93
+ {
94
+ title: "\u662F\u5426\u542F\u7528",
95
+ key: "queryConfigFlag",
96
+ minWidth: 80,
97
+ type: JVxeTypes.checkbox,
98
+ customValue: ["1", "0"],
99
+ defaultChecked: false
100
+ }
101
+ ]);
102
+ const setup = useTableSync(columns);
103
+ function handleChange({ row, column, value }) {
104
+ if (column.key === "queryConfigFlag") {
105
+ if (value === "1") {
106
+ emit("query", row.id);
107
+ }
108
+ }
109
+ }
110
+ return __spreadProps(__spreadValues({}, setup), { columns, handleChange });
111
+ }
112
+ });
113
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
114
+ const _component_JVxeTable = resolveComponent("JVxeTable");
115
+ return openBlock(), createBlock(_component_JVxeTable, {
116
+ ref: "tableRef",
117
+ rowNumber: "",
118
+ keyboardEdit: "",
119
+ maxHeight: _ctx.tableHeight.noToolbar,
120
+ loading: _ctx.loading,
121
+ columns: _ctx.columns,
122
+ dataSource: _ctx.dataSource,
123
+ disabledRows: { dbFieldName: ["id", "has_child"] },
124
+ onValueChange: _ctx.handleChange
125
+ }, null, 8, ["maxHeight", "loading", "columns", "dataSource", "onValueChange"]);
126
+ }
127
+ var QueryTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
128
+ export { QueryTable as default };
package/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # jeecg online form vue3
2
+
3
+
4
+ ## Install
5
+
6
+ ```bash
7
+ yarn add @jeecg/online
8
+ ```
9
+
10
+ ```javascript
11
+ src/main.js
12
+
13
+ require('@jeecg/antd-online-mini')
14
+ require('@jeecg/antd-online-mini/dist/OnlineForm.css')
15
+ ```
16
+
17
+ ## Description
18
+
19
+ ```
20
+ Jeecg Online UI
21
+ 1、低代码开发模块
22
+ 2、在线建表功能
23
+ ```
package/_arrayPush.js ADDED
@@ -0,0 +1,276 @@
1
+ import { b as baseGetTag, r as root, i as isObjectLike } from "./isArray.js";
2
+ function isObject(value) {
3
+ var type = typeof value;
4
+ return value != null && (type == "object" || type == "function");
5
+ }
6
+ var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
7
+ function isFunction(value) {
8
+ if (!isObject(value)) {
9
+ return false;
10
+ }
11
+ var tag = baseGetTag(value);
12
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
13
+ }
14
+ var coreJsData = root["__core-js_shared__"];
15
+ var coreJsData$1 = coreJsData;
16
+ var maskSrcKey = function() {
17
+ var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
18
+ return uid ? "Symbol(src)_1." + uid : "";
19
+ }();
20
+ function isMasked(func) {
21
+ return !!maskSrcKey && maskSrcKey in func;
22
+ }
23
+ var funcProto$1 = Function.prototype;
24
+ var funcToString$1 = funcProto$1.toString;
25
+ function toSource(func) {
26
+ if (func != null) {
27
+ try {
28
+ return funcToString$1.call(func);
29
+ } catch (e) {
30
+ }
31
+ try {
32
+ return func + "";
33
+ } catch (e) {
34
+ }
35
+ }
36
+ return "";
37
+ }
38
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
39
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
40
+ var funcProto = Function.prototype, objectProto$4 = Object.prototype;
41
+ var funcToString = funcProto.toString;
42
+ var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
43
+ var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$4).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
44
+ function baseIsNative(value) {
45
+ if (!isObject(value) || isMasked(value)) {
46
+ return false;
47
+ }
48
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
49
+ return pattern.test(toSource(value));
50
+ }
51
+ function getValue(object, key) {
52
+ return object == null ? void 0 : object[key];
53
+ }
54
+ function getNative(object, key) {
55
+ var value = getValue(object, key);
56
+ return baseIsNative(value) ? value : void 0;
57
+ }
58
+ var defineProperty = function() {
59
+ try {
60
+ var func = getNative(Object, "defineProperty");
61
+ func({}, "", {});
62
+ return func;
63
+ } catch (e) {
64
+ }
65
+ }();
66
+ var defineProperty$1 = defineProperty;
67
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
68
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
69
+ function isIndex(value, length) {
70
+ var type = typeof value;
71
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
72
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
73
+ }
74
+ function baseAssignValue(object, key, value) {
75
+ if (key == "__proto__" && defineProperty$1) {
76
+ defineProperty$1(object, key, {
77
+ "configurable": true,
78
+ "enumerable": true,
79
+ "value": value,
80
+ "writable": true
81
+ });
82
+ } else {
83
+ object[key] = value;
84
+ }
85
+ }
86
+ function eq(value, other) {
87
+ return value === other || value !== value && other !== other;
88
+ }
89
+ var objectProto$3 = Object.prototype;
90
+ var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
91
+ function assignValue(object, key, value) {
92
+ var objValue = object[key];
93
+ if (!(hasOwnProperty$3.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
94
+ baseAssignValue(object, key, value);
95
+ }
96
+ }
97
+ var MAX_SAFE_INTEGER = 9007199254740991;
98
+ function isLength(value) {
99
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
100
+ }
101
+ var argsTag = "[object Arguments]";
102
+ function baseIsArguments(value) {
103
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
104
+ }
105
+ var objectProto$2 = Object.prototype;
106
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
107
+ var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
108
+ var isArguments = baseIsArguments(function() {
109
+ return arguments;
110
+ }()) ? baseIsArguments : function(value) {
111
+ return isObjectLike(value) && hasOwnProperty$2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
112
+ };
113
+ var isArguments$1 = isArguments;
114
+ var nativeCreate = getNative(Object, "create");
115
+ var nativeCreate$1 = nativeCreate;
116
+ function hashClear() {
117
+ this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
118
+ this.size = 0;
119
+ }
120
+ function hashDelete(key) {
121
+ var result = this.has(key) && delete this.__data__[key];
122
+ this.size -= result ? 1 : 0;
123
+ return result;
124
+ }
125
+ var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
126
+ var objectProto$1 = Object.prototype;
127
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
128
+ function hashGet(key) {
129
+ var data = this.__data__;
130
+ if (nativeCreate$1) {
131
+ var result = data[key];
132
+ return result === HASH_UNDEFINED$1 ? void 0 : result;
133
+ }
134
+ return hasOwnProperty$1.call(data, key) ? data[key] : void 0;
135
+ }
136
+ var objectProto = Object.prototype;
137
+ var hasOwnProperty = objectProto.hasOwnProperty;
138
+ function hashHas(key) {
139
+ var data = this.__data__;
140
+ return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty.call(data, key);
141
+ }
142
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
143
+ function hashSet(key, value) {
144
+ var data = this.__data__;
145
+ this.size += this.has(key) ? 0 : 1;
146
+ data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED : value;
147
+ return this;
148
+ }
149
+ function Hash(entries) {
150
+ var index = -1, length = entries == null ? 0 : entries.length;
151
+ this.clear();
152
+ while (++index < length) {
153
+ var entry = entries[index];
154
+ this.set(entry[0], entry[1]);
155
+ }
156
+ }
157
+ Hash.prototype.clear = hashClear;
158
+ Hash.prototype["delete"] = hashDelete;
159
+ Hash.prototype.get = hashGet;
160
+ Hash.prototype.has = hashHas;
161
+ Hash.prototype.set = hashSet;
162
+ function listCacheClear() {
163
+ this.__data__ = [];
164
+ this.size = 0;
165
+ }
166
+ function assocIndexOf(array, key) {
167
+ var length = array.length;
168
+ while (length--) {
169
+ if (eq(array[length][0], key)) {
170
+ return length;
171
+ }
172
+ }
173
+ return -1;
174
+ }
175
+ var arrayProto = Array.prototype;
176
+ var splice = arrayProto.splice;
177
+ function listCacheDelete(key) {
178
+ var data = this.__data__, index = assocIndexOf(data, key);
179
+ if (index < 0) {
180
+ return false;
181
+ }
182
+ var lastIndex = data.length - 1;
183
+ if (index == lastIndex) {
184
+ data.pop();
185
+ } else {
186
+ splice.call(data, index, 1);
187
+ }
188
+ --this.size;
189
+ return true;
190
+ }
191
+ function listCacheGet(key) {
192
+ var data = this.__data__, index = assocIndexOf(data, key);
193
+ return index < 0 ? void 0 : data[index][1];
194
+ }
195
+ function listCacheHas(key) {
196
+ return assocIndexOf(this.__data__, key) > -1;
197
+ }
198
+ function listCacheSet(key, value) {
199
+ var data = this.__data__, index = assocIndexOf(data, key);
200
+ if (index < 0) {
201
+ ++this.size;
202
+ data.push([key, value]);
203
+ } else {
204
+ data[index][1] = value;
205
+ }
206
+ return this;
207
+ }
208
+ function ListCache(entries) {
209
+ var index = -1, length = entries == null ? 0 : entries.length;
210
+ this.clear();
211
+ while (++index < length) {
212
+ var entry = entries[index];
213
+ this.set(entry[0], entry[1]);
214
+ }
215
+ }
216
+ ListCache.prototype.clear = listCacheClear;
217
+ ListCache.prototype["delete"] = listCacheDelete;
218
+ ListCache.prototype.get = listCacheGet;
219
+ ListCache.prototype.has = listCacheHas;
220
+ ListCache.prototype.set = listCacheSet;
221
+ var Map = getNative(root, "Map");
222
+ var Map$1 = Map;
223
+ function mapCacheClear() {
224
+ this.size = 0;
225
+ this.__data__ = {
226
+ "hash": new Hash(),
227
+ "map": new (Map$1 || ListCache)(),
228
+ "string": new Hash()
229
+ };
230
+ }
231
+ function isKeyable(value) {
232
+ var type = typeof value;
233
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
234
+ }
235
+ function getMapData(map, key) {
236
+ var data = map.__data__;
237
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
238
+ }
239
+ function mapCacheDelete(key) {
240
+ var result = getMapData(this, key)["delete"](key);
241
+ this.size -= result ? 1 : 0;
242
+ return result;
243
+ }
244
+ function mapCacheGet(key) {
245
+ return getMapData(this, key).get(key);
246
+ }
247
+ function mapCacheHas(key) {
248
+ return getMapData(this, key).has(key);
249
+ }
250
+ function mapCacheSet(key, value) {
251
+ var data = getMapData(this, key), size = data.size;
252
+ data.set(key, value);
253
+ this.size += data.size == size ? 0 : 1;
254
+ return this;
255
+ }
256
+ function MapCache(entries) {
257
+ var index = -1, length = entries == null ? 0 : entries.length;
258
+ this.clear();
259
+ while (++index < length) {
260
+ var entry = entries[index];
261
+ this.set(entry[0], entry[1]);
262
+ }
263
+ }
264
+ MapCache.prototype.clear = mapCacheClear;
265
+ MapCache.prototype["delete"] = mapCacheDelete;
266
+ MapCache.prototype.get = mapCacheGet;
267
+ MapCache.prototype.has = mapCacheHas;
268
+ MapCache.prototype.set = mapCacheSet;
269
+ function arrayPush(array, values) {
270
+ var index = -1, length = values.length, offset = array.length;
271
+ while (++index < length) {
272
+ array[offset + index] = values[index];
273
+ }
274
+ return array;
275
+ }
276
+ export { ListCache as L, Map$1 as M, assignValue as a, baseAssignValue as b, isLength as c, isFunction as d, isArguments$1 as e, isIndex as f, getNative as g, MapCache as h, isObject as i, arrayPush as j, defineProperty$1 as k, toSource as t };
package/auth.api.js ADDED
@@ -0,0 +1,43 @@
1
+ import { defHttp } from "/@/utils/http/axios";
2
+ const authFieldLoadData = (cgformId, params) => defHttp.get({ url: `${"/online/cgform/api/authColumn"}/${cgformId}`, params });
3
+ const authFieldUpdateStatus = (params) => defHttp.put({ url: "/online/cgform/api/authColumn", params });
4
+ const authFieldUpdateCheckbox = (params) => defHttp.post({ url: "/online/cgform/api/authColumn", params });
5
+ const authButtonLoadData = (cgformId, params) => defHttp.get({ url: `${"/online/cgform/api/authButton"}/${cgformId}`, params });
6
+ const authButtonEnable = (params) => defHttp.post({ url: "/online/cgform/api/authButton", params });
7
+ const authButtonDisable = (id, params) => defHttp.put({ url: `${"/online/cgform/api/authButton"}/${id}`, params });
8
+ const authDataLoadData = (cgformId, params) => defHttp.get({ url: `${"/online/cgform/api/authData"}/${cgformId}`, params });
9
+ const authDataUpdateStatus = (params) => defHttp.put({ url: "/online/cgform/api/authData", params });
10
+ const authDataSaveOrUpdate = (params, isUpdate) => {
11
+ if (isUpdate) {
12
+ return defHttp.put({ url: "/online/cgform/api/authData", params });
13
+ } else {
14
+ return defHttp.post({ url: "/online/cgform/api/authData", params });
15
+ }
16
+ };
17
+ const authDataDelete = (id, params) => defHttp.delete({ url: `${"/online/cgform/api/authData"}/${id}`, params });
18
+ const authFieldLoadTree = (cgformId, authType, params) => {
19
+ let url = `${"/online/cgform/api/authPage"}/${cgformId}/${authType}`;
20
+ return defHttp.get({ url, params });
21
+ };
22
+ const authDataLoadTree = (cgformId, params) => {
23
+ let url = `${"/online/cgform/api/validAuthData"}/${cgformId}`;
24
+ return defHttp.get({ url, params });
25
+ };
26
+ const authButtonLoadTree = (cgformId, authType, params) => {
27
+ let url = `${"/online/cgform/api/authPage"}/${cgformId}/${authType}`;
28
+ return defHttp.get({ url, params });
29
+ };
30
+ const loadRoleAuthChecked = (params) => defHttp.get({ url: "/online/cgform/api/roleAuth", params });
31
+ const saveAuthField = (roleId, cgformId, params) => {
32
+ let url = `${"/online/cgform/api/roleColumnAuth"}/${roleId}/${cgformId}`;
33
+ return defHttp.post({ url, params });
34
+ };
35
+ const saveAuthData = (roleId, cgformId, params) => {
36
+ let url = `${"/online/cgform/api/roleDataAuth"}/${roleId}/${cgformId}`;
37
+ return defHttp.post({ url, params });
38
+ };
39
+ const saveAuthButton = (roleId, cgformId, params) => {
40
+ let url = `${"/online/cgform/api/roleButtonAuth"}/${roleId}/${cgformId}`;
41
+ return defHttp.post({ url, params });
42
+ };
43
+ export { authFieldLoadData as a, authFieldUpdateStatus as b, authFieldUpdateCheckbox as c, authButtonLoadData as d, authButtonEnable as e, authButtonDisable as f, authDataLoadData as g, authDataSaveOrUpdate as h, authDataUpdateStatus as i, authDataDelete as j, authFieldLoadTree as k, loadRoleAuthChecked as l, authButtonLoadTree as m, saveAuthButton as n, authDataLoadTree as o, saveAuthData as p, saveAuthField as s };
package/auth.data.js ADDED
@@ -0,0 +1,144 @@
1
+ import { computed } from "vue";
2
+ const authFieldColumns = [
3
+ {
4
+ title: "\u542F\u7528",
5
+ dataIndex: "switch",
6
+ width: 80,
7
+ align: "center",
8
+ slots: { customRender: "switch" }
9
+ },
10
+ {
11
+ title: "\u5B57\u6BB5\u540D\u79F0",
12
+ width: 200,
13
+ dataIndex: "code"
14
+ },
15
+ {
16
+ title: "\u5B57\u6BB5\u63CF\u8FF0",
17
+ dataIndex: "title"
18
+ },
19
+ {
20
+ title: "\u5217\u8868\u63A7\u5236",
21
+ dataIndex: "list",
22
+ width: 120,
23
+ slots: { customRender: "list" }
24
+ },
25
+ {
26
+ title: "\u8868\u5355\u63A7\u5236",
27
+ dataIndex: "form",
28
+ width: 180,
29
+ slots: { customRender: "form" }
30
+ }
31
+ ];
32
+ const authButtonColumns = [
33
+ {
34
+ title: "\u542F\u7528",
35
+ dataIndex: "switch",
36
+ width: 80,
37
+ slots: { customRender: "switch" }
38
+ },
39
+ {
40
+ title: "\u540D\u79F0",
41
+ dataIndex: "title"
42
+ },
43
+ {
44
+ title: "\u7F16\u7801",
45
+ dataIndex: "code"
46
+ },
47
+ {
48
+ title: "\u6743\u9650\u63A7\u5236",
49
+ dataIndex: "control",
50
+ width: 180,
51
+ slots: { customRender: "control" }
52
+ }
53
+ ];
54
+ const authButtonFixedList = [
55
+ { code: "add", title: "\u65B0\u589E", status: 0 },
56
+ { code: "update", title: "\u7F16\u8F91", status: 0 },
57
+ { code: "delete", title: "\u5220\u9664", status: 0 },
58
+ { code: "batch_delete", title: "\u6279\u91CF\u5220\u9664", status: 0 },
59
+ { code: "export", title: "\u5BFC\u51FA", status: 0 },
60
+ { code: "import", title: "\u5BFC\u5165", status: 0 },
61
+ { code: "bpm", title: "\u63D0\u4EA4\u6D41\u7A0B", status: 0 },
62
+ { code: "super_query", title: "\u9AD8\u7EA7\u67E5\u8BE2", status: 0 }
63
+ ];
64
+ const USE_SQL_RULES = "USE_SQL_RULES";
65
+ const authDataColumns = [
66
+ {
67
+ title: "\u542F\u7528",
68
+ dataIndex: "switch",
69
+ width: 80,
70
+ slots: { customRender: "switch" }
71
+ },
72
+ {
73
+ title: "\u89C4\u5219\u540D\u79F0",
74
+ dataIndex: "ruleName",
75
+ width: 130
76
+ },
77
+ {
78
+ title: "\u89C4\u5219\u63CF\u8FF0",
79
+ dataIndex: "description",
80
+ customRender({ record: { ruleOperator, ruleValue, ruleColumn } }) {
81
+ if (ruleOperator == USE_SQL_RULES) {
82
+ return `\u81EA\u5B9A\u4E49SQL: ${ruleValue}`;
83
+ } else {
84
+ return `${ruleColumn} ${ruleOperator} ${ruleValue}`;
85
+ }
86
+ }
87
+ }
88
+ ];
89
+ function useAuthDataFormSchemas(props, methods) {
90
+ const formSchemas = computed(() => [
91
+ {
92
+ label: "\u89C4\u5219\u540D\u79F0",
93
+ field: "ruleName",
94
+ required: true,
95
+ component: "Input"
96
+ },
97
+ {
98
+ label: "\u89C4\u5219\u5B57\u6BB5",
99
+ field: "ruleColumn",
100
+ component: "JSearchSelect",
101
+ componentProps: {
102
+ dictOptions: props.authFields,
103
+ getPopupContainer: () => document.body
104
+ },
105
+ dynamicRules({ model }) {
106
+ return [
107
+ { required: model.ruleOperator != USE_SQL_RULES, message: "\u8BF7\u8F93\u5165\u89C4\u5219\u5B57\u6BB5" }
108
+ ];
109
+ },
110
+ show: ({ model }) => model.ruleOperator != USE_SQL_RULES
111
+ },
112
+ {
113
+ label: "\u6761\u4EF6\u89C4\u5219",
114
+ field: "ruleOperator",
115
+ required: true,
116
+ component: "JDictSelectTag",
117
+ componentProps: {
118
+ dictCode: "rule_conditions",
119
+ onChange: methods.onRuleOperatorChange
120
+ }
121
+ },
122
+ {
123
+ label: "\u89C4\u5219\u503C",
124
+ field: "ruleValue",
125
+ required: true,
126
+ component: "Input"
127
+ },
128
+ {
129
+ label: "\u72B6\u6001",
130
+ field: "status",
131
+ required: true,
132
+ component: "RadioButtonGroup",
133
+ componentProps: {
134
+ options: [
135
+ { label: "\u6709\u6548", value: 1 },
136
+ { label: "\u65E0\u6548", value: 0 }
137
+ ]
138
+ },
139
+ defaultValue: 1
140
+ }
141
+ ]);
142
+ return { formSchemas };
143
+ }
144
+ export { USE_SQL_RULES as U, authFieldColumns as a, authButtonColumns as b, authButtonFixedList as c, authDataColumns as d, useAuthDataFormSchemas as u };