1 |
- import{Z as m,cm as f,S,_ as w,d as R,m as g,cn as P,r as a,o as _,A as F,x as p,h as d,u as h,D as M,a as N,cr as W}from"./index.c5430ede.js";import{u as Y}from"./use-page-search.3a30dd0f.js";import{h as H,a as j,b as I,c as L,R as T,M as o,d as U}from"./role-modal.85447652.js";import{h as V}from"./index.4d04ba55.js";const D=[{value:"1",label:"\u8FD0\u8425\u8D26\u53F7"},{value:"2",label:"\u4E1A\u52A1\u516C\u53F8\u8D26\u53F7"},{value:"3",label:"\u4F9B\u5E94\u5546\u8D26\u53F7"}],z=[{type:"selection",width:40,align:"center",hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",minWidth:60,align:"left",hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u624B\u673A\u53F7",prop:"mobile",width:120,align:"left"},{label:"\u771F\u5B9E\u59D3\u540D",prop:"nickname",minWidth:150},{label:"\u8D26\u53F7\u7B49\u7EA7",cellRenderer:({row:e})=>m(f,null,{default:()=>{var n;return((n=D.find(({value:u})=>String(e.level)===u))==null?void 0:n.label)||"--"}})},{label:"\u72B6\u6001",prop:"status",width:100,cellRenderer:({row:e})=>m(f,{type:String(e.status)==="1"?"success":"danger"},{default:()=>String(e.status)==="1"?"\u542F\u7528":"\u7981\u7528"})},{label:"\u89D2\u8272",prop:"role_name",minWidth:150,align:"left"},{label:"\u521B\u5EFA\u65F6\u95F4",width:140,prop:"addtime",formatter:({addtime:e})=>S(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:120,slot:"operation"}],Z={title:"\u516C\u53F8\u8D26\u53F7\u89D2\u8272\u67E5\u8BE2",columns:z,deleteProp:"payNo",statusRowProp:({companyCode:e})=>({companyNo:e}),apis:{httpList:H,httpDelete:j,httpAdd:!0,httpStatus:I,httpUpdate:L}},v={formItems:[{field:"nickname",type:"input",placeholder:"\u771F\u5B9E\u59D3\u540D",trigger:"change"},{field:"level",type:"select",placeholder:"\u8D26\u53F7\u7B49\u7EA7",options:D,trigger:"change"},{field:"username",type:"input",placeholder:"\u624B\u673A\u53F7",trigger:"change"}]},$="accountRole",q=R({__name:"index",setup(e){const n=g(null),u=g(null),E=t=>({result:{...t||{}},deleteProp:[]}),y={pageSearchHook:()=>Y(E,void 0,v)},{run:b}=P({success:()=>u.value.onSearch()}),C={content:{create:()=>n.value.onDisplay(void 0,o.create),preview:t=>n.value.onDisplay(t,o.preview),update:t=>{n.value.onDisplay(t,o.update)}}};async function A(t){W.confirm("\u662F\u5426\u786E\u8BA4\u89E3\u9664\u7ED1\u5B9A?").then(async()=>{(await U({id:t})).code===1&&u.value.onSearch()})}function B(t,l){const{roleid:s,id:c}=t,r={status:"1",user_id:c,role_id:s};switch(l){case o.update:b(V(r));break}}return(t,l)=>{const s=a("el-button"),c=a("el-tooltip"),r=a("PageContainer"),x=a("PageAuth");return _(),F(x,{pageName:$},{default:p(()=>[d(r,{hooks:y,events:C,contentConfig:h(Z),"search-config":h(v),"get-content-ref":i=>u.value=i},{content_action:p(({is_wx:i,id:k})=>[d(c,{content:"\u89E3\u9664\u5FAE\u4FE1\u7ED1\u5B9A"},{default:p(()=>[Number(i)===1?(_(),F(s,{key:0,type:"text",size:"mini",icon:h(M)("close"),onClick:G=>A(k)},null,8,["icon","onClick"])):N("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"]),d(T,{ref_key:"roleModalRef",ref:n,onFinanceSave:B},null,512)]),_:1})}}});var X=w(q,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/system/accountRole/index.vue"]]);export{X as default};
|