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