yahee-components 0.0.55 → 0.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/es/annex-upload/annex-upload.vue.js +154 -69
  2. package/es/annex-upload/annex-upload.vue2.js +2 -119
  3. package/es/annex-upload/index.js +3 -3
  4. package/es/api/tool.js +1 -1
  5. package/es/complex-search/complex-search.vue.js +320 -240
  6. package/es/complex-search/complex-search.vue2.js +2 -154
  7. package/es/complex-search/index.js +5 -5
  8. package/es/copy/copy.vue.js +55 -39
  9. package/es/copy/copy.vue2.js +2 -34
  10. package/es/copy/index.js +3 -3
  11. package/es/copy/style/index.css +0 -3
  12. package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +204 -158
  13. package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +2 -125
  14. package/es/drop-down-condition/drop-down-condition.vue.js +211 -193
  15. package/es/drop-down-condition/drop-down-condition.vue2.js +2 -127
  16. package/es/image-upload/image-upload.vue.js +113 -76
  17. package/es/image-upload/image-upload.vue2.js +2 -91
  18. package/es/image-upload/index.js +3 -3
  19. package/es/input/index.js +3 -3
  20. package/es/input/input.vue.js +38 -17
  21. package/es/input/input.vue2.js +2 -33
  22. package/es/left-condition/index.js +5 -5
  23. package/es/left-condition/left-condition-sub.vue.js +86 -55
  24. package/es/left-condition/left-condition-sub.vue2.js +2 -76
  25. package/es/left-condition/left-condition.vue.js +211 -92
  26. package/es/left-condition/left-condition.vue2.js +2 -153
  27. package/es/left-condition-enum/index.js +3 -3
  28. package/es/left-condition-enum/left-condition-enum.vue.js +77 -19
  29. package/es/left-condition-enum/left-condition-enum.vue2.js +2 -69
  30. package/es/operation-log/operation-log-content.vue.js +92 -78
  31. package/es/operation-log/operation-log-content.vue2.js +2 -39
  32. package/es/operation-log/operation-log-dialog.vue.js +68 -57
  33. package/es/operation-log/operation-log-dialog.vue2.js +2 -38
  34. package/es/operation-log/operation-log-form.vue.js +183 -132
  35. package/es/operation-log/operation-log-form.vue2.js +2 -104
  36. package/es/operation-log/operation-log.vue.js +227 -186
  37. package/es/operation-log/operation-log.vue2.js +2 -135
  38. package/es/packages/components/api/log-server.js +5 -5
  39. package/es/packages/components/api/upload-server.js +1 -1
  40. package/es/packages/components/hooks/useImg.js +8 -8
  41. package/es/style.css +0 -3
  42. package/es/utils/translate.js +19 -19
  43. package/lib/copy/style/index.css +0 -3
  44. package/lib/style.css +0 -3
  45. package/package.json +1 -1
  46. package/es/_virtual/_plugin-vue_export-helper.js +0 -9
