yahee-components 0.0.55 → 0.0.56
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/annex-upload/annex-upload.vue.js +154 -69
- package/es/annex-upload/annex-upload.vue2.js +2 -119
- package/es/annex-upload/index.js +3 -3
- package/es/api/tool.js +1 -1
- package/es/complex-search/complex-search.vue.js +320 -240
- package/es/complex-search/complex-search.vue2.js +2 -154
- package/es/complex-search/index.js +5 -5
- package/es/copy/copy.vue.js +55 -39
- package/es/copy/copy.vue2.js +2 -34
- package/es/copy/index.js +3 -3
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +204 -158
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +2 -125
- package/es/drop-down-condition/drop-down-condition.vue.js +211 -193
- package/es/drop-down-condition/drop-down-condition.vue2.js +2 -127
- package/es/image-upload/image-upload.vue.js +113 -76
- package/es/image-upload/image-upload.vue2.js +2 -91
- package/es/image-upload/index.js +3 -3
- package/es/input/index.js +3 -3
- package/es/input/input.vue.js +38 -17
- package/es/input/input.vue2.js +2 -33
- package/es/left-condition/index.js +5 -5
- package/es/left-condition/left-condition-sub.vue.js +86 -55
- package/es/left-condition/left-condition-sub.vue2.js +2 -76
- package/es/left-condition/left-condition.vue.js +211 -92
- package/es/left-condition/left-condition.vue2.js +2 -153
- package/es/left-condition-enum/index.js +3 -3
- package/es/left-condition-enum/left-condition-enum.vue.js +77 -19
- package/es/left-condition-enum/left-condition-enum.vue2.js +2 -69
- package/es/operation-log/operation-log-content.vue.js +92 -78
- package/es/operation-log/operation-log-content.vue2.js +2 -39
- package/es/operation-log/operation-log-dialog.vue.js +68 -57
- package/es/operation-log/operation-log-dialog.vue2.js +2 -38
- package/es/operation-log/operation-log-form.vue.js +183 -132
- package/es/operation-log/operation-log-form.vue2.js +2 -104
- package/es/operation-log/operation-log.vue.js +227 -186
- package/es/operation-log/operation-log.vue2.js +2 -135
- package/es/packages/components/api/log-server.js +5 -5
- package/es/packages/components/api/upload-server.js +1 -1
- package/es/packages/components/hooks/useImg.js +8 -8
- package/es/utils/translate.js +19 -19
- package/package.json +1 -1
- package/es/_virtual/_plugin-vue_export-helper.js +0 -9
|
@@ -1,207 +1,225 @@
|
|
|
1
|
-
import v from "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
_(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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,
|
|
34
121
|
"popper-class": "custom-dropdown",
|
|
35
|
-
onVisibleChange:
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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), {
|
|
127
|
+
key: e.value,
|
|
128
|
+
modelValue: n[e.text],
|
|
129
|
+
"onUpdate:modelValue": (l) => n[e.text] = l,
|
|
130
|
+
size: "small",
|
|
131
|
+
class: "checkbox-group inner-checkbox-group custom-dropdown-checkbox-group",
|
|
132
|
+
onChange: (l) => X(e)
|
|
133
|
+
}, {
|
|
134
|
+
default: d(() => [
|
|
135
|
+
u(s).isNil(e.subs) ? (a(), g(u(j), {
|
|
136
|
+
key: 1,
|
|
137
|
+
value: e.value,
|
|
138
|
+
class: "checkbox custom-dropdown-button",
|
|
139
|
+
border: ""
|
|
140
|
+
}, {
|
|
141
|
+
default: d(() => [
|
|
142
|
+
k(v(u(y)(e.text)), 1)
|
|
143
|
+
]),
|
|
144
|
+
_: 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))
|
|
169
|
+
]),
|
|
170
|
+
_: 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",
|
|
47
182
|
size: "small",
|
|
48
|
-
|
|
49
|
-
onChange: (t) => e.changeCheckbox(o)
|
|
183
|
+
onChange: Z
|
|
50
184
|
}, {
|
|
51
|
-
default:
|
|
52
|
-
e.
|
|
53
|
-
key:
|
|
54
|
-
|
|
55
|
-
|
|
185
|
+
default: d(() => [
|
|
186
|
+
e.isCheckbox ? (a(), g(u(j), {
|
|
187
|
+
key: 0,
|
|
188
|
+
class: "custom-dropdown-button",
|
|
189
|
+
value: e.value,
|
|
56
190
|
border: ""
|
|
57
191
|
}, {
|
|
58
|
-
default:
|
|
59
|
-
|
|
60
|
-
c(e.M2(o.text)),
|
|
61
|
-
1
|
|
62
|
-
/* TEXT */
|
|
63
|
-
)
|
|
192
|
+
default: d(() => [
|
|
193
|
+
k(v(u(y)(e.text)), 1)
|
|
64
194
|
]),
|
|
65
195
|
_: 2
|
|
66
|
-
|
|
67
|
-
}, 1032, ["value"])) : (l(), n(
|
|
68
|
-
s,
|
|
69
|
-
{ key: 0 },
|
|
70
|
-
[
|
|
71
|
-
k("span", {
|
|
72
|
-
class: "el-button custom-dropdown-button el-button--small inner-el-button",
|
|
73
|
-
style: x(e.selectedStyles[o.text]),
|
|
74
|
-
onClick: (t) => e.onClick(o)
|
|
75
|
-
}, c(e.M2(o.text)), 13, w),
|
|
76
|
-
k("div", V, [
|
|
77
|
-
(l(!0), n(
|
|
78
|
-
s,
|
|
79
|
-
null,
|
|
80
|
-
h(o.subs, (t) => (l(), d(e.ElCheckbox, {
|
|
81
|
-
key: t.value,
|
|
82
|
-
class: "checkbox custom-dropdown-button",
|
|
83
|
-
value: t.value,
|
|
84
|
-
border: ""
|
|
85
|
-
}, {
|
|
86
|
-
default: a(() => {
|
|
87
|
-
var u;
|
|
88
|
-
return [
|
|
89
|
-
r(
|
|
90
|
-
c(e.M2(t.text)),
|
|
91
|
-
1
|
|
92
|
-
/* TEXT */
|
|
93
|
-
),
|
|
94
|
-
e._.isEmpty(e.level2Num) ? i("v-if", !0) : (l(), n(
|
|
95
|
-
"span",
|
|
96
|
-
p,
|
|
97
|
-
"(" + c((u = e.level2Num.filter((b) => b.value == t.value)[0]) == null ? void 0 : u.count) + ")",
|
|
98
|
-
1
|
|
99
|
-
/* TEXT */
|
|
100
|
-
))
|
|
101
|
-
];
|
|
102
|
-
}),
|
|
103
|
-
_: 2
|
|
104
|
-
/* DYNAMIC */
|
|
105
|
-
}, 1032, ["value"]))),
|
|
106
|
-
128
|
|
107
|
-
/* KEYED_FRAGMENT */
|
|
108
|
-
))
|
|
109
|
-
])
|
|
110
|
-
],
|
|
111
|
-
64
|
|
112
|
-
/* STABLE_FRAGMENT */
|
|
113
|
-
))
|
|
196
|
+
}, 1032, ["value"])) : N("", !0)
|
|
114
197
|
]),
|
|
115
198
|
_: 2
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
key: o.value,
|
|
134
|
-
modelValue: e.totalCheckBoxStatus[o.text],
|
|
135
|
-
"onUpdate:modelValue": (t) => e.totalCheckBoxStatus[o.text] = t,
|
|
136
|
-
class: "checkbox-group",
|
|
137
|
-
size: "small",
|
|
138
|
-
onChange: e.singleChangeCheckbox
|
|
139
|
-
}, {
|
|
140
|
-
default: a(() => [
|
|
141
|
-
o.isCheckbox ? (l(), d(e.ElCheckbox, {
|
|
142
|
-
key: 0,
|
|
143
|
-
class: "custom-dropdown-button",
|
|
144
|
-
value: o.value,
|
|
145
|
-
border: ""
|
|
146
|
-
}, {
|
|
147
|
-
default: a(() => [
|
|
148
|
-
r(
|
|
149
|
-
c(e.M2(o.text)),
|
|
150
|
-
1
|
|
151
|
-
/* TEXT */
|
|
152
|
-
)
|
|
153
|
-
]),
|
|
154
|
-
_: 2
|
|
155
|
-
/* DYNAMIC */
|
|
156
|
-
}, 1032, ["value"])) : i("v-if", !0)
|
|
157
|
-
]),
|
|
158
|
-
_: 2
|
|
159
|
-
/* DYNAMIC */
|
|
160
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : (l(), d(e.ElButton, {
|
|
161
|
-
key: o.text,
|
|
162
|
-
style: x(e.selectedStyles[o.text]),
|
|
163
|
-
class: "custom-dropdown-button",
|
|
164
|
-
size: "small",
|
|
165
|
-
onClick: (t) => e.onClick(o)
|
|
166
|
-
}, {
|
|
167
|
-
default: a(() => {
|
|
168
|
-
var t;
|
|
169
|
-
return [
|
|
170
|
-
r(
|
|
171
|
-
c(e.M2(o.text)) + " ",
|
|
172
|
-
1
|
|
173
|
-
/* TEXT */
|
|
174
|
-
),
|
|
175
|
-
e._.isEmpty(e.level1Num) ? i("v-if", !0) : (l(), n(
|
|
176
|
-
"span",
|
|
177
|
-
E,
|
|
178
|
-
"(" + c((t = e.level1Num.filter((u) => u.value == o.value)[0]) == null ? void 0 : t.count) + ")",
|
|
179
|
-
1
|
|
180
|
-
/* TEXT */
|
|
181
|
-
))
|
|
182
|
-
];
|
|
183
|
-
}),
|
|
184
|
-
_: 2
|
|
185
|
-
/* DYNAMIC */
|
|
186
|
-
}, 1032, ["style", "onClick"]))
|
|
187
|
-
],
|
|
188
|
-
64
|
|
189
|
-
/* STABLE_FRAGMENT */
|
|
190
|
-
))),
|
|
191
|
-
256
|
|
192
|
-
/* UNKEYED_FRAGMENT */
|
|
193
|
-
))
|
|
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))
|
|
194
216
|
])
|
|
195
217
|
]),
|
|
196
218
|
_: 1
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
)
|
|
202
|
-
]);
|
|
203
|
-
}
|
|
204
|
-
const F = /* @__PURE__ */ C(v, [["render", S], ["__file", "E:/工作/项目代码/common_componentsweb/packages/components/src/drop-down-condition/drop-down-condition.vue"]]);
|
|
219
|
+
}, 512)
|
|
220
|
+
]));
|
|
221
|
+
}
|
|
222
|
+
});
|
|
205
223
|
export {
|
|
206
|
-
|
|
224
|
+
Ae as default
|
|
207
225
|
};
|
|
@@ -1,129 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
-
});
|
|
1
|
+
import f from "./drop-down-condition.vue.js";
|
|
127
2
|
export {
|
|
128
|
-
|
|
3
|
+
f as default
|
|
129
4
|
};
|