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,7 @@
1
+ .yahee-annex-upload .el-upload .el-button {
2
+ --el-button-size: 24px;
3
+ border-radius: calc(var(--el-border-radius-base) - 1px);
4
+ font-size: 12px;
5
+ height: var(--el-button-size);
6
+ padding: 5px 11px;
7
+ }
@@ -0,0 +1,29 @@
1
+ import n from "../node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js";
2
+ import { handleChangeRequestHeader as o, handleConfigureAuth as d, handleAuthError as u, handleGeneralError as i, handleNetworkError as h } from "./tool.js";
3
+ n.interceptors.request.use((t) => {
4
+ let e = o(t);
5
+ return e = d(e), e;
6
+ });
7
+ n.defaults.withCredentials = !0;
8
+ n.interceptors.response.use(
9
+ (t) => t.status !== 200 ? Promise.reject(t.data) : (u(t.data.errno), i(t.data.status, t.data.msg), t),
10
+ (t) => {
11
+ h(t.response.status), Promise.reject(t.response);
12
+ }
13
+ );
14
+ const g = (t, e = {}, c) => new Promise((s) => {
15
+ n.get(t, { params: e }).then((r) => {
16
+ let a;
17
+ a = r.data, s(a);
18
+ }).catch((r) => {
19
+ const a = {
20
+ msg: r.msg,
21
+ data: r.data
22
+ // 其他错误属性...
23
+ };
24
+ s(a);
25
+ });
26
+ });
27
+ export {
28
+ g as Get
29
+ };
package/es/api/tool.js ADDED
@@ -0,0 +1,68 @@
1
+ import { ElMessage as n, ElMessageBox as s } from "element-plus";
2
+ import "element-plus/theme-chalk/src/base.scss";
3
+ import "element-plus/theme-chalk/src/badge.scss";
4
+ import "element-plus/theme-chalk/src/message.scss";
5
+ import "element-plus/theme-chalk/src/message-box.scss";
6
+ import "element-plus/theme-chalk/src/button.scss";
7
+ import "element-plus/theme-chalk/src/input.scss";
8
+ import "element-plus/theme-chalk/src/overlay.scss";
9
+ import { AxiosHeaders as l } from "../node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js";
10
+ const w = (e) => ({
11
+ ...e,
12
+ timeout: 2e4
13
+ }), N = (e) => {
14
+ const o = new l(e.headers);
15
+ return {
16
+ ...e,
17
+ headers: o
18
+ };
19
+ };
20
+ let t = !1;
21
+ const R = (e) => {
22
+ const o = {
23
+ 400: "错误的请求",
24
+ // token 失效
25
+ 403: "拒绝访问",
26
+ 404: "请求错误,未找到该资源",
27
+ 405: "请求方法未允许",
28
+ 408: "请求超时",
29
+ 500: "服务器端出错",
30
+ 501: "网络未实现",
31
+ 502: "网络错误",
32
+ 503: "服务不可用",
33
+ 504: "网络超时",
34
+ 505: "http版本不支持该请求"
35
+ };
36
+ switch (e) {
37
+ case 401:
38
+ window.location.href = `https://portal.yaheecloud.com//Latest/Account/LogOn?returnUrl=${encodeURIComponent(window.location.href)}`;
39
+ break;
40
+ case 403:
41
+ t || (t = !0, s.alert("对不起,您没有权限进行当前操作!").finally(() => {
42
+ t = !1;
43
+ }));
44
+ break;
45
+ default:
46
+ e && n.error(o[e] ?? `其他连接错误 --${e}`);
47
+ }
48
+ };
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 || {});
50
+ const U = (e) => e in {
51
+ 10031: "登录失效,需要重新登录",
52
+ // token 失效
53
+ 10032: "您太久没登录,请重新登录~",
54
+ // token 过期
55
+ 10033: "账户未绑定角色,请联系管理员绑定角色",
56
+ 10034: "该用户未注册,请联系管理员注册用户",
57
+ 10035: "code 无法获取对应第三方平台用户",
58
+ 10036: "该账户未关联员工,请联系管理员做关联",
59
+ 10037: "账号已无效",
60
+ 10038: "账号未找到"
61
+ } ? (n.error(a[e]), !1) : !0, C = (e, o) => e !== 0 && o !== "OK" ? (n.error(o), !1) : !0;
62
+ export {
63
+ U as handleAuthError,
64
+ w as handleChangeRequestHeader,
65
+ N as handleConfigureAuth,
66
+ C as handleGeneralError,
67
+ R as handleNetworkError
68
+ };
@@ -1,6 +1,6 @@
1
- import { defineComponent as M, toRefs as Q, ref as n, openBlock as r, createBlock as c, unref as e, withCtx as o, createElementVNode as V, createVNode as t, withKeys as W, createElementBlock as v, Fragment as b, renderList as E, createTextVNode as p, toDisplayString as i, createCommentVNode as k } from "vue";
2
- import m from "../node_modules/lodash/lodash.js";
3
- import { ElConfigProvider as X, ElInput as w, ElSelect as x, ElOption as F, ElIcon as Y, ElCheckbox as j, ElLink as G, ElDialog as J, ElButton as B, ElForm as Z, ElRow as P, ElFormItem as T, ElMessage as $ } from "element-plus";
1
+ import { defineComponent as oe, toRefs as re, ref as i, openBlock as c, createBlock as f, unref as e, withCtx as t, createElementVNode as C, createVNode as o, withKeys as se, createSlots as ne, createElementBlock as T, Fragment as _, renderList as I, createTextVNode as g, toDisplayString as v, createCommentVNode as P } from "vue";
2
+ import y from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
3
+ import { ElConfigProvider as ue, ElInput as K, ElIcon as ie, ElSelect as G, ElOption as U, ElCheckbox as ce, ElLink as de, ElDialog as pe, ElButton as L, ElForm as me, ElRow as E, ElFormItem as N } from "element-plus";
4
4
  import "element-plus/theme-chalk/src/base.scss";
