index.c9297ced.js 6.3 KB

1
  1. import{aU as c,ac as _,al as v,aS as P,ae as b,_ as k,d as w,w as B,aL as y,r as x,o as R,c as S,l as d,C as q,b as M,u as e,bu as T,ci as W}from"./index.fd765376.js";import I from"./menu-tree.a6ef4434.js";import{u as U}from"./use-page-modal.58e4d08d.js";import"./index.43273d01.js";const{VITE_PROXY_DOMAIN_REAL:au,VITE_PROXY_USER_REAL:L}=_(),s=L+"/admin/",N=u=>c.request("post",`${s}menuaction`,{data:u}),Y=u=>c.request("post",`${s}menuactionadd`,{data:u}),$=u=>c.request("post",`${s}menuactionsave`,{data:u}),O=u=>c.request("post",`${s}menuactionstatus`,{data:u}),V=u=>c.request("post",`${s}menuactiondel`,{data:u}),j=[{type:"selection",width:40,align:"center",hide:({checkList:u})=>!u.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",minWidth:60,align:"left",hide:({checkList:u})=>!u.includes("\u5E8F\u53F7\u5217")},{label:"\u6309\u94AE\u540D\u79F0",prop:"action_name",minWidth:180,align:"left"},{label:"\u72B6\u6001",prop:"status",minWidth:80,cellRenderer:({row:u,props:t})=>v(P,{size:t.size,type:String(u.status)==="1"?"success":"danger"},{default:()=>u.status+""=="0"?"\u7981\u7528":"\u542F\u7528"})},{label:"\u521B\u5EFA\u65F6\u95F4",minWidth:180,prop:"createTime",formatter:({createTime:u})=>b(u).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",minWidth:140,slot:"operation"}],z={title:"\u6309\u94AE\u8BBE\u7F6E",columns:j,notReuqiredInit:!0,notNeedCompanyFilter:!0,apis:{httpList:N,httpDelete:V,httpAdd:Y,httpStatus:O,httpUpdate:$}},F=[{code:"001",name:"\u5217\u8868"},{code:"002",name:"\u6DFB\u52A0"},{code:"003",name:"\u542F\u7528"},{code:"004",name:"\u7981\u7528"},{code:"005",name:"\u4FEE\u6539"},{code:"006",name:"\u5220\u9664"},{code:"007",name:"\u8BE6\u60C5"},{code:"008",name:"\u63D0\u4EA4"},{code:"009",name:"\u64A4\u9500\u8D44\u91D1\u8BA4\u9886"},{code:"010",name:"\u64A4\u9500\u53D1\u7968\u7533\u8BF7"},{code:"011",name:"\u4E0B\u67B6"},{code:"012",name:"\u91CD\u7F6E\u5BC6\u7801"},{code:"013",name:"\u6DFB\u52A0\u91C7\u8D2D\u5BF9\u8D26\u4ED8\u6B3E\u6807\u7B7E"},{code:"014",name:"\u6DFB\u52A0\u91C7\u8D2D\u5BF9\u8D26\u56DE\u7968\u6807\u7B7E"},{code:"015",name:"\u6DFB\u52A0\u9500\u552E\u8BA2\u5355\u5F00\u7968\u6807\u7B7E"},{code:"016",name:"\u6DFB\u52A0\u9500\u552E\u8BA2\u5355\u56DE\u6B3E\u6807\u7B7E"},{code:"017",name:"\u5BFC\u51FA\u56DE\u7968\u6570\u636E"},{code:"018",name:"\u6279\u91CF\u5BFC\u5165\u8BA4\u8BC1\u7ED3\u679C"},{code:"019",name:"\u4E0B\u8F7D\u8BA4\u8BC1\u6A21\u677F"},{code:"020",name:"\u4E70\u65B9\u516C\u53F8\u8D22\u52A1\u5BA1\u6838"},{code:"021",name:"\u4E70\u65B9\u516C\u53F8\u8BA4\u8BC1"},{code:"022",name:"\u64A4\u9500\u5BF9\u8D26\u7533\u8BF7"},{code:"023",name:"\u64A4\u9500\u5BF9\u8D26\u4ED8\u6B3E\u7533\u8BF7"},{code:"024",name:"\u64A4\u9500\u5BF9\u8D26\u56DE\u7968\u7533\u8BF7"},{code:"025",name:"\u8D22\u52A1\u5BA1\u6838"},{code:"026",name:"\u5BFC\u51FA\u53D1\u7968\u7533\u8BF7\u4FE1\u606F"},{code:"027",name:"\u4E0B\u8F7D\u53D1\u7968\u4FE1\u606F\u5BFC\u5165\u6A21\u677F"},{code:"028",name:"\u6279\u91CF\u5BFC\u5165\u8D22\u52A1\u5F00\u7968\u7ED3\u679C\uFF08\u53D1\u7968\u7533\u8BF7\uFF09"},{code:"029",name:"\u4E0B\u8F7D\u8D44\u91D1\u5BFC\u5165\u6A21\u677F"},{code:"030",name:"\u6279\u91CF\u5BFC\u5165\u5BA2\u6237\u4ED8\u6B3E\u8D44\u91D1\u6570\u636E"},{code:"031",name:"\u6279\u91CF\u4E0B\u8F7D\u5F00\u7968\u6A21\u677F"},{code:"032",name:"\u5BFC\u51FA\u5BF9\u8D26\u5F00\u7968\u6570\u636E"},{code:"033",name:"\u6279\u91CF\u521B\u5EFA\u5F00\u7968\u6570\u636E"},{code:"034",name:"\u4E0B\u8F7D\u8BA2\u5355\u8BA4\u6B3E\u5BFC\u5165\u6A21\u677F"},{code:"035",name:"\u6279\u91CF\u5BFC\u5165\u8BA2\u5355\u8BA4\u6B3E\u6570\u636E"},{code:"036",name:"\u4E0B\u8F7D\u6279\u91CF\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F"},{code:"037",name:"\u6279\u91CF\u5BFC\u5165\u8BBE\u7F6E\u7C7B\u76EE\u7ED3\u679C"},{code:"038",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA"},{code:"039",name:"\u4E70\u65B9\u516C\u53F8\u4E1A\u52A1\u5BA1\u6838"},{code:"040",name:"\u6279\u91CF\u5BA1\u6838"},{code:"041",name:"\u6279\u91CF\u4E0B\u8F7D\u91C7\u8D2D\u8BBE\u7F6E\u7C7B\u76EE\u6A21\u677F"},{code:"042",name:"\u6279\u91CF\u91C7\u8D2D\u5BFC\u5165\u8BBE\u7F6E\u7C7B\u76EE\u7ED3\u679C"},{code:"043",name:"\u91C7\u8D2D\u8BBE\u7F6E\u7A0E\u52A1\u7C7B\u76EE"},{code:"044",name:"\u8D22\u52A1\u8BBE\u7F6E\u7A0E\u52A1\u7C7B\u76EE"},{code:"045",name:"\u5BFC\u51FA\u5546\u54C1\u7A0E\u7387\u5F02\u5E38\u8BB0\u5F55"},{code:"046",name:"\u6253\u5370\u5BF9\u8D26\u5355"},{code:"047",name:"\u6253\u5370\u5907\u5E93\u5355"},{code:"048",name:"\u5BFC\u51FA"}];function G(){return F.map(u=>({label:u.name,value:u.code}))}const H={title:"\u6309\u94AE",colLayout:{span:24},itemStyle:{},formItems:[{field:"action_code",type:"select",label:"\u6309\u94AE\u540D\u79F0",labelWidth:"120px",placeholder:"\u6309\u94AE\u540D\u79F0",options:G(),rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u6309\u94AE\u6807\u8BC6"}]},{field:"status",type:"radio",labelWidth:"120px",label:"\u6309\u94AE\u72B6\u6001",options:[{label:"\u542F\u7528",value:"1"},{label:"\u7981\u7528",value:"0"}],rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u6309\u94AE\u72B6\u6001"}]}]};var l=(u=>(u.MENU="1",u.PAGE="2",u))(l||{});const X={class:"main role"},J={"w-full":"",flex:""},K=w({__name:"index",setup(u){const t=B(""),i=B(null),{pageModalRef:r,handleCreateData:E,handlePreviewData:m,handleUpdateData:C,handleConfrim:D,defaultInfo:A}=U({pageContentRef:i,confirmCallback:({action_code:n})=>{var o;return{menuid:e(t),action_name:(o=F.find(a=>a.code===n))==null?void 0:o.name}}});function p(n){const{menu_type:o,id:a}=n;String(o)===l.PAGE&&(t.value=a,i.value.getPageData({id:a}))}function f(n){t.value=n,i.value.getPageData({id:n})}const{permissions:g,hasPermissionWithCode:h}=y("setBtn");return(n,o)=>{const a=x("PagePower");return R(),S("div",X,[d(a,{isShow:e(h)("001")},{default:q(()=>[M("div",J,[d(I,{onTreeSelectChange:p,onInitTableData:f}),d(e(T),{ref_key:"pageContentRef",ref:i,powers:e(g),"content-config":e(z),onCreateBtnClick:e(E),onPreviewBtnClick:e(m),onUpdateBtnClick:e(C)},null,8,["powers","content-config","onCreateBtnClick","onPreviewBtnClick","onUpdateBtnClick"])])]),_:1},8,["isShow"]),d(e(W),{ref_key:"pageModalRef",ref:r,"modal-config":e(H),"default-info":e(A),onConfirmBtnClick:e(D)},null,8,["modal-config","default-info","onConfirmBtnClick"])])}}});var tu=k(K,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/system/setBtn/index.vue"]]);export{tu as default};