@okiss/oms 0.0.53 → 0.0.55

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/dist/index.es.js CHANGED
@@ -1,8 +1,8 @@
1
1
  var At = Object.defineProperty;
2
2
  var Pt = (e, t, l) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l;
3
3
  var R = (e, t, l) => (Pt(e, typeof t != "symbol" ? t + "" : t, l), l);
4
- import { defineComponent as q, onBeforeMount as ze, provide as Rt, resolveComponent as w, openBlock as i, createBlock as f, createVNode as p, computed as M, createTextVNode as S, withCtx as c, TransitionGroup as Lt, createElementBlock as h, Fragment as I, renderList as O, toDisplayString as B, normalizeClass as H, renderSlot as le, mergeProps as F, createCommentVNode as E, toRefs as Mt, ref as D, normalizeStyle as Dt, createElementVNode as b, Transition as jt, pushScopeId as Ke, popScopeId as We, resolveDynamicComponent as Xe, normalizeProps as G, guardReactiveProps as Y, unref as x, withDirectives as ie, vModelText as he, onMounted as Ze, onUnmounted as Nt, resolveDirective as Vt, isRef as qt, getCurrentInstance as Ut, h as Ht, toRaw as Ft, createApp as Gt } from "vue";
5
- import { addNewStyle as Jt, addNewStyleTag as zt, queryParams as Kt, logGroup as Wt, compactObject as Qe, showEleByClassName as Ye, waterMarker as Xt, Cache as be, isExternal as Ve, getQueryParam as et, createIFrame as Zt, strVarReplace as Z, obj2Param as Qt, isObject as Q, isString as Ie, effectDataTrans as Yt, isArray as tt } from "@okiss/utils";
4
+ import { defineComponent as q, onBeforeMount as ze, provide as Rt, resolveComponent as w, openBlock as i, createBlock as f, createVNode as p, computed as M, createTextVNode as S, withCtx as c, TransitionGroup as Lt, createElementBlock as h, Fragment as I, renderList as O, toDisplayString as B, normalizeClass as H, renderSlot as le, mergeProps as F, createCommentVNode as E, toRefs as Mt, ref as D, normalizeStyle as Dt, createElementVNode as b, Transition as jt, pushScopeId as Ke, popScopeId as We, resolveDynamicComponent as Xe, normalizeProps as G, guardReactiveProps as Y, unref as x, withDirectives as ie, vModelText as be, onMounted as Ze, onUnmounted as Nt, resolveDirective as Vt, isRef as qt, getCurrentInstance as Ut, h as Ht, toRaw as Ft, createApp as Gt } from "vue";
5
+ import { addNewStyle as Jt, addNewStyleTag as zt, queryParams as Kt, logGroup as Wt, compactObject as Qe, showEleByClassName as Ye, waterMarker as Xt, Cache as re, isExternal as Ve, getQueryParam as et, createIFrame as Zt, strVarReplace as Z, obj2Param as Qt, isObject as Q, isString as Ie, effectDataTrans as Yt, isArray as tt } from "@okiss/utils";
6
6
  import _e from "mockjs";
7
7
  import el, { cloneDeep as v, merge as A, get as ne, unset as lt, isObject as tl } from "lodash";
8
8
  import nt from "element-plus/lib/locale/lang/zh-cn";
@@ -12,8 +12,8 @@ import { createStore as ll, useStore as ot, mapGetters as Ce } from "vuex";
12
12
  import nl, { ElMessage as ol, ElMessageBox as at, ElCard as al, ElRow as sl, ElCol as il } from "element-plus";
13
13
  import "element-plus/dist/index.css";
14
14
  import "dayjs/locale/zh-cn";
