ss-component-new 1.3.286 → 1.3.288

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 (121) hide show
  1. package/dist/{MTLLoader-Bsogql70.cjs → MTLLoader-CdxYhBAE.cjs} +1 -1
  2. package/dist/{MTLLoader-CdsFGQF-.js → MTLLoader-RsaYZtZ_.js} +1 -1
  3. package/dist/{OrbitControls-DWoCUvy4.cjs → OrbitControls-BNTHZN2P.cjs} +1 -1
  4. package/dist/{OrbitControls-C2_UxiUE.js → OrbitControls-D4mDZcDl.js} +1 -1
  5. package/dist/{URDFLoader-BsZKAKIo.cjs → URDFLoader-B56WRl4z.cjs} +1 -1
  6. package/dist/{URDFLoader-Dz9DW7vE.js → URDFLoader-BPNyxykV.js} +2 -2
  7. package/dist/{animationData-DnGVHraX.js → animationData-D4Q3av_t.js} +3 -3
  8. package/dist/{animationData-oN-nuDkg.cjs → animationData-DiyxzUT8.cjs} +1 -1
  9. package/dist/{array-BkvdBkjB.cjs → array-DHHdihdS.cjs} +1 -1
  10. package/dist/{array-MoA3Ri4g.js → array-jbOhhf4v.js} +4 -4
  11. package/dist/{clone-fE05POOC.js → clone-BrrxU6_J.js} +1 -1
  12. package/dist/clone-Dn6v3xp6.cjs +1 -0
  13. package/dist/{dayjs.min-D4NpYk_n.cjs → dayjs.min-DRU3LNcy.cjs} +1 -1
  14. package/dist/{dayjs.min-Dnlx1ZBx.js → dayjs.min-Dx_LN6Bu.js} +1 -1
  15. package/dist/{iconfont-DOzv_3Zg.js → iconfont-DkmQztG1.js} +2 -2
  16. package/dist/{iconfont-Dmx62o41.cjs → iconfont-Dq-DsQsx.cjs} +1 -1
  17. package/dist/{index-C2WU_Ec1.js → index--PidpjSy.js} +2 -2
  18. package/dist/{index-sIKBEcpI.js → index--ZVD8xbU.js} +16 -26
  19. package/dist/{index-BYz3b7aZ.js → index-1rE9nGn_.js} +2 -2
  20. package/dist/{index-2xd8WpWE.js → index-B6b9Lr8M.js} +3 -3
  21. package/dist/{index-B4tCIr_z.cjs → index-BOHy6XZd.cjs} +1 -1
  22. package/dist/index-BVOdzNfr.js +9371 -0
  23. package/dist/{index-DyzZBKOp.cjs → index-BbZoRc6B.cjs} +1 -1
  24. package/dist/index-BdyYMxx4.cjs +1 -0
  25. package/dist/{index-BZ-4my22.cjs → index-Big-I9pF.cjs} +1 -1
  26. package/dist/index-BlAISTfa.cjs +1 -0
  27. package/dist/index-Bs0qreV1.cjs +1 -0
  28. package/dist/{index-Xa-cp7US.js → index-C-z63B9f.js} +9 -9
  29. package/dist/{index-B-U8MdmI.cjs → index-C0A0y_84.cjs} +1 -1
  30. package/dist/{index-DsoXkrYI.js → index-C1dVsNLG.js} +1 -1
  31. package/dist/{index-D1z8j4eV.js → index-C7-Idrnv.js} +1 -1
  32. package/dist/{index-CkgTi0gb.js → index-C9smrIfQ.js} +6 -6
  33. package/dist/{index-jkznII6r.cjs → index-CAcP6bx_.cjs} +1 -1
  34. package/dist/{index-BsOgskIp.js → index-CF4yVz1d.js} +2 -2
  35. package/dist/{index-CTwVZFcK.cjs → index-CQcXApCn.cjs} +1 -1
  36. package/dist/{index-BFrBIvIE.js → index-CTtBV5bC.js} +2 -2
  37. package/dist/{index-BECHZzKg.cjs → index-CUJ_cdPT.cjs} +1 -1
  38. package/dist/{index-BQDdBzrY.js → index-CV8QlXGI.js} +1 -1
  39. package/dist/{index-Yj1Oc3ZA.cjs → index-CXgZFuTt.cjs} +1 -1
  40. package/dist/{index-Dqh2QdZw.js → index-Cbb4eaBp.js} +3 -3
  41. package/dist/{index-_15_kR9u.cjs → index-CdrBTtcu.cjs} +1 -1
  42. package/dist/{index-C4-xNXhM.js → index-Cg7Mpfpj.js} +1 -1
  43. package/dist/{index-Cm9kN1Xu.cjs → index-CiZrZ3Xv.cjs} +1 -1
  44. package/dist/index-CliKgPns.cjs +1 -0
  45. package/dist/{index-BeOgfY4E.js → index-Cml5XnKL.js} +6 -6
  46. package/dist/{index-BRNEBbrZ.cjs → index-CuHxF23O.cjs} +1 -1
  47. package/dist/index-Cxv5DW4K.cjs +2 -0
  48. package/dist/{index-CU99CuPT.cjs → index-D1NTpDPS.cjs} +1 -1
  49. package/dist/{index-C4MvqsS3.js → index-D21dwfqO.js} +1 -1
  50. package/dist/{index-sE0VWxJ7.cjs → index-D3Lvzu_0.cjs} +1 -1
  51. package/dist/{index-BhPO2DCU.cjs → index-DAwnZFmG.cjs} +1 -1
  52. package/dist/{index-DO-1hTj2.cjs → index-DLN6R2tJ.cjs} +1 -1
  53. package/dist/{index-CnTP5O4m.js → index-DSOG6EEa.js} +4 -4
  54. package/dist/{index-DGBPHiex.cjs → index-DTiolIgS.cjs} +1 -1
  55. package/dist/index-DTsHI5xQ.js +30 -0
  56. package/dist/{index-0KXR_hwR.cjs → index-DUAnjHxe.cjs} +1 -1
  57. package/dist/{index-CAZZzLQo.cjs → index-DXWN-UJr.cjs} +1 -1
  58. package/dist/{index-Dz6vpfgy.js → index-DXjgumn5.js} +3 -3
  59. package/dist/{index-B6ql3Xm0.js → index-Df8bxCwR.js} +29 -29
  60. package/dist/{index-CJc4ev1k.cjs → index-Dm_u-SjZ.cjs} +1 -1
  61. package/dist/index-Drj3FBfd.js +1058 -0
  62. package/dist/{index-FA5lLYx0.js → index-H_NM-ZF-.js} +2 -2
  63. package/dist/{index-CbGFrsD8.cjs → index-NnqT8oEL.cjs} +1 -1
  64. package/dist/{index-Baf8WN5y.js → index-QG4F5kTH.js} +2 -2
  65. package/dist/{index-3-c8Ohjp.js → index-RSaGZhb3.js} +2 -2
  66. package/dist/{index-DLQ3bwtv.cjs → index-WTaP_KDd.cjs} +1 -1
  67. package/dist/index-cFt1QbzL.js +308 -0
  68. package/dist/{index-BHelG7C7.js → index-csCFl4vZ.js} +7531 -7517
  69. package/dist/index-gFBtUdzh.js +494 -0
  70. package/dist/{index-V_-cMWsl.cjs → index-mHmXlK2R.cjs} +1 -1
  71. package/dist/{index-DiBR8QS7.js → index-tjDz6s0y.js} +1 -1
  72. package/dist/{index-BIZJ7GKJ.js → index-uBjJS7MI.js} +4 -4
  73. package/dist/index-uSfvbTe3.cjs +25 -0
  74. package/dist/index-vbxWL2yo.cjs +1 -0
  75. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-B6Se_JzC.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DBQ_-V1_.js} +1850 -1845
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-C9SIThm3.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DpyDtD61.cjs} +62 -62
  77. package/dist/{main-CBC6ubO_.cjs → main-CJWCDw-y.cjs} +1 -1
  78. package/dist/{main-C7oFJi1Q.js → main-DQB2eKuh.js} +4 -4
  79. package/dist/{menu-BxHhjSbR.js → menu-CtG1loFf.js} +109 -113
  80. package/dist/{menu-Dl3Jfk-c.cjs → menu-Hdw0L-Y2.cjs} +6 -6
  81. package/dist/{menuIndex-C9SCNvTX.js → menuIndex-DmS5cMwB.js} +1 -1
  82. package/dist/{menuIndex-_ho29ItI.cjs → menuIndex-DqY0uteo.cjs} +1 -1
  83. package/dist/obj/model.mtl +42 -0
  84. package/dist/obj/model.obj +26110 -0
  85. package/dist/ss-component.cjs +1 -1
  86. package/dist/ss-component.css +1 -1
  87. package/dist/ss-component.js +12 -12
  88. package/dist/ss-component2.cjs +1 -1
  89. package/dist/ss-component2.js +12 -12
  90. package/dist/{threeModel-NJj9qUh_.js → threeModel-BV7PfpCu.js} +4 -4
  91. package/dist/{threeModel-BzGOMEcf.cjs → threeModel-BY867mnV.cjs} +1 -1
  92. package/dist/{threePreview-B5IIrseu.js → threePreview-BwElOyqr.js} +4 -4
  93. package/dist/{threePreview-CAyxqtke.cjs → threePreview-CWRtmSvh.cjs} +1 -1
  94. package/dist/{threeSceneView-nFy-ZMDh.js → threeSceneView-BytYkSfT.js} +14 -14
  95. package/dist/{threeSceneView-DmyZ6JVk.cjs → threeSceneView-ff0CsUxF.cjs} +1 -1
  96. package/dist/{threeSceneViewForCPMPIP-5AFgwENl.js → threeSceneViewForCPMPIP-Bp2-YrZL.js} +8 -8
  97. package/dist/{threeSceneViewForCPMPIP-CagUxEZ7.cjs → threeSceneViewForCPMPIP-DDWR6FSl.cjs} +1 -1
  98. package/dist/{threeTrackPathView-DzteP02y.js → threeTrackPathView-BckFDqUs.js} +4 -4
  99. package/dist/{threeTrackPathView-Dmry9hlD.cjs → threeTrackPathView-CamXHHnK.cjs} +1 -1
  100. package/dist/{threeViewerHost-B5IEEj6S.js → threeViewerHost-5ThpQYP3.js} +3 -3
  101. package/dist/{threeViewerHost-Dtrx4MAi.cjs → threeViewerHost-Cuo7oQGW.cjs} +1 -1
  102. package/dist/{urdfTree-DwRiqRR9.js → urdfTree-B6GL3kgV.js} +1 -1
  103. package/dist/{urdfTree-C62b4s3t.cjs → urdfTree-DDQw6tEb.cjs} +1 -1
  104. package/dist/{workpieceTreePanel-5IQMEHLR.cjs → workpieceTreePanel-B6AVU13A.cjs} +1 -1
  105. package/dist/{workpieceTreePanel-B-ueTwVy.js → workpieceTreePanel-BvO881iH.js} +4 -4
  106. package/package.json +1 -1
  107. package/public/obj/model.mtl +42 -0
  108. package/public/obj/model.obj +26110 -0
  109. package/dist/clone-BeaG_uby.cjs +0 -1
  110. package/dist/index-A3W3n1yI.js +0 -9393
  111. package/dist/index-B0Ay1p_8.cjs +0 -1
  112. package/dist/index-Bq07pl6z.js +0 -55
  113. package/dist/index-CTJIAikw.cjs +0 -1
  114. package/dist/index-CdbYspWB.js +0 -494
  115. package/dist/index-D7ANep-L.cjs +0 -1
  116. package/dist/index-DEUqbjst.js +0 -448
  117. package/dist/index-DLHRv2Jb.cjs +0 -25
  118. package/dist/index-DRfDSXeI.js +0 -875
  119. package/dist/index-QYUIqsbh.cjs +0 -1
  120. package/dist/index-cHplSoU4.cjs +0 -2
  121. package/dist/index-uzigFRcN.cjs +0 -1
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as v, computed as B, watch as u, onMounted as y, onUnmounted as _, resolveComponent as D, createElementBlock as K, openBlock as L, createVNode as E } from "vue";
2
- import { b as j, p as x, s as z } from "./menu-BxHhjSbR.js";
3
- import { u as A } from "./index-Baf8WN5y.js";
2
+ import { b as j, p as x, s as z } from "./menu-CtG1loFf.js";
3
+ import { u as A } from "./index-QG4F5kTH.js";
4
4
  import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const b = /* @__PURE__ */ v({
6
6
  __name: "index",
@@ -1,6 +1,6 @@
1
- import { ref as A, computed as c, onMounted as _ } from "vue";
2
- import { useRouter as g } from "vue-router";
3
- import { u as C, p as h, n as R, c as b, g as S, j as E } from "./menu-BxHhjSbR.js";
1
+ import { ref as h, computed as c, onMounted as g } from "vue";
2
+ import { useRouter as A } from "vue-router";
3
+ import { u as C, p as _, g as R, c as M, h as S, k as U } from "./menu-CtG1loFf.js";
4
4
  const l = {
5
5
  ALLOW: {
6
6
  value: "允许"
@@ -8,7 +8,7 @@ const l = {
8
8
  DENY: {
9
9
  value: "不允许"
10
10
  }
11
- }, M = "系统管理/用户管理", N = "用户列表", D = {
11
+ }, b = "系统管理/用户管理", D = "用户列表", N = {
12
12
  title: "个人中心",
13
13
  path: "/个人中心",
14
14
  level: 1,
@@ -19,31 +19,22 @@ const l = {
19
19
  isRouter: !0,
20
20
  children: [],
21
21
  childMenus: []
22
- }, K = {
23
- BASE: {
24
- label: "基础信息",
25
- value: "base"
26
- },
27
- RESET_PASSWORD_BY_FACE_RECOGNITION: {
28
- label: "修改密码",
29
- value: "reset-password-by-face-recognition"
30
- }
31
- }, T = () => {
32
- const u = g(), s = C(h), { platId: o, isSuperAdmin: i } = R(), p = (e) => {
22
+ }, k = () => {
23
+ const u = A(), s = C(_), { platId: o, isSuperAdmin: i } = R(), p = (e) => {
33
24
  const { id: t } = e;
34
25
  return {
35
26
  id: t,
36
27
  password: "",
37
28
  allow_reset_password: l.DENY.value
38
29
  };
39
- }, r = A([]), d = c(() => {
30
+ }, r = h([]), d = c(() => {
40
31
  var t, a;
41
- const e = (a = (t = r.value) == null ? void 0 : t.find) == null ? void 0 : a.call(t, (n) => n.property_name === N);
32
+ const e = (a = (t = r.value) == null ? void 0 : t.find) == null ? void 0 : a.call(t, (n) => n.property_name === D);
42
33
  return e == null ? void 0 : e.object_id;
43
34
  }), w = async () => {
44
35
  var a;
45
36
  const e = {
46
- pageName: M,
37
+ pageName: b,
47
38
  platId: o.value
48
39
  }, t = await S(e);
49
40
  return ((a = t == null ? void 0 : t.data) == null ? void 0 : a.result) || [];
@@ -51,15 +42,15 @@ const l = {
51
42
  const e = await w();
52
43
  r.value = e || [];
53
44
  };
54
- _(async () => {
45
+ g(async () => {
55
46
  await f();
56
47
  });
57
- const y = c(() => `content_${d.value}`), m = async (e) => ({
48
+ const m = c(() => `content_${d.value}`), y = async (e) => ({
58
49
  platId: o.value,
59
50
  changeContents: [
60
51
  {
61
52
  tableContents: [e],
62
- tableName: y.value
53
+ tableName: m.value
63
54
  }
64
55
  ]
65
56
  }), I = (e) => {
@@ -67,19 +58,19 @@ const l = {
67
58
  return t === l.ALLOW.value;
68
59
  }, v = async (e) => {
69
60
  const { id: t, password: a, allow_reset_password: n } = e;
70
- return m({
61
+ return y({
71
62
  id: t,
72
63
  password: a,
73
64
  allow_reset_password: n
74
65
  });
75
66
  }, P = async (e) => {
76
67
  const t = await v(e);
77
- return await E(t);
68
+ return await U(t);
78
69
  };
79
70
  return {
80
71
  isSuperAdmin: i,
81
72
  toPersonalCenter: () => {
82
- const e = b(D);
73
+ const e = M(N);
83
74
  s.setAsideMenus([e]), s.setActiveMenuPath(e == null ? void 0 : e.path), s.setActiveAsideMenu(e), u.push(e.path);
84
75
  },
85
76
  isAllowReplacePassword: I,
@@ -88,6 +79,5 @@ const l = {
88
79
  };
89
80
  };
90
81
  export {
91
- K as t,
92
- T as u
82
+ k as u
93
83
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as l, reactive as c, onMounted as s, createElementBlock as r, openBlock as i, createVNode as p } from "vue";
2
- import { S as m } from "./index-BQDdBzrY.js";
3
- import { Y as _ } from "./index-BHelG7C7.js";
2
+ import { S as m } from "./index-CV8QlXGI.js";
3
+ import { Y as _ } from "./index-csCFl4vZ.js";
4
4
  import { _ as d } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const f = { class: "log-wrap" }, u = /* @__PURE__ */ l({
6
6
  __name: "index",
@@ -1,7 +1,7 @@
1
1
  import { ref as v, computed as Ce, defineComponent as Ve, onMounted as Ae, reactive as ze, resolveComponent as u, createElementBlock as P, openBlock as _, createElementVNode as s, createVNode as o, unref as c, withCtx as i, createTextVNode as N, toDisplayString as le, Fragment as oe, renderList as se, withModifiers as xe, createBlock as re, createCommentVNode as qe } from "vue";
2
- import { g as Ue, d as Ge, u as Oe, c as Me, a as Re, b as Fe } from "./index-D1z8j4eV.js";
3
- import { n as Qe, c as $e, g as Ye, u as je, p as Ze } from "./menu-BxHhjSbR.js";
4
- import { E as He, f as we } from "./index-Baf8WN5y.js";
2
+ import { g as Ue, d as Ge, u as Oe, c as Me, a as Re, b as Fe } from "./index-C7-Idrnv.js";
3
+ import { g as Qe, c as $e, h as Ye, u as je, p as Ze } from "./menu-CtG1loFf.js";
4
+ import { E as He, f as we } from "./index-QG4F5kTH.js";
5
5
  import { _ as he } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
6
6
  import { s as Je } from "./index-CnjGqJZS.js";
7
7
  import { _ as Ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1 +1 @@
1
- "use strict";const v=require("vue"),g=require("./index-BRNEBbrZ.cjs"),s=require("./menu-Dl3Jfk-c.cjs"),A=require("./index-DGBPHiex.cjs"),N=require("./request-BC2w2vGr.cjs"),we=s.useLoginState(s.pinia),{systemUrl:y}=s.storeToRefs(we);let S=y.value===""||!y.value?"http://222.92.178.198:63002":y.value;v.watch(()=>y.value,()=>{S=y.value===""||!y.value?"http://222.92.178.198:63002":y.value},{deep:!0,immediate:!0});function C(r){return N.service({url:`${S}/platform/import_data`,method:"post",data:r})}function V(r){return N.service({url:`${S}/platform/export_data`,method:"post",data:r,responseType:"blob"})}function Te(r=""){const l=r.match(/filename\*=UTF-8''([^;]+)/i);if(l)return decodeURIComponent(l[1]);const u=r.match(/filename=["']?([^"';]+)["']?/);return u?u[1]:"download.xlsx"}const z=r=>{var w,h;const l=((w=r==null?void 0:r.headers)==null?void 0:w["content-type"])||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",u=new Blob([r.data],{type:l}),D=(h=r==null?void 0:r.headers)==null?void 0:h["content-disposition"],I=Te(D)||"数据.xlsx",i=window.URL.createObjectURL(u),d=document.createElement("a");d.href=i,d.setAttribute("download",I),document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(i)},De=[{label:"编辑",value:"edit"},{label:"删除",value:"delete"}],F="role",f={ENABLE:{value:"enable",label:"启用",tag:"primary"},DISABLED:{value:"disabled",label:"禁用",tag:"info"}},p={EDITABLE:{value:"editable",label:"可编辑",tag:"primary"},DISABLED:{value:"disabled",label:"不可编辑",tag:"info"}},Re={TABLE:{value:"Table"}},Ee=["查看","查看三维模型","导出paraform","导出","导出全部","导出选中"],Be=()=>{const r=s.useLoginState(),l=s.useMenuState(s.pinia),{isSuperAdmin:u,userId:D,userName:I,platId:i}=s.useUserInfo(),d=v.ref([]),w=t=>{const{propertyType:e}=t||{};return e===Re.TABLE.value},h=v.ref({}),O=v.computed(()=>{var e;return u.value?!0:((e=h.value)==null?void 0:e.status)===p.EDITABLE.value}),$=t=>{var o,c;const e=A.formatterTimeStr(Date.now()),{id:a=0}=r.loginUserInfo||{},n=s.cloneDeep(t);return n.update_user_id=a,n.update_user_name=I.value,n.update_time=e,n.checked_ids=((c=(o=n==null?void 0:n.main_ids)==null?void 0:o.map)==null?void 0:c.call(o,m=>{const{id:b}=m;return b}))||[],n},P=t=>{let e=[];return t.forEach(a=>{var n;if(a.isPropertyLeaf){const o=s.cloneDeep(a);e.push(o)}a.children&&((n=a.children)==null?void 0:n.length)>0&&(e=e.concat(P(a.children)))}),e},q=(t=[])=>{let e=[];for(let a=0;a<t.length;a++){const n=t[a],o=n.children||[];delete n.children,e.push(n),o&&o.length>0&&(e=e.concat(q(o)))}return e},G=t=>{let e=[];return t.forEach(a=>{if(a.isPropertyLeaf){const n=q(a.params);e=e.concat(n)}}),e},x=(t,e)=>{const a=r.loginUserInfo,{id:n=0}=a||{},o=A.formatterTimeStr(Date.now());let c={name:"",code:"",order_no:1,data_scope:1,remark:"",tenant_id:"",create_time:o,update_time:o,create_user_id:n,create_user_name:I.value,update_user_id:n,update_user_name:I.value,status:f.ENABLE.value,main_ids:[],checked_ids:[],params:[]};const{checkAll:m,tree:b}=e||{};if(m&&b){const L=P(b),Le=L.map(B=>({...B,department_scope:"unlimited"}));c.main_ids=Le,c.checked_ids=L.map(B=>B.id),c.params=G(L)}if(t){const L=$(t);c={...c,...L}}return c},R=t=>{const e=[t];return{platId:i.value,changeRoleData:e}},M=async t=>await s.getRoleList({platId:t}),j=async()=>{var e;l.setImportLoading(!0);const t=await M(i.value).finally(()=>{l.setImportLoading(!1)});return(e=t==null?void 0:t.data)==null?void 0:e.result},U=()=>({name:""}),T=v.ref(U()),H=()=>{T.value=U()},Q=()=>({pageNum:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),_=v.ref(Q()),K=t=>{_.value.pageNum=t},W=t=>{_.value.pageSize=t},J=()=>({platId:i.value,pageNum:_.value.pageNum,pageSize:_.value.pageSize,filter:{...T.value}}),X=async t=>{var a;const e=await s.getByPage(t);return(a=e==null?void 0:e.data)==null?void 0:a.result},Y=async()=>{const t=J(),e=await X(t),{total:a}=e||{};return _.value.total=a,e||{}},Z=async t=>{delete t.role_id;const e=R(t);await s.createRole(e)},ee=async t=>{l.setImportLoading(!0),await Z(t).finally(()=>{l.setImportLoading(!1)})},te=async t=>{const e=R(t);await s.updateRole(e)},ae=async t=>{l.setImportLoading(!0),await te(t).finally(()=>{l.setImportLoading(!1)})},ne=async t=>{const{role_id:e}=t,a={platId:i.value,role_id:[e]};await s.deleteRole(a)},oe=async t=>{await A.ElMessageBox.confirm("是否确认要删除","",{showClose:!1,confirmButtonText:"确认",cancelButtonText:"取消",type:"warning",modalClass:"delete-role-message-modal",confirmButtonClass:"delete-role-confirm"}),l.setImportLoading(!0),await ne(t).finally(()=>{l.setImportLoading(!1)})},re=t=>{const e=t.toUpperCase(),a=f==null?void 0:f[e];return(a==null?void 0:a.label)||t},se=t=>{const e=t.toUpperCase(),a=f==null?void 0:f[e];return(a==null?void 0:a.tag)||"info"},le=async t=>{var a;const e=await s.getPropertyAuthTree(t);return((a=e==null?void 0:e.data)==null?void 0:a.result)||[]},ce=async t=>{const e={platId:i.value,includeHidden:!0,roleIds:t};l.setImportLoading(!0);const a=await le(e).finally(()=>{l.setImportLoading(!1)});d.value=a},ie=(t="")=>{const e=t.toUpperCase(),a=p==null?void 0:p[e];return(a==null?void 0:a.label)||t},ue=(t="")=>{const e=t.toUpperCase(),a=p==null?void 0:p[e];return(a==null?void 0:a.tag)||"info"},E=t=>t===p.EDITABLE.value,pe=(t,e)=>{const{status:a}=t||{},{tableOperate:n}=e||{};return!!(E(a)||n&&Ee.includes(n))},de=(t,e)=>{const{status:a}=t||{};return E(a)},me=(t,e)=>{if(u.value)return!0;const{type:a}=e||{};if(g.compType.TABLE===a)return pe(t,e);if(g.compType.FORM===a)return de(t);const{status:n}=t||{};return E(n)},fe=async()=>{var n,o;const e={pageName:"系统管理/角色管理",platId:i.value,userId:D.value},a=await s.getPageDataApi(e);return(o=(n=a==null?void 0:a.data)==null?void 0:n.result)==null?void 0:o[0]},ge=async()=>{if(!u.value)return h.value=await fe(),h},k=t=>{const e=s.cloneDeep(t);for(let a=0;a<e.length;a++){const n=e==null?void 0:e[a],{id:o,prop:c,children:m}=n||{};n.uniqueKey=`${o}_${c}`,m&&(n.children=k(m))}return e},ye=async t=>{var a;const e=await C(t);return(a=e==null?void 0:e.data)==null?void 0:a.result},he=async t=>{const e=new FormData,a=x(),{create_user_id:n,update_user_id:o,create_user_name:c,update_user_name:m}=a;return e.set("platId",i.value),e.set("file",t),e.set("tableType",F),e.set("create_user_id",n),e.set("update_user_id",o),e.set("create_user_name",c),e.set("update_user_name",m),await ye(e)},_e=async t=>await V(t),ve=async()=>{const t={platId:i.value,tableType:F,filter:T.value},e=await _e(t);return z(e),e},Ie=[["名称","编码","备注","状态"]],be=async()=>{const t=g.utils.aoa_to_sheet(Ie),e=g.utils.book_new();g.utils.book_append_sheet(e,t,"角色"),g.writeFileSync(e,"角色模板.xlsx")};return{compType:g.compType,isTableFeature:w,queryInfo:T,resetQuery:H,pageInfo:_,setPageNum:K,setPageSize:W,initGetByPage:Y,initRoleList:j,initCreate:ee,initUpdate:ae,initDelete:oe,initRoleRequestData:R,initPropertyAuthTree:ce,propertyAuthTree:d,initRoleItem:x,isSuperAdmin:u,getStatusLabelByValue:re,getStatusTagByValue:se,getFeatureStatusLabelByValue:ie,getFeatureStatusTagByValue:ue,hasEditable:me,initRoleConfig:ge,hasRoleEditAuth:O,buildParamAuthTree:k,initImport:he,initExport:ve,exportTemplate:be}};exports.exportData=V;exports.featureStatusConstants=p;exports.importData=C;exports.initDownloadFileByResponse=z;exports.operateList=De;exports.statusConstants=f;exports.useRole=Be;
1
+ "use strict";const v=require("vue"),g=require("./index-CuHxF23O.cjs"),s=require("./menu-Hdw0L-Y2.cjs"),A=require("./index-DTiolIgS.cjs"),N=require("./request-BC2w2vGr.cjs"),we=s.useLoginState(s.pinia),{systemUrl:y}=s.storeToRefs(we);let S=y.value===""||!y.value?"http://222.92.178.198:63002":y.value;v.watch(()=>y.value,()=>{S=y.value===""||!y.value?"http://222.92.178.198:63002":y.value},{deep:!0,immediate:!0});function C(r){return N.service({url:`${S}/platform/import_data`,method:"post",data:r})}function V(r){return N.service({url:`${S}/platform/export_data`,method:"post",data:r,responseType:"blob"})}function Te(r=""){const l=r.match(/filename\*=UTF-8''([^;]+)/i);if(l)return decodeURIComponent(l[1]);const u=r.match(/filename=["']?([^"';]+)["']?/);return u?u[1]:"download.xlsx"}const z=r=>{var w,h;const l=((w=r==null?void 0:r.headers)==null?void 0:w["content-type"])||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",u=new Blob([r.data],{type:l}),D=(h=r==null?void 0:r.headers)==null?void 0:h["content-disposition"],I=Te(D)||"数据.xlsx",i=window.URL.createObjectURL(u),d=document.createElement("a");d.href=i,d.setAttribute("download",I),document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(i)},De=[{label:"编辑",value:"edit"},{label:"删除",value:"delete"}],F="role",f={ENABLE:{value:"enable",label:"启用",tag:"primary"},DISABLED:{value:"disabled",label:"禁用",tag:"info"}},p={EDITABLE:{value:"editable",label:"可编辑",tag:"primary"},DISABLED:{value:"disabled",label:"不可编辑",tag:"info"}},Re={TABLE:{value:"Table"}},Ee=["查看","查看三维模型","导出paraform","导出","导出全部","导出选中"],Be=()=>{const r=s.useLoginState(),l=s.useMenuState(s.pinia),{isSuperAdmin:u,userId:D,userName:I,platId:i}=s.useUserInfo(),d=v.ref([]),w=t=>{const{propertyType:e}=t||{};return e===Re.TABLE.value},h=v.ref({}),O=v.computed(()=>{var e;return u.value?!0:((e=h.value)==null?void 0:e.status)===p.EDITABLE.value}),$=t=>{var o,c;const e=A.formatterTimeStr(Date.now()),{id:a=0}=r.loginUserInfo||{},n=s.cloneDeep(t);return n.update_user_id=a,n.update_user_name=I.value,n.update_time=e,n.checked_ids=((c=(o=n==null?void 0:n.main_ids)==null?void 0:o.map)==null?void 0:c.call(o,m=>{const{id:b}=m;return b}))||[],n},P=t=>{let e=[];return t.forEach(a=>{var n;if(a.isPropertyLeaf){const o=s.cloneDeep(a);e.push(o)}a.children&&((n=a.children)==null?void 0:n.length)>0&&(e=e.concat(P(a.children)))}),e},q=(t=[])=>{let e=[];for(let a=0;a<t.length;a++){const n=t[a],o=n.children||[];delete n.children,e.push(n),o&&o.length>0&&(e=e.concat(q(o)))}return e},G=t=>{let e=[];return t.forEach(a=>{if(a.isPropertyLeaf){const n=q(a.params);e=e.concat(n)}}),e},x=(t,e)=>{const a=r.loginUserInfo,{id:n=0}=a||{},o=A.formatterTimeStr(Date.now());let c={name:"",code:"",order_no:1,data_scope:1,remark:"",tenant_id:"",create_time:o,update_time:o,create_user_id:n,create_user_name:I.value,update_user_id:n,update_user_name:I.value,status:f.ENABLE.value,main_ids:[],checked_ids:[],params:[]};const{checkAll:m,tree:b}=e||{};if(m&&b){const L=P(b),Le=L.map(B=>({...B,department_scope:"unlimited"}));c.main_ids=Le,c.checked_ids=L.map(B=>B.id),c.params=G(L)}if(t){const L=$(t);c={...c,...L}}return c},R=t=>{const e=[t];return{platId:i.value,changeRoleData:e}},M=async t=>await s.getRoleList({platId:t}),j=async()=>{var e;l.setImportLoading(!0);const t=await M(i.value).finally(()=>{l.setImportLoading(!1)});return(e=t==null?void 0:t.data)==null?void 0:e.result},U=()=>({name:""}),T=v.ref(U()),H=()=>{T.value=U()},Q=()=>({pageNum:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),_=v.ref(Q()),K=t=>{_.value.pageNum=t},W=t=>{_.value.pageSize=t},J=()=>({platId:i.value,pageNum:_.value.pageNum,pageSize:_.value.pageSize,filter:{...T.value}}),X=async t=>{var a;const e=await s.getByPage(t);return(a=e==null?void 0:e.data)==null?void 0:a.result},Y=async()=>{const t=J(),e=await X(t),{total:a}=e||{};return _.value.total=a,e||{}},Z=async t=>{delete t.role_id;const e=R(t);await s.createRole(e)},ee=async t=>{l.setImportLoading(!0),await Z(t).finally(()=>{l.setImportLoading(!1)})},te=async t=>{const e=R(t);await s.updateRole(e)},ae=async t=>{l.setImportLoading(!0),await te(t).finally(()=>{l.setImportLoading(!1)})},ne=async t=>{const{role_id:e}=t,a={platId:i.value,role_id:[e]};await s.deleteRole(a)},oe=async t=>{await A.ElMessageBox.confirm("是否确认要删除","",{showClose:!1,confirmButtonText:"确认",cancelButtonText:"取消",type:"warning",modalClass:"delete-role-message-modal",confirmButtonClass:"delete-role-confirm"}),l.setImportLoading(!0),await ne(t).finally(()=>{l.setImportLoading(!1)})},re=t=>{const e=t.toUpperCase(),a=f==null?void 0:f[e];return(a==null?void 0:a.label)||t},se=t=>{const e=t.toUpperCase(),a=f==null?void 0:f[e];return(a==null?void 0:a.tag)||"info"},le=async t=>{var a;const e=await s.getPropertyAuthTree(t);return((a=e==null?void 0:e.data)==null?void 0:a.result)||[]},ce=async t=>{const e={platId:i.value,includeHidden:!0,roleIds:t};l.setImportLoading(!0);const a=await le(e).finally(()=>{l.setImportLoading(!1)});d.value=a},ie=(t="")=>{const e=t.toUpperCase(),a=p==null?void 0:p[e];return(a==null?void 0:a.label)||t},ue=(t="")=>{const e=t.toUpperCase(),a=p==null?void 0:p[e];return(a==null?void 0:a.tag)||"info"},E=t=>t===p.EDITABLE.value,pe=(t,e)=>{const{status:a}=t||{},{tableOperate:n}=e||{};return!!(E(a)||n&&Ee.includes(n))},de=(t,e)=>{const{status:a}=t||{};return E(a)},me=(t,e)=>{if(u.value)return!0;const{type:a}=e||{};if(g.compType.TABLE===a)return pe(t,e);if(g.compType.FORM===a)return de(t);const{status:n}=t||{};return E(n)},fe=async()=>{var n,o;const e={pageName:"系统管理/角色管理",platId:i.value,userId:D.value},a=await s.getPageDataApi(e);return(o=(n=a==null?void 0:a.data)==null?void 0:n.result)==null?void 0:o[0]},ge=async()=>{if(!u.value)return h.value=await fe(),h},k=t=>{const e=s.cloneDeep(t);for(let a=0;a<e.length;a++){const n=e==null?void 0:e[a],{id:o,prop:c,children:m}=n||{};n.uniqueKey=`${o}_${c}`,m&&(n.children=k(m))}return e},ye=async t=>{var a;const e=await C(t);return(a=e==null?void 0:e.data)==null?void 0:a.result},he=async t=>{const e=new FormData,a=x(),{create_user_id:n,update_user_id:o,create_user_name:c,update_user_name:m}=a;return e.set("platId",i.value),e.set("file",t),e.set("tableType",F),e.set("create_user_id",n),e.set("update_user_id",o),e.set("create_user_name",c),e.set("update_user_name",m),await ye(e)},_e=async t=>await V(t),ve=async()=>{const t={platId:i.value,tableType:F,filter:T.value},e=await _e(t);return z(e),e},Ie=[["名称","编码","备注","状态"]],be=async()=>{const t=g.utils.aoa_to_sheet(Ie),e=g.utils.book_new();g.utils.book_append_sheet(e,t,"角色"),g.writeFileSync(e,"角色模板.xlsx")};return{compType:g.compType,isTableFeature:w,queryInfo:T,resetQuery:H,pageInfo:_,setPageNum:K,setPageSize:W,initGetByPage:Y,initRoleList:j,initCreate:ee,initUpdate:ae,initDelete:oe,initRoleRequestData:R,initPropertyAuthTree:ce,propertyAuthTree:d,initRoleItem:x,isSuperAdmin:u,getStatusLabelByValue:re,getStatusTagByValue:se,getFeatureStatusLabelByValue:ie,getFeatureStatusTagByValue:ue,hasEditable:me,initRoleConfig:ge,hasRoleEditAuth:O,buildParamAuthTree:k,initImport:he,initExport:ve,exportTemplate:be}};exports.exportData=V;exports.featureStatusConstants=p;exports.importData=C;exports.initDownloadFileByResponse=z;exports.operateList=De;exports.statusConstants=f;exports.useRole=Be;