act-plus 1.1.34 → 1.1.36

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.
@@ -0,0 +1,188 @@
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 c, createBlock as m, withCtx as i, createElementVNode as P, createVNode as f, unref as t, 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-a4e6b7a2.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 l = H((() => ({
23
+ loading: !1,
24
+ btnLoading: !1
25
+ }))()), h = v([]), _ = v(null), o = v(T());
26
+ const q = (e) => y({ url: "/api/v1/scripts/getAllDatabaseTable", method: "get", data: e }), F = async () => {
27
+ try {
28
+ l.loading = !0;
29
+ const { data: e } = await q();
30
+ h.value = e || [], l.loading = !1;
31
+ } catch (e) {
32
+ console.error(e), l.loading = !1;
33
+ }
34
+ };
35
+ K(
36
+ () => p.visible,
37
+ async (e, a) => {
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
+ g(), e();
68
+ }, g = () => {
69
+ o.value = Object.assign(o.value, T()), _.value.resetFields(), C("update:visible", !1);
70
+ }, I = (e) => {
71
+ e && e.validate(async (a) => {
72
+ if (a)
73
+ try {
74
+ l.btnLoading = !0;
75
+ const { data: d } = await y({ url: "/api/v1/scripts/getAllColumnsByTableName", method: "get", params: { tableName: o.value.dataBase } }), b = (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: b }, () => {
80
+ g();
81
+ }), l.btnLoading = !1;
82
+ } catch (d) {
83
+ console.error(d), l.btnLoading = !1;
84
+ }
85
+ });
86
+ };
87
+ return (e, a) => {
88
+ const d = r("el-option"), b = r("el-select"), u = r("el-form-item"), s = r("el-input"), S = r("el-form"), B = r("el-button"), U = r("el-dialog"), j = w("loading"), A = w("debounce");
89
+ return c(), m(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
+ f(B, {
102
+ loading: t(l).btnLoading,
103
+ onClick: g
104
+ }, {
105
+ default: i(() => [
106
+ V("取消")
107
+ ]),
108
+ _: 1
109
+ }, 8, ["loading"]),
110
+ D((c(), m(B, {
111
+ type: "primary",
112
+ loading: t(l).btnLoading,
113
+ onClick: a[2] || (a[2] = (n) => I(t(_)))
114
+ }, {
115
+ default: i(() => [
116
+ V("保存")
117
+ ]),
118
+ _: 1
119
+ }, 8, ["loading"])), [
120
+ [A]
121
+ ])
122
+ ])
123
+ ]),
124
+ default: i(() => [
125
+ D((c(), m(S, {
126
+ ref_key: "formRef",
127
+ ref: _,
128
+ model: t(o),
129
+ "label-suffix": ":",
130
+ "label-position": "top"
131
+ }, {
132
+ default: i(() => [
133
+ f(u, {
134
+ label: "数据库",
135
+ "label-width": "120",
136
+ rules: [{ required: !1, message: "必填项", trigger: "change" }],
137
+ prop: "dataBase"
138
+ }, {
139
+ default: i(() => [
140
+ f(b, {
141
+ modelValue: t(o).dataBase,
142
+ "onUpdate:modelValue": a[0] || (a[0] = (n) => t(o).dataBase = n),
143
+ placeholder: "请选择数据库",
144
+ clearable: "",
145
+ filterable: ""
146
+ }, {
147
+ default: i(() => [
148
+ (c(!0), W(G, null, Q(t(h), (n, Y) => (c(), m(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
+ f(u, {
160
+ label: "接口地址(关键字)",
161
+ "label-width": "120",
162
+ rules: [{ required: !1, message: "必填项", trigger: "change" }],
163
+ prop: "api"
164
+ }, {
165
+ default: i(() => [
166
+ f(s, {
167
+ modelValue: t(o).api,
168
+ "onUpdate:modelValue": a[1] || (a[1] = (n) => t(o).api = n),
169
+ placeholder: "请输入接口地址(关键字)",
170
+ clearable: ""
171
+ }, null, 8, ["modelValue"])
172
+ ]),
173
+ _: 1
174
+ })
175
+ ]),
176
+ _: 1
177
+ }, 8, ["model"])), [
178
+ [j, t(l).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
+ };
@@ -8,7 +8,7 @@ const S = { class: "dialog-footer" }, N = {
8
8
  },
9
9
  emits: ["update:visible", "refresh", "update:modelValue"],
10
10
  setup(m, { emit: f }) {
11
- const v = g(() => import("./index-cb3083b6.js").then((t) => t.i)), n = f, o = m;
11
+ const v = g(() => import("./index-a4e6b7a2.js").then((t) => t.i)), n = f, o = m;
12
12
  let e = y();
13
13
  C(
14
14
  () => o.visible,
@@ -57,7 +57,8 @@ const e = [
57
57
  // { key: '关联子表', value: 'associatedChildTable' },
58
58
  ], S = [
59
59
  { key: "默认值", value: "default" },
60
- { key: "dynamic形式", value: "dynamic" }
60
+ { key: "dynamic形式", value: "dynamic" },
61
+ { key: "匹配", value: "match" }
61
62
  ], T = [
62
63
  { key: "数组", value: "array" },
63
64
  { key: "字符串", value: "string" },
@@ -1,5 +1,5 @@
1
1
  import { ref as d, watch as y, resolveComponent as _, openBlock as r, createElementBlock as m, createVNode as v, unref as u, isRef as w, withCtx as f, createElementVNode as g, createBlock as C, createCommentVNode as N, createTextVNode as $, Fragment as B, renderList as E, normalizeClass as L } from "vue";
2
- import { _ as P } from "./index-cb3083b6.js";
2
+ import { _ as P } from "./index-a4e6b7a2.js";
3
3
  import "vue-router";
4
4
  import "js-base64";
5
5
  import "element-plus";
@@ -1,5 +1,5 @@
1
1
  import { reactive as m, watch as b, resolveComponent as s, openBlock as v, createBlock as g, withCtx as o, createElementVNode as i, createVNode as x, createTextVNode as y, toDisplayString as h, unref as C } from "vue";
2
- import { _ as k, u as w } from "./index-cb3083b6.js";
2
+ import { _ as k, u as w } from "./index-a4e6b7a2.js";
3
3
  import "vue-router";
4
4
  import "js-base64";
5
5
  import "element-plus";