@witlink/usercenter 1.2.23 → 1.2.24

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.
@@ -1,529 +0,0 @@
1
- import { createVNode as e, defineComponent as G, ref as v, reactive as Q, onMounted as X, openBlock as I, createBlock as V, withCtx as l, mergeProps as P, createElementBlock as q, Fragment as ve, renderList as ye, computed as Y, normalizeStyle as he, renderSlot as be, resolveComponent as w, createElementVNode as S, createTextVNode as k, toDisplayString as E, unref as W, createCommentVNode as xe } from "vue";
2
- import { message as R } from "ant-design-vue";
3
- import { useI18n as Z } from "vue-i18n";
4
- import { A as we, z as L, p as ee, q as ne, F as te, S as le, G as ke, _ as K, H as Ie, I as Le, B as $e, K as Ce, L as Oe, N as Ue, O as Se } from "./index.b7fe889a.mjs";
5
- import './assets/index.ca7d4055.css';var Re = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z" } }, { tag: "path", attrs: { d: "M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z" } }] }, name: "form", theme: "outlined" };
6
- const Te = Re;
7
- function J(s) {
8
- for (var a = 1; a < arguments.length; a++) {
9
- var r = arguments[a] != null ? Object(arguments[a]) : {}, o = Object.keys(r);
10
- typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(r).filter(function(c) {
11
- return Object.getOwnPropertyDescriptor(r, c).enumerable;
12
- }))), o.forEach(function(c) {
13
- Ae(s, c, r[c]);
14
- });
15
- }
16
- return s;
17
- }
18
- function Ae(s, a, r) {
19
- return a in s ? Object.defineProperty(s, a, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : s[a] = r, s;
20
- }
21
- var M = function(a, r) {
22
- var o = J({}, a, r.attrs);
23
- return e(we, J({}, o, {
24
- icon: Te
25
- }), null);
26
- };
27
- M.displayName = "FormOutlined";
28
- M.inheritAttrs = !1;
29
- const Fe = M;
30
- function ae(s) {
31
- return L({
32
- url: "/api/sys/lang/search-lang-list",
33
- method: "get",
34
- params: s
35
- });
36
- }
37
- function Be(s) {
38
- return L({
39
- url: "/api/sys/lang/search-list",
40
- method: "get",
41
- params: s
42
- });
43
- }
44
- function De(s) {
45
- return L({
46
- url: "/api/sys/lang/insert",
47
- method: "post",
48
- params: s
49
- });
50
- }
51
- function Ne(s) {
52
- return L({
53
- url: "/api/sys/lang/update",
54
- method: "post",
55
- params: s
56
- });
57
- }
58
- function je(s) {
59
- return L({
60
- url: "/api/sys/lang/delete",
61
- method: "post",
62
- params: s
63
- });
64
- }
65
- function ze() {
66
- return L({
67
- url: "/api/sys/lang/export",
68
- method: "get",
69
- responseType: "blob"
70
- });
71
- }
72
- const Pe = /* @__PURE__ */ G({
73
- name: "LangAdd",
74
- __name: "LangAdd",
75
- emits: ["ok", "cancel"],
76
- setup(s, { emit: a }) {
77
- const { t: r } = Z(), o = a, c = v([]), m = v(), g = {
78
- labelCol: {
79
- span: 6
80
- },
81
- wrapperCol: {
82
- span: 18
83
- }
84
- }, f = v(!0), _ = Q({
85
- langType: "",
86
- id: ""
87
- }), $ = v(!1), T = async () => {
88
- const { result: u } = await ae({});
89
- c.value = u;
90
- }, b = () => {
91
- o("cancel");
92
- }, A = () => {
93
- m.value && m.value.validate().then(async () => {
94
- $.value = !0;
95
- const { result: u } = await De(_);
96
- $.value = !1, u && (o("ok", u), R.success(r("lang.msg1")));
97
- });
98
- };
99
- return X(() => {
100
- T();
101
- }), (u, y) => {
102
- const C = ee, O = ne, F = te, B = le, D = ke;
103
- return I(), V(D, {
104
- bordered: !1,
105
- open: f.value,
106
- "onUpdate:open": y[2] || (y[2] = (d) => f.value = d),
107
- destroyOnClose: !0,
108
- title: u.$t("lang.title1"),
109
- onOk: A,
110
- onCancel: b
111
- }, {
112
- default: l(() => [
113
- e(B, { spinning: $.value }, {
114
- default: l(() => [
115
- e(F, {
116
- model: _,
117
- ref_key: "formRef",
118
- ref: m
119
- }, {
120
- default: l(() => [
121
- e(O, P({
122
- label: u.$t("lang.lang_type")
123
- }, g, {
124
- name: "langType",
125
- rules: [
126
- {
127
- required: !0,
128
- message: u.$t("lang.lang_type_placeholder"),
129
- trigger: "blur"
130
- }
131
- ]
132
- }), {
133
- default: l(() => [
134
- e(C, {
135
- placeholder: u.$t("lang.lang_type_placeholder"),
136
- value: _.langType,
137
- "onUpdate:value": y[0] || (y[0] = (d) => _.langType = d)
138
- }, null, 8, ["placeholder", "value"])
139
- ]),
140
- _: 1
141
- }, 16, ["label", "rules"]),
142
- e(O, P({
143
- label: u.$t("lang.id")
144
- }, g, {
145
- name: "id",
146
- rules: [
147
- {
148
- required: !0,
149
- message: u.$t("lang.id_placeholder"),
150
- trigger: "blur"
151
- }
152
- ]
153
- }), {
154
- default: l(() => [
155
- e(C, {
156
- placeholder: u.$t("lang.id_placeholder"),
157
- value: _.id,
158
- "onUpdate:value": y[1] || (y[1] = (d) => _.id = d)
159
- }, null, 8, ["placeholder", "value"])
160
- ]),
161
- _: 1
162
- }, 16, ["label", "rules"]),
163
- (I(!0), q(ve, null, ye(c.value, (d, N) => (I(), q("div", {
164
- key: d.langId
165
- }, [
166
- e(O, P({
167
- label: d.name,
168
- index: N,
169
- ref_for: !0
170
- }, g, {
171
- name: "lang" + d.langId,
172
- rules: [{ required: !0, trigger: "blur" }]
173
- }), {
174
- default: l(() => [
175
- e(C, {
176
- placeholder: u.$t("lang.content_placeholder"),
177
- value: _["lang" + d.langId],
178
- "onUpdate:value": (j) => _["lang" + d.langId] = j
179
- }, null, 8, ["placeholder", "value", "onUpdate:value"])
180
- ]),
181
- _: 2
182
- }, 1040, ["label", "index", "name"])
183
- ]))), 128))
184
- ]),
185
- _: 1
186
- }, 8, ["model"])
187
- ]),
188
- _: 1
189
- }, 8, ["spinning"])
190
- ]),
191
- _: 1
192
- }, 8, ["open", "title"]);
193
- };
194
- }
195
- }), Ee = /* @__PURE__ */ K(Pe, [["__file", "D:/inhe-code/witlink-platform-usercenter-web/witlink-platform-usercenter/src/views/sys/lang/LangAdd.vue"]]), Ve = /* @__PURE__ */ G({
196
- __name: "FormItemBtnGroup",
197
- props: {
198
- top: {
199
- type: [String, Number],
200
- default: 30
201
- }
202
- },
203
- setup(s) {
204
- const a = s, r = Y(() => {
205
- let o = a.top;
206
- return typeof o == "string" && (o = parseInt(o)), isNaN(o) && (o = 0), o + "px";
207
- });
208
- return (o, c) => (I(), q("div", {
209
- class: "btn-group",
210
- style: he({ "margin-top": r.value })
211
- }, [
212
- be(o.$slots, "default", {}, void 0, !0)
213
- ], 4));
214
- }
215
- });
216
- const qe = /* @__PURE__ */ K(Ve, [["__scopeId", "data-v-ffd7f8e3"], ["__file", "D:/inhe-code/witlink-platform-usercenter-web/witlink-platform-usercenter/src/components/FormItemBtnGroup/FormItemBtnGroup.vue"]]), Ge = {
217
- bordered: !1,
218
- class: "lang-warp"
219
- }, Ke = { style: { margin: "10px 0 6px 10px" } }, Me = { class: "table-page-search-wrapper" }, He = /* @__PURE__ */ G({
220
- __name: "index",
221
- setup(s) {
222
- const { t: a } = Z(), r = v(!1), o = v([]), c = v(), m = v(!1), g = Q({
223
- langType: "",
224
- id: "",
225
- lang1: ""
226
- }), f = v([]), _ = (n) => n.langType + n.id, $ = (n, t) => {
227
- if (n)
228
- f.value = [];
229
- else {
230
- const i = _(t);
231
- f.value = [i];
232
- }
233
- }, T = Y(() => [
234
- {
235
- title: a("lang.lang_type"),
236
- dataIndex: "langType",
237
- width: "150px",
238
- key: "langType"
239
- },
240
- {
241
- title: a("lang.id"),
242
- dataIndex: "id",
243
- width: "200px",
244
- key: "id"
245
- },
246
- {
247
- title: a("lang.lang1"),
248
- dataIndex: "lang1",
249
- width: "350px",
250
- key: "lang1"
251
- },
252
- {
253
- title: a("lang.lang2"),
254
- dataIndex: "lang2",
255
- width: "350px",
256
- key: "lang2"
257
- },
258
- {
259
- title: a("lang.lang3"),
260
- dataIndex: "lang3",
261
- key: "lang3"
262
- }
263
- ]), b = () => {
264
- r.value = !1, c.value && c.value.refresh();
265
- }, A = () => {
266
- b(), m.value = !1;
267
- }, u = () => {
268
- m.value = !0;
269
- }, y = () => {
270
- r.value = !1;
271
- }, C = () => {
272
- r.value = !0;
273
- }, O = async (n) => {
274
- const { result: t } = await Ne(n);
275
- t && (R.success(a("lang.msg1")), f.value = []);
276
- }, F = () => {
277
- Object.assign(g, {
278
- langType: "",
279
- id: "",
280
- lang1: ""
281
- }), b();
282
- }, B = async (n) => {
283
- const { result: t } = await je(n);
284
- t && (R.success(a("lang.msg1")), f.value = [], b());
285
- }, D = (n) => {
286
- let t = !1, i = "";
287
- for (let h = 0; h < o.value.length; h++)
288
- if (i += "[" + o.value[h].isoCode + "] ", o.value[h].isoCode + ".js" == n.name) {
289
- t = !0;
290
- break;
291
- }
292
- return t ? !0 : (R.error(a("lang.msg2") + i, 10), !1);
293
- }, d = async () => {
294
- m.value = !0;
295
- const n = await ze();
296
- m.value = !1;
297
- const t = window.URL.createObjectURL(new Blob([n])), i = document.createElement("a");
298
- i.style.display = "none", i.href = t, i.setAttribute("download", "langs.zip"), document.body.appendChild(i), i.click();
299
- }, N = async (n) => {
300
- const { result: t } = await Be({
301
- ...n,
302
- ...g
303
- });
304
- return t;
305
- }, j = async () => {
306
- const { result: n } = await ae({});
307
- o.value = n;
308
- };
309
- return X(() => {
310
- j();
311
- }), (n, t) => {
312
- const i = ee, h = ne, oe = w("uc-btn-search"), se = $e, re = te, ue = w("uc-btn-add"), ie = w("uc-btn-import"), pe = w("uc-btn-export"), U = Ce, z = Oe, de = Ue, ce = Se, ge = w("uc-btn-edit"), _e = w("uc-btn-remove"), me = le;
313
- return I(), V(me, {
314
- spinning: m.value,
315
- tip: n.$t("lang.tip"),
316
- size: "large"
317
- }, {
318
- default: l(() => [
319
- S("div", Ge, [
320
- S("div", Ke, [
321
- S("div", null, [
322
- e(re, {
323
- layout: "vertical",
324
- class: "inline-query-form clear-formctrl-lh"
325
- }, {
326
- default: l(() => [
327
- e(h, {
328
- label: n.$t("lang.lang_type"),
329
- style: { width: "200px", "padding-right": "20px" }
330
- }, {
331
- default: l(() => [
332
- e(i, {
333
- value: g.langType,
334
- "onUpdate:value": t[0] || (t[0] = (p) => g.langType = p),
335
- placeholder: n.$t("lang.lang_type_placeholder")
336
- }, null, 8, ["value", "placeholder"])
337
- ]),
338
- _: 1
339
- }, 8, ["label"]),
340
- e(h, {
341
- label: n.$t("lang.id"),
342
- style: { width: "200px", "padding-right": "20px" }
343
- }, {
344
- default: l(() => [
345
- e(i, {
346
- value: g.id,
347
- "onUpdate:value": t[1] || (t[1] = (p) => g.id = p),
348
- placeholder: n.$t("lang.id_placeholder")
349
- }, null, 8, ["value", "placeholder"])
350
- ]),
351
- _: 1
352
- }, 8, ["label"]),
353
- e(h, {
354
- label: n.$t("lang.content"),
355
- style: { width: "200px", "padding-right": "20px" }
356
- }, {
357
- default: l(() => [
358
- e(i, {
359
- value: g.lang1,
360
- "onUpdate:value": t[2] || (t[2] = (p) => g.lang1 = p),
361
- placeholder: n.$t("lang.content_placeholder")
362
- }, null, 8, ["value", "placeholder"])
363
- ]),
364
- _: 1
365
- }, 8, ["label"]),
366
- e(qe, null, {
367
- default: l(() => [
368
- e(oe, {
369
- onClick: b,
370
- isWidth: !0,
371
- showInput: !1
372
- }),
373
- e(se, {
374
- onClick: F,
375
- style: { "margin-left": "8px" }
376
- }, {
377
- default: l(() => [
378
- k(E(n.$t("common.btn_reset")), 1)
379
- ]),
380
- _: 1
381
- })
382
- ]),
383
- _: 1
384
- })
385
- ]),
386
- _: 1
387
- })
388
- ])
389
- ]),
390
- S("div", Me, [
391
- e(z, null, {
392
- default: l(() => [
393
- e(U, {
394
- md: 19,
395
- sm: 19
396
- }, {
397
- default: l(() => [
398
- e(ue, { onClick: C }),
399
- t[4] || (t[4] = k("\xA0 ")),
400
- e(ie, {
401
- action: "/usercenter/api/sys/lang/import",
402
- accept: ".js",
403
- beforeUpload: D,
404
- onDone: A,
405
- onUploading: u
406
- }),
407
- t[5] || (t[5] = k("\xA0 ")),
408
- e(pe, { onClick: d })
409
- ]),
410
- _: 1
411
- })
412
- ]),
413
- _: 1
414
- }),
415
- e(Ie, {
416
- style: { "margin-top": "10px" },
417
- ref_key: "tableRef",
418
- ref: c,
419
- columns: T.value,
420
- data: N,
421
- rowKey: _,
422
- scroll: { y: 550 },
423
- expandedRowKeys: f.value,
424
- "onUpdate:expandedRowKeys": t[3] || (t[3] = (p) => f.value = p)
425
- }, {
426
- expandColumnTitle: l(() => [
427
- k(E(n.$t("device.index1")), 1)
428
- ]),
429
- expandIcon: l(({ expanded: p, record: x }) => [
430
- e(W(Le), {
431
- class: "icon",
432
- style: { fontSize: "20px", color: "#1890ff", cursor: "pointer" },
433
- onClick: (H) => $(p, x)
434
- }, {
435
- component: l(() => [
436
- e(W(Fe))
437
- ]),
438
- _: 2
439
- }, 1032, ["onClick"])
440
- ]),
441
- expandedRowRender: l(({ record: p }) => [
442
- e(ce, { dataSource: o.value }, {
443
- renderItem: l(({ item: x, index: H }) => [
444
- e(de, { style: { "padding-left": "50px", border: "none" } }, {
445
- default: l(() => [
446
- e(z, {
447
- index: H,
448
- style: { width: "100%" }
449
- }, {
450
- default: l(() => [
451
- e(U, {
452
- span: 3,
453
- style: { height: "40px", "line-height": "40px" }
454
- }, {
455
- default: l(() => [
456
- k(E(x.name), 1)
457
- ]),
458
- _: 2
459
- }, 1024),
460
- e(U, {
461
- span: 7,
462
- style: { height: "40px", "line-height": "40px" }
463
- }, {
464
- default: l(() => [
465
- e(i, {
466
- placeholder: n.$t("lang.content_placeholder"),
467
- value: p["lang" + x.langId],
468
- "onUpdate:value": (fe) => p["lang" + x.langId] = fe
469
- }, null, 8, ["placeholder", "value", "onUpdate:value"])
470
- ]),
471
- _: 2
472
- }, 1024)
473
- ]),
474
- _: 2
475
- }, 1032, ["index"])
476
- ]),
477
- _: 2
478
- }, 1024)
479
- ]),
480
- _: 2
481
- }, 1032, ["dataSource"]),
482
- e(z, { style: { width: "100%", "padding-left": "50px" } }, {
483
- default: l(() => [
484
- e(U, {
485
- span: 3,
486
- style: { height: "40px", "line-height": "40px" }
487
- }),
488
- e(U, {
489
- span: 7,
490
- style: { height: "40px", "line-height": "40px" }
491
- }, {
492
- default: l(() => [
493
- e(ge, {
494
- onClick: (x) => O(p),
495
- type: "bt",
496
- text: n.$t("common.btn_ok")
497
- }, null, 8, ["onClick", "text"]),
498
- t[6] || (t[6] = k("\xA0 ")),
499
- e(_e, {
500
- onClick: (x) => B(p),
501
- type: "bt"
502
- }, null, 8, ["onClick"])
503
- ]),
504
- _: 2
505
- }, 1024)
506
- ]),
507
- _: 2
508
- }, 1024)
509
- ]),
510
- _: 1
511
- }, 8, ["columns", "expandedRowKeys"])
512
- ])
513
- ]),
514
- r.value ? (I(), V(Ee, {
515
- key: 0,
516
- ref: "langAddRef",
517
- onOk: b,
518
- onCancel: y
519
- }, null, 512)) : xe("v-if", !0)
520
- ]),
521
- _: 1
522
- }, 8, ["spinning", "tip"]);
523
- };
524
- }
525
- });
526
- const Ye = /* @__PURE__ */ K(He, [["__scopeId", "data-v-9e1f799b"], ["__file", "D:/inhe-code/witlink-platform-usercenter-web/witlink-platform-usercenter/src/views/sys/lang/index.vue"]]);
527
- export {
528
- Ye as default
529
- };