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