yahee-components 0.0.40 → 0.0.41

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.
Files changed (42) hide show
  1. package/es/annex-upload/annex-upload.vue.js +154 -69
  2. package/es/annex-upload/annex-upload.vue2.js +2 -119
  3. package/es/annex-upload/index.js +3 -3
  4. package/es/api/tool.js +1 -1
  5. package/es/complex-search/complex-search.vue.js +294 -240
  6. package/es/complex-search/complex-search.vue2.js +2 -130
  7. package/es/complex-search/index.js +5 -5
  8. package/es/copy/copy.vue.js +55 -39
  9. package/es/copy/copy.vue2.js +2 -34
  10. package/es/copy/index.js +3 -3
  11. package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +204 -158
  12. package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +2 -125
  13. package/es/drop-down-condition/drop-down-condition.vue.js +211 -193
  14. package/es/drop-down-condition/drop-down-condition.vue2.js +2 -127
  15. package/es/image-upload/image-upload.vue.js +113 -76
  16. package/es/image-upload/image-upload.vue2.js +2 -91
  17. package/es/image-upload/index.js +3 -3
  18. package/es/input/index.js +3 -3
  19. package/es/input/input.vue.js +38 -17
  20. package/es/input/input.vue2.js +2 -33
  21. package/es/left-condition/index.js +5 -5
  22. package/es/left-condition/left-condition-sub.vue.js +86 -55
  23. package/es/left-condition/left-condition-sub.vue2.js +2 -76
  24. package/es/left-condition/left-condition.vue.js +209 -91
  25. package/es/left-condition/left-condition.vue2.js +2 -152
  26. package/es/left-condition-enum/index.js +3 -3
  27. package/es/left-condition-enum/left-condition-enum.vue.js +77 -19
  28. package/es/left-condition-enum/left-condition-enum.vue2.js +2 -69
  29. package/es/operation-log/operation-log-content.vue.js +88 -78
  30. package/es/operation-log/operation-log-content.vue2.js +2 -35
  31. package/es/operation-log/operation-log-dialog.vue.js +68 -57
  32. package/es/operation-log/operation-log-dialog.vue2.js +2 -38
  33. package/es/operation-log/operation-log-form.vue.js +183 -132
  34. package/es/operation-log/operation-log-form.vue2.js +2 -104
  35. package/es/operation-log/operation-log.vue.js +222 -183
  36. package/es/operation-log/operation-log.vue2.js +2 -133
  37. package/es/packages/components/api/log-server.js +5 -5
  38. package/es/packages/components/api/upload-server.js +1 -1
  39. package/es/packages/components/hooks/useImg.js +8 -8
  40. package/es/utils/translate.js +19 -19
  41. package/package.json +1 -1
  42. package/es/_virtual/_plugin-vue_export-helper.js +0 -9