@@ -1,78 +1,4 @@
1
- import { defineComponent as C, toRefs as x, ref as p, watch as R, nextTick as h } from "vue";
2
- import y from "../_virtual/lodash.js";
3
- import { stylesUtils as V } from "../utils/style.js";
4
- import { translateEmployeeName as q, M2 as A } from "../utils/translate.js";
5
- const I = /* @__PURE__ */ C({
6
- __name: "left-condition-sub",
7
- props: {
8
- multiSelectList: { type: Array, required: !0, default: () => [] },
9
- countList: { type: Array, required: !1 },
10
- item: { type: Object, required: !0, default: () => ({ label: "", value: "" }) },
11
- hasNum: { type: Boolean, required: !0, default: !1 },
12
- allIsCheckbox: { type: Boolean, required: !1, default: !1 },
13
- translateUserId: { type: Boolean, required: !0, default: !1 }
14
- },
15
- emits: [
16
- "resetAllCheckedValue",
17
- "setSelectedStatusMap",
18
- "resetRange",
19
- "resetIsSelectAll",
20
- "notifyParent",
21
- "setNoNeedRefreshNumFilterName"
22
- ],
23
- setup(N, { expose: v, emit: _ }) {
24
- const o = N, { item: r, hasNum: g, multiSelectList: i } = x(o), t = _, l = p(!1), a = p(!1);
25
- function b(e) {
26
- t("setNoNeedRefreshNumFilterName"), t("resetRange"), l.value = e.target.checked, s(l.value), u();
27
- }
28
- function u() {
29
- h(() => {
30
- t("notifyParent");
31
- });
32
- }
33
- function s(e) {
34
- a.value = e;
35
- }
36
- function n(e) {
37
- l.value = e;
38
- }
39
- function c() {
40
- l.value = !1, a.value = !1;
41
- }
42
- function f() {
43
- return r.value;
44
- }
45
- function m() {
46
- t("resetAllCheckedValue");
47
- }
48
- function k() {
49
- t("setNoNeedRefreshNumFilterName"), t("resetRange"), m(), h(() => {
50
- n(!0);
51
- }), u();
52
- }
53
- function S(e) {
54
- return y.includes(i.value, e.value);
55
- }
56
- R(l, (e) => {
57
- console.log("left condition subview watch value", e), t("setSelectedStatusMap", { ...r.value, selected: e });
58
- }), v({
59
- resetValue: c,
60
- getValue: f,
61
- setCurrentValue: n,
62
- setCheckboxValue: s
63
- });
64
- const d = { props: o, item: r, hasNum: g, multiSelectList: i, emit: t, value: l, checkboxValue: a, checkboxChange: b, notifyParent: u, setCheckboxValue: s, setCurrentValue: n, resetValue: c, getValue: f, resetAllCheckedValue: m, onClick: k, isMultiSelect: S, get _() {
65
- return y;
66
- }, get stylesUtils() {
67
- return V;
68
- }, get M2() {
69
- return A;
70
- }, get translateEmployeeName() {
71
- return q;
72
- } };
73
- return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
74
- }
75
- });
1
+ import f from "./left-condition-sub.vue.js";
76
2
  export {
77
- I as default
3
+ f as default
78
4
  };
