@utogether/udp-core 1.0.4 → 2.0.0-beta.10

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 (124) hide show
  1. package/dist/{403-DASI6Pwz.js → 403-DjXGcxpa.js} +3 -3
  2. package/dist/{404-YhBA92cb.js → 404-B_MSn6FQ.js} +1 -1
  3. package/dist/{500-ywbFF5MX.js → 500-CtI21E9g.js} +2 -2
  4. package/dist/{AuthorityInfo-tCSX2Fh7.js → AuthorityInfo-CYhRUS8K.js} +1 -1
  5. package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-Cwd6UT2i.js → AuthorityInfo.vue_vue_type_style_index_0_lang-BY8hkJ2R.js} +2 -2
  6. package/dist/{AuthorityPanel-BeBNiwqc.js → AuthorityPanel-CRlAwbaI.js} +1 -1
  7. package/dist/{AuthorityPanel.vue_vue_type_style_index_0_lang-CIYmnP9-.js → AuthorityPanel.vue_vue_type_style_index_0_lang-DxhZjp1S.js} +31 -24
  8. package/dist/{Company-l23MEzdM.js → Company-BVH3Zyy0.js} +3 -3
  9. package/dist/{CompanyPanel-D_s0rh6h.js → CompanyPanel-BKx3WVgS.js} +1 -1
  10. package/dist/{Department-DSEvORLg.js → Department-BZcr0_eu.js} +3 -3
  11. package/dist/{DepartmentPanel-WN8nOgCV.js → DepartmentPanel-BZNV3WaF.js} +3 -3
  12. package/dist/{DesignPanel-DirEGh9M.js → DesignPanel-7gr0Fljt.js} +1 -1
  13. package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-D02hXSrN.js → DesignPanel.vue_vue_type_style_index_0_lang-By9HKa8W.js} +3 -3
  14. package/dist/{DictView-DiIQdiek.js → DictView-B0dRdinW.js} +20 -19
  15. package/dist/{InvOrganization-b7v3g9EJ.js → InvOrganization-CwTNjj-a.js} +2 -2
  16. package/dist/{Org-BORfx1PL.js → Org-D59oQ0VY.js} +2 -2
  17. package/dist/{Preview-DkRn_TSc.js → Preview-sbZrWUWr.js} +1 -1
  18. package/dist/{ReportDefine-Cd0QeaWA.js → ReportDefine-C7CZ6RSh.js} +1 -1
  19. package/dist/{ReportDesign-4qNqyeEW.js → ReportDesign-CuevdD_6.js} +3 -3
  20. package/dist/{ReportQuery-BJfTFpec.js → ReportQuery-BndhM0Ji.js} +1 -1
  21. package/dist/{ReportQueryFrom-CB7sExZx.js → ReportQueryFrom-n2k7BNX9.js} +1 -1
  22. package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CqO_2Ier.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-CFtXbzOb.js} +1 -1
  23. package/dist/{ReportTemplate-B69muSgT.js → ReportTemplate-43Rx_knT.js} +1 -1
  24. package/dist/{Role-Bo4YrNDC.js → Role-BS2QH_H8.js} +3 -3
  25. package/dist/{RoleAssign-kOMYJ4s3.js → RoleAssign-C6wMcgfW.js} +3 -3
  26. package/dist/{RolePanel-BSJmjyqc.js → RolePanel-BwyuGmJw.js} +1 -1
  27. package/dist/{RolePanel-B1d4e6uk.js → RolePanel-DJop6xpJ.js} +1 -1
  28. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-DgQpfjaU.js → RolePanel.vue_vue_type_script_setup_true_lang-CSkU6fAb.js} +3 -3
  29. package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-DCzX-ZP_.js → RolePanel.vue_vue_type_script_setup_true_lang-Cf0BCtgL.js} +2 -2
  30. package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-WNOYFxJ1.js → ScrollPanel.vue_vue_type_style_index_0_lang-BZY0JkpB.js} +32 -31
  31. package/dist/Staff-DI6eAVQs.js +26 -0
  32. package/dist/{StaffInfo-DcU9_40C.js → StaffInfo-BQhMyQ7u.js} +1 -1
  33. package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-CtfN2CAr.js → StaffInfo.vue_vue_type_script_setup_true_lang-D79C6rw0.js} +9 -9
  34. package/dist/{StaffPanel-7exWkZd9.js → StaffPanel-By5elrj9.js} +1 -1
  35. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-DtbIZdcq.js +154 -0
  36. package/dist/{SysUser-B3uB_cp2.js → SysUser-DNYitHEW.js} +2 -2
  37. package/dist/{SysUserPanel-B0CLp5AO.js → SysUserPanel-_WDSXjfT.js} +1 -1
  38. package/dist/{SysUserPanel.vue_vue_type_script_setup_true_lang-Cwea_4dY.js → SysUserPanel.vue_vue_type_script_setup_true_lang-BFhIa5Gs.js} +126 -111
  39. package/dist/{SystemMenu-a59l4hTk.js → SystemMenu-C_H0bTA7.js} +52 -49
  40. package/dist/{UserInfo-D1IA2oLt.js → UserInfo-Bx25xdkh.js} +1 -1
  41. package/dist/{UserInfo.vue_vue_type_style_index_0_lang-DDVgYRD5.js → UserInfo.vue_vue_type_style_index_0_lang-B6FE4Epn.js} +2 -2
  42. package/dist/await-to-js.es5-Bv3Eu4mi.js +10 -0
  43. package/dist/{childView-6rCeLcsx.js → childView-CiKCAXKS.js} +1 -1
  44. package/dist/{childView-JdrkroL5.js → childView-WAzRvHLp.js} +1 -1
  45. package/dist/{childView.vue_vue_type_style_index_0_lang-B8x99f1B.js → childView.vue_vue_type_style_index_0_lang-3n_-DrRj.js} +2 -2
  46. package/dist/{childView.vue_vue_type_style_index_0_lang-BfcnWnx9.js → childView.vue_vue_type_style_index_0_lang-Bz4630fS.js} +26 -20
  47. package/dist/{code-rule-2lkPF547.js → code-rule-BehFVVOx.js} +2 -2
  48. package/dist/core.es.js +1 -1
  49. package/dist/{cron-task-DV1pGO1m.js → cron-task-C0-R_b64.js} +2 -2
  50. package/dist/{frameView-C0bzSB8c.js → frameView-4E2U2LM3.js} +1 -1
  51. package/dist/index-BvU3LB8R.js +7275 -0
  52. package/dist/layout-home-DJywZo1E.js +232 -0
  53. package/dist/{layoutView-CTV-E4Cj.js → layoutView-JGsVdXXu.js} +148 -149
  54. package/dist/{log-in-CoBP2x6u.js → log-in-l4FpOtBL.js} +2 -2
  55. package/dist/{log-out-KX8FiRVf.js → log-out-Cij2dkih.js} +2 -2
  56. package/dist/{login-CtCoGWzD.js → login-D4hfm7ZW.js} +124 -134
  57. package/dist/{login-log-DJBGJVV0.js → login-log-BEHYT0v0.js} +5 -5
  58. package/dist/{lov-view-Bm0JEzzg.js → lov-view-CpJedb5y.js} +3 -3
  59. package/dist/{menuInfo-D2qPoRwz.js → menuInfo-ClhT8lVG.js} +1 -1
  60. package/dist/{menuInfo.vue_vue_type_style_index_0_lang-DoQjX9Ly.js → menuInfo.vue_vue_type_style_index_0_lang-VuKVlyhc.js} +38 -36
  61. package/dist/{pda-app-SbcIclbH.js → pda-app-D_w1bNyU.js} +2 -2
  62. package/dist/{resource-Cdq1UKGI.js → resource-BxTwBnU4.js} +1 -1
  63. package/dist/su-welcome-BLNjs5WE.js +42181 -0
  64. package/dist/{sys-config-CCOf4xbj.js → sys-config-C0RJg9l1.js} +2 -2
  65. package/dist/udp-core.css +1 -1
  66. package/package.json +5 -2
  67. package/src/App.vue +37 -31
  68. package/src/components/SuScrollTree/ScrollPanel.vue +176 -170
  69. package/src/components/udp/content/index.vue +88 -88
  70. package/src/components/udp/form-upload/form-upload.vue +496 -0
  71. package/src/components/udp/grid/index.vue +524 -524
  72. package/src/components/udp/index.ts +6 -5
  73. package/src/components/udp/ut-stamp-badge/index.vue +271 -271
  74. package/src/components/udp/utils.ts +8 -2
  75. package/src/layout/components/lay-content/index.vue +4 -11
  76. package/src/layout/components/lay-search/components/SearchModal.vue +181 -189
  77. package/src/layout/components/lay-setting/index.vue +503 -503
  78. package/src/layout/components/lay-sidebar/sidebar-logo.vue +101 -101
  79. package/src/layout/components/lay-tag/index.vue +598 -598
  80. package/src/layout/hooks/useNav.ts +176 -176
  81. package/src/layout/hooks/useTag.ts +227 -227
  82. package/src/layout/layoutView.vue +216 -215
  83. package/src/layout/types.ts +93 -93
  84. package/src/main.ts +111 -115
  85. package/src/plugins/i18n/zh.ts +19 -3
  86. package/src/plugins/vxe-table/render.tsx +60 -15
  87. package/src/router/index.ts +187 -187
  88. package/src/router/modules/home.ts +32 -32
  89. package/src/router/utils.ts +420 -420
  90. package/src/store/modules/epTheme.ts +48 -48
  91. package/src/style/vxetable.scss +18 -2
  92. package/src/utils/dataFormat/index.ts +222 -222
  93. package/src/utils/lifecycle.ts +39 -39
  94. package/src/views/organization/department/DepartmentPanel.vue +303 -303
  95. package/src/views/organization/staff/Staff.vue +59 -58
  96. package/src/views/organization/staff/StaffInfo.vue +3 -2
  97. package/src/views/organization/staff/StaffPanel.vue +13 -1
  98. package/src/views/system/layout/layout-home.vue +238 -0
  99. package/src/views/system/menu/AuthorityPanel.vue +10 -9
  100. package/src/views/system/menu/SystemMenu.vue +194 -185
  101. package/src/views/system/menu/menuInfo.vue +384 -384
  102. package/src/views/system/sysUser/SysUserPanel.vue +363 -347
  103. package/src/views/udev/coderule/code-rule.vue +132 -132
  104. package/src/views/udev/dict/DictView.vue +4 -4
  105. package/src/views/udev/dict/childView.vue +6 -4
  106. package/src/views/udev/lov/childView.vue +174 -174
  107. package/src/views/ufile/aggregation/File.vue +85 -87
  108. package/src/views/uhome/components/common-menu.vue +118 -0
  109. package/src/views/uhome/components/dynamic-component.vue +66 -0
  110. package/src/views/uhome/components/home-todo.vue +175 -0
  111. package/src/views/uhome/components/menu-favorite.vue +315 -315
  112. package/src/views/uhome/dynamic-card.vue +31 -0
  113. package/src/views/uhome/su-welcome.vue +47 -114
  114. package/src/views/ulogin/login.vue +336 -325
  115. package/src/views/upms/interface/log-in.vue +100 -100
  116. package/src/views/upms/interface/log-out.vue +104 -104
  117. package/src/views/upms/user/login-log.vue +54 -54
  118. package/types/global.d.ts +232 -231
  119. package/vite.config.ts +83 -84
  120. package/dist/Staff-BFp3zNNR.js +0 -25
  121. package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-v5xOXKRS.js +0 -143
  122. package/dist/await-to-js.es5-BtRbN2QH.js +0 -10
  123. package/dist/index-BbtbEMCH.js +0 -4649
  124. package/dist/su-welcome-BHDsjqqV.js +0 -524