@@ -1,173 +1,219 @@
1
- import f from "./country-platform-shop-condition.vue2.js";
2
- import { createElementBlock as n, openBlock as o, createVNode as p, withCtx as a, createElementVNode as t, normalizeStyle as d, Fragment as i, renderList as s, toDisplayString as y, createBlock as m, createTextVNode as b } from "vue";
3
- import k from "../_virtual/_plugin-vue_export-helper.js";
4
- const G = { class: "yahee-country-platform-shop-condition" }, V = { class: "popover-table" }, C = { id: "all" }, S = ["onClick"], g = { id: "y" }, E = ["onClick"], v = { style: { display: "flex", "align-items": "center", outline: "none" } };
5
- function w(x, T, F, l, B, D) {
6
- return o(), n("div", G, [
7
- p(l.ElPopover, {
8
- placement: "bottom",
9
- trigger: "hover",
10
- width: "'auto'",
11
- "popper-class": "custom-popover",
12
- onHide: l.handleHide,
13
- onShow: l.handleShow
14
- }, {
15
- reference: a(() => [
16
- t("div", v, [
17
- p(l.ElButton, {
18
- size: "small",
19
- class: "el-button custom-total-button",
20
- style: d(l.getDefaultSelectedAllStyle(l.isSelectedAll)),
21
- onClick: l.selectAll
22
- }, {
23
- default: a(() => [
24
- b(
25
- y(l.M2("全部")),
26
- 1
27
- /* TEXT */
28
- )
29
- ]),
30
- _: 1
31
- /* STABLE */
32
- }, 8, ["style"]),
33
- (o(!0), n(
34
- i,
35
- null,
36
- s(l.selectList, (r) => (o(), m(l.ElButton, {
37
- key: r,
38
- style: d(l.rowTitleStyle[r.xGroupValue]),
1
+ import { defineComponent as A, toRefs as I, reactive as z, ref as G, watch as ee, createElementBlock as f, openBlock as s, createVNode as E, unref as c, withCtx as V, createElementVNode as i, normalizeStyle as b, Fragment as g, renderList as C, toDisplayString as k, createBlock as D, createTextVNode as L } from "vue";
2
+ import { stylesUtils as le } from "../utils/style.js";
3
+ import { M2 as N } from "../utils/translate.js";
4
+ import R from "../_virtual/lodash.js";
5
+ import { ElPopover as oe, ElCheckboxGroup as te, ElCheckbox as ue, ElButton as U } from "element-plus";
6
+ import "element-plus/theme-chalk/src/base.scss";
7
+ import "element-plus/theme-chalk/src/button.scss";
8
+ import "element-plus/theme-chalk/src/checkbox.scss";
9
+ import "element-plus/theme-chalk/src/checkbox-group.scss";
10
+ import "element-plus/theme-chalk/src/popper.scss";
11
+ import "element-plus/theme-chalk/src/popover.scss";
12
+ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "popover-table" }, ne = { id: "all" }, se = ["onClick"], ce = { id: "y" }, ie = ["onClick"], pe = { style: { display: "flex", "align-items": "center", outline: "none" } }, ke = /* @__PURE__ */ A({
13
+ name: "YaheeCountryPlatformShopCondition",
14
+ __name: "country-platform-shop-condition",
15
+ props: {
16
+ xyFilters: {},
17
+ filterKey: {}
18
+ },
19
+ emits: ["filterChange"],
20
+ setup(H, { emit: P }) {
21
+ const q = H, { filterKey: M, xyFilters: r } = I(q), Y = P, u = z({});
22
+ let w = z({});
23
+ const m = G({}), _ = G({}), y = G(!0), x = G({}), S = G({}), K = G();
24
+ r.value && (K.value = [...r.value.xGroup]);
25
+ function J(o, a) {
26
+ var e;
27
+ return (e = r.value) == null ? void 0 : e.items.filter((l) => l.xGroupValue === o && l.yGroupValue === a);
28
+ }
29
+ function F(o) {
30
+ var e;
31
+ const a = o.xGroupValue;
32
+ if (x.value[a]) {
33
+ for (const l in u)
34
+ l.startsWith(a) && delete u[l];
35
+ x.value[a] = !1;
36
+ } else {
37
+ for (const l of (e = r.value) == null ? void 0 : e.items)
38
+ if (l.xGroupValue === a) {
39
+ let t = u[`${l.xGroupValue}-${l.yGroupValue}`];
40
+ t ? (t.push(l.value), t = [...new Set(t)]) : t = [l.value], u[`${l.xGroupValue}-${l.yGroupValue}`] = t;
41
+ }
42
+ x.value[a] = !0;
43
+ }
44
+ }
45
+ const T = (o) => le.getBackgroundColor(o), Q = () => {
46
+ R.isEqual(w, u) || Y("filterChange", [
47
+ {
48
+ filterKey: M.value,
49
+ checkedValues: Object.values(Object.values(u)).flat()
50
+ }
51
+ ]);
52
+ }, X = () => {
53
+ w = R.cloneDeep(u);
54
+ };
55
+ function j() {
56
+ if (y.value)
57
+ y.value = !1, Object.keys(u).forEach((o) => {
58
+ delete u[o];
59
+ });
60
+ else {
61
+ y.value = !0;
62
+ for (const o of r.value.items) {
63
+ let a = u[`${o.xGroupValue}-${o.yGroupValue}`];
64
+ a ? a.push(o.value) : a = [o.value], u[`${o.xGroupValue}-${o.yGroupValue}`] = a;
65
+ }
66
+ }
67
+ console.log(u);
68
+ }
69
+ function Z(o) {
70
+ const a = o.yGroupValue;
71
+ if (S.value[a]) {
72
+ for (const e in u)
73
+ e.endsWith(a) && delete u[e];
74
+ S.value[a] = !1;
75
+ } else {
76
+ for (const e of r.value.items)
77
+ if (e.yGroupValue === a) {
78
+ let l = u[`${e.xGroupValue}-${e.yGroupValue}`];
79
+ l ? (l.push(e.value), l = [...new Set(l)]) : l = [e.value], u[`${e.xGroupValue}-${e.yGroupValue}`] = l;
80
+ }
81
+ S.value[a] = !0;
82
+ }
83
+ }
84
+ return ee(
85
+ u,
86
+ (o, a) => {
87
+ var p, B, O, W;
88
+ Object.keys(o).forEach((n) => {
89
+ Array.isArray(o[n]) && o[n].length === 0 && delete o[n];
90
+ }), console.log("新的数组:", o), console.log("旧的数组:", a);
91
+ const e = { backgroundColor: "#3366CC", color: "#fff", borderColor: "#3366CC" }, l = { backgroundColor: "#00bfff", borderColor: "#00bfff" }, t = {}, h = (p = r.value) == null ? void 0 : p.xGroup.length, v = (B = r.value) == null ? void 0 : B.yGroup.length;
92
+ (O = r.value) == null || O.xGroup.forEach((n) => {
93
+ let d = 0;
94
+ for (const $ in u)
95
+ $.startsWith(n.xGroupValue) && d++;
96
+ d === 0 ? m.value[n.xGroupValue] = t : d === v ? m.value[n.xGroupValue] = e : m.value[n.xGroupValue] = l;
97
+ }), (W = r.value) == null || W.yGroup.forEach((n) => {
98
+ let d = 0;
99
+ for (const $ in u)
100
+ $.endsWith(n.yGroupValue) && d++;
101
+ d === 0 ? _.value[n.yGroupValue] = t : d === h ? _.value[n.yGroupValue] = e : _.value[n.yGroupValue] = l;
102
+ }), y.value = Object.keys(o).length === h * v;
103
+ },
104
+ { deep: !0 }
105
+ ), (o, a) => (s(), f("div", ae, [
106
+ E(c(oe), {
107
+ placement: "bottom",
108
+ trigger: "hover",
109
+ width: "'auto'",
110
+ "popper-class": "custom-popover",
111
+ onHide: Q,
112
+ onShow: X
113
+ }, {
114
+ reference: V(() => [
115
+ i("div", pe, [
116
+ E(c(U), {
117
+ size: "small",
118
+ class: "el-button custom-total-button",
119
+ style: b(T(y.value)),
120
+ onClick: j
121
+ }, {
122
+ default: V(() => [
123
+ L(k(c(N)("全部")), 1)
124
+ ]),
125
+ _: 1
126
+ }, 8, ["style"]),
127
+ (s(!0), f(g, null, C(K.value, (e) => (s(), D(c(U), {
128
+ key: e,
129
+ style: b(m.value[e.xGroupValue]),
39
130
  class: "custom-button",
40
- onClick: (h) => l.toggleRowSelection(r)
131
+ onClick: (l) => F(e)
41
132
  }, {
42
- default: a(() => [
43
- b(
44
- y(l.M2(r.xGroupText)),
45
- 1
46
- /* TEXT */
47
- )
133
+ default: V(() => [
134
+ L(k(c(N)(e.xGroupText)), 1)
48
135
  ]),
49
136
  _: 2
50
- /* DYNAMIC */
51
- }, 1032, ["style", "onClick"]))),
52
- 128
53
- /* KEYED_FRAGMENT */
54
- ))
55
- ])
56
- ]),
57
- default: a(() => {
58
- var r, h;
59
- return [
60
- t("table", V, [
61
- t("thead", null, [
62
- t("tr", null, [
63
- t("th", C, [
64
- t(
65
- "span",
66
- {
67
- style: d(l.getDefaultSelectedAllStyle(l.isSelectedAll)),
137
+ }, 1032, ["style", "onClick"]))), 128))
138
+ ])
139
+ ]),
140
+ default: V(() => {
141
+ var e, l;
142
+ return [
143
+ i("table", re, [
144
+ i("thead", null, [
145
+ i("tr", null, [
146
+ i("th", ne, [
147
+ i("span", {
148
+ style: b(T(y.value)),
68
149
  class: "el-button el-button--small custom-button",
69
- onClick: l.selectAll
70
- },
71
- " 全部 ",
72
- 4
73
- /* STYLE */
74
- )
75
- ]),
76
- (o(!0), n(
77
- i,
78
- null,
79
- s((r = l.xyFilters) == null ? void 0 : r.xGroup, (e) => (o(), n("th", {
150
+ onClick: j
151
+ }, " 全部 ", 4)
152
+ ]),
153
+ (s(!0), f(g, null, C((e = c(r)) == null ? void 0 : e.xGroup, (t) => (s(), f("th", {
80
154
  id: "x",
81
- key: e.xGroupValue
155
+ key: t.xGroupValue
82
156
  }, [
83
- t("span", {
84
- style: d({ ...l.rowTitleStyle[e.xGroupValue], width: "100%" }),
157
+ i("span", {
158
+ style: b({ ...m.value[t.xGroupValue], width: "100%" }),
85
159
  class: "el-button--small el-button custom-button",
86
- onClick: (_) => l.toggleRowSelection(e)
87
- }, y(e.xGroupText), 13, S)
88
- ]))),
89
- 128
90
- /* KEYED_FRAGMENT */
91
- ))
92
- ])
93
- ]),
94
- t("tbody", null, [
95
- (o(!0), n(
96
- i,
97
- null,
98
- s((h = l.xyFilters) == null ? void 0 : h.yGroup, (e) => {
99
- var _;
100
- return o(), n("tr", {
101
- key: e.yGroupValue
160
+ onClick: (h) => F(t)
161
+ }, k(t.xGroupText), 13, se)
162
+ ]))), 128))
163
+ ])
164
+ ]),
165
+ i("tbody", null, [
166
+ (s(!0), f(g, null, C((l = c(r)) == null ? void 0 : l.yGroup, (t) => {
167
+ var h;
168
+ return s(), f("tr", {
169
+ key: t.yGroupValue
102
170
  }, [
103
- t("th", g, [
104
- t("span", {
105
- style: d({ ...l.columnTitleStyle[e.yGroupValue], width: "100%" }),
171
+ i("th", ce, [
172
+ i("span", {
173
+ style: b({ ..._.value[t.yGroupValue], width: "100%" }),
106
174
  class: "el-button--small el-button custom-button",
107
- onClick: (c) => l.toggleColumnSelection(e)
108
- }, y(e.yGroupText), 13, E)
175
+ onClick: (v) => Z(t)
176
+ }, k(t.yGroupText), 13, ie)
109
177
  ]),
110
- (o(!0), n(
111
- i,
112
- null,
113
- s((_ = l.xyFilters) == null ? void 0 : _.xGroup, (c) => (o(), n("td", {
114
- key: c.xGroupValue
115
- }, [
116
- p(l.ElCheckboxGroup, {
117
- modelValue: l.checkList[c.xGroupValue + "-" + e.yGroupValue],
118
- "onUpdate:modelValue": (u) => l.checkList[c.xGroupValue + "-" + e.yGroupValue] = u
119
- }, {
120
- default: a(() => [
121
- (o(!0), n(
122
- i,
123
- null,
124
- s(l.getContentForCell(
125
- c.xGroupValue,
126
- e.yGroupValue
127
- ), (u) => (o(), m(l.ElCheckbox, {
128
- key: u.value,
129
- border: "",
130
- class: "el-button el-button-small custom-button",
131
- label: u.text,
132
- value: u.value,
133
- size: "small"
134
- }, {
135
- default: a(() => [
136
- b(
137
- y(u.text),
138
- 1
139
- /* TEXT */
140
- )
141
- ]),
142
- _: 2
143
- /* DYNAMIC */
144
- }, 1032, ["label", "value"]))),
145
- 128
146
- /* KEYED_FRAGMENT */
147
- ))
148
- ]),
149
- _: 2
150
- /* DYNAMIC */
151
- }, 1032, ["modelValue", "onUpdate:modelValue"])
152
- ]))),
153
- 128
154
- /* KEYED_FRAGMENT */
155
- ))
178
+ (s(!0), f(g, null, C((h = c(r)) == null ? void 0 : h.xGroup, (v) => (s(), f("td", {
179
+ key: v.xGroupValue
180
+ }, [
181
+ E(c(te), {
182
+ modelValue: u[v.xGroupValue + "-" + t.yGroupValue],
183
+ "onUpdate:modelValue": (p) => u[v.xGroupValue + "-" + t.yGroupValue] = p
184
+ }, {
185
+ default: V(() => [
186
+ (s(!0), f(g, null, C(J(
187
+ v.xGroupValue,
188
+ t.yGroupValue
189
+ ), (p) => (s(), D(c(ue), {
190
+ key: p.value,
191
+ border: "",
192
+ class: "el-button el-button-small custom-button",
193
+ label: p.text,
194
+ value: p.value,
195
+ size: "small"
196
+ }, {
197
+ default: V(() => [
198
+ L(k(p.text), 1)
199
+ ]),
200
+ _: 2
201
+ }, 1032, ["label", "value"]))), 128))
202
+ ]),
203
+ _: 2
204
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
205
+ ]))), 128))
156
206
  ]);
157
- }),
158
- 128
159
- /* KEYED_FRAGMENT */
160
- ))
207
+ }), 128))
208
+ ])
161
209
  ])
162
- ])
163
- ];
164
- }),
165
- _: 1
166
- /* STABLE */
167
- })
168
- ]);
169
- }
170
- const H = /* @__PURE__ */ k(f, [["render", w], ["__file", "E:/工作/项目代码/common_componentsweb/packages/components/src/country-platform-shop-condition/country-platform-shop-condition.vue"]]);
210
+ ];
211
+ }),
212
+ _: 1
213
+ })
214
+ ]));
215
+ }
216
+ });
171
217
  export {
172
- H as default
218
+ ke as default
173
219
  };
@@ -1,127 +1,4 @@
1
- import { defineComponent as R, toRefs as D, reactive as _, ref as c, watch as M } from "vue";
2
- import { stylesUtils as T } from "../utils/style.js";
3
- import { M2 as H } from "../utils/translate.js";
4
- import L from "../_virtual/lodash.js";
5
- import { ElPopover as U, ElCheckboxGroup as Y, ElCheckbox as z, ElButton as I } from "element-plus";
6
- import "element-plus/theme-chalk/src/base.scss";
7
- import "element-plus/theme-chalk/src/button.scss";
8
- import "element-plus/theme-chalk/src/checkbox.scss";
9
- import "element-plus/theme-chalk/src/checkbox-group.scss";
10
- import "element-plus/theme-chalk/src/popper.scss";
11
- import "element-plus/theme-chalk/src/popover.scss";
12
- const ae = /* @__PURE__ */ R({
13
- name: "YaheeCountryPlatformShopCondition",
14
- __name: "country-platform-shop-condition",
15
- props: {
16
- xyFilters: { type: Object, required: !1 },
17
- filterKey: { type: String, required: !0 }
18
- },
19
- emits: ["filterChange"],
20
- setup(j, { expose: K, emit: O }) {
21
- K();
22
- const G = j, { filterKey: m, xyFilters: a } = D(G), d = O, t = _({});
23
- let f = _({});
24
- const p = c({}), v = c({}), i = c(!0), y = c({}), h = c({}), x = c();
25
- a.value && (x.value = [...a.value.xGroup]);
26
- function A(e, o) {
27
- var u;
28
- return (u = a.value) == null ? void 0 : u.items.filter((l) => l.xGroupValue === e && l.yGroupValue === o);
29
- }
30
- function F(e) {
31
- var u;
32
- const o = e.xGroupValue;
33
- if (y.value[o]) {
34
- for (const l in t)
35
- l.startsWith(o) && delete t[l];
36
- y.value[o] = !1;
37
- } else {
38
- for (const l of (u = a.value) == null ? void 0 : u.items)
39
- if (l.xGroupValue === o) {
40
- let n = t[`${l.xGroupValue}-${l.yGroupValue}`];
41
- n ? (n.push(l.value), n = [...new Set(n)]) : n = [l.value], t[`${l.xGroupValue}-${l.yGroupValue}`] = n;
42
- }
43
- y.value[o] = !0;
44
- }
45
- }
46
- const P = (e) => T.getBackgroundColor(e), W = () => {
47
- L.isEqual(f, t) || d("filterChange", [
48
- {
49
- filterKey: m.value,
50
- checkedValues: Object.values(Object.values(t)).flat()
51
- }
52
- ]);
53
- }, q = () => {
54
- f = L.cloneDeep(t);
55
- };
56
- function w() {
57
- if (i.value)
58
- i.value = !1, Object.keys(t).forEach((e) => {
59
- delete t[e];
60
- });
61
- else {
62
- i.value = !0;
63
- for (const e of a.value.items) {
64
- let o = t[`${e.xGroupValue}-${e.yGroupValue}`];
65
- o ? o.push(e.value) : o = [e.value], t[`${e.xGroupValue}-${e.yGroupValue}`] = o;
66
- }
67
- }
68
- console.log(t);
69
- }
70
- function B(e) {
71
- const o = e.yGroupValue;
72
- if (h.value[o]) {
73
- for (const u in t)
74
- u.endsWith(o) && delete t[u];
75
- h.value[o] = !1;
76
- } else {
77
- for (const u of a.value.items)
78
- if (u.yGroupValue === o) {
79
- let l = t[`${u.xGroupValue}-${u.yGroupValue}`];
80
- l ? (l.push(u.value), l = [...new Set(l)]) : l = [u.value], t[`${u.xGroupValue}-${u.yGroupValue}`] = l;
81
- }
82
- h.value[o] = !0;
83
- }
84
- }
85
- M(
86
- t,
87
- (e, o) => {
88
- var S, k, E, $;
89
- Object.keys(e).forEach((r) => {
90
- Array.isArray(e[r]) && e[r].length === 0 && delete e[r];
91
- }), console.log("新的数组:", e), console.log("旧的数组:", o);
92
- const u = { backgroundColor: "#3366CC", color: "#fff", borderColor: "#3366CC" }, l = { backgroundColor: "#00bfff", borderColor: "#00bfff" }, n = {}, V = (S = a.value) == null ? void 0 : S.xGroup.length, b = (k = a.value) == null ? void 0 : k.yGroup.length;
93
- (E = a.value) == null || E.xGroup.forEach((r) => {
94
- let s = 0;
95
- for (const g in t)
96
- g.startsWith(r.xGroupValue) && s++;
97
- s === 0 ? p.value[r.xGroupValue] = n : s === b ? p.value[r.xGroupValue] = u : p.value[r.xGroupValue] = l;
98
- }), ($ = a.value) == null || $.yGroup.forEach((r) => {
99
- let s = 0;
100
- for (const g in t)
101
- g.endsWith(r.yGroupValue) && s++;
102
- s === 0 ? v.value[r.yGroupValue] = n : s === V ? v.value[r.yGroupValue] = u : v.value[r.yGroupValue] = l;
103
- }), i.value = Object.keys(e).length === V * b;
104
- },
105
- { deep: !0 }
106
- );
107
- const C = { props: G, filterKey: m, xyFilters: a, emit: d, checkList: t, get backupCheckList() {
108
- return f;
109
- }, set backupCheckList(e) {
110
- f = e;
111
- }, rowTitleStyle: p, columnTitleStyle: v, isSelectedAll: i, toggleRowSelectionFlags: y, toggleColumnSelectionFlags: h, selectList: x, getContentForCell: A, toggleRowSelection: F, getDefaultSelectedAllStyle: P, handleHide: W, handleShow: q, selectAll: w, toggleColumnSelection: B, get M2() {
112
- return H;
113
- }, get ElButton() {
114
- return I;
115
- }, get ElCheckbox() {
116
- return z;
117
- }, get ElCheckboxGroup() {
118
- return Y;
119
- }, get ElPopover() {
120
- return U;
121
- } };
122
- return Object.defineProperty(C, "__isScriptSetup", { enumerable: !1, value: !0 }), C;
123
- }
124
- });
1
+ import f from "./country-platform-shop-condition.vue.js";
125
2
  export {
126
- ae as default
3
+ f as default
127
4
  };