1 |
- import{aC as a,a2 as v,a3 as P,aE as D,Z as F,_ as w,d as y,w as c,x as k,b9 as x,o as R,c as q,l as r,C as T,b as I,u as t,bb as M,bm as S,bn as W}from"./index.1d5f2f42.js";import Y from"./menu-tree.3da4474b.js";import{u as $}from"./use-page-modal.2492035a.js";import"./index.cb757309.js";const{VITE_PROXY_DOMAIN_REAL:ae,VITE_PROXY_USER_REAL:N}=v(),o=N+"/admin/",U=e=>a.request("post",`${o}menu/queryAction`,{data:e}),L=e=>a.request("post",`${o}action/query`,{data:e}),V=e=>a.request("post",`${o}menu/addAction`,{data:e}),O=e=>a.request("post",`${o}menuactionsave`,{data:e}),z=e=>a.request("post",`${o}menu/statusAction`,{data:e}),H=e=>a.request("post",`${o}menu/delAction`,{data:e}),X=[{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:"\u6309\u94AE\u540D\u79F0",prop:"action_name",minWidth:180,align:"left"},{label:"\u72B6\u6001",prop:"status",minWidth:80,cellRenderer:({row:e,props:i})=>P(D,{size:i.size,type:String(e.status)==="1"?"success":"danger"},{default:()=>e.status+""=="0"?"\u7981\u7528":"\u542F\u7528"})},{label:"\u521B\u5EFA\u65F6\u95F4",minWidth:180,prop:"createTime",formatter:({createTime:e})=>F(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",minWidth:140,slot:"operation"}],j={columns:X,title:"\u6309\u94AE\u8BBE\u7F6E",notNeedCompanyFilter:!0,noRequiredInit:!0,statusProp:"menu_action_id",deleteProp:"menu_action_id",apis:{httpAdd:V,httpList:U,httpUpdate:O,httpDelete:H,httpStatus:z}},Z={title:"\u6309\u94AE",colLayout:{span:24},itemStyle:{},formItems:[{field:"action_id",type:"select",label:"\u6309\u94AE\u540D\u79F0",labelWidth:"120px",placeholder:"\u6309\u94AE\u540D\u79F0",options:[],rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u6309\u94AE\u6807\u8BC6"}]}]},G={class:"main role"},J={"w-full":"",flex:""},K=y({__name:"index",setup(e){const i=c(""),l=c(null),d=c(Z),{pageModalRef:m,handleCreateData:f,handleUpdateData:h,handlePreviewData:_,handleConfrim:g,defaultInfo:C}=$({pageContentRef:l,confirmCallback:({action_id:n})=>({menu_id:t(i),action_id:n})});function E(n){const{is_menu:u,id:s}=n;!(String(u)==="0")||!s||(i.value=s,l.value.getPageData({menu_id:s}))}k(async()=>{const{code:n,data:u}=await L({status:"1"});if(n!==1)return;const s=u.map(({action_name:p,id:A})=>({label:p,value:A}));d.value.formItems[0].options=s});const{hasPermissionWithCode:B,permissions:b}=x("setBtn");return(n,u)=>(R(),q("div",G,[r(W,{"is-show":t(B)("3")},{default:T(()=>[I("div",J,[r(Y,{onTreeSelectChange:E,onInitTableData:n.initTableData},null,8,["onInitTableData"]),r(t(M),{ref_key:"pageContentRef",ref:l,powers:t(b),"content-config":t(j),onCreateBtnClick:t(f),onPreviewBtnClick:t(_),onUpdateBtnClick:t(h)},null,8,["powers","content-config","onCreateBtnClick","onPreviewBtnClick","onUpdateBtnClick"])]),r(t(S),{ref_key:"pageModalRef",ref:m,"modal-config":d.value,"default-info":t(C),onConfirmBtnClick:t(g)},null,8,["modal-config","default-info","onConfirmBtnClick"])]),_:1},8,["is-show"])]))}});var oe=w(K,[["__file","D:/work/rep-v3/report-v3/src/views/system/setBtn/index.vue"]]);export{oe as default};
|