yahee-components 0.0.18 → 0.0.20

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 (212) hide show
  1. package/es/_virtual/dayjs.min.js +4 -0
  2. package/es/annex-upload/annex-upload.vue.js +158 -0
  3. package/es/annex-upload/annex-upload.vue2.js +4 -0
  4. package/es/annex-upload/index.js +7 -0
  5. package/es/annex-upload/mimeType.js +822 -0
  6. package/es/annex-upload/style/index.css +7 -0
  7. package/es/api/server.js +29 -0
  8. package/es/api/tool.js +68 -0
  9. package/es/comprehensive-search/comprehensive-search.vue.js +165 -122
  10. package/es/copy/copy.vue.js +1 -1
  11. package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +218 -0
  12. package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +4 -0
  13. package/es/country-platform-shop-condition/index.js +7 -0
  14. package/es/country-platform-shop-condition/style/index.css +48 -0
  15. package/es/drop-down-condition/drop-down-condition.vue.js +216 -0
  16. package/es/drop-down-condition/drop-down-condition.vue2.js +4 -0
  17. package/es/drop-down-condition/index.js +7 -0
  18. package/es/drop-down-condition/style/index.css +45 -0
  19. package/es/image-upload/image-upload.vue.js +177 -0
  20. package/es/image-upload/image-upload.vue2.js +4 -0
  21. package/es/image-upload/index.js +7 -0
  22. package/es/image-upload/style/index.css +33 -0
  23. package/es/index.js +26 -7
  24. package/es/installs.js +22 -4
  25. package/es/left-condition/index.js +7 -0
  26. package/es/left-condition/left-condition-sub.vue.js +95 -0
  27. package/es/left-condition/left-condition-sub.vue2.js +4 -0
  28. package/es/left-condition/left-condition.vue.js +216 -0
  29. package/es/left-condition/left-condition.vue2.js +4 -0
  30. package/es/left-condition/style/index.css +10 -0
  31. package/es/left-condition-enum/index.js +7 -0
  32. package/es/left-condition-enum/left-condition-enum.vue.js +80 -0
  33. package/es/left-condition-enum/left-condition-enum.vue2.js +4 -0
  34. package/es/left-condition-enum/style/index.css +10 -0
  35. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js +38 -0
  36. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/adapters.js +53 -0
  37. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/fetch.js +141 -0
  38. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/xhr.js +71 -0
  39. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js +46 -0
  40. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CancelToken.js +77 -0
  41. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CanceledError.js +11 -0
  42. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/isCancel.js +6 -0
  43. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/Axios.js +133 -0
  44. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosError.js +54 -0
  45. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosHeaders.js +173 -0
  46. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/InterceptorManager.js +58 -0
  47. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/buildFullPath.js +8 -0
  48. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/dispatchRequest.js +31 -0
  49. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/mergeConfig.js +70 -0
  50. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/settle.js +14 -0
  51. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/transformData.js +13 -0
  52. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/index.js +89 -0
  53. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/transitional.js +8 -0
  54. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/env/data.js +4 -0
  55. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +33 -0
  56. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  57. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/bind.js +8 -0
  58. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/buildURL.js +19 -0
  59. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/combineURLs.js +6 -0
  60. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/composeSignals.js +30 -0
  61. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/cookies.js +32 -0
  62. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/formDataToJSON.js +31 -0
  63. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAbsoluteURL.js +6 -0
  64. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAxiosError.js +7 -0
  65. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isURLSameOrigin.js +37 -0
  66. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/null.js +4 -0
  67. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseHeaders.js +30 -0
  68. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
  69. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/progressEventReducer.js +35 -0
  70. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/resolveConfig.js +33 -0
  71. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/speedometer.js +19 -0
  72. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/spread.js +8 -0
  73. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/throttle.js +15 -0
  74. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toFormData.js +83 -0
  75. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toURLEncodedForm.js +13 -0
  76. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/trackStream.js +63 -0
  77. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/validator.js +51 -0
  78. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
  79. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
  80. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
  81. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/index.js +15 -0
  82. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/common/utils.js +9 -0
  83. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/index.js +9 -0
  84. package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/utils.js +233 -0
  85. package/es/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js +282 -0
  86. package/es/node_modules/{lodash → .pnpm/lodash@4.17.21/node_modules/lodash}/lodash.js +2 -2
  87. package/es/node_modules/.pnpm/v3-infinite-loading@1.3.2/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js +120 -0
  88. package/es/operation-log/index.js +7 -0
  89. package/es/operation-log/operation-log-content.vue.js +100 -0
  90. package/es/operation-log/operation-log-content.vue2.js +4 -0
  91. package/es/operation-log/operation-log-dialog.vue.js +70 -0
  92. package/es/operation-log/operation-log-dialog.vue2.js +4 -0
  93. package/es/operation-log/operation-log-form.vue.js +181 -0
  94. package/es/operation-log/operation-log-form.vue2.js +4 -0
  95. package/es/operation-log/operation-log.vue.js +232 -0
  96. package/es/operation-log/operation-log.vue2.js +4 -0
  97. package/es/operation-log/style/index.css +220 -0
  98. package/es/packages/components/api/log/index.js +15 -0
  99. package/es/packages/components/api/log-server.js +50 -0
  100. package/es/packages/components/api/server.js +32 -0
  101. package/es/packages/components/api/tool.js +56 -0
  102. package/es/packages/components/api/upload-server.js +65 -0
  103. package/es/packages/components/assets/images/errorimg.png.js +4 -0
  104. package/es/packages/components/assets/images/excel.png.js +4 -0
  105. package/es/packages/components/assets/images/file-word.png.js +4 -0
  106. package/es/packages/components/assets/images/pdf.png.js +4 -0
  107. package/es/packages/components/assets/images/ppt.png.js +4 -0
  108. package/es/packages/components/assets/images/vue.svg.js +4 -0
  109. package/es/packages/components/hooks/useClipboard.js +30 -0
  110. package/es/packages/components/hooks/useImg.js +15 -0
  111. package/es/packages/components/hooks/useImgPath.js +14 -0
  112. package/es/packages/components/hooks/useImport.js +33 -0
  113. package/es/packages/components/hooks/useUpload.js +24 -0
  114. package/es/static/CommonObject.js +4 -0
  115. package/es/style.css +946 -0
  116. package/es/styles/custom.css +83 -0
  117. package/es/styles/globals.css +697 -0
  118. package/es/styles/index.css +787 -0
  119. package/es/styles/variables.css +32 -0
  120. package/es/utils/config.js +19 -0
  121. package/es/utils/const.js +19 -0
  122. package/es/utils/storage.js +52 -0
  123. package/es/utils/style.js +28 -0
  124. package/es/utils/translate.js +57 -0
  125. package/lib/annex-upload/style/index.css +7 -0
  126. package/lib/country-platform-shop-condition/style/index.css +48 -0
  127. package/lib/drop-down-condition/style/index.css +45 -0
  128. package/lib/image-upload/style/index.css +33 -0
  129. package/lib/left-condition/style/index.css +10 -0
  130. package/lib/left-condition-enum/style/index.css +10 -0
  131. package/lib/operation-log/style/index.css +220 -0
  132. package/lib/style.css +946 -0
  133. package/lib/styles/custom.css +83 -0
  134. package/lib/styles/globals.css +697 -0
  135. package/lib/styles/index.css +787 -0
  136. package/lib/styles/variables.css +32 -0
  137. package/package.json +10 -4
  138. package/types/hooks/useClipboard.d.ts +7 -0
  139. package/types/hooks/useImg.d.ts +10 -0
  140. package/types/hooks/useImgPath.d.ts +5 -0
  141. package/types/hooks/useImport.d.ts +11 -0
  142. package/types/hooks/useUpload.d.ts +12 -0
  143. package/types/index.d.ts +6 -204
  144. package/types/src/annex-upload/annex-upload.d.ts +30 -0
  145. package/types/src/annex-upload/annex-upload.vue.d.ts +443 -0
  146. package/types/src/annex-upload/index.d.ts +123 -0
  147. package/types/src/annex-upload/mimeType.d.ts +2 -0
  148. package/types/src/api/server.d.ts +6 -0
  149. package/types/src/api/tool.d.ts +6 -0
  150. package/types/src/api/types.d.ts +17 -0
  151. package/types/src/components.d.ts +10 -0
  152. package/types/src/comprehensive-search/comprehensive-search.d.ts +12 -0
  153. package/types/src/comprehensive-search/comprehensive-search.vue.d.ts +52 -0
  154. package/types/src/copy/copy.d.ts +12 -0
  155. package/types/src/copy/copy.vue.d.ts +21 -0
  156. package/types/src/copy/index.d.ts +32 -0
  157. package/types/src/country-platform-shop-condition/country-platform-shop-condition.d.ts +17 -0
  158. package/types/src/country-platform-shop-condition/country-platform-shop-condition.vue.d.ts +14 -0
  159. package/types/src/country-platform-shop-condition/index.d.ts +16 -0
  160. package/types/src/drop-down-condition/drop-down-condition.d.ts +6 -0
  161. package/types/src/drop-down-condition/drop-down-condition.vue.d.ts +40 -0
  162. package/types/src/drop-down-condition/index.d.ts +42 -0
  163. package/types/src/image-upload/image-upload.d.ts +26 -0
  164. package/types/src/image-upload/image-upload.vue.d.ts +43 -0
  165. package/types/src/image-upload/index.d.ts +94 -0
  166. package/types/src/index.d.ts +7 -0
  167. package/types/src/input/index.d.ts +16 -0
  168. package/types/src/input/input.d.ts +18 -0
  169. package/types/src/input/input.vue.d.ts +14 -0
  170. package/types/src/left-condition/index.d.ts +69 -0
  171. package/types/src/left-condition/left-condition-sub.vue.d.ts +47 -0
  172. package/types/src/left-condition/left-condition.d.ts +5 -0
  173. package/types/src/left-condition/left-condition.vue.d.ts +68 -0
  174. package/types/src/left-condition-enum/index.d.ts +162 -0
  175. package/types/src/left-condition-enum/left-condition-enum.d.ts +5 -0
  176. package/types/src/left-condition-enum/left-condition-enum.vue.d.ts +160 -0
  177. package/types/src/operation-log/index.d.ts +9 -0
  178. package/types/src/operation-log/operation-log-content.vue.d.ts +24 -0
  179. package/types/src/operation-log/operation-log-dialog.vue.d.ts +39 -0
  180. package/types/src/operation-log/operation-log-form.vue.d.ts +19 -0
  181. package/types/src/operation-log/operation-log.d.ts +11 -0
  182. package/types/src/operation-log/operation-log.vue.d.ts +6 -0
  183. package/types/src/static/CommonObject.d.ts +18 -0
  184. package/types/src/static/CommonVariables.d.ts +4 -0
  185. package/types/src/utils/config.d.ts +8 -0
  186. package/types/src/utils/const.d.ts +19 -0
  187. package/types/src/utils/functions.d.ts +1 -0
  188. package/types/src/utils/install.d.ts +8 -0
  189. package/types/src/utils/storage.d.ts +18 -0
  190. package/types/src/utils/style.d.ts +19 -0
  191. package/types/src/utils/to-kebab-case.d.ts +1 -0
  192. package/types/src/utils/translate.d.ts +5 -0
  193. package/types/src/utils/typescript.d.ts +5 -0
  194. package/es/hooks/useClipboard.js +0 -28
  195. package/lib/_virtual/_commonjsHelpers.js +0 -1
  196. package/lib/_virtual/lodash.js +0 -1
  197. package/lib/comprehensive-search/comprehensive-search.vue.js +0 -1
  198. package/lib/comprehensive-search/comprehensive-search.vue2.js +0 -1
  199. package/lib/comprehensive-search/index.js +0 -1
  200. package/lib/copy/copy.vue.js +0 -1
  201. package/lib/copy/copy.vue2.js +0 -1
  202. package/lib/copy/index.js +0 -1
  203. package/lib/hooks/useClipboard.js +0 -1
  204. package/lib/index.js +0 -1
  205. package/lib/input/index.js +0 -1
  206. package/lib/input/input.vue.js +0 -1
  207. package/lib/input/input.vue2.js +0 -1
  208. package/lib/installs.js +0 -1
  209. package/lib/node_modules/element-plus/es/locale/lang/zh-cn.js +0 -1
  210. package/lib/node_modules/lodash/lodash.js +0 -27
  211. package/lib/utils/install.js +0 -1
  212. /package/es/node_modules/{element-plus → .pnpm/element-plus@2.8.3_vue@3.5.12_typescript@5.6.2_/node_modules/element-plus}/es/locale/lang/zh-cn.js +0 -0
