act-plus 1.1.40 → 1.1.42

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.
@@ -1,188 +0,0 @@
1
- import { inject as O, computed as E, reactive as H, ref as v, watch as K, resolveComponent as r, resolveDirective as w, openBlock as f, createBlock as c, withCtx as i, createElementVNode as P, createVNode as m, unref as l, createTextVNode as V, withDirectives as D, createElementBlock as W, Fragment as G, renderList as Q } from "vue";
2
- import { useRoute as $ } from "vue-router";
3
- import { _ as z } from "./index-c18badb4.js";
4
- import "js-base64";
5
- import "element-plus";
6
- import "monaco-editor";
7
- const J = { class: "dialog-footer" }, M = {
8
- __name: "dialogInitConfig",
9
- props: {
10
- visible: { type: Boolean, default: !1 },
11
- title: { type: String, default: "" },
12
- data: { type: Object, default: () => ({}) }
13
- },
14
- emits: ["update:visible", "refresh"],
15
- setup(L, { emit: k }) {
16
- const N = $(), y = O("request"), C = k, p = L;
17
- E(() => N.params.key);
18
- const T = () => ({
19
- dataBase: "",
20
- api: ""
21
- });
22
- let a = H((() => ({
23
- loading: !1,
24
- btnLoading: !1
25
- }))()), B = v([]), g = v(null), o = v(T());
26
- const q = (e) => y({ url: "/api/v1/scripts/getAllDatabaseTable", method: "get", data: e }), F = async () => {
27
- try {
28
- a.loading = !0;
29
- const { data: e } = await q();
30
- B.value = e || [], a.loading = !1;
31
- } catch (e) {
32
- console.error(e), a.loading = !1;
33
- }
34
- };
35
- K(
36
- () => p.visible,
37
- async (e, t) => {
38
- e && await F();
39
- }
40
- );
41
- const x = () => ({
42
- sort: 0,
43
- fieldName: void 0,
44
- fieldKey: void 0,
45
- fieldType: void 0,
46
- fieldUiProps: "",
47
- fieldSubmitType: "string",
48
- fieldRequestType: "GET",
49
- fieldRequestUrl: void 0,
50
- postRequestParams: [],
51
- useScenes: [],
52
- formColumnCol: 12,
53
- formCustomComponentes: [],
54
- customTableHeaderName: "",
55
- customTableHeaderUrl: "",
56
- isFormFieldRequired: !0,
57
- isFormSetValue: !0,
58
- isFormDisabled: !1,
59
- tableQueryCondition: void 0,
60
- tableCellWidthType: "min",
61
- tableCellWidth: "120",
62
- tableCellAlignType: "center",
63
- tableCellContentType: "default",
64
- isTableCellOverflowTooltip: !0,
65
- isTableCellSort: !0
66
- }), R = (e) => {
67
- b(), e();
68
- }, b = () => {
69
- o.value = Object.assign(o.value, T()), g.value.resetFields(), C("update:visible", !1);
70
- }, I = (e) => {
71
- e && e.validate(async (t) => {
72
- if (t)
73
- try {
74
- a.btnLoading = !0;
75
- const { data: d } = await y({ url: "/api/v1/scripts/getAllColumnsByTableName", method: "get", params: { tableName: o.value.dataBase } }), _ = (d || []).map((u) => {
76
- let s = x();
77
- return s.fieldName = u.comment, s.fieldKey = u.name, s.fieldType = "string", s;
78
- });
79
- C("refresh", { formList: _ }, () => {
80
- b();
81
- }), a.btnLoading = !1;
82
- } catch (d) {
83
- console.error(d), a.btnLoading = !1;
84
- }
85
- });
86
- };
87
- return (e, t) => {
88
- const d = r("el-option"), _ = r("el-select"), u = r("el-form-item"), s = r("el-input"), S = r("el-form"), h = r("el-button"), U = r("el-dialog"), j = w("loading"), A = w("debounce");
89
- return f(), c(U, {
90
- "model-value": p.visible,
91
- title: p.title,
92
- top: "10vh",
93
- width: "600",
94
- draggable: "",
95
- overflow: "",
96
- "close-on-click-modal": !1,
97
- "before-close": R
98
- }, {
99
- footer: i(() => [
100
- P("span", J, [
101
- m(h, {
102
- loading: l(a).btnLoading,
103
- onClick: b
104
- }, {
105
- default: i(() => t[3] || (t[3] = [
106
- V("取消")
107
- ])),
108
- _: 1
109
- }, 8, ["loading"]),
110
- D((f(), c(h, {
111
- type: "primary",
112
- loading: l(a).btnLoading,
113
- onClick: t[2] || (t[2] = (n) => I(l(g)))
114
- }, {
115
- default: i(() => t[4] || (t[4] = [
116
- V("保存")
117
- ])),
118
- _: 1
119
- }, 8, ["loading"])), [
120
- [A]
121
- ])
122
- ])
123
- ]),
124
- default: i(() => [
125
- D((f(), c(S, {
126
- ref_key: "formRef",
127
- ref: g,
128
- model: l(o),
129
- "label-suffix": ":",
130
- "label-position": "top"
131
- }, {
132
- default: i(() => [
133
- m(u, {
134
- label: "数据库",
135
- "label-width": "120",
136
- rules: [{ required: !1, message: "必填项", trigger: "change" }],
137
- prop: "dataBase"
138
- }, {
139
- default: i(() => [
140
- m(_, {
141
- modelValue: l(o).dataBase,
142
- "onUpdate:modelValue": t[0] || (t[0] = (n) => l(o).dataBase = n),
143
- placeholder: "请选择数据库",
144
- clearable: "",
145
- filterable: ""
146
- }, {
147
- default: i(() => [
148
- (f(!0), W(G, null, Q(l(B), (n, Y) => (f(), c(d, {
149
- key: n,
150
- label: n.tableComment,
151
- value: n.tableName
152
- }, null, 8, ["label", "value"]))), 128))
153
- ]),
154
- _: 1
155
- }, 8, ["modelValue"])
156
- ]),
157
- _: 1
158
- }),
159
- m(u, {
160
- label: "接口地址(关键字)",
161
- "label-width": "120",
162
- rules: [{ required: !1, message: "必填项", trigger: "change" }],
163
- prop: "api"
164
- }, {
165
- default: i(() => [
166
- m(s, {
167
- modelValue: l(o).api,
168
- "onUpdate:modelValue": t[1] || (t[1] = (n) => l(o).api = n),
169
- placeholder: "请输入接口地址(关键字)",
170
- clearable: ""
171
- }, null, 8, ["modelValue"])
172
- ]),
173
- _: 1
174
- })
175
- ]),
176
- _: 1
177
- }, 8, ["model"])), [
178
- [j, l(a).loading]
179
- ])
180
- ]),
181
- _: 1
182
- }, 8, ["model-value", "title"]);
183
- };
184
- }
185
- }, ne = /* @__PURE__ */ z(M, [["__scopeId", "data-v-c63f456e"]]);
186
- export {
187
- ne as default
188
- };
@@ -1,119 +0,0 @@
1
- const e = [
2
- { key: "按钮形式", value: "default" },
3
- { key: "文字形式", value: "text" }
4
- ], a = [
5
- { key: "顶部", value: "header" },
6
- { key: "表格", value: "table" }
7
- ], l = [
8
- { key: "主题色", value: "primary" },
9
- { key: "绿色", value: "success" },
10
- { key: "灰色", value: "info" },
11
- { key: "橙黄色", value: "warning" },
12
- { key: "红色", value: "danger" },
13
- { key: "浅蓝", value: "primary-light" }
14
- ], u = [
15
- { key: "模态框", value: "dialog" },
16
- { key: "提示框", value: "messageBox" },
17
- { key: "导入", value: "import" },
18
- { key: "导出", value: "export" },
19
- { key: "关联子表", value: "associationSubTable" }
20
- ], y = [
21
- { key: "数组", value: "array" },
22
- { key: "字符串", value: "string" },
23
- { key: "数字", value: "number" },
24
- { key: "布尔", value: "boolean" }
25
- ], t = [
26
- { key: "且", value: "&&" },
27
- { key: "或", value: "||" }
28
- ], v = [
29
- { key: "匹配", value: "match" },
30
- { key: "默认值", value: "default" }
31
- ], k = [
32
- { key: "默认匹配", value: "default" },
33
- { key: "用户信息变量", value: "userInfo" }
34
- ], s = [
35
- { key: "组件", value: "component" },
36
- { key: "代码", value: "code" }
37
- ], n = [
38
- { key: "GET", value: "GET" },
39
- { key: "POST", value: "POST" }
40
- ], o = [
41
- { key: "隐式", value: "implicit" },
42
- { key: "输入框", value: "input" },
43
- { key: "数字输入框", value: "inputNumber" },
44
- { key: "textarea文本框", value: "textarea" },
45
- { key: "下拉单选框", value: "select" },
46
- { key: "虚拟下拉框", value: "virtualizedSelect" },
47
- { key: "下拉多选框", value: "multipleSelect" },
48
- { key: "虚拟下拉多选框", value: "virtualizedMultipleSelect" },
49
- { key: "树形下拉框", value: "treeSelect" },
50
- { key: "级联下拉框", value: "provinceCascade" },
51
- { key: "时间框", value: "date" },
52
- { key: "时间范围框", value: "dateRange" },
53
- { key: "上传", value: "upload" },
54
- { key: "富文本", value: "editor" },
55
- { key: "switch开关", value: "switch" },
56
- { key: "下拉选择图标", value: "selectIcon" }
57
- // { key: '关联子表', value: 'associatedChildTable' },
58
- ], S = [
59
- { key: "默认值", value: "default" },
60
- { key: "dynamic形式", value: "dynamic" },
61
- { key: "匹配", value: "match" }
62
- ], T = [
63
- { key: "数组", value: "array" },
64
- { key: "字符串", value: "string" },
65
- { key: "数字", value: "number" }
66
- ], c = [
67
- { key: "居中", value: "center" },
68
- { key: "左对齐", value: "left" },
69
- { key: "右对齐", value: "right" }
70
- ], i = [
71
- { key: "默认", value: "default" },
72
- { key: "链接", value: "link" },
73
- { key: "标签", value: "tag" }
74
- ], r = [
75
- { key: "默认宽", value: "default" },
76
- { key: "最小宽", value: "min" }
77
- ], _ = [
78
- { key: "数组", value: "array" },
79
- { key: "字符串", value: "string" },
80
- { key: "数字", value: "number" },
81
- { key: "布尔", value: "boolean" }
82
- ], E = [
83
- { key: "左侧", value: "right" },
84
- { key: "上侧", value: "top" }
85
- ], d = [
86
- {
87
- label: "表格配置",
88
- options: [
89
- { key: "表格查询", value: "tableSearch" },
90
- { key: "表格展示", value: "tableShow" },
91
- { key: "表格表头自定义", value: "tableCustomHeader" }
92
- ]
93
- },
94
- {
95
- label: "表单配置",
96
- options: []
97
- }
98
- ];
99
- export {
100
- c as A,
101
- a as B,
102
- i as C,
103
- E as F,
104
- S as P,
105
- _ as S,
106
- r as T,
107
- d as U,
108
- o as a,
109
- e as b,
110
- l as c,
111
- u as d,
112
- v as e,
113
- y as f,
114
- k as g,
115
- t as h,
116
- s as i,
117
- n as j,
118
- T as k
119
- };
@@ -1,102 +0,0 @@
1
- import { ref as R, inject as l, watch as j, resolveComponent as C, openBlock as a, createElementBlock as m, Fragment as y, renderList as q, unref as c, createBlock as i, resolveDynamicComponent as O, withCtx as _, createVNode as E, createCommentVNode as u, createTextVNode as B, toDisplayString as k } from "vue";
2
- import { _ as H, u as M } from "./index-c18badb4.js";
3
- import "vue-router";
4
- import "js-base64";
5
- import "element-plus";
6
- import "monaco-editor";
7
- const z = { class: "header-operate-container" }, G = {
8
- __name: "index",
9
- props: {
10
- data: { type: Object, default: () => ({}) }
11
- },
12
- emits: ["operate"],
13
- setup(N, { emit: w }) {
14
- const x = w, T = N, { t: V } = M();
15
- let b = R([]);
16
- const F = l("globalProps"), $ = l("menuPermissionBtns"), D = l("stringToBoolean"), S = l("matchCondition"), P = l("getTableData"), A = l("tableBtnRefs"), I = (o) => {
17
- if (!o.matchFields.length)
18
- return !0;
19
- const t = o.matchFields.filter((n) => n.matchType != "default"), s = (n) => F.matchData[n.matchType][n.matchFieldName];
20
- let e = t.reduce((n, r, f) => {
21
- const L = s(r);
22
- return n += S(
23
- r.matchCondition,
24
- L,
25
- r.fieldValue == "" ? null : r.fieldValue == "true" || r.fieldValue == "false" ? D(r.fieldValue) : r.fieldValue
26
- ), f !== t.length - 1 && (n += r.spliceCondition || "&&"), n;
27
- }, "").split("||"), p = e.reduce((n, r, f) => (n += `(${r})`, f < e.length - 1 && (n += "||"), n), "");
28
- return new Function(`return ${p}`)();
29
- }, h = (o) => $.value.some((t) => t.unique == o.permissionCode) && I(o), v = (o) => {
30
- b.value = (o || []).filter((t) => t.permissionCode !== 1001 && t.btnPostion.includes("header")).map((t) => (t.btnAlias && (t.btnName = t.btnAlias), t)).sort((t, s) => t.sort - s.sort);
31
- };
32
- j(
33
- () => T.data,
34
- (o, t) => {
35
- v(o.buttons);
36
- },
37
- { immediate: !0 }
38
- );
39
- const g = (o) => {
40
- x("operate", o, {});
41
- };
42
- return (o, t) => {
43
- const s = C("a-svg-icon"), d = C("el-button");
44
- return a(), m("div", z, [
45
- (a(!0), m(y, null, q(c(b), (e, p) => (a(), m(y, { key: p }, [
46
- e.isCustomBtn && e.customType == "component" && h(e) ? (a(), i(O(e[e.customComponentName]), {
47
- key: 0,
48
- ref_for: !0,
49
- ref: (n) => c(A)[`${e.customComponentName}-${e.permissionCode}`] = n,
50
- buttonData: e,
51
- onRefresh: t[0] || (t[0] = (n) => c(P)())
52
- }, {
53
- default: _(() => [
54
- E(d, {
55
- class: "el-btn",
56
- type: e.btnColor,
57
- onClick: (n) => g(e)
58
- }, {
59
- default: _(() => [
60
- e.btnIcon ? (a(), i(s, {
61
- key: 0,
62
- class: "mr4",
63
- name: e.btnIcon,
64
- width: "12",
65
- height: "12",
66
- color: "#fff"
67
- }, null, 8, ["name"])) : u("", !0),
68
- B(" " + k(e.btnName), 1)
69
- ]),
70
- _: 2
71
- }, 1032, ["type", "onClick"])
72
- ]),
73
- _: 2
74
- }, 1064, ["buttonData"])) : u("", !0),
75
- h(e) ? (a(), i(d, {
76
- key: 1,
77
- class: "el-btn",
78
- type: e.btnColor,
79
- loading: e.opeateLoading,
80
- onClick: (n) => g(e)
81
- }, {
82
- default: _(() => [
83
- e.btnIcon ? (a(), i(s, {
84
- key: 0,
85
- class: "mr4",
86
- name: e.btnIcon,
87
- width: "12",
88
- height: "12",
89
- color: "#fff"
90
- }, null, 8, ["name"])) : u("", !0),
91
- B(" " + k(e.opeateLoading ? e.btnName + c(V)("act.loading") + "..." : e.btnName), 1)
92
- ]),
93
- _: 2
94
- }, 1032, ["type", "loading", "onClick"])) : u("", !0)
95
- ], 64))), 128))
96
- ]);
97
- };
98
- }
99
- }, Y = /* @__PURE__ */ H(G, [["__scopeId", "data-v-1cf1f0ce"]]);
100
- export {
101
- Y as default
102
- };