yahee-components 0.0.60 → 0.0.61
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as re, toRefs as ie, ref as v, computed as ce, watch as fe, onMounted as de, nextTick as L, resolveComponent as K, createElementBlock as V, openBlock as p, createVNode as b, withCtx as q, unref as s, createCommentVNode as z, normalizeStyle as ve, toDisplayString as F, Fragment as me, renderList as pe, createBlock as ge, createTextVNode as M } from "vue";
|
|
2
|
-
import
|
|
2
|
+
import l from "../_virtual/lodash.js";
|
|
3
3
|
import ye from "./left-condition-sub.vue.js";
|
|
4
4
|
import { stylesUtils as he } from "../utils/style.js";
|
|
5
5
|
import { M2 as J } from "../utils/translate.js";
|
|
@@ -49,18 +49,18 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
49
49
|
totalCount: R,
|
|
50
50
|
countList: _,
|
|
51
51
|
showTotal: Z
|
|
52
|
-
} = ie(G), x = j, E = v(R.value), f = v(), d = v(), T = v(_.value), u = /* @__PURE__ */ new Map(), c = v(!
|
|
52
|
+
} = ie(G), x = j, E = v(R.value), f = v(), d = v(), T = v(_.value), u = /* @__PURE__ */ new Map(), c = v(!0), m = v([]), k = () => {
|
|
53
53
|
console.log("left condition notifyParent start"), L(() => {
|
|
54
54
|
var o, S;
|
|
55
|
-
const e = N(),
|
|
56
|
-
if (
|
|
55
|
+
const e = N(), t = ue();
|
|
56
|
+
if (l.isEmpty(e) && l.isEmpty(t)) {
|
|
57
57
|
I();
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
const a = [
|
|
61
61
|
{
|
|
62
62
|
filterKey: y.value,
|
|
63
|
-
checkedValues:
|
|
63
|
+
checkedValues: l.map(e, (n) => n.value)
|
|
64
64
|
}
|
|
65
65
|
];
|
|
66
66
|
C.value && (a.push({
|
|
@@ -70,89 +70,89 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
70
70
|
filterKey: i.value,
|
|
71
71
|
checkedValues: [(S = u.get(i.value)) == null ? void 0 : S.value]
|
|
72
72
|
})), x("filterChange", a), console.log(
|
|
73
|
-
`left condition notifyParent nextTick after emit, filterKey: ${y.value}, checkedValues: ${JSON.stringify(
|
|
73
|
+
`left condition notifyParent nextTick after emit, filterKey: ${y.value}, checkedValues: ${JSON.stringify(l.map(e, (n) => n.value))}`
|
|
74
74
|
);
|
|
75
75
|
});
|
|
76
76
|
}, ee = () => {
|
|
77
77
|
x("setNoNeedRefreshNumFilterName");
|
|
78
78
|
}, U = () => {
|
|
79
79
|
B(), A({ label: r.value, selected: !0, value: f.value }), A({ label: i.value, selected: !0, value: d.value });
|
|
80
|
-
}, le = () => {
|
|
81
|
-
const e = u.get(r.value);
|
|
82
|
-
t.isEmpty(e) && !f.value || t.get(e, "value") === f.value || (U(), k());
|
|
83
80
|
}, te = () => {
|
|
81
|
+
const e = u.get(r.value);
|
|
82
|
+
l.isEmpty(e) && !f.value || l.get(e, "value") === f.value || (U(), k());
|
|
83
|
+
}, le = () => {
|
|
84
84
|
const e = u.get(i.value);
|
|
85
|
-
|
|
85
|
+
l.isEmpty(e) && !d.value || l.get(e, "value") === d.value || (U(), k());
|
|
86
86
|
};
|
|
87
87
|
function A(e) {
|
|
88
88
|
console.log(`left condition setSelectedStatusMap start, item: ${JSON.stringify(e)}`), u.set(e.label, {
|
|
89
89
|
selected: e.selected,
|
|
90
90
|
value: e.value
|
|
91
|
-
}), c.value =
|
|
91
|
+
}), c.value = l.eq(N().length, g.value.length);
|
|
92
92
|
}
|
|
93
93
|
function P(e) {
|
|
94
|
-
return
|
|
94
|
+
return l.includes(w.value, e.value);
|
|
95
95
|
}
|
|
96
96
|
function B() {
|
|
97
|
-
const e =
|
|
98
|
-
u.clear(),
|
|
99
|
-
|
|
97
|
+
const e = l.map(N(), (t) => t.value);
|
|
98
|
+
u.clear(), l.forEach(m.value, (t) => {
|
|
99
|
+
l.includes(e, t.getValue().value) && t.resetValue();
|
|
100
100
|
}), c.value = !1;
|
|
101
101
|
}
|
|
102
102
|
function ae() {
|
|
103
|
-
const e =
|
|
104
|
-
u.clear(),
|
|
105
|
-
|
|
103
|
+
const e = l.map(N(), (t) => t.value);
|
|
104
|
+
u.clear(), l.forEach(m.value, (t) => {
|
|
105
|
+
l.includes(e, t.getValue().value) && t.resetValue();
|
|
106
106
|
}), c.value = !0;
|
|
107
107
|
}
|
|
108
108
|
const N = () => {
|
|
109
|
-
const e =
|
|
109
|
+
const e = l.filter(
|
|
110
110
|
Array.from(u.values()),
|
|
111
|
-
(
|
|
111
|
+
(t) => t.selected
|
|
112
112
|
);
|
|
113
|
-
return
|
|
114
|
-
const a = Array.from(u.keys()).find((o) => u.get(o) ===
|
|
113
|
+
return l.filter(e, (t) => {
|
|
114
|
+
const a = Array.from(u.keys()).find((o) => u.get(o) === t);
|
|
115
115
|
return ![r.value, i.value].includes(a);
|
|
116
116
|
});
|
|
117
|
-
}, ue = () =>
|
|
118
|
-
const
|
|
119
|
-
return [r.value, i.value].includes(
|
|
117
|
+
}, ue = () => l.filter(Array.from(u.values()), (e) => {
|
|
118
|
+
const t = Array.from(u.keys()).find((a) => u.get(a) === e);
|
|
119
|
+
return [r.value, i.value].includes(t);
|
|
120
120
|
}), ne = () => {
|
|
121
121
|
c.value = !1;
|
|
122
|
-
}, se = ce(() =>
|
|
122
|
+
}, se = ce(() => l.sortBy(g.value, (e) => P(e))), D = () => {
|
|
123
123
|
f.value = void 0, d.value = void 0, u.delete(r.value), u.delete(i.value);
|
|
124
124
|
};
|
|
125
125
|
function I() {
|
|
126
126
|
B(), L(() => {
|
|
127
127
|
console.log("selectList.value:", g.value), c.value = !0;
|
|
128
|
-
const e = g.value.filter((a) => !P(a)),
|
|
128
|
+
const e = g.value.filter((a) => !P(a)), t = l.map(e, (a) => a.value);
|
|
129
129
|
x("filterChange", [
|
|
130
130
|
{
|
|
131
131
|
filterKey: y.value,
|
|
132
|
-
checkedValues: Q.value ? [] :
|
|
132
|
+
checkedValues: Q.value ? [] : t
|
|
133
133
|
}
|
|
134
134
|
]);
|
|
135
135
|
}), C.value && D();
|
|
136
136
|
}
|
|
137
137
|
return fe(
|
|
138
138
|
[() => R.value, () => _.value],
|
|
139
|
-
([e,
|
|
140
|
-
console.log(e,
|
|
139
|
+
([e, t], [a, o]) => {
|
|
140
|
+
console.log(e, t), console.log(a, o), (!$.value || !l.eq($.value, y.value)) && (E.value = R.value, T.value = _.value);
|
|
141
141
|
}
|
|
142
142
|
), Y({
|
|
143
143
|
clickAllSelected: I,
|
|
144
144
|
resetAllCheckedValueAndSelectAll: ae
|
|
145
145
|
}), de(() => {
|
|
146
|
-
if (!Array.isArray(h.value) ||
|
|
146
|
+
if (!Array.isArray(h.value) || l.isEmpty(h.value)) {
|
|
147
147
|
c.value = !0;
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
console.log("defaultValues.value", h.value), console.log("itemRefs:", m.value), L(() => {
|
|
151
|
-
|
|
151
|
+
l.filter(m.value, (e) => e != null && e.getValue ? l.includes(h.value, e.getValue().value) : !1).forEach((e) => {
|
|
152
152
|
e.setCurrentValue(!0), e.setCheckboxValue(!0);
|
|
153
153
|
}), k();
|
|
154
154
|
});
|
|
155
|
-
}), (e,
|
|
155
|
+
}), (e, t) => {
|
|
156
156
|
const a = K("el-input-number"), o = K("el-form-item"), S = K("el-form");
|
|
157
157
|
return p(), V("div", ke, [
|
|
158
158
|
b(S, null, {
|
|
@@ -187,28 +187,28 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
187
187
|
M(F(e.rangeLabel) + " ", 1),
|
|
188
188
|
b(a, {
|
|
189
189
|
modelValue: f.value,
|
|
190
|
-
"onUpdate:modelValue":
|
|
190
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => f.value = n),
|
|
191
191
|
style: { "margin-left": "2px", width: "60px", height: "22px" },
|
|
192
192
|
precision: 2,
|
|
193
193
|
step: 0.01,
|
|
194
194
|
min: 1,
|
|
195
195
|
max: 100,
|
|
196
196
|
controls: !1,
|
|
197
|
-
onBlur:
|
|
197
|
+
onBlur: te
|
|
198
198
|
}, null, 8, ["modelValue"]),
|
|
199
199
|
M(" % " + F(e.rangeDelimiter) + " ", 1),
|
|
200
200
|
b(a, {
|
|
201
201
|
modelValue: d.value,
|
|
202
|
-
"onUpdate:modelValue":
|
|
202
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => d.value = n),
|
|
203
203
|
style: { width: "60px", height: "22px" },
|
|
204
204
|
precision: 2,
|
|
205
205
|
step: 0.01,
|
|
206
206
|
size: "small",
|
|
207
207
|
max: 100,
|
|
208
208
|
controls: !1,
|
|
209
|
-
onChange:
|
|
209
|
+
onChange: le
|
|
210
210
|
}, null, 8, ["modelValue"]),
|
|
211
|
-
|
|
211
|
+
t[2] || (t[2] = M(" % "))
|
|
212
212
|
])) : z("", !0)
|
|
213
213
|
]),
|
|
214
214
|
_: 1
|