act-plus 1.1.17 → 1.1.19

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 (107) hide show
  1. package/act-plus.js +5 -3
  2. package/act-plus.umd.cjs +1729 -16
  3. package/assets/editor.worker-df55e1ff.js +8 -0
  4. package/assets/ts.worker-e151483b.js +33972 -0
  5. package/lib/abap-1354785f.js +1314 -0
  6. package/lib/apex-279d4f27.js +315 -0
  7. package/lib/azcli-ba812c55.js +74 -0
  8. package/lib/bat-4d77495d.js +95 -0
  9. package/lib/bicep-7b240724.js +108 -0
  10. package/lib/cameligo-5d2daeb8.js +168 -0
  11. package/lib/clojure-b7ea12a3.js +754 -0
  12. package/lib/coffee-1a8cfbf4.js +228 -0
  13. package/lib/{configBtns-5c0c571a.js → configBtns-3772e689.js} +2 -2
  14. package/lib/{configFileds-af5746ba.js → configFileds-d0911c87.js} +3 -3
  15. package/lib/{configForm-b9e9ca98.js → configForm-ae4b725e.js} +1 -1
  16. package/lib/{configTable-dc80e75f.js → configTable-879063d4.js} +31 -24
  17. package/lib/cpp-642b10c4.js +387 -0
  18. package/lib/csharp-d987ddad.js +320 -0
  19. package/lib/csp-96407af0.js +57 -0
  20. package/lib/css-5dd354ac.js +186 -0
  21. package/lib/cssMode-6d02ab39.js +1448 -0
  22. package/lib/cypher-11e5a4b6.js +262 -0
  23. package/lib/dart-5d209f63.js +270 -0
  24. package/lib/{dialogAddField-ea60ac76.js → dialogAddField-d6b18048.js} +69 -69
  25. package/lib/{dialogConfigBtn-21ed4fe8.js → dialogConfigBtn-75e37dc9.js} +74 -78
  26. package/lib/dockerfile-8739cff7.js +132 -0
  27. package/lib/ecl-a20c5155.js +454 -0
  28. package/lib/elixir-8b028584.js +467 -0
  29. package/lib/{enum-99519ce0.js → enum-cc58b8fe.js} +25 -22
  30. package/lib/flow9-0dea2e73.js +141 -0
  31. package/lib/freemarker2-205877bf.js +646 -0
  32. package/lib/fsharp-49a70fad.js +210 -0
  33. package/lib/go-46e3b371.js +208 -0
  34. package/lib/graphql-51a577e5.js +141 -0
  35. package/lib/handlebars-2d920faa.js +394 -0
  36. package/lib/hcl-56b85754.js +177 -0
  37. package/lib/html-6b99359b.js +284 -0
  38. package/lib/htmlMode-498c17d9.js +1458 -0
  39. package/lib/index-68063c4c.js +96 -0
  40. package/lib/index-7c264775.js +192 -0
  41. package/lib/index-a36b2284.js +304 -0
  42. package/lib/index-aff95ab9.js +63 -0
  43. package/lib/index-da0a0bfe.js +162173 -0
  44. package/lib/index-e2f2023d.js +35 -0
  45. package/lib/{index-ece3e815.js → index-fb2754ee.js} +1 -1
  46. package/lib/ini-1d58d82f.js +68 -0
  47. package/lib/java-cd017f60.js +221 -0
  48. package/lib/javascript-5e40fe11.js +78 -0
  49. package/lib/jsonMode-2a821e9e.js +1869 -0
  50. package/lib/julia-a0caf483.js +496 -0
  51. package/lib/kotlin-c6e52a56.js +245 -0
  52. package/lib/less-718543b4.js +168 -0
  53. package/lib/lexon-5e6e7a44.js +151 -0
  54. package/lib/liquid-dc78aaf7.js +241 -0
  55. package/lib/lua-f159160b.js +157 -0
  56. package/lib/m3-aadaf771.js +210 -0
  57. package/lib/markdown-9b448c46.js +202 -0
  58. package/lib/mips-161e49ce.js +194 -0
  59. package/lib/msdax-f65cb1e6.js +377 -0
  60. package/lib/mysql-24549dd1.js +875 -0
  61. package/lib/objective-c-e129a5ca.js +188 -0
  62. package/lib/pascal-4ccdf5ce.js +245 -0
  63. package/lib/pascaligo-a9603dcd.js +158 -0
  64. package/lib/perl-ba1fb97a.js +599 -0
  65. package/lib/pgsql-89978310.js +843 -0
  66. package/lib/php-987b9d87.js +471 -0
  67. package/lib/pla-96c2695d.js +131 -0
  68. package/lib/postiats-7b52ebac.js +544 -0
  69. package/lib/powerquery-8954ec26.js +890 -0
  70. package/lib/powershell-f00d0274.js +233 -0
  71. package/lib/protobuf-3eb85f80.js +422 -0
  72. package/lib/pug-6fab415a.js +393 -0
  73. package/lib/python-e55144b2.js +262 -0
  74. package/lib/qsharp-4792f872.js +282 -0
  75. package/lib/r-630f5d6b.js +245 -0
  76. package/lib/razor-1fb88f53.js +515 -0
  77. package/lib/redis-276b8288.js +298 -0
  78. package/lib/redshift-520a7359.js +806 -0
  79. package/lib/restructuredtext-4676a3fc.js +162 -0
  80. package/lib/ruby-764137cd.js +444 -0
  81. package/lib/rust-97f8f6e1.js +337 -0
  82. package/lib/sb-8c22f14c.js +110 -0
  83. package/lib/scala-c68c650c.js +353 -0
  84. package/lib/scheme-e6a52cb0.js +114 -0
  85. package/lib/scss-45104c77.js +244 -0
  86. package/lib/shell-09452d42.js +224 -0
  87. package/lib/solidity-d4979008.js +1351 -0
  88. package/lib/sophia-21995caf.js +190 -0
  89. package/lib/sparql-5088743c.js +193 -0
  90. package/lib/sql-63ec8e76.js +818 -0
  91. package/lib/st-fa9ab362.js +414 -0
  92. package/lib/swift-abdf1835.js +315 -0
  93. package/lib/systemverilog-a4f858ed.js +556 -0
  94. package/lib/tcl-8adf937f.js +232 -0
  95. package/lib/tsMode-8d12d976.js +792 -0
  96. package/lib/twig-404eb73e.js +323 -0
  97. package/lib/typescript-97ed77ae.js +330 -0
  98. package/lib/vb-e21e8153.js +364 -0
  99. package/lib/xml-e843c667.js +98 -0
  100. package/lib/yaml-62bcf3fa.js +187 -0
  101. package/package.json +1 -1
  102. package/style.css +1 -1
  103. package/lib/index-0b43bd9e.js +0 -11178
  104. package/lib/index-79be1a81.js +0 -96
  105. package/lib/index-b2a578b2.js +0 -297
  106. package/lib/index-be1932a3.js +0 -165
  107. package/lib/index-c688d160.js +0 -139
