yahee-components 0.0.75 → 0.0.81

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 (62) hide show
  1. package/es/annex-upload/annex-upload.vue.js +51 -154
  2. package/es/annex-upload/annex-upload.vue2.js +119 -2
  3. package/es/annex-upload/index.js +3 -3
  4. package/es/api/server.js +24 -19
  5. package/es/api/tool.js +31 -28
  6. package/es/border-wrap/border-wrap.vue.js +64 -95
  7. package/es/border-wrap/border-wrap.vue2.js +46 -2
  8. package/es/common-import/common-import.vue.js +369 -640
  9. package/es/common-import/common-import.vue2.js +328 -2
  10. package/es/common-import/index.js +3 -3
  11. package/es/common-import/props.js +4 -1
  12. package/es/complex-search/complex-search.vue.js +15 -15
  13. package/es/copy/copy.vue.js +37 -55
  14. package/es/copy/copy.vue2.js +34 -2
  15. package/es/copy/index.js +3 -3
  16. package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +114 -213
  17. package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +125 -2
  18. package/es/drop-down-condition/drop-down-condition.vue.js +113 -213
  19. package/es/drop-down-condition/drop-down-condition.vue2.js +127 -2
  20. package/es/echart-gauge/echart-gauge.vue.js +12 -140
  21. package/es/echart-gauge/echart-gauge.vue2.js +147 -2
  22. package/es/echart-gauge/index.js +3 -3
  23. package/es/image-upload/image-upload.vue.js +109 -170
  24. package/es/image-upload/image-upload.vue2.js +91 -2
  25. package/es/image-upload/index.js +3 -3
  26. package/es/input/index.js +3 -3
  27. package/es/input/input.vue.js +17 -38
  28. package/es/input/input.vue2.js +33 -2
  29. package/es/left-condition/index.js +3 -3
  30. package/es/left-condition/left-condition-sub.vue.js +32 -91
  31. package/es/left-condition/left-condition-sub.vue2.js +76 -2
  32. package/es/left-condition/left-condition.vue.js +70 -218
  33. package/es/left-condition/left-condition.vue2.js +160 -2
  34. package/es/left-condition-enum/index.js +3 -3
  35. package/es/left-condition-enum/left-condition-enum.vue.js +20 -49
  36. package/es/left-condition-enum/left-condition-enum.vue2.js +40 -2
  37. package/es/operation-log/operation-log-content.vue.js +71 -92
  38. package/es/operation-log/operation-log-content.vue2.js +39 -2
  39. package/es/operation-log/operation-log-dialog.vue.js +46 -68
  40. package/es/operation-log/operation-log-dialog.vue2.js +38 -2
  41. package/es/operation-log/operation-log-form.vue.js +108 -183
  42. package/es/operation-log/operation-log-form.vue2.js +104 -2
  43. package/es/operation-log/operation-log.vue.js +119 -228
  44. package/es/operation-log/operation-log.vue2.js +135 -2
  45. package/es/packages/components/api/log-server.js +6 -6
  46. package/es/packages/components/api/server.js +18 -20
  47. package/es/packages/components/api/tool.js +35 -32
  48. package/es/packages/components/api/upload-server.js +1 -1
  49. package/es/packages/components/hooks/useEcharts.js +19 -19
  50. package/es/packages/components/hooks/useImg.js +8 -8
  51. package/es/scale-screen/index.js +4 -4
  52. package/es/scale-screen/scale-screen.vue.js +19 -126
  53. package/es/scale-screen/scale-screen.vue2.js +125 -2
  54. package/es/utils/translate.js +21 -21
  55. package/package.json +46 -46
  56. package/readme.md +249 -249
  57. package/types/src/common-import/common-import.vue.d.ts +10 -0
  58. package/types/src/common-import/index.d.ts +25 -0
  59. package/types/src/common-import/props.d.ts +19 -0
  60. package/types/src/installs.d.ts +25 -0
  61. package/types/src/left-condition-enum/left-condition-enum.d.ts +3 -0
  62. package/es/packages/components/api/common/index.js +0 -7
