index.0a3fed24.js 5.7 KB

1
  1. import{aH as s,aI as _,aj as v,aF as P,ah as b,_ as y,d as k,E as l,aZ as x,x as w,o as R,c as S,y as d,K as W,b as q,u as e,a$ as I,c6 as M}from"./index.1417328f.js";import T from"./menu-tree.958502a7.js";import{u as U}from"./use-page-modal.369cb1f6.js";import"./index.8c82491f.js";const{VITE_PROXY_DOMAIN_REAL:tu,VITE_PROXY_USER_REAL:$}=_(),c=$+"/admin/",L=u=>s.request("post",`${c}menuaction`,{data:u}),N=u=>s.request("post",`${c}menuactionadd`,{data:u}),Y=u=>s.request("post",`${c}menuactionsave`,{data:u}),O=u=>s.request("post",`${c}menuactionstatus`,{data:u}),V=u=>s.request("post",`${c}menuactiondel`,{data:u}),j=[{type:"selection",minWidth:55,align:"left",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:a})=>v(P,{size:a.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"}],H={title:"\u6309\u94AE\u8BBE\u7F6E",columns:j,notReuqiredInit:!0,notNeedCompanyFilter:!0,apis:{httpList:L,httpDelete:V,httpAdd:N,httpStatus:O,httpUpdate:Y}},r=[{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\u56DE\u7968\u6279\u91CF\u7533\u8BF7\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:"\u4E0B\u8F7D\u6279\u91CF\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"}];function z(){return r.map(u=>({label:u.name,value:u.code}))}const G={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:z(),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 B=(u=>(u.MENU="1",u.PAGE="2",u))(B||{});const X={class:"main role"},K={"w-full":"",flex:""},Z=k({__name:"index",setup(u){const a=l(""),i=l(null),{pageModalRef:m,handleCreateData:F,handlePreviewData:E,handleUpdateData:C,handleConfrim:p,defaultInfo:D}=U({pageContentRef:i,confirmCallback:({action_code:n})=>{var o;return{menuid:e(a),action_name:(o=r.find(t=>t.code===n))==null?void 0:o.name}}});function A(n){const{menu_type:o,id:t}=n;String(o)===B.PAGE&&(a.value=t,i.value.getPageData({id:t}))}function f(n){a.value=n,i.value.getPageData({id:n})}const{permissions:g,hasPermissionWithCode:h}=x("setBtn");return(n,o)=>{const t=w("PagePower");return R(),S("div",X,[d(t,{isShow:e(h)("001")},{default:W(()=>[q("div",K,[d(T,{onTreeSelectChange:A,onInitTableData:f}),d(e(I),{ref_key:"pageContentRef",ref:i,powers:e(g),"content-config":e(H),onCreateBtnClick:e(F),onPreviewBtnClick:e(E),onUpdateBtnClick:e(C)},null,8,["powers","content-config","onCreateBtnClick","onPreviewBtnClick","onUpdateBtnClick"])])]),_:1},8,["isShow"]),d(e(M),{ref_key:"pageModalRef",ref:m,"modal-config":e(G),"default-info":e(D),onConfirmBtnClick:e(p)},null,8,["modal-config","default-info","onConfirmBtnClick"])])}}});var au=y(Z,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/system/setBtn/index.vue"]]);export{au as default};