ss-component-new 1.3.76 → 1.3.78
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/{MTLLoader-DYLUvPra.js → MTLLoader-Bkr7rTJW.js} +1 -1
- package/dist/{MTLLoader-D1uo8mcW.cjs → MTLLoader-ByAfB26z.cjs} +1 -1
- package/dist/{OrbitControls-B4mz4dJ8.cjs → OrbitControls-BcfNtf3a.cjs} +1 -1
- package/dist/{OrbitControls-Cd9ZVfIV.js → OrbitControls-goGQ9Lfs.js} +1 -1
- package/dist/{URDFLoader-BfRhERaC.js → URDFLoader-d1AzVQ5F.js} +2 -2
- package/dist/{URDFLoader-BnH2w4x6.cjs → URDFLoader-nyfij85d.cjs} +1 -1
- package/dist/{animationData-CjVloDDN.cjs → animationData-Cew-c11l.cjs} +1 -1
- package/dist/{animationData-CO_7EKV4.js → animationData-Sok20fOI.js} +2 -2
- package/dist/{array-Xb-5MHCa.js → array-BkHYCyls.js} +45 -45
- package/dist/{array-DtmeNOPn.cjs → array-CCxIPliQ.cjs} +1 -1
- package/dist/{iconfont-CD3omIZU.js → iconfont-CJoblcL2.js} +2 -2
- package/dist/{iconfont-CkpU7gNh.cjs → iconfont-DZ9KiHjj.cjs} +1 -1
- package/dist/{index-IYg_iR8H.cjs → index-2B1wHje0.cjs} +1 -1
- package/dist/{index-C55GyDvp.js → index-5CdDKPk6.js} +2 -2
- package/dist/{index-B_kCqo4M.cjs → index-AHbRUQqE.cjs} +1 -1
- package/dist/{index-B-A_4_n_.cjs → index-B7cNKrrU.cjs} +1 -1
- package/dist/{index-CFCn1Gpd.cjs → index-BAelm3VG.cjs} +1 -1
- package/dist/index-BFvOrU__.cjs +19 -0
- package/dist/{index-lz-ekKYh.js → index-BHrQS0PO.js} +1 -1
- package/dist/{index-wv1wwLNX.cjs → index-BIbLwf-J.cjs} +1 -1
- package/dist/{index-BLqnYCsi.js → index-BPmWhs0O.js} +2 -2
- package/dist/{index-pWdzgg-b.cjs → index-BQ5LLLCI.cjs} +1 -1
- package/dist/{index-BQEvzo4s.cjs → index-BQWGBLrD.cjs} +1 -1
- package/dist/{index-DJg5d7ei.cjs → index-BRPLPxlx.cjs} +1 -1
- package/dist/{index-CW-lwsDk.cjs → index-BVh3Ylgt.cjs} +1 -1
- package/dist/{index-C5WqP8vL.cjs → index-BZqkclA9.cjs} +1 -1
- package/dist/{index-BRyE_Lab.cjs → index-BgKqiFcg.cjs} +1 -1
- package/dist/{index-BkipVGFw.js → index-Bj7H-CHU.js} +4 -4
- package/dist/{index-DtJC43XK.cjs → index-BysdHzB7.cjs} +1 -1
- package/dist/{index-CVCJuzlD.cjs → index-C036vLtM.cjs} +1 -1
- package/dist/index-C5pQXH0_.cjs +11 -0
- package/dist/{index-C-iUVY59.js → index-CGpIY6jB.js} +2074 -2021
- package/dist/{index-DxGZaHuy.js → index-CI8pzqx6.js} +6 -6
- package/dist/{index-jiFqoYN9.js → index-CIGrCpB_.js} +8 -8
- package/dist/{index-j1S7YTh5.cjs → index-CInkQ8cP.cjs} +1 -1
- package/dist/index-CM8Na0Nb.js +12905 -0
- package/dist/{index-BrLLsp39.js → index-CNLUhFlr.js} +2 -2
- package/dist/{index-Dysx8GkS.js → index-CST5bbhY.js} +3 -3
- package/dist/{index-mdJtPr2-.js → index-CWY9HxrG.js} +1 -1
- package/dist/{index-DYqVJN3W.js → index-ChiYyt8L.js} +2 -2
- package/dist/index-CjCqvZ07.cjs +11 -0
- package/dist/index-Cuw9DLEb.cjs +1 -0
- package/dist/{index-CI_UVQ4Z.js → index-D0aKEqnU.js} +4 -4
- package/dist/{index-5dvr_F6Q.cjs → index-D7GkHVm4.cjs} +1 -1
- package/dist/{index-DhSdgyHz.cjs → index-D8DcUSsZ.cjs} +1 -1
- package/dist/{index-u7JCx5KX.cjs → index-D8k54p_x.cjs} +1 -1
- package/dist/{index-COyNONVE.js → index-D9hditHi.js} +11 -7
- package/dist/{index-BFtGkyJf.js → index-DBh4mbmL.js} +3881 -3898
- package/dist/{index-DcqWejmU.cjs → index-DHdrBDP4.cjs} +1 -1
- package/dist/{index-Cfzc5_ZK.js → index-DLGxv8po.js} +4 -4
- package/dist/{index-nlfIt66y.cjs → index-DXxZIqBP.cjs} +1 -1
- package/dist/{index-X_HnLtRC.js → index-DaWzSNzm.js} +1 -1
- package/dist/{index-BLeSUjbB.js → index-DijK6RWK.js} +4 -4
- package/dist/{index-BulgFj9c.cjs → index-DilZmA-l.cjs} +1 -1
- package/dist/{index-B_uWA5AJ.js → index-Dld88iXe.js} +1 -1
- package/dist/{index-CeXyg5Rl.cjs → index-Dlob1bxY.cjs} +1 -1
- package/dist/{index-0HSo1RHX.js → index-DmeZpSGM.js} +5 -5
- package/dist/{index-CMdeEau9.js → index-DnMPqjrX.js} +4 -4
- package/dist/{index-DPjDv9Ws.cjs → index-DsymuEzu.cjs} +13 -13
- package/dist/{index-B5i-XCGU.js → index-Dyhg1YNv.js} +1 -1
- package/dist/{index-C3gtImRs.js → index-EtZh1qtq.js} +2 -2
- package/dist/{index-ChBgkXqb.js → index-G0nsjixB.js} +8 -8
- package/dist/{index-BYyFrGfX.js → index-JAXzKk2F.js} +1 -1
- package/dist/{index-jkHlUTog.js → index-K1n-pA4G.js} +2545 -2616
- package/dist/index-KEXDCkKc.js +8139 -0
- package/dist/{index-B-nrai8J.cjs → index-M_FLMoBh.cjs} +1 -1
- package/dist/index-TvWbGp-2.cjs +1 -0
- package/dist/{index-sHmgudEg.js → index-XSETNP_T.js} +1 -1
- package/dist/{index-D03MbrNK.cjs → index-cKFeu5XW.cjs} +1 -1
- package/dist/{index-CAD9KqHl.cjs → index-eUZKu-7F.cjs} +1 -1
- package/dist/{index-BfOeLrc4.cjs → index-fwa9LBX5.cjs} +1 -1
- package/dist/{index-vURW-4ky.js → index-oJEY_fSN.js} +12 -12
- package/dist/{index--D0Thf0J.js → index-rCV_Ea-P.js} +1 -1
- package/dist/{index-DMfz6Qrm.js → index-t9jd4l9Q.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dj8zYuMh.cjs → index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-Ceq-4YAl.cjs} +49 -49
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CU0erI7U.js → index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-DljCMBcU.js} +2076 -2071
- package/dist/{index.vue_vue_type_style_index_1_lang-DsZZR0tg.cjs → index.vue_vue_type_style_index_1_lang-D9kYnXoD.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-CCQPqKHr.js → index.vue_vue_type_style_index_1_lang-DDUoM--M.js} +5 -5
- package/dist/{isString-DhPkQDQg.cjs → isString-Cdf6R00a.cjs} +1 -1
- package/dist/{isString-Bn5VcA2n.js → isString-D4Yi9bDE.js} +1 -1
- package/dist/{main-j2YKSWX-.cjs → main-DDI-kRzh.cjs} +3 -3
- package/dist/{main-BLk4Mfi1.js → main-DKugsEJQ.js} +4 -4
- package/dist/{menuIndex-D332F0dw.cjs → menuIndex-BVHXKOLk.cjs} +1 -1
- package/dist/{menuIndex-BJ1CSzli.js → menuIndex-BvSKgV5f.js} +1 -1
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +13 -13
- package/dist/{threeModel-C3N_ghfY.cjs → threeModel-BC_JZ1RV.cjs} +1 -1
- package/dist/{threeModel-v33sxEBl.js → threeModel-BwWSWObs.js} +6 -6
- package/dist/{threePreview-DNw547cG.js → threePreview-CfyAicAQ.js} +5 -5
- package/dist/{threePreview-Dif-1kRY.cjs → threePreview-mSNaLCWp.cjs} +1 -1
- package/dist/{threeSceneView-iXMcW_Z9.cjs → threeSceneView-66dCWgEi.cjs} +1 -1
- package/dist/{threeSceneView-BkGy9bnz.js → threeSceneView-Dbr2KLMM.js} +11 -11
- package/dist/{threeSceneViewForCPMPIP-Bjimwk9q.cjs → threeSceneViewForCPMPIP-BzMYLFuK.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-qP-6IJzE.js → threeSceneViewForCPMPIP-tPswynXd.js} +9 -9
- package/dist/{threeTrackPathView-Cqrx2pEK.cjs → threeTrackPathView-C65T-bEd.cjs} +1 -1
- package/dist/{threeTrackPathView-wK0hwn3B.js → threeTrackPathView-CZt3mY2y.js} +6 -6
- package/dist/{threeViewerHost-B2fHt8c2.js → threeViewerHost-D2qSyCw-.js} +3 -3
- package/dist/{threeViewerHost-RuZpxQGN.cjs → threeViewerHost-DtuM2v2G.cjs} +1 -1
- package/dist/{urdfTree-i-8eGN0m.js → urdfTree-BCj0sPXo.js} +1 -1
- package/dist/{urdfTree-CnVw_qic.cjs → urdfTree-UVAVh9q0.cjs} +1 -1
- package/dist/{workpieceTreePanel-auNIy7t8.cjs → workpieceTreePanel-BtxWzOMx.cjs} +1 -1
- package/dist/{workpieceTreePanel-Cy1eCrLl.js → workpieceTreePanel-CrpY18jo.js} +4 -4
- package/package.json +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-BGuyjj26.cjs +0 -1
- package/dist/index-CLTriF5O.cjs +0 -11
- package/dist/index-CSUpvfmH.js +0 -12750
- package/dist/index-CcJb2uXu.js +0 -8191
- package/dist/index-DbFGGKSI.cjs +0 -1
- package/dist/index-Dc6Q0f3F.cjs +0 -11
- package/dist/index-HCKkRTvn.cjs +0 -19
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createElementBlock as I, openBlock as B, createElementVNode as v, renderSlot as $, defineComponent as P, ref as A, resolveComponent as E, createVNode as h, withCtx as u, unref as R, reactive as q, watch as D, onBeforeUnmount as J, onMounted as Q, toDisplayString as S, createTextVNode as V } from "vue";
|
|
2
2
|
import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
import { b as j, p as H, d as X, s as Y } from "./index-
|
|
4
|
-
import { s as z, E as O, a as Z } from "./index-
|
|
3
|
+
import { b as j, p as H, d as X, s as Y } from "./index-JAXzKk2F.js";
|
|
4
|
+
import { s as z, E as O, a as Z } from "./index-K1n-pA4G.js";
|
|
5
5
|
import { useRouter as ee } from "vue-router";
|
|
6
|
-
import { v as te } from "./index-
|
|
7
|
-
import { l as ae, a as oe } from "./index-
|
|
6
|
+
import { v as te } from "./index-BPmWhs0O.js";
|
|
7
|
+
import { l as ae, a as oe } from "./index-D9hditHi.js";
|
|
8
8
|
const ne = {}, se = { class: "left-wrap" }, ie = { class: "left-bg" };
|
|
9
9
|
function ce(y, _) {
|
|
10
10
|
return B(), I("div", se, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const f=require("vue"),y=require("./index-
|
|
1
|
+
"use strict";const f=require("vue"),y=require("./index-C5pQXH0_.cjs"),g=require("./index-fwa9LBX5.cjs"),D=g.useLoginState(g.pinia),{loginUserInfo:u,cryptoInfo:w}=g.storeToRefs(D),V=g.useMenuState(g.pinia),{activeMenuPath:b}=g.storeToRefs(V),P=f.ref(0),R=f.computed(()=>{var s,a,t,r,n,l,e,o,p,d,v;return[{label:"",name:"账号",prop:"账号",value:((s=u.value)==null?void 0:s.account)||(((a=u.value)==null?void 0:a.账号)??"未知")},{label:"",name:"角色名称",prop:"角色名称",value:((t=u.value)==null?void 0:t.layer)==="superAdmin"?"超级管理员":(r=u.value)==null?void 0:r.角色名称},{label:"",name:"部门名称",prop:"部门名称",value:((n=u.value)==null?void 0:n.部门名称)??"未知"},{label:"",name:"状态",prop:"状态",value:((l=u.value)==null?void 0:l.layer)==="superAdmin"?"启用":((e=u.value)==null?void 0:e.状态)??"未知"},{label:"",prop:"头像",isFormColHidden:!0,value:((o=u.value)==null?void 0:o.layer)==="superAdmin"?"启用":((p=u.value)==null?void 0:p.状态)??"未知"},{label:"",prop:"签名",isFormColHidden:!0,value:((d=u.value)==null?void 0:d.layer)==="superAdmin"?"启用":((v=u.value)==null?void 0:v.状态)??"未知"}]}),W=()=>{},U=f.ref(!1),h=f.reactive({dialogTitle:"电子签名",dialogWidth:"30",dialogShow:!1,url:""}),S=f.ref([{label:"签字版",icon:y.edit_pen_default,type:"button",disabled:!1},{label:"电子签名",icon:y.edit_default,type:"button",disabled:!1},{label:"上传手写签名",icon:y.upload_filled_default,type:"buttonUpload",disabled:!1}]),I=f.ref(!1),T=f.ref(!1),M=f.ref(!1),_=f.computed(()=>{var r,n,l;const s=sessionStorage.getItem("authority"),a=JSON.parse(s||""),t=(r=b.value)!=null&&r.startsWith("/")?(n=b.value)==null?void 0:n.substring(1):b.value;return Array.isArray(a)?(M.value=!(a!=null&&a.includes(`${t}/上传头像`)),(l=S.value)==null?void 0:l.map(e=>({...e,disabled:!(a!=null&&a.includes(`${t}/签名`))}))):typeof a=="string"&&(a==null?void 0:a.toUpperCase())==="SUPERADMIN"?S.value:[]}),$=f.computed(()=>[{key:"signConfig",contents:h},{key:"signTypeList",contents:_.value}]),O=s=>{h.dialogShow=s.label==="电子签名"},L=()=>{h.dialogShow=!1},N=async s=>{var t,r,n,l,e,o,p,d,v;const a=await y.getInsofDataApi({id:s});if(((t=a==null?void 0:a.data)==null?void 0:t.code)===200&&a.data.result&&Array.isArray(a.data.result)&&a.data.result.length>0){const c={...(l=(n=(r=a.data.result)==null?void 0:r[0])==null?void 0:n.value)==null?void 0:l.tableData,id:(o=(e=a.data.result)==null?void 0:e[0])==null?void 0:o.id,layer:(v=(d=(p=a.data.result)==null?void 0:p[0])==null?void 0:d.key)==null?void 0:v.layer};D.setLoginUserInfo(c)}},q=async(s,a)=>{var r,n,l;const t=g.cloneDeep(s);t==null||delete t.id;try{const e=await y.updateInsofDataApi({id:(r=u.value)==null?void 0:r.id,value:{tableData:t}});((n=e==null?void 0:e.data)==null?void 0:n.code)===200&&(L(),y.ElMessage.success("修改成功"),await N((l=u.value)==null?void 0:l.id),await D.setLogRecordAsync({type:a,data:s},b.value))}catch{y.ElMessage.error("修改响应失败")}finally{U.value=!1,I.value=!1,T.value=!1}},B=async(s,a)=>{var n;const t=s==="avatarUrl"?"头像":"签名",r={...u.value,status:((n=u.value)==null?void 0:n.status)??"启用",[t]:a};I.value=s==="avatarUrl",T.value=s==="signature",await q(r,"图片修改")},m=f.reactive({baseCols:[],otherCols:[]}),K=f.ref([]),k=f.ref(),H=(s,a,t)=>{var l,e,o,p,d,v;let r;const n=a;((e=(l=u.value)==null?void 0:l.layer)==null?void 0:e.toUpperCase())!=="SUPERADMIN"?r=(o=u.value)!=null&&o.password?g.decryptData((p=u.value)==null?void 0:p.password,(d=w==null?void 0:w.value)==null?void 0:d.privateKey):g.resetPassword:r=(v=u.value)==null?void 0:v.password,r===n?t():t(new Error("输入的密码与原密码不匹配,请重新输入"))},j=(s,a,t)=>{a?t():t(new Error("请输入密码"))},x=(s,a,t)=>{var r;a!==((r=k.value)==null?void 0:r.newtPass)?t(new Error("两次输入的密码不一致")):t()},J=async()=>{var a,t,r,n,l,e,o,p,d,v;const s=await y.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:"系统管理/用户管理"}});if(((a=s==null?void 0:s.data)==null?void 0:a.code)===200&&s.data.result&&((t=s.data.result)==null?void 0:t.length)>0){const c=(o=(e=(l=(n=(r=s.data.result)==null?void 0:r[0])==null?void 0:n.value)==null?void 0:l.pageData)==null?void 0:e.compData)==null?void 0:o.find(i=>(i==null?void 0:i.key)==="header"),C=(p=R.value)==null?void 0:p.map(i=>i==null?void 0:i.prop);m.baseCols=c&&((d=c.contents)==null?void 0:d.map(i=>({...i,isFormColHidden:(C==null?void 0:C.includes(i==null?void 0:i.prop))||(i==null?void 0:i.label)==="操作"})));const A=(v=c.contents)==null?void 0:v.find(i=>(i==null?void 0:i.prop)==="password"),F=[{...A,label:"当前密码",prop:"currentPass",validator:H},{...A,label:"新密码",prop:"newtPass",validator:j},{...A,label:"确认密码",prop:"confirmNewPass",validator:x}];m.otherCols=F,Q(u.value)}},z=s=>{k.value=s},G=async({content:s,buttonName:a})=>{var r,n,l,e,o;let t;a==="确定"&&(t={...u.value,status:((r=u.value)==null?void 0:r.status)??"启用",password:((l=(n=u.value)==null?void 0:n.layer)==null?void 0:l.toUpperCase())==="SUPERADMIN"?s==null?void 0:s.confirmNewPass:g.encryptData(s==null?void 0:s.confirmNewPass,(e=w.value)==null?void 0:e.publicKey)}),a==="保存基本信息"&&(t={...u.value,...s,status:((o=u.value)==null?void 0:o.status)??"启用"}),U.value=!0,await q(t,a)},E=()=>{var r,n;const s={base:[{label:"保存基本信息"}],other:[{label:"重置",background:"#b7b8b8"},{label:"确定"}]},a=sessionStorage.getItem("authority"),t=JSON.parse(a||"");if(Array.isArray(t)){const l=(r=b.value)!=null&&r.startsWith("/")?(n=b.value)==null?void 0:n.substring(1):b.value,e=t!=null&&t.includes(`${l}/基本信息`)?s==null?void 0:s.base:[],o=t!=null&&t.includes(`${l}/修改密码`)?s==null?void 0:s.other:[];return{base:e,other:o}}else return typeof t=="string"&&(t==null?void 0:t.toUpperCase())==="SUPERADMIN"?s:null},Q=s=>{var a,t,r,n,l;K.value=[{value:"基础信息",label:"基础信息",children:[{type:"form",content:{rowContents:(a=m.baseCols)==null?void 0:a.map(e=>({...e,width:2,type:e==null?void 0:e.formType,name:e==null?void 0:e.prop,prop:e==null?void 0:e.prop,contents:e==null?void 0:e.options,value:s[e==null?void 0:e.prop]})),formRules:{userName:[{required:!0,message:"输入不能为空",trigger:"blur"}],birthDay:[{required:!0,message:"输入不能为空",trigger:"blur"}],phone:[{required:!0,message:"输入不能为空",trigger:"blur"}]},buttonValue:(t=E())==null?void 0:t.base,isEnableWrap:!1,isButtonRow:!1},value:""}]},{value:"修改密码",label:"修改密码",children:[{type:"form",content:{rowContents:(r=m.otherCols)==null?void 0:r.map(e=>({...e,width:1,type:e==null?void 0:e.formType,name:e==null?void 0:e.prop,contents:e==null?void 0:e.options})),formRules:(n=m.otherCols)==null?void 0:n.reduce((e,o)=>(e[o.prop]=[{required:!0,message:"输入有误",trigger:"change"},{validator:(p,d,v)=>o.validator(p,d,v),trigger:"blur"}],e),{}),buttonValue:(l=E())==null?void 0:l.other,isEnableWrap:!1},value:""}]}]},X=Object.freeze(Object.defineProperty({__proto__:null,avatarLoading:I,beforeSignDestroy:L,changeFormTrigger:z,clickFormButton:W,clickSignButton:O,clickTabButton:G,getUserTableHeadersAsync:J,itemData:$,loading:U,refreshLoginUserInfoAsync:N,rowContents:R,signPadInfo:h,signTypes:_,signatureLoading:T,submitImageAsync:B,tabKey:P,tabsContents:K,tempSignTypes:S,uploadDisabled:M},Symbol.toStringTag,{value:"Module"}));exports.State=X;exports.tabKey=P;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const f=require("./index-
|
|
1
|
+
"use strict";const f=require("./index-fwa9LBX5.cjs"),E=require("vue"),S=require("./index-TvWbGp-2.cjs"),b=t=>{var u,o;if(Array.isArray(Object.keys(t))&&((u=Object.keys(t))==null?void 0:u.length)>0){let a=[];return(o=Object.entries(t))==null||o.forEach(([l,r])=>{var i,c;let s=[];if(s.push(l),((i=Object.keys(r))==null?void 0:i.length)>0){let e=[];(c=b(r))==null||c.forEach(n=>{e.push(n)}),e==null||e.forEach(n=>{s.push(n)})}a.push(s)}),a}},g=(t,u)=>{var a;let o=u;return Array.isArray(Object.keys(t))&&((a=Object.entries(t))==null||a.forEach(([l,r])=>{let s=[l];if(typeof r=="object"&&r!==null){let i=b(r);i==null||i.forEach(c=>{s.push(c)})}o.push(s)})),o},A=t=>{const u={};return t.forEach(a=>{const l=a.split("/");let r=u;l.forEach(s=>{r[s]||(r[s]={}),r=r[s]})}),g(u,[])},y=E.ref(!1),m=E.ref(!1),d=f.useLoginState(f.pinia),{loginUserInfo:h}=f.storeToRefs(d),j=f.useMenuState(),_=async()=>{var u,o,a,l,r,s,i;let t=await S.getPageDataApi({platId:parseInt((u=h==null?void 0:h.value)==null?void 0:u.plat_id),pageName:"menu"});if(((a=(o=t==null?void 0:t.data)==null?void 0:o.result)==null?void 0:a.length)>0){let c=(i=(s=(r=(l=t==null?void 0:t.data)==null?void 0:l.result)==null?void 0:r.filter(e=>{var n,p;return((p=e==null?void 0:e.object_name)==null?void 0:p[((n=e==null?void 0:e.object_name)==null?void 0:n.length)-1])!=="/"&&(e==null?void 0:e.is_show)}))==null?void 0:s.sort((e,n)=>(e==null?void 0:e.object_id)-(n==null?void 0:n.object_id)))==null?void 0:i.map(e=>{var n;return(n=e==null?void 0:e.object_name)==null?void 0:n.replaceAll("**^","/")});c=[...new Set(c)],c=A(c),j.setRawMenus(c??[]),y.value=!0,m.value=!0}else j.setRawMenus([]);return{menuExist:y.value,structureExist:m.value}};exports.menuArray=A;exports.verifyStructureDataToStore=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("vue"),k=require("./index-BfOeLrc4.cjs"),ce=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dj8zYuMh.cjs"),y=require("./index-Dc6Q0f3F.cjs"),pe=require("./menuIndex-D332F0dw.cjs"),E=k.useModelComp(k.pinia),m=ce.useUnit(k.pinia),I=k.useMenuState(k.pinia),{menus:ee,configMenu:B,activeMenuPath:O,cacheStructures:_}=k.storeToRefs(I),j=i.ref(!1),te=i.computed(()=>{var e,t;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(t=(e=k.cloneDeep(ee.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),$=i.ref([]),H=i.ref([{label:"新建"}]),fe=i.computed(()=>[{key:"extraButton",contents:H.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:$.value}]),J=i.ref([]),T=i.ref({}),de=i.ref({}),R=i.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"生成的菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构",isFormColHidden:!1},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),q=e=>{var t;J.value=e?(t=R.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l:{...l,value:e?e[l==null?void 0:l.prop]:""}):R.value},ie=i.ref([{label:"查询"},{label:"重置"}]),ge=async()=>{},le=e=>e.map(t=>t.childMenus&&t.childMenus.length>0?{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title,children:le(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),g=i.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=i.ref([]),C=i.ref({}),h=i.ref(null),ae=i.ref([]),oe=i.computed(()=>{var e;return(e=le(ee.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ne=async e=>{var l,u,n,c;const t=await y.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:e,version:1}});if(((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result){const r=(c=(n=t.data)==null?void 0:n.result)==null?void 0:c.map(p=>{var f;return{id:p==null?void 0:p.id,...(f=p==null?void 0:p.value)==null?void 0:f.pageData}});ae.value=r,I.setCacheStructures({key:"contentConfig",data:r})}},ve=async e=>{var t;j.value=!0,h.value={...e,rootNode:pe.findRootNodeByPath(oe.value,e.path)},I.setCacheStructures(null),(e==null?void 0:e.level)===0?H.value.splice(0):(H.value=[{label:"新建"}],U.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await I.setConfigMenu(null),await ne(e==null?void 0:e.path),await x(e)},ye=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},be=async(e,t)=>{var l,u;if(!h.value)return y.ElMessage.warning("请先选择菜单");if(g.type=ye(e),U.value=[],E.setSubmitCurStructure(!1),m.setSelectTitle([]),C.value=k.cloneDeep(t),g.type!=="delete"){switch(g.type){case"create":q(null),await I.setConfigMenu(null);break;case"update":q(C.value),await I.setConfigMenu(C.value),console.log("clickRowButton",C.value);break}await i.nextTick(),g.title=`【${g.type==="create"?(l=h.value)==null?void 0:l.path:(u=C.value)==null?void 0:u.path}】菜单配置${e}`,g.show=!0}else await re(C.value,g.type)},ue=i.ref(!0),he=async e=>{var t;T.value=e,await I.setConfigMenu({...T.value,path:(t=h.value)==null?void 0:t.path}),ue.value=(e==null?void 0:e.operateType)!=="新增"};i.watch(()=>ue.value,async e=>{var t;await i.nextTick(),J.value=(t=R.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l.prop==="contentConfig"?{...l,isFormColHidden:e}:l:{...l,value:T.value?T.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const Ce=i.ref(null),Ie=async(e,t)=>{var r,p,f,s,b;if(g.type==="create"){const a=(p=(r=_.value)==null?void 0:r.filter(d=>(d==null?void 0:d.key)===t))==null?void 0:p.flatMap(d=>d==null?void 0:d.data);E.setItemData(a),I.setCacheStructures({key:t,data:a})}if(console.log("getTriggerStructures1",e==null?void 0:e.structureIds,t),!(e!=null&&e.structureIds)||((f=e==null?void 0:e.structureIds)==null?void 0:f.length)===0)return;const l=(b=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:b.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return y.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var d;return((d=a==null?void 0:a.data)==null?void 0:d.code)===200});if(console.log("getTriggerStructures2",e==null?void 0:e.structureIds,t,n),c&&(n==null?void 0:n.length)>0){const a=n==null?void 0:n.map(d=>{var M,D,N,A,P,o,F;return{id:(N=(D=(M=d==null?void 0:d.data)==null?void 0:M.result)==null?void 0:D[0])==null?void 0:N.id,...(F=(o=(P=(A=d==null?void 0:d.data)==null?void 0:A.result)==null?void 0:P[0])==null?void 0:o.value)==null?void 0:F.pageData}});E.setItemData(a),I.setCacheStructures({key:t,data:a})}},ke=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";I.setButtonTriggerType(t),await Ie(C.value,t);let l;(n=T.value)!=null&&n.subMenus&&((c=T.value)==null?void 0:c.subMenus.length)>0&&(l=(r=U.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=C.value)==null?void 0:p.title}));let u;g.type==="create"?u={...T.value,path:(f=h.value)==null?void 0:f.path}:g.type==="update"&&(u=B.value),await I.setConfigMenu(u),m.setSelectTitle(l),E.setIsEdit("edit")},x=async e=>{var l,u,n,c,r,p;const t=await y.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:O.value+"/"+(e==null?void 0:e.path),tableId:""}});((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result&&($.value=((c=(n=t.data)==null?void 0:n.result)==null?void 0:c.length)>0?(p=(r=t.data)==null?void 0:r.result)==null?void 0:p.map(f=>{var s;return{id:f==null?void 0:f.id,...(s=f==null?void 0:f.value)==null?void 0:s.tableData}}):[]),j.value=!1},K=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,b;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:O.value+"/"+((u=h.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},b=y.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},b=y.updateInsofDataApi):t==="delete"&&(s={id:e},b=y.deleteInsofDataApi);const a=await b(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw y.ElMessage.error("保存响应失败"),new Error("保存响应失败");const d=t==="create"?(p=a==null?void 0:a.data)==null?void 0:p.result:e==null?void 0:e.id;return{status:((f=a==null?void 0:a.data)==null?void 0:f.code)===200,data:{id:d,key:l}}}catch{y.ElMessage.error("保存响应失败")}},Y=(e,t)=>{var f,s,b;const l=(f=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:f.map(a=>a==null?void 0:a.id),u=t.filter(a=>!(l!=null&&l.includes(a))),n=l==null?void 0:l.filter(a=>!t.includes(a));let c=null,r=null,p=null;return c=[...u,...n].filter(a=>a),r=(s=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:s.filter(a=>!(a!=null&&a.id)),p=(b=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:b.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},Z=(e,t)=>{var u,n,c,r,p,f;let l=[];return((u=t==null?void 0:t.deleteIds)==null?void 0:u.length)>0&&((n=t==null?void 0:t.deleteIds)==null||n.forEach(s=>{l.push(K(s,"delete",e))})),((c=t==null?void 0:t.createComps)==null?void 0:c.length)>0&&((r=t==null?void 0:t.createComps)==null||r.forEach(s=>{l.push(K(s,"create",e))})),((p=t==null?void 0:t.updateComps)==null?void 0:p.length)>0&&((f=t==null?void 0:t.updateComps)==null||f.forEach(s=>{s!=null&&s.id&&l.push(K(s,"update",e))})),l},Te=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},Me=async(e,t)=>{var l,u,n,c,r,p,f;try{const s=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="contentConfig"),b=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await i.nextTick();const a=(n=(u=(l=_.value)==null?void 0:l.filter(o=>(o==null?void 0:o.key)==="dialogConfig"))==null?void 0:u.flatMap(o=>o==null?void 0:o.data))==null?void 0:n.map(o=>o==null?void 0:o.id);let d=(p=(r=(c=_.value)==null?void 0:c.filter(o=>(o==null?void 0:o.key)==="contentConfig"))==null?void 0:r.flatMap(o=>o==null?void 0:o.data))==null?void 0:p.map(o=>o==null?void 0:o.id);d=[...d,...(f=ae.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const M=Y(b,a),D=Y(s,d),N=Z("dialogConfig",M),A=Z("contentConfig",D),P=[...N,...A];await Promise.all(P).then(o=>{var z,G,L,V,Q,W,X;if(!(o==null?void 0:o.every(v=>v.status)))return;let w=(z=o==null?void 0:o.flatMap(v=>v==null?void 0:v.data))==null?void 0:z.filter(v=>(v==null?void 0:v.id)!==null&&(v==null?void 0:v.id)!==void 0);if(((G=M==null?void 0:M.updateComps)==null?void 0:G.length)===0&&g.type==="update"){const v=(V=(L=C.value)==null?void 0:L.structureIds)==null?void 0:V.filter(S=>(S==null?void 0:S.key)==="dialogConfig");w=[...w,...v]}if(((Q=D==null?void 0:D.updateComps)==null?void 0:Q.length)===0&&g.type==="update"){const v=(X=(W=C.value)==null?void 0:W.structureIds)==null?void 0:X.filter(S=>(S==null?void 0:S.key)==="contentConfig");w=[...w,...v]}const se=Te(w);re({...t,isNotInitial:!0,structureIds:se},g.type)}).catch(o=>{y.ElMessage.error(o)})}catch(s){throw y.ElMessage.error(s),new Error(s)}},re=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:O.value+"/"+((n=h.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=y.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=y.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=y.batchDeleteInsofDataApi),k.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&$.value.push({...e,id:r}),t&&r&&y.ElMessage.success("响应成功"),x(h.value)})},De=async()=>{var l,u,n,c,r;const e=JSON.parse(k.cloneDeep(JSON.stringify(_.value)));await i.nextTick();const t=g.type==="create"?{...B.value,rootNodePath:(u=(l=h.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...B.value,rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=C.value)==null?void 0:r.id};await Me(e,t),T.value={},g.show=!1,await x(h.value)},Se=()=>{g.show=!1},we={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:te.value,name:""}]}]},Ne=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:Se,buttonValue:ie,changeTrigger:he,changedRow:de,clickNodeTrigger:ve,clickRowButton:be,clickSubmitForm:De,clickTrigger:ke,dialogInfo:g,formatFormData:q,getInitialSubStructure:ne,getTableDataAsync:x,handleItemDataChange:ge,inputForm:T,menuPageData:fe,operatingForm:Ce,pageData:te,renderFormData:J,tableLoading:j,tempMenuPageData:we,treeData:oe},Symbol.toStringTag,{value:"Module"}));exports.State=Ne;
|
|
1
|
+
"use strict";const i=require("vue"),k=require("./index-fwa9LBX5.cjs"),ce=require("./index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-Ceq-4YAl.cjs"),y=require("./index-C5pQXH0_.cjs"),pe=require("./menuIndex-BVHXKOLk.cjs"),E=k.useModelComp(k.pinia),m=ce.useUnit(k.pinia),I=k.useMenuState(k.pinia),{menus:ee,configMenu:B,activeMenuPath:O,cacheStructures:_}=k.storeToRefs(I),j=i.ref(!1),te=i.computed(()=>{var e,t;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(t=(e=k.cloneDeep(ee.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),$=i.ref([]),H=i.ref([{label:"新建"}]),fe=i.computed(()=>[{key:"extraButton",contents:H.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:$.value}]),J=i.ref([]),T=i.ref({}),de=i.ref({}),R=i.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"生成的菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构",isFormColHidden:!1},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),q=e=>{var t;J.value=e?(t=R.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l:{...l,value:e?e[l==null?void 0:l.prop]:""}):R.value},ie=i.ref([{label:"查询"},{label:"重置"}]),ge=async()=>{},le=e=>e.map(t=>t.childMenus&&t.childMenus.length>0?{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title,children:le(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),g=i.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=i.ref([]),C=i.ref({}),h=i.ref(null),ae=i.ref([]),oe=i.computed(()=>{var e;return(e=le(ee.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ne=async e=>{var l,u,n,c;const t=await y.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:e,version:1}});if(((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result){const r=(c=(n=t.data)==null?void 0:n.result)==null?void 0:c.map(p=>{var f;return{id:p==null?void 0:p.id,...(f=p==null?void 0:p.value)==null?void 0:f.pageData}});ae.value=r,I.setCacheStructures({key:"contentConfig",data:r})}},ve=async e=>{var t;j.value=!0,h.value={...e,rootNode:pe.findRootNodeByPath(oe.value,e.path)},I.setCacheStructures(null),(e==null?void 0:e.level)===0?H.value.splice(0):(H.value=[{label:"新建"}],U.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await I.setConfigMenu(null),await ne(e==null?void 0:e.path),await x(e)},ye=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},be=async(e,t)=>{var l,u;if(!h.value)return y.ElMessage.warning("请先选择菜单");if(g.type=ye(e),U.value=[],E.setSubmitCurStructure(!1),m.setSelectTitle([]),C.value=k.cloneDeep(t),g.type!=="delete"){switch(g.type){case"create":q(null),await I.setConfigMenu(null);break;case"update":q(C.value),await I.setConfigMenu(C.value),console.log("clickRowButton",C.value);break}await i.nextTick(),g.title=`【${g.type==="create"?(l=h.value)==null?void 0:l.path:(u=C.value)==null?void 0:u.path}】菜单配置${e}`,g.show=!0}else await re(C.value,g.type)},ue=i.ref(!0),he=async e=>{var t;T.value=e,await I.setConfigMenu({...T.value,path:(t=h.value)==null?void 0:t.path}),ue.value=(e==null?void 0:e.operateType)!=="新增"};i.watch(()=>ue.value,async e=>{var t;await i.nextTick(),J.value=(t=R.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l.prop==="contentConfig"?{...l,isFormColHidden:e}:l:{...l,value:T.value?T.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const Ce=i.ref(null),Ie=async(e,t)=>{var r,p,f,s,b;if(g.type==="create"){const a=(p=(r=_.value)==null?void 0:r.filter(d=>(d==null?void 0:d.key)===t))==null?void 0:p.flatMap(d=>d==null?void 0:d.data);E.setItemData(a),I.setCacheStructures({key:t,data:a})}if(console.log("getTriggerStructures1",e==null?void 0:e.structureIds,t),!(e!=null&&e.structureIds)||((f=e==null?void 0:e.structureIds)==null?void 0:f.length)===0)return;const l=(b=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:b.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return y.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var d;return((d=a==null?void 0:a.data)==null?void 0:d.code)===200});if(console.log("getTriggerStructures2",e==null?void 0:e.structureIds,t,n),c&&(n==null?void 0:n.length)>0){const a=n==null?void 0:n.map(d=>{var M,D,N,A,P,o,F;return{id:(N=(D=(M=d==null?void 0:d.data)==null?void 0:M.result)==null?void 0:D[0])==null?void 0:N.id,...(F=(o=(P=(A=d==null?void 0:d.data)==null?void 0:A.result)==null?void 0:P[0])==null?void 0:o.value)==null?void 0:F.pageData}});E.setItemData(a),I.setCacheStructures({key:t,data:a})}},ke=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";I.setButtonTriggerType(t),await Ie(C.value,t);let l;(n=T.value)!=null&&n.subMenus&&((c=T.value)==null?void 0:c.subMenus.length)>0&&(l=(r=U.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=C.value)==null?void 0:p.title}));let u;g.type==="create"?u={...T.value,path:(f=h.value)==null?void 0:f.path}:g.type==="update"&&(u=B.value),await I.setConfigMenu(u),m.setSelectTitle(l),E.setIsEdit("edit")},x=async e=>{var l,u,n,c,r,p;const t=await y.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:O.value+"/"+(e==null?void 0:e.path),tableId:""}});((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result&&($.value=((c=(n=t.data)==null?void 0:n.result)==null?void 0:c.length)>0?(p=(r=t.data)==null?void 0:r.result)==null?void 0:p.map(f=>{var s;return{id:f==null?void 0:f.id,...(s=f==null?void 0:f.value)==null?void 0:s.tableData}}):[]),j.value=!1},K=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,b;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:O.value+"/"+((u=h.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},b=y.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},b=y.updateInsofDataApi):t==="delete"&&(s={id:e},b=y.deleteInsofDataApi);const a=await b(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw y.ElMessage.error("保存响应失败"),new Error("保存响应失败");const d=t==="create"?(p=a==null?void 0:a.data)==null?void 0:p.result:e==null?void 0:e.id;return{status:((f=a==null?void 0:a.data)==null?void 0:f.code)===200,data:{id:d,key:l}}}catch{y.ElMessage.error("保存响应失败")}},Y=(e,t)=>{var f,s,b;const l=(f=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:f.map(a=>a==null?void 0:a.id),u=t.filter(a=>!(l!=null&&l.includes(a))),n=l==null?void 0:l.filter(a=>!t.includes(a));let c=null,r=null,p=null;return c=[...u,...n].filter(a=>a),r=(s=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:s.filter(a=>!(a!=null&&a.id)),p=(b=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:b.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},Z=(e,t)=>{var u,n,c,r,p,f;let l=[];return((u=t==null?void 0:t.deleteIds)==null?void 0:u.length)>0&&((n=t==null?void 0:t.deleteIds)==null||n.forEach(s=>{l.push(K(s,"delete",e))})),((c=t==null?void 0:t.createComps)==null?void 0:c.length)>0&&((r=t==null?void 0:t.createComps)==null||r.forEach(s=>{l.push(K(s,"create",e))})),((p=t==null?void 0:t.updateComps)==null?void 0:p.length)>0&&((f=t==null?void 0:t.updateComps)==null||f.forEach(s=>{s!=null&&s.id&&l.push(K(s,"update",e))})),l},Te=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},Me=async(e,t)=>{var l,u,n,c,r,p,f;try{const s=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="contentConfig"),b=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await i.nextTick();const a=(n=(u=(l=_.value)==null?void 0:l.filter(o=>(o==null?void 0:o.key)==="dialogConfig"))==null?void 0:u.flatMap(o=>o==null?void 0:o.data))==null?void 0:n.map(o=>o==null?void 0:o.id);let d=(p=(r=(c=_.value)==null?void 0:c.filter(o=>(o==null?void 0:o.key)==="contentConfig"))==null?void 0:r.flatMap(o=>o==null?void 0:o.data))==null?void 0:p.map(o=>o==null?void 0:o.id);d=[...d,...(f=ae.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const M=Y(b,a),D=Y(s,d),N=Z("dialogConfig",M),A=Z("contentConfig",D),P=[...N,...A];await Promise.all(P).then(o=>{var z,G,L,V,Q,W,X;if(!(o==null?void 0:o.every(v=>v.status)))return;let w=(z=o==null?void 0:o.flatMap(v=>v==null?void 0:v.data))==null?void 0:z.filter(v=>(v==null?void 0:v.id)!==null&&(v==null?void 0:v.id)!==void 0);if(((G=M==null?void 0:M.updateComps)==null?void 0:G.length)===0&&g.type==="update"){const v=(V=(L=C.value)==null?void 0:L.structureIds)==null?void 0:V.filter(S=>(S==null?void 0:S.key)==="dialogConfig");w=[...w,...v]}if(((Q=D==null?void 0:D.updateComps)==null?void 0:Q.length)===0&&g.type==="update"){const v=(X=(W=C.value)==null?void 0:W.structureIds)==null?void 0:X.filter(S=>(S==null?void 0:S.key)==="contentConfig");w=[...w,...v]}const se=Te(w);re({...t,isNotInitial:!0,structureIds:se},g.type)}).catch(o=>{y.ElMessage.error(o)})}catch(s){throw y.ElMessage.error(s),new Error(s)}},re=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:O.value+"/"+((n=h.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=y.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=y.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=y.batchDeleteInsofDataApi),k.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&$.value.push({...e,id:r}),t&&r&&y.ElMessage.success("响应成功"),x(h.value)})},De=async()=>{var l,u,n,c,r;const e=JSON.parse(k.cloneDeep(JSON.stringify(_.value)));await i.nextTick();const t=g.type==="create"?{...B.value,rootNodePath:(u=(l=h.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...B.value,rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=C.value)==null?void 0:r.id};await Me(e,t),T.value={},g.show=!1,await x(h.value)},Se=()=>{g.show=!1},we={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:te.value,name:""}]}]},Ne=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:Se,buttonValue:ie,changeTrigger:he,changedRow:de,clickNodeTrigger:ve,clickRowButton:be,clickSubmitForm:De,clickTrigger:ke,dialogInfo:g,formatFormData:q,getInitialSubStructure:ne,getTableDataAsync:x,handleItemDataChange:ge,inputForm:T,menuPageData:fe,operatingForm:Ce,pageData:te,renderFormData:J,tableLoading:j,tempMenuPageData:we,treeData:oe},Symbol.toStringTag,{value:"Module"}));exports.State=Ne;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a } from "./index-
|
|
2
|
-
function
|
|
1
|
+
import { a } from "./index-K1n-pA4G.js";
|
|
2
|
+
function p(t) {
|
|
3
3
|
return a.post("http://222.92.178.198:63002/platform/createdata", t);
|
|
4
4
|
}
|
|
5
5
|
function o(t) {
|
|
@@ -12,19 +12,23 @@ function n(t) {
|
|
|
12
12
|
return a.post("http://222.92.178.198:63002/platform/getPage", t);
|
|
13
13
|
}
|
|
14
14
|
function i(t) {
|
|
15
|
+
return a.post("http://222.92.178.198:63002/platform/delete", t);
|
|
16
|
+
}
|
|
17
|
+
function s(t) {
|
|
15
18
|
return a.post("http://222.92.178.198:63002/platform/page/add", t);
|
|
16
19
|
}
|
|
17
|
-
function
|
|
20
|
+
function u(t) {
|
|
18
21
|
return a.post("http://222.92.178.198:63002/platform/page/update", t);
|
|
19
22
|
}
|
|
20
|
-
function
|
|
23
|
+
function f(t) {
|
|
21
24
|
return a.post("http://222.92.178.198:63002/platform/page/delete", t);
|
|
22
25
|
}
|
|
23
26
|
export {
|
|
24
27
|
r as a,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
u as b,
|
|
29
|
+
p as c,
|
|
30
|
+
i as d,
|
|
31
|
+
f as e,
|
|
28
32
|
n as g,
|
|
29
33
|
o as l,
|
|
30
34
|
s as p
|