@@ -1,99 +1,218 @@
1
- import g from "./left-condition.vue2.js";
2
- import { resolveComponent as i, createElementBlock as o, openBlock as n, createVNode as a, withCtx as d, createCommentVNode as u, normalizeStyle as h, toDisplayString as m, Fragment as S, renderList as b, createBlock as k, createTextVNode as s } from "vue";
3
- import y from "../_virtual/_plugin-vue_export-helper.js";
4
- const N = { class: "yahee-left-condition" }, A = {
1
+ import { defineComponent as oe, toRefs as re, ref as m, computed as ie, watch as ce, onMounted as fe, nextTick as A, resolveComponent as K, createElementBlock as S, openBlock as v, createVNode as V, withCtx as q, unref as s, createCommentVNode as z, normalizeStyle as de, toDisplayString as F, Fragment as me, renderList as ve, createBlock as pe, createTextVNode as M } from "vue";
2
+ import l from "../_virtual/lodash.js";
3
+ import ge from "./left-condition-sub.vue.js";
4
+ import { stylesUtils as ye } from "../utils/style.js";
5
+ import { M2 as J } from "../utils/translate.js";
6
+ const he = { class: "yahee-left-condition" }, ke = {
5
7
  key: 1,
6
8
  class: "el-button custom-button el-button--small",
7
9
  style: { "margin-left": "5px", display: "inline-flex" }
8
- };
9
- function C(E, l, r, e, V, R) {
10
- const c = i("el-input-number"), f = i("el-form-item"), x = i("el-form");
11
- return n(), o("div", N, [
12
- a(x, null, {
13
- default: d(() => [
14
- a(f, { label: e.label }, {
15
- default: d(() => [
16
- e.showTotal ? (n(), o(
17
- "span",
18
- {
19
- key: 0,
20
- class: "el-button custom-button el-button--small",
21
- style: h(e.stylesUtils.getBackgroundColor(e.isSelectAll)),
22
- onClick: e.clickAllSelected
23
- },
24
- m(e.totalNum ? `${e.M2("全部")}(${e.totalNum})` : e.M2("全部")),
25
- 5
26
- /* TEXT, STYLE */
27
- )) : u("v-if", !0),
28
- (n(!0), o(
29
- S,
30
- null,
31
- b(e.getSortedSelectedList, (t, _) => (n(), k(e.LeftConditionSub, {
32
- key: _,
33
- ref_for: !0,
34
- ref: "itemRefs",
35
- "all-is-checkbox": r.allIsCheckbox,
36
- "multi-select-list": e.multiSelectList,
37
- "translate-user-id": e.translateUserId,
38
- "count-list": e.numList,
39
- item: t,
40
- "has-num": e.hasNum,
41
- onResetAllCheckedValue: e.resetAllCheckedValue,
42
- onSetSelectedStatusMap: e.setSelectedStatusMap,
43
- onResetRange: e.resetRange,
44
- onSetNoNeedRefreshNumFilterName: e.setNoNeedRefreshNumFilterName,
45
- onNotifyParent: e.notifyParent,
46
- onResetIsSelectAll: e.resetIsSelectAll
47
- }, null, 8, ["all-is-checkbox", "multi-select-list", "translate-user-id", "count-list", "item", "has-num"]))),
48
- 128
49
- /* KEYED_FRAGMENT */
50
- )),
51
- e.displayRangeInput ? (n(), o("div", A, [
52
- s(
53
- m(r.rangeLabel) + "  ",
54
- 1
55
- /* TEXT */
56
- ),
57
- a(c, {
58
- modelValue: e.rangeStart,
59
- "onUpdate:modelValue": l[0] || (l[0] = (t) => e.rangeStart = t),
60
- style: { "margin-left": "2px", width: "60px", height: "22px" },
61
- precision: 2,
62
- step: 0.01,
63
- min: 1,
64
- max: 100,
65
- controls: !1,
66
- onBlur: e.handleStartBlur
67
- }, null, 8, ["modelValue"]),
68
- s(
69
- "   %   " + m(r.rangeDelimiter) + "   ",
70
- 1
71
- /* TEXT */
72
- ),
73
- a(c, {
74
- modelValue: e.rangeEnd,
75
- "onUpdate:modelValue": l[1] || (l[1] = (t) => e.rangeEnd = t),
76
- style: { width: "60px", height: "22px" },
77
- precision: 2,
78
- step: 0.01,
79
- size: "small",
80
- max: 100,
81
- controls: !1,
82
- onChange: e.handleEndBlur
83
- }, null, 8, ["modelValue"]),
84
- l[2] || (l[2] = s(" %   "))
85
- ])) : u("v-if", !0)
10
+ }, Re = /* @__PURE__ */ oe({
11
+ name: "YaheeLeftCondition",
12
+ __name: "left-condition",
13
+ props: {
14
+ multiSelectList: { default: () => [] },
15
+ selectList: { default: () => [] },
16
+ countList: { default: () => [] },
17
+ totalCount: { default: 0 },
18
+ hasNum: { type: Boolean, default: !1 },
19
+ displayRangeInput: { type: Boolean, default: !1 },
20
+ rangeLabel: { default: "区间" },
21
+ rangeStartKey: { default: "rangeStart" },
22
+ rangeEndKey: { default: "rangeEnd" },
23
+ rangeDelimiter: { default: "——" },
24
+ allIsCheckbox: { type: Boolean },
25
+ allIsEmpty: { type: Boolean, default: !1 },
26
+ translateUserId: { type: Boolean },
27
+ staticSearch: { type: Boolean, default: !1 },
28
+ label: { default: "" },
29
+ noNeedRefreshNumFilterName: { default: "" },
30
+ filterKey: { default: "" },
31
+ defaultValues: { default: () => [] },
32
+ showTotal: { type: Boolean, default: !0 }
33
+ },
34
+ emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
35
+ setup(O, { expose: Y, emit: j }) {
36
+ const G = O, {
37
+ multiSelectList: w,
38
+ displayRangeInput: b,
39
+ selectList: p,
40
+ hasNum: H,
41
+ allIsEmpty: Q,
42
+ translateUserId: W,
43
+ label: X,
44
+ filterKey: g,
45
+ rangeStartKey: r,
46
+ rangeEndKey: i,
47
+ noNeedRefreshNumFilterName: $,
48
+ defaultValues: y,
49
+ totalCount: C,
50
+ countList: R,
51
+ showTotal: Z
52
+ } = re(G), _ = j, x = m(C.value), c = m(), f = m(), T = m(R.value), u = /* @__PURE__ */ new Map(), d = m(!1), h = m([]), k = () => {
53
+ console.log("left condition notifyParent start"), A(() => {
54
+ var o, N;
55
+ const e = L(), t = ae();
56
+ if (l.isEmpty(e) && l.isEmpty(t)) {
57
+ I();
58
+ return;
59
+ }
60
+ const a = [
61
+ {
62
+ filterKey: g.value,
63
+ checkedValues: l.map(e, (n) => n.value)
64
+ }
65
+ ];
66
+ b.value && (a.push({
67
+ filterKey: r.value,
68
+ checkedValues: [(o = u.get(r.value)) == null ? void 0 : o.value]
69
+ }), a.push({
70
+ filterKey: i.value,
71
+ checkedValues: [(N = u.get(i.value)) == null ? void 0 : N.value]
72
+ })), _("filterChange", a), console.log(
73
+ `left condition notifyParent nextTick after emit, filterKey: ${g.value}, checkedValues: ${JSON.stringify(l.map(e, (n) => n.value))}`
74
+ );
75
+ });
76
+ }, ee = () => {
77
+ _("setNoNeedRefreshNumFilterName");
78
+ }, U = () => {
79
+ E(), B({ label: r.value, selected: !0, value: c.value }), B({ label: i.value, selected: !0, value: f.value });
80
+ }, te = () => {
81
+ const e = u.get(r.value);
82
+ l.isEmpty(e) && !c.value || l.get(e, "value") === c.value || (U(), k());
83
+ }, le = () => {
84
+ const e = u.get(i.value);
85
+ l.isEmpty(e) && !f.value || l.get(e, "value") === f.value || (U(), k());
86
+ };
87
+ function B(e) {
88
+ console.log(`left condition setSelectedStatusMap start, item: ${JSON.stringify(e)}`), u.set(e.label, {
89
+ selected: e.selected,
90
+ value: e.value
91
+ }), d.value = l.eq(L().length, p.value.length);
92
+ }
93
+ function P(e) {
94
+ return l.includes(w.value, e.value);
95
+ }
96
+ function E() {
97
+ const e = l.map(L(), (t) => t.value);
98
+ u.clear(), l.forEach(h.value, (t) => {
99
+ l.includes(e, t.getValue().value) && t.resetValue();
100
+ }), d.value = !1;
101
+ }
102
+ const L = () => {
103
+ const e = l.filter(
104
+ Array.from(u.values()),
105
+ (t) => t.selected
106
+ );
107
+ return l.filter(e, (t) => {
108
+ const a = Array.from(u.keys()).find((o) => u.get(o) === t);
109
+ return ![r.value, i.value].includes(a);
110
+ });
111
+ }, ae = () => l.filter(Array.from(u.values()), (e) => {
112
+ const t = Array.from(u.keys()).find((a) => u.get(a) === e);
113
+ return [r.value, i.value].includes(t);
114
+ }), ue = () => {
115
+ d.value = !1;
116
+ }, ne = ie(() => l.sortBy(p.value, (e) => P(e))), D = () => {
117
+ c.value = void 0, f.value = void 0, u.delete(r.value), u.delete(i.value);
118
+ };
119
+ function I() {
120
+ E(), A(() => {
121
+ console.log("selectList.value:", p.value), d.value = !0;
122
+ const e = p.value.filter((a) => !P(a)), t = l.map(e, (a) => a.value);
123
+ _("filterChange", [
124
+ {
125
+ filterKey: g.value,
126
+ checkedValues: Q.value ? [] : t
127
+ }
128
+ ]);
129
+ }), b.value && D();
130
+ }
131
+ return ce(
132
+ [() => C.value, () => R.value],
133
+ ([e, t], [a, o]) => {
134
+ console.log(e, t), console.log(a, o), (!$.value || !l.eq($.value, g.value)) && (x.value = C.value, T.value = R.value);
135
+ }
136
+ ), Y({
137
+ clickAllSelected: I
138
+ }), fe(() => {
139
+ if (!Array.isArray(y.value) || l.isEmpty(y.value)) {
140
+ d.value = !0;
141
+ return;
142
+ }
143
+ console.log("defaultValues.value", y.value), console.log("itemRefs:", h.value), A(() => {
144
+ l.filter(h.value, (e) => e != null && e.getValue ? l.includes(y.value, e.getValue().value) : !1).forEach((e) => {
145
+ e.setCurrentValue(!0), e.setCheckboxValue(!0);
146
+ }), k();
147
+ });
148
+ }), (e, t) => {
149
+ const a = K("el-input-number"), o = K("el-form-item"), N = K("el-form");
150
+ return v(), S("div", he, [
151
+ V(N, null, {
152
+ default: q(() => [
153
+ V(o, { label: s(X) }, {
154
+ default: q(() => [
155
+ s(Z) ? (v(), S("span", {
156
+ key: 0,
157
+ class: "el-button custom-button el-button--small",
158
+ style: de(s(ye).getBackgroundColor(d.value)),
159
+ onClick: I
160
+ }, F(x.value ? `${s(J)("全部")}(${x.value})` : s(J)("全部")), 5)) : z("", !0),
161
+ (v(!0), S(me, null, ve(ne.value, (n, se) => (v(), pe(ge, {
162
+ key: se,
163
+ ref_for: !0,
164
+ ref_key: "itemRefs",
165
+ ref: h,
166
+ "all-is-checkbox": e.allIsCheckbox,
167
+ "multi-select-list": s(w),
168
+ "translate-user-id": s(W),
169
+ "count-list": T.value,
170
+ item: n,
171
+ "has-num": s(H),
172
+ onResetAllCheckedValue: E,
173
+ onSetSelectedStatusMap: B,
174
+ onResetRange: D,
175
+ onSetNoNeedRefreshNumFilterName: ee,
176
+ onNotifyParent: k,
177
+ onResetIsSelectAll: ue
178
+ }, null, 8, ["all-is-checkbox", "multi-select-list", "translate-user-id", "count-list", "item", "has-num"]))), 128)),
179
+ s(b) ? (v(), S("div", ke, [
180
+ M(F(e.rangeLabel) + "  ", 1),
181
+ V(a, {
182
+ modelValue: c.value,
183
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => c.value = n),
184
+ style: { "margin-left": "2px", width: "60px", height: "22px" },
185
+ precision: 2,
186
+ step: 0.01,
187
+ min: 1,
188
+ max: 100,
189
+ controls: !1,
190
+ onBlur: te
191
+ }, null, 8, ["modelValue"]),
192
+ M("   %   " + F(e.rangeDelimiter) + "   ", 1),
193
+ V(a, {
194
+ modelValue: f.value,
195
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => f.value = n),
196
+ style: { width: "60px", height: "22px" },
197
+ precision: 2,
198
+ step: 0.01,
199
+ size: "small",
200
+ max: 100,
201
+ controls: !1,
202
+ onChange: le
203
+ }, null, 8, ["modelValue"]),
204
+ t[2] || (t[2] = M(" %   "))
205
+ ])) : z("", !0)
206
+ ]),
207
+ _: 1
208
+ }, 8, ["label"])
86
209
  ]),
87
210
  _: 1
88
- /* STABLE */
89
- }, 8, ["label"])
90
- ]),
91
- _: 1
92
- /* STABLE */
93
- })
94
- ]);
95
- }
96
- const p = /* @__PURE__ */ y(g, [["render", C], ["__file", "E:/工作/项目代码/common_componentsweb/packages/components/src/left-condition/left-condition.vue"]]);
211
+ })
212
+ ]);
213
+ };
214
+ }
215
+ });
97
216
  export {
98
- p as default
217
+ Re as default
99
218
  };
