@witlink/usercenter 1.0.37 → 1.0.39

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