yahee-components 0.0.40 → 0.0.42
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 +154 -69
- package/es/annex-upload/annex-upload.vue2.js +2 -119
- package/es/annex-upload/index.js +3 -3
- package/es/api/tool.js +1 -1
- package/es/complex-search/complex-search.vue.js +294 -240
- package/es/complex-search/complex-search.vue2.js +2 -130
- package/es/complex-search/index.js +5 -5
- package/es/copy/copy.vue.js +55 -39
- package/es/copy/copy.vue2.js +2 -34
- package/es/copy/index.js +3 -3
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue.js +204 -158
- package/es/country-platform-shop-condition/country-platform-shop-condition.vue2.js +2 -125
- package/es/drop-down-condition/drop-down-condition.vue.js +211 -193
- package/es/drop-down-condition/drop-down-condition.vue2.js +2 -127
- package/es/image-upload/image-upload.vue.js +113 -76
- package/es/image-upload/image-upload.vue2.js +2 -91
- package/es/image-upload/index.js +3 -3
- package/es/input/index.js +3 -3
- package/es/input/input.vue.js +38 -17
- package/es/input/input.vue2.js +2 -33
- package/es/left-condition/index.js +5 -5
- package/es/left-condition/left-condition-sub.vue.js +86 -55
- package/es/left-condition/left-condition-sub.vue2.js +2 -76
- package/es/left-condition/left-condition.vue.js +209 -91
- package/es/left-condition/left-condition.vue2.js +2 -152
- package/es/left-condition-enum/index.js +3 -3
- package/es/left-condition-enum/left-condition-enum.vue.js +77 -19
- package/es/left-condition-enum/left-condition-enum.vue2.js +2 -69
- package/es/operation-log/operation-log-content.vue.js +88 -78
- package/es/operation-log/operation-log-content.vue2.js +2 -35
- package/es/operation-log/operation-log-dialog.vue.js +68 -57
- package/es/operation-log/operation-log-dialog.vue2.js +2 -38
- package/es/operation-log/operation-log-form.vue.js +183 -132
- package/es/operation-log/operation-log-form.vue2.js +2 -104
- package/es/operation-log/operation-log.vue.js +223 -183
- package/es/operation-log/operation-log.vue2.js +2 -133
- package/es/packages/components/api/log-server.js +5 -5
- package/es/packages/components/api/upload-server.js +1 -1
- package/es/packages/components/hooks/useImg.js +8 -8
- package/es/utils/translate.js +19 -19
- package/package.json +1 -1
- package/es/_virtual/_plugin-vue_export-helper.js +0 -9
package/es/utils/translate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sessionStorageProxy as
|
|
1
|
+
import { sessionStorageProxy as u, storage as s } from "./storage.js";
|
|
2
2
|
import m from "../_virtual/lodash.js";
|
|
3
3
|
import "../node_modules/.pnpm/axios@1.7.9/node_modules/axios/index.js";
|
|
4
4
|
import { i18nType as c } from "../static/CommonObject.js";
|
|
@@ -6,24 +6,24 @@ import { Get as h } from "../api/server.js";
|
|
|
6
6
|
import y from "../node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/axios.js";
|
|
7
7
|
const $ = (e) => {
|
|
8
8
|
var i;
|
|
9
|
-
const t =
|
|
9
|
+
const t = u.get("employee") || {}, o = d(e);
|
|
10
10
|
if (o === 0) return e;
|
|
11
|
-
const
|
|
12
|
-
if (m.isEmpty(
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
11
|
+
const r = u.get(`translate${t.Language}`) || {};
|
|
12
|
+
if (m.isEmpty(r) || t.Language === "zh-CN" || !/[\u4e00-\u9fa5]/.test(e)) return e;
|
|
13
|
+
const l = r[o];
|
|
14
|
+
if (l)
|
|
15
|
+
return l;
|
|
16
16
|
{
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
17
|
+
const n = ((i = localStorage.getItem("localStorageListId")) == null ? void 0 : i.split(",")) || [];
|
|
18
|
+
if (n.includes(o.toString()))
|
|
19
19
|
return e;
|
|
20
|
-
|
|
20
|
+
n.push(o.toString()), localStorage.setItem("localStorageListId", n.join(","));
|
|
21
21
|
const p = {
|
|
22
22
|
projectId: "place-order",
|
|
23
23
|
id: o,
|
|
24
24
|
cn: e
|
|
25
|
-
},
|
|
26
|
-
return console.log(
|
|
25
|
+
}, g = "https://erptools.yaheecloud.com/api/translation/addTranslate";
|
|
26
|
+
return console.log(g, "url"), y.post(g, p, { withCredentials: !0 }).then((f) => {
|
|
27
27
|
f.data.code;
|
|
28
28
|
}), e;
|
|
29
29
|
}
|
|
@@ -31,21 +31,21 @@ const $ = (e) => {
|
|
|
31
31
|
function d(e) {
|
|
32
32
|
let t = 0;
|
|
33
33
|
if (!e || e.length === 0) return t;
|
|
34
|
-
for (let o = 0,
|
|
34
|
+
for (let o = 0, r = e.length; o < r; o++) {
|
|
35
35
|
const a = e.charCodeAt(o);
|
|
36
36
|
t = (t << 5) - t + a, t |= 0;
|
|
37
37
|
}
|
|
38
38
|
return t;
|
|
39
39
|
}
|
|
40
40
|
function j(e, t = "") {
|
|
41
|
-
const o =
|
|
41
|
+
const o = s.get("totalEmployees");
|
|
42
42
|
if (!e || m.isEmpty(o)) return t;
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
43
|
+
const r = u.get("employee");
|
|
44
|
+
if (r.Language === c.CN) return t;
|
|
45
45
|
const a = o[e];
|
|
46
|
-
return a ?
|
|
47
|
-
const i =
|
|
48
|
-
return
|
|
46
|
+
return a ? r.Language === c.CN ? a.name || t : a.enName || "" : (E(e).then((l) => {
|
|
47
|
+
const i = s.get("totalEmployees") || {}, n = l.data[0];
|
|
48
|
+
return n ? (i[e] = n, s.setWithExpireTime("totalEmployees", i, 3600 * 1e3), r.Language === c.CN ? n.name || "" : n.enName || "") : t;
|
|
49
49
|
}), t);
|
|
50
50
|
}
|
|
51
51
|
function E(e) {
|
package/package.json
CHANGED