zsysview 0.1.11 → 0.1.13

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,7 +1,7 @@
1
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 { z as zsysEventBus, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, j as formatDateTime, i as _sfc_main$3, k as _sfc_main$4, m as _sfc_main$5 } from "./index-8UWgPXVt.js";
2
+ import { z as zsysEventBus, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, j as formatDateTime, i as _sfc_main$3, k as _sfc_main$4, m as _sfc_main$5 } from "./index-D5KAIOPC.js";
3
3
  import { h } from "./index.es-DrN1BLo5.js";
4
- const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
4
+ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2$1 = {
5
5
  key: 0,
6
6
  style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" }
7
7
  }, _hoisted_3 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
@@ -59,8 +59,17 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
59
59
  uname: [
60
60
  { required: !0, message: "请输入姓名", trigger: "blur" }
61
61
  ],
62
+ username: [
63
+ { required: !0, message: "请输入用户名", trigger: "blur" }
64
+ ],
65
+ phone: [
66
+ { required: !0, message: "请输入手机号码", trigger: "blur" }
67
+ ],
62
68
  password: [
63
69
  { required: !0, message: "请输入密码", trigger: "blur" }
70
+ ],
71
+ role_value: [
72
+ { required: !0, message: "请选择角色", trigger: "blur" }
64
73
  ]
65
74
  }), getData = async () => {
66
75
  if (view.loading = !0, role_option.value = await getRoleOption(), form.value.uid = props.id, props.id != 0n) {
@@ -266,7 +275,7 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
266
275
  }),
267
276
  createVNode(_component_el_form_item, {
268
277
  label: "角色权限",
269
- prop: "role_title"
278
+ prop: "role_value"
270
279
  }, {
271
280
  default: withCtx(() => [
272
281
  createVNode(_component_el_select, {
@@ -284,7 +293,7 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
284
293
  }, {
285
294
  default: withCtx(() => [
286
295
  createElementVNode("span", _hoisted_1$2, toDisplayString(item.label), 1),
287
- item.enable ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_2, " 禁用不生效 "))
296
+ item.enable ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_2$1, " 禁用不生效 "))
288
297
  ]),
289
298
  _: 2
290
299
  }, 1032, ["label", "value"]))), 128))
@@ -455,7 +464,10 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
455
464
  }, 8, ["modelValue"]);
456
465
  };
457
466
  }
