ss-component-new 1.3.347 → 1.3.348
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-z-nVa-Ht.cjs → array-FcoisUZz.cjs} +1 -1
- package/dist/{array-Dc0UPsX7.js → array-tQgs72UX.js} +2 -2
- package/dist/{index-BxnKd-ol.cjs → index-6OSpT7hv.cjs} +1 -1
- package/dist/{index-CJHajG-Z.cjs → index-BGa33sG1.cjs} +1 -1
- package/dist/{index-wQV7WQqs.cjs → index-B_1Q8mLt.cjs} +1 -1
- package/dist/{index-D9_uWPXi.cjs → index-BjsPZnqT.cjs} +1 -1
- package/dist/{index-BYluVfWF.cjs → index-BktK2g3L.cjs} +1 -1
- package/dist/{index-CSBsbB89.cjs → index-C-8tPwdx.cjs} +1 -1
- package/dist/{index-DH9VAr_q.js → index-C3LcEFEV.js} +1 -1
- package/dist/index-C49WP5XE.cjs +25 -0
- package/dist/{index-CNGWd6r5.js → index-C6uj8qJA.js} +3 -3
- package/dist/{index-CQHICyEP.cjs → index-C9hSFe1b.cjs} +1 -1
- package/dist/{index-AOVJ8y4_.js → index-CJ5ltZK5.js} +2 -2
- package/dist/index-CQbLUdez.cjs +2 -0
- package/dist/{index-WnKTgvLM.js → index-CTOBJJlH.js} +8514 -8510
- package/dist/{index-CuuY8WNN.js → index-CduEGwgu.js} +1 -1
- package/dist/{index-DhOAQpIm.js → index-CiLTRzrU.js} +1 -1
- package/dist/{index-BkiYg6ij.js → index-CvydttkD.js} +4 -4
- package/dist/{index-B5_BX2YN.js → index-DB18f7f2.js} +1 -1
- package/dist/{index-C2vcw4xw.js → index-DIiL0kve.js} +1 -1
- package/dist/index-DNIOl0bw.js +9803 -0
- package/dist/{index-_r2s4_ht.js → index-DZszyNYH.js} +2 -2
- package/dist/{index-CqcLpbt1.cjs → index-D_mCyKO9.cjs} +1 -1
- package/dist/{index-CrkCksf1.js → index-Dc4sh1T8.js} +1 -1
- package/dist/{index-BWEoDx4D.cjs → index-DnCqPfB1.cjs} +1 -1
- package/dist/{index-euqScKcq.js → index-DrHR_0Cv.js} +1 -1
- package/dist/{index-DA-QksrI.cjs → index-LGRyG0hQ.cjs} +1 -1
- package/dist/{index-CPiqzIun.cjs → index-jj0QFPlC.cjs} +1 -1
- package/dist/{main-DUbTQ00H.cjs → main-DRJ7GeCk.cjs} +1 -1
- package/dist/{main-dAcAJd1J.js → main-DX0w-EEu.js} +2 -2
- package/dist/{menuIndex-DwOFonFy.js → menuIndex-BCqWHrXf.js} +64 -60
- package/dist/menuIndex-DxS8zqA8.cjs +1 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +5 -5
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-Bj1dOhmi.cjs → threeModel-BR8TZd8q.cjs} +1 -1
- package/dist/{threeModel-4koqokFa.js → threeModel-pY6LY8LT.js} +1 -1
- package/dist/{threeSceneView-DDdtSYsj.js → threeSceneView-BPPt0FAH.js} +3 -3
- package/dist/{threeSceneView-DSVqbu2-.cjs → threeSceneView-Z0ab5QG0.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Bqg9Utvt.cjs → threeSceneViewForCPMPIP-BMpPRugB.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CiS_rB7d.js → threeSceneViewForCPMPIP-BWZDs-9j.js} +1 -1
- package/dist/{threeViewerHost-BLsxQ4Dv.js → threeViewerHost-BImMBIXv.js} +1 -1
- package/dist/{threeViewerHost-DzWy-nz6.cjs → threeViewerHost-CGZGM3XJ.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BT2Sp_f7.cjs +0 -25
- package/dist/index-DYq4TXda.cjs +0 -2
- package/dist/index-i7SKpIqc.js +0 -9787
- package/dist/menuIndex-DtLiYvfJ.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as C, reactive as k, ref as v, onMounted as D, nextTick as b, resolveComponent as i, resolveDirective as T, createElementBlock as m, openBlock as u, createVNode as t, withCtx as n, withDirectives as w, createElementVNode as p, createTextVNode as _ } from "vue";
|
|
2
|
-
import { S as x } from "./index-
|
|
3
|
-
import { V as B } from "./index-
|
|
2
|
+
import { S as x } from "./index-C3LcEFEV.js";
|
|
3
|
+
import { V as B } from "./index-CTOBJJlH.js";
|
|
4
4
|
import { s as F } from "./index-CnjGqJZS.js";
|
|
5
|
-
import { b as y } from "./index-
|
|
5
|
+
import { b as y } from "./index-DIiL0kve.js";
|
|
6
6
|
import { u as S, p as I, s as N } from "./menu-DGzm1FYA.js";
|
|
7
7
|
import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const E = { class: "menu-module" }, M = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),C=require("./request-BC2w2vGr.cjs"),_=require("./menu-CYazzvub.cjs"),D=require("./index-CW4qJdP8.cjs"),F=require("./JSEncrypt-IYbV4kRj.cjs"),Q=require("./index-6iwwUgL6.cjs"),X=require("./index-Bk50oDfK.cjs"),M=require("./index-DsNHJYr-.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=require("./index-CqcLpbt1.cjs"),U=require("./index-BpPyaNFa.cjs");function Z(r,s){const t=new F.JSEncrypt;return t.setPublicKey(s),t.encrypt(r)||""}function ee(r,s){const t=new F.JSEncrypt;return t.setPrivateKey(s),t.decrypt(r)||""}const N=_.useLoginState(_.pinia),{loginUserInfo:p,cryptoInfo:x}=_.storeToRefs(N),te=_.useMenuState(_.pinia),{activeMenuPath:A}=_.storeToRefs(te),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.状态)??"未知"}]}),ae=()=>{},V=e.ref(!1),E=e.reactive({dialogTitle:"电子签名",dialogWidth:"30",dialogShow:!1,url:""}),T=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}]),q=e.ref(!1),P=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=T.value)==null?void 0:u.map(a=>({...a,disabled:!(s!=null&&s.includes(`${t}/签名`))}))):typeof s=="string"&&(s==null?void 0:s.toUpperCase())==="SUPERADMIN"?T.value:[]}),re=e.computed(()=>[{key:"signConfig",contents:E},{key:"signTypeList",contents:O.value}]),se=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 D.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};N.setLoginUserInfo(d)}},H=async(r,s)=>{var o,l,u;const t=_.cloneDeep(r);t==null||delete t.id;try{const a=await D.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 N.setLogRecordAsync({type:s,data:r},A.value))}catch{C.ElMessage.error("修改响应失败")}finally{V.value=!1,q.value=!1,P.value=!1}},ne=async(r,s)=>{var l;const t=r==="avatarUrl"?"头像":"签名",o={...p.value,status:((l=p.value)==null?void 0:l.status)??"启用",[t]:s};q.value=r==="avatarUrl",P.value=r==="signature",await H(o,"图片修改")},I=e.reactive({baseCols:[],otherCols:[]}),J=e.ref([]),G=e.ref(),oe=(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?ee((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("输入的密码与原密码不匹配,请重新输入"))},le=(r,s,t)=>{s?t():t(new Error("请输入密码"))},ue=(r,s,t)=>{var o;s!==((o=G.value)==null?void 0:o.newtPass)?t(new Error("两次输入的密码不一致")):t()},ie=async()=>{var s,t,o,l,u,a,f,b,m,y;const r=await D.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:oe},{...S,label:"新密码",prop:"newtPass",validator:le},{...S,label:"确认密码",prop:"confirmNewPass",validator:ue}];I.otherCols=i,pe(p.value)}},ce=r=>{G.value=r},de=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:Z(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)??"启用"}),V.value=!0,await H(t,s)},$=()=>{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},pe=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=$())==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=$())==null?void 0:u.other,isEnableWrap:!1},value:""}]}]},fe=Object.freeze(Object.defineProperty({__proto__:null,avatarLoading:q,beforeSignDestroy:W,changeFormTrigger:ce,clickFormButton:ae,clickSignButton:se,clickTabButton:de,getUserTableHeadersAsync:ie,itemData:re,loading:V,refreshLoginUserInfoAsync:j,rowContents:K,signPadInfo:E,signTypes:O,signatureLoading:P,submitImageAsync:ne,tabKey:L,tabsContents:J,tempSignTypes:T,uploadDisabled:z},Symbol.toStringTag,{value:"Module"})),ge={class:"avatar-model-wrap"},ve={key:0},ye=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 M.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",ge,[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",ve,e.toDisplayString(((S=r.userInfo)==null?void 0:S.account)||((i=r.userInfo)==null?void 0:i.账号)||"未知"),1))])}}}),be=R._export_sfc(ye,[["__scopeId","data-v-1a1f2575"]]),me=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 M.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(Y.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:we=>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"])}}}),he=R._export_sfc(me,[["__scopeId","data-v-ce5a2314"]]);exports.State=fe;exports.ssAvatar=be;exports.ssSignature=he;exports.tabKey=L;
|
|
1
|
+
"use strict";const e=require("vue"),C=require("./request-BC2w2vGr.cjs"),_=require("./menu-CYazzvub.cjs"),D=require("./index-CW4qJdP8.cjs"),F=require("./JSEncrypt-IYbV4kRj.cjs"),Q=require("./index-6iwwUgL6.cjs"),X=require("./index-Bk50oDfK.cjs"),M=require("./index-DsNHJYr-.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Y=require("./index-D_mCyKO9.cjs"),U=require("./index-BpPyaNFa.cjs");function Z(r,s){const t=new F.JSEncrypt;return t.setPublicKey(s),t.encrypt(r)||""}function ee(r,s){const t=new F.JSEncrypt;return t.setPrivateKey(s),t.decrypt(r)||""}const N=_.useLoginState(_.pinia),{loginUserInfo:p,cryptoInfo:x}=_.storeToRefs(N),te=_.useMenuState(_.pinia),{activeMenuPath:A}=_.storeToRefs(te),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.状态)??"未知"}]}),ae=()=>{},V=e.ref(!1),E=e.reactive({dialogTitle:"电子签名",dialogWidth:"30",dialogShow:!1,url:""}),T=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}]),q=e.ref(!1),P=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=T.value)==null?void 0:u.map(a=>({...a,disabled:!(s!=null&&s.includes(`${t}/签名`))}))):typeof s=="string"&&(s==null?void 0:s.toUpperCase())==="SUPERADMIN"?T.value:[]}),re=e.computed(()=>[{key:"signConfig",contents:E},{key:"signTypeList",contents:O.value}]),se=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 D.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};N.setLoginUserInfo(d)}},H=async(r,s)=>{var o,l,u;const t=_.cloneDeep(r);t==null||delete t.id;try{const a=await D.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 N.setLogRecordAsync({type:s,data:r},A.value))}catch{C.ElMessage.error("修改响应失败")}finally{V.value=!1,q.value=!1,P.value=!1}},ne=async(r,s)=>{var l;const t=r==="avatarUrl"?"头像":"签名",o={...p.value,status:((l=p.value)==null?void 0:l.status)??"启用",[t]:s};q.value=r==="avatarUrl",P.value=r==="signature",await H(o,"图片修改")},I=e.reactive({baseCols:[],otherCols:[]}),J=e.ref([]),G=e.ref(),oe=(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?ee((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("输入的密码与原密码不匹配,请重新输入"))},le=(r,s,t)=>{s?t():t(new Error("请输入密码"))},ue=(r,s,t)=>{var o;s!==((o=G.value)==null?void 0:o.newtPass)?t(new Error("两次输入的密码不一致")):t()},ie=async()=>{var s,t,o,l,u,a,f,b,m,y;const r=await D.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:oe},{...S,label:"新密码",prop:"newtPass",validator:le},{...S,label:"确认密码",prop:"confirmNewPass",validator:ue}];I.otherCols=i,pe(p.value)}},ce=r=>{G.value=r},de=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:Z(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)??"启用"}),V.value=!0,await H(t,s)},$=()=>{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},pe=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=$())==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=$())==null?void 0:u.other,isEnableWrap:!1},value:""}]}]},fe=Object.freeze(Object.defineProperty({__proto__:null,avatarLoading:q,beforeSignDestroy:W,changeFormTrigger:ce,clickFormButton:ae,clickSignButton:se,clickTabButton:de,getUserTableHeadersAsync:ie,itemData:re,loading:V,refreshLoginUserInfoAsync:j,rowContents:K,signPadInfo:E,signTypes:O,signatureLoading:P,submitImageAsync:ne,tabKey:L,tabsContents:J,tempSignTypes:T,uploadDisabled:z},Symbol.toStringTag,{value:"Module"})),ge={class:"avatar-model-wrap"},ve={key:0},ye=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 M.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",ge,[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",ve,e.toDisplayString(((S=r.userInfo)==null?void 0:S.account)||((i=r.userInfo)==null?void 0:i.账号)||"未知"),1))])}}}),be=R._export_sfc(ye,[["__scopeId","data-v-1a1f2575"]]),me=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 M.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(Y.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:we=>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"])}}}),he=R._export_sfc(me,[["__scopeId","data-v-ce5a2314"]]);exports.State=fe;exports.ssAvatar=be;exports.ssSignature=he;exports.tabKey=L;
|
|
@@ -5,11 +5,11 @@ import "./dayjs.min-B8ub8S6d.js";
|
|
|
5
5
|
import { v as Le, w as ft, u as vt, p as gt } from "./menu-DGzm1FYA.js";
|
|
6
6
|
import { s as _e } from "./index-CnjGqJZS.js";
|
|
7
7
|
import "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-gC8lCe4C.js";
|
|
8
|
-
import "./index-
|
|
8
|
+
import "./index-CTOBJJlH.js";
|
|
9
9
|
import "./index-BHtNKL1L.js";
|
|
10
10
|
import { _ as B } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
|
|
11
11
|
import "./index-BGRqQYv0.js";
|
|
12
|
-
import "./index-
|
|
12
|
+
import "./index-CiLTRzrU.js";
|
|
13
13
|
import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
import { c as me } from "./clone-BUCnBgnS.js";
|
|
15
15
|
const yt = { class: "param-auth" }, ht = { class: "body" }, kt = { class: "node-content-wrapper" }, Ct = { class: "node-label-wrapper" }, bt = { class: "node-label" }, wt = /* @__PURE__ */ J({
|