zsysview 0.1.10 → 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-DzL6spbn.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({
@@ -58,6 +58,18 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
58
58
  }), rules = reactive({
59
59
  uname: [
60
60
  { required: !0, message: "请输入姓名", trigger: "blur" }
61
+ ],
62
+ username: [
63
+ { required: !0, message: "请输入用户名", trigger: "blur" }
64
+ ],
65
+ phone: [
66
+ { required: !0, message: "请输入手机号码", trigger: "blur" }
67
+ ],
68
+ password: [
69
+ { required: !0, message: "请输入密码", trigger: "blur" }
70
+ ],
71
+ role_value: [
72
+ { required: !0, message: "请选择角色", trigger: "blur" }
61
73
  ]
62
74
  }), getData = async () => {
63
75
  if (view.loading = !0, role_option.value = await getRoleOption(), form.value.uid = props.id, props.id != 0n) {
@@ -66,7 +78,7 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
66
78
  let res = await HttpApiV1.Post(HttpApiV1.url_user_detail, { id: props.id });
67
79
  if (res.IsSuccess) {
68
80
  let data = res.data;
69
- form.value.uid = data.uid, form.value.uname = data.uname, form.value.username = data.username, form.value.is_enable = data.user_enable == 1;
81
+ form.value.uid = data.uid, form.value.uname = data.uname, form.value.username = data.username, form.value.phone = data.phone, form.value.is_enable = data.user_enable == 1;
70
82
  let rs = [];
71
83
  for (const s of data.role_ids)
72
84
  for (let tmp of role_option.value)
@@ -91,6 +103,7 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
91
103
  username: form.value.username,
92
104
  password: form.value.uid == 0n ? h.hashStr(form.value.password) : "",
93
105
  uname: form.value.uname,
106
+ phone: form.value.phone,
94
107
  user_enable: form.value.is_enable ? 1 : 0,
95
108
  role_ids: r
96
109
  };
@@ -262,7 +275,7 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
262
275
  }),
263
276
  createVNode(_component_el_form_item, {
264
277
  label: "角色权限",
265
- prop: "role_title"
278
+ prop: "role_value"
266
279
  }, {
267
280
  default: withCtx(() => [
268
281
  createVNode(_component_el_select, {
@@ -280,7 +293,7 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
280
293
  }, {
281
294
  default: withCtx(() => [
282
295
  createElementVNode("span", _hoisted_1$2, toDisplayString(item.label), 1),
283
- item.enable ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_2, " 禁用不生效 "))
296
+ item.enable ? createCommentVNode("", !0) : (openBlock(), createElementBlock("span", _hoisted_2$1, " 禁用不生效 "))
284
297
  ]),
285
298
  _: 2
286
299
  }, 1032, ["label", "value"]))), 128))
@@ -451,7 +464,10 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
451
464
  }, 8, ["modelValue"]);
452
465
  };
453
466
  }