@@ -1,96 +0,0 @@
1
- import { ref as R, inject as l, watch as j, resolveComponent as g, openBlock as s, createElementBlock as m, Fragment as y, renderList as q, unref as f, createBlock as c, resolveDynamicComponent as A, withCtx as _, createVNode as O, createCommentVNode as i, createTextVNode as B, toDisplayString as k } from "vue";
2
- import { _ as E } from "./index-0b43bd9e.js";
3
- import "vue-router";
4
- import "element-plus";
5
- const H = { class: "header-operate-container" }, M = {
6
- __name: "index",
7
- props: {
8
- data: { type: Object, default: () => ({}) }
9
- },
10
- emits: ["operate"],
11
- setup(w, { emit: N }) {
12
- const T = N, x = w;
13
- let b = R([]);
14
- const V = l("globalProps"), v = l("menuPermissionBtns"), F = l("stringToBoolean"), $ = l("matchCondition"), D = l("getTableData"), S = l("tableBtnRefs"), P = (n) => {
15
- if (!n.matchFields.length)
16
- return !0;
17
- const o = n.matchFields.filter((t) => t.matchType != "default"), a = (t) => V.matchData[t.matchType][t.matchFieldName];
18
- let e = o.reduce((t, r, p) => {
19
- const L = a(r);
20
- return t += $(r.matchCondition, L, r.fieldValue == "" ? null : r.fieldValue == "true" ? F(r.fieldValue) : r.fieldValue), p !== o.length - 1 && (t += r.spliceCondition || "&&"), t;
21
- }, "").split("||"), d = e.reduce((t, r, p) => (t += `(${r})`, p < e.length - 1 && (t += "||"), t), "");
22
- return new Function(`return ${d}`)();
23
- }, h = (n) => v.value.some((o) => o.unique == n.permissionCode) && P(n), I = (n) => {
24
- b.value = (n || []).filter((o) => o.permissionCode !== 1001 && o.btnPostion.includes("header")).sort((o, a) => o.sort - a.sort);
25
- };
26
- j(
27
- () => x.data,
28
- (n, o) => {
29
- I(n.buttons);
30
- },
31
- { immediate: !0 }
32
- );
33
- const C = (n) => {
34
- T("operate", n, {});
35
- };
36
- return (n, o) => {
37
- const a = g("a-svg-icon"), u = g("el-button");
38
- return s(), m("div", H, [
39
- (s(!0), m(y, null, q(f(b), (e, d) => (s(), m(y, { key: d }, [
40
- e.isCustomBtn && e.customType == "component" && h(e) ? (s(), c(A(e[e.customComponentName]), {
41
- key: 0,
42
- ref_for: !0,
43
- ref: (t) => f(S)[`${e.customComponentName}-${e.permissionCode}`] = t,
44
- buttonData: e,
45
- onRefresh: o[0] || (o[0] = (t) => f(D)())
46
- }, {
47
- default: _(() => [
48
- O(u, {
49
- class: "el-btn",
50
- type: e.btnColor,
51
- onClick: (t) => C(e)
52
- }, {
53
- default: _(() => [
54
- e.btnIcon ? (s(), c(a, {
55
- key: 0,
56
- class: "mr4",
57
- name: e.btnIcon,
58
- width: "12",
59
- height: "12",
60
- color: "#fff"
61
- }, null, 8, ["name"])) : i("", !0),
62
- B(" " + k(e.btnName), 1)
63
- ]),
64
- _: 2
65
- }, 1032, ["type", "onClick"])
66
- ]),
67
- _: 2
68
- }, 1064, ["buttonData"])) : i("", !0),
69
- !e.isCustomBtn && h(e) ? (s(), c(u, {
70
- key: 1,
71
- class: "el-btn",
72
- type: e.btnColor,
73
- loading: e.opeateLoading,
74
- onClick: (t) => C(e)
75
- }, {
76
- default: _(() => [
77
- e.btnIcon ? (s(), c(a, {
78
- key: 0,
79
- class: "mr4",
80
- name: e.btnIcon,
81
- width: "12",
82
- height: "12",
83
- color: "#fff"
84
- }, null, 8, ["name"])) : i("", !0),
85
- B(" " + k(e.opeateLoading ? e.btnName + n.t("act.中") + "..." : e.btnName), 1)
86
- ]),
87
- _: 2
88
- }, 1032, ["type", "loading", "onClick"])) : i("", !0)
89
- ], 64))), 128))
90
- ]);
91
- };
92
- }
93
- }, Q = /* @__PURE__ */ E(M, [["__scopeId", "data-v-67a827c3"]]);
94
- export {
95
- Q as default
96
- };
@@ -1,297 +0,0 @@
1
- import { inject as R, reactive as de, ref as x, watch as re, resolveComponent as y, openBlock as i, createBlock as p, withCtx as h, createElementVNode as z, createVNode as T, unref as l, createTextVNode as L, toDisplayString as D, createElementBlock as V, Fragment as w, renderList as $, createCommentVNode as ie, resolveDynamicComponent as ne, isRef as ce, toRaw as ue } from "vue";
2
- import { a as fe, e as pe, r as me, b as ye, _ as be, u as he, T as J, P as _e } from "./index-0b43bd9e.js";
3
- import { ElMessage as G, ElNotification as ge } from "element-plus";
4
- import "vue-router";
5
- const A = fe.create({
6
- baseURL: "",
7
- // ""
8
- timeout: 15e3
9
- });
10
- A.interceptors.request.use(
11
- (d) => {
12
- let b = sessionStorage.getItem("accessToken");
13
- return b && (d.headers.Authorization = "Bearer " + b), d.headers["Content-Type"] != "application/x-www-form-urlencoded" && (d.data = { ...d.data }, Reflect.has(d.data, "dynamicFilters") && (d.data.dynamicFilters = pe(JSON.stringify(d.data.dynamicFilters)))), d;
14
- },
15
- (d) => Promise.reject(d)
16
- );
17
- A.interceptors.response.use(
18
- (d) => {
19
- const b = d.data;
20
- if (b.code == 200)
21
- return b;
22
- if (b.code == 401)
23
- sessionStorage.clear(), me.replace("/"), ye(), G.error({ title: "错误", message: "登陆超时,请重新登录" });
24
- else
25
- return G.error({ title: "错误", message: b.msg }), Promise.reject(b.msg);
26
- },
27
- (d) => {
28
- if (d.response.status != -1)
29
- return Promise.reject(d);
30
- }
31
- );
32
- const Fe = { class: "no-config-field" }, Ce = { class: "dialog-footer" }, Ve = {
33
- __name: "index",
34
- props: {
35
- visible: { type: Boolean, default: !1 },
36
- title: { type: String, default: "" },
37
- data: { type: Object, default: () => ({}) }
38
- },
39
- emits: ["update:visible", "refresh"],
40
- setup(d, { emit: b }) {
41
- const { t: c } = he(), H = R("loadComponents"), O = R("formatDataType"), E = R("globalProps"), M = b, u = d;
42
- let F = de((() => ({
43
- btnLoading: !1
44
- }))()), K = x([]), o = x({}), k = x(null), Q = {};
45
- const X = (a) => a.formColumnCol == null || a.customFiledsComponentes[a.customFiledsComponentes.customComponentName] ? 24 : a.formColumnCol ? a.formColumnCol : 24 / a.formRow, Y = (a) => {
46
- if (["input", "textarea"].includes(a.fieldType))
47
- return "blur";
48
- if (["select", "multipleSelect", "datetimerange", "treeSelect", "provinceCascade"].includes(a.fieldType))
49
- return "change";
50
- }, Z = (a) => {
51
- if (!["input", "textarea"].includes(a) && ["multipleSelect", "dateRange"].includes(a))
52
- return [];
53
- }, I = (a, m) => {
54
- if (["string"].includes(m))
55
- return a.join(";");
56
- if (["number"].includes(m))
57
- return Number(a);
58
- if (["array"].includes(m))
59
- return a;
60
- }, ee = (a) => {
61
- if (["multipleSelect"].includes(a.fieldType))
62
- return u.data.rowData[a.fieldKey] ? u.data.rowData[a.fieldKey].split(";") : [];
63
- if (["dateRange"].includes(a.fieldType)) {
64
- const m = a.fieldKey.split("&");
65
- return u.data.rowData[a.fieldKey] = m.map((n) => u.data.rowData[n]), u.data.rowData[a.fieldKey];
66
- }
67
- return u.data.rowData[a.fieldKey];
68
- }, le = (a) => A({ url: u.data.dataItem.requestUrl, method: "post", data: a });
69
- re(
70
- () => u.visible,
71
- async (a, m) => {
72
- a && (u.data.formList.forEach(async (n) => {
73
- Q[n.fieldKey] = { submitFieldType: n.fieldSubmitType, isFormSetValue: n.isFormSetValue }, o.value[n.fieldKey] = Object.keys(u.data.rowData).length && n.isFormSetValue ? ee(n) : Z(n.fieldType);
74
- const { isFiledCustom: _, customComponentName: f, customComponentUrl: g } = n.customFiledsComponentes;
75
- if (_ && !n.customFiledsComponentes[f]) {
76
- const C = await H(g, f);
77
- n.customFiledsComponentes[f] = C;
78
- }
79
- }), K.value = u.data.formList || []);
80
- }
81
- );
82
- const ae = (a) => {
83
- N(), a();
84
- }, N = () => {
85
- K.value = [], k.value.resetFields(), M("update:visible", !1);
86
- }, te = (a) => {
87
- a && a.validate((m) => {
88
- if (m) {
89
- F.btnLoading = !0;
90
- const { dataItem: n, rowData: _ } = u.data;
91
- let f = { ...ue(o.value) };
92
- Object.keys(f).forEach((s) => {
93
- s.includes("&") ? f[s].split("&").forEach((U, v) => {
94
- f[U] = f[s][v];
95
- }) : Array.isArray(f[s]) && (f[s] = I(f[s], "string"));
96
- });
97
- const g = n.submitFields.filter((s) => s.matchType == "default").reduce((s, r) => (r.submitFieldType === "string" && (s[r.submitFieldName] = r.matchFieldName.toString()), s), {}), C = n.submitFields.filter((s) => s.matchType == "match").reduce((s, r) => (Reflect.has(r, "submitFieldMatchOrigin") && r.submitFieldMatchOrigin != "rowData" ? Reflect.has(E.matchData, r.submitFieldMatchOrigin) && (s[r.submitFieldName] = O(r.submitFieldType, E.matchData[r.submitFieldMatchOrigin][r.matchFieldName])) : s[r.submitFieldName] = O(r.submitFieldType, _[r.matchFieldName]), s), {});
98
- le({
99
- ...f,
100
- ...g,
101
- ...C
102
- }).then((s) => {
103
- try {
104
- ge({ title: c("act.tip"), message: c("act.saveSuccessfully"), type: "success", duration: 2500 }), N(), M("refresh");
105
- } catch (r) {
106
- console.error(r);
107
- }
108
- F.btnLoading = !1;
109
- }).catch((s) => {
110
- console.error(s), F.btnLoading = !1;
111
- });
112
- }
113
- });
114
- };
115
- return (a, m) => {
116
- var q;
117
- const n = y("el-input"), _ = y("el-option"), f = y("el-select"), g = y("el-date-picker"), C = y("el-cascader"), s = y("el-switch"), r = y("el-form-item"), U = y("el-col"), v = y("el-row"), oe = y("el-form"), j = y("el-button"), se = y("el-dialog");
118
- return i(), p(se, {
119
- "model-value": u.visible,
120
- title: u.title,
121
- top: "5vh",
122
- width: (q = d.data.formConfig) == null ? void 0 : q.dialogWidth,
123
- "append-to-body": "",
124
- "destroy-on-close": "",
125
- "close-on-click-modal": !1,
126
- "before-close": ae
127
- }, {
128
- footer: h(() => [
129
- z("span", Ce, [
130
- T(j, {
131
- loading: l(F).btnLoading,
132
- onClick: N
133
- }, {
134
- default: h(() => [
135
- L(D(l(c)("act.cancel")), 1)
136
- ]),
137
- _: 1
138
- }, 8, ["loading"]),
139
- T(j, {
140
- type: "primary",
141
- loading: l(F).btnLoading,
142
- onClick: m[1] || (m[1] = (P) => te(l(k)))
143
- }, {
144
- default: h(() => [
145
- L(D(l(c)("act.save")), 1)
146
- ]),
147
- _: 1
148
- }, 8, ["loading"])
149
- ])
150
- ]),
151
- default: h(() => {
152
- var P, B;
153
- return [
154
- T(oe, {
155
- ref_key: "formRef",
156
- ref: k,
157
- model: l(o),
158
- "label-suffix": ":",
159
- "label-width": (P = d.data.formConfig) == null ? void 0 : P.formLabelWidth,
160
- "label-position": (B = d.data.formConfig) == null ? void 0 : B.formLabelPosition
161
- }, {
162
- default: h(() => [
163
- T(v, { gutter: 40 }, {
164
- default: h(() => [
165
- (i(!0), V(w, null, $(l(K), (e, W) => (i(), p(U, {
166
- span: X(e),
167
- key: W
168
- }, {
169
- default: h(() => [
170
- e.customFiledsComponentes.isFiledCustom ? (i(), V(w, { key: 1 }, [
171
- e.customFiledsComponentes[e.customFiledsComponentes.customComponentName] ? (i(), p(ne(e.customFiledsComponentes[e.customFiledsComponentes.customComponentName]), {
172
- key: 0,
173
- fieldCofnigItem: e,
174
- rowData: u.data.rowData,
175
- form: l(o),
176
- "onUpdate:form": m[0] || (m[0] = (t) => ce(o) ? o.value = t : o = t)
177
- }, null, 40, ["fieldCofnigItem", "rowData", "form"])) : (i(), V("div", {
178
- class: "no-config",
179
- key: W
180
- }, [
181
- z("span", Fe, "【" + D(e.fieldName) + "】", 1),
182
- L(D(l(c)("act.fieldCustom")), 1)
183
- ]))
184
- ], 64)) : (i(), p(r, {
185
- key: 0,
186
- label: e.fieldName,
187
- prop: e.fieldKey,
188
- rules: [{ required: e.isFormFieldRequired, message: l(c)("act.requiredMessage"), trigger: Y(e) }]
189
- }, {
190
- default: h(() => [
191
- e.fieldType === "input" ? (i(), p(n, {
192
- key: 0,
193
- modelValue: l(o)[e.fieldKey],
194
- "onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
195
- type: "text",
196
- placeholder: `${l(c)("act.inputPlaceholder")}${e.fieldName}`,
197
- disabled: e.isFormDisabled,
198
- clearable: ""
199
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "textarea" ? (i(), p(n, {
200
- key: 1,
201
- modelValue: l(o)[e.fieldKey],
202
- "onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
203
- type: "textarea",
204
- placeholder: `${l(c)("act.inputPlaceholder")}${e.fieldName}`,
205
- disabled: e.isFormDisabled,
206
- rows: 4
207
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "multipleSelect" ? (i(), p(f, {
208
- key: 2,
209
- modelValue: l(o)[e.fieldKey],
210
- "onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
211
- placeholder: `${l(c)("act.selectPlaceholder")}${e.fieldName}`,
212
- disabled: e.isFormDisabled,
213
- multiple: "",
214
- clearable: "",
215
- filterable: ""
216
- }, {
217
- default: h(() => [
218
- (i(!0), V(w, null, $(e.dataList, (t, S) => (i(), p(_, {
219
- key: S,
220
- label: t.key,
221
- value: t.value
222
- }, null, 8, ["label", "value"]))), 128))
223
- ]),
224
- _: 2
225
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "select" ? (i(), p(f, {
226
- key: 3,
227
- modelValue: l(o)[e.fieldKey],
228
- "onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
229
- placeholder: `${l(c)("act.selectPlaceholder")}${e.fieldName}`,
230
- disabled: e.isFormDisabled,
231
- clearable: "",
232
- filterable: ""
233
- }, {
234
- default: h(() => [
235
- (i(!0), V(w, null, $(e.dataList, (t, S) => (i(), p(_, {
236
- key: S,
237
- label: t.key,
238
- value: t.value
239
- }, null, 8, ["label", "value"]))), 128))
240
- ]),
241
- _: 2
242
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : e.fieldType === "date" ? (i(), p(g, {
243
- key: 4,
244
- modelValue: l(o)[e.fieldKey],
245
- "onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
246
- type: e.fieldUiType,
247
- placeholder: `${l(c)("act.selectPlaceholder")}${l(c)("act.time")}`,
248
- "value-format": l(J)[e.fieldUiType],
249
- disabled: e.isFormDisabled
250
- }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format", "disabled"])) : e.fieldType === "dateRange" ? (i(), p(g, {
251
- key: 5,
252
- modelValue: l(o)[e.fieldKey],
253
- "onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
254
- type: e.fieldUiType,
255
- "start-placeholder": l(c)("act.startTime"),
256
- "end-placeholder": l(c)("act.endTime"),
257
- "value-format": l(J)[e.fieldUiType],
258
- disabled: e.isFormDisabled
259
- }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "start-placeholder", "end-placeholder", "value-format", "disabled"])) : e.fieldType === "provinceCascade" ? (i(), p(C, {
260
- key: 6,
261
- modelValue: l(o)[e.fieldKey],
262
- "onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
263
- options: e.dataList,
264
- props: l(_e),
265
- clearable: "",
266
- filterable: "",
267
- placeholder: `${l(c)("act.selectPlaceholder")}${e.fieldName}`,
268
- disabled: e.isFormDisabled
269
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder", "disabled"])) : e.fieldType === "switch" ? (i(), p(s, {
270
- key: 7,
271
- modelValue: l(o)[e.fieldKey],
272
- "onUpdate:modelValue": (t) => l(o)[e.fieldKey] = t,
273
- "active-value": !0,
274
- "inactive-value": !1
275
- }, null, 8, ["modelValue", "onUpdate:modelValue"])) : ie("", !0)
276
- ]),
277
- _: 2
278
- }, 1032, ["label", "prop", "rules"]))
279
- ]),
280
- _: 2
281
- }, 1032, ["span"]))), 128))
282
- ]),
283
- _: 1
284
- })
285
- ]),
286
- _: 1
287
- }, 8, ["model", "label-width", "label-position"])
288
- ];
289
- }),
290
- _: 1
291
- }, 8, ["model-value", "title", "width"]);
292
- };
293
- }
294
- }, Ne = /* @__PURE__ */ be(Ve, [["__scopeId", "data-v-53e47c95"]]);
295
- export {
296
- Ne as default
297
- };
@@ -1,165 +0,0 @@
1
- import { ref as g, watch as M, resolveComponent as s, openBlock as a, createElementBlock as f, unref as t, createBlock as n, normalizeStyle as B, withCtx as p, Fragment as y, renderList as m, createCommentVNode as _, createTextVNode as E, toDisplayString as F } from "vue";
2
- import { _ as L, u as O, P as R, T as $ } from "./index-0b43bd9e.js";
3
- import "vue-router";
4
- import "element-plus";
5
- const H = { class: "search-module-container" }, Q = {
6
- __name: "index",
7
- props: {
8
- data: { type: Object, default: () => ({}) }
9
- },
10
- emits: ["reset", "search"],
11
- setup(w, { emit: x }) {
12
- const { t: r } = O(), v = x, V = w;
13
- let c = g([]), k = g([]);
14
- const N = (d) => {
15
- c.value = (d || []).filter((o) => o.useScenes.includes("tableSearch"));
16
- }, P = (d) => {
17
- const o = (d || []).filter((u) => u.permissionCode === 1001);
18
- k.value = [...o, { btnName: r("act.reset"), permissionCode: "9999", btnColor: "info", btnIcon: "btn-reset" }];
19
- };
20
- M(
21
- () => V.data,
22
- (d, o) => {
23
- N(d.fields), P(d.buttons);
24
- },
25
- { immediate: !0 }
26
- );
27
- const i = (d) => {
28
- switch (d.permissionCode) {
29
- case "9999":
30
- c.value.forEach((u) => {
31
- u.fieldType.includes("&") ? u.queryValue = [] : u.queryValue = void 0;
32
- }), v("reset", []);
33
- break;
34
- default:
35
- const o = c.value.filter((u) => !!u.queryValue);
36
- v("search", o);
37
- break;
38
- }
39
- };
40
- return (d, o) => {
41
- const u = s("el-input"), C = s("el-option"), T = s("el-select"), Y = s("el-cascader"), q = s("el-date-picker"), U = s("el-form-item"), I = s("a-svg-icon"), S = s("el-button"), D = s("el-form");
42
- return a(), f("div", H, [
43
- t(c) && t(c).length ? (a(), n(D, {
44
- key: 0,
45
- style: B({ "--table-query-row-width": V.data.tableConfig.tableQueryRowWidth }),
46
- class: "form-content",
47
- ref: "elForm",
48
- "label-suffix": ":",
49
- "label-position": "right"
50
- }, {
51
- default: p(() => [
52
- (a(!0), f(y, null, m(t(c), (e, b) => (a(), n(U, {
53
- class: "search-form-item",
54
- "label-width": V.data.tableConfig.tableQueryLabelWidth,
55
- key: b,
56
- label: e.fieldName
57
- }, {
58
- default: p(() => [
59
- e.fieldType === "input" ? (a(), n(u, {
60
- key: 0,
61
- modelValue: e.queryValue,
62
- "onUpdate:modelValue": (l) => e.queryValue = l,
63
- placeholder: `${t(r)("act.inputPlaceholder")}${e.fieldName}`,
64
- clearable: ""
65
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : e.fieldType === "select" || e.fieldType === "switch" ? (a(), n(T, {
66
- key: 1,
67
- modelValue: e.queryValue,
68
- "onUpdate:modelValue": (l) => e.queryValue = l,
69
- placeholder: `${t(r)("act.selectPlaceholder")}${e.fieldName}`,
70
- clearable: "",
71
- filterable: "",
72
- onChange: o[0] || (o[0] = (l) => i({ permissionCode: 1001 }))
73
- }, {
74
- default: p(() => [
75
- (a(!0), f(y, null, m(e.dataList, (l, h) => (a(), n(C, {
76
- key: h,
77
- label: l.key,
78
- value: l.value
79
- }, null, 8, ["label", "value"]))), 128))
80
- ]),
81
- _: 2
82
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : e.fieldType === "multipleSelect" ? (a(), n(T, {
83
- key: 2,
84
- modelValue: e.queryValue,
85
- "onUpdate:modelValue": (l) => e.queryValue = l,
86
- placeholder: t(r)("act.selectPlaceholder") + e.fieldName,
87
- clearable: "",
88
- filterable: "",
89
- onChange: o[1] || (o[1] = (l) => i({ permissionCode: 1001 }))
90
- }, {
91
- default: p(() => [
92
- (a(!0), f(y, null, m(e.dataList, (l, h) => (a(), n(C, {
93
- key: h,
94
- label: l.key,
95
- value: l.value
96
- }, null, 8, ["label", "value"]))), 128))
97
- ]),
98
- _: 2
99
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder"])) : e.fieldType === "provinceCascade" ? (a(), n(Y, {
100
- key: 3,
101
- modelValue: e.queryValue,
102
- "onUpdate:modelValue": (l) => e.queryValue = l,
103
- options: e.selectList,
104
- props: { ...t(R), [e.fieldUiType]: !0 },
105
- clearable: "",
106
- filterable: "",
107
- placeholder: t(r)("act.selectPlaceholder") + e.fieldName
108
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "props", "placeholder"])) : e.fieldType === "date" ? (a(), n(q, {
109
- key: 4,
110
- modelValue: e.queryValue,
111
- "onUpdate:modelValue": (l) => e.queryValue = l,
112
- type: e.fieldUiType || "date",
113
- placeholder: `${t(r)("act.selectPlaceholder")}${t(r)("act.time")}`,
114
- "value-format": t($)[e.fieldUiType] || "YYYY-MM-DD HH:mm:ss",
115
- onChange: o[2] || (o[2] = (l) => i({ permissionCode: 1001 }))
116
- }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "value-format"])) : e.fieldType === "dateRange" ? (a(), n(q, {
117
- key: 5,
118
- modelValue: e.queryValue,
119
- "onUpdate:modelValue": (l) => e.queryValue = l,
120
- type: e.fieldUiType || "date",
121
- "start-placeholder": t(r)("act.startTime"),
122
- "end-placeholder": t(r)("act.endTime"),
123
- "value-format": t($)[e.fieldUiType] || "YYYY-MM-DD HH:mm:ss",
124
- onChange: o[3] || (o[3] = (l) => i({ permissionCode: 1001 }))
125
- }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "start-placeholder", "end-placeholder", "value-format"])) : _("", !0)
126
- ]),
127
- _: 2
128
- }, 1032, ["label-width", "label"]))), 128)),
129
- t(c).length ? (a(), n(U, {
130
- key: 0,
131
- class: "search-form-btn",
132
- "label-width": "0"
133
- }, {
134
- default: p(() => [
135
- (a(!0), f(y, null, m(t(k), (e, b) => (a(), n(S, {
136
- key: b,
137
- type: e.btnColor,
138
- onClick: (l) => i(e)
139
- }, {
140
- default: p(() => [
141
- e.btnIcon ? (a(), n(I, {
142
- key: 0,
143
- class: "mr6",
144
- name: e.btnIcon,
145
- width: "12",
146
- height: "12",
147
- color: "#fff"
148
- }, null, 8, ["name"])) : _("", !0),
149
- E(" " + F(e.btnName), 1)
150
- ]),
151
- _: 2
152
- }, 1032, ["type", "onClick"]))), 128))
153
- ]),
154
- _: 1
155
- })) : _("", !0)
156
- ]),
157
- _: 1
158
- }, 8, ["style"])) : _("", !0)
159
- ]);
160
- };
161
- }
162
- }, G = /* @__PURE__ */ L(Q, [["__scopeId", "data-v-810f647f"]]);
163
- export {
164
- G as default
165
- };