5
5
  import "element-plus/theme-chalk/src/input.scss";
6
6
  import "element-plus/theme-chalk/src/checkbox.scss";
@@ -18,172 +18,215 @@ import "element-plus/theme-chalk/src/row.scss";
18
18
  import "element-plus/theme-chalk/src/button.scss";
19
19
  import "element-plus/theme-chalk/src/link.scss";
20
20
  import "element-plus/theme-chalk/src/config-provider.scss";
21
- import "element-plus/theme-chalk/src/badge.scss";
22
- import "element-plus/theme-chalk/src/message.scss";
23
- import { Search as ee } from "@element-plus/icons-vue";
24
- import le from "../node_modules/element-plus/es/locale/lang/zh-cn.js";
25
- const ae = { class: "yahee-comporehensive-search" }, oe = {
26
- key: 0,
27
- class: "search-type-checkbox"
28
- }, te = { class: "dialog-footer" }, Pe = /* @__PURE__ */ M({
21
+ import { Search as he } from "@element-plus/icons-vue";
22
+ import fe from "../node_modules/.pnpm/element-plus@2.8.3_vue@3.5.12_typescript@5.6.2_/node_modules/element-plus/es/locale/lang/zh-cn.js";
23
+ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-checkbox" }, Ce = { class: "dialog-footer" }, ze = /* @__PURE__ */ oe({
29
24
  name: "YaheeComprehensiveSearch",
30
25
  __name: "comprehensive-search",
31
26
  props: {
32
- dealSearch: { type: Function, default: m.noop },
33
- confirmSearch: { type: Function, default: m.noop },
34
- pasteFormat: { type: Function, default: m.noop },
35
- isInSearchChange: { type: Function, default: m.noop },
27
+ dealSearch: { type: Function, default: y.noop },
28
+ pasteFormat: { type: Function, default: y.noop },
36
29
  defaultSearch: { default: "" },
37
30
  options: { default: () => [] },
38
31
  placeholderText: { default: "" },
39
32
  showPatchSearch: { type: Boolean, default: !1 },
40
- showPatchCheckbox: { type: Boolean }
33
+ showWithinFilterCheckbox: { type: Boolean, default: !1 },
34
+ specialOptions: { default: () => [] },
35
+ normalOptions: { default: () => [] },
36
+ showSelect: { type: Boolean, default: !1 },
37
+ searchItem: { default: () => ({}) }
41
38
  },
42
- setup(_) {
43
- const I = le, U = _, {
44
- dealSearch: L,
45
- defaultSearch: z,
46
- pasteFormat: y,
47
- confirmSearch: N,
48
- isInSearchChange: R,
49
- options: C,
50
- showPatchSearch: D,
51
- showPatchCheckbox: q
52
- } = Q(U), h = n(z.value), u = n(""), g = n(!1), H = n(!1), d = n(!1), s = n({ searchType: "WHOLE_SEARCH", searchContent: "" }), K = {
39
+ emits: ["filterChangeGrandson"],
40
+ setup(R, { emit: W }) {
41
+ const z = fe, p = W, D = R, {
42
+ dealSearch: q,
43
+ defaultSearch: H,
44
+ pasteFormat: b,
45
+ options: w,
46
+ showPatchSearch: A,
47
+ specialOptions: F,
48
+ showWithinFilterCheckbox: J,
49
+ placeholderText: X,
50
+ normalOptions: Y,
51
+ showSelect: $,
52
+ searchItem: r
53
+ } = re(D), S = i(H.value), d = i(""), m = i(!1), V = i(!1), h = i(!1), x = i(null), s = i({ searchType: "WHOLE_SEARCH", searchContent: "" }), j = {
53
54
  selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
54
55
  searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
56
+ }, M = () => {
57
+ h.value = !0;
58
+ }, B = () => {
59
+ h.value = !1;
60
+ }, Q = () => {
61
+ m.value || (delete r.value.simpleSearch, p("filterChangeGrandson", r.value));
62
+ }, Z = () => r.value, k = () => {
63
+ d.value ? le() : p("filterChangeGrandson", Z());
64
+ }, ee = (n, l) => {
65
+ const a = { ...n };
66
+ return y.map(F.value, (u) => u.key).includes(l.filterKey) ? F.value.forEach((u) => delete a[u.key]) : delete a[l.filterKey], a;
55
67
  };
56
- function O() {
57
- d.value = !0;
68
+ function O(n) {
69
+ console.log("displayFilter filterChange start", n, r.value), y.forEach(n, (l) => {
70
+ ee(r.value, l);
71
+ const { checkedValues: a, filterKey: u } = l;
72
+ y.isEmpty(a) || (Y.value.includes(u) ? r.value[u] = a[0] : r.value[u] = a);
73
+ }), p("filterChangeGrandson", r.value), console.log(`searchItem - ${JSON.stringify(r.value)}`), console.log("displayFilter filterChange end");
58
74
  }
59
- function S() {
60
- d.value = !1;
61
- }
62
- const f = () => {
63
- if (!u.value) {
64
- $.warning("请输入搜索关键字");
65
- return;
66
- }
67
- L.value(h.value, u.value);
75
+ const le = () => {
76
+ m.value ? O([
77
+ {
78
+ filterKey: "simpleSearch",
79
+ checkedValues: d.value
80
+ }
81
+ ]) : p("filterChangeGrandson", {
82
+ simpleSearch: d.value
83
+ });
84
+ }, ae = () => {
85
+ q.value(S.value, d.value);
86
+ }, te = () => {
87
+ x.value.validate((n) => {
88
+ n && (V.value = !0, m.value ? O([
89
+ {
90
+ filterKey: "putSearch",
91
+ checkedValues: s.value.searchContent
92
+ }
93
+ ]) : p("filterChangeGrandson", {
94
+ putSearch: s.value.searchContent
95
+ }), h.value = !1, V.value = !1);
96
+ });
68
97
  };
69
- return (A, l) => (r(), c(e(X), { locale: e(I) }, {
70
- default: o(() => [
71
- V("div", ae, [
72
- t(e(w), {
73
- modelValue: u.value,
74
- "onUpdate:modelValue": l[1] || (l[1] = (a) => u.value = a),
75
- placeholder: A.placeholderText,
98
+ return (n, l) => (c(), f(e(ue), { locale: e(z) }, {
99
+ default: t(() => [
100
+ C("div", ve, [
101
+ o(e(K), {
102
+ modelValue: d.value,
103
+ "onUpdate:modelValue": l[1] || (l[1] = (a) => d.value = a),
104
+ placeholder: e(X),
76
105
  class: "input-with-select",
77
106
  clearable: "",
78
107
  maxlength: "30",
79
- onChange: f,
80
- onKeyup: W(f, ["enter"]),
81
- onPaste: e(y)
82
- }, {
83
- prepend: o(() => [
84
- t(e(x), {
85
- modelValue: h.value,
86
- "onUpdate:modelValue": l[0] || (l[0] = (a) => h.value = a),
87
- size: "small",
88
- class: "custom-select"
89
- }, {
90
- default: o(() => [
91
- (r(!0), v(b, null, E(e(C), (a) => (r(), c(e(F), {
92
- key: a.label,
93
- label: a.label,
94
- value: a.value
95
- }, null, 8, ["label", "value"]))), 128))
96
- ]),
97
- _: 1
98
- }, 8, ["modelValue"])
99
- ]),
100
- append: o(() => [
101
- t(e(Y), {
108
+ onChange: k,
109
+ onKeyup: se(k, ["enter"]),
110
+ onPaste: e(b),
111
+ onClear: ae
112
+ }, ne({
113
+ append: t(() => [
114
+ o(e(ie), {
102
115
  size: "12",
103
116
  color: "#3366cc",
104
117
  style: { cursor: "pointer" },
105
118
  class: "icon-cusor",
106
- onClick: f
119
+ onClick: k
107
120
  }, {
108
- default: o(() => [
109
- t(e(ee))
121
+ default: t(() => [
122
+ o(e(he))
110
123
  ]),
111
124
  _: 1
112
125
  })
113
126
  ]),
114
- _: 1
115
- }, 8, ["modelValue", "placeholder", "onPaste"]),
116
- e(q) ? (r(), v("div", oe, [
117
- t(e(j), {
118
- modelValue: g.value,
119
- "onUpdate:modelValue": l[2] || (l[2] = (a) => g.value = a),
120
- onChange: e(R)
127
+ _: 2
128
+ }, [
129
+ e($) ? {
130
+ name: "prepend",
131
+ fn: t(() => [
132
+ o(e(G), {
133
+ modelValue: S.value,
134
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => S.value = a),
135
+ size: "small",
136
+ class: "custom-select"
137
+ }, {
138
+ default: t(() => [
139
+ (c(!0), T(_, null, I(e(w), (a) => (c(), f(e(U), {
140
+ key: a.label,
141
+ label: a.label,
142
+ value: a.value
143
+ }, null, 8, ["label", "value"]))), 128))
144
+ ]),
145
+ _: 1
146
+ }, 8, ["modelValue"])
147
+ ]),
148
+ key: "0"
149
+ } : void 0
150
+ ]), 1032, ["modelValue", "placeholder", "onPaste"]),
151
+ C("div", ye, [
152
+ e(J) ? (c(), f(e(ce), {
153
+ key: 0,
154
+ modelValue: m.value,
155
+ "onUpdate:modelValue": l[2] || (l[2] = (a) => m.value = a),
156
+ onChange: Q
121
157
  }, {
122
- default: o(() => l[6] || (l[6] = [
123
- p(i("在筛选条件内查询"))
158
+ default: t(() => l[6] || (l[6] = [
159
+ g(v("在筛选条件内查询"))
124
160
  ])),
125
161
  _: 1
126
- }, 8, ["modelValue", "onChange"]),
127
- e(D) ? (r(), c(e(G), {
128
- key: 0,
162
+ }, 8, ["modelValue"])) : P("", !0),
163
+ e(A) ? (c(), f(e(de), {
164
+ key: 1,
129
165
  type: "primary",
130
- onClick: O
166
+ onClick: M
131
167
  }, {
132
- default: o(() => l[7] || (l[7] = [
133
- p(i("批量查询"))
168
+ default: t(() => l[7] || (l[7] = [
169
+ g(v("批量查询"))
134
170
  ])),
135
171
  _: 1
136
- })) : k("", !0)
137
- ])) : k("", !0)
172
+ })) : P("", !0)
173
+ ])
138
174
  ]),
139
- t(e(J), {
140
- modelValue: d.value,
141
- "onUpdate:modelValue": l[5] || (l[5] = (a) => d.value = a),
175
+ o(e(pe), {
176
+ modelValue: h.value,
177
+ "onUpdate:modelValue": l[5] || (l[5] = (a) => h.value = a),
142
178
  title: "批量查询",
143
179
  width: "30%",
144
- "before-close": S,
180
+ "before-close": B,
145
181
  "append-to-body": !0,
146
182
  draggable: ""
147
183
  }, {
148
- footer: o(() => [
149
- V("div", te, [
150
- t(e(B), {
184
+ footer: t(() => [
185
+ C("div", Ce, [
186
+ o(e(L), {
151
187
  type: "primary",
152
- loading: H.value,
153
- onClick: e(N)
188
+ loading: V.value,
189
+ onClick: te
154
190
  }, {
155
- default: o(() => l[8] || (l[8] = [
156
- p(i("确认"))
191
+ default: t(() => l[9] || (l[9] = [
192
+ g(v("确认"))
157
193
  ])),
158
194
  _: 1
159
- }, 8, ["loading", "onClick"]),
160
- t(e(B), { onClick: S }, {
161
- default: o(() => l[9] || (l[9] = [
162
- p(i("关闭"))
195
+ }, 8, ["loading"]),
196
+ o(e(L), { onClick: B }, {
197
+ default: t(() => l[10] || (l[10] = [
198
+ g(v("关闭"))
163
199
  ])),
164
200
  _: 1
165
201
  })
166
202
  ])
167
203
  ]),
168
- default: o(() => [
169
- t(e(Z), {
170
- ref: "batchSearchFormRef",
204
+ default: t(() => [
205
+ o(e(me), {
206
+ ref_key: "batchSearchFormRef",
207
+ ref: x,
171
208
  model: s.value,
172
- rules: K
209
+ rules: j
173
210
  }, {
174
- default: o(() => [
175
- t(e(P), { class: "row-class" }, {
176
- default: o(() => [
177
- t(e(T), { prop: "searchType" }, {
178
- default: o(() => [
179
- t(e(x), {
211
+ default: t(() => [
212
+ o(e(E), { class: "row-class" }, {
213
+ default: t(() => l[8] || (l[8] = [
214
+ C("span", null, v("综合搜索"), -1)
215
+ ])),
216
+ _: 1
217
+ }),
218
+ o(e(E), { class: "row-class" }, {
219
+ default: t(() => [
220
+ o(e(N), { prop: "searchType" }, {
221
+ default: t(() => [
222
+ o(e(G), {
180
223
  modelValue: s.value.searchType,
181
224
  "onUpdate:modelValue": l[3] || (l[3] = (a) => s.value.searchType = a),
182
225
  size: "small",
183
226
  class: "custom-select"
184
227
  }, {
185
- default: o(() => [
186
- (r(!0), v(b, null, E(e(C), (a) => (r(), c(e(F), {
228
+ default: t(() => [
229
+ (c(!0), T(_, null, I(e(w), (a) => (c(), f(e(U), {
187
230
  key: a.label,
188
231
  label: a.label,
189
232
  value: a.value
@@ -197,20 +240,20 @@ const ae = { class: "yahee-comporehensive-search" }, oe = {
197
240
  ]),
198
241
  _: 1
199
242
  }),
200
- t(e(P), { class: "row-class" }, {
201
- default: o(() => [
202
- t(e(T), {
243
+ o(e(E), { class: "row-class" }, {
244
+ default: t(() => [
245
+ o(e(N), {
203
246
  prop: "searchContent",
204
247
  style: { width: "100%" }
205
248
  }, {
206
- default: o(() => [
207
- t(e(w), {
249
+ default: t(() => [
250
+ o(e(K), {
208
251
  modelValue: s.value.searchContent,
209
252
  "onUpdate:modelValue": l[4] || (l[4] = (a) => s.value.searchContent = a),
210
253
  placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,`",
211
254
  type: "textarea",
212
255
  rows: 5,
213
- onPaste: e(y)
256
+ onPaste: e(b)
214
257
  }, null, 8, ["modelValue", "onPaste"])
215
258
  ]),
216
259
  _: 1
@@ -230,5 +273,5 @@ const ae = { class: "yahee-comporehensive-search" }, oe = {
230
273
  }
231
274
  });
232
275
  export {
233
- Pe as default
276
+ ze as default
234
277
  };
@@ -6,7 +6,7 @@ import "element-plus/theme-chalk/src/popper.scss";
6
6
  import "element-plus/theme-chalk/src/badge.scss";
7
7
  import "element-plus/theme-chalk/src/message.scss";
8
8
  import { DocumentCopy as h } from "@element-plus/icons-vue";
9
- import { useClipboard as y } from "../hooks/useClipboard.js";
9
+ import { useClipboard as y } from "../packages/components/hooks/useClipboard.js";
10
10
  const C = { class: "yahee-copy" }, z = /* @__PURE__ */ l({
11
11
  name: "YaheeCopy",
12
12
  __name: "copy",