import{Z as A,cr as _,_ as F,d as g,m as n,r as l,o as b,A as v,x as C,h as p,u as s}from"./index.56449854.js";import{u as x}from"./use-page-search.59eb5443.js";import E from"./template-modal.bcc8044e.js";import{c}from"./createRequset.56e9fc42.js";import{c as D}from"./tootip.9dcedb27.js";const i={formItems:[{field:"report_name",type:"input",placeholder:"\u6A21\u677F\u540D\u79F0"},{field:"report_type",type:"select",defaultValue:"2",otherOptions:{clearable:!1},options:[{value:"1",label:"\u90E8\u95E8\u62A5\u8868"},{value:"2",label:"\u4E1A\u52A1\u516C\u53F8\u62A5\u8868"}]}]},R=c("admin/DepartReport/list"),w=c("/admin/DepartReport/status"),y=[{value:"1",label:"\u90E8\u95E8\u62A5\u8868"},{value:"2",label:"\u4E1A\u52A1\u516C\u53F8\u62A5\u8868"}],B=[{label:"ID",prop:"id",width:"40px"},{label:"\u6A21\u677F\u540D\u79F0",width:150,prop:"report_name"},{label:"\u5FAE\u4FE1\u6A21\u677F\u540D\u79F0",prop:"template_name",width:140,cellRenderer({row:e}){return D(e.template_name,"\u5FAE\u4FE1\u6A21\u677FID: : "+e.template_id,480)}},{label:"\u6A21\u677F\u7C7B\u578B",width:"90px",cellRenderer({row:e}){var t;return((t=y.find(({value:u})=>String(e.report_type)===String(u)))==null?void 0:t.label)||"--"}},{label:"\u63A8\u9001\u65F6\u95F4",prop:"",width:"65px",cellRenderer({row:e}){return"\u6BCF\u5929"}},{label:"\u63A8\u9001\u4EBA",prop:"pusher",minWidth:160,cellRenderer({row:e}){return e.pusher.map(({user_name:t})=>t).join(",")}},{label:"\u72B6\u6001",width:"65px",prop:"status",cellRenderer({row:e}){return A(_,{type:String(e.status)==="1"?"success":"danger"},{default:()=>String(e.status)==="1"?"\u542F\u7528":"\u7981\u7528"})}},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createtime",width:"140px"},{label:"\u6A21\u677F\u53C2\u6570",prop:"template_param",width:80},{width:80,label:"\u64CD\u4F5C",fixed:"right",slot:"operation"}],S={superUserNoAction:!1,columns:B,apis:{httpList:R,httpStatus:w,httpAdd:!0,httpUpdate:!0}},k="publicTemplate",P=g({__name:"index",setup(e){const t=n(null),u=n(null),d={pageSearchHook:()=>x(void 0,void 0,i)},m={content:{create:()=>u.value.onDisplay(void 0,"create"),update:a=>u.value.onDisplay(a,"update")}};return(a,r)=>{const f=l("PageContainer"),h=l("PageAuth");return b(),v(h,{pageName:k},{default:C(()=>[p(f,{"get-content-ref":o=>t.value=o,events:m,hooks:d,"content-config":s(S),"search-config":s(i)},null,8,["get-content-ref","content-config","search-config"]),p(E,{ref_key:"templateModalRef",ref:u,onRefresh:r[0]||(r[0]=o=>t.value.onSearch())},null,512)]),_:1})}}});var j=F(P,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/template/publicTemplate/index.vue"]]);export{j as default};