458
- }), _hoisted_1 = { style: { padding: "0px 20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
467
+ }), _hoisted_1 = { class: "flex_height" }, _hoisted_2 = {
468
+ style: { padding: "0px 20px" },
469
+ class: "flex_fill"
470
+ }, _sfc_main = /* @__PURE__ */ defineComponent({
459
471
  __name: "user",
460
472
  setup(__props) {
461
473
  const activeName = ref("userList"), listconfig = reactive({
@@ -472,7 +484,7 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
472
484
  ]
473
485
  }
474
486
  ],
475
- ExportUrl: HttpApiV1.url_user_export
487
+ ExportUrl: HttpApiV1.url_user_export,
476
488
  // ExportColumn:[
477
489
  // {ColumnTitle:'姓名',ColumnName:'uname'},
478
490
  // {ColumnTitle:'用户名',ColumnName:'username'},
@@ -480,6 +492,10 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
480
492
  // {ColumnTitle:'最后登录时间',ColumnName:'last_login_time'},
481
493
  // {ColumnTitle:'角色',ColumnName:'role_titles'},
482
494
  // ]
495
+ HasCheckbox: !0,
496
+ ReserveSelection: !0,
497
+ RowIdKey: "uid",
498
+ RowTitleKey: "uname"
483
499
  }), view = reactive({
484
500
  edit_id: BigInt(0),
485
501
  edit_dialog_show: !1,
@@ -488,160 +504,164 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
488
504
  return (_ctx, _cache) => {
489
505
  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");
490
506
  return openBlock(), createElementBlock(Fragment, null, [
491
- createVNode(_sfc_main$3),
492
507
  createElementVNode("div", _hoisted_1, [
493
- createVNode(_component_el_tabs, {
494
- modelValue: activeName.value,
495
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => activeName.value = $event)
496
- }, {
497
- default: withCtx(() => [
498
- createVNode(_component_el_tab_pane, {
499
- label: "全部用户",
500
- name: "userList"
501
- }, {
502
- default: withCtx(() => [
503
- createVNode(_sfc_main$4, {
504
- config: listconfig,
505
- module: "user"
506
- }, {
507
- headermain: withCtx(() => [
508
- createVNode(_component_el_button, {
509
- class: "main_btn",
510
- type: "primary",
511
- onClick: _cache[0] || (_cache[0] = ($event) => {
512
- view.edit_id = 0n, view.edit_dialog_show = !0;
508
+ createVNode(_sfc_main$3),
509
+ createElementVNode("div", _hoisted_2, [
510
+ createVNode(_component_el_tabs, {
511
+ modelValue: activeName.value,
512
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => activeName.value = $event),
513
+ style: { height: "100%" }
514
+ }, {
515
+ default: withCtx(() => [
516
+ createVNode(_component_el_tab_pane, {
517
+ label: "全部用户",
518
+ name: "userList",
519
+ style: { height: "100%" }
520
+ }, {
521
+ default: withCtx(() => [
522
+ createVNode(_sfc_main$4, {
523
+ config: listconfig,
524
+ module: "user"
525
+ }, {
526
+ headermain: withCtx(() => [
527
+ createVNode(_component_el_button, {
528
+ class: "main_btn",
529
+ type: "primary",
530
+ onClick: _cache[0] || (_cache[0] = ($event) => {
531
+ view.edit_id = 0n, view.edit_dialog_show = !0;
532
+ })
533
+ }, {
534
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [
535
+ createTextVNode("新建用户", -1)
536
+ ])]),
537
+ _: 1
513
538
  })
514
- }, {
515
- default: withCtx(() => [..._cache[4] || (_cache[4] = [
516
- createTextVNode("新建用户", -1)
517
- ])]),
518
- _: 1
519
- })
520
- ]),
521
- content: withCtx(() => [
522
- createVNode(_component_el_table_column, {
523
- prop: "uname",
524
- label: "姓名",
525
- width: "100"
526
- }),
527
- createVNode(_component_el_table_column, {
528
- prop: "enable",
529
- label: "状态",
530
- width: "70"
531
- }, {
532
- default: withCtx(({ row }) => [
533
- row.user_enable == 1 ? (openBlock(), createBlock(_component_el_tag, {
534
- key: 0,
535
- type: "success",
536
- "disable-transitions": !0,
537
- size: "small"
538
- }, {
539
- default: withCtx(() => [..._cache[5] || (_cache[5] = [
540
- createTextVNode("正常", -1)
541
- ])]),
542
- _: 1
543
- })) : createCommentVNode("", !0),
544
- row.user_enable == 0 ? (openBlock(), createBlock(_component_el_tag, {
545
- key: 1,
546
- type: "info",
547
- "disable-transitions": !0,
548
- size: "small"
549
- }, {
550
- default: withCtx(() => [..._cache[6] || (_cache[6] = [
551
- createTextVNode("禁用", -1)
552
- ])]),
553
- _: 1
554
- })) : createCommentVNode("", !0)
555
- ]),
556
- _: 1
557
- }),
558
- createVNode(_component_el_table_column, {
559
- prop: "username",
560
- label: "用户名",
561
- width: "100"
562
- }),
563
- createVNode(_component_el_table_column, {
564
- label: "角色",
565
- "min-width": "240"
566
- }, {
567
- default: withCtx(({ row }) => [
568
- row.role_titles != "" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(row.role_titles.split(","), (r) => (openBlock(), createBlock(_component_el_tag, {
569
- style: { "margin-right": "2px" },
570
- "disable-transitions": !0,
571
- size: "small"
572
- }, {
573
- default: withCtx(() => [
574
- createTextVNode(toDisplayString(r), 1)
575
- ]),
576
- _: 2
577
- }, 1024))), 256)) : createCommentVNode("", !0)
578
- ]),
579
- _: 1
580
- }),
581
- createVNode(_component_el_table_column, {
582
- label: "最后登录时间",
583
- prop: "last_login_time",
584
- width: "180"
585
- }, {
586
- default: withCtx(({ row }) => [
587
- createTextVNode(toDisplayString(dataformat.value(row.last_login_time)), 1)
588
- ]),
589
- _: 1
590
- }),
591
- createVNode(_component_el_table_column, {
592
- fixed: "right",
593
- label: "操作",
594
- width: "180"
595
- }, {
596
- default: withCtx(({ row }) => [
597
- createVNode(_component_el_space, null, {
598
- default: withCtx(() => [
599
- createVNode(_component_el_link, {
600
- type: "primary",
601
- onClick: ($event) => {
602
- view.edit_id = BigInt(row.uid), view.edit_dialog_show = !0;
603
- }
604
- }, {
605
- default: withCtx(() => [..._cache[7] || (_cache[7] = [
606
- createTextVNode("查看和编辑", -1)
607
- ])]),
608
- _: 1
609
- }, 8, ["onClick"]),
610
- createVNode(_component_el_link, {
611
- type: "primary",
612
- onClick: ($event) => {
613
- view.edit_id = BigInt(row.uid), view.change_pwd_dialog_show = !0;
614
- }
615
- }, {
616
- default: withCtx(() => [..._cache[8] || (_cache[8] = [
617
- createTextVNode("改密码", -1)
618
- ])]),
619
- _: 1
620
- }, 8, ["onClick"]),
621
- createVNode(_sfc_main$5, {
622
- id: BigInt(row.uid),
623
- api_url: unref(HttpApiV1).url_user_del,
624
- module: "user"
625
- }, null, 8, ["id", "api_url"])
626
- ]),
627
- _: 2
628
- }, 1024)
629
- ]),
630
- _: 1
631
- })
632
- ]),
633
- _: 1
634
- }, 8, ["config"])
635
- ]),
636
- _: 1
637
- }),
638
- createVNode(_component_el_tab_pane, {
639
- label: "设置",
640
- name: "second"
641
- })
642
- ]),
643
- _: 1
644
- }, 8, ["modelValue"])
539
+ ]),
540
+ content: withCtx(() => [
541
+ createVNode(_component_el_table_column, {
542
+ prop: "uname",
543
+ label: "姓名",
544
+ width: "100"
545
+ }),
546
+ createVNode(_component_el_table_column, {
547
+ prop: "enable",
548
+ label: "状态",
549
+ width: "70"
550
+ }, {
551
+ default: withCtx(({ row }) => [
552
+ row.user_enable == 1 ? (openBlock(), createBlock(_component_el_tag, {
553
+ key: 0,
554
+ type: "success",
555
+ "disable-transitions": !0,
556
+ size: "small"
557
+ }, {
558
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
559
+ createTextVNode("正常", -1)
560
+ ])]),
561
+ _: 1
562
+ })) : createCommentVNode("", !0),
563
+ row.user_enable == 0 ? (openBlock(), createBlock(_component_el_tag, {
564
+ key: 1,
565
+ type: "info",
566
+ "disable-transitions": !0,
567
+ size: "small"
568
+ }, {
569
+ default: withCtx(() => [..._cache[6] || (_cache[6] = [
570
+ createTextVNode("禁用", -1)
571
+ ])]),
572
+ _: 1
573
+ })) : createCommentVNode("", !0)
574
+ ]),
575
+ _: 1
576
+ }),
577
+ createVNode(_component_el_table_column, {
578
+ prop: "username",
579
+ label: "用户名",
580
+ width: "100"
581
+ }),
582
+ createVNode(_component_el_table_column, {
583
+ label: "角色",
584
+ "min-width": "240"
585
+ }, {
586
+ default: withCtx(({ row }) => [
587
+ row.role_titles != "" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(row.role_titles.split(","), (r) => (openBlock(), createBlock(_component_el_tag, {
588
+ style: { "margin-right": "2px" },
589
+ "disable-transitions": !0,
590
+ size: "small"
591
+ }, {
592
+ default: withCtx(() => [
593
+ createTextVNode(toDisplayString(r), 1)
594
+ ]),
595
+ _: 2
596
+ }, 1024))), 256)) : createCommentVNode("", !0)
597
+ ]),
598
+ _: 1
599
+ }),
600
+ createVNode(_component_el_table_column, {
601
+ label: "最后登录时间",
602
+ prop: "last_login_time",
603
+ width: "180"
604
+ }, {
605
+ default: withCtx(({ row }) => [
606
+ createTextVNode(toDisplayString(dataformat.value(row.last_login_time)), 1)
607
+ ]),
608
+ _: 1
609
+ }),
610
+ createVNode(_component_el_table_column, {
611
+ fixed: "right",
612
+ label: "操作",
613
+ width: "180"
614
+ }, {
615
+ default: withCtx(({ row }) => [
616
+ createVNode(_component_el_space, null, {
617
+ default: withCtx(() => [
618
+ createVNode(_component_el_link, {
619
+ type: "primary",
620
+ onClick: ($event) => {
621
+ view.edit_id = BigInt(row.uid), view.edit_dialog_show = !0;
622
+ }
623
+ }, {
624
+ default: withCtx(() => [..._cache[7] || (_cache[7] = [
625
+ createTextVNode("查看和编辑", -1)
626
+ ])]),
627
+ _: 1
628
+ }, 8, ["onClick"]),
629
+ createVNode(_component_el_link, {
630
+ type: "primary",
631
+ onClick: ($event) => {
632
+ view.edit_id = BigInt(row.uid), view.change_pwd_dialog_show = !0;
633
+ }
634
+ }, {
635
+ default: withCtx(() => [..._cache[8] || (_cache[8] = [
636
+ createTextVNode("改密码", -1)
637
+ ])]),
638
+ _: 1
639
+ }, 8, ["onClick"]),
640
+ createVNode(_sfc_main$5, {
641
+ id: BigInt(row.uid),
642
+ api_url: unref(HttpApiV1).url_user_del,
643
+ module: "user"
644
+ }, null, 8, ["id", "api_url"])
645
+ ]),
646
+ _: 2
647
+ }, 1024)
648
+ ]),
649
+ _: 1
650
+ })
651
+ ]),
652
+ _: 1
653
+ }, 8, ["config"])
654
+ ]),
655
+ _: 1
656
+ }),
657
+ createVNode(_component_el_tab_pane, {
658
+ label: "设置",
659
+ name: "second"
660
+ })
661
+ ]),
662
+ _: 1
663
+ }, 8, ["modelValue"])
664
+ ])
645
665
  ]),
646
666
  createVNode(_sfc_main$2, {
647
667
  id: view.edit_id,
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, reactive, onMounted, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, createBlock, createCommentVNode, createTextVNode, toDisplayString } from "vue";
2
- import { H as HttpApiV1, i as _sfc_main$1 } from "./index-8UWgPXVt.js";
2
+ import { H as HttpApiV1, i as _sfc_main$1 } from "./index-D5KAIOPC.js";
3
3
  const _hoisted_1 = { style: { padding: "0px 20px", "white-space": "pre" } }, _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "version",
5
5
  setup(__props) {