zsysview 0.0.26 → 0.0.27

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.
Files changed (45) hide show
  1. package/dist/backup-DgoJ-AYS.js +519 -0
  2. package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-CGEOrj8x.js +43 -0
  3. package/dist/change_password-CfTKlKzq.js +135 -0
  4. package/dist/department-SWj0HA-l.js +410 -0
  5. package/dist/desktop-le1cI27_.js +9 -0
  6. package/dist/http_api_v1-d9smAbJZ.js +1008 -0
  7. package/dist/index-BZZm3CTh.js +6688 -0
  8. package/dist/{index-BaFHeDAF.js → index-DG0x9mYD.js} +105 -105
  9. package/dist/index.es-DrN1BLo5.js +170 -0
  10. package/dist/log-D-BDBVS7.js +163 -0
  11. package/dist/login-DUn4tmOp.js +111 -0
  12. package/dist/main-Bgkb3hrI.js +293 -0
  13. package/dist/message-CVTa4Hb1.js +26 -0
  14. package/dist/position-D7u-VoeU.js +311 -0
  15. package/dist/role-CyCsBm0V.js +405 -0
  16. package/dist/self-BRTR2NdM.js +102 -0
  17. package/dist/sys-BZgBUI3k.js +30 -0
  18. package/dist/user-cl8kQwmL.js +650 -0
  19. package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-Dqud3QQ4.js +72 -0
  20. package/dist/zsys_eventBus-CZOk9fTb.js +178 -0
  21. package/dist/zsys_time-4KclnYJN.js +17 -0
  22. package/dist/zsyslist.vue_vue_type_script_setup_true_lang-BE2Kl33t.js +466 -0
  23. package/dist/zsysview.es.js +1 -1
  24. package/package.json +1 -1
  25. package/dist/backup-BrCAKHW5.js +0 -519
  26. package/dist/breadcrumb.vue_vue_type_script_setup_true_lang-DxqktuR5.js +0 -43
  27. package/dist/change_password-CY87a5gc.js +0 -135
  28. package/dist/department-BDW7DB5F.js +0 -410
  29. package/dist/desktop-DgyBqclt.js +0 -9
  30. package/dist/http_api_v1-BQLGtV9G.js +0 -1008
  31. package/dist/index-DXGp4B8l.js +0 -6688
  32. package/dist/index.es-BcGc183Q.js +0 -170
  33. package/dist/log-2ZY0HGuh.js +0 -163
  34. package/dist/login-BAuvM04T.js +0 -111
  35. package/dist/main-CxdkVN-C.js +0 -293
  36. package/dist/message-CdVUOGzt.js +0 -26
  37. package/dist/position-D7wr1m96.js +0 -311
  38. package/dist/role-M_ZYR2ta.js +0 -405
  39. package/dist/self-DAB-5Co8.js +0 -102
  40. package/dist/sys-BjlP52cg.js +0 -30
  41. package/dist/user-CEaf7VIW.js +0 -650
  42. package/dist/zsys_delbutton.vue_vue_type_script_setup_true_lang-BYahBvHu.js +0 -72
  43. package/dist/zsys_eventBus-DDrk0Aw8.js +0 -178
  44. package/dist/zsys_time-DHEMuVgo.js +0 -17
  45. package/dist/zsyslist.vue_vue_type_script_setup_true_lang-Bl1QXOML.js +0 -466