@@ -1,225 +1,125 @@
1
- import { defineComponent as se, ref as m, reactive as _, toRefs as ae, watch as re, onMounted as ce, createElementBlock as i, openBlock as a, createVNode as W, unref as u, normalizeStyle as R, withCtx as d, createTextVNode as k, createCommentVNode as N, toDisplayString as v, createElementVNode as E, Fragment as b, renderList as z, createBlock as g } from "vue";
2
- import s from "../_virtual/lodash.js";
3
- import { stylesUtils as U } from "../utils/style.js";
4
- import { storage as G } from "../utils/storage.js";
5
- import { M2 as y } from "../utils/translate.js";
6
- import { ElButton as P, ElDropdown as ie, ElCheckboxGroup as Y, ElCheckbox as j } from "element-plus";
7
- import "element-plus/theme-chalk/src/base.scss";
8
- import "element-plus/theme-chalk/src/button.scss";
9
- import "element-plus/theme-chalk/src/checkbox.scss";
10
- import "element-plus/theme-chalk/src/checkbox-group.scss";
11
- import "element-plus/theme-chalk/src/button-group.scss";
12
- import "element-plus/theme-chalk/src/popper.scss";
13
- import "element-plus/theme-chalk/src/scrollbar.scss";
14
- import "element-plus/theme-chalk/src/dropdown.scss";
15
- const de = { class: "yahee-drop-down-condition" }, ve = { key: 0 }, fe = { style: { display: "flex", "align-items": "center", outline: "none" } }, pe = { key: 0 }, he = { style: { display: "flex", width: "auto", padding: "10px" } }, me = ["onClick"], ge = { class: "scrollable-container" }, ye = { key: 0 }, Ae = /* @__PURE__ */ se({
16
- name: "YaheeDropDownCondition",
17
- __name: "drop-down-condition",
18
- props: {
19
- filterList: {},
20
- totalCount: {},
21
- level1Count: {},
22
- level2Count: {},
23
- filterKey: {},
24
- enumEntity: {},
25
- noNeedRefreshNumFilterName: {},
26
- initFilters: { type: Function }
27
- },
28
- emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
29
- setup(H, { emit: J }) {
30
- const Q = m(), n = _({});
31
- let K = _({});
32
- const c = _({}), p = _({}), h = m(!0), x = H, $ = J, { filterKey: w, filterList: M, totalCount: C, level1Count: V, level2Count: F, noNeedRefreshNumFilterName: O } = ae(x), T = m(s.get(C, "value", 0)), S = m(s.get(V, "value", [])), B = m(s.get(F, "value", [])), r = m();
33
- M.value && (r.value = [...M.value]);
34
- function q(t) {
35
- const { text: o, value: e } = t, l = n[o];
36
- s.isNil(l) || s.isEmpty(l) ? n[o] = [e] : n[o] = [], p[o] = !p[o], p[o] ? (oe(o), c[o] = U.getBackgroundColor(!0), h.value = !1) : (ne(o), c[t.text] = {}, h.value = !0), h.value = L(), D();
37
- }
38
- function L() {
39
- const t = r.value.filter((l) => !s.isEmpty(l.subs)).flatMap((l) => l.subs).length, o = r.value.filter((l) => s.isEmpty(l.subs)).length;
40
- return Object.values(n).map((l) => l.length).reduce((l, f) => l + f, 0) === t + o || s.isEmpty(Object.values(n).flat());
41
- }
42
- function X(t) {
43
- s.isEmpty(n[t.text]) ? (c[t.text] = {}, p[t.text] = !1) : n[t.text].length === s.get(t, "subs.length", 1) ? (c[t.text] = U.getBackgroundColor(!0), p[t.text] = !0) : c[t.text] = {
44
- backgroundColor: "#0F7535",
45
- color: "#fff",
46
- borderColor: "#0F7535"
47
- }, h.value = L(), D();
48
- }
49
- function Z() {
50
- h.value = L(), D();
51
- }
52
- function D() {
53
- $("setNoNeedRefreshNumFilterName", w.value);
54
- }
55
- function ee() {
56
- h.value = !0;
57
- for (const t in c)
58
- c[t] = {};
59
- for (const t in n)
60
- delete n[t];
61
- for (const t in p)
62
- delete p[t];
63
- I();
64
- }
65
- const te = (t) => U.getBackgroundColor(t);
66
- function le(t) {
67
- if (t)
68
- K = s.cloneDeep(n);
69
- else {
70
- if (s.isEqual(K, n))
71
- return;
72
- I();
73
- }
74
- }
75
- function I() {
76
- $("filterChange", [
77
- {
78
- filterKey: w.value,
79
- checkedValues: Object.values(n).flat()
80
- }
81
- ]);
82
- }
83
- function oe(t) {
84
- const o = r.value.find((e) => e.text === t);
85
- o && o.subs && (n[t] = o.subs.map((e) => e.value));
86
- }
87
- function ne(t) {
88
- n[t] = [];
89
- }
90
- function ue() {
91
- const t = `filter-key-${x.enumEntity}`, o = G.getWithExpireTime(t);
92
- o ? r.value = o : (console.log(x.enumEntity), x.initFilters(x.enumEntity).then((e) => {
93
- console.log(e), r.value = e.data, G.setWithExpireTime(t, r.value, 1200 * 1e3), console.log(r.value);
94
- }).catch((e) => {
95
- console.log(e);
96
- }));
97
- }
98
- return re(
99
- [() => C.value, () => V.value, () => F.value],
100
- ([t, o, e], [l, f, A]) => {
101
- console.log(t, o, e), console.log(l, f, A), (!O.value || !s.eq(O.value, w.value)) && (T.value = C.value, S.value = V.value, B.value = F.value);
102
- }
103
- ), ce(() => {
104
- ue();
105
- }), (t, o) => (a(), i("div", de, [
106
- W(u(P), {
107
- size: "small",
108
- class: "el-button el-button--small custom-total-button",
109
- style: R(te(h.value)),
110
- onClick: ee
111
- }, {
112
- default: d(() => [
113
- k(v(u(y)("全部")) + " ", 1),
114
- u(C) ? (a(), i("span", ve, "(" + v(T.value) + ")", 1)) : N("", !0)
115
- ]),
116
- _: 1
117
- }, 8, ["style"]),
118
- W(u(ie), {
119
- ref_key: "dropdown1",
120
- ref: Q,
121
- "popper-class": "custom-dropdown",
122
- onVisibleChange: le
123
- }, {
124
- dropdown: d(() => [
125
- E("div", he, [
126
- (a(!0), i(b, null, z(r.value, (e) => (a(), g(u(Y), {
1
+ import C from "./drop-down-condition.vue2.js";
2
+ import { createElementBlock as n, openBlock as l, createVNode as _, normalizeStyle as x, withCtx as a, createTextVNode as r, createCommentVNode as i, toDisplayString as c, createElementVNode as k, Fragment as s, renderList as h, createBlock as d } from "vue";
3
+ import m from "../_virtual/_plugin-vue_export-helper.js";
4
+ const v = { class: "yahee-drop-down-condition" }, y = { key: 0 }, f = { style: { display: "flex", "align-items": "center", outline: "none" } }, g = { key: 0 }, w = { style: { display: "flex", width: "auto", padding: "10px" } }, V = ["onClick"], p = { class: "scrollable-container" }, E = { key: 0 };
5
+ function S(N, B, D, o, M, z) {
6
+ return l(), n("div", v, [
7
+ _(o.ElButton, {
8
+ size: "small",
9
+ class: "el-button el-button--small custom-total-button",
10
+ style: x(o.getDefaultSelectedAllStyle(o.isSelectedAll)),
11
+ onClick: o.selectAll
12
+ }, {
13
+ default: a(() => [
14
+ r(c(o.M2("全部")) + " ", 1),
15
+ o.totalCount ? (l(), n("span", y, "(" + c(o.totalNum) + ")", 1)) : i("", !0)
16
+ ]),
17
+ _: 1
18
+ }, 8, ["style"]),
19
+ _(o.ElDropdown, {
20
+ ref: "dropdown1",
21
+ "popper-class": "custom-dropdown",
22
+ onVisibleChange: o.handleVisible
23
+ }, {
24
+ dropdown: a(() => [
25
+ k("div", w, [
26
+ (l(!0), n(s, null, h(o.selectList, (e) => (l(), d(o.ElCheckboxGroup, {
27
+ key: e.value,
28
+ modelValue: o.totalCheckBoxStatus[e.text],
29
+ "onUpdate:modelValue": (t) => o.totalCheckBoxStatus[e.text] = t,
30
+ size: "small",
31
+ class: "checkbox-group inner-checkbox-group custom-dropdown-checkbox-group",
32
+ onChange: (t) => o.changeCheckbox(e)
33
+ }, {
34
+ default: a(() => [
35
+ o._.isNil(e.subs) ? (l(), d(o.ElCheckbox, {
36
+ key: 1,
37
+ value: e.value,
38
+ class: "checkbox custom-dropdown-button",
39
+ border: ""
40
+ }, {
41
+ default: a(() => [
42
+ r(c(o.M2(e.text)), 1)
43
+ ]),
44
+ _: 2
45
+ }, 1032, ["value"])) : (l(), n(s, { key: 0 }, [
46
+ k("span", {
47
+ class: "el-button custom-dropdown-button el-button--small inner-el-button",
48
+ style: x(o.selectedStyles[e.text]),
49
+ onClick: (t) => o.onClick(e)
50
+ }, c(o.M2(e.text)), 13, V),
51
+ k("div", p, [
52
+ (l(!0), n(s, null, h(e.subs, (t) => (l(), d(o.ElCheckbox, {
53
+ key: t.value,
54
+ class: "checkbox custom-dropdown-button",
55
+ value: t.value,
56
+ border: ""
57
+ }, {
58
+ default: a(() => {
59
+ var u;
60
+ return [
61
+ r(c(o.M2(t.text)), 1),
62
+ o._.isEmpty(o.level2Num) ? i("", !0) : (l(), n("span", E, "(" + c((u = o.level2Num.filter((b) => b.value == t.value)[0]) == null ? void 0 : u.count) + ")", 1))
63
+ ];
64
+ }),
65
+ _: 2
66
+ }, 1032, ["value"]))), 128))
67
+ ])
68
+ ], 64))
69
+ ]),
70
+ _: 2
71
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]))), 128))
72
+ ])
73
+ ]),
74
+ default: a(() => [
75
+ k("div", f, [
76
+ (l(!0), n(s, null, h(o.selectList, (e) => (l(), n(s, null, [
77
+ e.isCheckbox ? (l(), d(o.ElCheckboxGroup, {
127
78
  key: e.value,
128
- modelValue: n[e.text],
129
- "onUpdate:modelValue": (l) => n[e.text] = l,
79
+ modelValue: o.totalCheckBoxStatus[e.text],
80
+ "onUpdate:modelValue": (t) => o.totalCheckBoxStatus[e.text] = t,
81
+ class: "checkbox-group",
130
82
  size: "small",
131
- class: "checkbox-group inner-checkbox-group custom-dropdown-checkbox-group",
132
- onChange: (l) => X(e)
83
+ onChange: o.singleChangeCheckbox
133
84
  }, {
134
- default: d(() => [
135
- u(s).isNil(e.subs) ? (a(), g(u(j), {
136
- key: 1,
85
+ default: a(() => [
86
+ e.isCheckbox ? (l(), d(o.ElCheckbox, {
87
+ key: 0,
88
+ class: "custom-dropdown-button",
137
89
  value: e.value,
138
- class: "checkbox custom-dropdown-button",
139
90
  border: ""
140
91
  }, {
141
- default: d(() => [
142
- k(v(u(y)(e.text)), 1)
92
+ default: a(() => [
93
+ r(c(o.M2(e.text)), 1)
143
94
  ]),
144
95
  _: 2
145
- }, 1032, ["value"])) : (a(), i(b, { key: 0 }, [
146
- E("span", {
147
- class: "el-button custom-dropdown-button el-button--small inner-el-button",
148
- style: R(c[e.text]),
149
- onClick: (l) => q(e)
150
- }, v(u(y)(e.text)), 13, me),
151
- E("div", ge, [
152
- (a(!0), i(b, null, z(e.subs, (l) => (a(), g(u(j), {
153
- key: l.value,
154
- class: "checkbox custom-dropdown-button",
155
- value: l.value,
156
- border: ""
157
- }, {
158
- default: d(() => {
159
- var f;
160
- return [
161
- k(v(u(y)(l.text)), 1),
162
- u(s).isEmpty(B.value) ? N("", !0) : (a(), i("span", ye, "(" + v((f = B.value.filter((A) => A.value == l.value)[0]) == null ? void 0 : f.count) + ")", 1))
163
- ];
164
- }),
165
- _: 2
166
- }, 1032, ["value"]))), 128))
167
- ])
168
- ], 64))
96
+ }, 1032, ["value"])) : i("", !0)
169
97
  ]),
170
98
  _: 2
171
- }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]))), 128))
172
- ])
173
- ]),
174
- default: d(() => [
175
- E("div", fe, [
176
- (a(!0), i(b, null, z(r.value, (e) => (a(), i(b, null, [
177
- e.isCheckbox ? (a(), g(u(Y), {
178
- key: e.value,
179
- modelValue: n[e.text],
180
- "onUpdate:modelValue": (l) => n[e.text] = l,
181
- class: "checkbox-group",
182
- size: "small",
183
- onChange: Z
184
- }, {
185
- default: d(() => [
186
- e.isCheckbox ? (a(), g(u(j), {
187
- key: 0,
188
- class: "custom-dropdown-button",
189
- value: e.value,
190
- border: ""
191
- }, {
192
- default: d(() => [
193
- k(v(u(y)(e.text)), 1)
194
- ]),
195
- _: 2
196
- }, 1032, ["value"])) : N("", !0)
197
- ]),
198
- _: 2
199
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : (a(), g(u(P), {
200
- key: e.text,
201
- style: R(c[e.text]),
202
- class: "custom-dropdown-button",
203
- size: "small",
204
- onClick: (l) => q(e)
205
- }, {
206
- default: d(() => {
207
- var l;
208
- return [
209
- k(v(u(y)(e.text)) + " ", 1),
210
- u(s).isEmpty(S.value) ? N("", !0) : (a(), i("span", pe, "(" + v((l = S.value.filter((f) => f.value == e.value)[0]) == null ? void 0 : l.count) + ")", 1))
211
- ];
212
- }),
213
- _: 2
214
- }, 1032, ["style", "onClick"]))
215
- ], 64))), 256))
216
- ])
217
- ]),
218
- _: 1
219
- }, 512)
220
- ]));
221
- }
222
- });
99
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : (l(), d(o.ElButton, {
100
+ key: e.text,
101
+ style: x(o.selectedStyles[e.text]),
102
+ class: "custom-dropdown-button",
103
+ size: "small",
104
+ onClick: (t) => o.onClick(e)
105
+ }, {
106
+ default: a(() => {
107
+ var t;
108
+ return [
109
+ r(c(o.M2(e.text)) + " ", 1),
110
+ o._.isEmpty(o.level1Num) ? i("", !0) : (l(), n("span", g, "(" + c((t = o.level1Num.filter((u) => u.value == e.value)[0]) == null ? void 0 : t.count) + ")", 1))
111
+ ];
112
+ }),
113
+ _: 2
114
+ }, 1032, ["style", "onClick"]))
115
+ ], 64))), 256))
116
+ ])
117
+ ]),
118
+ _: 1
119
+ }, 512)
120
+ ]);
121
+ }
122
+ const G = /* @__PURE__ */ m(C, [["render", S], ["__file", "D:/projects/frontend/common/common_componentsweb/packages/components/src/drop-down-condition/drop-down-condition.vue"]]);
223
123
  export {
224
- Ae as default
124
+ G as default
225
125
  };
@@ -1,4 +1,129 @@
1
- import f from "./drop-down-condition.vue.js";
1
+ import { defineComponent as U, ref as f, reactive as C, toRefs as Y, watch as $, onMounted as z } from "vue";
2
+ import n from "../_virtual/lodash.js";
3
+ import { stylesUtils as S } from "../utils/style.js";
4
+ import { storage as L } from "../utils/storage.js";
5
+ import { M2 as H } from "../utils/translate.js";
6
+ import { ElDropdown as J, ElCheckboxGroup as Q, ElCheckbox as X, ElButton as Z } from "element-plus";
7
+ import "element-plus/theme-chalk/src/base.scss";
8
+ import "element-plus/theme-chalk/src/button.scss";
9
+ import "element-plus/theme-chalk/src/checkbox.scss";
10
+ import "element-plus/theme-chalk/src/checkbox-group.scss";
11
+ import "element-plus/theme-chalk/src/button-group.scss";
12
+ import "element-plus/theme-chalk/src/popper.scss";
13
+ import "element-plus/theme-chalk/src/scrollbar.scss";
14
+ import "element-plus/theme-chalk/src/dropdown.scss";
15
+ const de = /* @__PURE__ */ U({
16
+ name: "YaheeDropDownCondition",
17
+ __name: "drop-down-condition",
18
+ props: {
19
+ filterList: { type: Array, required: !1 },
20
+ totalCount: { type: Number, required: !1 },
21
+ level1Count: { type: Array, required: !1 },
22
+ level2Count: { type: Array, required: !1 },
23
+ filterKey: { type: String, required: !0 },
24
+ enumEntity: { type: String, required: !0 },
25
+ noNeedRefreshNumFilterName: { type: String, required: !1 },
26
+ initFilters: { type: Function, required: !1 }
27
+ },
28
+ emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
29
+ setup(B, { expose: R, emit: K }) {
30
+ R();
31
+ const M = f(), l = C({});
32
+ let g = C({});
33
+ const s = C({}), i = C({}), a = f(!0), c = B, N = K, { filterKey: p, filterList: b, totalCount: d, level1Count: m, level2Count: v, noNeedRefreshNumFilterName: x } = Y(c), _ = f(n.get(d, "value", 0)), F = f(n.get(m, "value", [])), q = f(n.get(v, "value", [])), u = f();
34
+ b.value && (u.value = [...b.value]);
35
+ function O(e) {
36
+ const { text: t, value: r } = e, o = l[t];
37
+ n.isNil(o) || n.isEmpty(o) ? l[t] = [r] : l[t] = [], i[t] = !i[t], i[t] ? (A(t), s[t] = S.getBackgroundColor(!0), a.value = !1) : (j(t), s[e.text] = {}, a.value = !0), a.value = h(), y();
38
+ }
39
+ function h() {
40
+ const e = u.value.filter((o) => !n.isEmpty(o.subs)).flatMap((o) => o.subs).length, t = u.value.filter((o) => n.isEmpty(o.subs)).length;
41
+ return Object.values(l).map((o) => o.length).reduce((o, k) => o + k, 0) === e + t || n.isEmpty(Object.values(l).flat());
42
+ }
43
+ function G(e) {
44
+ n.isEmpty(l[e.text]) ? (s[e.text] = {}, i[e.text] = !1) : l[e.text].length === n.get(e, "subs.length", 1) ? (s[e.text] = S.getBackgroundColor(!0), i[e.text] = !0) : s[e.text] = {
45
+ backgroundColor: "#0F7535",
46
+ color: "#fff",
47
+ borderColor: "#0F7535"
48
+ }, a.value = h(), y();
49
+ }
50
+ function I() {
51
+ a.value = h(), y();
52
+ }
53
+ function y() {
54
+ N("setNoNeedRefreshNumFilterName", p.value);
55
+ }
56
+ function P() {
57
+ a.value = !0;
58
+ for (const e in s)
59
+ s[e] = {};
60
+ for (const e in l)
61
+ delete l[e];
62
+ for (const e in i)
63
+ delete i[e];
64
+ E();
65
+ }
66
+ const T = (e) => S.getBackgroundColor(e);
67
+ function V(e) {
68
+ if (e)
69
+ g = n.cloneDeep(l);
70
+ else {
71
+ if (n.isEqual(g, l))
72
+ return;
73
+ E();
74
+ }
75
+ }
76
+ function E() {
77
+ N("filterChange", [
78
+ {
79
+ filterKey: p.value,
80
+ checkedValues: Object.values(l).flat()
81
+ }
82
+ ]);
83
+ }
84
+ function A(e) {
85
+ const t = u.value.find((r) => r.text === e);
86
+ t && t.subs && (l[e] = t.subs.map((r) => r.value));
87
+ }
88
+ function j(e) {
89
+ l[e] = [];
90
+ }
91
+ function w() {
92
+ const e = `filter-key-${c.enumEntity}`, t = L.getWithExpireTime(e);
93
+ t ? u.value = t : (console.log(c.enumEntity), c.initFilters(c.enumEntity).then((r) => {
94
+ console.log(r), u.value = r.data, L.setWithExpireTime(e, u.value, 1200 * 1e3), console.log(u.value);
95
+ }).catch((r) => {
96
+ console.log(r);
97
+ }));
98
+ }
99
+ $(
100
+ [() => d.value, () => m.value, () => v.value],
101
+ ([e, t, r], [o, k, W]) => {
102
+ console.log(e, t, r), console.log(o, k, W), (!x.value || !n.eq(x.value, p.value)) && (_.value = d.value, F.value = m.value, q.value = v.value);
103
+ }
104
+ ), z(() => {
105
+ w();
106
+ });
107
+ const D = { dropdown1: M, totalCheckBoxStatus: l, get judgeChange() {
108
+ return g;
109
+ }, set judgeChange(e) {
110
+ g = e;
111
+ }, selectedStyles: s, selectedAllStatus: i, isSelectedAll: a, props: c, emit: N, filterKey: p, filterList: b, totalCount: d, level1Count: m, level2Count: v, noNeedRefreshNumFilterName: x, totalNum: _, level1Num: F, level2Num: q, selectList: u, onClick: O, getIsNeedSelectAll: h, changeCheckbox: G, singleChangeCheckbox: I, setNoNeedRefreshNumFilterName: y, selectAll: P, getDefaultSelectedAllStyle: T, handleVisible: V, updateParentForm: E, selectAllCheckboxes: A, deSelectCheckboxes: j, initData: w, get _() {
112
+ return n;
113
+ }, get M2() {
114
+ return H;
115
+ }, get ElButton() {
116
+ return Z;
117
+ }, get ElCheckbox() {
118
+ return X;
119
+ }, get ElCheckboxGroup() {
120
+ return Q;
121
+ }, get ElDropdown() {
122
+ return J;
123
+ } };
124
+ return Object.defineProperty(D, "__isScriptSetup", { enumerable: !1, value: !0 }), D;
125
+ }
126
+ });
2
127
  export {
3
- f as default
128
+ de as default
4
129
  };
@@ -1,142 +1,14 @@
1
- import { defineComponent as f, ref as p, watch as V, createElementBlock as m, openBlock as w } from "vue";
2
- import { useEcharts as b } from "../packages/components/hooks/useEcharts.js";
3
- import { mapValue as l, numberToFixed as y } from "../utils/charts.js";
4
- const $ = /* @__PURE__ */ f({
5
- __name: "echart-gauge",
6
- props: {
7
- data: {
8
- type: Number,
9
- default: 0
10
- },
11
- rangeValue: {
12
- type: Object,
13
- default: () => ({ low: 0, high: 0, reverse: !1 })
14
- }
15
- },
16
- setup(u) {
17
- const i = p(null), g = b(i), e = u;
18
- let t = [], r = 0;
19
- const s = () => e.rangeValue.reverse ? [
20
- [r / 100, t[0]],
21
- [0.5, t[1]],
22
- [1, t[2]]
23
- ] : [
24
- [0.5, t[0]],
25
- [r / 100, t[1]],
26
- [1, t[2]]
27
- ], d = () => {
28
- let a = 0;
29
- if (e.rangeValue.reverse)
30
- if (e.data >= 0 && e.data < e.rangeValue.low)
31
- a = l(e.data, 0, e.rangeValue.low, 0, r);
32
- else if (e.data >= e.rangeValue.low && e.data < e.rangeValue.high)
33
- a = l(e.data, e.rangeValue.low, e.rangeValue.high, r, 50);
34
- else if (e.data >= e.rangeValue.high && e.data <= 100)
35
- a = l(e.data, e.rangeValue.high, 100, 50, 100);
36
- else
37
- throw new Error("Input value must be between 0 and 100");
38
- else if (e.data >= 0 && e.data < e.rangeValue.low)
39
- a = l(e.data, 0, e.rangeValue.low, 0, 50);
40
- else if (e.data >= e.rangeValue.low && e.data < e.rangeValue.high)
41
- a = l(
42
- e.data,
43
- e.rangeValue.low,
44
- e.rangeValue.high,
45
- 50,
46
- r
47
- );
48
- else if (e.data >= e.rangeValue.high && e.data <= 100)
49
- a = l(e.data, e.rangeValue.high, 100, r, 100);
50
- else
51
- throw new Error("Input value must be between 0 and 100");
52
- return y(a);
53
- }, o = (a) => `<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${a};"></span>`, h = () => {
54
- const a = {
55
- tooltip: {
56
- trigger: "item",
57
- formatter: () => {
58
- let n = "";
59
- return n += `${o(t[0])} 0~${e.rangeValue.low}%<br>`, n += `${o(t[1])} ${e.rangeValue.low}%~${e.rangeValue.high}%<br>`, n += `${o(t[2])} ${e.rangeValue.high}%~100%`, n;
60
- }
61
- },
62
- series: [
63
- {
64
- type: "gauge",
65
- radius: "100%",
66
- axisLine: {
67
- lineStyle: {
68
- width: 8,
69
- color: s()
70
- }
71
- },
72
- pointer: {
73
- width: 3,
74
- itemStyle: {
75
- color: "auto"
76
- }
77
- },
78
- axisTick: {
79
- show: !0,
80
- splitNumber: 2,
81
- distance: 3,
82
- lineStyle: {
83
- opacity: 0.4
84
- }
85
- },
86
- splitLine: {
87
- show: !1
88
- },
89
- axisLabel: {
90
- show: !1,
91
- color: "#666",
92
- distance: 0,
93
- fontSize: 10
94
- },
95
- // "{value}%"
96
- detail: {
97
- fontSize: 16,
98
- valueAnimation: !0,
99
- formatter: () => `${e.data}%`,
100
- color: "inherit",
101
- offsetCenter: [0, 44]
102
- },
103
- data: [
104
- {
105
- value: d()
106
- }
107
- ]
108
- }
109
- ]
110
- };
111
- g.setOption(a);
112
- }, c = () => {
113
- e.rangeValue.reverse ? (t = ["#008b48", "#fadd1d", "#ffaa01"], r = l(
114
- e.rangeValue.low,
115
- 0,
116
- e.rangeValue.high,
117
- 0,
118
- 50
119
- )) : (t = ["#ffaa01", "#fadd1d", "#008b48"], r = l(
120
- e.rangeValue.high,
121
- e.rangeValue.low,
122
- 100,
123
- 50,
124
- 100
125
- ));
126
- };
127
- return V(
128
- () => e.data,
129
- (a) => {
130
- c(), h();
131
- },
132
- { immediate: !0 }
133
- ), (a, n) => (w(), m("div", {
134
- ref_key: "gaugeChart",
135
- ref: i,
136
- class: "yahee-echart-gauge"
137
- }, null, 512));
138
- }
139
- });
1
+ import e from "./echart-gauge.vue2.js";
2
+ import { createElementBlock as o, openBlock as t } from "vue";
3
+ import r from "../_virtual/_plugin-vue_export-helper.js";
4
+ const c = {
5
+ ref: "gaugeChart",
6
+ class: "yahee-echart-gauge"
7
+ };
8
+ function a(n, s, m, p, _, f) {
9
+ return t(), o("div", c, null, 512);
10
+ }
11
+ const h = /* @__PURE__ */ r(e, [["render", a], ["__file", "D:/projects/frontend/common/common_componentsweb/packages/components/src/echart-gauge/echart-gauge.vue"]]);
140
12
  export {
141
- $ as default
13
+ h as default
142
14
  };