index.05427870.js 2.9 KB

1
  1. import{a3 as i,aE as p,Z as C,_ as y,d as B,w as d,aF as A,r as h,o as w,G as k,C as R,l as f,u as g,au as S}from"./index.80b93359.js";import{u as x}from"./use-page-search.49c3876c.js";import{h as P,a as M,b as N,c as Y,R as H,M as n}from"./role-modal.a46f91d4.js";import{h as W}from"./index.834d1f02.js";const F=[{value:"1",label:"\u8FD0\u8425\u8D26\u53F7"},{value:"2",label:"\u4E1A\u52A1\u516C\u53F8\u8D26\u53F7"},{value:"3",label:"\u4F9B\u5E94\u5546\u8D26\u53F7"}],j=[{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})=>i(p,null,{default:()=>{var a;return((a=F.find(({value:u})=>String(e.level)===u))==null?void 0:a.label)||"--"}})},{label:"\u72B6\u6001",prop:"status",width:100,cellRenderer:({row:e})=>i(p,{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})=>C(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:100,slot:"operation"}],L={title:"\u516C\u53F8\u8D26\u53F7\u89D2\u8272\u67E5\u8BE2",columns:j,deleteProp:"payNo",statusRowProp:({companyCode:e})=>({companyNo:e}),apis:{httpList:P,httpDelete:M,httpAdd:!0,httpStatus:N,httpUpdate:Y}},m={formItems:[{field:"nickname",type:"input",placeholder:"\u771F\u5B9E\u59D3\u540D",trigger:"change"},{field:"level",type:"select",placeholder:"\u8D26\u53F7\u7B49\u7EA7",options:F,trigger:"change"},{field:"username",type:"input",placeholder:"\u624B\u673A\u53F7",trigger:"change"}]},T=B({__name:"index",setup(e){const a="accountRole",u=d(null),r=d(null),D=t=>({result:{...t||{}},deleteProp:[]}),v={pageSearchHook:()=>x(D,void 0,m)},{run:_}=A({success:()=>r.value.onSearch()}),E={content:{create:()=>u.value.onDisplay(void 0,n.create),preview:t=>u.value.onDisplay(t,n.preview),update:t=>{if(Number(t.level)===3){S.warning("\u4F9B\u5E94\u5546\u7AEF\u8D26\u53F7\u4E0D\u63D0\u4F9B\u62A5\u8868\u529F\u80FD,\u4E0D\u80FD\u8BBE\u7F6E\u89D2\u8272!");return}u.value.onDisplay(t,n.update)}}};function b(t,c){const{roleid:o,id:l}=t,s={status:"1",user_id:l,role_id:o};switch(c){case n.update:_(W(s));break}}return(t,c)=>{const o=h("PageContainer"),l=h("PageAuth");return w(),k(l,{pageName:a},{default:R(()=>[f(o,{hooks:v,events:E,contentConfig:g(L),"search-config":g(m),"get-content-ref":s=>r.value=s},null,8,["contentConfig","search-config","get-content-ref"]),f(H,{ref_key:"roleModalRef",ref:u,onFinanceSave:b},null,512)]),_:1})}}});var Z=y(T,[["__file","C:/Users/a/Desktop/projects/report-v3/src/views/system/accountRole/index.vue"]]);export{Z as default};