@witlink/usercenter 1.2.0 → 1.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@witlink/usercenter",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "witlink的用户中心系统各页面集成组件",
5
5
  "main": "./dist/usercenter.umd.js",
6
6
  "module": "./dist/usercenter.es.js",
package/version.md CHANGED
@@ -18,4 +18,6 @@
18
18
  用户管理表单检验优化
19
19
 
20
20
  #### 1.2.0
21
- 角色管理详情页不可操作
21
+ 角色管理详情页不可操作
22
+ #### 1.2.2
23
+ 修复setToken多次调用userInfo接口问题
@@ -1,393 +0,0 @@
1
- import { defineComponent as U, ref as f, onMounted as J, openBlock as c, createElementBlock as S, createVNode as v, withCtx as _, createElementVNode as w, normalizeClass as H, createBlock as h, resolveDynamicComponent as M, unref as ae, createCommentVNode as g, createTextVNode as W, toDisplayString as N, reactive as z, watch as ne, Fragment as R, renderList as j, mergeProps as V, normalizeStyle as L, computed as oe } from "vue";
2
- import { y as F, aB as se, N as ce, O as re, _ as x, o as Y, aC as le, p as K, F as Z, B as q, aD as _e, Z as de, K as ue, L as pe } from "./index.876a7009.mjs";
3
- import { message as B } from "ant-design-vue";
4
- import { useI18n as G } from "vue-i18n";
5
- import { _ as ie } from "./index.88e3cf20.mjs";
6
- import './assets/index.857022a9.css';function ve(u) {
7
- return F({
8
- url: "/api/sys/parameter/search-type",
9
- method: "get",
10
- params: u
11
- });
12
- }
13
- function Q(u) {
14
- return F({
15
- url: "/api/sys/parameter/search-type-detail",
16
- method: "get",
17
- params: u
18
- });
19
- }
20
- function X(u) {
21
- return F({
22
- url: "/api/sys/parameter/update",
23
- method: "post",
24
- headers: {
25
- "Content-Type": "multipart/form-data"
26
- },
27
- data: u
28
- });
29
- }
30
- const fe = ["onClick"], me = { class: "title1" }, ye = /* @__PURE__ */ U({
31
- __name: "TypeList",
32
- emits: ["select"],
33
- setup(u, { emit: D }) {
34
- const b = D, m = f([]), l = f(0), d = (a, p) => {
35
- l.value = p, b("select", a);
36
- }, C = async () => {
37
- const { result: a } = await ve({});
38
- m.value = a, a.length > 0 && d(a[0], 0);
39
- };
40
- return J(() => {
41
- C();
42
- }), (a, p) => {
43
- const i = ce, $ = re;
44
- return c(), S("div", null, [
45
- v($, {
46
- size: "small",
47
- split: !1,
48
- dataSource: m.value,
49
- class: "li"
50
- }, {
51
- renderItem: _(({ item: s, index: n }) => [
52
- v(i, {
53
- type: "inner",
54
- bordered: !1,
55
- class: "list"
56
- }, {
57
- default: _(() => [
58
- w("div", {
59
- onClick: (o) => d(s, n),
60
- class: H(l.value == n ? "active" : "")
61
- }, [
62
- w("span", me, [
63
- (c(), h(M(ae(se)[s.v1]))),
64
- g(' <a-icon :type="item.v1" /> '),
65
- g(" {{ ($t('sparm.' + item.tableType +'_'+ item.code) != 'sparm.' + item.tableType +'_'+ item.code)?$t('sparm.' + item.tableType +'_'+ item.code):item.description}} "),
66
- W(" " + N(a.$t("dct." + s.tableType + s.code)), 1)
67
- ])
68
- ], 10, fe)
69
- ]),
70
- _: 2
71
- }, 1024)
72
- ]),
73
- _: 1
74
- }, 8, ["dataSource"])
75
- ]);
76
- };
77
- }
78
- });
79
- const he = /* @__PURE__ */ x(ye, [["__scopeId", "data-v-a72d57cc"], ["__file", "D:/inhe-code/witlink-platform-usercenter-web/witlink-platform-usercenter/src/views/sys/parameter/TypeList.vue"]]), be = { class: "web-client" }, ke = ["src"], ge = {
80
- key: 2,
81
- class: "color-choose"
82
- }, Ce = { class: "color" }, we = ["onClick"], Se = { class: "tips" }, De = "/", $e = /* @__PURE__ */ U({
83
- name: "WebClient",
84
- __name: "WebClient",
85
- props: {
86
- record: {
87
- type: Object,
88
- default: () => {
89
- }
90
- }
91
- },
92
- emits: ["ok"],
93
- setup(u, { emit: D }) {
94
- const { t: b } = G(), m = D, l = u, d = f(0), C = [
95
- "#fff",
96
- "#ccc",
97
- "#666",
98
- "#333",
99
- "#000",
100
- "#001efb",
101
- "#fffe34",
102
- "#ff0f00",
103
- "#0dfd36"
104
- ], a = z({
105
- parentCode: "",
106
- items: {}
107
- }), p = f([]), i = f(""), $ = {
108
- labelCol: {
109
- span: 6
110
- },
111
- wrapperCol: {
112
- span: 18
113
- }
114
- }, s = async () => {
115
- if (!l.record.code)
116
- return;
117
- a.parentCode = l.record.code;
118
- const { result: t } = await Q({
119
- parentCode: l.record.code
120
- });
121
- p.value = t;
122
- const y = t.find((r) => r.v2 == "HEAD_ICON");
123
- if (y) {
124
- const r = JSON.parse(y.v1);
125
- i.value = De + "usercenter/api/auth/node-icon/" + r.bucket + "/" + r.file;
126
- }
127
- }, n = (t, y) => {
128
- const r = new FileReader();
129
- r.addEventListener("load", () => y(r.result)), r.readAsDataURL(t);
130
- }, o = (t) => t.type === "image/jpeg" || t.type === "image/png" ? t.size / 1024 / 1024 < 2 ? (a.fileName = t, n(t, (e) => {
131
- e.value = e;
132
- }), !1) : (B.error(b("param.tips2")), !1) : (B.error(b("param.tips1")), !1), O = async () => {
133
- console.log(p.value, "source");
134
- const t = {};
135
- p.value.forEach((r) => {
136
- r.v2 !== "HEAD_ICON" && (t[r.code] = r.v1);
137
- }), a.items = JSON.stringify(t);
138
- const { result: y } = await X(a);
139
- y && m("ok");
140
- }, T = (t) => {
141
- d.value = t;
142
- };
143
- return ne(
144
- () => l.record,
145
- () => {
146
- s();
147
- }
148
- ), J(() => {
149
- s();
150
- }), (t, y) => {
151
- const r = Y, e = le, E = K, k = Z, ee = q;
152
- return c(), S("div", be, [
153
- v(k, {
154
- class: "form",
155
- ref: "formRef"
156
- }, {
157
- default: _(() => [
158
- (c(!0), S(R, null, j(p.value, (I, te) => (c(), h(E, V({
159
- key: te,
160
- label: t.$t("dct.PARAMS" + I.code),
161
- ref_for: !0
162
- }, $), {
163
- default: _(() => [
164
- I.v2 != "HEAD_ICON" ? (c(), h(r, {
165
- key: 0,
166
- value: I.v1,
167
- "onUpdate:value": (A) => I.v1 = A
168
- }, null, 8, ["value", "onUpdate:value"])) : g("v-if", !0),
169
- I.v2 == "HEAD_ICON" ? (c(), h(e, {
170
- key: 1,
171
- name: "avatar",
172
- style: { width: "102px", float: "left" },
173
- "list-type": "picture-card",
174
- class: "avatar-uploader",
175
- "show-upload-list": !1,
176
- "before-upload": o
177
- }, {
178
- default: _(() => [
179
- w("div", {
180
- class: "bg",
181
- style: L("background:" + C[d.value])
182
- }, [
183
- w("img", {
184
- src: i.value,
185
- alt: "avatar",
186
- class: "avatar"
187
- }, null, 8, ke)
188
- ], 4)
189
- ]),
190
- _: 1
191
- })) : g("v-if", !0),
192
- I.v2 == "HEAD_ICON" ? (c(), S("div", ge, [
193
- w("div", Ce, [
194
- (c(), S(R, null, j(C, (A, P) => w("div", {
195
- key: P,
196
- class: "color-item"
197
- }, [
198
- w("div", {
199
- style: L("background:" + A),
200
- onClick: (xe) => T(P),
201
- class: H(d.value == P ? "active" : "")
202
- }, null, 14, we)
203
- ])), 64))
204
- ]),
205
- w("span", Se, N(t.$t("param.tip")), 1)
206
- ])) : g("v-if", !0)
207
- ]),
208
- _: 2
209
- }, 1040, ["label"]))), 128))
210
- ]),
211
- _: 1
212
- }, 512),
213
- v(ee, {
214
- onClick: O,
215
- type: "primary",
216
- class: "sub_btn"
217
- }, {
218
- default: _(() => [
219
- W(N(t.$t("param.btn_ok")), 1)
220
- ]),
221
- _: 1
222
- })
223
- ]);
224
- };
225
- }
226
- });
227
- const Oe = /* @__PURE__ */ x($e, [["__scopeId", "data-v-7c2314b0"], ["__file", "D:/inhe-code/witlink-platform-usercenter-web/witlink-platform-usercenter/src/views/sys/parameter/WebClient.vue"]]), Ie = { class: "web-client" }, Ne = /* @__PURE__ */ U({
228
- name: "Standard",
229
- __name: "Standard",
230
- props: {
231
- record: {
232
- type: Object,
233
- default: () => {
234
- }
235
- }
236
- },
237
- emits: ["ok"],
238
- setup(u, { emit: D }) {
239
- const b = D, m = u, l = f(), d = z({
240
- parentCode: "",
241
- items: {}
242
- }), C = f({}), a = f([]), p = {
243
- labelCol: {
244
- span: 6
245
- },
246
- wrapperCol: {
247
- span: 18
248
- }
249
- }, i = async () => {
250
- if (!m.record.code)
251
- return;
252
- const { result: s } = await Q({
253
- parentCode: m.record.code
254
- });
255
- d.parentCode = m.record.code, s.forEach((n) => {
256
- var o;
257
- n.v2 = n.v2 ? JSON.parse(n.v2) : "", ((o = n == null ? void 0 : n.v2) == null ? void 0 : o.field) == "2" && (n.isChecked = n.v1 == "Y");
258
- }), a.value = s;
259
- }, $ = async () => {
260
- console.log(a.value, "source");
261
- const s = {};
262
- a.value.forEach((o) => {
263
- var O;
264
- ((O = o == null ? void 0 : o.v2) == null ? void 0 : O.field) == "2" && (o.isChecked ? o.v1 == "Y" : o.v1 == "N"), s[o.code] = o.v1;
265
- }), d.items = JSON.stringify(s);
266
- const { result: n } = await X(d);
267
- n && b("ok");
268
- };
269
- return J(() => {
270
- i();
271
- }), (s, n) => {
272
- const o = Y, O = ie, T = _e, t = K, y = Z, r = q;
273
- return c(), S("div", Ie, [
274
- v(y, {
275
- class: "form",
276
- model: C.value,
277
- ref_key: "formRef",
278
- ref: l
279
- }, {
280
- default: _(() => [
281
- (c(!0), S(R, null, j(a.value, (e, E) => (c(), h(t, V({
282
- key: E,
283
- label: s.$t("dct.SYS" + e.code),
284
- ref_for: !0
285
- }, p), {
286
- default: _(() => [
287
- e.v2 instanceof Object ? g("v-if", !0) : (c(), h(o, {
288
- key: 0,
289
- value: e.v1,
290
- "onUpdate:value": (k) => e.v1 = k
291
- }, null, 8, ["value", "onUpdate:value"])),
292
- e.v2 instanceof Object && e.v2.field && e.v2.field == "0" ? (c(), h(o, {
293
- key: 1,
294
- style: L(
295
- e.v2.width ? "width:" + e.v2.width + "px" : "width: 100% "
296
- ),
297
- maxLength: e.v2.length ? e.v2.length : 100,
298
- value: e.v1,
299
- "onUpdate:value": (k) => e.v1 = k
300
- }, null, 8, ["style", "maxLength", "value", "onUpdate:value"])) : g("v-if", !0),
301
- e.v2 instanceof Object && e.v2.field && e.v2.field == "1" ? (c(), h(O, {
302
- key: 2,
303
- style: L(
304
- e.v2.width ? "width:" + e.v2.width + "px" : "width: 100% "
305
- ),
306
- value: e.v1,
307
- "onUpdate:value": (k) => e.v1 = k
308
- }, null, 8, ["style", "value", "onUpdate:value"])) : g("v-if", !0),
309
- e.v2 instanceof Object && e.v2.field && e.v2.field == "2" ? (c(), h(T, {
310
- key: 3,
311
- checked: e.isChecked,
312
- "onUpdate:checked": (k) => e.isChecked = k
313
- }, null, 8, ["checked", "onUpdate:checked"])) : g("v-if", !0)
314
- ]),
315
- _: 2
316
- }, 1040, ["label"]))), 128))
317
- ]),
318
- _: 1
319
- }, 8, ["model"]),
320
- v(r, {
321
- onClick: $,
322
- type: "primary",
323
- class: "sub_btn"
324
- }, {
325
- default: _(() => [
326
- W(N(s.$t("param.btn_ok")), 1)
327
- ]),
328
- _: 1
329
- })
330
- ]);
331
- };
332
- }
333
- });
334
- const Le = /* @__PURE__ */ x(Ne, [["__scopeId", "data-v-7829cd8b"], ["__file", "D:/inhe-code/witlink-platform-usercenter-web/witlink-platform-usercenter/src/views/sys/parameter/Standard.vue"]]), Ue = /* @__PURE__ */ U({
335
- name: "Function4",
336
- __name: "index",
337
- setup(u) {
338
- const { t: D } = G(), b = f({}), m = f(), l = f("WebClient"), d = {
339
- WebClient: Oe,
340
- Standard: Le
341
- }, C = oe(() => d[l.value]), a = (i) => {
342
- i.v3 ? l.value = i.v3 : l.value = "Standard", b.value = i;
343
- }, p = () => {
344
- B.success(D("param.tips3"));
345
- };
346
- return (i, $) => {
347
- const s = de, n = ue, o = pe;
348
- return c(), S("div", null, [
349
- v(o, {
350
- gutter: 16,
351
- class: "bg"
352
- }, {
353
- default: _(() => [
354
- v(n, {
355
- span: 3,
356
- class: "left"
357
- }, {
358
- default: _(() => [
359
- v(s, { bordered: !1 }, {
360
- cover: _(() => [
361
- v(he, { onSelect: a })
362
- ]),
363
- _: 1
364
- })
365
- ]),
366
- _: 1
367
- }),
368
- v(n, {
369
- span: 20,
370
- class: "right"
371
- }, {
372
- default: _(() => [
373
- (c(), h(M(C.value), {
374
- key: 0,
375
- onOk: p,
376
- record: b.value,
377
- ref_key: "compRef",
378
- ref: m
379
- }, null, 40, ["record"]))
380
- ]),
381
- _: 1
382
- })
383
- ]),
384
- _: 1
385
- })
386
- ]);
387
- };
388
- }
389
- });
390
- const je = /* @__PURE__ */ x(Ue, [["__scopeId", "data-v-2b42dd95"], ["__file", "D:/inhe-code/witlink-platform-usercenter-web/witlink-platform-usercenter/src/views/sys/parameter/index.vue"]]);
391
- export {
392
- je as default
393
- };