ss-component-new 1.3.481 → 1.3.482

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{array-lENXXuxq.js → array-CfREkXm_.js} +2 -2
  2. package/dist/{array-BxpbFWKB.cjs → array-gSJxpVxK.cjs} +1 -1
  3. package/dist/{index-ClYFYqBL.cjs → index-B3aPXaY5.cjs} +1 -1
  4. package/dist/{index-DLiW_2B8.cjs → index-BDAutbWx.cjs} +1 -1
  5. package/dist/{index-BH1ZgVQU.cjs → index-BVMRI_Wn.cjs} +1 -1
  6. package/dist/{index-BJK8B62k.cjs → index-BivS-5oH.cjs} +1 -1
  7. package/dist/{index-Zp6hfbFU.js → index-BlCpL0uY.js} +1 -1
  8. package/dist/{index-DZR82YPZ.cjs → index-BoViAH6V.cjs} +1 -1
  9. package/dist/{index-BQEOJF-G.js → index-BukHvm2Z.js} +2 -2
  10. package/dist/{index-QgvVT_iI.js → index-C4cRWfNJ.js} +7 -7
  11. package/dist/{index-GqFgdK_J.js → index-C5u7jUv-.js} +2 -2
  12. package/dist/{index-9YC24bNj.cjs → index-CMHmbT4i.cjs} +1 -1
  13. package/dist/{index-sEjvUC1x.js → index-CNB4BZ91.js} +2 -2
  14. package/dist/{index-EfBib3zE.js → index-COykEEK3.js} +1 -1
  15. package/dist/{index-AxoUaL28.cjs → index-CyYcRqb0.cjs} +1 -1
  16. package/dist/{index-DqkuDSPU.js → index-DAcYf_bi.js} +1 -1
  17. package/dist/{index-CHPMsDPK.cjs → index-DIeTpbPH.cjs} +1 -1
  18. package/dist/{index-CzhBMv8p.cjs → index-DQeIc9oh.cjs} +1 -1
  19. package/dist/{index-CtvNokK2.js → index-DQs1RX5r.js} +1 -1
  20. package/dist/{index-DGEb9bkL.cjs → index-DnmFBuPS.cjs} +1 -1
  21. package/dist/{index-DrWKawXh.js → index-Do1cBbdu.js} +3 -3
  22. package/dist/{index-CtOsUUWU.js → index-DvGAjvlh.js} +6 -8
  23. package/dist/{index-BwYDoAMT.cjs → index-P3Him-9M.cjs} +1 -1
  24. package/dist/{index-BWXZFsuz.js → index-SGoq1Wb3.js} +1 -1
  25. package/dist/{index-dlG87qfK.cjs → index-hY3x8fCk.cjs} +2 -2
  26. package/dist/{index-Pftc722L.js → index-iVTrt8bg.js} +1 -1
  27. package/dist/{main-CLr2QVY2.js → main-CBJB5iP5.js} +2 -2
  28. package/dist/{main-BqnZHAWL.cjs → main-jEm7Czew.cjs} +1 -1
  29. package/dist/ss-component.cjs +1 -1
  30. package/dist/ss-component.css +1 -1
  31. package/dist/ss-component.js +5 -5
  32. package/dist/ss-component2.cjs +1 -1
  33. package/dist/ss-component2.js +8 -8
  34. package/dist/{threeModel-9C1GaQDe.js → threeModel-BpdLnMl1.js} +1 -1
  35. package/dist/{threeModel-CjBRvpDw.cjs → threeModel-DwQ75fKg.cjs} +1 -1
  36. package/dist/{threeSceneView-TcJCWtoE.cjs → threeSceneView-Axgfz3uK.cjs} +1 -1
  37. package/dist/{threeSceneView-CuW5ZE_z.js → threeSceneView-C8JSK9s3.js} +3 -3
  38. package/dist/{threeSceneViewForCPMPIP-Clh-ry8L.js → threeSceneViewForCPMPIP-BfCaPn02.js} +1 -1
  39. package/dist/{threeSceneViewForCPMPIP-BK4boj8r.cjs → threeSceneViewForCPMPIP-C_s06wG7.cjs} +1 -1
  40. package/dist/{threeViewerHost-s3KEeoPW.cjs → threeViewerHost-D-VacQas.cjs} +1 -1
  41. package/dist/{threeViewerHost-C9P34BEh.js → threeViewerHost-sQC1OuHN.js} +1 -1
  42. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),C=require("./request-Dl8yi2iS.cjs"),_=require("./index-CMUsYepp.cjs"),N=require("./index-DmwxzDGW.cjs"),M=require("./JSEncrypt-IYbV4kRj.cjs"),Q=require("./index-B7964G2F.cjs"),X=require("./index-Bn_H21fe.cjs"),T=require("./index-CHPMsDPK.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U=require("./index-BpPyaNFa.cjs");function Y(r,s){const t=new M.JSEncrypt;return t.setPublicKey(s),t.encrypt(r)||""}function Z(r,s){const t=new M.JSEncrypt;return t.setPrivateKey(s),t.decrypt(r)||""}const V=_.useLoginState(_.pinia),{loginUserInfo:p,cryptoInfo:x}=_.storeToRefs(V),ee=_.useMenuState(_.pinia),{activeMenuPath:A}=_.storeToRefs(ee),L=e.ref(0),K=e.computed(()=>{var r,s,t,o,l,u,a,f,b,m,y;return[{label:"",name:"账号",prop:"账号",value:((r=p.value)==null?void 0:r.account)||(((s=p.value)==null?void 0:s.账号)??"未知")},{label:"",name:"角色名称",prop:"角色名称",value:((t=p.value)==null?void 0:t.layer)==="superAdmin"?"超级管理员":(o=p.value)==null?void 0:o.角色名称},{label:"",name:"部门名称",prop:"部门名称",value:((l=p.value)==null?void 0:l.部门名称)??"未知"},{label:"",name:"状态",prop:"状态",value:((u=p.value)==null?void 0:u.layer)==="superAdmin"?"启用":((a=p.value)==null?void 0:a.状态)??"未知"},{label:"",prop:"头像",isFormColHidden:!0,value:((f=p.value)==null?void 0:f.layer)==="superAdmin"?"启用":((b=p.value)==null?void 0:b.状态)??"未知"},{label:"",prop:"签名",isFormColHidden:!0,value:((m=p.value)==null?void 0:m.layer)==="superAdmin"?"启用":((y=p.value)==null?void 0:y.状态)??"未知"}]}),te=()=>{},q=e.ref(!1),E=e.reactive({dialogTitle:"电子签名",dialogWidth:"30",dialogShow:!1,url:""}),D=e.ref([{label:"签字版",icon:C.edit_pen_default,type:"button",disabled:!1},{label:"电子签名",icon:C.edit_default,type:"button",disabled:!1},{label:"上传手写签名",icon:C.upload_filled_default,type:"buttonUpload",disabled:!1}]),P=e.ref(!1),$=e.ref(!1),z=e.ref(!1),O=e.computed(()=>{var o,l,u;const r=sessionStorage.getItem("authority"),s=JSON.parse(r||""),t=(o=A.value)!=null&&o.startsWith("/")?(l=A.value)==null?void 0:l.substring(1):A.value;return Array.isArray(s)?(z.value=!(s!=null&&s.includes(`${t}/上传头像`)),(u=D.value)==null?void 0:u.map(a=>({...a,disabled:!(s!=null&&s.includes(`${t}/签名`))}))):typeof s=="string"&&(s==null?void 0:s.toUpperCase())==="SUPERADMIN"?D.value:[]}),ae=e.computed(()=>[{key:"signConfig",contents:E},{key:"signTypeList",contents:O.value}]),re=r=>{E.dialogShow=r.label==="电子签名"},W=()=>{E.dialogShow=!1},j=async r=>{var t,o,l,u,a,f,b,m,y;const s=await N.getInsofDataApi({id:r});if(((t=s==null?void 0:s.data)==null?void 0:t.code)===200&&s.data.result&&Array.isArray(s.data.result)&&s.data.result.length>0){const d={...(u=(l=(o=s.data.result)==null?void 0:o[0])==null?void 0:l.value)==null?void 0:u.tableData,id:(f=(a=s.data.result)==null?void 0:a[0])==null?void 0:f.id,layer:(y=(m=(b=s.data.result)==null?void 0:b[0])==null?void 0:m.key)==null?void 0:y.layer};V.setLoginUserInfo(d)}},H=async(r,s)=>{var o,l,u;const t=_.cloneDeep(r);t==null||delete t.id;try{const a=await N.updateInsofDataApi({id:(o=p.value)==null?void 0:o.id,value:{tableData:t}});((l=a==null?void 0:a.data)==null?void 0:l.code)===200&&(W(),C.ElMessage.success("修改成功"),await j((u=p.value)==null?void 0:u.id),await V.setLogRecordAsync({type:s,data:r},A.value))}catch{C.ElMessage.error("修改响应失败")}finally{q.value=!1,P.value=!1,$.value=!1}},se=async(r,s)=>{var l;const t=r==="avatarUrl"?"头像":"签名",o={...p.value,status:((l=p.value)==null?void 0:l.status)??"启用",[t]:s};P.value=r==="avatarUrl",$.value=r==="signature",await H(o,"图片修改")},I=e.reactive({baseCols:[],otherCols:[]}),J=e.ref([]),G=e.ref(),ne=(r,s,t)=>{var u,a,f,b,m,y;let o;const l=s;((a=(u=p.value)==null?void 0:u.layer)==null?void 0:a.toUpperCase())!=="SUPERADMIN"?o=(f=p.value)!=null&&f.password?Z((b=p.value)==null?void 0:b.password,(m=x==null?void 0:x.value)==null?void 0:m.privateKey):Q.resetPassword:o=(y=p.value)==null?void 0:y.password,o===l?t():t(new Error("输入的密码与原密码不匹配,请重新输入"))},oe=(r,s,t)=>{s?t():t(new Error("请输入密码"))},le=(r,s,t)=>{var o;s!==((o=G.value)==null?void 0:o.newtPass)?t(new Error("两次输入的密码不一致")):t()},ue=async()=>{var s,t,o,l,u,a,f,b,m,y;const r=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:"系统管理/用户管理"}});if(((s=r==null?void 0:r.data)==null?void 0:s.code)===200&&r.data.result&&((t=r.data.result)==null?void 0:t.length)>0){const d=(f=(a=(u=(l=(o=r.data.result)==null?void 0:o[0])==null?void 0:l.value)==null?void 0:u.pageData)==null?void 0:a.compData)==null?void 0:f.find(n=>(n==null?void 0:n.key)==="header"),w=(b=K.value)==null?void 0:b.map(n=>n==null?void 0:n.prop);I.baseCols=d&&((m=d.contents)==null?void 0:m.map(n=>({...n,isFormColHidden:(w==null?void 0:w.includes(n==null?void 0:n.prop))||(n==null?void 0:n.label)==="操作"})));const S=(y=d.contents)==null?void 0:y.find(n=>(n==null?void 0:n.prop)==="password"),i=[{...S,label:"当前密码",prop:"currentPass",validator:ne},{...S,label:"新密码",prop:"newtPass",validator:oe},{...S,label:"确认密码",prop:"confirmNewPass",validator:le}];I.otherCols=i,de(p.value)}},ie=r=>{G.value=r},ce=async({content:r,buttonName:s})=>{var o,l,u,a,f;let t;s==="确定"&&(t={...p.value,status:((o=p.value)==null?void 0:o.status)??"启用",password:((u=(l=p.value)==null?void 0:l.layer)==null?void 0:u.toUpperCase())==="SUPERADMIN"?r==null?void 0:r.confirmNewPass:Y(r==null?void 0:r.confirmNewPass,(a=x.value)==null?void 0:a.publicKey)}),s==="保存基本信息"&&(t={...p.value,...r,status:((f=p.value)==null?void 0:f.status)??"启用"}),q.value=!0,await H(t,s)},F=()=>{var o,l;const r={base:[{label:"保存基本信息"}],other:[{label:"重置",background:"#b7b8b8"},{label:"确定"}]},s=sessionStorage.getItem("authority"),t=JSON.parse(s||"");if(Array.isArray(t)){const u=(o=A.value)!=null&&o.startsWith("/")?(l=A.value)==null?void 0:l.substring(1):A.value,a=t!=null&&t.includes(`${u}/基本信息`)?r==null?void 0:r.base:[],f=t!=null&&t.includes(`${u}/修改密码`)?r==null?void 0:r.other:[];return{base:a,other:f}}else return typeof t=="string"&&(t==null?void 0:t.toUpperCase())==="SUPERADMIN"?r:null},de=r=>{var s,t,o,l,u;J.value=[{value:"基础信息",label:"基础信息",children:[{type:"form",content:{rowContents:(s=I.baseCols)==null?void 0:s.map(a=>({...a,width:2,type:a==null?void 0:a.formType,name:a==null?void 0:a.prop,prop:a==null?void 0:a.prop,contents:a==null?void 0:a.options,value:r[a==null?void 0:a.prop]})),formRules:{userName:[{required:!0,message:"输入不能为空",trigger:"blur"}],birthDay:[{required:!0,message:"输入不能为空",trigger:"blur"}],phone:[{required:!0,message:"输入不能为空",trigger:"blur"}]},buttonValue:(t=F())==null?void 0:t.base,isEnableWrap:!1,isButtonRow:!1},value:""}]},{value:"修改密码",label:"修改密码",children:[{type:"form",content:{rowContents:(o=I.otherCols)==null?void 0:o.map(a=>({...a,width:1,type:a==null?void 0:a.formType,name:a==null?void 0:a.prop,contents:a==null?void 0:a.options})),formRules:(l=I.otherCols)==null?void 0:l.reduce((a,f)=>(a[f.prop]=[{required:!0,message:"输入有误",trigger:"change"},{validator:(b,m,y)=>f.validator(b,m,y),trigger:"blur"}],a),{}),buttonValue:(u=F())==null?void 0:u.other,isEnableWrap:!1},value:""}]}]},pe=Object.freeze(Object.defineProperty({__proto__:null,avatarLoading:P,beforeSignDestroy:W,changeFormTrigger:ie,clickFormButton:te,clickSignButton:re,clickTabButton:ce,getUserTableHeadersAsync:ue,itemData:ae,loading:q,refreshLoginUserInfoAsync:j,rowContents:K,signPadInfo:E,signTypes:O,signatureLoading:$,submitImageAsync:se,tabKey:L,tabsContents:J,tempSignTypes:D,uploadDisabled:z},Symbol.toStringTag,{value:"Module"})),fe={class:"avatar-model-wrap"},ge={key:0},ve=e.defineComponent({__name:"index",props:{disabled:{type:Boolean,default:!1},avatarUrl:{type:String,default:""},size:{type:[String,Number],default:"large"},userInfo:{type:Object,default:{}},clickStop:{type:Boolean,default:!0}},emits:["submitImage","deleteImage"],setup(r,{emit:s}){const t=r,o=s,l=e.computed(()=>"http://222.92.178.198:62001"),u=e.ref(""),a=e.ref(""),f=e.ref();e.watch(()=>{var d;return(d=t.userInfo)==null?void 0:d.头像},d=>{a.value=d?l.value+"/"+d:""},{immediate:!0});const b=async()=>{if(!(t!=null&&t.disabled))try{const d=await _.platformDownloadFile({url:u.value});if(d.status!==200)throw new Error(`HTTP error! status: ${d.status}`);const w=new Blob([d.data],{type:d.headers["content-type"]});f.value=w}catch(d){throw new Error(d)}},m=async d=>{var w,S,i,n,h;try{const g=await T.uploadFile(d);((w=g==null?void 0:g.data)==null?void 0:w.code)===200&&(a.value=l.value+"/"+((i=(S=g.data)==null?void 0:S.result)==null?void 0:i.url),u.value=(h=(n=g.data)==null?void 0:n.result)==null?void 0:h.url,o("submitImage",u.value))}catch(g){C.ElMessage.error(g)}},y=async()=>{try{if(!a.value)return}catch(d){C.ElMessage.error(d)}};return(d,w)=>{var S,i;return e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(X.Avatar,{avatarUrl:a.value??"",avatarBlob:f.value,size:r.size,onClickAvatar:b,onSubmitImage:m,onDeleteImage:y,clickStop:t==null?void 0:t.clickStop},{avatarDefault:e.withCtx(()=>{var n,h,g,v;return[e.createTextVNode(e.toDisplayString(((h=(n=r.userInfo)==null?void 0:n.account)==null?void 0:h.charAt(0))||((v=(g=r.userInfo)==null?void 0:g.姓名)==null?void 0:v.charAt(0))||""),1)]}),_:1},8,["avatarUrl","avatarBlob","size","clickStop"]),r.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(((S=r.userInfo)==null?void 0:S.account)||((i=r.userInfo)==null?void 0:i.账号)||"未知"),1))])}}}),ye=R._export_sfc(ve,[["__scopeId","data-v-1a1f2575"]]),be=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["clickSignButton","clickSubmitSign","beforeDestroy"],setup(r,{emit:s}){const t=r,o=e.ref({}),l=e.ref([]),u=s,a=i=>{o.value.dialogShow=(i==null?void 0:i.label)==="电子签名",u("clickSignButton",i)},f=()=>{o.value.dialogShow=!1,u("beforeDestroy")},b=e.computed(()=>"http://222.92.178.198:62001"),m=i=>{var c;const n=i.split(","),h=(c=n==null?void 0:n[0])==null?void 0:c.match(/:(.*?);/)[1],g=atob(n[1]);let v=g.length;const k=new Uint8Array(v);for(;v--;)k[v]=g.charCodeAt(v);return new Blob([k],{type:h})},y=async i=>{var n,h,g;try{const v=await T.uploadFile(i);((n=v==null?void 0:v.data)==null?void 0:n.code)===200&&u("clickSubmitSign",(g=(h=v.data)==null?void 0:h.result)==null?void 0:g.url)}catch(v){C.ElMessage.error(v)}},d=e.ref(""),w=i=>{d.value=i,o.value.dialogShow=!1;const n=new FormData,h=m(i);n.append("file",h,"image.png"),y(n)},S=i=>{const n=new FormData;n.append("file",i==null?void 0:i.file),y(n)};return e.watch(()=>t==null?void 0:t.itemData,i=>{var h,g,v,k;d.value="",(h=o.value)!=null&&h.dialogShow&&(o.value.dialogShow=!1);const n=(g=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signConfig"))==null?void 0:g.contents;n&&Object.keys(n).forEach(c=>{(n[c]===void 0||n[c]===null||n[c]==="")&&delete n[c]}),o.value=(v=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signConfig"))==null?void 0:v.contents,l.value=(k=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signTypeList"))==null?void 0:k.contents},{immediate:!0}),(i,n)=>{const h=e.resolveComponent("el-empty"),g=e.resolveComponent("el-image"),v=e.resolveComponent("el-button"),k=e.resolveComponent("el-upload");return e.openBlock(),e.createBlock(T.Signature,{signPadInfo:o.value,onBeforeDestroy:f,onClickSubmitSign:w},{signatureRender:e.withCtx(()=>{var c,B;return[e.createElementVNode("div",{class:"signature-render",style:e.normalizeStyle({width:`${(c=o.value)==null?void 0:c.signPadWidth}%`})},[e.createVNode(g,{src:d.value?d.value:b.value+"/"+((B=r.userInfo)==null?void 0:B.签名),fit:"contain"},{error:e.withCtx(()=>[e.createVNode(h,{"image-size":60,description:" "},{image:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:"emptyImg"})]),_:1})]),_:1},8,["src"])],4)]}),signatureTypes:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,c=>{var B;return e.openBlock(),e.createElementBlock("div",{key:c.label,class:"signature-button"},[(B=c.label)!=null&&B.includes("上传")?(e.openBlock(),e.createBlock(k,{key:0,ref_for:!0,ref:"uploadRef","http-request":S,"show-file-list":!1},{trigger:e.withCtx(()=>[e.createVNode(v,{disabled:c.disabled,id:"themeButton"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),icon:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:c.icon??""},null,8,["name"])]),_:2},1032,["disabled"])]),_:2},1536)):(e.openBlock(),e.createBlock(v,{key:1,id:"themeButton",disabled:c.disabled,onClick:he=>a(c)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),icon:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:c.icon??""},null,8,["name"])]),_:2},1032,["disabled","onClick"]))])}),128))]),_:1},8,["signPadInfo"])}}}),me=R._export_sfc(be,[["__scopeId","data-v-ce5a2314"]]);exports.State=pe;exports.ssAvatar=ye;exports.ssSignature=me;exports.tabKey=L;
1
+ "use strict";const e=require("vue"),C=require("./request-Dl8yi2iS.cjs"),_=require("./index-CMUsYepp.cjs"),N=require("./index-DmwxzDGW.cjs"),M=require("./JSEncrypt-IYbV4kRj.cjs"),Q=require("./index-B7964G2F.cjs"),X=require("./index-Bn_H21fe.cjs"),T=require("./index-DIeTpbPH.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U=require("./index-BpPyaNFa.cjs");function Y(r,s){const t=new M.JSEncrypt;return t.setPublicKey(s),t.encrypt(r)||""}function Z(r,s){const t=new M.JSEncrypt;return t.setPrivateKey(s),t.decrypt(r)||""}const V=_.useLoginState(_.pinia),{loginUserInfo:p,cryptoInfo:x}=_.storeToRefs(V),ee=_.useMenuState(_.pinia),{activeMenuPath:A}=_.storeToRefs(ee),L=e.ref(0),K=e.computed(()=>{var r,s,t,o,l,u,a,f,b,m,y;return[{label:"",name:"账号",prop:"账号",value:((r=p.value)==null?void 0:r.account)||(((s=p.value)==null?void 0:s.账号)??"未知")},{label:"",name:"角色名称",prop:"角色名称",value:((t=p.value)==null?void 0:t.layer)==="superAdmin"?"超级管理员":(o=p.value)==null?void 0:o.角色名称},{label:"",name:"部门名称",prop:"部门名称",value:((l=p.value)==null?void 0:l.部门名称)??"未知"},{label:"",name:"状态",prop:"状态",value:((u=p.value)==null?void 0:u.layer)==="superAdmin"?"启用":((a=p.value)==null?void 0:a.状态)??"未知"},{label:"",prop:"头像",isFormColHidden:!0,value:((f=p.value)==null?void 0:f.layer)==="superAdmin"?"启用":((b=p.value)==null?void 0:b.状态)??"未知"},{label:"",prop:"签名",isFormColHidden:!0,value:((m=p.value)==null?void 0:m.layer)==="superAdmin"?"启用":((y=p.value)==null?void 0:y.状态)??"未知"}]}),te=()=>{},q=e.ref(!1),E=e.reactive({dialogTitle:"电子签名",dialogWidth:"30",dialogShow:!1,url:""}),D=e.ref([{label:"签字版",icon:C.edit_pen_default,type:"button",disabled:!1},{label:"电子签名",icon:C.edit_default,type:"button",disabled:!1},{label:"上传手写签名",icon:C.upload_filled_default,type:"buttonUpload",disabled:!1}]),P=e.ref(!1),$=e.ref(!1),z=e.ref(!1),O=e.computed(()=>{var o,l,u;const r=sessionStorage.getItem("authority"),s=JSON.parse(r||""),t=(o=A.value)!=null&&o.startsWith("/")?(l=A.value)==null?void 0:l.substring(1):A.value;return Array.isArray(s)?(z.value=!(s!=null&&s.includes(`${t}/上传头像`)),(u=D.value)==null?void 0:u.map(a=>({...a,disabled:!(s!=null&&s.includes(`${t}/签名`))}))):typeof s=="string"&&(s==null?void 0:s.toUpperCase())==="SUPERADMIN"?D.value:[]}),ae=e.computed(()=>[{key:"signConfig",contents:E},{key:"signTypeList",contents:O.value}]),re=r=>{E.dialogShow=r.label==="电子签名"},W=()=>{E.dialogShow=!1},j=async r=>{var t,o,l,u,a,f,b,m,y;const s=await N.getInsofDataApi({id:r});if(((t=s==null?void 0:s.data)==null?void 0:t.code)===200&&s.data.result&&Array.isArray(s.data.result)&&s.data.result.length>0){const d={...(u=(l=(o=s.data.result)==null?void 0:o[0])==null?void 0:l.value)==null?void 0:u.tableData,id:(f=(a=s.data.result)==null?void 0:a[0])==null?void 0:f.id,layer:(y=(m=(b=s.data.result)==null?void 0:b[0])==null?void 0:m.key)==null?void 0:y.layer};V.setLoginUserInfo(d)}},H=async(r,s)=>{var o,l,u;const t=_.cloneDeep(r);t==null||delete t.id;try{const a=await N.updateInsofDataApi({id:(o=p.value)==null?void 0:o.id,value:{tableData:t}});((l=a==null?void 0:a.data)==null?void 0:l.code)===200&&(W(),C.ElMessage.success("修改成功"),await j((u=p.value)==null?void 0:u.id),await V.setLogRecordAsync({type:s,data:r},A.value))}catch{C.ElMessage.error("修改响应失败")}finally{q.value=!1,P.value=!1,$.value=!1}},se=async(r,s)=>{var l;const t=r==="avatarUrl"?"头像":"签名",o={...p.value,status:((l=p.value)==null?void 0:l.status)??"启用",[t]:s};P.value=r==="avatarUrl",$.value=r==="signature",await H(o,"图片修改")},I=e.reactive({baseCols:[],otherCols:[]}),J=e.ref([]),G=e.ref(),ne=(r,s,t)=>{var u,a,f,b,m,y;let o;const l=s;((a=(u=p.value)==null?void 0:u.layer)==null?void 0:a.toUpperCase())!=="SUPERADMIN"?o=(f=p.value)!=null&&f.password?Z((b=p.value)==null?void 0:b.password,(m=x==null?void 0:x.value)==null?void 0:m.privateKey):Q.resetPassword:o=(y=p.value)==null?void 0:y.password,o===l?t():t(new Error("输入的密码与原密码不匹配,请重新输入"))},oe=(r,s,t)=>{s?t():t(new Error("请输入密码"))},le=(r,s,t)=>{var o;s!==((o=G.value)==null?void 0:o.newtPass)?t(new Error("两次输入的密码不一致")):t()},ue=async()=>{var s,t,o,l,u,a,f,b,m,y;const r=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:"系统管理/用户管理"}});if(((s=r==null?void 0:r.data)==null?void 0:s.code)===200&&r.data.result&&((t=r.data.result)==null?void 0:t.length)>0){const d=(f=(a=(u=(l=(o=r.data.result)==null?void 0:o[0])==null?void 0:l.value)==null?void 0:u.pageData)==null?void 0:a.compData)==null?void 0:f.find(n=>(n==null?void 0:n.key)==="header"),w=(b=K.value)==null?void 0:b.map(n=>n==null?void 0:n.prop);I.baseCols=d&&((m=d.contents)==null?void 0:m.map(n=>({...n,isFormColHidden:(w==null?void 0:w.includes(n==null?void 0:n.prop))||(n==null?void 0:n.label)==="操作"})));const S=(y=d.contents)==null?void 0:y.find(n=>(n==null?void 0:n.prop)==="password"),i=[{...S,label:"当前密码",prop:"currentPass",validator:ne},{...S,label:"新密码",prop:"newtPass",validator:oe},{...S,label:"确认密码",prop:"confirmNewPass",validator:le}];I.otherCols=i,de(p.value)}},ie=r=>{G.value=r},ce=async({content:r,buttonName:s})=>{var o,l,u,a,f;let t;s==="确定"&&(t={...p.value,status:((o=p.value)==null?void 0:o.status)??"启用",password:((u=(l=p.value)==null?void 0:l.layer)==null?void 0:u.toUpperCase())==="SUPERADMIN"?r==null?void 0:r.confirmNewPass:Y(r==null?void 0:r.confirmNewPass,(a=x.value)==null?void 0:a.publicKey)}),s==="保存基本信息"&&(t={...p.value,...r,status:((f=p.value)==null?void 0:f.status)??"启用"}),q.value=!0,await H(t,s)},F=()=>{var o,l;const r={base:[{label:"保存基本信息"}],other:[{label:"重置",background:"#b7b8b8"},{label:"确定"}]},s=sessionStorage.getItem("authority"),t=JSON.parse(s||"");if(Array.isArray(t)){const u=(o=A.value)!=null&&o.startsWith("/")?(l=A.value)==null?void 0:l.substring(1):A.value,a=t!=null&&t.includes(`${u}/基本信息`)?r==null?void 0:r.base:[],f=t!=null&&t.includes(`${u}/修改密码`)?r==null?void 0:r.other:[];return{base:a,other:f}}else return typeof t=="string"&&(t==null?void 0:t.toUpperCase())==="SUPERADMIN"?r:null},de=r=>{var s,t,o,l,u;J.value=[{value:"基础信息",label:"基础信息",children:[{type:"form",content:{rowContents:(s=I.baseCols)==null?void 0:s.map(a=>({...a,width:2,type:a==null?void 0:a.formType,name:a==null?void 0:a.prop,prop:a==null?void 0:a.prop,contents:a==null?void 0:a.options,value:r[a==null?void 0:a.prop]})),formRules:{userName:[{required:!0,message:"输入不能为空",trigger:"blur"}],birthDay:[{required:!0,message:"输入不能为空",trigger:"blur"}],phone:[{required:!0,message:"输入不能为空",trigger:"blur"}]},buttonValue:(t=F())==null?void 0:t.base,isEnableWrap:!1,isButtonRow:!1},value:""}]},{value:"修改密码",label:"修改密码",children:[{type:"form",content:{rowContents:(o=I.otherCols)==null?void 0:o.map(a=>({...a,width:1,type:a==null?void 0:a.formType,name:a==null?void 0:a.prop,contents:a==null?void 0:a.options})),formRules:(l=I.otherCols)==null?void 0:l.reduce((a,f)=>(a[f.prop]=[{required:!0,message:"输入有误",trigger:"change"},{validator:(b,m,y)=>f.validator(b,m,y),trigger:"blur"}],a),{}),buttonValue:(u=F())==null?void 0:u.other,isEnableWrap:!1},value:""}]}]},pe=Object.freeze(Object.defineProperty({__proto__:null,avatarLoading:P,beforeSignDestroy:W,changeFormTrigger:ie,clickFormButton:te,clickSignButton:re,clickTabButton:ce,getUserTableHeadersAsync:ue,itemData:ae,loading:q,refreshLoginUserInfoAsync:j,rowContents:K,signPadInfo:E,signTypes:O,signatureLoading:$,submitImageAsync:se,tabKey:L,tabsContents:J,tempSignTypes:D,uploadDisabled:z},Symbol.toStringTag,{value:"Module"})),fe={class:"avatar-model-wrap"},ge={key:0},ve=e.defineComponent({__name:"index",props:{disabled:{type:Boolean,default:!1},avatarUrl:{type:String,default:""},size:{type:[String,Number],default:"large"},userInfo:{type:Object,default:{}},clickStop:{type:Boolean,default:!0}},emits:["submitImage","deleteImage"],setup(r,{emit:s}){const t=r,o=s,l=e.computed(()=>"http://222.92.178.198:62001"),u=e.ref(""),a=e.ref(""),f=e.ref();e.watch(()=>{var d;return(d=t.userInfo)==null?void 0:d.头像},d=>{a.value=d?l.value+"/"+d:""},{immediate:!0});const b=async()=>{if(!(t!=null&&t.disabled))try{const d=await _.platformDownloadFile({url:u.value});if(d.status!==200)throw new Error(`HTTP error! status: ${d.status}`);const w=new Blob([d.data],{type:d.headers["content-type"]});f.value=w}catch(d){throw new Error(d)}},m=async d=>{var w,S,i,n,h;try{const g=await T.uploadFile(d);((w=g==null?void 0:g.data)==null?void 0:w.code)===200&&(a.value=l.value+"/"+((i=(S=g.data)==null?void 0:S.result)==null?void 0:i.url),u.value=(h=(n=g.data)==null?void 0:n.result)==null?void 0:h.url,o("submitImage",u.value))}catch(g){C.ElMessage.error(g)}},y=async()=>{try{if(!a.value)return}catch(d){C.ElMessage.error(d)}};return(d,w)=>{var S,i;return e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(X.Avatar,{avatarUrl:a.value??"",avatarBlob:f.value,size:r.size,onClickAvatar:b,onSubmitImage:m,onDeleteImage:y,clickStop:t==null?void 0:t.clickStop},{avatarDefault:e.withCtx(()=>{var n,h,g,v;return[e.createTextVNode(e.toDisplayString(((h=(n=r.userInfo)==null?void 0:n.account)==null?void 0:h.charAt(0))||((v=(g=r.userInfo)==null?void 0:g.姓名)==null?void 0:v.charAt(0))||""),1)]}),_:1},8,["avatarUrl","avatarBlob","size","clickStop"]),r.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",ge,e.toDisplayString(((S=r.userInfo)==null?void 0:S.account)||((i=r.userInfo)==null?void 0:i.账号)||"未知"),1))])}}}),ye=R._export_sfc(ve,[["__scopeId","data-v-1a1f2575"]]),be=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["clickSignButton","clickSubmitSign","beforeDestroy"],setup(r,{emit:s}){const t=r,o=e.ref({}),l=e.ref([]),u=s,a=i=>{o.value.dialogShow=(i==null?void 0:i.label)==="电子签名",u("clickSignButton",i)},f=()=>{o.value.dialogShow=!1,u("beforeDestroy")},b=e.computed(()=>"http://222.92.178.198:62001"),m=i=>{var c;const n=i.split(","),h=(c=n==null?void 0:n[0])==null?void 0:c.match(/:(.*?);/)[1],g=atob(n[1]);let v=g.length;const k=new Uint8Array(v);for(;v--;)k[v]=g.charCodeAt(v);return new Blob([k],{type:h})},y=async i=>{var n,h,g;try{const v=await T.uploadFile(i);((n=v==null?void 0:v.data)==null?void 0:n.code)===200&&u("clickSubmitSign",(g=(h=v.data)==null?void 0:h.result)==null?void 0:g.url)}catch(v){C.ElMessage.error(v)}},d=e.ref(""),w=i=>{d.value=i,o.value.dialogShow=!1;const n=new FormData,h=m(i);n.append("file",h,"image.png"),y(n)},S=i=>{const n=new FormData;n.append("file",i==null?void 0:i.file),y(n)};return e.watch(()=>t==null?void 0:t.itemData,i=>{var h,g,v,k;d.value="",(h=o.value)!=null&&h.dialogShow&&(o.value.dialogShow=!1);const n=(g=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signConfig"))==null?void 0:g.contents;n&&Object.keys(n).forEach(c=>{(n[c]===void 0||n[c]===null||n[c]==="")&&delete n[c]}),o.value=(v=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signConfig"))==null?void 0:v.contents,l.value=(k=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="signTypeList"))==null?void 0:k.contents},{immediate:!0}),(i,n)=>{const h=e.resolveComponent("el-empty"),g=e.resolveComponent("el-image"),v=e.resolveComponent("el-button"),k=e.resolveComponent("el-upload");return e.openBlock(),e.createBlock(T.Signature,{signPadInfo:o.value,onBeforeDestroy:f,onClickSubmitSign:w},{signatureRender:e.withCtx(()=>{var c,B;return[e.createElementVNode("div",{class:"signature-render",style:e.normalizeStyle({width:`${(c=o.value)==null?void 0:c.signPadWidth}%`})},[e.createVNode(g,{src:d.value?d.value:b.value+"/"+((B=r.userInfo)==null?void 0:B.签名),fit:"contain"},{error:e.withCtx(()=>[e.createVNode(h,{"image-size":60,description:" "},{image:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:"emptyImg"})]),_:1})]),_:1},8,["src"])],4)]}),signatureTypes:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,c=>{var B;return e.openBlock(),e.createElementBlock("div",{key:c.label,class:"signature-button"},[(B=c.label)!=null&&B.includes("上传")?(e.openBlock(),e.createBlock(k,{key:0,ref_for:!0,ref:"uploadRef","http-request":S,"show-file-list":!1},{trigger:e.withCtx(()=>[e.createVNode(v,{disabled:c.disabled,id:"themeButton"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),icon:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:c.icon??""},null,8,["name"])]),_:2},1032,["disabled"])]),_:2},1536)):(e.openBlock(),e.createBlock(v,{key:1,id:"themeButton",disabled:c.disabled,onClick:he=>a(c)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.label),1)]),icon:e.withCtx(()=>[e.createVNode(U.SvgIcon,{name:c.icon??""},null,8,["name"])]),_:2},1032,["disabled","onClick"]))])}),128))]),_:1},8,["signPadInfo"])}}}),me=R._export_sfc(be,[["__scopeId","data-v-ce5a2314"]]);exports.State=pe;exports.ssAvatar=ye;exports.ssSignature=me;exports.tabKey=L;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as y, ref as C, onMounted as _, createElementBlock as c, openBlock as g, createVNode as v } from "vue";
2
2
  import { u as h, p as k, s as x, c as m } from "./index-CwJwXVns.js";
3
- import { W as M } from "./index-CtOsUUWU.js";
3
+ import { W as M } from "./index-DvGAjvlh.js";
4
4
  import { a as D, d as T, f as S } from "./index-BmZwVwZC.js";
5
5
  import { g as w } from "./index-DUq4XELr.js";
6
6
  import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";