@@ -1,11 +1,12 @@
1
- import { defineComponent as N, ref as k, inject as p, watch as A, nextTick as L, resolveComponent as f, createElementBlock as D, openBlock as v, withModifiers as O, createElementVNode as a, createBlock as C, createCommentVNode as g, createVNode as y, toDisplayString as _, withCtx as S, normalizeClass as V } from "vue";
2
- import { y as j } from "./index-BbtbEMCH.js";
3
- const M = { class: "u-panel-header" }, $ = { class: "u-panel-content system-scrollbar" }, K = /* @__PURE__ */ N({
1
+ import { defineComponent as P, ref as k, inject as f, watch as E, nextTick as N, resolveComponent as v, createElementBlock as D, openBlock as h, withModifiers as O, createElementVNode as a, createBlock as C, createCommentVNode as y, createVNode as g, toDisplayString as _, withCtx as S, normalizeClass as V } from "vue";
2
+ import { y as j } from "./index-BvU3LB8R.js";
3
+ const M = { class: "u-panel-header" }, $ = { class: "u-panel-content system-scrollbar" }, K = /* @__PURE__ */ P({
4
4
  __name: "ScrollPanel",
5
5
  props: {
6
6
  title: {},
7
7
  url: {},
8
8
  showAllButton: { type: Boolean, default: !1 },
9
+ initLoadAll: { type: Boolean, default: !1 },
9
10
  treeOtions: { default: () => ({
10
11
  children: "children",
11
12
  label: "label"
@@ -13,62 +14,62 @@ const M = { class: "u-panel-header" }, $ = { class: "u-panel-content system-scro
13
14
  defaultParams: { default: () => ({}) }
14
15
  },
15
16
  setup(b, { expose: B }) {
16
- const h = b, s = k([]), o = k(null), r = p("active"), c = p("scrollPanelChange"), w = p("treeList");
17
- A(
18
- () => c.value,
17
+ const c = b, r = k([]), o = k(null), s = f("active"), u = f("scrollPanelChange"), w = f("treeList");
18
+ E(
19
+ () => u.value,
19
20
  () => {
20
- c.value && u();
21
+ u.value && d();
21
22
  }
22
23
  );
23
- const u = async (l = {}) => {
24
- const t = Object.assign(l, h.defaultParams), e = await j().get(h.url, t);
25
- s.value = e.list || e, w.value = e.list || e, r.value = e.list ? e.list[0] : e[0], L(() => {
24
+ const d = async (l = {}) => {
25
+ const t = Object.assign(l, c.defaultParams), e = await j().get(c.url, t);
26
+ r.value = e.list || e, w.value = e.list || e, c.initLoadAll ? s.value = {} : s.value = e.list ? e.list[0] : e[0], N(() => {
26
27
  var n;
27
- o.value && (o == null || o.value.setCurrentKey(((n = r.value) == null ? void 0 : n.id) || ""));
28
- }), c.value = !1;
28
+ o.value && (o == null || o.value.setCurrentKey(((n = s.value) == null ? void 0 : n.id) || ""));
29
+ }), u.value = !1;
29
30
  }, x = (l) => {
30
- r.value = l;
31
- }, P = () => {
32
- r.value = {};
33
- }, d = (l, t) => {
31
+ s.value = l;
32
+ }, A = () => {
33
+ s.value = {};
34
+ }, p = (l, t) => {
34
35
  l.forEach((e) => {
35
36
  var n;
36
- o.value.store.nodesMap[e.id].expanded = t, (n = e.children) != null && n.length && d(e.children, t);
37
+ o.value.store.nodesMap[e.id].expanded = t, (n = e.children) != null && n.length && p(e.children, t);
37
38
  });
38
39
  }, m = () => {
39
- u();
40
+ d();
40
41
  };
41
42
  return B({
42
43
  onRefresh: m
43
- }), u(), (l, t) => {
44
- const e = f("ut-button"), n = f("vxe-button"), E = f("el-tree");
45
- return v(), D("div", {
44
+ }), d(), (l, t) => {
45
+ const e = v("ut-button"), n = v("vxe-button"), L = v("el-tree");
46
+ return h(), D("div", {
46
47
  class: "u-scroll-panel",
47
- onClick: O(P, ["prevent"])
48
+ onClick: O(A, ["prevent"])
48
49
  }, [
49
50
  a("div", M, [
50
51
  a("h2", null, _(l.title), 1),
51
- l.showAllButton ? (v(), C(e, {
52
+ l.showAllButton ? (h(), C(e, {
52
53
  key: 0,
53
54
  content: "BtnExpand",
54
- onClick: t[0] || (t[0] = (i) => d(s.value, !0))
55
- })) : g("", !0),
56
- l.showAllButton ? (v(), C(e, {
55
+ onClick: t[0] || (t[0] = (i) => p(r.value, !0))
56
+ })) : y("", !0),
57
+ l.showAllButton ? (h(), C(e, {
57
58
  key: 1,
58
59
  status: "warning",
59
60
  content: "BtnCollapse",
60
- onClick: t[1] || (t[1] = (i) => d(s.value, !1))
61
- })) : g("", !0),
62
- y(n, {
61
+ onClick: t[1] || (t[1] = (i) => p(r.value, !1))
62
+ })) : y("", !0),
63
+ g(n, {
63
64
  icon: "vxe-icon-refresh",
64
65
  onClick: m
65
66
  })
66
67
  ]),
67
68
  a("div", $, [
68
- y(E, {
69
+ g(L, {
69
70
  ref_key: "tree",
70
71
  ref: o,
71
- data: s.value,
72
+ data: r.value,
72
73
  props: l.treeOtions,
73
74
  "expand-on-click-node": !1,
74
75
  style: { "background-color": "#fff" },
@@ -0,0 +1,26 @@
1
+ import { defineComponent as l, ref as e, provide as t, createElementBlock as i, openBlock as _, createElementVNode as n, createVNode as o } from "vue";
2
+ import { _ as d } from "./ScrollPanel.vue_vue_type_style_index_0_lang-BZY0JkpB.js";
3
+ import { _ as f } from "./StaffPanel.vue_vue_type_script_setup_true_lang-DtbIZdcq.js";
4
+ import { _ as m } from "./index-BvU3LB8R.js";
5
+ const p = { class: "u-content-panel" }, u = { class: "u-left-panel" }, h = { class: "content" }, v = { name: "StaffPanel" }, C = /* @__PURE__ */ l({
6
+ ...v,
7
+ setup(N) {
8
+ const a = e(!1), s = e([]), c = e({});
9
+ return t("scrollPanelChange", a), t("active", c), t("treeList", s), (r, P) => (_(), i("div", p, [
10
+ n("div", u, [
11
+ o(d, {
12
+ title: r.$t("department"),
13
+ "init-load-all": !0,
14
+ "tree-otions": { children: "children", label: "deptName" },
15
+ url: "/uums/department/treeDepartment"
16
+ }, null, 8, ["title"])
17
+ ]),
18
+ n("div", h, [
19
+ o(f)
20
+ ])
21
+ ]));
22
+ }
23
+ }), B = /* @__PURE__ */ m(C, [["__scopeId", "data-v-1cfe93f2"]]);
24
+ export {
25
+ B as default
26
+ };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./StaffInfo.vue_vue_type_script_setup_true_lang-CtfN2CAr.js";
1
+ import { _ as f } from "./StaffInfo.vue_vue_type_script_setup_true_lang-D79C6rw0.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as b, ref as u, onMounted as D, resolveComponent as r, createElementBlock as E, openBlock as k, createVNode as n, withCtx as f } from "vue";
2
2
  import { useRender as F } from "@utogether/utils";
3
- import { y as _ } from "./index-BbtbEMCH.js";
3
+ import { y as _ } from "./index-BvU3LB8R.js";
4
4
  const T = { class: "config" }, x = /* @__PURE__ */ b({
5
5
  __name: "StaffInfo",
6
6
  props: {
@@ -10,7 +10,7 @@ const T = { class: "config" }, x = /* @__PURE__ */ b({
10
10
  },
11
11
  emits: ["onClose"],
12
12
  setup(v, { emit: y }) {
13
- const i = v, t = F(), d = u({}), p = u(null), l = u(!1), R = { userName: "userName", userId: "id" }, w = { disabled: i.dataStatus !== "add" }, g = [
13
+ const i = v, t = F(), d = u({}), p = u(null), l = u(!1), R = { userName: "userName", userId: "id" }, w = { disabled: i.dataStatus !== "add" }, N = [
14
14
  {
15
15
  field: "employeeCode",
16
16
  required: !0,
@@ -23,7 +23,7 @@ const T = { class: "config" }, x = /* @__PURE__ */ b({
23
23
  field: "deptName",
24
24
  required: !0,
25
25
  span: 8,
26
- itemRender: t.renderLov({ code: "SU.DEPARTMENT", field: "deptName" }, C)
26
+ itemRender: t.renderLov({ code: "SU.DEPARTMENT", field: "deptName" }, g)
27
27
  },
28
28
  { field: "email", span: 8, itemRender: t.renderInput() },
29
29
  { field: "identity", span: 8, itemRender: t.renderInput() },
@@ -32,17 +32,17 @@ const T = { class: "config" }, x = /* @__PURE__ */ b({
32
32
  { field: "phone", span: 8, itemRender: t.renderInput() },
33
33
  { field: "mobile", span: 8, itemRender: t.renderInput() },
34
34
  {
35
- field: "attribute5",
35
+ field: "userName",
36
36
  title: "message.releateUser",
37
37
  span: 8,
38
38
  itemRender: t.renderSysUser({ mapField: R })
39
39
  }
40
40
  ];
41
- function C(e) {
41
+ function g(e) {
42
42
  var o, a, s;
43
43
  e.row.deptName = ((o = e.item) == null ? void 0 : o.deptName) || e.row.deptName, e.row.deptCode = ((a = e.item) == null ? void 0 : a.deptCode) || e.row.deptCode, e.row.departmentId = ((s = e.item) == null ? void 0 : s.id) || e.row.departmentId;
44
44
  }
45
- const I = y, N = () => {
45
+ const C = y, I = () => {
46
46
  p.value.validateForm(async (e) => {
47
47
  if (!e) {
48
48
  const { dataStatus: o } = i;
@@ -51,7 +51,7 @@ const T = { class: "config" }, x = /* @__PURE__ */ b({
51
51
  });
52
52
  };
53
53
  function m() {
54
- I("onClose");
54
+ C("onClose");
55
55
  }
56
56
  return D(() => {
57
57
  d.value = i.record;
@@ -72,7 +72,7 @@ const T = { class: "config" }, x = /* @__PURE__ */ b({
72
72
  ref: p,
73
73
  record: d.value,
74
74
  loading: l.value,
75
- items: g,
75
+ items: N,
76
76
  "data-status": e.dataStatus
77
77
  }, null, 8, ["record", "loading", "data-status"]),
78
78
  n(s),
@@ -91,7 +91,7 @@ const T = { class: "config" }, x = /* @__PURE__ */ b({
91
91
  content: "confirm",
92
92
  icon: "ri-save-3-fill",
93
93
  status: "u-cyan",
94
- onTap: N
94
+ onTap: I
95
95
  })
96
96
  ]),
97
97
  _: 1
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./StaffPanel.vue_vue_type_script_setup_true_lang-v5xOXKRS.js";
1
+ import { _ as f } from "./StaffPanel.vue_vue_type_script_setup_true_lang-DtbIZdcq.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1,154 @@
1
+ import { defineComponent as C, ref as N, inject as B, reactive as D, watch as L, nextTick as U, resolveComponent as c, createElementBlock as M, openBlock as i, createVNode as s, createBlock as I, createCommentVNode as A, Fragment as P } from "vue";
2
+ import { useI18n as V } from "vue-i18n";
3
+ import { clone as R } from "xe-utils";
4
+ import { warnMessage as T } from "@utogether/utils";
5
+ import { _ as Y } from "./StaffInfo.vue_vue_type_script_setup_true_lang-D79C6rw0.js";
6
+ import { y as d } from "./index-BvU3LB8R.js";
7
+ import { VxeUI as O } from "vxe-pc-ui";
8
+ import { t as l } from "./await-to-js.es5-Bv3Eu4mi.js";
9
+ const j = {
10
+ class: "page-content"
11
+ }, u = "/uums/employee", W = /* @__PURE__ */ C({
12
+ __name: "StaffPanel",
13
+ setup(q) {
14
+ const o = N(null), {
15
+ t: m
16
+ } = V(), n = B("active"), t = D({
17
+ record: {},
18
+ showModelView: !1,
19
+ fetchExtParam: {}
20
+ });
21
+ L(() => n.value, (e) => {
22
+ t.fetchExtParam = {
23
+ departmentId: e == null ? void 0 : e.id
24
+ }, U(() => {
25
+ o.value.refreshData();
26
+ });
27
+ });
28
+ const f = [{
29
+ code: "sync",
30
+ auth: "wechat",
31
+ status: "success",
32
+ icon: "ri-refresh-line"
33
+ }, {
34
+ code: "sync",
35
+ auth: "dingding",
36
+ status: "success",
37
+ icon: "ri-refresh-line"
38
+ }, {
39
+ code: "sync",
40
+ auth: "OA",
41
+ status: "success",
42
+ icon: "ri-refresh-line"
43
+ }, {
44
+ code: "bindUser",
45
+ auth: "bind",
46
+ status: "warning",
47
+ icon: "ri-bring-to-front"
48
+ }, {
49
+ code: "del",
50
+ auth: "/"
51
+ }], p = [{
52
+ field: "employeeCode"
53
+ }, {
54
+ field: "employeeName"
55
+ }], h = [{
56
+ type: "checkbox",
57
+ width: 50,
58
+ align: "center"
59
+ }, {
60
+ field: "employeeCode"
61
+ }, {
62
+ field: "employeeName",
63
+ width: 150
64
+ }, {
65
+ field: "gender",
66
+ width: 100,
67
+ formatter: ["formatDict", "SU.GENDER"]
68
+ }, {
69
+ field: "enabled",
70
+ width: 100,
71
+ formatter: ["formatDict", "SU.ENABLE"]
72
+ }, {
73
+ field: "operate",
74
+ width: 150,
75
+ fixed: "right",
76
+ slots: {
77
+ default: ({
78
+ row: e
79
+ }) => {
80
+ const a = ["1", "Y"].includes(e.enabled) ? "disabled" : "enable", r = ["1", "Y"].includes(e.enabled) ? "ri-stop-circle-fill" : "ri-play-circle-fill", S = ["1", "Y"].includes(e.enabled) ? "warning" : "success";
81
+ return [s(P, null, [s(c("ut-button"), {
82
+ icon: "ri-edit-box-line",
83
+ content: "edit",
84
+ onTap: () => b(e)
85
+ }, null), s(c("ut-button"), {
86
+ icon: r,
87
+ content: a,
88
+ status: S,
89
+ onTap: () => v(e)
90
+ }, null)])];
91
+ }
92
+ }
93
+ }], y = {
94
+ toolbarButtonClick({
95
+ code: e
96
+ }) {
97
+ e === "add" && g();
98
+ }
99
+ }, g = () => {
100
+ var e, a;
101
+ if (!((e = n.value) != null && e.deptName))
102
+ return T("请先选择部门");
103
+ t.dataStatus = "add", t.record = {}, t.record.departmentId = (a = n.value) == null ? void 0 : a.id, t.record.deptName = n.value.deptName, t.record.enabled = "1", t.showModelView = !0;
104
+ }, b = (e) => {
105
+ t.dataStatus = "update", t.record = e, t.showModelView = !0;
106
+ }, v = async (e) => {
107
+ const a = R(e, !0);
108
+ o.value.showLoading(), a.enabled = a.enabled === "1" ? "0" : "1", await d().put(u, a), o.value.hiddenLoading(), o.value.refreshData();
109
+ }, w = async () => {
110
+ if (await O.modal.confirm(m("message.tip.confirmSync")) !== "confirm") return;
111
+ o.value.showLoading();
112
+ const [a] = await l(d().post("/uums/employee/syncEwEmp", {}));
113
+ o.value.hiddenLoading(), !a && o.value.refreshData();
114
+ }, _ = async () => {
115
+ const e = o.value.getSelectRecords();
116
+ if (!e.length) return;
117
+ o.value.showLoading();
118
+ const [a] = await l(d().post("/uums/employee/bindUser", e));
119
+ o.value.hiddenLoading(), !a && o.value.refreshData();
120
+ }, k = (e) => {
121
+ e === "sync" && w(), e === "bindUser" && _();
122
+ }, x = {
123
+ querySuccess: (e) => {
124
+ }
125
+ }, E = () => {
126
+ t.showModelView = !1, o.value.refreshData();
127
+ };
128
+ return (e, a) => {
129
+ const r = c("ut-grid");
130
+ return i(), M("div", j, [s(r, {
131
+ ref_key: "xgrid",
132
+ ref: o,
133
+ items: p,
134
+ columns: h,
135
+ "default-params": t.fetchExtParam,
136
+ events: y,
137
+ "auto-load": !1,
138
+ buttons: f,
139
+ url: u,
140
+ callback: x,
141
+ mode: "form",
142
+ onButtonClick: k
143
+ }, null, 8, ["default-params"]), t.showModelView ? (i(), I(Y, {
144
+ key: 0,
145
+ record: t.record,
146
+ "data-status": t.dataStatus,
147
+ onOnClose: E
148
+ }, null, 8, ["record", "data-status"])) : A("", !0)]);
149
+ };
150
+ }
151
+ });
152
+ export {
153
+ W as _
154
+ };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as t, ref as o, provide as s, createElementBlock as r, openBlock as c, createVNode as _ } from "vue";
2
- import { _ as n } from "./SysUserPanel.vue_vue_type_script_setup_true_lang-Cwea_4dY.js";
3
- import { _ as a } from "./index-BbtbEMCH.js";
2
+ import { _ as n } from "./SysUserPanel.vue_vue_type_script_setup_true_lang-BFhIa5Gs.js";
3
+ import { _ as a } from "./index-BvU3LB8R.js";
4
4
  const p = { class: "u-content-panel1" }, i = /* @__PURE__ */ t({
5
5
  __name: "SysUser",
6
6
  setup(m) {
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./SysUserPanel.vue_vue_type_script_setup_true_lang-Cwea_4dY.js";
1
+ import { _ as f } from "./SysUserPanel.vue_vue_type_script_setup_true_lang-BFhIa5Gs.js";
2
2
  export {
3
3
  f as default
4
4
  };