@@ -1,155 +1,4 @@
1
- import { defineComponent as W, toRefs as X, ref as i, computed as Z, watch as ee, onMounted as te, nextTick as b } from "vue";
2
- import t from "../_virtual/lodash.js";
3
- import le from "./left-condition-sub.vue.js";
4
- import { stylesUtils as ae } from "../utils/style.js";
5
- import { M2 as re } from "../utils/translate.js";
6
- const fe = /* @__PURE__ */ W({
7
- name: "YaheeLeftCondition",
8
- __name: "left-condition",
9
- props: {
10
- multiSelectList: { type: Array, required: !1, default: () => [] },
11
- selectList: { type: Array, required: !0, default: () => [] },
12
- countList: { type: Array, required: !1, default: () => [] },
13
- totalCount: { type: Number, required: !1, default: 0 },
14
- hasNum: { type: Boolean, required: !1, default: !1 },
15
- displayRangeInput: { type: Boolean, required: !1, default: !1 },
16
- rangeLabel: { type: String, required: !1, default: "区间" },
17
- rangeStartKey: { type: String, required: !1, default: "rangeStart" },
18
- rangeEndKey: { type: String, required: !1, default: "rangeEnd" },
19
- rangeDelimiter: { type: String, required: !1, default: "——" },
20
- allIsCheckbox: { type: Boolean, required: !1 },
21
- allIsEmpty: { type: Boolean, required: !1, default: !1 },
22
- translateUserId: { type: Boolean, required: !1 },
23
- staticSearch: { type: Boolean, required: !1, default: !1 },
24
- label: { type: String, required: !1, default: "" },
25
- noNeedRefreshNumFilterName: { type: String, required: !1, default: "" },
26
- filterKey: { type: String, required: !0, default: "" },
27
- defaultValues: { type: Array, required: !1, default: () => [] },
28
- showTotal: { type: Boolean, required: !1, default: !0 }
29
- },
30
- emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
31
- setup(T, { expose: U, emit: O }) {
32
- const I = T, {
33
- multiSelectList: K,
34
- displayRangeInput: q,
35
- selectList: f,
36
- hasNum: $,
37
- allIsEmpty: _,
38
- translateUserId: J,
39
- label: j,
40
- filterKey: c,
41
- rangeStartKey: u,
42
- rangeEndKey: s,
43
- noNeedRefreshNumFilterName: k,
44
- defaultValues: d,
45
- totalCount: p,
46
- countList: g,
47
- showTotal: D
48
- } = X(I), m = O, B = i(p.value), v = i(), y = i(), M = i(g.value), a = /* @__PURE__ */ new Map(), n = i(!1), h = i([]), S = () => {
49
- console.log("left condition notifyParent start"), b(() => {
50
- var o, P;
51
- const e = N(), l = x();
52
- if (t.isEmpty(e) && t.isEmpty(l)) {
53
- L();
54
- return;
55
- }
56
- const r = [
57
- {
58
- filterKey: c.value,
59
- checkedValues: t.map(e, (R) => R.value)
60
- }
61
- ];
62
- q.value && (r.push({
63
- filterKey: u.value,
64
- checkedValues: [(o = a.get(u.value)) == null ? void 0 : o.value]
65
- }), r.push({
66
- filterKey: s.value,
67
- checkedValues: [(P = a.get(s.value)) == null ? void 0 : P.value]
68
- })), m("filterChange", r), console.log(
69
- `left condition notifyParent nextTick after emit, filterKey: ${c.value}, checkedValues: ${JSON.stringify(t.map(e, (R) => R.value))}`
70
- );
71
- });
72
- }, Y = () => {
73
- m("setNoNeedRefreshNumFilterName");
74
- }, V = () => {
75
- C(), A({ label: u.value, selected: !0, value: v.value }), A({ label: s.value, selected: !0, value: y.value });
76
- }, z = () => {
77
- const e = a.get(u.value);
78
- t.isEmpty(e) && !v.value || t.get(e, "value") === v.value || (V(), S());
79
- }, G = () => {
80
- const e = a.get(s.value);
81
- t.isEmpty(e) && !y.value || t.get(e, "value") === y.value || (V(), S());
82
- };
83
- function A(e) {
84
- console.log(`left condition setSelectedStatusMap start, item: ${JSON.stringify(e)}`), a.set(e.label, {
85
- selected: e.selected,
86
- value: e.value
87
- }), n.value = t.eq(N().length, f.value.length);
88
- }
89
- function E(e) {
90
- return t.includes(K.value, e.value);
91
- }
92
- function C() {
93
- const e = t.map(N(), (l) => l.value);
94
- a.clear(), t.forEach(h.value, (l) => {
95
- t.includes(e, l.getValue().value) && l.resetValue();
96
- }), n.value = !1;
97
- }
98
- const N = () => {
99
- const e = t.filter(
100
- Array.from(a.values()),
101
- (l) => l.selected
102
- );
103
- return t.filter(e, (l) => {
104
- const r = Array.from(a.keys()).find((o) => a.get(o) === l);
105
- return ![u.value, s.value].includes(r);
106
- });
107
- }, x = () => t.filter(Array.from(a.values()), (e) => {
108
- const l = Array.from(a.keys()).find((r) => a.get(r) === e);
109
- return [u.value, s.value].includes(l);
110
- }), H = () => {
111
- n.value = !1;
112
- }, Q = Z(() => t.sortBy(f.value, (e) => E(e))), F = () => {
113
- v.value = void 0, y.value = void 0, a.delete(u.value), a.delete(s.value);
114
- };
115
- function L() {
116
- C(), b(() => {
117
- console.log("selectList.value:", f.value), n.value = !0;
118
- const e = f.value.filter((r) => !E(r)), l = t.map(e, (r) => r.value);
119
- m("filterChange", [
120
- {
121
- filterKey: c.value,
122
- checkedValues: _.value ? [] : l
123
- }
124
- ]);
125
- }), q.value && F();
126
- }
127
- ee(
128
- [() => p.value, () => g.value],
129
- ([e, l], [r, o]) => {
130
- console.log(e, l), console.log(r, o), (!k.value || !t.eq(k.value, c.value)) && (B.value = p.value, M.value = g.value);
131
- }
132
- ), U({
133
- clickAllSelected: L
134
- }), te(() => {
135
- if (!Array.isArray(d.value) || t.isEmpty(d.value)) {
136
- n.value = !0;
137
- return;
138
- }
139
- console.log("defaultValues.value", d.value), console.log("itemRefs:", h.value), b(() => {
140
- t.filter(h.value, (e) => e != null && e.getValue ? t.includes(d.value, e.getValue().value) : !1).forEach((e) => {
141
- e.setCurrentValue(!0), e.setCheckboxValue(!0);
142
- }), S();
143
- });
144
- });
145
- const w = { props: I, multiSelectList: K, displayRangeInput: q, selectList: f, hasNum: $, allIsEmpty: _, translateUserId: J, label: j, filterKey: c, rangeStartKey: u, rangeEndKey: s, noNeedRefreshNumFilterName: k, defaultValues: d, totalCount: p, countList: g, showTotal: D, emit: m, totalNum: B, rangeStart: v, rangeEnd: y, numList: M, selectStatusMap: a, isSelectAll: n, itemRefs: h, notifyParent: S, setNoNeedRefreshNumFilterName: Y, setRangeStatus: V, handleStartBlur: z, handleEndBlur: G, setSelectedStatusMap: A, isMultiSelect: E, resetAllCheckedValue: C, getCheckedItem: N, getRangeItem: x, resetIsSelectAll: H, getSortedSelectedList: Q, resetRange: F, clickAllSelected: L, LeftConditionSub: le, get stylesUtils() {
146
- return ae;
147
- }, get M2() {
148
- return re;
149
- } };
150
- return Object.defineProperty(w, "__isScriptSetup", { enumerable: !1, value: !0 }), w;
151
- }
152
- });
1
+ import f from "./left-condition.vue.js";
153
2
  export {
154
- fe as default
3
+ f as default
155
4
  };
