import{Z as a,cn as _,cm as F,D as g,cp as v,_ as b,d as x,m as l,r as p,o as C,A as E,x as D,h as s,u as i}from"./index.e80c366d.js";import{u as R}from"./use-page-search.e3e95470.js";import w from"./template-modal.cb536952.js";import{c as d}from"./createRequset.60472412.js";const c={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"}]}]};function y(e,t,u=200){return a("div",{style:{display:"flex"}},{default:()=>[a(_,{placement:"top",content:t,width:u},{reference:()=>a(F,{link:!0,icon:g("information-line")})}),a("span",null,e)]})}const B=d("admin/DepartReport/list"),S=d("/admin/DepartReport/status"),k=[{value:"1",label:"\u90E8\u95E8\u62A5\u8868"},{value:"2",label:"\u4E1A\u52A1\u516C\u53F8\u62A5\u8868"}],P=[{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 y(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=k.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(v,{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"}],T={superUserNoAction:!1,columns:P,apis:{httpList:B,httpStatus:S,httpAdd:!0,httpUpdate:!0}},I="publicTemplate",N=x({__name:"index",setup(e){const t=l(null),u=l(null),m={pageSearchHook:()=>R(void 0,void 0,c)},f={content:{create:()=>u.value.onDisplay(void 0,"create"),update:n=>u.value.onDisplay(n,"update")}};return(n,o)=>{const h=p("PageContainer"),A=p("PageAuth");return C(),E(A,{pageName:I},{default:D(()=>[s(h,{"get-content-ref":r=>t.value=r,events:f,hooks:m,"content-config":i(T),"search-config":i(c)},null,8,["get-content-ref","content-config","search-config"]),s(w,{ref_key:"templateModalRef",ref:u,onRefresh:o[0]||(o[0]=r=>t.value.onSearch())},null,512)]),_:1})}}});var V=b(N,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/template/publicTemplate/index.vue"]]);export{V as default};