15
- import { useRoute as pe, onBeforeRouteLeave as rl, useRouter as st, createRouter as cl, createWebHashHistory as ul, onBeforeRouteUpdate as pl } from "vue-router";
16
- import { ElBreadcrumbItem as dl, ElBreadcrumb as ml, ElRow as ae, ElMain as fl, ElAside as hl, ElContainer as bl, ElDivider as it, ElButton as ue, ElOption as Te, ElSelect as Be, ElFormItem as rt, ElForm as ct, ElCol as de, ElDrawer as ut, ElDropdownItem as _l, ElDropdownMenu as yl, ElDropdown as vl, ElMenuItem as gl, ElSubMenu as kl, ElOptionGroup as wl, ElMenu as Sl, ElScrollbar as xl, ElBacktop as El, ElMessage as Il, ElAlert as Oe, ElTree as $l, ElCard as Ae } from "element-plus/es";
15
+ import { useRoute as de, onBeforeRouteLeave as rl, useRouter as st, createRouter as cl, createWebHashHistory as ul, onBeforeRouteUpdate as pl } from "vue-router";
16
+ import { ElBreadcrumbItem as dl, ElBreadcrumb as ml, ElRow as ae, ElMain as fl, ElAside as hl, ElContainer as bl, ElDivider as it, ElButton as pe, ElOption as Te, ElSelect as Be, ElFormItem as rt, ElForm as ct, ElCol as me, ElDrawer as ut, ElDropdownItem as _l, ElDropdownMenu as yl, ElDropdown as vl, ElMenuItem as gl, ElSubMenu as kl, ElOptionGroup as wl, ElMenu as Sl, ElScrollbar as xl, ElBacktop as El, ElMessage as Il, ElAlert as Oe, ElTree as $l, ElCard as Ae } from "element-plus/es";
17
17
  import "element-plus/es/components/base/style/css";
18
18
  import "element-plus/es/components/row/style/css";
19
19
  import "element-plus/es/components/drawer/style/css";
