yahee-components 0.0.9 → 0.0.12
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/annex-upload/annex-upload.vue.js +6 -6
- package/es/api/server.js +29 -0
- package/es/api/tool.js +69 -0
- package/es/comprehensive-search/comprehensive-search.vue.js +10 -10
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +218 -0
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +4 -0
- package/es/country-platform-shop-condition/index.js +7 -0
- package/es/country-platform-shop-condition/style/index.css +48 -0
- package/es/drop-down-condition/drop-down-condition.vue.js +215 -0
- package/es/drop-down-condition/drop-down-condition.vue2.js +4 -0
- package/es/drop-down-condition/index.js +7 -0
- package/es/drop-down-condition/style/index.css +45 -0
- package/es/image-upload/image-upload.vue.js +125 -124
- package/es/index.js +28 -15
- package/es/installs.js +18 -10
- package/es/left-condition/index.js +7 -0
- package/es/left-condition/left-condition-sub.vue.js +95 -0
- package/es/left-condition/left-condition-sub.vue2.js +4 -0
- package/es/left-condition/left-condition.vue.js +214 -0
- package/es/left-condition/left-condition.vue2.js +4 -0
- package/es/left-condition/style/index.css +11 -0
- package/es/left-condition-enum/index.js +7 -0
- package/es/left-condition-enum/left-condition-enum.vue.js +76 -0
- package/es/left-condition-enum/left-condition-enum.vue2.js +4 -0
- package/es/left-condition-enum/style/index.css +0 -0
- package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js +38 -0
- package/es/operation-log/operation-log-content.vue.js +6 -6
- package/es/operation-log/operation-log-form.vue.js +2 -2
- package/es/operation-log/operation-log-form.vue2.js +17 -17
- package/es/operation-log/operation-log.vue.js +50 -49
- package/es/packages/components/api/log/index.js +15 -0
- package/es/packages/components/api/log-server.js +17 -21
- package/es/packages/components/api/server.js +19 -0
- package/es/packages/components/api/tool.js +57 -0
- package/es/packages/components/api/{requestTools.js → upload-server.js} +13 -10
- package/es/packages/components/hooks/useClipboard.js +16 -14
- package/es/packages/components/hooks/useImport.js +14 -12
- package/es/packages/components/hooks/useUpload.js +9 -9
- package/es/static/CommonObject.js +4 -0
- package/es/style.css +81 -196
- package/es/utils/config.js +19 -0
- package/es/utils/const.js +19 -0
- package/es/utils/style.js +28 -0
- package/es/utils/translate.js +50 -31
- package/lib/country-platform-shop-condition/style/index.css +48 -0
- package/lib/drop-down-condition/style/index.css +45 -0
- package/lib/left-condition/style/index.css +11 -0
- package/lib/left-condition-enum/style/index.css +0 -0
- package/lib/style.css +81 -196
- package/package.json +1 -1
- package/types/hooks/useClipboard.d.ts +7 -0
- package/types/hooks/useImg.d.ts +10 -0
- package/types/hooks/useImgPath.d.ts +5 -0
- package/types/hooks/useImport.d.ts +11 -0
- package/types/hooks/useUpload.d.ts +12 -0
- package/types/index.d.ts +6 -1204
- package/types/src/annex-upload/annex-upload.d.ts +30 -0
- package/types/src/annex-upload/annex-upload.vue.d.ts +443 -0
- package/types/src/annex-upload/index.d.ts +123 -0
- package/types/src/annex-upload/mimeType.d.ts +2 -0
- package/types/src/api/server.d.ts +6 -0
- package/types/src/api/tool.d.ts +6 -0
- package/types/src/api/types.d.ts +17 -0
- package/types/src/components.d.ts +10 -0
- package/types/src/comprehensive-search/comprehensive-search.d.ts +12 -0
- package/types/src/comprehensive-search/comprehensive-search.vue.d.ts +33 -0
- package/types/src/comprehensive-search/index.d.ts +36 -0
- package/types/src/copy/copy.d.ts +12 -0
- package/types/src/copy/copy.vue.d.ts +21 -0
- package/types/src/copy/index.d.ts +32 -0
- package/types/src/country-platform-shop-condition/country-platform-shop-condition.d.ts +17 -0
- package/types/src/country-platform-shop-condition/country-platform-shop-condition.vue.d.ts +14 -0
- package/types/src/country-platform-shop-condition/index.d.ts +16 -0
- package/types/src/drop-down-condition/drop-down-condition.d.ts +6 -0
- package/types/src/drop-down-condition/drop-down-condition.vue.d.ts +38 -0
- package/types/src/drop-down-condition/index.d.ts +40 -0
- package/types/src/image-upload/image-upload.d.ts +26 -0
- package/types/src/image-upload/image-upload.vue.d.ts +43 -0
- package/types/src/image-upload/index.d.ts +94 -0
- package/types/src/index.d.ts +7 -0
- package/types/src/input/index.d.ts +16 -0
- package/types/src/input/input.d.ts +18 -0
- package/types/src/input/input.vue.d.ts +14 -0
- package/types/src/installs.d.ts +535 -0
- package/types/src/left-condition/index.d.ts +69 -0
- package/types/src/left-condition/left-condition-sub.vue.d.ts +47 -0
- package/types/src/left-condition/left-condition.d.ts +5 -0
- package/types/src/left-condition/left-condition.vue.d.ts +68 -0
- package/types/src/left-condition-enum/index.d.ts +153 -0
- package/types/src/left-condition-enum/left-condition-enum.d.ts +5 -0
- package/types/src/left-condition-enum/left-condition-enum.vue.d.ts +151 -0
- package/types/src/operation-log/index.d.ts +9 -0
- package/types/src/operation-log/operation-log-content.vue.d.ts +24 -0
- package/types/src/operation-log/operation-log-dialog.vue.d.ts +39 -0
- package/types/src/operation-log/operation-log-form.vue.d.ts +19 -0
- package/types/src/operation-log/operation-log.d.ts +11 -0
- package/types/src/operation-log/operation-log.vue.d.ts +6 -0
- package/types/src/static/CommonObject.d.ts +18 -0
- package/types/src/static/CommonVariables.d.ts +4 -0
- package/types/src/utils/config.d.ts +8 -0
- package/types/src/utils/const.d.ts +19 -0
- package/types/src/utils/functions.d.ts +1 -0
- package/types/src/utils/install.d.ts +8 -0
- package/types/src/utils/storage.d.ts +18 -0
- package/types/src/utils/style.d.ts +19 -0
- package/types/src/utils/to-kebab-case.d.ts +1 -0
- package/types/src/utils/translate.d.ts +5 -0
- package/types/src/utils/typescript.d.ts +5 -0
- package/es/packages/components/api/remarkApi.js +0 -15
- package/es/packages/components/api/requestRemark.js +0 -47
- package/lib/_virtual/_commonjsHelpers.js +0 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +0 -1
- package/lib/_virtual/dayjs.min.js +0 -1
- package/lib/_virtual/lodash.js +0 -1
- package/lib/annex-upload/annex-upload.vue.js +0 -1
- package/lib/annex-upload/annex-upload.vue2.js +0 -1
- package/lib/annex-upload/index.js +0 -1
- package/lib/annex-upload/mimeType.js +0 -1
- package/lib/comprehensive-search/comprehensive-search.vue.js +0 -1
- package/lib/comprehensive-search/comprehensive-search.vue2.js +0 -1
- package/lib/comprehensive-search/index.js +0 -1
- package/lib/copy/copy.vue.js +0 -1
- package/lib/copy/copy.vue2.js +0 -1
- package/lib/copy/index.js +0 -1
- package/lib/image-upload/image-upload.vue.js +0 -1
- package/lib/image-upload/image-upload.vue2.js +0 -1
- package/lib/image-upload/index.js +0 -1
- package/lib/index.js +0 -1
- package/lib/input/index.js +0 -1
- package/lib/input/input.vue.js +0 -1
- package/lib/input/input.vue2.js +0 -1
- package/lib/installs.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/adapters.js +0 -3
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/fetch.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/xhr.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CancelToken.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CanceledError.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/isCancel.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/Axios.js +0 -2
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosError.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosHeaders.js +0 -2
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/InterceptorManager.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/buildFullPath.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/dispatchRequest.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/mergeConfig.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/settle.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/transformData.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/index.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/transitional.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/env/data.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/bind.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/buildURL.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/combineURLs.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/composeSignals.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/cookies.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/formDataToJSON.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAxiosError.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/null.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseHeaders.js +0 -2
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseProtocol.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/progressEventReducer.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/resolveConfig.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/speedometer.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/spread.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/throttle.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toFormData.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/trackStream.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/validator.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/index.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/common/utils.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/index.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/utils.js +0 -1
- package/lib/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js +0 -1
- package/lib/node_modules/.pnpm/element-plus@2.8.3_vue@3.5.4_typescript@5.6.2_/node_modules/element-plus/es/locale/lang/zh-cn.js +0 -1
- package/lib/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js +0 -27
- package/lib/node_modules/.pnpm/v3-infinite-loading@1.3.2/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js +0 -1
- package/lib/operation-log/index.js +0 -1
- package/lib/operation-log/operation-log-content.vue.js +0 -1
- package/lib/operation-log/operation-log-content.vue2.js +0 -1
- package/lib/operation-log/operation-log-dialog.vue.js +0 -1
- package/lib/operation-log/operation-log-dialog.vue2.js +0 -1
- package/lib/operation-log/operation-log-form.vue.js +0 -1
- package/lib/operation-log/operation-log-form.vue2.js +0 -1
- package/lib/operation-log/operation-log.vue.js +0 -1
- package/lib/operation-log/operation-log.vue2.js +0 -1
- package/lib/packages/components/api/log-server.js +0 -1
- package/lib/packages/components/api/remarkApi.js +0 -1
- package/lib/packages/components/api/requestRemark.js +0 -1
- package/lib/packages/components/api/requestTools.js +0 -1
- package/lib/packages/components/assets/images/errorimg.png.js +0 -1
- package/lib/packages/components/assets/images/excel.png.js +0 -1
- package/lib/packages/components/assets/images/file-word.png.js +0 -1
- package/lib/packages/components/assets/images/pdf.png.js +0 -1
- package/lib/packages/components/assets/images/ppt.png.js +0 -1
- package/lib/packages/components/assets/images/vue.svg.js +0 -1
- package/lib/packages/components/hooks/useClipboard.js +0 -1
- package/lib/packages/components/hooks/useImg.js +0 -1
- package/lib/packages/components/hooks/useImgPath.js +0 -1
- package/lib/packages/components/hooks/useImport.js +0 -1
- package/lib/packages/components/hooks/useUpload.js +0 -1
- package/lib/utils/install.js +0 -1
- package/lib/utils/storage.js +0 -1
- package/lib/utils/translate.js +0 -1
- /package/es/node_modules/.pnpm/{element-plus@2.8.3_vue@3.5.4_typescript@5.6.2_ → 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
|
@@ -8,7 +8,7 @@ import "element-plus/theme-chalk/src/message.scss";
|
|
|
8
8
|
import "element-plus/theme-chalk/src/upload.scss";
|
|
9
9
|
import "element-plus/theme-chalk/src/progress.scss";
|
|
10
10
|
import "element-plus/theme-chalk/src/button.scss";
|
|
11
|
-
import { MimeType as
|
|
11
|
+
import { MimeType as w } from "./mimeType.js";
|
|
12
12
|
import { M2 as a } from "../utils/translate.js";
|
|
13
13
|
const q = { class: "yahee-annex-upload" }, D = { class: "margin15 el-upload__tip" }, I = { key: 0 }, le = /* @__PURE__ */ C({
|
|
14
14
|
name: "AnnexUpload",
|
|
@@ -29,14 +29,14 @@ const q = { class: "yahee-annex-upload" }, D = { class: "margin15 el-upload__tip
|
|
|
29
29
|
showTips: { type: Boolean, default: !0 }
|
|
30
30
|
},
|
|
31
31
|
emits: ["update:modelValue", "change", "success", "remove"],
|
|
32
|
-
setup(
|
|
33
|
-
const l =
|
|
32
|
+
setup(T, { expose: $, emit: U }) {
|
|
33
|
+
const l = T, o = U;
|
|
34
34
|
function V(e) {
|
|
35
35
|
if (l.accept && l.checkRealType) {
|
|
36
36
|
const t = [];
|
|
37
37
|
for (let i of l.accept.split(","))
|
|
38
|
-
if (i = i.toLowerCase(),
|
|
39
|
-
t.push(
|
|
38
|
+
if (i = i.toLowerCase(), w.get(i) !== void 0)
|
|
39
|
+
t.push(w.get(i));
|
|
40
40
|
else
|
|
41
41
|
return p.error(a(`文件类型错误,支持文件类型为: ${l.accept}!`)), !1;
|
|
42
42
|
if (t.join().indexOf(e.type) === -1)
|
|
@@ -55,7 +55,7 @@ const q = { class: "yahee-annex-upload" }, D = { class: "margin15 el-upload__tip
|
|
|
55
55
|
e.onSuccess(t);
|
|
56
56
|
}).catch(() => {
|
|
57
57
|
e.onError();
|
|
58
|
-
}) : l.uploadType === "import" && M(
|
|
58
|
+
}) : l.uploadType === "import" && M(e.file, (t) => {
|
|
59
59
|
e.onProgress(t);
|
|
60
60
|
}).then((t) => {
|
|
61
61
|
e.onSuccess(t);
|
package/es/api/server.js
ADDED
|
@@ -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,69 @@
|
|
|
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 i = "https://plmerp.yaheecloud.com/api/plm/product-dev/", N = (e) => ({
|
|
11
|
+
...e,
|
|
12
|
+
baseURL: i,
|
|
13
|
+
timeout: 2e4
|
|
14
|
+
}), R = (e) => {
|
|
15
|
+
const o = new l(e.headers);
|
|
16
|
+
return {
|
|
17
|
+
...e,
|
|
18
|
+
headers: o
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
let t = !1;
|
|
22
|
+
const U = (e) => {
|
|
23
|
+
const o = {
|
|
24
|
+
400: "错误的请求",
|
|
25
|
+
// token 失效
|
|
26
|
+
403: "拒绝访问",
|
|
27
|
+
404: "请求错误,未找到该资源",
|
|
28
|
+
405: "请求方法未允许",
|
|
29
|
+
408: "请求超时",
|
|
30
|
+
500: "服务器端出错",
|
|
31
|
+
501: "网络未实现",
|
|
32
|
+
502: "网络错误",
|
|
33
|
+
503: "服务不可用",
|
|
34
|
+
504: "网络超时",
|
|
35
|
+
505: "http版本不支持该请求"
|
|
36
|
+
};
|
|
37
|
+
switch (e) {
|
|
38
|
+
case 401:
|
|
39
|
+
window.location.href = `https://portal.yaheecloud.com//Latest/Account/LogOn?returnUrl=${encodeURIComponent(window.location.href)}`;
|
|
40
|
+
break;
|
|
41
|
+
case 403:
|
|
42
|
+
t || (t = !0, s.alert("对不起,您没有权限进行当前操作!").finally(() => {
|
|
43
|
+
t = !1;
|
|
44
|
+
}));
|
|
45
|
+
break;
|
|
46
|
+
default:
|
|
47
|
+
e && n.error(o[e] ?? `其他连接错误 --${e}`);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
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 C = (e) => e in {
|
|
52
|
+
10031: "登录失效,需要重新登录",
|
|
53
|
+
// token 失效
|
|
54
|
+
10032: "您太久没登录,请重新登录~",
|
|
55
|
+
// token 过期
|
|
56
|
+
10033: "账户未绑定角色,请联系管理员绑定角色",
|
|
57
|
+
10034: "该用户未注册,请联系管理员注册用户",
|
|
58
|
+
10035: "code 无法获取对应第三方平台用户",
|
|
59
|
+
10036: "该账户未关联员工,请联系管理员做关联",
|
|
60
|
+
10037: "账号已无效",
|
|
61
|
+
10038: "账号未找到"
|
|
62
|
+
} ? (n.error(a[e]), !1) : !0, v = (e, o) => e !== 0 && o !== "OK" ? (n.error(o), !1) : !0;
|
|
63
|
+
export {
|
|
64
|
+
C as handleAuthError,
|
|
65
|
+
N as handleChangeRequestHeader,
|
|
66
|
+
R as handleConfigureAuth,
|
|
67
|
+
v as handleGeneralError,
|
|
68
|
+
U as handleNetworkError
|
|
69
|
+
};
|
|
@@ -21,7 +21,7 @@ import "element-plus/theme-chalk/src/config-provider.scss";
|
|
|
21
21
|
import "element-plus/theme-chalk/src/badge.scss";
|
|
22
22
|
import "element-plus/theme-chalk/src/message.scss";
|
|
23
23
|
import { Search as le } from "@element-plus/icons-vue";
|
|
24
|
-
import ae from "../node_modules/.pnpm/element-plus@2.8.3_vue@3.5.
|
|
24
|
+
import ae 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";
|
|
25
25
|
const oe = { class: "yahee-comporehensive-search" }, te = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "search-type-checkbox"
|
|
@@ -49,24 +49,24 @@ const oe = { class: "yahee-comporehensive-search" }, te = {
|
|
|
49
49
|
options: g,
|
|
50
50
|
showPatchSearch: D,
|
|
51
51
|
showPatchCheckbox: q
|
|
52
|
-
} = W(L),
|
|
52
|
+
} = W(L), d = n(z.value), s = n(""), S = n(!1), H = n(!1), c = n(!1), u = n({ searchType: "WHOLE_SEARCH", searchContent: "" }), K = {
|
|
53
53
|
selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
|
|
54
54
|
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
55
55
|
};
|
|
56
56
|
function O() {
|
|
57
|
-
|
|
57
|
+
c.value = !0;
|
|
58
58
|
}
|
|
59
59
|
function V() {
|
|
60
|
-
|
|
60
|
+
c.value = !1;
|
|
61
61
|
}
|
|
62
62
|
const f = () => {
|
|
63
63
|
if (!s.value) {
|
|
64
64
|
ee.warning("请输入搜索关键字");
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
|
-
y.value(
|
|
67
|
+
y.value(d.value, s.value);
|
|
68
68
|
}, A = () => {
|
|
69
|
-
|
|
69
|
+
y.value(d.value, s.value);
|
|
70
70
|
};
|
|
71
71
|
return (M, l) => (r(), p(e(Y), { locale: e(U) }, {
|
|
72
72
|
default: o(() => [
|
|
@@ -85,8 +85,8 @@ const oe = { class: "yahee-comporehensive-search" }, te = {
|
|
|
85
85
|
}, {
|
|
86
86
|
prepend: o(() => [
|
|
87
87
|
t(e(F), {
|
|
88
|
-
modelValue:
|
|
89
|
-
"onUpdate:modelValue": l[0] || (l[0] = (a) =>
|
|
88
|
+
modelValue: d.value,
|
|
89
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => d.value = a),
|
|
90
90
|
size: "small",
|
|
91
91
|
class: "custom-select"
|
|
92
92
|
}, {
|
|
@@ -140,8 +140,8 @@ const oe = { class: "yahee-comporehensive-search" }, te = {
|
|
|
140
140
|
])) : w("", !0)
|
|
141
141
|
]),
|
|
142
142
|
t(e(Z), {
|
|
143
|
-
modelValue:
|
|
144
|
-
"onUpdate:modelValue": l[5] || (l[5] = (a) =>
|
|
143
|
+
modelValue: c.value,
|
|
144
|
+
"onUpdate:modelValue": l[5] || (l[5] = (a) => c.value = a),
|
|
145
145
|
title: "批量查询",
|
|
146
146
|
width: "30%",
|
|
147
147
|
"before-close": V,
|
|
@@ -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,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
|
+
}
|