@@ -1,7 +1,7 @@
1
1
  import { withInstall as t } from "../utils/install.js";
2
2
  import o from "./left-condition-enum.vue.js";
3
- const e = t(o);
3
+ const n = t(o);
4
4
  export {
5
- e as YaheeLeftConditionEnum,
6
- e as default
5
+ n as YaheeLeftConditionEnum,
6
+ n as default
7
7
  };
@@ -1,21 +1,79 @@
1
- import n from "./left-condition-enum.vue2.js";
2
- import { createBlock as o, openBlock as l } from "vue";
3
- import i from "../_virtual/_plugin-vue_export-helper.js";
4
- function r(a, c, e, t, s, m) {
5
- return l(), o(t.BaseComponent, {
6
- "select-list": t.options,
7
- "count-list": e.countList,
8
- "total-count": e.totalCount,
9
- "filter-key": e.filterKey,
10
- "no-need-refresh-num-filter-name": e.noNeedRefreshNumFilterName,
11
- "all-is-checkbox": e.allIsCheckbox,
12
- "translate-user-id": e.translateUserId,
13
- "all-is-empty": e.allIsEmpty,
14
- onFilterChange: t.filterChange,
15
- onSetNoNeedRefreshNumFilterName: t.setNoNeedRefreshNumFilterName
16
- }, 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"]);
17
- }
18
- const h = /* @__PURE__ */ i(n, [["render", r], ["__file", "E:/工作/项目代码/common_componentsweb/packages/components/src/left-condition-enum/left-condition-enum.vue"]]);
1
+ import { defineComponent as c, ref as f, onMounted as d, createBlock as y, openBlock as N } from "vue";
2
+ import h from "../left-condition/left-condition.vue.js";
3
+ import { storage as a } from "../utils/storage.js";
4
+ const C = /* @__PURE__ */ c({
5
+ name: "YaheeLeftConditionEnum",
6
+ __name: "left-condition-enum",
7
+ props: {
8
+ selectList: {
9
+ type: Array,
10
+ default: () => []
11
+ },
12
+ countList: {
13
+ type: Array,
14
+ required: !1
15
+ },
16
+ enumEntity: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ filterKey: {
21
+ type: String,
22
+ default: ""
23
+ },
24
+ totalCount: {
25
+ type: Number,
26
+ required: !1
27
+ },
28
+ noNeedRefreshNumFilterName: {
29
+ type: String,
30
+ required: !1
31
+ },
32
+ allIsCheckbox: {
33
+ type: Boolean,
34
+ required: !1
35
+ },
36
+ allIsEmpty: {
37
+ type: Boolean,
38
+ required: !1
39
+ },
40
+ translateUserId: {
41
+ type: Boolean,
42
+ required: !1
43
+ },
44
+ initFilters: {
45
+ type: Function,
46
+ required: !0
47
+ }
48
+ },
49
+ emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
50
+ setup(e, { emit: s }) {
51
+ const t = e, o = s, n = f(t.selectList), u = (l) => {
52
+ o("filterChange", l);
53
+ }, m = () => {
54
+ o("setNoNeedRefreshNumFilterName", t.filterKey);
55
+ };
56
+ return d(() => {
57
+ const l = `filter-key-${t.enumEntity}`, r = a.getWithExpireTime(l);
58
+ r ? n.value = r : (console.log(t.enumEntity), t.initFilters(t.enumEntity).then((i) => {
59
+ n.value = i.data, a.setWithExpireTime(l, n.value, 1200 * 1e3), console.log(i);
60
+ }).catch((i) => {
61
+ console.log(i);
62
+ }));
63
+ }), (l, r) => (N(), y(h, {
64
+ "select-list": n.value,
65
+ "count-list": e.countList,
66
+ "total-count": e.totalCount,
67
+ "filter-key": e.filterKey,
68
+ "no-need-refresh-num-filter-name": e.noNeedRefreshNumFilterName,
69
+ "all-is-checkbox": e.allIsCheckbox,
70
+ "translate-user-id": e.translateUserId,
71
+ "all-is-empty": e.allIsEmpty,
72
+ onFilterChange: u,
73
+ onSetNoNeedRefreshNumFilterName: m
74
+ }, 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"]));
75
+ }
76
+ });
19
77
  export {
20
- h as default
78
+ C as default
21
79
  };