@@ -0,0 +1,650 @@
1
+ import { defineComponent, ref, watch, reactive, resolveComponent, resolveDirective, createBlock, openBlock, withCtx, withDirectives, withModifiers, createVNode, createCommentVNode, createElementBlock, Fragment, renderList, createElementVNode, toDisplayString, createTextVNode, computed, unref } from "vue";
2
+ import { _ as _sfc_main$3 } from "./breadcrumb.vue_vue_type_script_setup_true_lang-CGEOrj8x.js";
3
+ import { _ as _sfc_main$4 } from "./zsyslist.vue_vue_type_script_setup_true_lang-BE2Kl33t.js";
4
+ import { H as HttpApiV1 } from "./http_api_v1-d9smAbJZ.js";
5
+ import { Z as ZSYSMessage } from "./message-CVTa4Hb1.js";
6
+ import { z as zsysEventBus, u as useMagicKeys, w as whenever } from "./zsys_eventBus-CZOk9fTb.js";
7
+ import { h } from "./index.es-DrN1BLo5.js";
8
+ import { _ as _sfc_main$5 } from "./zsys_delbutton.vue_vue_type_script_setup_true_lang-Dqud3QQ4.js";
9
+ import { f as formatDateTime } from "./zsys_time-4KclnYJN.js";
10
+ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
11
+ key: 0,
12
+ style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" }
13
+ }, _hoisted_3 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
14
+ __name: "user_edit_dialog",
15
+ props: {
16
+ modelValue: { type: Boolean, required: !0 },
17
+ // 控制显示隐藏
18
+ id: { type: BigInt, required: !0 }
19
+ },
20
+ emits: ["update:modelValue"],
21
+ setup(__props, { emit: __emit }) {
22
+ const eventBus = zsysEventBus(), inputRef = ref(null), props = __props, emit = __emit, visible = ref(!1);
23
+ watch(
24
+ () => props.modelValue,
25
+ (val) => {
26
+ visible.value = val;
27
+ },
28
+ { immediate: !0 }
29
+ ), watch(visible, (val) => {
30
+ emit("update:modelValue", val);
31
+ });
32
+ const open = () => {
33
+ view.isnew = props.id == 0n, getData();
34
+ }, close = () => {
35
+ visible.value = !1;
36
+ }, handleBeforeClose = (done) => {
37
+ ruleFormRef.value?.clearValidate(), done();
38
+ }, view = reactive({
39
+ loading: !0,
40
+ saving: !1,
41
+ donotClose: !1,
42
+ isnew: !0
43
+ });
44
+ props.id == 0n && (view.isnew = !0);
45
+ const getRoleOption = async () => {
46
+ let d = [], res = await HttpApiV1.Post(HttpApiV1.url_sysrole_list, { page_size: 999, page_index: 1 });
47
+ if (res.IsSuccess) {
48
+ let data = res.data;
49
+ for (let i = 0; i < data.listdata.length; i++) {
50
+ let r = data.listdata[i];
51
+ d.push({ value: r.role_id.toString(), label: r.role_name, enable: r.role_enable });
52
+ }
53
+ return d;
54
+ }
55
+ return [];
56
+ }, role_option = ref([]), ruleFormRef = ref(), form = ref({
57
+ uid: props.id,
58
+ uname: "",
59
+ username: "",
60
+ password: "",
61
+ is_enable: !0,
62
+ role_value: []
63
+ }), rules = reactive({
64
+ uname: [
65
+ { required: !0, message: "请输入姓名", trigger: "blur" }
66
+ ]
67
+ }), getData = async () => {
68
+ if (view.loading = !0, role_option.value = await getRoleOption(), form.value.uid = props.id, props.id != 0n) {
69
+ view.donotClose = !1;
70
+ try {
71
+ let res = await HttpApiV1.Post(HttpApiV1.url_user_detail, { id: props.id });
72
+ if (res.IsSuccess) {
73
+ let data = res.data;
74
+ form.value.uid = data.uid, form.value.uname = data.uname, form.value.username = data.username, form.value.is_enable = data.user_enable == 1;
75
+ let rs = [];
76
+ for (const s of data.role_ids)
77
+ for (let tmp of role_option.value)
78
+ if (tmp.value == s.toString()) {
79
+ rs.push(s.toString());
80
+ break;
81
+ }
82
+ form.value.role_value = rs;
83
+ }
84
+ } catch (e) {
85
+ console.log(e);
86
+ } finally {
87
+ }
88
+ }
89
+ view.loading = !1;
90
+ }, saveData = async () => {
91
+ let r = [];
92
+ for (const s of form.value.role_value)
93
+ r.push(BigInt(s));
94
+ let postdata = {
95
+ uid: form.value.uid,
96
+ username: form.value.username,
97
+ password: form.value.uid == 0n ? h.hashStr(form.value.password) : "",
98
+ uname: form.value.uname,
99
+ user_enable: form.value.is_enable ? 1 : 0,
100
+ role_ids: r
101
+ };
102
+ return await HttpApiV1.Post(HttpApiV1.url_user_save, postdata);
103
+ }, submitForm = (formEl) => {
104
+ formEl && formEl.validate(async (valid) => {
105
+ if (valid) {
106
+ view.saving = !0;
107
+ try {
108
+ let res = await saveData();
109
+ res.IsSuccess ? (view.donotClose ? (form.value.uid = 0n, setTimeout(() => {
110
+ focus();
111
+ }, 200)) : close(), ZSYSMessage.ShowSuccess("保存成功"), eventBus.emit("aud", { module: "user", id: form.value.uid })) : ZSYSMessage.ShowError(res.message);
112
+ } catch {
113
+ } finally {
114
+ view.saving = !1;
115
+ }
116
+ }
117
+ });
118
+ }, focus = () => {
119
+ inputRef.value?.focus(), inputRef.value?.select();
120
+ }, keys = useMagicKeys();
121
+ return whenever(keys.alt_s, () => {
122
+ visible.value && (console.log("Alt+S提交"), submitForm(ruleFormRef.value));
123
+ }), (_ctx, _cache) => {
124
+ const _component_el_input = resolveComponent("el-input"), _component_el_switch = resolveComponent("el-switch"), _component_el_form_item = resolveComponent("el-form-item"), _component_el_option = resolveComponent("el-option"), _component_el_select = resolveComponent("el-select"), _component_el_form = resolveComponent("el-form"), _component_el_checkbox = resolveComponent("el-checkbox"), _component_el_tooltip = resolveComponent("el-tooltip"), _component_el_text = resolveComponent("el-text"), _component_el_button = resolveComponent("el-button"), _component_el_dialog = resolveComponent("el-dialog"), _directive_loading = resolveDirective("loading");
125
+ return openBlock(), createBlock(_component_el_dialog, {
126
+ modelValue: visible.value,
127
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => visible.value = $event),
128
+ title: "用户",
129
+ "align-center": !0,
130
+ "before-close": handleBeforeClose,
131
+ onOpen: open,
132
+ width: "550",
133
+ draggable: !0,
134
+ overflow: !0,
135
+ onOpened: focus,
136
+ "destroy-on-close": "",
137
+ "close-on-click-modal": !1
138
+ }, {
139
+ footer: withCtx(() => [
140
+ createElementVNode("div", _hoisted_3, [
141
+ view.isnew ? (openBlock(), createBlock(_component_el_tooltip, {
142
+ key: 0,
143
+ content: "保存成功后不关闭窗口"
144
+ }, {
145
+ default: withCtx(() => [
146
+ createVNode(_component_el_checkbox, {
147
+ modelValue: view.donotClose,
148
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => view.donotClose = $event),
149
+ label: "连续录入",
150
+ style: { "margin-right": "10px" }
151
+ }, null, 8, ["modelValue"])
152
+ ]),
153
+ _: 1
154
+ })) : createCommentVNode("", !0),
155
+ createVNode(_component_el_tooltip, {
156
+ content: "快捷键 Alt+S",
157
+ "show-after": 800
158
+ }, {
159
+ default: withCtx(() => [
160
+ createVNode(_component_el_button, {
161
+ type: "primary",
162
+ onClick: _cache[7] || (_cache[7] = ($event) => submitForm(ruleFormRef.value)),
163
+ disabled: view.loading,
164
+ loading: view.saving
165
+ }, {
166
+ default: withCtx(() => [
167
+ _cache[10] || (_cache[10] = createTextVNode("保存(", -1)),
168
+ createVNode(_component_el_text, {
169
+ tag: "ins",
170
+ style: { color: "white" }
171
+ }, {
172
+ default: withCtx(() => [..._cache[9] || (_cache[9] = [
173
+ createTextVNode("S", -1)
174
+ ])]),
175
+ _: 1
176
+ }),
177
+ _cache[11] || (_cache[11] = createTextVNode(")", -1))
178
+ ]),
179
+ _: 1
180
+ }, 8, ["disabled", "loading"])
181
+ ]),
182
+ _: 1
183
+ }),
184
+ createVNode(_component_el_button, { onClick: close }, {
185
+ default: withCtx(() => [..._cache[12] || (_cache[12] = [
186
+ createTextVNode("取消", -1)
187
+ ])]),
188
+ _: 1
189
+ })
190
+ ])
191
+ ]),
192
+ default: withCtx(() => [
193
+ withDirectives((openBlock(), createBlock(_component_el_form, {
194
+ onSubmit: _cache[5] || (_cache[5] = withModifiers(() => {
195
+ }, ["prevent"])),
196
+ ref_key: "ruleFormRef",
197
+ ref: ruleFormRef,
198
+ model: form.value,
199
+ rules,
200
+ style: { "padding-left": "10px", "padding-right": "10px" },
201
+ "label-width": "auto",
202
+ disabled: view.saving
203
+ }, {
204
+ default: withCtx(() => [
205
+ createVNode(_component_el_form_item, {
206
+ label: "姓名",
207
+ prop: "uname"
208
+ }, {
209
+ default: withCtx(() => [
210
+ createVNode(_component_el_input, {
211
+ ref_key: "inputRef",
212
+ ref: inputRef,
213
+ modelValue: form.value.uname,
214
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => form.value.uname = $event),
215
+ style: { width: "300px" }
216
+ }, null, 8, ["modelValue"]),
217
+ createVNode(_component_el_switch, {
218
+ modelValue: form.value.is_enable,
219
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form.value.is_enable = $event),
220
+ "inline-prompt": "",
221
+ "active-text": "已启用",
222
+ "inactive-text": "已禁用",
223
+ style: { "margin-left": "10px" }
224
+ }, null, 8, ["modelValue"])
225
+ ]),
226
+ _: 1
227
+ }),
228
+ createVNode(_component_el_form_item, {
229
+ label: "用户名",
230
+ prop: "username"
231
+ }, {
232
+ default: withCtx(() => [
233
+ createVNode(_component_el_input, {
234
+ modelValue: form.value.username,
235
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => form.value.username = $event),
236
+ style: { width: "300px" }
237
+ }, null, 8, ["modelValue"])
238
+ ]),
239
+ _: 1
240
+ }),
241
+ form.value.uid == 0n ? (openBlock(), createBlock(_component_el_form_item, {
242
+ key: 0,
243
+ label: "初始密码",
244
+ prop: "password"
245
+ }, {
246
+ default: withCtx(() => [
247
+ createVNode(_component_el_input, {
248
+ modelValue: form.value.password,
249
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => form.value.password = $event),
250
+ style: { width: "300px" }
251
+ }, null, 8, ["modelValue"])
252
+ ]),
253
+ _: 1
254
+ })) : createCommentVNode("", !0),
255
+ createVNode(_component_el_form_item, {
256
+ label: "角色权限",
257
+ prop: "role_title"
258
+ }, {
259
+ default: withCtx(() => [
260
+ createVNode(_component_el_select, {
261
+ multiple: "",
262
+ modelValue: form.value.role_value,
263
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => form.value.role_value = $event),
264
+ placeholder: "未选择",
265
+ clearable: ""
266
+ }, {
267
+ default: withCtx(() => [
268
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(role_option.value, (item) => (openBlock(), createBlock(_component_el_option, {
269
+ key: item.value,
270
+ label: item.label,
271
+ value: item.value
272
+ }, {
273
+ default: withCtx(() => [
274
+ createElementVNode("span", _hoisted_1$2, toDisplayString(item.label), 1),
275
+ item.enable ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_2, " 禁用不生效 "))
276
+ ]),
277
+ _: 2
278
+ }, 1032, ["label", "value"]))), 128))
279
+ ]),
280
+ _: 1
281
+ }, 8, ["modelValue"])
282
+ ]),
283
+ _: 1
284
+ })
285
+ ]),
286
+ _: 1
287
+ }, 8, ["model", "rules", "disabled"])), [
288
+ [_directive_loading, view.loading]
289
+ ])
290
+ ]),
291
+ _: 1
292
+ }, 8, ["modelValue"]);
293
+ };
294
+ }
295
+ }), _hoisted_1$1 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
296
+ __name: "change_user_password_dialog",
297
+ props: {
298
+ modelValue: { type: Boolean, required: !0 },
299
+ // 控制显示隐藏
300
+ id: { type: BigInt, required: !0 }
301
+ },
302
+ emits: ["update:modelValue"],
303
+ setup(__props, { emit: __emit }) {
304
+ const inputRef = ref(null), props = __props, emit = __emit, visible = ref(!1);
305
+ watch(
306
+ () => props.modelValue,
307
+ (val) => {
308
+ visible.value = val;
309
+ },
310
+ { immediate: !0 }
311
+ ), watch(visible, (val) => {
312
+ emit("update:modelValue", val);
313
+ });
314
+ const open = () => {
315
+ }, close = () => {
316
+ visible.value = !1;
317
+ }, handleBeforeClose = (done) => {
318
+ ruleFormRef.value?.clearValidate(), done();
319
+ }, view = reactive({
320
+ loading: !1,
321
+ saving: !1
322
+ }), ruleFormRef = ref(), form = ref({
323
+ uid: props.id,
324
+ new_p: ""
325
+ }), rules = reactive({
326
+ new_p: [
327
+ { required: !0, message: "请输入新密码", trigger: "blur" }
328
+ ]
329
+ }), saveData = async () => await HttpApiV1.Post(HttpApiV1.url_user_change_pwd, { uid: form.value.uid, new_p: h.hashStr(form.value.new_p) }), submitForm = (formEl) => {
330
+ formEl && formEl.validate(async (valid) => {
331
+ if (valid) {
332
+ view.saving = !0;
333
+ try {
334
+ let res = await saveData();
335
+ res.IsSuccess ? (close(), ZSYSMessage.ShowSuccess("修改成功")) : ZSYSMessage.ShowError(res.message);
336
+ } catch {
337
+ } finally {
338
+ view.saving = !1;
339
+ }
340
+ }
341
+ });
342
+ }, focus = () => {
343
+ inputRef.value?.focus(), inputRef.value?.select();
344
+ }, keys = useMagicKeys();
345
+ return whenever(keys.alt_s, () => {
346
+ visible.value && (console.log("Alt+S提交"), submitForm(ruleFormRef.value));
347
+ }), (_ctx, _cache) => {
348
+ const _component_el_alert = resolveComponent("el-alert"), _component_el_input = resolveComponent("el-input"), _component_el_form_item = resolveComponent("el-form-item"), _component_el_form = resolveComponent("el-form"), _component_el_text = resolveComponent("el-text"), _component_el_button = resolveComponent("el-button"), _component_el_tooltip = resolveComponent("el-tooltip"), _component_el_dialog = resolveComponent("el-dialog"), _directive_loading = resolveDirective("loading");
349
+ return openBlock(), createBlock(_component_el_dialog, {
350
+ modelValue: visible.value,
351
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => visible.value = $event),
352
+ title: "修改密码",
353
+ "align-center": !0,
354
+ "before-close": handleBeforeClose,
355
+ width: "450",
356
+ draggable: !0,
357
+ overflow: !0,
358
+ onOpen: open,
359
+ onOpened: focus,
360
+ "destroy-on-close": "",
361
+ "close-on-click-modal": !1
362
+ }, {
363
+ footer: withCtx(() => [
364
+ createElementVNode("div", _hoisted_1$1, [
365
+ createVNode(_component_el_tooltip, {
366
+ content: "快捷键 Alt+S",
367
+ "show-after": 800
368
+ }, {
369
+ default: withCtx(() => [
370
+ createVNode(_component_el_button, {
371
+ type: "primary",
372
+ onClick: _cache[2] || (_cache[2] = ($event) => submitForm(ruleFormRef.value)),
373
+ disabled: view.loading,
374
+ loading: view.saving
375
+ }, {
376
+ default: withCtx(() => [
377
+ _cache[5] || (_cache[5] = createTextVNode("确认修改(", -1)),
378
+ createVNode(_component_el_text, {
379
+ tag: "ins",
380
+ style: { color: "white" }
381
+ }, {
382
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [
383
+ createTextVNode("S", -1)
384
+ ])]),
385
+ _: 1
386
+ }),
387
+ _cache[6] || (_cache[6] = createTextVNode(")", -1))
388
+ ]),
389
+ _: 1
390
+ }, 8, ["disabled", "loading"])
391
+ ]),
392
+ _: 1
393
+ }),
394
+ createVNode(_component_el_button, { onClick: close }, {
395
+ default: withCtx(() => [..._cache[7] || (_cache[7] = [
396
+ createTextVNode("取消", -1)
397
+ ])]),
398
+ _: 1
399
+ })
400
+ ])
401
+ ]),
402
+ default: withCtx(() => [
403
+ createVNode(_component_el_alert, {
404
+ title: "请为这个账号输入一个新密码",
405
+ type: "info",
406
+ "show-icon": "",
407
+ closable: !1
408
+ }),
409
+ withDirectives((openBlock(), createBlock(_component_el_form, {
410
+ onSubmit: _cache[1] || (_cache[1] = withModifiers(() => {
411
+ }, ["prevent"])),
412
+ ref_key: "ruleFormRef",
413
+ ref: ruleFormRef,
414
+ model: form.value,
415
+ rules,
416
+ style: { "padding-left": "10px", "padding-right": "10px", "margin-top": "10px" },
417
+ "label-width": "auto",
418
+ disabled: view.saving
419
+ }, {
420
+ default: withCtx(() => [
421
+ createVNode(_component_el_form_item, {
422
+ label: "新密码",
423
+ prop: "new_p"
424
+ }, {
425
+ default: withCtx(() => [
426
+ createVNode(_component_el_input, {
427
+ ref_key: "inputRef",
428
+ ref: inputRef,
429
+ modelValue: form.value.new_p,
430
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => form.value.new_p = $event),
431
+ style: { width: "300px" }
432
+ }, null, 8, ["modelValue"])
433
+ ]),
434
+ _: 1
435
+ })
436
+ ]),
437
+ _: 1
438
+ }, 8, ["model", "rules", "disabled"])), [
439
+ [_directive_loading, view.loading]
440
+ ])
441
+ ]),
442
+ _: 1
443
+ }, 8, ["modelValue"]);
444
+ };
445
+ }
446
+ }), _hoisted_1 = { style: { padding: "0px 20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
447
+ __name: "user",
448
+ setup(__props) {
449
+ const activeName = ref("userList"), listconfig = reactive({
450
+ ApiUrl: HttpApiV1.url_user_list,
451
+ KeywordTip: "姓名、用户名",
452
+ QuickConditionsGroups: [
453
+ {
454
+ Label: "状态:",
455
+ Select: 0,
456
+ QuickConditions: [
457
+ { label: "全部", column: null },
458
+ { label: "正常", column: "user_enable", condition: "=", value: 1 },
459
+ { label: "已禁用", column: "user_enable", condition: "=", value: 0 }
460
+ ]
461
+ }
462
+ ],
463
+ ExportUrl: HttpApiV1.url_user_export
464
+ // ExportColumn:[
465
+ // {ColumnTitle:'姓名',ColumnName:'uname'},
466
+ // {ColumnTitle:'用户名',ColumnName:'username'},
467
+ // {ColumnTitle:'状态',ColumnName:'user_enable'},
468
+ // {ColumnTitle:'最后登录时间',ColumnName:'last_login_time'},
469
+ // {ColumnTitle:'角色',ColumnName:'role_titles'},
470
+ // ]
471
+ }), view = reactive({
472
+ edit_id: BigInt(0),
473
+ edit_dialog_show: !1,
474
+ change_pwd_dialog_show: !1
475
+ }), dataformat = computed(() => (item) => formatDateTime(item));
476
+ return (_ctx, _cache) => {
477
+ const _component_el_button = resolveComponent("el-button"), _component_el_table_column = resolveComponent("el-table-column"), _component_el_tag = resolveComponent("el-tag"), _component_el_link = resolveComponent("el-link"), _component_el_space = resolveComponent("el-space"), _component_el_tab_pane = resolveComponent("el-tab-pane"), _component_el_tabs = resolveComponent("el-tabs");
478
+ return openBlock(), createElementBlock(Fragment, null, [
479
+ createVNode(_sfc_main$3),
480
+ createElementVNode("div", _hoisted_1, [
481
+ createVNode(_component_el_tabs, {
482
+ modelValue: activeName.value,
483
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => activeName.value = $event)
484
+ }, {
485
+ default: withCtx(() => [
486
+ createVNode(_component_el_tab_pane, {
487
+ label: "全部用户",
488
+ name: "userList"
489
+ }, {
490
+ default: withCtx(() => [
491
+ createVNode(_sfc_main$4, {
492
+ config: listconfig,
493
+ module: "user"
494
+ }, {
495
+ headermain: withCtx(() => [
496
+ createVNode(_component_el_button, {
497
+ class: "main_btn",
498
+ type: "primary",
499
+ onClick: _cache[0] || (_cache[0] = ($event) => {
500
+ view.edit_id = 0n, view.edit_dialog_show = !0;
501
+ })
502
+ }, {
503
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [
504
+ createTextVNode("新建", -1)
505
+ ])]),
506
+ _: 1
507
+ })
508
+ ]),
509
+ content: withCtx(() => [
510
+ createVNode(_component_el_table_column, {
511
+ prop: "uname",
512
+ label: "姓名",
513
+ width: "100"
514
+ }),
515
+ createVNode(_component_el_table_column, {
516
+ prop: "enable",
517
+ label: "状态",
518
+ width: "70"
519
+ }, {
520
+ default: withCtx(({ row }) => [
521
+ row.user_enable == 1 ? (openBlock(), createBlock(_component_el_tag, {
522
+ key: 0,
523
+ type: "success",
524
+ "disable-transitions": !0,
525
+ size: "small"
526
+ }, {
527
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
528
+ createTextVNode("正常", -1)
529
+ ])]),
530
+ _: 1
531
+ })) : createCommentVNode("", !0),
532
+ row.user_enable == 0 ? (openBlock(), createBlock(_component_el_tag, {
533
+ key: 1,
534
+ type: "info",
535
+ "disable-transitions": !0,
536
+ size: "small"
537
+ }, {
538
+ default: withCtx(() => [..._cache[6] || (_cache[6] = [
539
+ createTextVNode("禁用", -1)
540
+ ])]),
541
+ _: 1
542
+ })) : createCommentVNode("", !0)
543
+ ]),
544
+ _: 1
545
+ }),
546
+ createVNode(_component_el_table_column, {
547
+ prop: "username",
548
+ label: "用户名",
549
+ width: "100"
550
+ }),
551
+ createVNode(_component_el_table_column, {
552
+ label: "角色",
553
+ "min-width": "240"
554
+ }, {
555
+ default: withCtx(({ row }) => [
556
+ row.role_titles != "" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(row.role_titles.split(","), (r) => (openBlock(), createBlock(_component_el_tag, {
557
+ style: { "margin-right": "2px" },
558
+ "disable-transitions": !0,
559
+ size: "small"
560
+ }, {
561
+ default: withCtx(() => [
562
+ createTextVNode(toDisplayString(r), 1)
563
+ ]),
564
+ _: 2
565
+ }, 1024))), 256)) : createCommentVNode("", !0)
566
+ ]),
567
+ _: 1
568
+ }),
569
+ createVNode(_component_el_table_column, {
570
+ label: "最后登录时间",
571
+ prop: "last_login_time",
572
+ width: "180"
573
+ }, {
574
+ default: withCtx(({ row }) => [
575
+ createTextVNode(toDisplayString(dataformat.value(row.last_login_time)), 1)
576
+ ]),
577
+ _: 1
578
+ }),
579
+ createVNode(_component_el_table_column, {
580
+ fixed: "right",
581
+ label: "操作",
582
+ width: "180"
583
+ }, {
584
+ default: withCtx(({ row }) => [
585
+ createVNode(_component_el_space, null, {
586
+ default: withCtx(() => [
587
+ createVNode(_component_el_link, {
588
+ type: "primary",
589
+ onClick: ($event) => {
590
+ view.edit_id = BigInt(row.uid), view.edit_dialog_show = !0;
591
+ }
592
+ }, {
593
+ default: withCtx(() => [..._cache[7] || (_cache[7] = [
594
+ createTextVNode("查看和编辑", -1)
595
+ ])]),
596
+ _: 1
597
+ }, 8, ["onClick"]),
598
+ createVNode(_component_el_link, {
599
+ type: "primary",
600
+ onClick: ($event) => {
601
+ view.edit_id = BigInt(row.uid), view.change_pwd_dialog_show = !0;
602
+ }
603
+ }, {
604
+ default: withCtx(() => [..._cache[8] || (_cache[8] = [
605
+ createTextVNode("改密码", -1)
606
+ ])]),
607
+ _: 1
608
+ }, 8, ["onClick"]),
609
+ createVNode(_sfc_main$5, {
610
+ id: BigInt(row.uid),
611
+ api_url: unref(HttpApiV1).url_user_del,
612
+ module: "user"
613
+ }, null, 8, ["id", "api_url"])
614
+ ]),
615
+ _: 2
616
+ }, 1024)
617
+ ]),
618
+ _: 1
619
+ })
620
+ ]),
621
+ _: 1
622
+ }, 8, ["config"])
623
+ ]),
624
+ _: 1
625
+ }),
626
+ createVNode(_component_el_tab_pane, {
627
+ label: "设置",
628
+ name: "second"
629
+ })
630
+ ]),
631
+ _: 1
632
+ }, 8, ["modelValue"])
633
+ ]),
634
+ createVNode(_sfc_main$2, {
635
+ id: view.edit_id,
636
+ modelValue: view.edit_dialog_show,
637
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => view.edit_dialog_show = $event)
638
+ }, null, 8, ["id", "modelValue"]),
639
+ createVNode(_sfc_main$1, {
640
+ id: view.edit_id,
641
+ modelValue: view.change_pwd_dialog_show,
642
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => view.change_pwd_dialog_show = $event)
643
+ }, null, 8, ["id", "modelValue"])
644
+ ], 64);
645
+ };
646
+ }
647
+ });
648
+ export {
649
+ _sfc_main as default
650
+ };