@@ -0,0 +1,218 @@
1
+ import { defineComponent as A, toRefs as I, reactive as z, ref as G, watch as ee, openBlock as s, createElementBlock as f, createVNode as E, unref as c, withCtx as V, createElementVNode as i, normalizeStyle as g, createTextVNode as L, toDisplayString as m, Fragment as C, renderList as k, createBlock as D } from "vue";
2
+ import { stylesUtils as le } from "../utils/style.js";
3
+ import { M2 as N } from "../utils/translate.js";
4
+ import R from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
5
+ import { ElPopover as oe, ElButton as U, ElCheckboxGroup as te, ElCheckbox as ue } 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 b = 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 ? b.value[n.xGroupValue] = t : d === v ? b.value[n.xGroupValue] = e : b.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
+ onHide: Q,
111
+ onShow: X
112
+ }, {
113
+ reference: V(() => [
114
+ i("div", pe, [
115
+ E(c(U), {
116
+ size: "small",
117
+ class: "el-button custom-total-button",
118
+ style: g(T(y.value)),
119
+ onClick: j
120
+ }, {
121
+ default: V(() => [
122
+ L(m(c(N)("全部")), 1)
123
+ ]),
124
+ _: 1
125
+ }, 8, ["style"]),
126
+ (s(!0), f(C, null, k(K.value, (e) => (s(), D(c(U), {
127
+ key: e,
128
+ style: g(b.value[e.xGroupValue]),
129
+ class: "custom-button",
130
+ size: "small",
131
+ onClick: (l) => F(e)
132
+ }, {
133
+ default: V(() => [
134
+ L(m(c(N)(e.xGroupText)), 1)
135
+ ]),
136
+ _: 2
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: g(T(y.value)),
149
+ class: "el-button custom-button",
150
+ onClick: j
151
+ }, " 全部 ", 4)
152
+ ]),
153
+ (s(!0), f(C, null, k((e = c(r)) == null ? void 0 : e.xGroup, (t) => (s(), f("th", {
154
+ id: "x",
155
+ key: t.xGroupValue
156
+ }, [
157
+ i("span", {
158
+ style: g({ ...b.value[t.xGroupValue], width: "100%" }),
159
+ class: "el-button custom-button",
160
+ onClick: (h) => F(t)
161
+ }, m(t.xGroupText), 13, se)
162
+ ]))), 128))
163
+ ])
164
+ ]),
165
+ i("tbody", null, [
166
+ (s(!0), f(C, null, k((l = c(r)) == null ? void 0 : l.yGroup, (t) => {
167
+ var h;
168
+ return s(), f("tr", {
169
+ key: t.yGroupValue
170
+ }, [
171
+ i("th", ce, [
172
+ i("span", {
173
+ style: g({ ..._.value[t.yGroupValue], width: "100%" }),
174
+ class: "el-button custom-button",
175
+ onClick: (v) => Z(t)
176
+ }, m(t.yGroupText), 13, ie)
177
+ ]),
178
+ (s(!0), f(C, null, k((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(C, null, k(J(
187
+ v.xGroupValue,
188
+ t.yGroupValue
189
+ ), (p) => (s(), D(c(ue), {
190
+ key: p.value,
191
+ border: "",
192
+ class: "el-button custom-button",
193
+ label: p.text,
194
+ value: p.value
195
+ }, {
196
+ default: V(() => [
197
+ L(m(p.text), 1)
198
+ ]),
199
+ _: 2
200
+ }, 1032, ["label", "value"]))), 128))
201
+ ]),
202
+ _: 2
203
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
204
+ ]))), 128))
205
+ ]);
206
+ }), 128))
207
+ ])
208
+ ])
209
+ ];
210
+ }),
211
+ _: 1
212
+ })
213
+ ]));
214
+ }
215
+ });
216
+ export {
217
+ ke as default
218
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./country-platform-shop-condition.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import { withInstall as o } from "../utils/install.js";
2
+ import t from "./country-platform-shop-condition.vue.js";
3
+ const i = o(t);
4
+ export {
5
+ i as YaheeCountryPlatformShopCondition,
6
+ i as default
7
+ };
@@ -0,0 +1,48 @@
1
+ .yahee-country-platform-shop-condition .popover-table {
2
+ width: auto;
3
+ border: 1px solid transparent;
4
+ border-collapse: separate;
5
+ }
6
+ .yahee-country-platform-shop-condition .popover-table tr,
7
+ .yahee-country-platform-shop-condition .popover-table td {
8
+ text-align: left;
9
+ cursor: pointer;
10
+ min-height: 22px;
11
+ }
12
+ .yahee-country-platform-shop-condition .checkbox-group {
13
+ margin: 5px;
14
+ width: 100%;
15
+ }
16
+ .yahee-country-platform-shop-condition .popover-table th {
17
+ text-align: left;
18
+ cursor: pointer;
19
+ min-height: 22px;
20
+ border: 1px solid transparent;
21
+ }
22
+ .yahee-country-platform-shop-condition .popover-table td span {
23
+ display: block;
24
+ margin-bottom: 4px;
25
+ border: 1px solid transparent;
26
+ }
27
+ .yahee-country-platform-shop-condition .hover-trigger {
28
+ cursor: pointer;
29
+ color: blue;
30
+ }
31
+ .yahee-country-platform-shop-condition .custom-total-button {
32
+ margin-right: 0;
33
+ padding: 1px 4px;
34
+ height: 22px;
35
+ }
36
+ .yahee-country-platform-shop-condition .custom-button {
37
+ width: 100%;
38
+ min-height: 22px;
39
+ min-width: 50px;
40
+ height: 22px;
41
+ margin: 3px;
42
+ }
43
+ .yahee-country-platform-shop-condition .custom-button.inner-el-button {
44
+ margin-top: 5px;
45
+ }
46
+ .yahee-country-platform-shop-condition ::v-deep(.el-checkbox-button__inner) {
47
+ width: 100%;
48
+ }
@@ -0,0 +1,216 @@
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
+ import s from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
3
+ import { Get as de } from "../api/server.js";
4
+ import { stylesUtils as M } from "../utils/style.js";
5
+ import { storage as H } from "../utils/storage.js";
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
+ name: "YaheeDropDownCondition",
9
+ __name: "drop-down-condition",
10
+ props: {
11
+ filterList: {},
12
+ totalCount: {},
13
+ level1Count: {},
14
+ level2Count: {},
15
+ filterKey: {},
16
+ enumEntity: {},
17
+ baseUrl: {},
18
+ noNeedRefreshNumFilterName: {}
19
+ },
20
+ emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
21
+ setup(J, { emit: Q }) {
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();
25
+ q.value && (d.value = [...q.value]);
26
+ function G(e) {
27
+ const { text: l, value: u } = e, n = o[l];
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();
29
+ }
30
+ function $() {
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;
32
+ return Object.values(o).map((n) => n.length).reduce((n, g) => n + g, 0) === e + l || s.isEmpty(Object.values(o).flat());
33
+ }
34
+ function Z(e) {
35
+ s.isEmpty(o[e.text]) ? (i[e.text] = {}, h[e.text] = !1) : o[e.text].length === s.get(e, "subs.length", 1) ? (i[e.text] = M.getBackgroundColor(!0), h[e.text] = !0) : i[e.text] = {
36
+ backgroundColor: "#0F7535",
37
+ color: "#fff",
38
+ borderColor: "#0F7535"
39
+ }, m.value = $(), z();
40
+ }
41
+ function ee() {
42
+ m.value = $(), z();
43
+ }
44
+ function z() {
45
+ T("setNoNeedRefreshNumFilterName", L.value);
46
+ }
47
+ function te() {
48
+ m.value = !0;
49
+ for (const e in i)
50
+ i[e] = {};
51
+ for (const e in o)
52
+ delete o[e];
53
+ for (const e in h)
54
+ delete h[e];
55
+ P();
56
+ }
57
+ const le = (e) => M.getBackgroundColor(e);
58
+ function oe(e) {
59
+ if (e)
60
+ O = s.cloneDeep(o);
61
+ else {
62
+ if (s.isEqual(O, o))
63
+ return;
64
+ P();
65
+ }
66
+ }
67
+ function P() {
68
+ T("filterChange", [
69
+ {
70
+ filterKey: L.value,
71
+ checkedValues: Object.values(o).flat()
72
+ }
73
+ ]);
74
+ }
75
+ function ne(e) {
76
+ const l = d.value.find((u) => u.text === e);
77
+ l && l.subs && (o[e] = l.subs.map((u) => u.value));
78
+ }
79
+ function se(e) {
80
+ o[e] = [];
81
+ }
82
+ return re(
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);
86
+ }
87
+ ), ie(() => {
88
+ const e = `filter-key-${C.enumEntity}`, l = H.getWithExpireTime(e);
89
+ l ? d.value = l : de(`${C.baseUrl}/${C.enumEntity}`).then((u) => {
90
+ d.value = u.data, H.setWithExpireTime(e, d.value, 1200 * 1e3);
91
+ }).catch((u) => {
92
+ console.log(u);
93
+ });
94
+ }), (e, l) => {
95
+ const u = w("el-button"), n = w("el-checkbox"), g = w("el-checkbox-group"), D = w("el-dropdown");
96
+ return a(), v("div", ve, [
97
+ Y(u, {
98
+ size: "small",
99
+ class: "el-button custom-total-button",
100
+ style: j(le(m.value)),
101
+ onClick: te
102
+ }, {
103
+ default: f(() => [
104
+ y(p(r(k)("全部")) + " ", 1),
105
+ r(N) ? (a(), v("span", fe, "(" + p(W.value) + ")", 1)) : S("", !0)
106
+ ]),
107
+ _: 1
108
+ }, 8, ["style"]),
109
+ Y(D, {
110
+ ref_key: "dropdown1",
111
+ ref: X,
112
+ onVisibleChange: oe
113
+ }, {
114
+ dropdown: f(() => [
115
+ F("div", me, [
116
+ (a(!0), v(_, null, K(d.value, (t) => (a(), b(g, {
117
+ key: t.value,
118
+ modelValue: o[t.text],
119
+ "onUpdate:modelValue": (c) => o[t.text] = c,
120
+ size: "small",
121
+ class: "checkbox-group inner-checkbox-group",
122
+ onChange: (c) => Z(t)
123
+ }, {
124
+ default: f(() => [
125
+ r(s).isNil(t.subs) ? (a(), b(n, {
126
+ key: 1,
127
+ value: t.value,
128
+ class: "checkbox custom-button",
129
+ border: ""
130
+ }, {
131
+ default: f(() => [
132
+ y(p(r(k)(t.text)), 1)
133
+ ]),
134
+ _: 2
135
+ }, 1032, ["value"])) : (a(), v(_, { key: 0 }, [
136
+ F("span", {
137
+ class: "el-button custom-button el-button--small inner-el-button",
138
+ style: j(i[t.text]),
139
+ onClick: (c) => G(t)
140
+ }, p(r(k)(t.text)), 13, ge),
141
+ F("div", xe, [
142
+ (a(!0), v(_, null, K(t.subs, (c) => (a(), b(n, {
143
+ key: c.value,
144
+ class: "checkbox custom-button",
145
+ value: c.value,
146
+ border: ""
147
+ }, {
148
+ default: f(() => {
149
+ var E;
150
+ return [
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))
153
+ ];
154
+ }),
155
+ _: 2
156
+ }, 1032, ["value"]))), 128))
157
+ ])
158
+ ], 64))
159
+ ]),
160
+ _: 2
161
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]))), 128))
162
+ ])
163
+ ]),
164
+ default: f(() => [
165
+ F("div", pe, [
166
+ (a(!0), v(_, null, K(d.value, (t) => (a(), v(_, null, [
167
+ t.isCheckbox ? (a(), b(g, {
168
+ key: t.value,
169
+ modelValue: o[t.text],
170
+ "onUpdate:modelValue": (c) => o[t.text] = c,
171
+ class: "checkbox-group",
172
+ size: "small",
173
+ onChange: ee
174
+ }, {
175
+ default: f(() => [
176
+ t.isCheckbox ? (a(), b(n, {
177
+ key: 0,
178
+ class: "custom-button",
179
+ value: t.value,
180
+ border: ""
181
+ }, {
182
+ default: f(() => [
183
+ y(p(r(k)(t.text)), 1)
184
+ ]),
185
+ _: 2
186
+ }, 1032, ["value"])) : S("", !0)
187
+ ]),
188
+ _: 2
189
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : (a(), b(u, {
190
+ key: t.text,
191
+ style: j(i[t.text]),
192
+ class: "custom-button",
193
+ size: "small",
194
+ onClick: (c) => G(t)
195
+ }, {
196
+ default: f(() => {
197
+ var c;
198
+ return [
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))
201
+ ];
202
+ }),
203
+ _: 2
204
+ }, 1032, ["style", "onClick"]))
205
+ ], 64))), 256))
206
+ ])
207
+ ]),
208
+ _: 1
209
+ }, 512)
210
+ ]);
211
+ };
212
+ }
213
+ });
214
+ export {
215
+ Ve as default
216
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./drop-down-condition.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import { withInstall as o } from "../utils/install.js";
2
+ import t from "./drop-down-condition.vue.js";
3
+ const r = o(t);
4
+ export {
5
+ r as YaheeDropDownCondition,
6
+ r as default
7
+ };
@@ -0,0 +1,45 @@
1
+ @charset "UTF-8";
2
+ .yahee-drop-down-condition {
3
+ /* 滚动槽 */
4
+ /* 滚动条滑块 */
5
+ }
6
+ .yahee-drop-down-condition .checkbox-group {
7
+ display: flex;
8
+ flex-direction: column;
9
+ }
10
+ .yahee-drop-down-condition .checkbox {
11
+ margin-top: 5px;
12
+ }
13
+ .yahee-drop-down-condition .custom-total-button {
14
+ margin-right: 0;
15
+ padding: 1px 4px;
16
+ height: 22px;
17
+ }
18
+ .yahee-drop-down-condition .custom-button {
19
+ margin-right: 0;
20
+ padding: 1px 4px;
21
+ min-height: 22px;
22
+ height: 22px;
23
+ margin-left: 5px;
24
+ }
25
+ .yahee-drop-down-condition .custom-button.inner-el-button {
26
+ margin-top: 5px;
27
+ }
28
+ .yahee-drop-down-condition .scrollable-container {
29
+ max-height: 700px;
30
+ overflow-y: auto;
31
+ display: flex;
32
+ flex-direction: column;
33
+ }
34
+ .yahee-drop-down-condition .scrollable-container::-webkit-scrollbar {
35
+ width: 5px;
36
+ }
37
+ .yahee-drop-down-condition .scrollable-container::-webkit-scrollbar-track {
38
+ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
39
+ border-radius: 10px;
40
+ }
41
+ .yahee-drop-down-condition .scrollable-container::-webkit-scrollbar-thumb {
42
+ border-radius: 10px;
43
+ background: rgba(0, 0, 0, 0.1);
44
+ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
45
+ }