@vancone/console-component 0.1.0-beta.13 → 0.1.0-beta.14

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vancone/console-component",
3
3
  "private": false,
4
- "version": "0.1.0-beta.13",
4
+ "version": "0.1.0-beta.14",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "packages/dist/**"
@@ -119,16 +119,16 @@ const wt = { class: "app-catalog-wrapper" }, At = { style: { width: "calc(100% -
119
119
  i("div", kt, [
120
120
  (n(!0), U(ee, null, se(o, (C) => (n(), U("div", _t, [
121
121
  i("h1", null, Q(C.name), 1),
122
- (n(!0), U(ee, null, se(C.apps, (A) => {
122
+ (n(!0), U(ee, null, se(C.apps, (k) => {
123
123
  var V, R;
124
124
  return n(), U("a", {
125
- style: Ge([{ "text-decoration": "none" }, { pointerEvents: ((V = A.homepageUrl) == null ? void 0 : V.length) > 0 ? "auto" : "none" }]),
125
+ style: Ge([{ "text-decoration": "none" }, { pointerEvents: ((V = k.homepageUrl) == null ? void 0 : V.length) > 0 ? "auto" : "none" }]),
126
126
  target: "_blank",
127
- href: A.homepageUrl
127
+ href: k.homepageUrl
128
128
  }, [
129
129
  i("h2", {
130
- style: Ge({ color: ((R = A.homepageUrl) == null ? void 0 : R.length) > 0 ? "#555" : "#bbb" })
131
- }, Q(A.name), 5)
130
+ style: Ge({ color: ((R = k.homepageUrl) == null ? void 0 : R.length) > 0 ? "#555" : "#bbb" })
131
+ }, Q(k.name), 5)
132
132
  ], 12, It);
133
133
  }), 256))
134
134
  ]))), 256))
@@ -264,7 +264,7 @@ const Dt = { render: Vt }, Tt = { class: "header" }, Kt = { class: "right" }, Pt
264
264
  helpDocUrl: {}
265
265
  },
266
266
  setup(s) {
267
- const { t: a } = Ie(), o = E(), g = E(), t = E(), e = s, b = E(!1), c = E(""), C = E(Me.global.locale), A = le([
267
+ const { t: a } = Ie(), o = E(), g = E(), t = E(), e = s, b = E(!1), c = E(""), C = E(Me.global.locale), k = le([
268
268
  {
269
269
  id: "en",
270
270
  name: "English"
@@ -276,15 +276,15 @@ const Dt = { render: Vt }, Tt = { class: "header" }, Kt = { class: "right" }, Pt
276
276
  ]);
277
277
  Oe(() => {
278
278
  c.value = decodeURIComponent(escape(window.atob(V("passport_username")))), c.value === "" && vt().then(({ data: O }) => {
279
- var k;
280
- O.code == 0 && (c.value = (k = O.data.name) != null ? k : O.data.displayId);
279
+ var w;
280
+ O.code == 0 && (c.value = (w = O.data.name) != null ? w : O.data.displayId);
281
281
  });
282
282
  });
283
283
  function V(O) {
284
- for (var k = O + "=", W = document.cookie.split(";"), Y = 0; Y < W.length; Y++) {
284
+ for (var w = O + "=", W = document.cookie.split(";"), Y = 0; Y < W.length; Y++) {
285
285
  for (var q = W[Y]; q.charAt(0) == " "; ) q = q.substring(1);
286
- if (q.indexOf(k) != -1)
287
- return q.substring(k.length, q.length);
286
+ if (q.indexOf(w) != -1)
287
+ return q.substring(w.length, q.length);
288
288
  }
289
289
  return "";
290
290
  }
@@ -306,18 +306,18 @@ const Dt = { render: Vt }, Tt = { class: "header" }, Kt = { class: "right" }, Pt
306
306
  function D() {
307
307
  window.open(e.helpDocUrl, "_blank");
308
308
  }
309
- return (O, k) => {
309
+ return (O, w) => {
310
310
  const W = y("el-tooltip"), Y = y("el-avatar"), q = y("el-menu-item"), fe = y("el-icon"), m = y("el-popover"), T = y("el-menu");
311
311
  return n(), U("div", Tt, [
312
312
  i("div", {
313
313
  class: "title",
314
314
  onClick: P
315
315
  }, [
316
- k[1] || (k[1] = i("img", {
316
+ w[1] || (w[1] = i("img", {
317
317
  src: gt,
318
318
  class: "logo"
319
319
  }, null, -1)),
320
- k[2] || (k[2] = i("h1", null, "VanCone", -1)),
320
+ w[2] || (w[2] = i("h1", null, "VanCone", -1)),
321
321
  i("span", null, Q(O.title), 1)
322
322
  ]),
323
323
  d(St, { visible: b.value }, null, 8, ["visible"]),
@@ -330,7 +330,7 @@ const Dt = { render: Vt }, Tt = { class: "header" }, Kt = { class: "right" }, Pt
330
330
  default: r(() => [
331
331
  i("div", {
332
332
  class: "icon-wrapper",
333
- onClick: k[0] || (k[0] = (h) => b.value = !b.value)
333
+ onClick: w[0] || (w[0] = (h) => b.value = !b.value)
334
334
  }, [
335
335
  d(v(Ut))
336
336
  ])
@@ -436,7 +436,7 @@ const Dt = { render: Vt }, Tt = { class: "header" }, Kt = { class: "right" }, Pt
436
436
  "popper-style": "height: 80px; left: -165px"
437
437
  }, {
438
438
  default: r(() => [
439
- (n(!0), U(ee, null, se(A, (h) => (n(), U("div", {
439
+ (n(!0), U(ee, null, se(k, (h) => (n(), U("div", {
440
440
  class: "select-list",
441
441
  onClick: (G) => X(h.id)
442
442
  }, [
@@ -485,12 +485,12 @@ const Dt = { render: Vt }, Tt = { class: "header" }, Kt = { class: "right" }, Pt
485
485
  index: o.menu.path
486
486
  }, {
487
487
  title: r(() => {
488
- var c, C, A;
488
+ var c, C, k;
489
489
  return [
490
490
  i("div", Jt, [
491
491
  (n(), I(Se((c = o.menu.meta) == null ? void 0 : c.icon), { class: "menu-icon" }))
492
492
  ]),
493
- i("span", null, Q(o.$t((A = (C = o.menu.meta) == null ? void 0 : C.title) != null ? A : "")), 1)
493
+ i("span", null, Q(o.$t((k = (C = o.menu.meta) == null ? void 0 : C.title) != null ? k : "")), 1)
494
494
  ];
495
495
  }),
496
496
  default: r(() => [
@@ -544,19 +544,19 @@ const oo = { render: to }, ao = { class: "menu-wrapper" }, no = { class: "menu-b
544
544
  setup(s, { emit: a }) {
545
545
  const o = s, g = a, t = _e(), e = E(), b = xe(() => {
546
546
  var V;
547
- const A = t.meta.activeMenu;
548
- if (A === "{model}") {
547
+ const k = t.meta.activeMenu;
548
+ if (k === "{model}") {
549
549
  let R = t.params.app ? `${t.params.app}/${t.params.model}` : t.params.model;
550
550
  return "/" + ((V = Wt[t.params.model]) != null ? V : R);
551
551
  } else
552
- return A;
552
+ return k;
553
553
  }), c = E(!1);
554
554
  function C() {
555
555
  console.log("change"), g("update:menuCollapsed", !o.menuCollapsed);
556
556
  }
557
557
  return he(c, () => {
558
558
  c.value && e.value.style.width && (e.value.style.width += "200");
559
- }), (A, V) => {
559
+ }), (k, V) => {
560
560
  const R = y("el-menu");
561
561
  return n(), U("div", ao, [
562
562
  i("div", no, [
@@ -699,23 +699,23 @@ const Co = /* @__PURE__ */ re(vo, [["render", bo]]), yo = { class: "card-wrapper
699
699
  deep: !0
700
700
  }
701
701
  ), (c, C) => (n(), U("div", yo, [
702
- (n(!0), U(ee, null, se(t.cards, (A) => (n(), U("div", {
703
- class: Te(["card", { "card-selected": e.value === A.key }]),
704
- onClick: (V) => b(A)
702
+ (n(!0), U(ee, null, se(t.cards, (k) => (n(), U("div", {
703
+ class: Te(["card", { "card-selected": e.value === k.key }]),
704
+ onClick: (V) => b(k)
705
705
  }, [
706
706
  i("div", Ao, [
707
707
  i("div", ko, [
708
708
  i("div", _o, [
709
- A.icon ? (n(), I(Se(A.icon), {
709
+ k.icon ? (n(), I(Se(k.icon), {
710
710
  key: 0,
711
711
  class: "svg-icon"
712
712
  })) : K("", !0)
713
713
  ]),
714
714
  i("span", {
715
- style: Ge({ color: A.disabled ? "#aaa" : "black" })
716
- }, Q(v(a)(A.label)), 5)
715
+ style: Ge({ color: k.disabled ? "#aaa" : "black" })
716
+ }, Q(v(a)(k.label)), 5)
717
717
  ]),
718
- i("span", null, Q(A.count), 1)
718
+ i("span", null, Q(k.count), 1)
719
719
  ])
720
720
  ], 10, wo))), 256))
721
721
  ]));
@@ -754,11 +754,11 @@ const ke = (s) => {
754
754
  },
755
755
  emits: ["update:id"],
756
756
  setup(s, { expose: a, emit: o }) {
757
- const { t: g } = Me.global, t = s, e = le({}), b = E(!1), c = E(), C = le({}), A = E(!0), V = (m) => t.mode === "view" && (q(m, void 0) || q(m, "input") || q(m, "select") || q(m, "password")), R = xe(() => t.model.fields ? t.model.fields.filter(
757
+ const { t: g } = Me.global, t = s, e = le({}), b = E(!1), c = E(), C = le({}), k = E(!0), V = (m) => t.mode === "view" && (q(m, void 0) || q(m, "input") || q(m, "select") || q(m, "password")), R = xe(() => t.model.fields ? t.model.fields.filter(
758
758
  (m) => {
759
- var G, _, w, x;
759
+ var G, _, A, x;
760
760
  let T = m.visible !== !1 && ((G = m.formItemAttributes) == null ? void 0 : G.visible) !== !1;
761
- if (t.mode !== "view" && ((_ = m.formItemAttributes) == null ? void 0 : _.editable) === !1 || t.mode === "view" && ((w = m.formItemAttributes) == null ? void 0 : w.type) === "password")
761
+ if (t.mode !== "view" && ((_ = m.formItemAttributes) == null ? void 0 : _.editable) === !1 || t.mode === "view" && ((A = m.formItemAttributes) == null ? void 0 : A.type) === "password")
762
762
  return !1;
763
763
  let h = (x = m.formItemAttributes) == null ? void 0 : x.showCondition;
764
764
  return h && h.field && h.value ? e[h.field] === h.value : T;
@@ -771,9 +771,9 @@ const ke = (s) => {
771
771
  const m = t.model.fields;
772
772
  let T = {};
773
773
  m == null || m.forEach((h) => {
774
- var G, _, w, x, M, F, L, p, S;
774
+ var G, _, A, x, M, F, L, p, S;
775
775
  if (e[h.prop] = null, h.visible !== !1 && ((G = h.formItemAttributes) == null ? void 0 : G.visible) !== !1) {
776
- if (((_ = h.formItemAttributes) == null ? void 0 : _.defaultValue) !== void 0 ? e[h.prop] = (w = h.formItemAttributes) == null ? void 0 : w.defaultValue : e[h.prop] = void 0, t.mode !== "view") {
776
+ if (((_ = h.formItemAttributes) == null ? void 0 : _.defaultValue) !== void 0 ? e[h.prop] = (A = h.formItemAttributes) == null ? void 0 : A.defaultValue : e[h.prop] = void 0, t.mode !== "view") {
777
777
  let H = (x = h.formItemAttributes) == null ? void 0 : x.validationRule;
778
778
  H !== void 0 && (T[h.prop] = H), Object.assign(C, T);
779
779
  }
@@ -797,14 +797,14 @@ const ke = (s) => {
797
797
  }
798
798
  function P() {
799
799
  var m;
800
- console.log("init form", t.id, t.model), D(), A.value = (m = t.model.useI18n) != null ? m : !0, X(), (t.mode === "update" || t.mode === "view") && t.id !== void 0 && t.id !== "" && (b.value = !0, ve(`${t.model.api}/${t.id}`, "GET", {}).then(({ data: T }) => {
800
+ console.log("init form", t.id, t.model), D(), k.value = (m = t.model.useI18n) != null ? m : !0, X(), (t.mode === "update" || t.mode === "view") && t.id !== void 0 && t.id !== "" && (b.value = !0, ve(`${t.model.api}/${t.id}`, "GET", {}).then(({ data: T }) => {
801
801
  ke(e), Object.assign(e, T.data), b.value = !1;
802
802
  }));
803
803
  }
804
804
  function z() {
805
805
  return new Promise((m, T) => {
806
- var G, _, w, x;
807
- ((_ = (G = t.model.formConfig) == null ? void 0 : G.functions) == null ? void 0 : _.beforeSubmit) !== void 0 && Object.assign(e, (x = (w = t.model.formConfig) == null ? void 0 : w.functions) == null ? void 0 : x.beforeSubmit(e));
806
+ var G, _, A, x;
807
+ ((_ = (G = t.model.formConfig) == null ? void 0 : G.functions) == null ? void 0 : _.beforeSubmit) !== void 0 && Object.assign(e, (x = (A = t.model.formConfig) == null ? void 0 : A.functions) == null ? void 0 : x.beforeSubmit(e));
808
808
  let h = t.mode === "create" ? "POST" : "PUT";
809
809
  t.model.api && ve(t.model.api, h, e).then(({ data: M }) => {
810
810
  var F, L, p, S;
@@ -817,15 +817,15 @@ const ke = (s) => {
817
817
  (m = c.value) == null || m.resetFields();
818
818
  }
819
819
  function O(m) {
820
- return m.label ? A ? g(m.label) : m.label : m.prop.slice(0, 1).toUpperCase() + m.prop.slice(1).toLowerCase();
820
+ return m.label ? k ? g(m.label) : m.label : m.prop.slice(0, 1).toUpperCase() + m.prop.slice(1).toLowerCase();
821
821
  }
822
- function k(m) {
822
+ function w(m) {
823
823
  var T, h, G, _;
824
824
  if (m) {
825
825
  if (q(m, "select")) {
826
- const w = (h = (T = m.tableColumnAttributes) == null ? void 0 : T.functions) == null ? void 0 : h.transformValue;
827
- if (w)
828
- return w(e[m.prop]);
826
+ const A = (h = (T = m.tableColumnAttributes) == null ? void 0 : T.functions) == null ? void 0 : h.transformValue;
827
+ if (A)
828
+ return A(e[m.prop]);
829
829
  const x = (_ = (G = m.formItemAttributes) == null ? void 0 : G.selectAttributes) == null ? void 0 : _.viewModeLabelField;
830
830
  if (x)
831
831
  return e[x];
@@ -860,9 +860,9 @@ const ke = (s) => {
860
860
  if (!(!h.formItemAttributes || h.formItemAttributes.type !== "select" || !G || !G.queryParamValueField) && G.queryParamValueField === m.prop) {
861
861
  const _ = G.api;
862
862
  if (_) {
863
- let w = _;
863
+ let A = _;
864
864
  const x = G.queryParamName;
865
- x && (w = `${w}?${x}=${e[G.queryParamValueField]}`), ve(w, "GET", {}).then(({ data: M }) => {
865
+ x && (A = `${A}?${x}=${e[G.queryParamValueField]}`), ve(A, "GET", {}).then(({ data: M }) => {
866
866
  if (G) {
867
867
  let F = [];
868
868
  Array.isArray(M.data) ? F = M.data : M.data.list && Array.isArray(M.data.list) && (F = M.data.list), G.options = F.map((L) => ({
@@ -883,7 +883,7 @@ const ke = (s) => {
883
883
  submit: z,
884
884
  formData: e
885
885
  }), (m, T) => {
886
- const h = y("el-input"), G = y("el-switch"), _ = y("el-date-picker"), w = y("el-option"), x = y("el-select"), M = y("el-form-item"), F = y("el-form"), L = Ke("loading");
886
+ const h = y("el-input"), G = y("el-switch"), _ = y("el-date-picker"), A = y("el-option"), x = y("el-select"), M = y("el-form-item"), F = y("el-form"), L = Ke("loading");
887
887
  return Pe((n(), I(F, {
888
888
  ref_key: "formRef",
889
889
  ref: c,
@@ -911,7 +911,7 @@ const ke = (s) => {
911
911
  placeholder: (S = p.formItemAttributes) == null ? void 0 : S.placeholder,
912
912
  disabled: W(p)
913
913
  }, null, 8, ["type", "modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : K("", !0),
914
- V(p) ? (n(), U("span", Eo, Q(k(p)), 1)) : K("", !0),
914
+ V(p) ? (n(), U("span", Eo, Q(w(p)), 1)) : K("", !0),
915
915
  q(p, "switch") ? (n(), I(G, {
916
916
  key: 2,
917
917
  modelValue: e[p.prop],
@@ -933,7 +933,7 @@ const ke = (s) => {
933
933
  default: r(() => {
934
934
  var u, l;
935
935
  return [
936
- (n(!0), U(ee, null, se((l = (u = p.formItemAttributes) == null ? void 0 : u.selectAttributes) == null ? void 0 : l.options, (f) => (n(), I(w, {
936
+ (n(!0), U(ee, null, se((l = (u = p.formItemAttributes) == null ? void 0 : u.selectAttributes) == null ? void 0 : l.options, (f) => (n(), I(A, {
937
937
  value: f.value,
938
938
  label: f.label
939
939
  }, null, 8, ["value", "label"]))), 256))
@@ -970,14 +970,14 @@ const ke = (s) => {
970
970
  function C() {
971
971
  c.value && c.value.refresh();
972
972
  }
973
- function A() {
973
+ function k() {
974
974
  b("update:visible", !1), c.value.reset();
975
975
  }
976
976
  function V() {
977
977
  c.value.submit();
978
978
  }
979
979
  return a({
980
- close: A,
980
+ close: k,
981
981
  refresh: C
982
982
  }), (R, X) => {
983
983
  const P = y("el-button"), z = y("el-dialog");
@@ -985,7 +985,7 @@ const ke = (s) => {
985
985
  title: "Edit",
986
986
  "model-value": t.visible,
987
987
  width: "800px",
988
- onClose: A
988
+ onClose: k
989
989
  }, {
990
990
  footer: r(() => {
991
991
  var D;
@@ -993,7 +993,7 @@ const ke = (s) => {
993
993
  i("div", Mo, [
994
994
  i("div", Qo, [
995
995
  (n(!0), U(ee, null, se((D = t.model.formConfig) == null ? void 0 : D.dialogButtons, (O) => (n(), I(P, {
996
- onClick: (k) => O.function(c.value.formData)
996
+ onClick: (w) => O.function(c.value.formData)
997
997
  }, {
998
998
  default: r(() => [
999
999
  N(Q(v(g)(O.label)), 1)
@@ -1002,7 +1002,7 @@ const ke = (s) => {
1002
1002
  }, 1032, ["onClick"]))), 256))
1003
1003
  ]),
1004
1004
  i("div", null, [
1005
- d(P, { onClick: A }, {
1005
+ d(P, { onClick: k }, {
1006
1006
  default: r(() => [
1007
1007
  N(Q(v(g)("common.basic.cancel")), 1)
1008
1008
  ]),
@@ -1030,7 +1030,7 @@ const ke = (s) => {
1030
1030
  mode: t.mode,
1031
1031
  model: t.model,
1032
1032
  afterSubmitFunc: t.afterSubmitFunc,
1033
- closeDialogFunc: A
1033
+ closeDialogFunc: k
1034
1034
  }, null, 8, ["id", "sessionId", "mode", "model", "afterSubmitFunc"])
1035
1035
  ]),
1036
1036
  _: 1
@@ -1045,7 +1045,7 @@ const ke = (s) => {
1045
1045
  setup(s, { expose: a }) {
1046
1046
  const { t: o } = Me.global, g = s, t = le([]), e = le({
1047
1047
  showPane: !0
1048
- }), b = E(""), c = E(!0), C = E(!1), A = Be(), V = E(""), R = le([]), X = le([]), P = E(), z = E([]), D = E("create"), O = E(!0), k = E(!1), W = E(""), Y = le({
1048
+ }), b = E(""), c = E(!0), C = E(!1), k = Be(), V = E(""), R = le([]), X = le([]), P = E(), z = E([]), D = E("create"), O = E(!0), w = E(!1), W = E(""), Y = le({
1049
1049
  pageSize: 10,
1050
1050
  pageNo: 1,
1051
1051
  totalElements: 0
@@ -1103,14 +1103,14 @@ const ke = (s) => {
1103
1103
  }
1104
1104
  function G() {
1105
1105
  var l, f;
1106
- e.createPageRoutePath !== void 0 ? A.push(e.createPageRoutePath) : ((l = e.functions) == null ? void 0 : l.create) !== void 0 ? (f = e.functions) == null || f.create() : (D.value = "create", W.value = "", C.value = !0);
1106
+ e.createPageRoutePath !== void 0 ? k.push(e.createPageRoutePath) : ((l = e.functions) == null ? void 0 : l.create) !== void 0 ? (f = e.functions) == null || f.create() : (D.value = "create", W.value = "", C.value = !0);
1107
1107
  }
1108
1108
  function _(l, f) {
1109
1109
  g.model.api && ve(g.model.api, "DELETE", f.id).then(({ data: B }) => {
1110
1110
  B.code === 0 && (C.value = !1, h());
1111
1111
  });
1112
1112
  }
1113
- function w() {
1113
+ function A() {
1114
1114
  nt.confirm(
1115
1115
  "The selected items will be deleted. Continue?",
1116
1116
  o("common.table.warning"),
@@ -1141,7 +1141,7 @@ const ke = (s) => {
1141
1141
  Y.pageNo = l, h();
1142
1142
  }
1143
1143
  function F(l, f) {
1144
- e.editPageRoutePath !== void 0 ? A.push({
1144
+ e.editPageRoutePath !== void 0 ? k.push({
1145
1145
  path: e.editPageRoutePath,
1146
1146
  query: {
1147
1147
  id: f.id
@@ -1162,7 +1162,7 @@ const ke = (s) => {
1162
1162
  return l.label ? c.value ? o(l.label) : l.label : l.prop.slice(0, 1).toUpperCase() + l.prop.slice(1).toLowerCase();
1163
1163
  }
1164
1164
  function u(l) {
1165
- l ? (k.value = !0, X.splice(0, X.length, ...R), R.splice(0, R.length, ...z.value)) : (k.value = !1, R.splice(0, R.length, ...X));
1165
+ l ? (w.value = !0, X.splice(0, X.length, ...R), R.splice(0, R.length, ...z.value)) : (w.value = !1, R.splice(0, R.length, ...X));
1166
1166
  }
1167
1167
  return he(() => g.model, () => {
1168
1168
  h();
@@ -1214,7 +1214,7 @@ const ke = (s) => {
1214
1214
  disabled: z.value.length == 0,
1215
1215
  type: "danger",
1216
1216
  plain: "",
1217
- onClick: w
1217
+ onClick: A
1218
1218
  }, {
1219
1219
  default: r(() => {
1220
1220
  var te, J;
@@ -1393,7 +1393,7 @@ const ke = (s) => {
1393
1393
  }, 8, ["data"])), [
1394
1394
  [Ne, O.value]
1395
1395
  ]),
1396
- k.value ? K("", !0) : (n(), I(ye, {
1396
+ w.value ? K("", !0) : (n(), I(ye, {
1397
1397
  key: 0,
1398
1398
  size: "small",
1399
1399
  background: "",
@@ -1423,7 +1423,7 @@ const ke = (s) => {
1423
1423
  }, Do = { class: "icon-wrapper" }, To = { class: "info-wrapper" }, Ko = { class: "title-wrapper" }, Po = { class: "tabs-wrapper" }, Lo = { class: "dialog-footer" }, jo = /* @__PURE__ */ de({
1424
1424
  __name: "DetailPage",
1425
1425
  setup(s) {
1426
- const { t: a } = Ie(), o = _e(), g = Be(), t = xe(() => o.query.id), e = E(!1), b = E(!1), c = E("view"), C = E(), A = E(-1), V = E(), R = E(), X = E("summary"), P = E(""), z = E(""), D = E(""), O = E(0), k = le({
1426
+ const { t: a } = Ie(), o = _e(), g = Be(), t = xe(() => o.query.id), e = E(!1), b = E(!1), c = E("view"), C = E(), k = E(-1), V = E(), R = E(), X = E("summary"), P = E(""), z = E(""), D = E(""), O = E(0), w = le({
1427
1427
  api: "",
1428
1428
  fields: []
1429
1429
  }), W = le([]);
@@ -1432,29 +1432,29 @@ const ke = (s) => {
1432
1432
  () => g.currentRoute.value,
1433
1433
  ue
1434
1434
  ], () => {
1435
- T();
1435
+ w.api !== "" && T();
1436
1436
  }, {
1437
1437
  immediate: !0,
1438
1438
  deep: !0
1439
1439
  });
1440
1440
  function q(_) {
1441
- A.value = parseInt(_.index) - 1, console.log(W[A.value]);
1441
+ k.value = parseInt(_.index) - 1, console.log(W[k.value]);
1442
1442
  }
1443
1443
  function fe() {
1444
1444
  var M;
1445
- let _ = (M = Y[A.value].api) == null ? void 0 : M.replace("/select", "");
1445
+ let _ = (M = Y[k.value].api) == null ? void 0 : M.replace("/select", "");
1446
1446
  _ = _ == null ? void 0 : _.substring(_.lastIndexOf("/"));
1447
- const w = k.api + "/" + t.value + _, x = R.value.multipleSelection.map((F) => F.id);
1448
- ve(w, "POST", x).then(() => {
1447
+ const A = w.api + "/" + t.value + _, x = R.value.multipleSelection.map((F) => F.id);
1448
+ ve(A, "POST", x).then(() => {
1449
1449
  V.value.refresh(), b.value = !1;
1450
1450
  });
1451
1451
  }
1452
- function m(_, w, x) {
1452
+ function m(_, A, x) {
1453
1453
  var L;
1454
1454
  x.functions || (x.functions = {}), x.functions.create = () => {
1455
1455
  b.value = !0, R.value && R.value.refresh();
1456
1456
  };
1457
- let M = Ce(w);
1457
+ let M = Ce(A);
1458
1458
  M.tableConfig || (M.tableConfig = {}), M.tableConfig.selectMode = !0, M.tableConfig.queryParams = {}, _.queryParamName && (M.tableConfig.queryParams[_.queryParamName] = t.value);
1459
1459
  for (var F in M.fields)
1460
1460
  M.fields[F].tableColumnAttributes && (L = M.fields[F].tableColumnAttributes) != null && L.link && (M.fields[F].tableColumnAttributes.link = !1);
@@ -1463,9 +1463,9 @@ const ke = (s) => {
1463
1463
  delete: "common.table.remove"
1464
1464
  }, x.functions.batchDelete = (p) => {
1465
1465
  var f;
1466
- let S = (f = Y[A.value].api) == null ? void 0 : f.replace("/select", "");
1466
+ let S = (f = Y[k.value].api) == null ? void 0 : f.replace("/select", "");
1467
1467
  S = S == null ? void 0 : S.substring(S.lastIndexOf("/"));
1468
- const u = k.api + "/" + t.value + S, l = p.map((B) => B.id);
1468
+ const u = w.api + "/" + t.value + S, l = p.map((B) => B.id);
1469
1469
  ie.delete(`${u}/${l.join(",")}`).then(({ data: B }) => {
1470
1470
  B.code === 0 && V.value.refresh();
1471
1471
  });
@@ -1475,9 +1475,9 @@ const ke = (s) => {
1475
1475
  functions: {
1476
1476
  click: (p, S) => {
1477
1477
  var f;
1478
- let u = (f = Y[A.value].api) == null ? void 0 : f.replace("/select", "");
1478
+ let u = (f = Y[k.value].api) == null ? void 0 : f.replace("/select", "");
1479
1479
  u = u == null ? void 0 : u.substring(u.lastIndexOf("/"));
1480
- const l = k.api + "/" + t.value + u;
1480
+ const l = w.api + "/" + t.value + u;
1481
1481
  ve(l, "DELETE", S.id).then(() => {
1482
1482
  V.value.refresh();
1483
1483
  });
@@ -1492,10 +1492,10 @@ const ke = (s) => {
1492
1492
  const _ = o.params.model;
1493
1493
  if (ue.value[_] === void 0)
1494
1494
  return;
1495
- ke(k);
1496
- const w = Ce(ue.value[_]);
1497
- Object.assign(k, w), A.value = -1, X.value = "summary";
1498
- const x = (F = (M = k.pageConfig) == null ? void 0 : M.detailPage) == null ? void 0 : F.tabs;
1495
+ ke(w);
1496
+ const A = Ce(ue.value[_]);
1497
+ Object.assign(w, A), k.value = -1, X.value = "summary";
1498
+ const x = (F = (M = w.pageConfig) == null ? void 0 : M.detailPage) == null ? void 0 : F.tabs;
1499
1499
  if (x)
1500
1500
  for (let p of x) {
1501
1501
  const S = Ce(ue.value[p.modelKey]);
@@ -1517,8 +1517,8 @@ const ke = (s) => {
1517
1517
  he(
1518
1518
  [
1519
1519
  () => {
1520
- var _, w;
1521
- return (w = (_ = k.pageConfig) == null ? void 0 : _.detailPage) == null ? void 0 : w.infoCard;
1520
+ var _, A;
1521
+ return (A = (_ = w.pageConfig) == null ? void 0 : _.detailPage) == null ? void 0 : A.infoCard;
1522
1522
  },
1523
1523
  () => {
1524
1524
  var _;
@@ -1528,10 +1528,10 @@ const ke = (s) => {
1528
1528
  (_) => {
1529
1529
  De(() => {
1530
1530
  var x, M, F;
1531
- const w = (M = (x = k.pageConfig) == null ? void 0 : x.detailPage) == null ? void 0 : M.infoCard;
1532
- w && (P.value = w.titleFieldProp ? C.value.formData[w.titleFieldProp] : "", z.value = w.subtitleFieldProp ? C.value.formData[w.subtitleFieldProp] : "", D.value = w.tagFieldProp ? C.value.formData[w.tagFieldProp] : "", (F = k.fields) == null || F.forEach((L) => {
1531
+ const A = (M = (x = w.pageConfig) == null ? void 0 : x.detailPage) == null ? void 0 : M.infoCard;
1532
+ A && (P.value = A.titleFieldProp ? C.value.formData[A.titleFieldProp] : "", z.value = A.subtitleFieldProp ? C.value.formData[A.subtitleFieldProp] : "", D.value = A.tagFieldProp ? C.value.formData[A.tagFieldProp] : "", (F = w.fields) == null || F.forEach((L) => {
1533
1533
  var p, S;
1534
- if (L.prop === w.tagFieldProp) {
1534
+ if (L.prop === A.tagFieldProp) {
1535
1535
  const u = (S = (p = L.tableColumnAttributes) == null ? void 0 : p.functions) == null ? void 0 : S.transformValue;
1536
1536
  u && (D.value = u(D.value));
1537
1537
  }
@@ -1549,7 +1549,7 @@ const ke = (s) => {
1549
1549
  function G() {
1550
1550
  C.value.refresh();
1551
1551
  }
1552
- return (_, w) => {
1552
+ return (_, A) => {
1553
1553
  var H, oe, ce, ae, ne, $;
1554
1554
  const x = y("el-breadcrumb-item"), M = y("el-breadcrumb"), F = y("el-button"), L = y("el-icon"), p = y("el-dropdown-item"), S = y("el-dropdown-menu"), u = y("el-dropdown"), l = y("el-tag"), f = y("el-tab-pane"), B = y("el-tabs"), Z = y("el-dialog");
1555
1555
  return n(), U(ee, null, [
@@ -1559,12 +1559,12 @@ const ke = (s) => {
1559
1559
  var j, pe;
1560
1560
  return [
1561
1561
  d(x, {
1562
- to: { path: `/${(pe = (j = k == null ? void 0 : k.breadcrumbRoute) != null ? j : k == null ? void 0 : k.route) != null ? pe : ""}` }
1562
+ to: { path: `/${(pe = (j = w == null ? void 0 : w.breadcrumbRoute) != null ? j : w == null ? void 0 : w.route) != null ? pe : ""}` }
1563
1563
  }, {
1564
1564
  default: r(() => {
1565
1565
  var me;
1566
1566
  return [
1567
- N(Q(v(a)((me = k == null ? void 0 : k.name) != null ? me : "")), 1)
1567
+ N(Q(v(a)((me = w == null ? void 0 : w.name) != null ? me : "")), 1)
1568
1568
  ];
1569
1569
  }),
1570
1570
  _: 1
@@ -1599,13 +1599,13 @@ const ke = (s) => {
1599
1599
  ]),
1600
1600
  _: 1
1601
1601
  }),
1602
- ((oe = (H = k.pageConfig) == null ? void 0 : H.detailPage) == null ? void 0 : oe.operationButtons) !== void 0 ? (n(), I(u, { key: 0 }, {
1602
+ ((oe = (H = w.pageConfig) == null ? void 0 : H.detailPage) == null ? void 0 : oe.operationButtons) !== void 0 ? (n(), I(u, { key: 0 }, {
1603
1603
  dropdown: r(() => [
1604
1604
  d(S, null, {
1605
1605
  default: r(() => {
1606
1606
  var j, pe;
1607
1607
  return [
1608
- (n(!0), U(ee, null, se((pe = (j = k.pageConfig) == null ? void 0 : j.detailPage) == null ? void 0 : pe.operationButtons, (me) => (n(), I(p, {
1608
+ (n(!0), U(ee, null, se((pe = (j = w.pageConfig) == null ? void 0 : j.detailPage) == null ? void 0 : pe.operationButtons, (me) => (n(), I(p, {
1609
1609
  onClick: (ye) => me.function(C.value.formData)
1610
1610
  }, {
1611
1611
  default: r(() => [
@@ -1640,9 +1640,9 @@ const ke = (s) => {
1640
1640
  }, null, 8, ["icon"])
1641
1641
  ])
1642
1642
  ]),
1643
- (ae = (ce = k.pageConfig) == null ? void 0 : ce.detailPage) != null && ae.infoCard ? (n(), U("div", Vo, [
1643
+ (ae = (ce = w.pageConfig) == null ? void 0 : ce.detailPage) != null && ae.infoCard ? (n(), U("div", Vo, [
1644
1644
  i("div", Do, [
1645
- (n(), I(Se((ne = k.pageConfig.detailPage.infoCard.icon) != null ? ne : ""), { class: "icon" }))
1645
+ (n(), I(Se((ne = w.pageConfig.detailPage.infoCard.icon) != null ? ne : ""), { class: "icon" }))
1646
1646
  ]),
1647
1647
  i("div", To, [
1648
1648
  i("div", Ko, [
@@ -1663,7 +1663,7 @@ const ke = (s) => {
1663
1663
  i("div", Po, [
1664
1664
  d(B, {
1665
1665
  modelValue: X.value,
1666
- "onUpdate:modelValue": w[0] || (w[0] = (j) => X.value = j),
1666
+ "onUpdate:modelValue": A[0] || (A[0] = (j) => X.value = j),
1667
1667
  onTabClick: q
1668
1668
  }, {
1669
1669
  default: r(() => {
@@ -1680,12 +1680,12 @@ const ke = (s) => {
1680
1680
  id: t.value,
1681
1681
  sessionId: O.value,
1682
1682
  mode: c.value,
1683
- model: k
1683
+ model: w
1684
1684
  }, null, 8, ["id", "sessionId", "mode", "model"])
1685
1685
  ]),
1686
1686
  _: 1
1687
1687
  }, 8, ["label"]),
1688
- (n(!0), U(ee, null, se((pe = (j = k.pageConfig) == null ? void 0 : j.detailPage) == null ? void 0 : pe.tabs, (me) => {
1688
+ (n(!0), U(ee, null, se((pe = (j = w.pageConfig) == null ? void 0 : j.detailPage) == null ? void 0 : pe.tabs, (me) => {
1689
1689
  var ye;
1690
1690
  return n(), I(f, {
1691
1691
  label: v(a)((ye = me.name) != null ? ye : "")
@@ -1695,22 +1695,22 @@ const ke = (s) => {
1695
1695
  }),
1696
1696
  _: 1
1697
1697
  }, 8, ["modelValue"]),
1698
- A.value >= 0 ? (n(), I(Qe, {
1698
+ k.value >= 0 ? (n(), I(Qe, {
1699
1699
  key: 0,
1700
1700
  ref_key: "tabPaneTableRef",
1701
1701
  ref: V,
1702
- model: W[A.value]
1702
+ model: W[k.value]
1703
1703
  }, null, 8, ["model"])) : K("", !0),
1704
1704
  d(Z, {
1705
1705
  modelValue: b.value,
1706
- "onUpdate:modelValue": w[2] || (w[2] = (j) => b.value = j),
1706
+ "onUpdate:modelValue": A[2] || (A[2] = (j) => b.value = j),
1707
1707
  title: v(a)("common.table.select"),
1708
1708
  width: "800px"
1709
1709
  }, {
1710
1710
  footer: r(() => [
1711
1711
  i("span", Lo, [
1712
1712
  d(F, {
1713
- onClick: w[1] || (w[1] = (j) => b.value = !1)
1713
+ onClick: A[1] || (A[1] = (j) => b.value = !1)
1714
1714
  }, {
1715
1715
  default: r(() => [
1716
1716
  N(Q(v(a)("common.basic.cancel")), 1)
@@ -1729,11 +1729,11 @@ const ke = (s) => {
1729
1729
  ])
1730
1730
  ]),
1731
1731
  default: r(() => [
1732
- A.value >= 0 ? (n(), I(Qe, {
1732
+ k.value >= 0 ? (n(), I(Qe, {
1733
1733
  key: 0,
1734
1734
  ref_key: "selectTableRef",
1735
1735
  ref: R,
1736
- model: v(Y)[A.value]
1736
+ model: v(Y)[k.value]
1737
1737
  }, null, 8, ["model"])) : K("", !0)
1738
1738
  ]),
1739
1739
  _: 1
@@ -1743,14 +1743,14 @@ const ke = (s) => {
1743
1743
  id: t.value,
1744
1744
  mode: "update",
1745
1745
  visible: e.value,
1746
- "onUpdate:visible": w[3] || (w[3] = (j) => e.value = j),
1747
- model: k,
1746
+ "onUpdate:visible": A[3] || (A[3] = (j) => e.value = j),
1747
+ model: w,
1748
1748
  afterSubmitFunc: G
1749
1749
  }, null, 8, ["id", "visible", "model"])
1750
1750
  ], 64);
1751
1751
  };
1752
1752
  }
1753
- }), Xo = /* @__PURE__ */ re(jo, [["__scopeId", "data-v-04564673"]]), Yo = { class: "page-title" }, qo = /* @__PURE__ */ de({
1753
+ }), Xo = /* @__PURE__ */ re(jo, [["__scopeId", "data-v-fd204ca6"]]), Yo = { class: "page-title" }, qo = /* @__PURE__ */ de({
1754
1754
  __name: "TablePage",
1755
1755
  setup(s) {
1756
1756
  const { t: a } = Ie(), o = _e(), g = Be(), t = E(), e = E([]), b = le({
@@ -1770,7 +1770,7 @@ const ke = (s) => {
1770
1770
  };
1771
1771
  }));
1772
1772
  }
1773
- function A() {
1773
+ function k() {
1774
1774
  var X, P;
1775
1775
  console.log("Init table page, loading model:", o.params.model), console.log("Current model list", ue.value);
1776
1776
  const V = o.params.model;
@@ -1786,7 +1786,7 @@ const ke = (s) => {
1786
1786
  () => g.currentRoute.value,
1787
1787
  ue
1788
1788
  ], () => {
1789
- A();
1789
+ k();
1790
1790
  }, {
1791
1791
  immediate: !0,
1792
1792
  deep: !0