454
- }), _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({
455
471
  __name: "user",
456
472
  setup(__props) {
457
473
  const activeName = ref("userList"), listconfig = reactive({
@@ -468,7 +484,7 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
468
484
  ]
469
485
  }
470
486
  ],
471
- ExportUrl: HttpApiV1.url_user_export
487
+ ExportUrl: HttpApiV1.url_user_export,
472
488
  // ExportColumn:[
473
489
  // {ColumnTitle:'姓名',ColumnName:'uname'},
474
490
  // {ColumnTitle:'用户名',ColumnName:'username'},
@@ -476,6 +492,10 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
476
492
  // {ColumnTitle:'最后登录时间',ColumnName:'last_login_time'},
477
493
  // {ColumnTitle:'角色',ColumnName:'role_titles'},
478
494
  // ]
495
+ HasCheckbox: !0,
496
+ ReserveSelection: !0,
497
+ RowIdKey: "uid",
498
+ RowTitleKey: "uname"
479
499
  }), view = reactive({
480
500
  edit_id: BigInt(0),
481
501
  edit_dialog_show: !1,
@@ -484,160 +504,164 @@ const _hoisted_1$2 = { style: { float: "left" } }, _hoisted_2 = {
484
504
  return (_ctx, _cache) => {
485
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");
486
506
  return openBlock(), createElementBlock(Fragment, null, [
487
- createVNode(_sfc_main$3),
488
507
  createElementVNode("div", _hoisted_1, [
489
- createVNode(_component_el_tabs, {
490
- modelValue: activeName.value,
491
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => activeName.value = $event)
492
- }, {
493
- default: withCtx(() => [
494
- createVNode(_component_el_tab_pane, {
495
- label: "全部用户",
496
- name: "userList"
497
- }, {
498
- default: withCtx(() => [
499
- createVNode(_sfc_main$4, {
500
- config: listconfig,
501
- module: "user"
502
- }, {
503
- headermain: withCtx(() => [
504
- createVNode(_component_el_button, {
505
- class: "main_btn",
506
- type: "primary",
507
- onClick: _cache[0] || (_cache[0] = ($event) => {
508
- 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
509
538
  })
510
- }, {
511
- default: withCtx(() => [..._cache[4] || (_cache[4] = [
512
- createTextVNode("新建用户", -1)
513
- ])]),
514
- _: 1
515
- })
516
- ]),
517
- content: withCtx(() => [
518
- createVNode(_component_el_table_column, {
519
- prop: "uname",
520
- label: "姓名",
521
- width: "100"
522
- }),
523
- createVNode(_component_el_table_column, {
524
- prop: "enable",
525
- label: "状态",
526
- width: "70"
527
- }, {
528
- default: withCtx(({ row }) => [
529
- row.user_enable == 1 ? (openBlock(), createBlock(_component_el_tag, {
530
- key: 0,
531
- type: "success",
532
- "disable-transitions": !0,
533
- size: "small"
534
- }, {
535
- default: withCtx(() => [..._cache[5] || (_cache[5] = [
536
- createTextVNode("正常", -1)
537
- ])]),
538
- _: 1
539
- })) : createCommentVNode("", !0),
540
- row.user_enable == 0 ? (openBlock(), createBlock(_component_el_tag, {
541
- key: 1,
542
- type: "info",
543
- "disable-transitions": !0,
544
- size: "small"
545
- }, {
546
- default: withCtx(() => [..._cache[6] || (_cache[6] = [
547
- createTextVNode("禁用", -1)
548
- ])]),
549
- _: 1
550
- })) : createCommentVNode("", !0)
551
- ]),
552
- _: 1
553
- }),
554
- createVNode(_component_el_table_column, {
555
- prop: "username",
556
- label: "用户名",
557
- width: "100"
558
- }),
559
- createVNode(_component_el_table_column, {
560
- label: "角色",
561
- "min-width": "240"
562
- }, {
563
- default: withCtx(({ row }) => [
564
- row.role_titles != "" ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(row.role_titles.split(","), (r) => (openBlock(), createBlock(_component_el_tag, {
565
- style: { "margin-right": "2px" },
566
- "disable-transitions": !0,
567
- size: "small"
568
- }, {
569
- default: withCtx(() => [
570
- createTextVNode(toDisplayString(r), 1)
571
- ]),
572
- _: 2
573
- }, 1024))), 256)) : createCommentVNode("", !0)
574
- ]),
575
- _: 1
576
- }),
577
- createVNode(_component_el_table_column, {
578
- label: "最后登录时间",
579
- prop: "last_login_time",
580
- width: "180"
581
- }, {
582
- default: withCtx(({ row }) => [
583
- createTextVNode(toDisplayString(dataformat.value(row.last_login_time)), 1)
584
- ]),
585
- _: 1
586
- }),
587
- createVNode(_component_el_table_column, {
588
- fixed: "right",
589
- label: "操作",
590
- width: "180"
591
- }, {
592
- default: withCtx(({ row }) => [
593
- createVNode(_component_el_space, null, {
594
- default: withCtx(() => [
595
- createVNode(_component_el_link, {
596
- type: "primary",
597
- onClick: ($event) => {
598
- view.edit_id = BigInt(row.uid), view.edit_dialog_show = !0;
599
- }
600
- }, {
601
- default: withCtx(() => [..._cache[7] || (_cache[7] = [
602
- createTextVNode("查看和编辑", -1)
603
- ])]),
604
- _: 1
605
- }, 8, ["onClick"]),
606
- createVNode(_component_el_link, {
607
- type: "primary",
608
- onClick: ($event) => {
609
- view.edit_id = BigInt(row.uid), view.change_pwd_dialog_show = !0;
610
- }
611
- }, {
612
- default: withCtx(() => [..._cache[8] || (_cache[8] = [
613
- createTextVNode("改密码", -1)
614
- ])]),
615
- _: 1
616
- }, 8, ["onClick"]),
617
- createVNode(_sfc_main$5, {
618
- id: BigInt(row.uid),
619
- api_url: unref(HttpApiV1).url_user_del,
620
- module: "user"
621
- }, null, 8, ["id", "api_url"])
622
- ]),
623
- _: 2
624
- }, 1024)
625
- ]),
626
- _: 1
627
- })
628
- ]),
629
- _: 1
630
- }, 8, ["config"])
631
- ]),
632
- _: 1
633
- }),
634
- createVNode(_component_el_tab_pane, {
635
- label: "设置",
636
- name: "second"
637
- })
638
- ]),
639
- _: 1
640
- }, 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
+ ])
641
665
  ]),
642
666
  createVNode(_sfc_main$2, {
643
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-DzL6spbn.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) {