act-plus 1.1.39 → 1.1.40

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,155 @@
1
+ import { inject as S, defineAsyncComponent as T, reactive as W, ref as g, provide as D, watch as j, resolveComponent as m, openBlock as F, createBlock as z, withCtx as d, createElementVNode as I, createVNode as c, unref as i, isRef as E, createTextVNode as x, toDisplayString as P } from "vue";
2
+ import { useRoute as H } from "vue-router";
3
+ import { _ as K } from "./index-c18badb4.js";
4
+ import "js-base64";
5
+ import "element-plus";
6
+ import "monaco-editor";
7
+ const $ = {
8
+ __name: "configBtns",
9
+ props: {
10
+ modelValue: { type: Object, default: () => [] }
11
+ },
12
+ emits: ["update:modelValue"],
13
+ setup(L, { expose: V, emit: G }) {
14
+ const _ = H(), h = S("request"), q = T(() => import("./dialogConfigBtn-2a5b29d3.js")), u = L, C = () => ({
15
+ sort: 0,
16
+ permissionCode: null,
17
+ requestUrl: "",
18
+ btnName: "",
19
+ btnAlias: "",
20
+ btnIcon: "",
21
+ btnPostion: "",
22
+ btnType: "",
23
+ btnColor: "",
24
+ submitWay: "",
25
+ isCustomBtn: !1,
26
+ customType: "",
27
+ codeStr: "",
28
+ customComponentName: "",
29
+ customComponentUrl: "",
30
+ // isBatchOperate: false,
31
+ associationMenuId: "",
32
+ submitFields: [],
33
+ matchFields: []
34
+ });
35
+ let n = W((() => ({
36
+ tableLoading: !1,
37
+ showConfigBtnDialog: !1,
38
+ dialogData: {}
39
+ }))()), w = g(null), v = 0, y = [], s = g([]), M = [
40
+ { prop: "checkbox", width: 60 },
41
+ { prop: "serialNumber", width: 80 },
42
+ { label: "按钮名称", prop: "btnName", minWidth: 200 },
43
+ { label: "权限码", prop: "permissionCode", minWidth: 200 },
44
+ { label: "按钮别名", prop: "btnAlias", minWidth: 120 },
45
+ { label: "按钮图标", prop: "btnIcon", minWidth: 120 },
46
+ { label: "是否自定义", prop: "isCustomBtn", width: 120, render: !0 },
47
+ { label: "排序", prop: "sort", width: 180, render: !0 },
48
+ { label: "操作", prop: "operate", width: 120, render: !0, fixed: "right" }
49
+ ], f = g([]);
50
+ const N = (e) => h({ url: "/api/v1/sysMenus/getAllList", method: "post", data: e }), k = (e) => h({ url: "/api/v1/sysMenus/getMenuOfOperate", method: "get", params: e }), R = (e, t) => {
51
+ s.value.includes(e.permissionCode) || s.value.push(e.permissionCode), Object.assign(f.value[v], e), t(!0);
52
+ }, A = async (e) => {
53
+ try {
54
+ n.tableLoading = !0;
55
+ const t = u.id ? u.id : _.params.id, { data: l } = await k({ id: t });
56
+ s.value = (l || []).filter((a) => (e || []).some((r) => r.permissionCode == a.unique)).map((a) => a.unique), f.value = (l || []).map((a, r) => {
57
+ let b = C(), p = (e || []).find((o) => o.permissionCode == a.unique) || {};
58
+ return { ...b, btnIcon: a.icon || "", ...p, btnName: a.name, permissionCode: a.unique, sort: p.sort ? p.sort : (r + 1) * 10 };
59
+ }).sort((a, r) => a.sort - r.sort), n.tableLoading = !1;
60
+ } catch (t) {
61
+ n.tableLoading = !1, console.error(t);
62
+ }
63
+ }, U = () => w.value.getSelectionRows() || [];
64
+ D("associationMenuList", y), D("createDefaultButtonItem", C), j(
65
+ () => u.modelValue,
66
+ async (e, t) => {
67
+ try {
68
+ if (e.length) {
69
+ const l = u.id ? u.id : _.params.id;
70
+ y = (await N({ dynamicFilters: [{ field: "parentId", operate: "Equal", value: l }] })).data || [], await A(e);
71
+ } else
72
+ s.value = [], f.value = [];
73
+ } catch (l) {
74
+ n.tableLoading = !1, console.error(l);
75
+ }
76
+ },
77
+ { deep: !0 }
78
+ );
79
+ const O = (e) => {
80
+ n.dialogData = e.row, v = e.$index, n.showConfigBtnDialog = !0;
81
+ };
82
+ return V({ getTableSelectionRows: U }), (e, t) => {
83
+ const l = m("el-tag"), a = m("el-input-number"), r = m("el-button"), b = m("a-table"), p = m("el-card");
84
+ return F(), z(p, {
85
+ class: "form-card",
86
+ shadow: "hover"
87
+ }, {
88
+ header: d(() => t[2] || (t[2] = [
89
+ I("div", { class: "card-header" }, [
90
+ I("div", { class: "card-header-title" }, "按钮配置")
91
+ ], -1)
92
+ ])),
93
+ default: d(() => [
94
+ c(b, {
95
+ ref_key: "tableRef",
96
+ ref: w,
97
+ loading: i(n).tableLoading,
98
+ rowKey: "permissionCode",
99
+ selection: i(s),
100
+ "onUpdate:selection": t[0] || (t[0] = (o) => E(s) ? s.value = o : s = o),
101
+ headers: i(M),
102
+ data: i(f),
103
+ showPagination: !1
104
+ }, {
105
+ isCustomBtn: d(({ scope: o }) => [
106
+ c(l, {
107
+ type: "primary",
108
+ effect: "dark",
109
+ size: "small"
110
+ }, {
111
+ default: d(() => [
112
+ x(P(o.row.isCustomBtn ? "是" : "否"), 1)
113
+ ]),
114
+ _: 2
115
+ }, 1024)
116
+ ]),
117
+ sort: d(({ scope: o }) => [
118
+ c(a, {
119
+ modelValue: o.row.sort,
120
+ "onUpdate:modelValue": (B) => o.row.sort = B,
121
+ min: 0
122
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
123
+ ]),
124
+ operate: d(({ scope: o }) => [
125
+ c(r, {
126
+ type: "primary",
127
+ text: "",
128
+ size: "small",
129
+ icon: "Aim",
130
+ onClick: (B) => O(o)
131
+ }, {
132
+ default: d(() => t[3] || (t[3] = [
133
+ x(" 配置 ")
134
+ ])),
135
+ _: 2
136
+ }, 1032, ["onClick"])
137
+ ]),
138
+ _: 1
139
+ }, 8, ["loading", "selection", "headers", "data"]),
140
+ c(i(q), {
141
+ visible: i(n).showConfigBtnDialog,
142
+ "onUpdate:visible": t[1] || (t[1] = (o) => i(n).showConfigBtnDialog = o),
143
+ title: "配置按钮",
144
+ data: i(n).dialogData,
145
+ onRefresh: R
146
+ }, null, 8, ["visible", "data"])
147
+ ]),
148
+ _: 1
149
+ });
150
+ };
151
+ }
152
+ }, oe = /* @__PURE__ */ K($, [["__scopeId", "data-v-862782ff"]]);
153
+ export {
154
+ oe as default
155
+ };
@@ -1,19 +1,19 @@
1
- import { defineAsyncComponent as I, inject as H, reactive as U, ref as j, watch as B, resolveComponent as m, openBlock as f, createBlock as w, withCtx as a, createElementVNode as C, createVNode as d, createTextVNode as i, unref as r, toDisplayString as _, createElementBlock as q, Fragment as K, renderList as O, createCommentVNode as W, pushScopeId as Y, popScopeId as G } from "vue";
2
- import { a as J } from "./enum-d734222c.js";
3
- import { _ as M } from "./index-695e54dd.js";
1
+ import { defineAsyncComponent as H, inject as U, reactive as j, ref as B, watch as q, resolveComponent as m, openBlock as c, createBlock as w, withCtx as a, createElementVNode as h, createVNode as d, createTextVNode as i, unref as s, toDisplayString as f, createElementBlock as I, Fragment as K, renderList as O, createCommentVNode as W } from "vue";
2
+ import { a as Y } from "./enum-d734222c.js";
3
+ import { _ as G } from "./index-c18badb4.js";
4
4
  import "vue-router";
5
5
  import "js-base64";
6
6
  import "element-plus";
7
7
  import "monaco-editor";
8
- const Q = (u) => (Y("data-v-3440b427"), u = u(), G(), u), X = { class: "card-header" }, Z = /* @__PURE__ */ Q(() => /* @__PURE__ */ C("div", { class: "card-header-title" }, "字段配置", -1)), ee = {
8
+ const J = { class: "card-header" }, M = {
9
9
  __name: "configFileds",
10
10
  props: {
11
11
  modelValue: { type: Object, default: () => [] }
12
12
  },
13
13
  emits: ["update:modelValue"],
14
- setup(u, { emit: v }) {
15
- const F = I(() => import("./dialogAddField-15d985a0.js")), g = v, b = u, V = H("configData")();
16
- let l = U((() => ({
14
+ setup(C, { emit: v }) {
15
+ const F = H(() => import("./dialogAddField-37d23c28.js")), g = v, b = C, V = U("configData")();
16
+ let l = j((() => ({
17
17
  tableLoading: !1,
18
18
  showAddFieldDialog: !1,
19
19
  dialogTitle: "字段配置",
@@ -28,85 +28,85 @@ const Q = (u) => (Y("data-v-3440b427"), u = u(), G(), u), X = { class: "card-hea
28
28
  { label: "场景自定义", prop: "formCustomComponentes", width: 140, render: !0 },
29
29
  { label: "排序", prop: "sort", width: 180, render: !0 },
30
30
  { label: "操作", prop: "operate", width: 180, render: !0, fixed: "right" }
31
- ], s = j([]);
32
- const S = (e) => {
31
+ ], r = B([]);
32
+ const T = (e) => {
33
33
  if (!Reflect.has(e, "fieldType"))
34
34
  return "";
35
- const t = J.find((n) => n.value == e.fieldType);
35
+ const t = Y.find((n) => n.value == e.fieldType);
36
36
  return (t == null ? void 0 : t.key) || "";
37
- }, T = (e) => Reflect.has(e, "useScenes") ? [
37
+ }, k = (e) => Reflect.has(e, "useScenes") ? [
38
38
  { btnName: "表格查询", permissionCode: "tableSearch" },
39
39
  { btnName: "表格展示", permissionCode: "tableShow" },
40
40
  ...V.value.buttons || []
41
- ].filter((n) => e.useScenes.includes(n.permissionCode)).map((n) => n.btnName) : [], y = (e) => (e.formCustomComponentes || []).filter((t) => t.isFiledCustom).map((t) => `${t.btnName}:是`).join(), k = (e, t) => {
41
+ ].filter((n) => e.useScenes.includes(n.permissionCode)).map((n) => n.btnName) : [], y = (e) => (e.formCustomComponentes || []).filter((t) => t.isFiledCustom).map((t) => `${t.btnName}:是`).join(), x = (e, t) => {
42
42
  if (p == null) {
43
- const n = s.value.length;
44
- s.value.push({ ...e, sort: (n + 1) * 10 });
43
+ const n = r.value.length;
44
+ r.value.push({ ...e, sort: (n + 1) * 10 });
45
45
  } else
46
- s.value[p] = {
46
+ r.value[p] = {
47
47
  ...e,
48
48
  postRequestParams: [...e.postRequestParams],
49
49
  useScenes: [...e.useScenes],
50
50
  formCustomComponentes: [...e.formCustomComponentes]
51
51
  };
52
- g("update:modelValue", s.value), t(!0);
53
- }, x = async () => {
52
+ g("update:modelValue", r.value), t(!0);
53
+ }, N = async () => {
54
54
  try {
55
- l.tableLoading = !0, s.value = (b.modelValue || []).map((e) => ({ ...e, sort: e.sort ? e.sort : 0 })).sort((e, t) => e.sort - t.sort), l.tableLoading = !1;
55
+ l.tableLoading = !0, r.value = (b.modelValue || []).map((e) => ({ ...e, sort: e.sort ? e.sort : 0 })).sort((e, t) => e.sort - t.sort), l.tableLoading = !1;
56
56
  } catch (e) {
57
57
  l.tableLoading = !1, console.error(e);
58
58
  }
59
59
  };
60
- B(
60
+ q(
61
61
  () => b.modelValue,
62
62
  async (e, t) => {
63
- await x();
63
+ await N();
64
64
  },
65
65
  { deep: !0, immediate: !0 }
66
66
  );
67
- const N = () => {
67
+ const S = () => {
68
68
  p = null, l.dialogData = {}, l.showAddFieldDialog = !0;
69
69
  }, A = (e) => {
70
70
  p = e.$index, l.dialogData = e.row, l.showAddFieldDialog = !0;
71
71
  }, L = () => {
72
- g("update:modelValue", s.value);
72
+ g("update:modelValue", r.value);
73
73
  }, E = (e) => {
74
- s.value.splice(e.$index, 1), g("update:modelValue", s.value);
74
+ r.value.splice(e.$index, 1), g("update:modelValue", r.value);
75
75
  };
76
76
  return (e, t) => {
77
- const n = m("el-button"), h = m("el-tag"), P = m("el-input-number"), R = m("a-table"), $ = m("el-card");
78
- return f(), w($, {
77
+ const n = m("el-button"), _ = m("el-tag"), P = m("el-input-number"), R = m("a-table"), $ = m("el-card");
78
+ return c(), w($, {
79
79
  class: "form-card",
80
80
  shadow: "hover"
81
81
  }, {
82
82
  header: a(() => [
83
- C("div", X, [
84
- Z,
83
+ h("div", J, [
84
+ t[3] || (t[3] = h("div", { class: "card-header-title" }, "字段配置", -1)),
85
85
  d(n, {
86
86
  class: "card-header-operate",
87
87
  type: "primary",
88
88
  icon: "Plus",
89
- onClick: t[0] || (t[0] = (o) => N())
89
+ onClick: t[0] || (t[0] = (o) => S())
90
90
  }, {
91
- default: a(() => [
91
+ default: a(() => t[2] || (t[2] = [
92
92
  i("添加字段")
93
- ]),
93
+ ])),
94
94
  _: 1
95
95
  })
96
96
  ])
97
97
  ]),
98
98
  default: a(() => [
99
99
  d(R, {
100
- loading: r(l).tableLoading,
101
- headers: r(D),
102
- data: r(s),
100
+ loading: s(l).tableLoading,
101
+ headers: s(D),
102
+ data: s(r),
103
103
  showPagination: !1
104
104
  }, {
105
105
  fieldType: a(({ scope: o }) => [
106
- i(_(S(o.row)), 1)
106
+ i(f(T(o.row)), 1)
107
107
  ]),
108
108
  useScenes: a(({ scope: o }) => [
109
- (f(!0), q(K, null, O(T(o.row), (c, z) => (f(), w(h, {
109
+ (c(!0), I(K, null, O(k(o.row), (u, z) => (c(), w(_, {
110
110
  style: { margin: "0 4px" },
111
111
  key: z,
112
112
  type: "success",
@@ -114,32 +114,32 @@ const Q = (u) => (Y("data-v-3440b427"), u = u(), G(), u), X = { class: "card-hea
114
114
  size: "small"
115
115
  }, {
116
116
  default: a(() => [
117
- i(_(c), 1)
117
+ i(f(u), 1)
118
118
  ]),
119
119
  _: 2
120
120
  }, 1024))), 128))
121
121
  ]),
122
122
  customTableHeaderName: a(({ scope: o }) => [
123
- d(h, {
123
+ d(_, {
124
124
  type: "primary",
125
125
  effect: "dark",
126
126
  size: "small"
127
127
  }, {
128
128
  default: a(() => [
129
- i(_(o.row.customTableHeaderName ? "是" : "否"), 1)
129
+ i(f(o.row.customTableHeaderName ? "是" : "否"), 1)
130
130
  ]),
131
131
  _: 2
132
132
  }, 1024)
133
133
  ]),
134
134
  formCustomComponentes: a(({ scope: o }) => [
135
- y(o.row) ? (f(), w(h, {
135
+ y(o.row) ? (c(), w(_, {
136
136
  key: 0,
137
137
  type: "primary",
138
138
  effect: "dark",
139
139
  size: "small"
140
140
  }, {
141
141
  default: a(() => [
142
- i(_(y(o.row)), 1)
142
+ i(f(y(o.row)), 1)
143
143
  ]),
144
144
  _: 2
145
145
  }, 1024)) : W("", !0)
@@ -147,7 +147,7 @@ const Q = (u) => (Y("data-v-3440b427"), u = u(), G(), u), X = { class: "card-hea
147
147
  sort: a(({ scope: o }) => [
148
148
  d(P, {
149
149
  modelValue: o.row.sort,
150
- "onUpdate:modelValue": (c) => o.row.sort = c,
150
+ "onUpdate:modelValue": (u) => o.row.sort = u,
151
151
  min: 0,
152
152
  onChange: L
153
153
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
@@ -158,11 +158,11 @@ const Q = (u) => (Y("data-v-3440b427"), u = u(), G(), u), X = { class: "card-hea
158
158
  text: "",
159
159
  size: "small",
160
160
  icon: "EditPen",
161
- onClick: (c) => A(o)
161
+ onClick: (u) => A(o)
162
162
  }, {
163
- default: a(() => [
163
+ default: a(() => t[4] || (t[4] = [
164
164
  i(" 编辑 ")
165
- ]),
165
+ ])),
166
166
  _: 2
167
167
  }, 1032, ["onClick"]),
168
168
  d(n, {
@@ -170,30 +170,30 @@ const Q = (u) => (Y("data-v-3440b427"), u = u(), G(), u), X = { class: "card-hea
170
170
  text: "",
171
171
  size: "small",
172
172
  icon: "Delete",
173
- onClick: (c) => E(o)
173
+ onClick: (u) => E(o)
174
174
  }, {
175
- default: a(() => [
175
+ default: a(() => t[5] || (t[5] = [
176
176
  i(" 删除 ")
177
- ]),
177
+ ])),
178
178
  _: 2
179
179
  }, 1032, ["onClick"])
180
180
  ]),
181
181
  _: 1
182
182
  }, 8, ["loading", "headers", "data"]),
183
- d(r(F), {
184
- visible: r(l).showAddFieldDialog,
185
- "onUpdate:visible": t[1] || (t[1] = (o) => r(l).showAddFieldDialog = o),
186
- title: r(l).dialogTitle,
183
+ d(s(F), {
184
+ visible: s(l).showAddFieldDialog,
185
+ "onUpdate:visible": t[1] || (t[1] = (o) => s(l).showAddFieldDialog = o),
186
+ title: s(l).dialogTitle,
187
187
  configData: b.data,
188
- data: r(l).dialogData,
189
- onRefresh: k
188
+ data: s(l).dialogData,
189
+ onRefresh: x
190
190
  }, null, 8, ["visible", "title", "configData", "data"])
191
191
  ]),
192
192
  _: 1
193
193
  });
194
194
  };
195
195
  }
196
- }, ie = /* @__PURE__ */ M(ee, [["__scopeId", "data-v-3440b427"]]);
196
+ }, ne = /* @__PURE__ */ G(M, [["__scopeId", "data-v-3440b427"]]);
197
197
  export {
198
- ie as default
198
+ ne as default
199
199
  };
@@ -1,6 +1,6 @@
1
1
  import { inject as z, ref as T, watch as j, resolveComponent as i, openBlock as s, createBlock as b, withCtx as l, createVNode as e, unref as u, createTextVNode as B, createElementBlock as y, Fragment as U, renderList as w, createCommentVNode as x } from "vue";
2
2
  import { S as I } from "./enum-d734222c.js";
3
- import { _ as M } from "./index-695e54dd.js";
3
+ import { _ as M } from "./index-c18badb4.js";
4
4
  import "vue-router";
5
5
  import "js-base64";
6
6
  import "element-plus";
@@ -49,7 +49,7 @@ const A = {
49
49
  m || (a.value.pageSize = 10);
50
50
  };
51
51
  return Q({ formRef: h, form: a }), (m, o) => {
52
- const p = i("el-input"), d = i("el-form-item"), n = i("el-col"), c = i("el-row"), k = i("el-button"), C = i("el-divider"), S = i("el-option"), R = i("el-select"), f = i("el-switch"), V = i("el-input-number"), E = i("el-form"), L = i("el-card");
52
+ const p = i("el-input"), d = i("el-form-item"), n = i("el-col"), V = i("el-row"), k = i("el-button"), C = i("el-divider"), S = i("el-option"), R = i("el-select"), f = i("el-switch"), c = i("el-input-number"), E = i("el-form"), L = i("el-card");
53
53
  return s(), b(L, {
54
54
  class: "form-card",
55
55
  shadow: "hover",
@@ -64,7 +64,7 @@ const A = {
64
64
  "label-width": "120"
65
65
  }, {
66
66
  default: l(() => [
67
- e(c, null, {
67
+ e(V, null, {
68
68
  default: l(() => [
69
69
  e(n, { span: 24 }, {
70
70
  default: l(() => [
@@ -91,7 +91,7 @@ const A = {
91
91
  }),
92
92
  e(C, { "content-position": "left" }, {
93
93
  default: l(() => [
94
- B(" 表格默认参数配置 "),
94
+ o[11] || (o[11] = B(" 表格默认参数配置 ")),
95
95
  e(k, {
96
96
  class: "add-icon-btn",
97
97
  type: "primary",
@@ -102,7 +102,7 @@ const A = {
102
102
  ]),
103
103
  _: 1
104
104
  }),
105
- (s(!0), y(U, null, w(u(a).defaultParams, (t, _) => (s(), b(c, {
105
+ (s(!0), y(U, null, w(u(a).defaultParams, (t, _) => (s(), b(V, {
106
106
  class: "table-post-params",
107
107
  key: _
108
108
  }, {
@@ -226,7 +226,7 @@ const A = {
226
226
  ]),
227
227
  _: 2
228
228
  }, 1024))), 128)),
229
- e(c, null, {
229
+ e(V, null, {
230
230
  default: l(() => [
231
231
  e(n, { span: 4 }, {
232
232
  default: l(() => [
@@ -317,7 +317,7 @@ const A = {
317
317
  ]),
318
318
  _: 1
319
319
  }),
320
- e(c, null, {
320
+ e(V, null, {
321
321
  default: l(() => [
322
322
  u(a).isOperateRow ? (s(), b(n, {
323
323
  key: 0,
@@ -329,7 +329,7 @@ const A = {
329
329
  "label-width": "140"
330
330
  }, {
331
331
  default: l(() => [
332
- e(V, {
332
+ e(c, {
333
333
  modelValue: u(a).tableOperateCellWidth,
334
334
  "onUpdate:modelValue": o[7] || (o[7] = (t) => u(a).tableOperateCellWidth = t),
335
335
  min: 120
@@ -352,7 +352,7 @@ const A = {
352
352
  rules: [{ required: !0, message: "必填项", trigger: "blur" }]
353
353
  }, {
354
354
  default: l(() => [
355
- e(V, {
355
+ e(c, {
356
356
  modelValue: u(a).pageSize,
357
357
  "onUpdate:modelValue": o[8] || (o[8] = (t) => u(a).pageSize = t),
358
358
  min: 10
@@ -370,7 +370,7 @@ const A = {
370
370
  "label-width": "140"
371
371
  }, {
372
372
  default: l(() => [
373
- e(V, {
373
+ e(c, {
374
374
  modelValue: u(a).tableQueryLabelWidth,
375
375
  "onUpdate:modelValue": o[9] || (o[9] = (t) => u(a).tableQueryLabelWidth = t),
376
376
  min: 80
@@ -388,7 +388,7 @@ const A = {
388
388
  "label-width": "140"
389
389
  }, {
390
390
  default: l(() => [
391
- e(V, {
391
+ e(c, {
392
392
  modelValue: u(a).tableQueryRowWidth,
393
393
  "onUpdate:modelValue": o[10] || (o[10] = (t) => u(a).tableQueryRowWidth = t),
394
394
  min: 1