yahee-components 0.0.12 → 0.0.13
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/api/tool.js +10 -11
- package/es/drop-down-condition/drop-down-condition.vue.js +42 -41
- package/es/left-condition/left-condition.vue.js +118 -116
- package/es/left-condition/style/index.css +2 -3
- package/es/left-condition-enum/left-condition-enum.vue.js +18 -14
- package/es/left-condition-enum/style/index.css +10 -0
- package/es/operation-log/operation-log-form.vue.js +179 -5
- package/es/operation-log/operation-log-form.vue2.js +2 -179
- package/es/operation-log/operation-log.vue.js +30 -30
- package/es/packages/components/api/server.js +26 -13
- package/es/packages/components/api/tool.js +9 -10
- package/es/style.css +12 -2
- package/lib/left-condition/style/index.css +2 -3
- package/lib/left-condition-enum/style/index.css +10 -0
- package/lib/style.css +12 -2
- package/package.json +1 -1
- package/types/src/drop-down-condition/drop-down-condition.vue.d.ts +2 -0
- package/types/src/drop-down-condition/index.d.ts +2 -0
- package/types/src/installs.d.ts +11 -0
- package/types/src/left-condition-enum/index.d.ts +9 -0
- package/types/src/left-condition-enum/left-condition-enum.vue.d.ts +9 -0
- package/es/_virtual/_plugin-vue_export-helper.js +0 -9
package/es/api/tool.js
CHANGED
|
@@ -7,11 +7,10 @@ import "element-plus/theme-chalk/src/button.scss";
|
|
|
7
7
|
import "element-plus/theme-chalk/src/input.scss";
|
|
8
8
|
import "element-plus/theme-chalk/src/overlay.scss";
|
|
9
9
|
import { AxiosHeaders as l } from "../node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js";
|
|
10
|
-
const
|
|
10
|
+
const w = (e) => ({
|
|
11
11
|
...e,
|
|
12
|
-
baseURL: i,
|
|
13
12
|
timeout: 2e4
|
|
14
|
-
}),
|
|
13
|
+
}), N = (e) => {
|
|
15
14
|
const o = new l(e.headers);
|
|
16
15
|
return {
|
|
17
16
|
...e,
|
|
@@ -19,7 +18,7 @@ const i = "https://plmerp.yaheecloud.com/api/plm/product-dev/", N = (e) => ({
|
|
|
19
18
|
};
|
|
20
19
|
};
|
|
21
20
|
let t = !1;
|
|
22
|
-
const
|
|
21
|
+
const R = (e) => {
|
|
23
22
|
const o = {
|
|
24
23
|
400: "错误的请求",
|
|
25
24
|
// token 失效
|
|
@@ -48,7 +47,7 @@ const U = (e) => {
|
|
|
48
47
|
}
|
|
49
48
|
};
|
|
50
49
|
var a = /* @__PURE__ */ ((e) => (e[e.AuthInvalid = 10031] = "AuthInvalid", e[e.AuthTooLong = 10032] = "AuthTooLong", e[e.UserHasNoRole = 10033] = "UserHasNoRole", e[e.UserNotRegistered = 10034] = "UserNotRegistered", e[e.ThirdPlatformUser = 10035] = "ThirdPlatformUser", e[e.NoRelatedEmployee = 10036] = "NoRelatedEmployee", e[e.CountInvalid = 10037] = "CountInvalid", e[e.CountNotFound = 10038] = "CountNotFound", e))(a || {});
|
|
51
|
-
const
|
|
50
|
+
const U = (e) => e in {
|
|
52
51
|
10031: "登录失效,需要重新登录",
|
|
53
52
|
// token 失效
|
|
54
53
|
10032: "您太久没登录,请重新登录~",
|
|
@@ -59,11 +58,11 @@ const C = (e) => e in {
|
|
|
59
58
|
10036: "该账户未关联员工,请联系管理员做关联",
|
|
60
59
|
10037: "账号已无效",
|
|
61
60
|
10038: "账号未找到"
|
|
62
|
-
} ? (n.error(a[e]), !1) : !0,
|
|
61
|
+
} ? (n.error(a[e]), !1) : !0, C = (e, o) => e !== 0 && o !== "OK" ? (n.error(o), !1) : !0;
|
|
63
62
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
U as handleAuthError,
|
|
64
|
+
w as handleChangeRequestHeader,
|
|
65
|
+
N as handleConfigureAuth,
|
|
66
|
+
C as handleGeneralError,
|
|
67
|
+
R as handleNetworkError
|
|
69
68
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as x, reactive as
|
|
1
|
+
import { defineComponent as ae, ref as x, reactive as V, toRefs as ce, watch as re, onMounted as ie, resolveComponent as w, openBlock as a, createElementBlock as v, createVNode as Y, normalizeStyle as j, withCtx as f, createTextVNode as y, toDisplayString as p, unref as r, createCommentVNode as S, createElementVNode as F, Fragment as _, renderList as K, createBlock as b } from "vue";
|
|
2
2
|
import s from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
|
|
3
3
|
import { Get as de } from "../api/server.js";
|
|
4
4
|
import { stylesUtils as M } from "../utils/style.js";
|
|
5
5
|
import { storage as H } from "../utils/storage.js";
|
|
6
|
-
import { M2 as
|
|
7
|
-
const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style: { display: "flex", "align-items": "center", outline: "none" } }, he = { key: 0 }, me = { style: { display: "flex", width: "auto", padding: "10px" } }, ge = ["onClick"], xe = { class: "scrollable-container" },
|
|
6
|
+
import { M2 as k } from "../utils/translate.js";
|
|
7
|
+
const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style: { display: "flex", "align-items": "center", outline: "none" } }, he = { key: 0 }, me = { style: { display: "flex", width: "auto", padding: "10px" } }, ge = ["onClick"], xe = { class: "scrollable-container" }, be = { key: 0 }, Ve = /* @__PURE__ */ ae({
|
|
8
8
|
name: "YaheeDropDownCondition",
|
|
9
9
|
__name: "drop-down-condition",
|
|
10
10
|
props: {
|
|
@@ -14,19 +14,20 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
|
|
|
14
14
|
level2Count: {},
|
|
15
15
|
filterKey: {},
|
|
16
16
|
enumEntity: {},
|
|
17
|
+
baseUrl: {},
|
|
17
18
|
noNeedRefreshNumFilterName: {}
|
|
18
19
|
},
|
|
19
20
|
emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
|
|
20
21
|
setup(J, { emit: Q }) {
|
|
21
|
-
const X = x(), o =
|
|
22
|
-
let O =
|
|
23
|
-
const i =
|
|
22
|
+
const X = x(), o = V({});
|
|
23
|
+
let O = V({});
|
|
24
|
+
const i = V({}), h = V({}), m = x(!0), C = J, T = Q, { filterKey: L, filterList: q, totalCount: N, level1Count: B, level2Count: U, noNeedRefreshNumFilterName: I } = ce(C), W = x(s.get(N, "value", 0)), A = x(s.get(B, "value", [])), R = x(s.get(U, "value", [])), d = x();
|
|
24
25
|
q.value && (d.value = [...q.value]);
|
|
25
26
|
function G(e) {
|
|
26
27
|
const { text: l, value: u } = e, n = o[l];
|
|
27
|
-
s.isNil(n) || s.isEmpty(n) ? o[l] = [u] : o[l] = [], h[l] = !h[l], h[l] ? (ne(l), i[l] = M.getBackgroundColor(!0), m.value = !1) : (se(l), i[e.text] = {}, m.value = !0), m.value =
|
|
28
|
+
s.isNil(n) || s.isEmpty(n) ? o[l] = [u] : o[l] = [], h[l] = !h[l], h[l] ? (ne(l), i[l] = M.getBackgroundColor(!0), m.value = !1) : (se(l), i[e.text] = {}, m.value = !0), m.value = $(), z();
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function $() {
|
|
30
31
|
const e = d.value.filter((n) => !s.isEmpty(n.subs)).flatMap((n) => n.subs).length, l = d.value.filter((n) => s.isEmpty(n.subs)).length;
|
|
31
32
|
return Object.values(o).map((n) => n.length).reduce((n, g) => n + g, 0) === e + l || s.isEmpty(Object.values(o).flat());
|
|
32
33
|
}
|
|
@@ -35,12 +36,12 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
|
|
|
35
36
|
backgroundColor: "#0F7535",
|
|
36
37
|
color: "#fff",
|
|
37
38
|
borderColor: "#0F7535"
|
|
38
|
-
}, m.value =
|
|
39
|
+
}, m.value = $(), z();
|
|
39
40
|
}
|
|
40
41
|
function ee() {
|
|
41
|
-
m.value =
|
|
42
|
+
m.value = $(), z();
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function z() {
|
|
44
45
|
T("setNoNeedRefreshNumFilterName", L.value);
|
|
45
46
|
}
|
|
46
47
|
function te() {
|
|
@@ -79,19 +80,19 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
|
|
|
79
80
|
o[e] = [];
|
|
80
81
|
}
|
|
81
82
|
return re(
|
|
82
|
-
[() =>
|
|
83
|
-
([e, l, u], [n, g,
|
|
84
|
-
console.log(e, l, u), console.log(n, g,
|
|
83
|
+
[() => N.value, () => B.value, () => U.value],
|
|
84
|
+
([e, l, u], [n, g, D]) => {
|
|
85
|
+
console.log(e, l, u), console.log(n, g, D), (!I.value || !s.eq(I.value, L.value)) && (W.value = N.value, A.value = B.value, R.value = U.value);
|
|
85
86
|
}
|
|
86
87
|
), ie(() => {
|
|
87
|
-
const e = `filter-key-${
|
|
88
|
-
l ? d.value = l : de(
|
|
88
|
+
const e = `filter-key-${C.enumEntity}`, l = H.getWithExpireTime(e);
|
|
89
|
+
l ? d.value = l : de(`${C.baseUrl}/${C.enumEntity}`).then((u) => {
|
|
89
90
|
d.value = u.data, H.setWithExpireTime(e, d.value, 1200 * 1e3);
|
|
90
91
|
}).catch((u) => {
|
|
91
92
|
console.log(u);
|
|
92
93
|
});
|
|
93
94
|
}), (e, l) => {
|
|
94
|
-
const u =
|
|
95
|
+
const u = w("el-button"), n = w("el-checkbox"), g = w("el-checkbox-group"), D = w("el-dropdown");
|
|
95
96
|
return a(), v("div", ve, [
|
|
96
97
|
Y(u, {
|
|
97
98
|
size: "small",
|
|
@@ -100,19 +101,19 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
|
|
|
100
101
|
onClick: te
|
|
101
102
|
}, {
|
|
102
103
|
default: f(() => [
|
|
103
|
-
|
|
104
|
-
r(
|
|
104
|
+
y(p(r(k)("全部")) + " ", 1),
|
|
105
|
+
r(N) ? (a(), v("span", fe, "(" + p(W.value) + ")", 1)) : S("", !0)
|
|
105
106
|
]),
|
|
106
107
|
_: 1
|
|
107
108
|
}, 8, ["style"]),
|
|
108
|
-
Y(
|
|
109
|
+
Y(D, {
|
|
109
110
|
ref_key: "dropdown1",
|
|
110
111
|
ref: X,
|
|
111
112
|
onVisibleChange: oe
|
|
112
113
|
}, {
|
|
113
114
|
dropdown: f(() => [
|
|
114
|
-
|
|
115
|
-
(a(!0), v(
|
|
115
|
+
F("div", me, [
|
|
116
|
+
(a(!0), v(_, null, K(d.value, (t) => (a(), b(g, {
|
|
116
117
|
key: t.value,
|
|
117
118
|
modelValue: o[t.text],
|
|
118
119
|
"onUpdate:modelValue": (c) => o[t.text] = c,
|
|
@@ -121,34 +122,34 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
|
|
|
121
122
|
onChange: (c) => Z(t)
|
|
122
123
|
}, {
|
|
123
124
|
default: f(() => [
|
|
124
|
-
r(s).isNil(t.subs) ? (a(),
|
|
125
|
+
r(s).isNil(t.subs) ? (a(), b(n, {
|
|
125
126
|
key: 1,
|
|
126
127
|
value: t.value,
|
|
127
128
|
class: "checkbox custom-button",
|
|
128
129
|
border: ""
|
|
129
130
|
}, {
|
|
130
131
|
default: f(() => [
|
|
131
|
-
|
|
132
|
+
y(p(r(k)(t.text)), 1)
|
|
132
133
|
]),
|
|
133
134
|
_: 2
|
|
134
|
-
}, 1032, ["value"])) : (a(), v(
|
|
135
|
-
|
|
135
|
+
}, 1032, ["value"])) : (a(), v(_, { key: 0 }, [
|
|
136
|
+
F("span", {
|
|
136
137
|
class: "el-button custom-button el-button--small inner-el-button",
|
|
137
138
|
style: j(i[t.text]),
|
|
138
139
|
onClick: (c) => G(t)
|
|
139
|
-
}, p(r(
|
|
140
|
-
|
|
141
|
-
(a(!0), v(
|
|
140
|
+
}, p(r(k)(t.text)), 13, ge),
|
|
141
|
+
F("div", xe, [
|
|
142
|
+
(a(!0), v(_, null, K(t.subs, (c) => (a(), b(n, {
|
|
142
143
|
key: c.value,
|
|
143
144
|
class: "checkbox custom-button",
|
|
144
145
|
value: c.value,
|
|
145
146
|
border: ""
|
|
146
147
|
}, {
|
|
147
148
|
default: f(() => {
|
|
148
|
-
var
|
|
149
|
+
var E;
|
|
149
150
|
return [
|
|
150
|
-
|
|
151
|
-
r(s).isEmpty(
|
|
151
|
+
y(p(r(k)(c.text)), 1),
|
|
152
|
+
r(s).isEmpty(R.value) ? S("", !0) : (a(), v("span", be, "(" + p((E = R.value.filter((ue) => ue.value == c.value)[0]) == null ? void 0 : E.count) + ")", 1))
|
|
152
153
|
];
|
|
153
154
|
}),
|
|
154
155
|
_: 2
|
|
@@ -161,9 +162,9 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
|
|
|
161
162
|
])
|
|
162
163
|
]),
|
|
163
164
|
default: f(() => [
|
|
164
|
-
|
|
165
|
-
(a(!0), v(
|
|
166
|
-
t.isCheckbox ? (a(),
|
|
165
|
+
F("div", pe, [
|
|
166
|
+
(a(!0), v(_, null, K(d.value, (t) => (a(), v(_, null, [
|
|
167
|
+
t.isCheckbox ? (a(), b(g, {
|
|
167
168
|
key: t.value,
|
|
168
169
|
modelValue: o[t.text],
|
|
169
170
|
"onUpdate:modelValue": (c) => o[t.text] = c,
|
|
@@ -172,20 +173,20 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
|
|
|
172
173
|
onChange: ee
|
|
173
174
|
}, {
|
|
174
175
|
default: f(() => [
|
|
175
|
-
t.isCheckbox ? (a(),
|
|
176
|
+
t.isCheckbox ? (a(), b(n, {
|
|
176
177
|
key: 0,
|
|
177
178
|
class: "custom-button",
|
|
178
179
|
value: t.value,
|
|
179
180
|
border: ""
|
|
180
181
|
}, {
|
|
181
182
|
default: f(() => [
|
|
182
|
-
|
|
183
|
+
y(p(r(k)(t.text)), 1)
|
|
183
184
|
]),
|
|
184
185
|
_: 2
|
|
185
|
-
}, 1032, ["value"])) :
|
|
186
|
+
}, 1032, ["value"])) : S("", !0)
|
|
186
187
|
]),
|
|
187
188
|
_: 2
|
|
188
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])) : (a(),
|
|
189
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : (a(), b(u, {
|
|
189
190
|
key: t.text,
|
|
190
191
|
style: j(i[t.text]),
|
|
191
192
|
class: "custom-button",
|
|
@@ -195,8 +196,8 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style
|
|
|
195
196
|
default: f(() => {
|
|
196
197
|
var c;
|
|
197
198
|
return [
|
|
198
|
-
|
|
199
|
-
r(s).isEmpty(
|
|
199
|
+
y(p(r(k)(t.text)), 1),
|
|
200
|
+
r(s).isEmpty(A.value) ? S("", !0) : (a(), v("span", he, "(" + p((c = A.value.filter((E) => E.value == t.value)[0]) == null ? void 0 : c.count) + ")", 1))
|
|
200
201
|
];
|
|
201
202
|
}),
|
|
202
203
|
_: 2
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ue, toRefs as se, ref as m, computed as oe, watch as re, onMounted as ie, resolveComponent as I, openBlock as y, createElementBlock as L, createVNode as h, withCtx as T, unref as o, createElementVNode as ce, normalizeStyle as fe, toDisplayString as K, Fragment as de, renderList as me, createBlock as ve, createTextVNode as A, createCommentVNode as pe, nextTick as q } from "vue";
|
|
2
2
|
import l from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
|
|
3
3
|
import ge from "./left-condition-sub.vue.js";
|
|
4
4
|
import { stylesUtils as ye } from "../utils/style.js";
|
|
5
|
-
import { M2 as
|
|
6
|
-
const he = {
|
|
5
|
+
import { M2 as z } from "../utils/translate.js";
|
|
6
|
+
const he = { class: "yahee-left-condition" }, Ne = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "el-button custom-button el-button--small",
|
|
9
9
|
style: { "margin-left": "5px", display: "inline-flex" }
|
|
10
|
-
},
|
|
10
|
+
}, _e = /* @__PURE__ */ ue({
|
|
11
11
|
name: "YaheeLeftCondition",
|
|
12
12
|
__name: "left-condition",
|
|
13
13
|
props: {
|
|
@@ -31,28 +31,28 @@ const he = {
|
|
|
31
31
|
defaultValues: { default: () => [] }
|
|
32
32
|
},
|
|
33
33
|
emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
|
|
34
|
-
setup(
|
|
35
|
-
const
|
|
36
|
-
multiSelectList:
|
|
37
|
-
displayRangeInput:
|
|
38
|
-
selectList:
|
|
39
|
-
hasNum:
|
|
40
|
-
allIsEmpty:
|
|
41
|
-
translateUserId:
|
|
42
|
-
label:
|
|
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
43
|
filterKey: v,
|
|
44
44
|
rangeStartKey: r,
|
|
45
45
|
rangeEndKey: i,
|
|
46
|
-
noNeedRefreshNumFilterName:
|
|
47
|
-
defaultValues:
|
|
48
|
-
totalCount:
|
|
49
|
-
countList:
|
|
50
|
-
} =
|
|
51
|
-
console.log("left condition notifyParent start"),
|
|
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
52
|
var s, g;
|
|
53
|
-
const e =
|
|
53
|
+
const e = E(), t = te();
|
|
54
54
|
if (l.isEmpty(e) && l.isEmpty(t)) {
|
|
55
|
-
|
|
55
|
+
B();
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
const a = [
|
|
@@ -61,43 +61,43 @@ const he = {
|
|
|
61
61
|
checkedValues: l.map(e, (u) => u.value)
|
|
62
62
|
}
|
|
63
63
|
];
|
|
64
|
-
|
|
64
|
+
N.value && (a.push({
|
|
65
65
|
filterKey: r.value,
|
|
66
66
|
checkedValues: [(s = n.get(r.value)) == null ? void 0 : s.value]
|
|
67
67
|
}), a.push({
|
|
68
68
|
filterKey: i.value,
|
|
69
69
|
checkedValues: [(g = n.get(i.value)) == null ? void 0 : g.value]
|
|
70
|
-
})),
|
|
70
|
+
})), b("filterChange", a), console.log(
|
|
71
71
|
`left condition notifyParent nextTick after emit, filterKey: ${v.value}, checkedValues: ${JSON.stringify(l.map(e, (u) => u.value))}`
|
|
72
72
|
);
|
|
73
73
|
});
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
},
|
|
74
|
+
}, X = () => {
|
|
75
|
+
b("setNoNeedRefreshNumFilterName");
|
|
76
|
+
}, U = () => {
|
|
77
77
|
R(), x({ label: r.value, selected: !0, value: c.value }), x({ label: i.value, selected: !0, value: f.value });
|
|
78
|
-
},
|
|
78
|
+
}, Z = () => {
|
|
79
79
|
const e = n.get(r.value);
|
|
80
|
-
l.isEmpty(e) && !c.value || l.get(e, "value") === c.value || (
|
|
81
|
-
},
|
|
80
|
+
l.isEmpty(e) && !c.value || l.get(e, "value") === c.value || (U(), p());
|
|
81
|
+
}, ee = () => {
|
|
82
82
|
const e = n.get(i.value);
|
|
83
|
-
l.isEmpty(e) && !f.value || l.get(e, "value") === f.value || (
|
|
83
|
+
l.isEmpty(e) && !f.value || l.get(e, "value") === f.value || (U(), p());
|
|
84
84
|
};
|
|
85
85
|
function x(e) {
|
|
86
86
|
console.log(`left condition setSelectedStatusMap start, item: ${JSON.stringify(e)}`), n.set(e.label, {
|
|
87
87
|
selected: e.selected,
|
|
88
88
|
value: e.value
|
|
89
|
-
}), d.value = l.eq(
|
|
89
|
+
}), d.value = l.eq(E().length, k.value.length);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return l.includes(
|
|
91
|
+
function P(e) {
|
|
92
|
+
return l.includes(F.value, e.value);
|
|
93
93
|
}
|
|
94
94
|
function R() {
|
|
95
|
-
const e = l.map(
|
|
96
|
-
n.clear(), l.forEach(
|
|
95
|
+
const e = l.map(E(), (t) => t.value);
|
|
96
|
+
n.clear(), l.forEach(_.value, (t) => {
|
|
97
97
|
l.includes(e, t.getValue().value) && t.resetValue();
|
|
98
98
|
}), d.value = !1;
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const E = () => {
|
|
101
101
|
const e = l.filter(
|
|
102
102
|
Array.from(n.values()),
|
|
103
103
|
(t) => t.selected
|
|
@@ -106,109 +106,111 @@ const he = {
|
|
|
106
106
|
const a = Array.from(n.keys()).find((s) => n.get(s) === t);
|
|
107
107
|
return ![r.value, i.value].includes(a);
|
|
108
108
|
});
|
|
109
|
-
},
|
|
109
|
+
}, te = () => l.filter(Array.from(n.values()), (e) => {
|
|
110
110
|
const t = Array.from(n.keys()).find((a) => n.get(a) === e);
|
|
111
111
|
return [r.value, i.value].includes(t);
|
|
112
|
-
}),
|
|
112
|
+
}), le = () => {
|
|
113
113
|
d.value = !1;
|
|
114
|
-
},
|
|
114
|
+
}, ae = oe(() => l.sortBy(k.value, (e) => P(e))), D = () => {
|
|
115
115
|
c.value = void 0, f.value = void 0, n.delete(r.value), n.delete(i.value);
|
|
116
116
|
};
|
|
117
|
-
function
|
|
118
|
-
R(),
|
|
117
|
+
function B() {
|
|
118
|
+
R(), q(() => {
|
|
119
119
|
d.value = !0;
|
|
120
|
-
const e =
|
|
121
|
-
|
|
120
|
+
const e = k.value.filter((a) => !P(a)), t = l.map(e, (a) => a.value);
|
|
121
|
+
b("filterChange", [
|
|
122
122
|
{
|
|
123
123
|
filterKey: v.value,
|
|
124
|
-
checkedValues:
|
|
124
|
+
checkedValues: H.value ? [] : t
|
|
125
125
|
}
|
|
126
126
|
]);
|
|
127
|
-
}),
|
|
127
|
+
}), N.value && D();
|
|
128
128
|
}
|
|
129
|
-
return
|
|
130
|
-
[() =>
|
|
129
|
+
return re(
|
|
130
|
+
[() => S.value, () => V.value],
|
|
131
131
|
([e, t], [a, s]) => {
|
|
132
|
-
console.log(e, t), console.log(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
133
|
}
|
|
134
|
-
),
|
|
135
|
-
clickAllSelected:
|
|
136
|
-
}),
|
|
137
|
-
if (l.isEmpty(
|
|
134
|
+
), O({
|
|
135
|
+
clickAllSelected: B
|
|
136
|
+
}), ie(() => {
|
|
137
|
+
if (l.isEmpty($.value)) {
|
|
138
138
|
d.value = !0;
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
l.filter(
|
|
142
|
-
|
|
143
|
-
(e) => l.includes(
|
|
142
|
+
_.value,
|
|
143
|
+
(e) => l.includes($.value, e.getValue().value)
|
|
144
144
|
).forEach((e) => {
|
|
145
145
|
e.setCurrentValue(!0), e.setCheckboxValue(!0);
|
|
146
146
|
}), p();
|
|
147
147
|
}), (e, t) => {
|
|
148
|
-
const a =
|
|
149
|
-
return y(),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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: fe(o(ye).getBackgroundColor(d.value)),
|
|
157
|
+
onClick: B
|
|
158
|
+
}, K(C.value ? `${o(z)("全部")}(${C.value})` : o(z)("全部")), 5),
|
|
159
|
+
(y(!0), L(de, null, me(ae.value, (u, ne) => (y(), ve(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
|
+
])) : pe("", !0)
|
|
204
|
+
]),
|
|
205
|
+
_: 1
|
|
206
|
+
}, 8, ["label"])
|
|
207
|
+
]),
|
|
208
|
+
_: 1
|
|
209
|
+
})
|
|
210
|
+
]);
|
|
209
211
|
};
|
|
210
212
|
}
|
|
211
213
|
});
|
|
212
214
|
export {
|
|
213
|
-
|
|
215
|
+
_e as default
|
|
214
216
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
.yahee-left-condition .custom-button + .custom-button {
|
|
2
2
|
margin-left: 5px;
|
|
3
3
|
margin-bottom: 5px;
|
|
4
4
|
position: relative;
|
|
5
5
|
top: 2px;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
:deep(.custom-button) {
|
|
7
|
+
.yahee-left-condition .custom-button {
|
|
9
8
|
padding: 1px 4px;
|
|
10
9
|
height: 22px;
|
|
11
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as f, ref as c, onMounted as d, openBlock as y, createBlock as N } from "vue";
|
|
2
2
|
import h from "../left-condition/left-condition.vue.js";
|
|
3
|
-
import { Get as p } from "../api/server.js";
|
|
4
3
|
import { storage as o } from "../utils/storage.js";
|
|
4
|
+
import { Get as p } from "../packages/components/api/server.js";
|
|
5
5
|
const E = /* @__PURE__ */ f({
|
|
6
6
|
name: "YaheeLeftConditionEnum",
|
|
7
7
|
__name: "left-condition-enum",
|
|
@@ -10,6 +10,10 @@ const E = /* @__PURE__ */ f({
|
|
|
10
10
|
type: Array,
|
|
11
11
|
default: () => []
|
|
12
12
|
},
|
|
13
|
+
baseUrl: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
13
17
|
countList: {
|
|
14
18
|
type: Array,
|
|
15
19
|
required: !1
|
|
@@ -45,20 +49,20 @@ const E = /* @__PURE__ */ f({
|
|
|
45
49
|
},
|
|
46
50
|
emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
|
|
47
51
|
setup(e, { emit: s }) {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
+
const t = e, i = s, r = c(t.selectList), u = (l) => {
|
|
53
|
+
i("filterChange", l);
|
|
54
|
+
}, m = () => {
|
|
55
|
+
i("setNoNeedRefreshNumFilterName", t.filterKey);
|
|
52
56
|
};
|
|
53
57
|
return d(() => {
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}).catch((
|
|
58
|
-
console.log(
|
|
58
|
+
const l = `filter-key-${t.enumEntity}`, n = o.getWithExpireTime(l);
|
|
59
|
+
n ? r.value = n : p(`${t.baseUrl}/${t.enumEntity}`).then((a) => {
|
|
60
|
+
r.value = a.data, o.setWithExpireTime(l, r.value, 1200 * 1e3);
|
|
61
|
+
}).catch((a) => {
|
|
62
|
+
console.log(a);
|
|
59
63
|
});
|
|
60
|
-
}), (
|
|
61
|
-
"select-list":
|
|
64
|
+
}), (l, n) => (y(), N(h, {
|
|
65
|
+
"select-list": r.value,
|
|
62
66
|
"count-list": e.countList,
|
|
63
67
|
"total-count": e.totalCount,
|
|
64
68
|
"filter-key": e.filterKey,
|
|
@@ -66,8 +70,8 @@ const E = /* @__PURE__ */ f({
|
|
|
66
70
|
"all-is-checkbox": e.allIsCheckbox,
|
|
67
71
|
"translate-user-id": e.translateUserId,
|
|
68
72
|
"all-is-empty": e.allIsEmpty,
|
|
69
|
-
onFilterChange:
|
|
70
|
-
onSetNoNeedRefreshNumFilterName:
|
|
73
|
+
onFilterChange: u,
|
|
74
|
+
onSetNoNeedRefreshNumFilterName: m
|
|
71
75
|
}, 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"]));
|
|
72
76
|
}
|
|
73
77
|
});
|