yahee-components 0.0.12 → 0.0.13

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/es/api/tool.js CHANGED
@@ -7,11 +7,10 @@ import "element-plus/theme-chalk/src/button.scss";
7
7
  import "element-plus/theme-chalk/src/input.scss";
8
8
  import "element-plus/theme-chalk/src/overlay.scss";
9
9
  import { AxiosHeaders as l } from "../node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js";
10
- const i = "https://plmerp.yaheecloud.com/api/plm/product-dev/", N = (e) => ({
10
+ const w = (e) => ({
11
11
  ...e,
12
- baseURL: i,
13
12
  timeout: 2e4
14
- }), R = (e) => {
13
+ }), N = (e) => {
15
14
  const o = new l(e.headers);
16
15
  return {
17
16
  ...e,
@@ -19,7 +18,7 @@ const i = "https://plmerp.yaheecloud.com/api/plm/product-dev/", N = (e) => ({
19
18
  };
20
19
  };
21
20
  let t = !1;
22
- const U = (e) => {
21
+ const R = (e) => {
23
22
  const o = {
24
23
  400: "错误的请求",
25
24
  // token 失效
@@ -48,7 +47,7 @@ const U = (e) => {
48
47
  }
49
48
  };
50
49
  var a = /* @__PURE__ */ ((e) => (e[e.AuthInvalid = 10031] = "AuthInvalid", e[e.AuthTooLong = 10032] = "AuthTooLong", e[e.UserHasNoRole = 10033] = "UserHasNoRole", e[e.UserNotRegistered = 10034] = "UserNotRegistered", e[e.ThirdPlatformUser = 10035] = "ThirdPlatformUser", e[e.NoRelatedEmployee = 10036] = "NoRelatedEmployee", e[e.CountInvalid = 10037] = "CountInvalid", e[e.CountNotFound = 10038] = "CountNotFound", e))(a || {});
51
- const C = (e) => e in {
50
+ const U = (e) => e in {
52
51
  10031: "登录失效,需要重新登录",
53
52
  // token 失效
54
53
  10032: "您太久没登录,请重新登录~",
@@ -59,11 +58,11 @@ const C = (e) => e in {
59
58
  10036: "该账户未关联员工,请联系管理员做关联",
60
59
  10037: "账号已无效",
61
60
  10038: "账号未找到"
62
- } ? (n.error(a[e]), !1) : !0, v = (e, o) => e !== 0 && o !== "OK" ? (n.error(o), !1) : !0;
61
+ } ? (n.error(a[e]), !1) : !0, C = (e, o) => e !== 0 && o !== "OK" ? (n.error(o), !1) : !0;
63
62
  export {
64
- C as handleAuthError,
65
- N as handleChangeRequestHeader,
66
- R as handleConfigureAuth,
67
- v as handleGeneralError,
68
- U as handleNetworkError
63
+ U as handleAuthError,
64
+ w as handleChangeRequestHeader,
65
+ N as handleConfigureAuth,
66
+ C as handleGeneralError,
67
+ R as handleNetworkError
69
68
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as ae, ref as x, reactive as E, toRefs as ce, watch as re, onMounted as ie, resolveComponent as V, openBlock as a, createElementBlock as v, createVNode as Y, normalizeStyle as j, withCtx as f, createTextVNode as _, toDisplayString as p, unref as r, createCommentVNode as w, createElementVNode as S, Fragment as b, renderList as K, createBlock as k } from "vue";
1
+ import { defineComponent as ae, ref as x, reactive as V, toRefs as ce, watch as re, onMounted as ie, resolveComponent as w, openBlock as a, createElementBlock as v, createVNode as Y, normalizeStyle as j, withCtx as f, createTextVNode as y, toDisplayString as p, unref as r, createCommentVNode as S, createElementVNode as F, Fragment as _, renderList as K, createBlock as b } from "vue";
2
2
  import s from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
3
3
  import { Get as de } from "../api/server.js";
4
4
  import { stylesUtils as M } from "../utils/style.js";
5
5
  import { storage as H } from "../utils/storage.js";
6
- import { M2 as y } from "../utils/translate.js";
7
- const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style: { display: "flex", "align-items": "center", outline: "none" } }, he = { key: 0 }, me = { style: { display: "flex", width: "auto", padding: "10px" } }, ge = ["onClick"], xe = { class: "scrollable-container" }, ke = { key: 0 }, Ve = /* @__PURE__ */ ae({
6
+ import { M2 as k } from "../utils/translate.js";
7
+ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style: { display: "flex", "align-items": "center", outline: "none" } }, he = { key: 0 }, me = { style: { display: "flex", width: "auto", padding: "10px" } }, ge = ["onClick"], xe = { class: "scrollable-container" }, be = { key: 0 }, Ve = /* @__PURE__ */ ae({
8
8
  name: "YaheeDropDownCondition",
9
9
  __name: "drop-down-condition",
10
10
  props: {
@@ -14,19 +14,20 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
14
14
  level2Count: {},
15
15
  filterKey: {},
16
16
  enumEntity: {},
17
+ baseUrl: {},
17
18
  noNeedRefreshNumFilterName: {}
18
19
  },
19
20
  emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
20
21
  setup(J, { emit: Q }) {
21
- const X = x(), o = E({});
22
- let O = E({});
23
- const i = E({}), h = E({}), m = x(!0), F = J, T = Q, { filterKey: L, filterList: q, totalCount: C, level1Count: B, level2Count: A, noNeedRefreshNumFilterName: I } = ce(F), W = x(s.get(C, "value", 0)), R = x(s.get(B, "value", [])), z = x(s.get(A, "value", [])), d = x();
22
+ const X = x(), o = V({});
23
+ let O = V({});
24
+ const i = V({}), h = V({}), m = x(!0), C = J, T = Q, { filterKey: L, filterList: q, totalCount: N, level1Count: B, level2Count: U, noNeedRefreshNumFilterName: I } = ce(C), W = x(s.get(N, "value", 0)), A = x(s.get(B, "value", [])), R = x(s.get(U, "value", [])), d = x();
24
25
  q.value && (d.value = [...q.value]);
25
26
  function G(e) {
26
27
  const { text: l, value: u } = e, n = o[l];
27
- s.isNil(n) || s.isEmpty(n) ? o[l] = [u] : o[l] = [], h[l] = !h[l], h[l] ? (ne(l), i[l] = M.getBackgroundColor(!0), m.value = !1) : (se(l), i[e.text] = {}, m.value = !0), m.value = D(), U();
28
+ s.isNil(n) || s.isEmpty(n) ? o[l] = [u] : o[l] = [], h[l] = !h[l], h[l] ? (ne(l), i[l] = M.getBackgroundColor(!0), m.value = !1) : (se(l), i[e.text] = {}, m.value = !0), m.value = $(), z();
28
29
  }
29
- function D() {
30
+ function $() {
30
31
  const e = d.value.filter((n) => !s.isEmpty(n.subs)).flatMap((n) => n.subs).length, l = d.value.filter((n) => s.isEmpty(n.subs)).length;
31
32
  return Object.values(o).map((n) => n.length).reduce((n, g) => n + g, 0) === e + l || s.isEmpty(Object.values(o).flat());
32
33
  }
@@ -35,12 +36,12 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
35
36
  backgroundColor: "#0F7535",
36
37
  color: "#fff",
37
38
  borderColor: "#0F7535"
38
- }, m.value = D(), U();
39
+ }, m.value = $(), z();
39
40
  }
40
41
  function ee() {
41
- m.value = D(), U();
42
+ m.value = $(), z();
42
43
  }
43
- function U() {
44
+ function z() {
44
45
  T("setNoNeedRefreshNumFilterName", L.value);
45
46
  }
46
47
  function te() {
@@ -79,19 +80,19 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
79
80
  o[e] = [];
80
81
  }
81
82
  return re(
82
- [() => C.value, () => B.value, () => A.value],
83
- ([e, l, u], [n, g, $]) => {
84
- console.log(e, l, u), console.log(n, g, $), (!I.value || !s.eq(I.value, L.value)) && (W.value = C.value, R.value = B.value, z.value = A.value);
83
+ [() => N.value, () => B.value, () => U.value],
84
+ ([e, l, u], [n, g, D]) => {
85
+ console.log(e, l, u), console.log(n, g, D), (!I.value || !s.eq(I.value, L.value)) && (W.value = N.value, A.value = B.value, R.value = U.value);
85
86
  }
86
87
  ), ie(() => {
87
- const e = `filter-key-${F.enumEntity}`, l = H.getWithExpireTime(e);
88
- l ? d.value = l : de(`/${F.enumEntity}`).then((u) => {
88
+ const e = `filter-key-${C.enumEntity}`, l = H.getWithExpireTime(e);
89
+ l ? d.value = l : de(`${C.baseUrl}/${C.enumEntity}`).then((u) => {
89
90
  d.value = u.data, H.setWithExpireTime(e, d.value, 1200 * 1e3);
90
91
  }).catch((u) => {
91
92
  console.log(u);
92
93
  });
93
94
  }), (e, l) => {
94
- const u = V("el-button"), n = V("el-checkbox"), g = V("el-checkbox-group"), $ = V("el-dropdown");
95
+ const u = w("el-button"), n = w("el-checkbox"), g = w("el-checkbox-group"), D = w("el-dropdown");
95
96
  return a(), v("div", ve, [
96
97
  Y(u, {
97
98
  size: "small",
@@ -100,19 +101,19 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
100
101
  onClick: te
101
102
  }, {
102
103
  default: f(() => [
103
- _(p(r(y)("全部")) + " ", 1),
104
- r(C) ? (a(), v("span", fe, "(" + p(W.value) + ")", 1)) : w("", !0)
104
+ y(p(r(k)("全部")) + " ", 1),
105
+ r(N) ? (a(), v("span", fe, "(" + p(W.value) + ")", 1)) : S("", !0)
105
106
  ]),
106
107
  _: 1
107
108
  }, 8, ["style"]),
108
- Y($, {
109
+ Y(D, {
109
110
  ref_key: "dropdown1",
110
111
  ref: X,
111
112
  onVisibleChange: oe
112
113
  }, {
113
114
  dropdown: f(() => [
114
- S("div", me, [
115
- (a(!0), v(b, null, K(d.value, (t) => (a(), k(g, {
115
+ F("div", me, [
116
+ (a(!0), v(_, null, K(d.value, (t) => (a(), b(g, {
116
117
  key: t.value,
117
118
  modelValue: o[t.text],
118
119
  "onUpdate:modelValue": (c) => o[t.text] = c,
@@ -121,34 +122,34 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
121
122
  onChange: (c) => Z(t)
122
123
  }, {
123
124
  default: f(() => [
124
- r(s).isNil(t.subs) ? (a(), k(n, {
125
+ r(s).isNil(t.subs) ? (a(), b(n, {
125
126
  key: 1,
126
127
  value: t.value,
127
128
  class: "checkbox custom-button",
128
129
  border: ""
129
130
  }, {
130
131
  default: f(() => [
131
- _(p(r(y)(t.text)), 1)
132
+ y(p(r(k)(t.text)), 1)
132
133
  ]),
133
134
  _: 2
134
- }, 1032, ["value"])) : (a(), v(b, { key: 0 }, [
135
- S("span", {
135
+ }, 1032, ["value"])) : (a(), v(_, { key: 0 }, [
136
+ F("span", {
136
137
  class: "el-button custom-button el-button--small inner-el-button",
137
138
  style: j(i[t.text]),
138
139
  onClick: (c) => G(t)
139
- }, p(r(y)(t.text)), 13, ge),
140
- S("div", xe, [
141
- (a(!0), v(b, null, K(t.subs, (c) => (a(), k(n, {
140
+ }, p(r(k)(t.text)), 13, ge),
141
+ F("div", xe, [
142
+ (a(!0), v(_, null, K(t.subs, (c) => (a(), b(n, {
142
143
  key: c.value,
143
144
  class: "checkbox custom-button",
144
145
  value: c.value,
145
146
  border: ""
146
147
  }, {
147
148
  default: f(() => {
148
- var N;
149
+ var E;
149
150
  return [
150
- _(p(r(y)(c.text)), 1),
151
- r(s).isEmpty(z.value) ? w("", !0) : (a(), v("span", ke, "(" + p((N = z.value.filter((ue) => ue.value == c.value)[0]) == null ? void 0 : N.count) + ")", 1))
151
+ y(p(r(k)(c.text)), 1),
152
+ r(s).isEmpty(R.value) ? S("", !0) : (a(), v("span", be, "(" + p((E = R.value.filter((ue) => ue.value == c.value)[0]) == null ? void 0 : E.count) + ")", 1))
152
153
  ];
153
154
  }),
154
155
  _: 2
@@ -161,9 +162,9 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
161
162
  ])
162
163
  ]),
163
164
  default: f(() => [
164
- S("div", pe, [
165
- (a(!0), v(b, null, K(d.value, (t) => (a(), v(b, null, [
166
- t.isCheckbox ? (a(), k(g, {
165
+ F("div", pe, [
166
+ (a(!0), v(_, null, K(d.value, (t) => (a(), v(_, null, [
167
+ t.isCheckbox ? (a(), b(g, {
167
168
  key: t.value,
168
169
  modelValue: o[t.text],
169
170
  "onUpdate:modelValue": (c) => o[t.text] = c,
@@ -172,20 +173,20 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
172
173
  onChange: ee
173
174
  }, {
174
175
  default: f(() => [
175
- t.isCheckbox ? (a(), k(n, {
176
+ t.isCheckbox ? (a(), b(n, {
176
177
  key: 0,
177
178
  class: "custom-button",
178
179
  value: t.value,
179
180
  border: ""
180
181
  }, {
181
182
  default: f(() => [
182
- _(p(r(y)(t.text)), 1)
183
+ y(p(r(k)(t.text)), 1)
183
184
  ]),
184
185
  _: 2
185
- }, 1032, ["value"])) : w("", !0)
186
+ }, 1032, ["value"])) : S("", !0)
186
187
  ]),
187
188
  _: 2
188
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : (a(), k(u, {
189
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : (a(), b(u, {
189
190
  key: t.text,
190
191
  style: j(i[t.text]),
191
192
  class: "custom-button",
@@ -195,8 +196,8 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
195
196
  default: f(() => {
196
197
  var c;
197
198
  return [
198
- _(p(r(y)(t.text)), 1),
199
- r(s).isEmpty(R.value) ? w("", !0) : (a(), v("span", he, "(" + p((c = R.value.filter((N) => N.value == t.value)[0]) == null ? void 0 : c.count) + ")", 1))
199
+ y(p(r(k)(t.text)), 1),
200
+ r(s).isEmpty(A.value) ? S("", !0) : (a(), v("span", he, "(" + p((c = A.value.filter((E) => E.value == t.value)[0]) == null ? void 0 : c.count) + ")", 1))
200
201
  ];
201
202
  }),
202
203
  _: 2
@@ -1,13 +1,13 @@
1
- import { defineComponent as se, toRefs as oe, ref as m, computed as re, watch as ie, onMounted as ce, resolveComponent as B, openBlock as y, createBlock as D, withCtx as T, createVNode as I, unref as o, createElementVNode as fe, normalizeStyle as de, toDisplayString as L, createElementBlock as q, Fragment as me, renderList as ve, createTextVNode as K, createCommentVNode as pe, nextTick as z } from "vue";
1
+ import { defineComponent as ue, toRefs as se, ref as m, computed as oe, watch as re, onMounted as ie, resolveComponent as I, openBlock as y, createElementBlock as L, createVNode as h, withCtx as T, unref as o, createElementVNode as ce, normalizeStyle as fe, toDisplayString as K, Fragment as de, renderList as me, createBlock as ve, createTextVNode as A, createCommentVNode as pe, nextTick as q } from "vue";
2
2
  import l from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
3
3
  import ge from "./left-condition-sub.vue.js";
4
4
  import { stylesUtils as ye } from "../utils/style.js";
5
- import { M2 as J } from "../utils/translate.js";
6
- const he = {
5
+ import { M2 as z } from "../utils/translate.js";
6
+ const he = { class: "yahee-left-condition" }, Ne = {
7
7
  key: 0,
8
8
  class: "el-button custom-button el-button--small",
9
9
  style: { "margin-left": "5px", display: "inline-flex" }
10
- }, Ce = /* @__PURE__ */ se({
10
+ }, _e = /* @__PURE__ */ ue({
11
11
  name: "YaheeLeftCondition",
12
12
  __name: "left-condition",
13
13
  props: {
@@ -31,28 +31,28 @@ const he = {
31
31
  defaultValues: { default: () => [] }
32
32
  },
33
33
  emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
34
- setup(O, { expose: Y, emit: j }) {
35
- const G = O, {
36
- multiSelectList: A,
37
- displayRangeInput: h,
38
- selectList: N,
39
- hasNum: H,
40
- allIsEmpty: Q,
41
- translateUserId: W,
42
- label: X,
34
+ setup(J, { expose: O, emit: Y }) {
35
+ const j = J, {
36
+ multiSelectList: F,
37
+ displayRangeInput: N,
38
+ selectList: k,
39
+ hasNum: G,
40
+ allIsEmpty: H,
41
+ translateUserId: Q,
42
+ label: W,
43
43
  filterKey: v,
44
44
  rangeStartKey: r,
45
45
  rangeEndKey: i,
46
- noNeedRefreshNumFilterName: F,
47
- defaultValues: M,
48
- totalCount: k,
49
- countList: S
50
- } = oe(G), V = j, b = m(k.value), c = m(), f = m(), $ = m(S.value), n = /* @__PURE__ */ new Map(), d = m(!1), C = m([]), p = () => {
51
- console.log("left condition notifyParent start"), z(() => {
46
+ noNeedRefreshNumFilterName: M,
47
+ defaultValues: $,
48
+ totalCount: S,
49
+ countList: V
50
+ } = se(j), b = Y, C = m(S.value), c = m(), f = m(), w = m(V.value), n = /* @__PURE__ */ new Map(), d = m(!1), _ = m([]), p = () => {
51
+ console.log("left condition notifyParent start"), q(() => {
52
52
  var s, g;
53
- const e = _(), t = le();
53
+ const e = E(), t = te();
54
54
  if (l.isEmpty(e) && l.isEmpty(t)) {
55
- E();
55
+ B();
56
56
  return;
57
57
  }
58
58
  const a = [
@@ -61,43 +61,43 @@ const he = {
61
61
  checkedValues: l.map(e, (u) => u.value)
62
62
  }
63
63
  ];
64
- h.value && (a.push({
64
+ N.value && (a.push({
65
65
  filterKey: r.value,
66
66
  checkedValues: [(s = n.get(r.value)) == null ? void 0 : s.value]
67
67
  }), a.push({
68
68
  filterKey: i.value,
69
69
  checkedValues: [(g = n.get(i.value)) == null ? void 0 : g.value]
70
- })), V("filterChange", a), console.log(
70
+ })), b("filterChange", a), console.log(
71
71
  `left condition notifyParent nextTick after emit, filterKey: ${v.value}, checkedValues: ${JSON.stringify(l.map(e, (u) => u.value))}`
72
72
  );
73
73
  });
74
- }, Z = () => {
75
- V("setNoNeedRefreshNumFilterName");
76
- }, w = () => {
74
+ }, X = () => {
75
+ b("setNoNeedRefreshNumFilterName");
76
+ }, U = () => {
77
77
  R(), x({ label: r.value, selected: !0, value: c.value }), x({ label: i.value, selected: !0, value: f.value });
78
- }, ee = () => {
78
+ }, Z = () => {
79
79
  const e = n.get(r.value);
80
- l.isEmpty(e) && !c.value || l.get(e, "value") === c.value || (w(), p());
81
- }, te = () => {
80
+ l.isEmpty(e) && !c.value || l.get(e, "value") === c.value || (U(), p());
81
+ }, ee = () => {
82
82
  const e = n.get(i.value);
83
- l.isEmpty(e) && !f.value || l.get(e, "value") === f.value || (w(), p());
83
+ l.isEmpty(e) && !f.value || l.get(e, "value") === f.value || (U(), p());
84
84
  };
85
85
  function x(e) {
86
86
  console.log(`left condition setSelectedStatusMap start, item: ${JSON.stringify(e)}`), n.set(e.label, {
87
87
  selected: e.selected,
88
88
  value: e.value
89
- }), d.value = l.eq(_().length, N.value.length);
89
+ }), d.value = l.eq(E().length, k.value.length);
90
90
  }
91
- function U(e) {
92
- return l.includes(A.value, e.value);
91
+ function P(e) {
92
+ return l.includes(F.value, e.value);
93
93
  }
94
94
  function R() {
95
- const e = l.map(_(), (t) => t.value);
96
- n.clear(), l.forEach(C.value, (t) => {
95
+ const e = l.map(E(), (t) => t.value);
96
+ n.clear(), l.forEach(_.value, (t) => {
97
97
  l.includes(e, t.getValue().value) && t.resetValue();
98
98
  }), d.value = !1;
99
99
  }
100
- const _ = () => {
100
+ const E = () => {
101
101
  const e = l.filter(
102
102
  Array.from(n.values()),
103
103
  (t) => t.selected
@@ -106,109 +106,111 @@ const he = {
106
106
  const a = Array.from(n.keys()).find((s) => n.get(s) === t);
107
107
  return ![r.value, i.value].includes(a);
108
108
  });
109
- }, le = () => l.filter(Array.from(n.values()), (e) => {
109
+ }, te = () => l.filter(Array.from(n.values()), (e) => {
110
110
  const t = Array.from(n.keys()).find((a) => n.get(a) === e);
111
111
  return [r.value, i.value].includes(t);
112
- }), ae = () => {
112
+ }), le = () => {
113
113
  d.value = !1;
114
- }, ne = re(() => l.sortBy(N.value, (e) => U(e))), P = () => {
114
+ }, ae = oe(() => l.sortBy(k.value, (e) => P(e))), D = () => {
115
115
  c.value = void 0, f.value = void 0, n.delete(r.value), n.delete(i.value);
116
116
  };
117
- function E() {
118
- R(), z(() => {
117
+ function B() {
118
+ R(), q(() => {
119
119
  d.value = !0;
120
- const e = N.value.filter((a) => !U(a)), t = l.map(e, (a) => a.value);
121
- V("filterChange", [
120
+ const e = k.value.filter((a) => !P(a)), t = l.map(e, (a) => a.value);
121
+ b("filterChange", [
122
122
  {
123
123
  filterKey: v.value,
124
- checkedValues: Q.value ? [] : t
124
+ checkedValues: H.value ? [] : t
125
125
  }
126
126
  ]);
127
- }), h.value && P();
127
+ }), N.value && D();
128
128
  }
129
- return ie(
130
- [() => k.value, () => S.value],
129
+ return re(
130
+ [() => S.value, () => V.value],
131
131
  ([e, t], [a, s]) => {
132
- console.log(e, t), console.log(a, s), (!F.value || !l.eq(F.value, v.value)) && (b.value = k.value, $.value = S.value);
132
+ console.log(e, t), console.log(a, s), (!M.value || !l.eq(M.value, v.value)) && (C.value = S.value, w.value = V.value);
133
133
  }
134
- ), Y({
135
- clickAllSelected: E
136
- }), ce(() => {
137
- if (l.isEmpty(M.value)) {
134
+ ), O({
135
+ clickAllSelected: B
136
+ }), ie(() => {
137
+ if (l.isEmpty($.value)) {
138
138
  d.value = !0;
139
139
  return;
140
140
  }
141
141
  l.filter(
142
- C.value,
143
- (e) => l.includes(M.value, e.getValue().value)
142
+ _.value,
143
+ (e) => l.includes($.value, e.getValue().value)
144
144
  ).forEach((e) => {
145
145
  e.setCurrentValue(!0), e.setCheckboxValue(!0);
146
146
  }), p();
147
147
  }), (e, t) => {
148
- const a = B("el-input-number"), s = B("el-form-item"), g = B("el-form");
149
- return y(), D(g, null, {
150
- default: T(() => [
151
- I(s, { label: o(X) }, {
152
- default: T(() => [
153
- fe("span", {
154
- onClick: E,
155
- class: "el-button custom-button el-button--small",
156
- style: de(o(ye).getBackgroundColor(d.value))
157
- }, L(b.value ? `${o(J)("全部")}(${b.value})` : o(J)("全部")), 5),
158
- (y(!0), q(me, null, ve(ne.value, (u, ue) => (y(), D(ge, {
159
- key: ue,
160
- ref_for: !0,
161
- ref_key: "itemRefs",
162
- ref: C,
163
- "all-is-checkbox": e.allIsCheckbox,
164
- "multi-select-list": o(A),
165
- "translate-user-id": o(W),
166
- "count-list": $.value,
167
- item: u,
168
- "has-num": o(H),
169
- onResetAllCheckedValue: R,
170
- onSetSelectedStatusMap: x,
171
- onResetRange: P,
172
- onSetNoNeedRefreshNumFilterName: Z,
173
- onNotifyParent: p,
174
- onResetIsSelectAll: ae
175
- }, null, 8, ["all-is-checkbox", "multi-select-list", "translate-user-id", "count-list", "item", "has-num"]))), 128)),
176
- o(h) ? (y(), q("div", he, [
177
- K(L(e.rangeLabel) + "  ", 1),
178
- I(a, {
179
- modelValue: c.value,
180
- "onUpdate:modelValue": t[0] || (t[0] = (u) => c.value = u),
181
- style: { "margin-left": "2px", width: "60px", height: "22px" },
182
- precision: 2,
183
- step: 0.01,
184
- min: 1,
185
- max: 100,
186
- controls: !1,
187
- onBlur: ee
188
- }, null, 8, ["modelValue"]),
189
- K("   %   " + L(e.rangeDelimiter) + "   ", 1),
190
- I(a, {
191
- modelValue: f.value,
192
- "onUpdate:modelValue": t[1] || (t[1] = (u) => f.value = u),
193
- style: { width: "60px", height: "22px" },
194
- precision: 2,
195
- step: 0.01,
196
- size: "small",
197
- max: 100,
198
- controls: !1,
199
- onChange: te
200
- }, null, 8, ["modelValue"]),
201
- t[2] || (t[2] = K(" %   "))
202
- ])) : pe("", !0)
203
- ]),
204
- _: 1
205
- }, 8, ["label"])
206
- ]),
207
- _: 1
208
- });
148
+ const a = I("el-input-number"), s = I("el-form-item"), g = I("el-form");
149
+ return y(), L("div", he, [
150
+ h(g, null, {
151
+ default: T(() => [
152
+ h(s, { label: o(W) }, {
153
+ default: T(() => [
154
+ ce("span", {
155
+ class: "el-button custom-button el-button--small",
156
+ style: fe(o(ye).getBackgroundColor(d.value)),
157
+ onClick: B
158
+ }, K(C.value ? `${o(z)("全部")}(${C.value})` : o(z)("全部")), 5),
159
+ (y(!0), L(de, null, me(ae.value, (u, ne) => (y(), ve(ge, {
160
+ key: ne,
161
+ ref_for: !0,
162
+ ref_key: "itemRefs",
163
+ ref: _,
164
+ "all-is-checkbox": e.allIsCheckbox,
165
+ "multi-select-list": o(F),
166
+ "translate-user-id": o(Q),
167
+ "count-list": w.value,
168
+ item: u,
169
+ "has-num": o(G),
170
+ onResetAllCheckedValue: R,
171
+ onSetSelectedStatusMap: x,
172
+ onResetRange: D,
173
+ onSetNoNeedRefreshNumFilterName: X,
174
+ onNotifyParent: p,
175
+ onResetIsSelectAll: le
176
+ }, null, 8, ["all-is-checkbox", "multi-select-list", "translate-user-id", "count-list", "item", "has-num"]))), 128)),
177
+ o(N) ? (y(), L("div", Ne, [
178
+ A(K(e.rangeLabel) + "  ", 1),
179
+ h(a, {
180
+ modelValue: c.value,
181
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => c.value = u),
182
+ style: { "margin-left": "2px", width: "60px", height: "22px" },
183
+ precision: 2,
184
+ step: 0.01,
185
+ min: 1,
186
+ max: 100,
187
+ controls: !1,
188
+ onBlur: Z
189
+ }, null, 8, ["modelValue"]),
190
+ A("   %   " + K(e.rangeDelimiter) + "   ", 1),
191
+ h(a, {
192
+ modelValue: f.value,
193
+ "onUpdate:modelValue": t[1] || (t[1] = (u) => f.value = u),
194
+ style: { width: "60px", height: "22px" },
195
+ precision: 2,
196
+ step: 0.01,
197
+ size: "small",
198
+ max: 100,
199
+ controls: !1,
200
+ onChange: ee
201
+ }, null, 8, ["modelValue"]),
202
+ t[2] || (t[2] = A(" %   "))
203
+ ])) : pe("", !0)
204
+ ]),
205
+ _: 1
206
+ }, 8, ["label"])
207
+ ]),
208
+ _: 1
209
+ })
210
+ ]);
209
211
  };
210
212
  }
211
213
  });
212
214
  export {
213
- Ce as default
215
+ _e as default
214
216
  };
@@ -1,11 +1,10 @@
1
- :deep(.custom-button + .custom-button) {
1
+ .yahee-left-condition .custom-button + .custom-button {
2
2
  margin-left: 5px;
3
3
  margin-bottom: 5px;
4
4
  position: relative;
5
5
  top: 2px;
6
6
  }
7
-
8
- :deep(.custom-button) {
7
+ .yahee-left-condition .custom-button {
9
8
  padding: 1px 4px;
10
9
  height: 22px;
11
10
  }
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as f, ref as c, onMounted as d, openBlock as y, createBlock as N } from "vue";
2
2
  import h from "../left-condition/left-condition.vue.js";
3
- import { Get as p } from "../api/server.js";
4
3
  import { storage as o } from "../utils/storage.js";
4
+ import { Get as p } from "../packages/components/api/server.js";
5
5
  const E = /* @__PURE__ */ f({
6
6
  name: "YaheeLeftConditionEnum",
7
7
  __name: "left-condition-enum",
@@ -10,6 +10,10 @@ const E = /* @__PURE__ */ f({
10
10
  type: Array,
11
11
  default: () => []
12
12
  },
13
+ baseUrl: {
14
+ type: String,
15
+ default: ""
16
+ },
13
17
  countList: {
14
18
  type: Array,
15
19
  required: !1
@@ -45,20 +49,20 @@ const E = /* @__PURE__ */ f({
45
49
  },
46
50
  emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
47
51
  setup(e, { emit: s }) {
48
- const l = e, a = s, n = c(l.selectList), m = (t) => {
49
- a("filterChange", t);
50
- }, u = () => {
51
- a("setNoNeedRefreshNumFilterName", l.filterKey);
52
+ const t = e, i = s, r = c(t.selectList), u = (l) => {
53
+ i("filterChange", l);
54
+ }, m = () => {
55
+ i("setNoNeedRefreshNumFilterName", t.filterKey);
52
56
  };
53
57
  return d(() => {
54
- const t = `filter-key-${l.enumEntity}`, r = o.getWithExpireTime(t);
55
- r ? n.value = r : p(`/${l.enumEntity}`).then((i) => {
56
- n.value = i.data, o.setWithExpireTime(t, n.value, 1200 * 1e3);
57
- }).catch((i) => {
58
- console.log(i);
58
+ const l = `filter-key-${t.enumEntity}`, n = o.getWithExpireTime(l);
59
+ n ? r.value = n : p(`${t.baseUrl}/${t.enumEntity}`).then((a) => {
60
+ r.value = a.data, o.setWithExpireTime(l, r.value, 1200 * 1e3);
61
+ }).catch((a) => {
62
+ console.log(a);
59
63
  });
60
- }), (t, r) => (y(), N(h, {
61
- "select-list": n.value,
64
+ }), (l, n) => (y(), N(h, {
65
+ "select-list": r.value,
62
66
  "count-list": e.countList,
63
67
  "total-count": e.totalCount,
64
68
  "filter-key": e.filterKey,
@@ -66,8 +70,8 @@ const E = /* @__PURE__ */ f({
66
70
  "all-is-checkbox": e.allIsCheckbox,
67
71
  "translate-user-id": e.translateUserId,
68
72
  "all-is-empty": e.allIsEmpty,
69
- onFilterChange: m,
70
- onSetNoNeedRefreshNumFilterName: u
73
+ onFilterChange: u,
74
+ onSetNoNeedRefreshNumFilterName: m
71
75
  }, null, 8, ["select-list", "count-list", "total-count", "filter-key", "no-need-refresh-num-filter-name", "all-is-checkbox", "translate-user-id", "all-is-empty"]));
72
76
  }
73
77
  });