ss-component-new 1.1.606 → 1.1.607
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.
- package/dist/{array-mnEYd91h.cjs → array-C1gcNGaP.cjs} +1 -1
- package/dist/{array-wJSGLzMi.js → array-CaisX3_y.js} +1 -1
- package/dist/{index-jvd5BlOv.js → index-2Wg02nub.js} +3 -3
- package/dist/index-2tDhJ_PE.cjs +74 -0
- package/dist/{index-c4UWXgJ5.js → index-B1cMw_e2.js} +1 -1
- package/dist/{index-aN0VV7Zn.js → index-B807Lss8.js} +5 -5
- package/dist/{index-bIDRuygJ.cjs → index-BB7D-KhK.cjs} +1 -1
- package/dist/{index-CE-DNAtJ.cjs → index-BE4_rScS.cjs} +1 -1
- package/dist/{index-BJi_ECqJ.cjs → index-BJT2Fp0F.cjs} +1 -1
- package/dist/{index-DrhupII9.js → index-BK5LNaz2.js} +3 -3
- package/dist/{index-BhXpwWAD.cjs → index-BLu4cCOv.cjs} +1 -1
- package/dist/{index-Bjt9Z3fS.cjs → index-BO2NNsQ3.cjs} +1 -1
- package/dist/{index-CU4BTXX-.js → index-BXKDfdBV.js} +8 -8
- package/dist/{index-CbVh7iYe.cjs → index-BgX_ia5H.cjs} +1 -1
- package/dist/{index-CotWSnUo.cjs → index-BhfNBV_Y.cjs} +1 -1
- package/dist/{index-BC4hSmTX.js → index-BibVOdJy.js} +8 -8
- package/dist/{index-z1u39i0Q.js → index-BlEsLLOQ.js} +3 -3
- package/dist/{index-tyS8Rj1b.js → index-BmzN-3ze.js} +5 -5
- package/dist/{index-Dm8EQvZF.cjs → index-Bn3uMi-8.cjs} +1 -1
- package/dist/{index-CzWCAX1b.cjs → index-BsQ8_gbw.cjs} +1 -1
- package/dist/{index-iHoBtKmr.cjs → index-CEoanfoT.cjs} +1 -1
- package/dist/{index-jHcoE1qf.js → index-CV9GhHVQ.js} +13 -13
- package/dist/{index-D6yG43aH.js → index-CVee1Bur.js} +6 -6
- package/dist/{index-Bri22Psu.cjs → index-Cplpn8hS.cjs} +1 -1
- package/dist/{index-DOiC1373.cjs → index-CrE-2oNV.cjs} +1 -1
- package/dist/{index-A71k9Ayg.cjs → index-Cuz54Fkl.cjs} +1 -1
- package/dist/{index-C5sVMpe2.cjs → index-CxutEIsS.cjs} +1 -1
- package/dist/{index-DKitGEDC.js → index-D-gtCink.js} +4 -4
- package/dist/{index-DzDj_Ns3.cjs → index-D8E80dju.cjs} +1 -1
- package/dist/{index-BOb-2bQ6.js → index-D8wJ8OVO.js} +2 -2
- package/dist/{index-5CvXwzwG.cjs → index-DB2epzvg.cjs} +1 -1
- package/dist/{index-BvUkcdeg.js → index-DFX5NE_3.js} +3 -3
- package/dist/{index-CK23RDAu.cjs → index-DGCcBd5v.cjs} +1 -1
- package/dist/{index-CMcDLpN5.js → index-DKk2Yk2F.js} +4 -4
- package/dist/{index-FXurbsHT.js → index-DLSzOar0.js} +4 -4
- package/dist/{index-BYOudw8N.cjs → index-Df6NZqSR.cjs} +1 -1
- package/dist/{index-C-NWHxhY.js → index-Dn4SxfsB.js} +4 -4
- package/dist/{index-DYwU_QaV.cjs → index-DsUHBIBK.cjs} +1 -1
- package/dist/{index-XeUoua9q.js → index-DsYFSymz.js} +4 -4
- package/dist/{index-B0YcRdR9.cjs → index-DyxA9Pwa.cjs} +1 -1
- package/dist/{index-rov_SSH0.js → index-GsF9RQ1o.js} +5 -5
- package/dist/{index-CmXpvujN.js → index-HkaBIp59.js} +1 -1
- package/dist/{index-CWY51WH6.js → index-MFHk1eEx.js} +4 -4
- package/dist/{index-DeMFCnys.js → index-S1z7XnLi.js} +3 -3
- package/dist/{index-Bkm9CeI0.js → index-V9vs-ScR.js} +1 -1
- package/dist/{index-BIRuU8z8.js → index-Y9kXXuBJ.js} +4 -4
- package/dist/{index-Cnd5Q6NW.js → index-Z04SVHEk.js} +1 -1
- package/dist/{index-CJ_rdkr8.js → index-hBF27unU.js} +7021 -7051
- package/dist/{index-DtRndrC8.cjs → index-hNt29cU7.cjs} +1 -1
- package/dist/{index-DTZhFQHd.cjs → index-rTgVjPGa.cjs} +1 -1
- package/dist/{index-85WaQkGF.cjs → index-uYHnI5wK.cjs} +1 -1
- package/dist/{index-l52VRsV3.cjs → index-v95HBZGa.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-B7vWHeIj.cjs → index.vue_vue_type_script_setup_true_lang-CeNJa0E4.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-DRLcD2rZ.js → index.vue_vue_type_script_setup_true_lang-DBVpFaiR.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CixHWeC-.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CJBQxdRk.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtG0TYo3.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dz4Fg0J1.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-ASSo2Hye.cjs → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-Biklcd9I.cjs} +9 -9
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-C6BRqqE9.js → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-C5-XfA7-.js} +2090 -2084
- package/dist/{index.vue_vue_type_style_index_0_scoped_9a453346_lang-BYz6fW8p.cjs → index.vue_vue_type_style_index_0_scoped_9a453346_lang-C1BOdGun.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_9a453346_lang-kDCmh28Z.js → index.vue_vue_type_style_index_0_scoped_9a453346_lang-DgHSOxfw.js} +8 -8
- package/dist/{login-afGmER0u.js → login-B63LEngH.js} +1 -1
- package/dist/{login-BBvcYktp.cjs → login-Db7lD3cs.cjs} +1 -1
- package/dist/{main-D8boH0D-.cjs → main-B_yFDeIi.cjs} +1 -1
- package/dist/{main-aE5taVmN.js → main-DjbrOkYk.js} +5 -5
- package/dist/{menu-DYsWoy6Z.cjs → menu-1olc0mrV.cjs} +9 -9
- package/dist/{menu-Qw1eGtzq.js → menu-BxkEScwt.js} +201 -199
- package/dist/{modelComp-y7HaQuVQ.js → modelComp-Bj7Q1JDt.js} +1 -1
- package/dist/{modelComp-8s0tWZDU.cjs → modelComp-C5jCD_od.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-CFZVlfLq.cjs → threeModel-BFW_sW2p.cjs} +1 -1
- package/dist/{threeModel-osVTVLWn.js → threeModel-CGO5VFhW.js} +142 -142
- package/package.json +1 -1
- package/dist/index-RFCzxTjm.cjs +0 -87
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),t=require("./menu-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),t=require("./menu-1olc0mrV.cjs"),_=require("./index-Cplpn8hS.cjs"),r=require("./index-Bn3uMi-8.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g={class:"menu-content"},v=l.defineComponent({__name:"index",setup(h){const d=t.useMenuState(t.pinia),{menus:c}=t.storeToRefs(d),p=l.ref([]),f=async()=>{var o,n,u,a;const e=await t.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey")}});if(((o=e==null?void 0:e.data)==null?void 0:o.type)==="success"){let i=(u=(n=e==null?void 0:e.data)==null?void 0:n.result)==null?void 0:u.map(s=>s);return i=(a=t.cloneDeep(i))==null?void 0:a.map(s=>{var m;const b=Object.values((m=s==null?void 0:s.value)==null?void 0:m.tableData);return b.unshift({id:s==null?void 0:s.id}),b}),i}else return[]};l.onMounted(async()=>{var u;const e=await f(),n=[{key:"header",contents:[{label:"主菜单名称",formType:"Select",options:(u=t.cloneDeep(c.value))==null?void 0:u.map(a=>({label:a==null?void 0:a.title,value:a==null?void 0:a.title})),prop:"主菜单名称"},{label:"隐藏三维显示",formType:"Switch",value:!1,prop:"隐藏三维显示"},{label:"操作"}]},{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}];n.push({key:"tableContents",contents:e}),p.value=n});const y=e=>{(e==null?void 0:e.buttonName)==="新增"?r.addMenuContent(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="删除"?r.deleteMenuContent(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="编辑"&&r.fixMenuContent(e==null?void 0:e.singleContent)};return(e,o)=>(l.openBlock(),l.createElementBlock("div",g,[l.createVNode(_.ssTable,{itemData:p.value,class:"table-content",onChange:y},null,8,["itemData"])]))}}),x=C._export_sfc(v,[["__scopeId","data-v-26f5cadc"]]);exports.default=x;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { resolveComponent as D, createBlock as K, openBlock as f, withCtx as s, createVNode as n, createElementVNode as B, toDisplayString as ue, ref as y, onMounted as At, watch as Y, createElementBlock as P, Fragment as Ae, renderList as ze, createCommentVNode as X, normalizeStyle as xt, defineComponent as st, computed as Ve, resolveDirective as it, withDirectives as Be, unref as l, createTextVNode as te, renderSlot as Fe, vShow as je, resolveDynamicComponent as rt } from "vue";
|
|
2
|
-
import { m as Ge, a as Xe, b as qe } from "./index-
|
|
3
|
-
import ut from "./index-
|
|
4
|
-
import { _ as Mt, o as ct, c as dt, a as pt, b as $t, d as mt, s as re, g as ht, e as ft, f as gt, h as yt, i as Pt, j as Vt } from "./index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-
|
|
2
|
+
import { m as Ge, a as Xe, b as qe } from "./index-CVee1Bur.js";
|
|
3
|
+
import ut from "./index-B1cMw_e2.js";
|
|
4
|
+
import { _ as Mt, o as ct, c as dt, a as pt, b as $t, d as mt, s as re, g as ht, e as ft, f as gt, h as yt, i as Pt, j as Vt } from "./index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-C5-XfA7-.js";
|
|
5
5
|
import { _ as Te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import { p as ne, s as oe, u as Ne, e as _t, c as Se, g as Oe, f as wt, d as fe } from "./menu-
|
|
7
|
-
import { u as Ct } from "./login-
|
|
6
|
+
import { p as ne, s as oe, u as Ne, e as _t, c as Se, g as Oe, f as wt, d as fe } from "./menu-BxkEScwt.js";
|
|
7
|
+
import { u as Ct } from "./login-B63LEngH.js";
|
|
8
8
|
import { S as be } from "./index-BHtNKL1L.js";
|
|
9
|
-
import { u as Ee } from "./modelComp-
|
|
10
|
-
import { _ as vt, a as De, d as nt, s as jt } from "./index-
|
|
11
|
-
import { u as He, a as It, g as Ie, b as kt, l as Bt } from "./index-
|
|
12
|
-
import { _ as bt } from "./index.vue_vue_type_script_setup_true_lang-
|
|
13
|
-
import lt from "./threeModel-
|
|
14
|
-
import { u as Nt } from "./index-
|
|
9
|
+
import { u as Ee } from "./modelComp-Bj7Q1JDt.js";
|
|
10
|
+
import { _ as vt, a as De, d as nt, s as jt } from "./index-DFX5NE_3.js";
|
|
11
|
+
import { u as He, a as It, g as Ie, b as kt, l as Bt } from "./index-Y9kXXuBJ.js";
|
|
12
|
+
import { _ as bt } from "./index.vue_vue_type_script_setup_true_lang-DBVpFaiR.js";
|
|
13
|
+
import lt from "./threeModel-CGO5VFhW.js";
|
|
14
|
+
import { u as Nt } from "./index-BXKDfdBV.js";
|
|
15
15
|
import "vue-router";
|
|
16
|
-
import { a as Et } from "./array-
|
|
17
|
-
import { c as Ut, b as Lt } from "./index.vue_vue_type_style_index_0_scoped_9a453346_lang-
|
|
16
|
+
import { a as Et } from "./array-CaisX3_y.js";
|
|
17
|
+
import { c as Ut, b as Lt } from "./index.vue_vue_type_style_index_0_scoped_9a453346_lang-DgHSOxfw.js";
|
|
18
18
|
const Kt = { class: "horizontal-f-18" };
|
|
19
19
|
function Ot(A, le, o, T, N, Z) {
|
|
20
20
|
const u = D("svg-icon"), ee = D("ssMenu");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { resolveComponent as L, createElementBlock as _, openBlock as r, Fragment as j, renderList as q, unref as W, createElementVNode as C, createVNode as D, toDisplayString as E, ref as I, watch as A, withCtx as z, createBlock as G, resolveDynamicComponent as H, createCommentVNode as y, normalizeStyle as X, withModifiers as w } from "vue";
|
|
2
|
-
import { s as Y, g as J } from "./index-
|
|
3
|
-
import { p as B, s as V, c as v, E as Z } from "./menu-
|
|
4
|
-
import { u as S } from "./modelComp-
|
|
5
|
-
import "./array-
|
|
2
|
+
import { s as Y, g as J } from "./index-BXKDfdBV.js";
|
|
3
|
+
import { p as B, s as V, c as v, E as Z } from "./menu-BxkEScwt.js";
|
|
4
|
+
import { u as S } from "./modelComp-Bj7Q1JDt.js";
|
|
5
|
+
import "./array-CaisX3_y.js";
|
|
6
6
|
import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
import ee from "./index-CZtXRS3l.js";
|
|
8
|
-
import { b as te } from "./index-
|
|
9
|
-
import { E as ne } from "./index-
|
|
8
|
+
import { b as te } from "./index-DFX5NE_3.js";
|
|
9
|
+
import { E as ne } from "./index-HkaBIp59.js";
|
|
10
10
|
const oe = { class: "type-select" }, se = ["onClick"], ae = { class: "list-icon" }, le = {
|
|
11
11
|
__name: "index",
|
|
12
12
|
setup(M) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const K=require("vue"),he=require("./menu-
|
|
1
|
+
"use strict";const K=require("vue"),he=require("./menu-1olc0mrV.cjs"),kn=require("./index-Cuz54Fkl.cjs"),nu=require("./modelComp-C5jCD_od.cjs"),Cn=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dz4Fg0J1.cjs"),El=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");var ld="__lodash_hash_undefined__";function cd(r){return this.__data__.set(r,ld),this}function hd(r){return this.__data__.has(r)}function ns(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new he.MapCache;++e<t;)this.add(r[e])}ns.prototype.add=ns.prototype.push=cd;ns.prototype.has=hd;function ud(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}function iu(r,e){return r.has(e)}var dd=1,fd=2;function ru(r,e,t,n,i,s){var a=t&dd,o=r.length,l=e.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(r),h=s.get(e);if(c&&h)return c==e&&h==r;var d=-1,u=!0,f=t&fd?new ns:void 0;for(s.set(r,e),s.set(e,r);++d<o;){var m=r[d],_=e[d];if(n)var g=a?n(_,m,d,e,r,s):n(m,_,d,r,e,s);if(g!==void 0){if(g)continue;u=!1;break}if(f){if(!ud(e,function(p,A){if(!iu(f,A)&&(m===p||i(m,p,t,n,s)))return f.push(A)})){u=!1;break}}else if(!(m===_||i(m,_,t,n,s))){u=!1;break}}return s.delete(r),s.delete(e),u}function pd(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}function su(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var md=1,gd=2,_d="[object Boolean]",vd="[object Date]",yd="[object Error]",xd="[object Map]",Md="[object Number]",bd="[object RegExp]",Sd="[object Set]",Ed="[object String]",Ad="[object Symbol]",wd="[object ArrayBuffer]",Td="[object DataView]",ec=he.Symbol?he.Symbol.prototype:void 0,La=ec?ec.valueOf:void 0;function Cd(r,e,t,n,i,s,a){switch(t){case Td:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case wd:return!(r.byteLength!=e.byteLength||!s(new he.Uint8Array(r),new he.Uint8Array(e)));case _d:case vd:case Md:return he.eq(+r,+e);case yd:return r.name==e.name&&r.message==e.message;case bd:case Ed:return r==e+"";case xd:var o=pd;case Sd:var l=n&md;if(o||(o=su),r.size!=e.size&&!l)return!1;var c=a.get(r);if(c)return c==e;n|=gd,a.set(r,e);var h=ru(o(r),o(e),n,i,s,a);return a.delete(r),h;case Ad:if(La)return La.call(r)==La.call(e)}return!1}var Rd=1,Dd=Object.prototype,Pd=Dd.hasOwnProperty;function Ld(r,e,t,n,i,s){var a=t&Rd,o=he.getAllKeys(r),l=o.length,c=he.getAllKeys(e),h=c.length;if(l!=h&&!a)return!1;for(var d=l;d--;){var u=o[d];if(!(a?u in e:Pd.call(e,u)))return!1}var f=s.get(r),m=s.get(e);if(f&&m)return f==e&&m==r;var _=!0;s.set(r,e),s.set(e,r);for(var g=a;++d<l;){u=o[d];var p=r[u],A=e[u];if(n)var E=a?n(A,p,u,e,r,s):n(p,A,u,r,e,s);if(!(E===void 0?p===A||i(p,A,t,n,s):E)){_=!1;break}g||(g=u=="constructor")}if(_&&!g){var v=r.constructor,N=e.constructor;v!=N&&"constructor"in r&&"constructor"in e&&!(typeof v=="function"&&v instanceof v&&typeof N=="function"&&N instanceof N)&&(_=!1)}return s.delete(r),s.delete(e),_}var Id=1,tc="[object Arguments]",nc="[object Array]",ms="[object Object]",Nd=Object.prototype,ic=Nd.hasOwnProperty;function Ud(r,e,t,n,i,s){var a=he.isArray(r),o=he.isArray(e),l=a?nc:he.getTag(r),c=o?nc:he.getTag(e);l=l==tc?ms:l,c=c==tc?ms:c;var h=l==ms,d=c==ms,u=l==c;if(u&&he.isBuffer(r)){if(!he.isBuffer(e))return!1;a=!0,h=!1}if(u&&!h)return s||(s=new he.Stack),a||he.isTypedArray(r)?ru(r,e,t,n,i,s):Cd(r,e,l,t,n,i,s);if(!(t&Id)){var f=h&&ic.call(r,"__wrapped__"),m=d&&ic.call(e,"__wrapped__");if(f||m){var _=f?r.value():r,g=m?e.value():e;return s||(s=new he.Stack),i(_,g,t,n,s)}}return u?(s||(s=new he.Stack),Ld(r,e,t,n,i,s)):!1}function Al(r,e,t,n,i){return r===e?!0:r==null||e==null||!he.isObjectLike(r)&&!he.isObjectLike(e)?r!==r&&e!==e:Ud(r,e,t,n,Al,i)}function au(r,e){return Al(r,e)}const Fd={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:Number,default:200}},setup(r){const e=r,t=K.ref(null),n=K.ref(!1),i=K.ref(null);return K.watch(()=>e==null?void 0:e.isVisible,()=>{n.value=e==null?void 0:e.isVisible},{deep:!0,immediate:!0}),K.watch(()=>i.value,()=>{K.nextTick(()=>{var s,a;(a=(s=t.value)==null?void 0:s.updatePopper)==null||a.call(s)})},{deep:!0,immediate:!0}),(s,a)=>{const o=K.resolveComponent("el-popover");return K.openBlock(),K.createBlock(o,{visible:n.value,placement:"bottom",title:e==null?void 0:e.title,width:e==null?void 0:e.width,ref_key:"popOverRef",ref:t},{reference:K.withCtx(()=>[K.createElementVNode("div",null,[K.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:i})])]),default:K.withCtx(()=>[K.createElementVNode("div",null,[K.renderSlot(s.$slots,"content")])]),_:3},8,["visible","title","width"])}}},Od={class:"extra-button-content"},zd={class:"table-operator-wrap"},Bd={key:0,class:"extra-header"},kd=["onClick"],Vd={class:"extra-button-filter"},Hd={class:"form-content-value"},Gd={__name:"header",props:{compName:{type:String,default:"表格名称",required:!1},buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter"],setup(r,{emit:e}){const t=e,n=r,i=K.ref(!1),s=K.ref([]),a=K.ref([{label:"取消"},{label:"确认"}]),o=h=>{t("buttonClick",h)},l=h=>{var d,u;s.value=(u=(d=Cn.getColumnChild(he.cloneDeep(h)))==null?void 0:d.filter(f=>(f==null?void 0:f.label)!==""&&(f==null?void 0:f.label)!=="操作"))==null?void 0:u.map(f=>({label:(f==null?void 0:f.label)??"",value:"",name:(f==null?void 0:f.label)??"",isFormColHidden:f==null?void 0:f.isTableColHidden}))},c=h=>{(h==null?void 0:h.buttonName)==="确认"&&t("filter",h==null?void 0:h.content),i.value=!1};return K.onMounted(()=>{l(n.columns)}),K.watch(()=>n.columns,()=>{l(n.columns)},{deep:!0,immediate:!0}),(h,d)=>{var f;const u=K.resolveComponent("el-tooltip");return K.openBlock(),K.createElementBlock("div",Od,[K.createElementVNode("div",{class:K.normalizeClass(r.compName?"table-name-wrap":"")},K.toDisplayString(r.compName),3),K.createElementVNode("div",zd,[n!=null&&n.buttons&&((f=n==null?void 0:n.buttons)==null?void 0:f.length)>0?(K.openBlock(),K.createElementBlock("div",Bd,[(K.openBlock(!0),K.createElementBlock(K.Fragment,null,K.renderList(n==null?void 0:n.buttons,(m,_)=>(K.openBlock(),K.createElementBlock("div",{class:"extra-contents",key:_},[K.createElementVNode("div",{class:"extra-content",style:K.normalizeStyle({background:(m==null?void 0:m.background)??"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}),onClick:g=>o(m==null?void 0:m.label)},K.toDisplayString(m==null?void 0:m.label),13,kd)]))),128))])):K.createCommentVNode("",!0),K.createElementVNode("div",Vd,[K.createVNode(Fd,{title:"筛选数据",width:500,isVisible:i.value},{reference:K.withCtx(()=>[K.createVNode(u,{content:"筛选",placement:"top-start"},{default:K.withCtx(()=>[K.createElementVNode("div",{class:"button-style",onClick:d[0]||(d[0]=m=>i.value=!i.value)},[K.createVNode(K.unref(he.filter_default),{color:"var(--ssComponent-black)"})])]),_:1})]),content:K.withCtx(()=>[K.createElementVNode("div",Hd,[(K.openBlock(),K.createBlock(kn.ssForm,{rowContents:s.value,buttonValue:a.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:a.value,isStartJustify:!1,onOnButtonClick:c},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])])])])}}},Wd=El._export_sfc(Gd,[["__scopeId","data-v-74058ccc"]]);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2010-2025 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("vue"),l=require("./menu-DYsWoy6Z.cjs"),Y=require("./login-BBvcYktp.cjs"),ge=require("./modelComp-8s0tWZDU.cjs"),S=require("./crypto-CRbcEKIz.cjs"),pe=require("./index-l52VRsV3.cjs"),O=l.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),de=l.useMenuState(l.pinia),{activeMenuPath:v}=l.storeToRefs(de),Z=Y.useLoginState(l.pinia),{structureData:ve}=l.storeToRefs(Z),be=O(l.pinia),{routerPageStructures:Ae}=l.storeToRefs(be),m=ge.useModelComp(l.pinia),ke=u.ref([{label:"角色名称",value:"",name:"roleName"}]),Se=u.ref([{label:"查询"},{label:"重置"}]),X=u.reactive({isFilter:!1,filterForm:{}}),Be=u.ref(!1),Te=e=>{console.log("handleQueryChange",e),X.isFilter=!0,X.filterForm=e},j=u.ref([]),F=u.ref([]),ee=u.ref(""),Ce=u.computed(()=>{var n,s,t,r,a;const e=(n=Ae.value)==null?void 0:n.find(c=>{var o;return((o=c==null?void 0:c.comp)==null?void 0:o.toUpperCase())==="TABLE"});if(e){ee.value=e.name,F.value=(r=(t=(s=e==null?void 0:e.compData)==null?void 0:s.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:t.contents)==null?void 0:r.filter(o=>(o==null?void 0:o.label)!=="操作");const c=(a=e==null?void 0:e.compData)==null?void 0:a.map(o=>{if((o==null?void 0:o.key)==="rowButton"){let h=[];return D.value?h=[...o==null?void 0:o.contents,{label:"授权"}]:h=o==null?void 0:o.contents,{...o,contents:h}}return o});return ae(c),c}return[]}),De=e=>{Q(e.singleContent,e.buttonName,P.value)},b=u.ref({}),te=u.ref(),B=async(e,n,s)=>{var t,r;try{const a=await e(n);return((t=a==null?void 0:a.data)==null?void 0:t.code)===200?(s!=="查询"&&await Z.setLogRecordAsync({type:s,data:n},v.value),a.data.result||((r=a==null?void 0:a.data)==null?void 0:r.code)===200):null}catch(a){l.ElMessage.error(a)}},se=(e,n)=>{n==null||n.forEach(s=>{e==null||e.forEach(t=>{var r;t.path==s.path&&(t.checkedButtons=s.checkedButtons),t.children&&((r=t.children)==null?void 0:r.length)>0&&se(t.children,n)})})},ne=e=>e==null?void 0:e.map(n=>{var t;const s={...n,checkedButtons:[]};return s.children&&((t=s.children)==null?void 0:t.length)>0&&(s.children=ne(s.children)),s}),L=e=>{for(const n in e)if(Array.isArray(e[n]))return n;return""},re=e=>{const n=[];let s=0;for(;s<e.length;)if(typeof e[s]=="string"){const t={title:e[s]};s+1<e.length&&Array.isArray(e[s+1])?(t.children=re(e[s+1]),s+=2):s+=1,n.push(t)}return n},q=e=>{const n=[];let s=0;for(;s<(e==null?void 0:e.length);){const t={title:e==null?void 0:e[s]};s+1<(e==null?void 0:e.length)&&Array.isArray(e==null?void 0:e[s+1])?(t.children=re(e==null?void 0:e[s+1]),s+=2):s+=1,n.push(t)}return n},$=(e,n="")=>e==null?void 0:e.map(s=>{const t=n?`${n}/${s.title}`:s.title,r={...s,path:t};return s.children&&s.children.length>0&&(r.children=$(s.children,t)),r}),_=(e,n)=>e.reduce((s,t)=>{const r=t[n];return s[r]||(s[r]=[]),s[r].push(t),s},{}),U=e=>{const n=[];function s(r){!r.children||r.children.length===0?n.push(r):r.children.forEach(a=>s(a))}return e.forEach(r=>s(r)),n==null?void 0:n.map(r=>{var a,c,o;return{...r,parentPath:(o=(c=(a=r.path)==null?void 0:a.split("/"))==null?void 0:c.slice(0,-1))==null?void 0:o.join("/")}})},V=e=>Object.entries(e).map(([s,t])=>({path:s,checkedButtons:t==null?void 0:t.map(r=>r==null?void 0:r.path)})),Pe=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,Me=e=>{const n={},s=Array.isArray(e)?e==null?void 0:e.filter(t=>{var r;return!(Pe(t)&&((r=Object.keys(t))!=null&&r.includes("id")))}):null;return s&&(s==null||s.forEach((t,r)=>{if(r<=0)return;const a=`a${r}`;n[a]=t})),n},d=u.ref(""),ae=e=>{var r;const n=e==null?void 0:e.find(a=>(a==null?void 0:a.key)==="tableContents");if(!n)return"";const s=(r=n==null?void 0:n.contents)==null?void 0:r[0],t=Me(s);d.value=L(t)},Re=e=>{if(!Array.isArray(e))return!1;for(let n of e){if(typeof n!="object"||n===null||typeof n.path!="string"||!Array.isArray(n.checkedButtons))return!1;for(let s of n.checkedButtons)if(typeof s!="string")return!1}return!0},we=e=>{const n=[];for(const s in e)e[s].forEach(r=>{var h,i;const a=(h=r.path)!=null&&h.startsWith("/")?(i=r.path)==null?void 0:i.substring(1):r.path,c=a==null?void 0:a.split("/");let o=n;c.forEach(y=>{let g=o.find(w=>w.title===y);g||(g={title:y,path:r.path,children:[]},o.push(g)),o=g.children})});return n},Ke=e=>{const n={};return e.forEach(s=>{const{path:t,checkedButtons:r}=s,a=t,c=r.map(o=>({title:o.split("/").pop()||"",path:o,parentPath:a}));n[a]=c}),n},oe=e=>{let n=[];for(const s of e){let t=[s.title];if(s.children&&Array.isArray(s.children)){let r=oe(s.children);r.length>0&&t.push(r)}n.push(t)}return n},Ie=e=>{const n=[];for(const s of e){if(!Array.isArray(s)||s.length!==2)continue;const[t,r]=s,a=ce(r),c=n.indexOf(t);c===-1?n.push(t,a):n[c+1]=le(n[c+1],a)}return n},ce=e=>{const n=[];for(const s of e)if(Array.isArray(s)){if(s.length===1&&typeof s[0]=="string")n.push(s[0]);else if(s.length===2&&typeof s[0]=="string"){const[t,r]=s;n.push(t,ce(r))}}return n},le=(e,n)=>{const s=[...e];let t=0;for(;t<n.length;){const r=n[t];if(typeof r=="string"){const a=s.indexOf(r);a===-1?s.push(r,n[t+1]):s[a+1]=le(s[a+1],n[t+1]),t+=2}else s.push(r),t+=1}return s},$e=async(e,n)=>{if(b.value=l.cloneDeep(n),m.setRefreshCurStructure(!1),e==="授权"){console.log("clickRowButton0",d.value),console.log("clickRowButton1",b.value[d.value]);const s=Re(b.value[d.value]);console.log("clickRowButton4",s);let t;if(s)t=b.value[d.value];else{const r=q(b.value[d.value]),a=$(r),c=U(a),o=_(c,"parentPath");t=V(o)}console.log("clickRowButton5",t),await u.nextTick(),A.title=`【${n.a0}】授权`,A.show=!0,t&&Array.isArray(t)&&se(M.value,t)}},Ee=()=>{A.show=!1},T=u.ref(),Fe=async e=>{const n=await B(l.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),s=n==null?void 0:n.map(t=>{var r;return{id:t.id,tableData:(r=t==null?void 0:t.value)==null?void 0:r.tableData}});return s==null?void 0:s.map(t=>{var r;if(Array.isArray(t==null?void 0:t.tableData)){let a={id:t.id};return(r=t==null?void 0:t.tableData)==null||r.forEach((c,o)=>{a[`a${o}`]=c}),a}else return{...t.tableData,id:t.id}})},W=(e,n)=>{let s={};return n==null||n.forEach((t,r)=>{t.label&&e&&(s[t.label]=(e==null?void 0:e[`a${r}`])??null)}),s},Q=(e,n,s)=>{var a,c,o,h;const t=l.cloneDeep(e);t!=null&&t.id&&delete t.id;const r=W(t,F.value);console.log("submitTableAsyncByVerify",r,t,F.value,d.value),n==="新增"?B(l.createInsofDataApi,{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(a=v.value)!=null&&a.startsWith("/")?(c=v.value)==null?void 0:c.substring(1):v.value,tableId:s},value:{tableData:r}},n).then(i=>{T.value={...e,newId:i},n&&i&&l.ElMessage.success(n+"成功")}):n==="编辑"?(console.log("编辑角色",r),B(l.updateInsofDataApi,{id:e.id,key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(o=v.value)!=null&&o.startsWith("/")?(h=v.value)==null?void 0:h.substring(1):v.value,tableId:s},value:{tableData:r}},n).then(i=>{n&&i&&l.ElMessage.success(n+"成功"),A.show=!1})):n==="删除"&&B(l.deleteInsofDataApi,{id:e.id},n).then(i=>{n&&i&&l.ElMessage.success(n+"成功")}),m.setRefreshCurStructure(!0)},ue=e=>{let n=[];return e==null||e.forEach(s=>{var t;if(s.checkedButtons&&((t=s.checkedButtons)==null?void 0:t.length)>0){const r={path:s.path,checkedButtons:s.checkedButtons};n=n.concat(r)}s.children&&(n=n.concat(ue(s.children)))}),n},xe=()=>{const e=ue(M.value),n=Ke(e),s=we(n),t=oe(s),r=Ie(t);console.log("renderFormat",r),T.value={...b.value,[d.value]:r},u.nextTick(()=>{console.log("clickSubmitAuthority",T.value,j.value,P.value),Q(T.value,"编辑",P.value)})},A=u.reactive({show:!1,title:"角色授权",width:"35%",draggable:!0}),Ne=({isPenultimate:e},n)=>{var s,t;return console.log("isPenultimate",e,n),((t=(s=n==null?void 0:n.data)==null?void 0:s.renderButtons)==null?void 0:t.length)>0?"is-penultimate":""},P=u.ref(0),he=async e=>{var t,r,a,c,o;let n;const s=await l.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:e!=null&&e.startsWith("/")?e==null?void 0:e.substring(1):e}});return((t=s==null?void 0:s.data)==null?void 0:t.code)===200&&(r=s==null?void 0:s.data)!=null&&r.result&&((a=s==null?void 0:s.data)==null?void 0:a.result.length)>0&&(n=(o=(c=s==null?void 0:s.data.result)==null?void 0:c[0])==null?void 0:o.id,P.value=n),n},M=u.ref([]),Oe=u.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),je=(e,n)=>{var s;e.checkedButtons=n?(s=e.renderButtons)==null?void 0:s.map(t=>t.path):[],console.log("handleNodeCheckChange",e,n)},C=u.ref([]),Le=(e,n)=>{var s,t,r;n.checkedButtons=e,((s=n.checkedButtons)==null?void 0:s.length)===((t=n.renderButtons)==null?void 0:t.length)?C.value.push(n.path):(e==null?void 0:e.length)===0&&(C.value=(r=C.value)==null?void 0:r.filter(a=>a!==n.path))};u.watch(()=>C.value.length,()=>{var e;(e=te.value)==null||e.setCheckedKeys([...C.value])});u.watch(()=>A.show,e=>{e||(M.value=ne(M.value))});const x=u.computed(()=>{var s;const e=(s=l.cloneDeep(ve.value))==null?void 0:s.filter(t=>{var r,a;return((a=(r=t==null?void 0:t.key)==null?void 0:r.pageKey)==null?void 0:a.toUpperCase())!=="MENU"});return[...e==null?void 0:e.map(t=>{var c,o,h,i;const r=/button/i;let a=(h=(o=(c=t==null?void 0:t.value)==null?void 0:c.pageData)==null?void 0:o.compData)==null?void 0:h.filter(y=>r.test(y==null?void 0:y.key));return a=Array.from(new Set(a==null?void 0:a.flatMap(y=>y.contents.map(g=>g.label)))),{path:(i=t==null?void 0:t.key)==null?void 0:i.pageKey,buttons:a}}),...z.value]}),z=u.ref([]),qe=e=>{const s=[e==null?void 0:e.find(t=>(t==null?void 0:t.title)==="系统管理")].flatMap(t=>t==null?void 0:t.childMenus);return s==null?void 0:s.map(t=>({path:t==null?void 0:t.path,buttons:(t==null?void 0:t.path)==="系统管理/个人中心"?["基本信息","上传头像","签名","修改密码"]:["新增","查看","编辑","删除"]}))},N=(e,n)=>{if(Array.isArray(e))return z.value=qe(e),e==null?void 0:e.map(s=>{var r,a;const t=n==null?void 0:n.find(c=>(c==null?void 0:c.path)===(s==null?void 0:s.path));return s.childMenus&&s.childMenus.length>0?{...s,renderButtons:s.carryData?(r=t==null?void 0:t.buttons)==null?void 0:r.map(c=>({title:c,path:s.path+"/"+c})):[],checkedButtons:[],children:N(s.childMenus,x.value),childMenus:N(s.childMenus,x.value)}:{...s,renderButtons:s.carryData?(a=t==null?void 0:t.buttons)==null?void 0:a.map(c=>({title:c,path:s.path+"/"+c})):[],checkedButtons:[]}})},_e={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:j.value,name:""}]}]},Ue=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:N,addPathToTree:$,authorizeDialog:A,buttonValue:Se,changedRow:T,clickRow:b,clickRowButton:$e,clickSubmitAuthority:xe,closeAuthorizeDialog:Ee,compName:ee,convertArrayToTree:q,convertIndexToLabel:W,customNodeClass:Ne,getActivePageStructureId:he,getAuthorityKey:ae,getFirstArrayProperty:L,getLeafNodesRecursive:U,getPageDataAsync:Fe,groupByField:_,handleItemDataChange:De,handleNodeBtnChange:Le,handleNodeCheckChange:je,handleQueryChange:Te,handleRowAuthorityRender:V,handleSubmitAsync:B,isPageDataExist:Be,menuData:M,menusButtons:Oe,pageData:j,pageDataFiltered:Ce,queryFormData:ke,structureButtons:x,structureId:P,submitTableAsyncByVerify:Q,tempRolePageData:_e,tempSysMenus:z,treeRef:te},Symbol.toStringTag,{value:"Module"})),ie=Y.useLoginState(l.pinia),{superAdminInfo:Ve,cryptoInfo:f}=l.storeToRefs(ie),We=l.useMenuState(l.pinia),{activeMenuPath:p}=l.storeToRefs(We),R="123456",Qe=O(l.pinia),{routerPageStructures:ze}=l.storeToRefs(Qe),G=u.ref(0),Ge=u.ref([{label:"用户名称",value:"",name:"userName"}]),D=u.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),Je=e=>{console.log("handleQueryChange",e)},J=u.ref([]),fe=u.ref(""),K=u.computed(()=>{var n,s,t,r,a;const e=(n=ze.value)==null?void 0:n.find(c=>{var o;return((o=c==null?void 0:c.comp)==null?void 0:o.toUpperCase())==="TABLE"});if(e){fe.value=e.name,J.value=(r=(t=(s=e==null?void 0:e.compData)==null?void 0:s.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:t.contents)==null?void 0:r.filter(o=>(o==null?void 0:o.label)!=="操作");const c=(a=e==null?void 0:e.compData)==null?void 0:a.map(o=>{if((o==null?void 0:o.key)==="rowButton"){const h=[...o==null?void 0:o.contents,{label:"重置密码"}];return{...o,contents:h}}return o});return console.log(245,c),c}return[]}),He=e=>{E(e.singleContent,e.buttonName,G.value)},I=u.ref(),Xe=e=>{console.log("onDoubleClick",e)},Ye=(e,n)=>{e==="重置密码"&&pe.ElMessageBox.confirm(`该操作将会重置【${n==null?void 0:n.account}】的密码,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{I.value={...n,password:R},E(I.value,e,G.value)}).catch(()=>{l.ElMessage.info("取消重置")})},ye=()=>{H(p.value).then(e=>{var s;const n=Array.isArray(e)&&(e==null?void 0:e.filter(t=>(t==null?void 0:t.account)!==Ve.value.account));K.value=(s=K.value)==null?void 0:s.map(t=>t.key==="tableContents"?{...t,contents:n==null?void 0:n.map(r=>{var a;return{...r,password:S.decryptData(r==null?void 0:r.password,(a=f==null?void 0:f.value)==null?void 0:a.privateKey)}})}:t)})},k=async(e,n,s)=>{var t,r;try{const a=await e(n);return((t=a==null?void 0:a.data)==null?void 0:t.code)===200?(s!=="查询"&&await ie.setLogRecordAsync({type:s,data:n},p.value),a.data.result||((r=a==null?void 0:a.data)==null?void 0:r.code)===200):null}catch(a){l.ElMessage.error(a)}},E=(e,n,s)=>{var a,c,o,h,i,y;const t=l.cloneDeep(e);t!=null&&t.id&&delete t.id;const r=W(t,J.value);S.isEncryptAvailable()&&r&&(!r.password&&D.value?r.password=S.encryptData(R,(a=f==null?void 0:f.value)==null?void 0:a.publicKey):r.password&&D.value&&(r.password=S.encryptData(r==null?void 0:r.password,(c=f==null?void 0:f.value)==null?void 0:c.publicKey))),n==="新增"?k(l.createInsofDataApi,{key:{type:"data",layer:r==null?void 0:r.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(o=p.value)!=null&&o.startsWith("/")?(h=p.value)==null?void 0:h.substring(1):p.value,tableId:s},value:{tableData:r}},n).then(g=>{var w;I.value={...e,newId:g,password:D.value?S.decryptData((e==null?void 0:e.password)??R,(w=f==null?void 0:f.value)==null?void 0:w.privateKey):e==null?void 0:e.password},n&&g&&l.ElMessage.success(n+"成功")}):n==="编辑"||n==="重置密码"?k(l.updateInsofDataApi,{id:e.id,key:{type:"data",layer:r==null?void 0:r.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(i=p.value)!=null&&i.startsWith("/")?(y=p.value)==null?void 0:y.substring(1):p.value,tableId:s},value:{tableData:r}},n).then(()=>{n==="重置密码"&&ye(),n&&l.ElMessage.success(n+"成功"),A.show=!1}):n==="删除"&&k(l.deleteInsofDataApi,{id:e.id},n).then(()=>{n&&l.ElMessage.success(n+"成功")})},H=async e=>{const n=await k(l.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),s=n==null?void 0:n.map(t=>{var r,a;return{id:t.id,layer:(r=t.key)==null?void 0:r.layer,tableData:(a=t==null?void 0:t.value)==null?void 0:a.tableData}});return s==null?void 0:s.map(t=>{var r;if(!Array.isArray(t==null?void 0:t.tableData))return{...t.tableData,layer:(r=t.key)==null?void 0:r.layer,id:t.id}})},Ze={comp:"Group",name:"/系统管理/用户管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:K.value,name:""}]}]},me=Object.freeze(Object.defineProperty({__proto__:null,changedRow:I,clickRowButton:Ye,columns:J,compName:fe,getPageDataAsync:H,handleItemDataChange:He,handleQueryChange:Je,handleSubmitAsync:k,loginUserIsSuper:D,onDoubleClick:Xe,pageData:K,queryFormData:Ge,refreshUserTableData:ye,resetPassword:R,structureId:G,submitTableAsyncByVerify:E,tempUserPageData:Ze},Symbol.toStringTag,{value:"Module"}));exports.State=me;exports.State$1=Ue;exports.addPathToTree=$;exports.convertArrayToTree=q;exports.getActivePageStructureId=he;exports.getFirstArrayProperty=L;exports.getLeafNodesRecursive=U;exports.getPageDataAsync=H;exports.groupByField=_;exports.handleRowAuthorityRender=V;exports.handleSubmitAsync=k;exports.resetPassword=R;exports.submitTableAsyncByVerify=E;exports.useAuthorityState=O;
|
|
1
|
+
"use strict";const u=require("vue"),l=require("./menu-1olc0mrV.cjs"),Y=require("./login-Db7lD3cs.cjs"),ge=require("./modelComp-C5jCD_od.cjs"),S=require("./crypto-CRbcEKIz.cjs"),pe=require("./index-v95HBZGa.cjs"),O=l.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),de=l.useMenuState(l.pinia),{activeMenuPath:v}=l.storeToRefs(de),Z=Y.useLoginState(l.pinia),{structureData:ve}=l.storeToRefs(Z),be=O(l.pinia),{routerPageStructures:Ae}=l.storeToRefs(be),m=ge.useModelComp(l.pinia),ke=u.ref([{label:"角色名称",value:"",name:"roleName"}]),Se=u.ref([{label:"查询"},{label:"重置"}]),X=u.reactive({isFilter:!1,filterForm:{}}),Be=u.ref(!1),Te=e=>{console.log("handleQueryChange",e),X.isFilter=!0,X.filterForm=e},j=u.ref([]),F=u.ref([]),ee=u.ref(""),Ce=u.computed(()=>{var n,s,t,r,a;const e=(n=Ae.value)==null?void 0:n.find(c=>{var o;return((o=c==null?void 0:c.comp)==null?void 0:o.toUpperCase())==="TABLE"});if(e){ee.value=e.name,F.value=(r=(t=(s=e==null?void 0:e.compData)==null?void 0:s.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:t.contents)==null?void 0:r.filter(o=>(o==null?void 0:o.label)!=="操作");const c=(a=e==null?void 0:e.compData)==null?void 0:a.map(o=>{if((o==null?void 0:o.key)==="rowButton"){let h=[];return D.value?h=[...o==null?void 0:o.contents,{label:"授权"}]:h=o==null?void 0:o.contents,{...o,contents:h}}return o});return ae(c),c}return[]}),De=e=>{Q(e.singleContent,e.buttonName,P.value)},b=u.ref({}),te=u.ref(),B=async(e,n,s)=>{var t,r;try{const a=await e(n);return((t=a==null?void 0:a.data)==null?void 0:t.code)===200?(s!=="查询"&&await Z.setLogRecordAsync({type:s,data:n},v.value),a.data.result||((r=a==null?void 0:a.data)==null?void 0:r.code)===200):null}catch(a){l.ElMessage.error(a)}},se=(e,n)=>{n==null||n.forEach(s=>{e==null||e.forEach(t=>{var r;t.path==s.path&&(t.checkedButtons=s.checkedButtons),t.children&&((r=t.children)==null?void 0:r.length)>0&&se(t.children,n)})})},ne=e=>e==null?void 0:e.map(n=>{var t;const s={...n,checkedButtons:[]};return s.children&&((t=s.children)==null?void 0:t.length)>0&&(s.children=ne(s.children)),s}),L=e=>{for(const n in e)if(Array.isArray(e[n]))return n;return""},re=e=>{const n=[];let s=0;for(;s<e.length;)if(typeof e[s]=="string"){const t={title:e[s]};s+1<e.length&&Array.isArray(e[s+1])?(t.children=re(e[s+1]),s+=2):s+=1,n.push(t)}return n},q=e=>{const n=[];let s=0;for(;s<(e==null?void 0:e.length);){const t={title:e==null?void 0:e[s]};s+1<(e==null?void 0:e.length)&&Array.isArray(e==null?void 0:e[s+1])?(t.children=re(e==null?void 0:e[s+1]),s+=2):s+=1,n.push(t)}return n},$=(e,n="")=>e==null?void 0:e.map(s=>{const t=n?`${n}/${s.title}`:s.title,r={...s,path:t};return s.children&&s.children.length>0&&(r.children=$(s.children,t)),r}),_=(e,n)=>e.reduce((s,t)=>{const r=t[n];return s[r]||(s[r]=[]),s[r].push(t),s},{}),U=e=>{const n=[];function s(r){!r.children||r.children.length===0?n.push(r):r.children.forEach(a=>s(a))}return e.forEach(r=>s(r)),n==null?void 0:n.map(r=>{var a,c,o;return{...r,parentPath:(o=(c=(a=r.path)==null?void 0:a.split("/"))==null?void 0:c.slice(0,-1))==null?void 0:o.join("/")}})},V=e=>Object.entries(e).map(([s,t])=>({path:s,checkedButtons:t==null?void 0:t.map(r=>r==null?void 0:r.path)})),Pe=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,Me=e=>{const n={},s=Array.isArray(e)?e==null?void 0:e.filter(t=>{var r;return!(Pe(t)&&((r=Object.keys(t))!=null&&r.includes("id")))}):null;return s&&(s==null||s.forEach((t,r)=>{if(r<=0)return;const a=`a${r}`;n[a]=t})),n},d=u.ref(""),ae=e=>{var r;const n=e==null?void 0:e.find(a=>(a==null?void 0:a.key)==="tableContents");if(!n)return"";const s=(r=n==null?void 0:n.contents)==null?void 0:r[0],t=Me(s);d.value=L(t)},Re=e=>{if(!Array.isArray(e))return!1;for(let n of e){if(typeof n!="object"||n===null||typeof n.path!="string"||!Array.isArray(n.checkedButtons))return!1;for(let s of n.checkedButtons)if(typeof s!="string")return!1}return!0},we=e=>{const n=[];for(const s in e)e[s].forEach(r=>{var h,i;const a=(h=r.path)!=null&&h.startsWith("/")?(i=r.path)==null?void 0:i.substring(1):r.path,c=a==null?void 0:a.split("/");let o=n;c.forEach(y=>{let g=o.find(w=>w.title===y);g||(g={title:y,path:r.path,children:[]},o.push(g)),o=g.children})});return n},Ke=e=>{const n={};return e.forEach(s=>{const{path:t,checkedButtons:r}=s,a=t,c=r.map(o=>({title:o.split("/").pop()||"",path:o,parentPath:a}));n[a]=c}),n},oe=e=>{let n=[];for(const s of e){let t=[s.title];if(s.children&&Array.isArray(s.children)){let r=oe(s.children);r.length>0&&t.push(r)}n.push(t)}return n},Ie=e=>{const n=[];for(const s of e){if(!Array.isArray(s)||s.length!==2)continue;const[t,r]=s,a=ce(r),c=n.indexOf(t);c===-1?n.push(t,a):n[c+1]=le(n[c+1],a)}return n},ce=e=>{const n=[];for(const s of e)if(Array.isArray(s)){if(s.length===1&&typeof s[0]=="string")n.push(s[0]);else if(s.length===2&&typeof s[0]=="string"){const[t,r]=s;n.push(t,ce(r))}}return n},le=(e,n)=>{const s=[...e];let t=0;for(;t<n.length;){const r=n[t];if(typeof r=="string"){const a=s.indexOf(r);a===-1?s.push(r,n[t+1]):s[a+1]=le(s[a+1],n[t+1]),t+=2}else s.push(r),t+=1}return s},$e=async(e,n)=>{if(b.value=l.cloneDeep(n),m.setRefreshCurStructure(!1),e==="授权"){console.log("clickRowButton0",d.value),console.log("clickRowButton1",b.value[d.value]);const s=Re(b.value[d.value]);console.log("clickRowButton4",s);let t;if(s)t=b.value[d.value];else{const r=q(b.value[d.value]),a=$(r),c=U(a),o=_(c,"parentPath");t=V(o)}console.log("clickRowButton5",t),await u.nextTick(),A.title=`【${n.a0}】授权`,A.show=!0,t&&Array.isArray(t)&&se(M.value,t)}},Ee=()=>{A.show=!1},T=u.ref(),Fe=async e=>{const n=await B(l.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),s=n==null?void 0:n.map(t=>{var r;return{id:t.id,tableData:(r=t==null?void 0:t.value)==null?void 0:r.tableData}});return s==null?void 0:s.map(t=>{var r;if(Array.isArray(t==null?void 0:t.tableData)){let a={id:t.id};return(r=t==null?void 0:t.tableData)==null||r.forEach((c,o)=>{a[`a${o}`]=c}),a}else return{...t.tableData,id:t.id}})},W=(e,n)=>{let s={};return n==null||n.forEach((t,r)=>{t.label&&e&&(s[t.label]=(e==null?void 0:e[`a${r}`])??null)}),s},Q=(e,n,s)=>{var a,c,o,h;const t=l.cloneDeep(e);t!=null&&t.id&&delete t.id;const r=W(t,F.value);console.log("submitTableAsyncByVerify",r,t,F.value,d.value),n==="新增"?B(l.createInsofDataApi,{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(a=v.value)!=null&&a.startsWith("/")?(c=v.value)==null?void 0:c.substring(1):v.value,tableId:s},value:{tableData:r}},n).then(i=>{T.value={...e,newId:i},n&&i&&l.ElMessage.success(n+"成功")}):n==="编辑"?(console.log("编辑角色",r),B(l.updateInsofDataApi,{id:e.id,key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(o=v.value)!=null&&o.startsWith("/")?(h=v.value)==null?void 0:h.substring(1):v.value,tableId:s},value:{tableData:r}},n).then(i=>{n&&i&&l.ElMessage.success(n+"成功"),A.show=!1})):n==="删除"&&B(l.deleteInsofDataApi,{id:e.id},n).then(i=>{n&&i&&l.ElMessage.success(n+"成功")}),m.setRefreshCurStructure(!0)},ue=e=>{let n=[];return e==null||e.forEach(s=>{var t;if(s.checkedButtons&&((t=s.checkedButtons)==null?void 0:t.length)>0){const r={path:s.path,checkedButtons:s.checkedButtons};n=n.concat(r)}s.children&&(n=n.concat(ue(s.children)))}),n},xe=()=>{const e=ue(M.value),n=Ke(e),s=we(n),t=oe(s),r=Ie(t);console.log("renderFormat",r),T.value={...b.value,[d.value]:r},u.nextTick(()=>{console.log("clickSubmitAuthority",T.value,j.value,P.value),Q(T.value,"编辑",P.value)})},A=u.reactive({show:!1,title:"角色授权",width:"35%",draggable:!0}),Ne=({isPenultimate:e},n)=>{var s,t;return console.log("isPenultimate",e,n),((t=(s=n==null?void 0:n.data)==null?void 0:s.renderButtons)==null?void 0:t.length)>0?"is-penultimate":""},P=u.ref(0),he=async e=>{var t,r,a,c,o;let n;const s=await l.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:e!=null&&e.startsWith("/")?e==null?void 0:e.substring(1):e}});return((t=s==null?void 0:s.data)==null?void 0:t.code)===200&&(r=s==null?void 0:s.data)!=null&&r.result&&((a=s==null?void 0:s.data)==null?void 0:a.result.length)>0&&(n=(o=(c=s==null?void 0:s.data.result)==null?void 0:c[0])==null?void 0:o.id,P.value=n),n},M=u.ref([]),Oe=u.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),je=(e,n)=>{var s;e.checkedButtons=n?(s=e.renderButtons)==null?void 0:s.map(t=>t.path):[],console.log("handleNodeCheckChange",e,n)},C=u.ref([]),Le=(e,n)=>{var s,t,r;n.checkedButtons=e,((s=n.checkedButtons)==null?void 0:s.length)===((t=n.renderButtons)==null?void 0:t.length)?C.value.push(n.path):(e==null?void 0:e.length)===0&&(C.value=(r=C.value)==null?void 0:r.filter(a=>a!==n.path))};u.watch(()=>C.value.length,()=>{var e;(e=te.value)==null||e.setCheckedKeys([...C.value])});u.watch(()=>A.show,e=>{e||(M.value=ne(M.value))});const x=u.computed(()=>{var s;const e=(s=l.cloneDeep(ve.value))==null?void 0:s.filter(t=>{var r,a;return((a=(r=t==null?void 0:t.key)==null?void 0:r.pageKey)==null?void 0:a.toUpperCase())!=="MENU"});return[...e==null?void 0:e.map(t=>{var c,o,h,i;const r=/button/i;let a=(h=(o=(c=t==null?void 0:t.value)==null?void 0:c.pageData)==null?void 0:o.compData)==null?void 0:h.filter(y=>r.test(y==null?void 0:y.key));return a=Array.from(new Set(a==null?void 0:a.flatMap(y=>y.contents.map(g=>g.label)))),{path:(i=t==null?void 0:t.key)==null?void 0:i.pageKey,buttons:a}}),...z.value]}),z=u.ref([]),qe=e=>{const s=[e==null?void 0:e.find(t=>(t==null?void 0:t.title)==="系统管理")].flatMap(t=>t==null?void 0:t.childMenus);return s==null?void 0:s.map(t=>({path:t==null?void 0:t.path,buttons:(t==null?void 0:t.path)==="系统管理/个人中心"?["基本信息","上传头像","签名","修改密码"]:["新增","查看","编辑","删除"]}))},N=(e,n)=>{if(Array.isArray(e))return z.value=qe(e),e==null?void 0:e.map(s=>{var r,a;const t=n==null?void 0:n.find(c=>(c==null?void 0:c.path)===(s==null?void 0:s.path));return s.childMenus&&s.childMenus.length>0?{...s,renderButtons:s.carryData?(r=t==null?void 0:t.buttons)==null?void 0:r.map(c=>({title:c,path:s.path+"/"+c})):[],checkedButtons:[],children:N(s.childMenus,x.value),childMenus:N(s.childMenus,x.value)}:{...s,renderButtons:s.carryData?(a=t==null?void 0:t.buttons)==null?void 0:a.map(c=>({title:c,path:s.path+"/"+c})):[],checkedButtons:[]}})},_e={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:j.value,name:""}]}]},Ue=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:N,addPathToTree:$,authorizeDialog:A,buttonValue:Se,changedRow:T,clickRow:b,clickRowButton:$e,clickSubmitAuthority:xe,closeAuthorizeDialog:Ee,compName:ee,convertArrayToTree:q,convertIndexToLabel:W,customNodeClass:Ne,getActivePageStructureId:he,getAuthorityKey:ae,getFirstArrayProperty:L,getLeafNodesRecursive:U,getPageDataAsync:Fe,groupByField:_,handleItemDataChange:De,handleNodeBtnChange:Le,handleNodeCheckChange:je,handleQueryChange:Te,handleRowAuthorityRender:V,handleSubmitAsync:B,isPageDataExist:Be,menuData:M,menusButtons:Oe,pageData:j,pageDataFiltered:Ce,queryFormData:ke,structureButtons:x,structureId:P,submitTableAsyncByVerify:Q,tempRolePageData:_e,tempSysMenus:z,treeRef:te},Symbol.toStringTag,{value:"Module"})),ie=Y.useLoginState(l.pinia),{superAdminInfo:Ve,cryptoInfo:f}=l.storeToRefs(ie),We=l.useMenuState(l.pinia),{activeMenuPath:p}=l.storeToRefs(We),R="123456",Qe=O(l.pinia),{routerPageStructures:ze}=l.storeToRefs(Qe),G=u.ref(0),Ge=u.ref([{label:"用户名称",value:"",name:"userName"}]),D=u.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),Je=e=>{console.log("handleQueryChange",e)},J=u.ref([]),fe=u.ref(""),K=u.computed(()=>{var n,s,t,r,a;const e=(n=ze.value)==null?void 0:n.find(c=>{var o;return((o=c==null?void 0:c.comp)==null?void 0:o.toUpperCase())==="TABLE"});if(e){fe.value=e.name,J.value=(r=(t=(s=e==null?void 0:e.compData)==null?void 0:s.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:t.contents)==null?void 0:r.filter(o=>(o==null?void 0:o.label)!=="操作");const c=(a=e==null?void 0:e.compData)==null?void 0:a.map(o=>{if((o==null?void 0:o.key)==="rowButton"){const h=[...o==null?void 0:o.contents,{label:"重置密码"}];return{...o,contents:h}}return o});return console.log(245,c),c}return[]}),He=e=>{E(e.singleContent,e.buttonName,G.value)},I=u.ref(),Xe=e=>{console.log("onDoubleClick",e)},Ye=(e,n)=>{e==="重置密码"&&pe.ElMessageBox.confirm(`该操作将会重置【${n==null?void 0:n.account}】的密码,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{I.value={...n,password:R},E(I.value,e,G.value)}).catch(()=>{l.ElMessage.info("取消重置")})},ye=()=>{H(p.value).then(e=>{var s;const n=Array.isArray(e)&&(e==null?void 0:e.filter(t=>(t==null?void 0:t.account)!==Ve.value.account));K.value=(s=K.value)==null?void 0:s.map(t=>t.key==="tableContents"?{...t,contents:n==null?void 0:n.map(r=>{var a;return{...r,password:S.decryptData(r==null?void 0:r.password,(a=f==null?void 0:f.value)==null?void 0:a.privateKey)}})}:t)})},k=async(e,n,s)=>{var t,r;try{const a=await e(n);return((t=a==null?void 0:a.data)==null?void 0:t.code)===200?(s!=="查询"&&await ie.setLogRecordAsync({type:s,data:n},p.value),a.data.result||((r=a==null?void 0:a.data)==null?void 0:r.code)===200):null}catch(a){l.ElMessage.error(a)}},E=(e,n,s)=>{var a,c,o,h,i,y;const t=l.cloneDeep(e);t!=null&&t.id&&delete t.id;const r=W(t,J.value);S.isEncryptAvailable()&&r&&(!r.password&&D.value?r.password=S.encryptData(R,(a=f==null?void 0:f.value)==null?void 0:a.publicKey):r.password&&D.value&&(r.password=S.encryptData(r==null?void 0:r.password,(c=f==null?void 0:f.value)==null?void 0:c.publicKey))),n==="新增"?k(l.createInsofDataApi,{key:{type:"data",layer:r==null?void 0:r.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(o=p.value)!=null&&o.startsWith("/")?(h=p.value)==null?void 0:h.substring(1):p.value,tableId:s},value:{tableData:r}},n).then(g=>{var w;I.value={...e,newId:g,password:D.value?S.decryptData((e==null?void 0:e.password)??R,(w=f==null?void 0:f.value)==null?void 0:w.privateKey):e==null?void 0:e.password},n&&g&&l.ElMessage.success(n+"成功")}):n==="编辑"||n==="重置密码"?k(l.updateInsofDataApi,{id:e.id,key:{type:"data",layer:r==null?void 0:r.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(i=p.value)!=null&&i.startsWith("/")?(y=p.value)==null?void 0:y.substring(1):p.value,tableId:s},value:{tableData:r}},n).then(()=>{n==="重置密码"&&ye(),n&&l.ElMessage.success(n+"成功"),A.show=!1}):n==="删除"&&k(l.deleteInsofDataApi,{id:e.id},n).then(()=>{n&&l.ElMessage.success(n+"成功")})},H=async e=>{const n=await k(l.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),s=n==null?void 0:n.map(t=>{var r,a;return{id:t.id,layer:(r=t.key)==null?void 0:r.layer,tableData:(a=t==null?void 0:t.value)==null?void 0:a.tableData}});return s==null?void 0:s.map(t=>{var r;if(!Array.isArray(t==null?void 0:t.tableData))return{...t.tableData,layer:(r=t.key)==null?void 0:r.layer,id:t.id}})},Ze={comp:"Group",name:"/系统管理/用户管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:K.value,name:""}]}]},me=Object.freeze(Object.defineProperty({__proto__:null,changedRow:I,clickRowButton:Ye,columns:J,compName:fe,getPageDataAsync:H,handleItemDataChange:He,handleQueryChange:Je,handleSubmitAsync:k,loginUserIsSuper:D,onDoubleClick:Xe,pageData:K,queryFormData:Ge,refreshUserTableData:ye,resetPassword:R,structureId:G,submitTableAsyncByVerify:E,tempUserPageData:Ze},Symbol.toStringTag,{value:"Module"}));exports.State=me;exports.State$1=Ue;exports.addPathToTree=$;exports.convertArrayToTree=q;exports.getActivePageStructureId=he;exports.getFirstArrayProperty=L;exports.getLeafNodesRecursive=U;exports.getPageDataAsync=H;exports.groupByField=_;exports.handleRowAuthorityRender=V;exports.handleSubmitAsync=k;exports.resetPassword=R;exports.submitTableAsyncByVerify=E;exports.useAuthorityState=O;
|