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