@@ -752,7 +752,7 @@ const Dl = {
752
752
  serviceOffLineNotice: "当前页面功能正在维护, 请稍后再试~~~",
753
753
  formMutex: !0,
754
754
  captcha: !0
755
- }, me = {
755
+ }, fe = {
756
756
  axios: Gl,
757
757
  settings: pt,
758
758
  plugins: [],
@@ -767,7 +767,7 @@ function dt(e) {
767
767
  dt(Fl);
768
768
  function mt(e) {
769
769
  var o;
770
- let t = e.url, l = e.baseURL || ((o = me.axios) == null ? void 0 : o.baseURL);
770
+ let t = e.url, l = e.baseURL || ((o = fe.axios) == null ? void 0 : o.baseURL);
771
771
  return l || (l = ""), typeof t == "string" ? (t = ("/" + l + t).split("/").filter((n) => n).join("/"), t += "(|\\?.*)$", new RegExp(t)) : t;
772
772
  }
773
773
  function Jl() {
@@ -1023,7 +1023,7 @@ const Kl = {
1023
1023
  app: Yl,
1024
1024
  builderSchema: tn
1025
1025
  }
1026
- }), ln = ol, Ue = at, nn = $e.CancelToken, re = {
1026
+ }), ln = ol, Ue = at, nn = $e.CancelToken, ce = {
1027
1027
  taskList: {},
1028
1028
  cacheList: /* @__PURE__ */ new Map(),
1029
1029
  uniqueId(e) {
@@ -1061,8 +1061,8 @@ const Kl = {
1061
1061
  }
1062
1062
  }, on = {
1063
1063
  onFulfilled: function(e) {
1064
- return e.cacheEnable === !1 || (re.pending(e) && re.delTask(e), e.cancelToken = new nn((t) => {
1065
- re.addTask(e, t);
1064
+ return e.cacheEnable === !1 || (ce.pending(e) && ce.delTask(e), e.cancelToken = new nn((t) => {
1065
+ ce.addTask(e, t);
1066
1066
  })), e;
1067
1067
  },
1068
1068
  onRejected(e) {
@@ -1070,7 +1070,7 @@ const Kl = {
1070
1070
  }
1071
1071
  }, an = {
1072
1072
  onFulfilled: function(e) {
1073
- return e.config.cacheEnable === !1 || e.config.method === "get" && Object.keys(e.data).length > 0 && re.addCache(e.config, e.data), e;
1073
+ return e.config.cacheEnable === !1 || e.config.method === "get" && Object.keys(e.data).length > 0 && ce.addCache(e.config, e.data), e;
1074
1074
  },
1075
1075
  onRejected(e) {
1076
1076
  return Promise.reject(e);
@@ -2104,7 +2104,7 @@ const Rn = {
2104
2104
  }
2105
2105
  };
2106
2106
  function Mn(e, t, l, o, n, a) {
2107
- const s = w("v-form"), r = it, d = ue, u = w("JsonView"), m = w("VButton"), _ = Te, k = Be, y = rt, J = ct, U = w("dev-layout");
2107
+ const s = w("v-form"), r = it, d = pe, u = w("JsonView"), m = w("VButton"), _ = Te, k = Be, y = rt, J = ct, U = w("dev-layout");
2108
2108
  return i(), f(U, null, {
2109
2109
  main: c(() => [
2110
2110
  n.builderSchema.formItems ? (i(), f(s, F({
@@ -3050,7 +3050,7 @@ const lo = {
3050
3050
  }
3051
3051
  };
3052
3052
  function no(e, t, l, o, n, a) {
3053
- const s = de, r = ue, d = ae, u = w("v-table"), m = it, _ = ue, k = w("JsonView"), y = w("VButton"), J = Te, U = Be, T = rt, X = ct, Bt = w("v-form"), Ot = w("dev-layout");
3053
+ const s = me, r = pe, d = ae, u = w("v-table"), m = it, _ = pe, k = w("JsonView"), y = w("VButton"), J = Te, U = Be, T = rt, X = ct, Bt = w("v-form"), Ot = w("dev-layout");
3054
3054
  return i(), f(Ot, null, {
3055
3055
  "left-aside": c(() => [
3056
3056
  p(d, { style: { width: "200px" } }, {
@@ -3126,7 +3126,7 @@ function no(e, t, l, o, n, a) {
3126
3126
  default: c(() => [
3127
3127
  p(r, {
3128
3128
  class: "ctrl-btn",
3129
- onClick: (fe) => a.pushHeaders(n.ctrlMap.headers[C].type)
3129
+ onClick: (he) => a.pushHeaders(n.ctrlMap.headers[C].type)
3130
3130
  }, {
3131
3131
  default: c(() => [
3132
3132
  S(B(n.ctrlMap.headers[C].name), 1)
@@ -3154,7 +3154,7 @@ function no(e, t, l, o, n, a) {
3154
3154
  default: c(() => [
3155
3155
  p(r, {
3156
3156
  class: "ctrl-btn",
3157
- onClick: (fe) => a.pushRowButton(n.ctrlMap.buttons[C].type)
3157
+ onClick: (he) => a.pushRowButton(n.ctrlMap.buttons[C].type)
3158
3158
  }, {
3159
3159
  default: c(() => [
3160
3160
  S(B(n.ctrlMap.buttons[C].name), 1)
@@ -3182,7 +3182,7 @@ function no(e, t, l, o, n, a) {
3182
3182
  default: c(() => [
3183
3183
  p(r, {
3184
3184
  class: "ctrl-btn",
3185
- onClick: (fe) => a.pushNormalButton(n.ctrlMap.buttons[C].type)
3185
+ onClick: (he) => a.pushNormalButton(n.ctrlMap.buttons[C].type)
3186
3186
  }, {
3187
3187
  default: c(() => [
3188
3188
  S(B(n.ctrlMap.buttons[C].name), 1)
@@ -3221,7 +3221,7 @@ function no(e, t, l, o, n, a) {
3221
3221
  default: c(() => [
3222
3222
  p(r, {
3223
3223
  class: "ctrl-btn",
3224
- onClick: (fe) => a.pushBatchButton(n.ctrlMap.buttons[C].type)
3224
+ onClick: (he) => a.pushBatchButton(n.ctrlMap.buttons[C].type)
3225
3225
  }, {
3226
3226
  default: c(() => [
3227
3227
  S(B(n.ctrlMap.buttons[C].name), 1)
@@ -3313,7 +3313,7 @@ const oo = /* @__PURE__ */ $(lo, [["render", no], ["__scopeId", "data-v-e5209cb7
3313
3313
  name: "PageEditor",
3314
3314
  components: { FormBuilder: Dn, TableBuilder: oo },
3315
3315
  setup() {
3316
- const e = D(!1), t = D(1), l = "rtl", o = pe(), n = M(() => g.state.app.pages[o.path]);
3316
+ const e = D(!1), t = D(1), l = "rtl", o = de(), n = M(() => g.state.app.pages[o.path]);
3317
3317
  return { show: e, key: t, direction: l, pageSchema: n };
3318
3318
  }
3319
3319
  };
@@ -3418,11 +3418,11 @@ const ro = {
3418
3418
  },
3419
3419
  showNotice(e) {
3420
3420
  const t = "dismiss:navbar_notice";
3421
- return be.exist(t) ? be.get(t) !== e : !0;
3421
+ return re.exist(t) ? re.get(t) !== e : !0;
3422
3422
  },
3423
3423
  closeNotice(e) {
3424
3424
  const t = "dismiss:navbar_notice";
3425
- be.set(t, e);
3425
+ re.set(t, e);
3426
3426
  },
3427
3427
  gotoMenuEdit() {
3428
3428
  var e, t, l, o;
@@ -3437,7 +3437,7 @@ const ro = {
3437
3437
  style: { padding: "0" }
3438
3438
  }, fo = { class: "user-info" }, ho = ["src"], bo = { class: "user-name" };
3439
3439
  function _o(e, t, l, o, n, a) {
3440
- const s = w("hamburger"), r = w("breadcrumb"), d = de, u = w("VIcon"), m = w("PageEditor"), _ = w("v-button"), k = _l, y = yl, J = vl, U = ut, T = ae;
3440
+ const s = w("hamburger"), r = w("breadcrumb"), d = me, u = w("VIcon"), m = w("PageEditor"), _ = w("v-button"), k = _l, y = yl, J = vl, U = ut, T = ae;
3441
3441
  return i(), f(T, {
3442
3442
  ref: "header",
3443
3443
  class: "navbar",
@@ -3697,7 +3697,8 @@ const Bo = /* @__PURE__ */ $(Co, [["render", To]]), Oo = {
3697
3697
  methods: {
3698
3698
  getTo(e) {
3699
3699
  try {
3700
- return this.$router.resolve(e.redirect ? e.redirect : e).fullPath;
3700
+ const t = this.$router.resolve(e.redirect ? e.redirect : e);
3701
+ return re.remove("table_filter:" + t.path), t.fullPath;
3701
3702
  } catch {
3702
3703
  return console.error("路由解析错误"), "/";
3703
3704
  }
@@ -3944,7 +3945,7 @@ const Ho = /* @__PURE__ */ $(qo, [["render", Uo], ["__scopeId", "data-v-d252f828
3944
3945
  const Fo = { class: "app-main" }, Go = {
3945
3946
  __name: "AppMain",
3946
3947
  setup(e) {
3947
- const t = pe(), l = [], o = D(0);
3948
+ const t = de(), l = [], o = D(0);
3948
3949
  return rl(() => {
3949
3950
  var n;
3950
3951
  (n = t.meta) != null && n.keepAlive && l.indexOf(t.name) && l.push(t.name), o.value++;
@@ -4002,7 +4003,7 @@ const zo = { class: "main-container" }, Ko = 992, Wo = {
4002
4003
  }, ea = ["src"], ta = { class: "tips" }, la = { class: "sso" }, na = /* @__PURE__ */ b("div", { id: "sso-qrcode" }, null, -1), oa = /* @__PURE__ */ q({
4003
4004
  __name: "login",
4004
4005
  setup(e) {
4005
- const t = st(), l = pe(), o = M(() => g.state.settings.loginTips), n = M(() => g.state.settings.captcha), a = M(() => (g.state.app, g.state.app.baseURL)), s = D(0), r = () => s.value++, d = M(() => u.value.username.length > 0 && u.value.password.length >= 4 && (n.value ? u.value.captcha.length === 4 : !0)), u = D({
4006
+ const t = st(), l = de(), o = M(() => g.state.settings.loginTips), n = M(() => g.state.settings.captcha), a = M(() => (g.state.app, g.state.app.baseURL)), s = D(0), r = () => s.value++, d = M(() => u.value.username.length > 0 && u.value.password.length >= 4 && (n.value ? u.value.captcha.length === 4 : !0)), u = D({
4006
4007
  username: "",
4007
4008
  password: "",
4008
4009
  captcha: "",
@@ -4028,7 +4029,7 @@ const zo = { class: "main-container" }, Ko = 992, Wo = {
4028
4029
  placeholder: "用户名",
4029
4030
  class: "input"
4030
4031
  }, null, 512), [
4031
- [he, x(u).username]
4032
+ [be, x(u).username]
4032
4033
  ]),
4033
4034
  ie(b("input", {
4034
4035
  "onUpdate:modelValue": k[1] || (k[1] = (y) => x(u).password = y),
@@ -4036,7 +4037,7 @@ const zo = { class: "main-container" }, Ko = 992, Wo = {
4036
4037
  placeholder: "密码",
4037
4038
  class: "input"
4038
4039
  }, null, 512), [
4039
- [he, x(u).password]
4040
+ [be, x(u).password]
4040
4041
  ]),
4041
4042
  n.value ? (i(), h("div", Yo, [
4042
4043
  ie(b("input", {
@@ -4045,7 +4046,7 @@ const zo = { class: "main-container" }, Ko = 992, Wo = {
4045
4046
  placeholder: "验证码",
4046
4047
  class: "input-captcha"
4047
4048
  }, null, 512), [
4048
- [he, x(u).captcha]
4049
+ [be, x(u).captcha]
4049
4050
  ]),
4050
4051
  b("img", {
4051
4052
  class: "captcha-img",
@@ -4440,7 +4441,7 @@ const se = /* @__PURE__ */ $($a, [["render", Ta], ["__scopeId", "data-v-4965a709
4440
4441
  }, xe = {
4441
4442
  __name: "form",
4442
4443
  setup(e) {
4443
- const t = pe(), l = st(), o = (r, d) => {
4444
+ const t = de(), l = st(), o = (r, d) => {
4444
4445
  const u = Object.keys(z.props);
4445
4446
  return Object.keys(r).forEach((m) => {
4446
4447
  if (u.indexOf(m) === -1) {
@@ -4637,7 +4638,7 @@ const Oa = { class: "card-header" }, Aa = /* @__PURE__ */ b("span", null, "列
4637
4638
  style: { color: "#E6A23C" }
4638
4639
  }, Ma = { class: "card-header" };
4639
4640
  function Da(e, t, l, o, n, a) {
4640
- const s = ue, r = $l, d = Ae, u = de, m = w("v-form"), _ = ae;
4641
+ const s = pe, r = $l, d = Ae, u = me, m = w("v-form"), _ = ae;
4641
4642
  return i(), f(_, {
4642
4643
  class: "tree-box",
4643
4644
  gutter: 20
@@ -4972,7 +4973,7 @@ const Wa = /* @__PURE__ */ $(za, [["render", Ka], ["__scopeId", "data-v-a5a65cc1
4972
4973
  });
4973
4974
  };
4974
4975
  return (m, _) => {
4975
- const k = Ae, y = de, J = Oe, U = ae;
4976
+ const k = Ae, y = me, J = Oe, U = ae;
4976
4977
  return i(), f(U, null, {
4977
4978
  default: c(() => [
4978
4979
  x(s).length > 0 ? (i(), f(y, {
@@ -5391,7 +5392,7 @@ const ms = {
5391
5392
  }
5392
5393
  ];
5393
5394
  function Ne(e = {}) {
5394
- const t = me.axios || {}, l = A(t, e || {}), o = $e.create({
5395
+ const t = fe.axios || {}, l = A(t, e || {}), o = $e.create({
5395
5396
  ...l
5396
5397
  // adapter: (c) => cacheAdapter(c, defaultAxios)
5397
5398
  });
@@ -5458,15 +5459,15 @@ const vs = {
5458
5459
  resize: ys,
5459
5460
  rightClick: _s
5460
5461
  }, Symbol.toStringTag, { value: "Module" }));
5461
- let ce;
5462
+ let ue;
5462
5463
  function Ti(e) {
5463
- return e ? Ne(A(me.axios, e)) : ce;
5464
+ return e ? Ne(A(fe.axios, e)) : ue;
5464
5465
  }
5465
5466
  function Bi(e) {
5466
- const t = A(me, e), l = Gt(Ml), o = $s(t), n = t.plugins || [];
5467
+ const t = A(fe, e), l = Gt(Ml), o = $s(t), n = t.plugins || [];
5467
5468
  n.unshift(o), n.forEach((a) => {
5468
5469
  Is(l, a);
5469
- }), t != null && t.mock && Jl(), ce = Ne(t.axios), g.dispatch("setHttp", ce).then(), g.dispatch("settings/updateSettings", e == null ? void 0 : e.settings).then(), g.dispatch("app/setBaseAPI", t == null ? void 0 : t.axios.baseURL).then(), l.config.globalProperties.$http = ce, l.config.globalProperties.$router = K, window.App = l, window.OmsOptions = t, Bl(() => ({
5470
+ }), t != null && t.mock && Jl(), ue = Ne(t.axios), g.dispatch("setHttp", ue).then(), g.dispatch("settings/updateSettings", e == null ? void 0 : e.settings).then(), g.dispatch("app/setBaseAPI", t == null ? void 0 : t.axios.baseURL).then(), l.config.globalProperties.$http = ue, l.config.globalProperties.$router = K, window.App = l, window.OmsOptions = t, Bl(() => ({
5470
5471
  "X-Token": Me()
5471
5472
  })), K.isReady().then(() => l.mount("#app"));
5472
5473
  }
@@ -5529,7 +5530,7 @@ export {
5529
5530
  Bi as createAdmin,
5530
5531
  W as eventBus,
5531
5532
  sn as getCmp,
5532
- ce as http,
5533
+ ue as http,
5533
5534
  Ne as instance,
5534
5535
  Ci as regViews,
5535
5536
  Ei as setCmp,