1 |
- import{ck as d,X as k,Z as A,cm as D,S as i,_ as P,d as S,m as v,cB as R,r as p,o as b,A as x,x as g,h as Y,u as h,D as I,a as H,cc as C}from"./index.0ae106f0.js";import{r as L}from"./columnRenderHelper.68a4467c.js";import{u as q}from"./use-page-search.dd23dee3.js";import{u as O}from"./use-page-modal.371a8740.js";import{u as z}from"./useCompany.e3b770eb.js";const{VITE_PROXY_DOMAIN_REAL:ae,VITE_PROXY_USER_REAL:V}=k(),m=V+"/admin/",$=e=>d.request("post",`${m}execlogadd`,{data:e}),T=e=>d.request("post",`${m}execloglist`,{data:e}),U=e=>d.request("post",`${m}execlogdel`,{data:e}),W=e=>d.request("post",`${m}execall`,{data:e}),y=[{value:"1",label:"\u7ACB\u5373\u6267\u884C"},{value:"2",label:"\u5EF6\u8FDF\u6267\u884C"}],M=[{value:"1",label:"\u5F85\u6267\u884C",type:"warning"},{value:"2",label:"\u6267\u884C\u5B8C\u6210",type:"success"},{value:"3",label:"\u6267\u884C\u5931\u8D25",type:"error"},{value:"4",label:"\u6267\u884C\u4E2D",type:""}],X=[{type:"selection",width:40,align:"center",hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",width:70,hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u62A5\u8868\u540D\u79F0",prop:"name"},{label:"\u6267\u884C\u7C7B\u578B",prop:"type",width:"90px",cellRenderer:({row:e,props:o})=>A(D,{size:o.size,type:String(e.type)==="1"?"":"success"},{default:()=>{var u;return(u=y.find(t=>String(e.type)===t.value))==null?void 0:u.label}})},{label:"\u72B6\u6001",prop:"status",width:"90px",cellRenderer:({row:e,props:o})=>{const{type:u,label:t}=M.find(F=>String(e.status)===F.value);return A(D,{size:o.size,type:u},{default:()=>t})}},{label:"\u5F00\u59CB\u65F6\u95F4",prop:"start",width:"140px",formatter:({start:e})=>i(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u7ED3\u675F\u65F6\u95F4",prop:"end",width:"140px",formatter:({end:e})=>i(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName",...L("companyNo","companyName","\u4E1A\u52A1\u516C\u53F8\u7F16\u7801:")},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:"70px"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:"140px",formatter:({addtime:e})=>i(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],j={title:"\u62A5\u8868\u7533\u8BF7\u8BB0\u5F55",superUserNoAction:!0,columns:X,showDelete:e=>String(e.status)=="1",apis:{httpList:T,httpAdd:$,httpDelete:U}},w={colLayout:{xl:3,lg:4,md:6,sm:8,xs:12},formItems:[{field:"status",type:"select",placeholder:"\u6267\u884C\u72B6\u6001",options:M},{field:"type",type:"select",placeholder:"\u6267\u884C\u7C7B\u578B",options:y},{field:"name",type:"input",placeholder:"\u62A5\u8868\u540D\u79F0"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},Z={title:"\u62A5\u8868\u7533\u8BF7",colLayout:{span:24},itemStyle:{},formItems:[{field:"id",type:"select",label:"\u62A5\u8868",labelWidth:"120px",placeholder:"\u8BF7\u9009\u62E9\u62A5\u8868",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u62A5\u8868"}],options:[],otherOptions:{disabled:!0}},{field:"type",type:"select",label:"\u6267\u884C\u7C7B\u578B",labelWidth:"120px",placeholder:"\u6267\u884C\u7C7B\u578B",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u6267\u884C\u7C7B\u578B"}],options:y},{field:"create_timer",type:"date_picker",label:"\u62A5\u8868\u65F6\u95F4",labelWidth:"120px",placeholder:"\u8BF7\u9009\u62E9\u62A5\u8868\u65F6\u95F4",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u62A5\u8868\u65F6\u95F4"}],otherOptions:{type:"daterange",startProp:"start",endProp:"end",startPlaceholder:"\u8D77\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"}}]},G="reportRecord",J=S({__name:"index",setup(e){const o=v(Z),{currentCompany:u}=z(),t=v([]);async function F(){const r=[];if(!u.value.companyNo){t.value=[],o.value.formItems[0].options=t.value;return}const{code:s,data:n}=await W({companyNo:u.value.companyNo});s===0&&n.forEach(a=>{const l={value:a.id,label:a.name,disabled:String(a.status)=="0"};r.push(l)}),t.value=r,o.value.formItems[0].options=t.value}const N={pageSearchHook:()=>q(void 0,void 0,w),pageModalHook:r=>O({pageContentRef:r,confirmCallback:({create_timer:s,type:n})=>{const a=i(s[0]).format("YYYY-MM-DD"),l=i(s[1]).format("YYYY-MM-DD"),c=24*60*60*1e3,f=new Date(a).valueOf(),B=(new Date(l).valueOf()+c-f)/c,E=u.value.companyNo;return String(n)==="1"&&B>31?(C.warning("\u7ACB\u5373\u6267\u884C\u65F6\uFF0C\u65F6\u95F4\u533A\u95F4\u4E0D\u80FD\u8D85\u8FC731\u5929\uFF01"),!1):String(n)==="2"&&B>62?(C.warning("\u5EF6\u65F6\u6267\u884C\u65F6\uFF0C\u65F6\u95F4\u533A\u95F4\u4E0D\u80FD\u8D85\u8FC762\u5929\uFF01"),!1):E?{end:l,start:a,companyNo:E}:(C.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8\uFF01"),!1)}})};return R(()=>{u.value.companyNo&&F()}),(r,s)=>{const n=p("ElButton"),a=p("el-link"),l=p("PageContainer"),c=p("PageAuth");return b(),x(c,{pageName:G},{default:g(()=>[Y(l,{hooks:N,"content-config":h(j),"search-config":h(w),"modal-config":o.value},{content_action:g(({status:f,down_url:_})=>[String(f)==="2"?(b(),x(a,{key:0,href:_,target:"_blank",underline:!1},{default:g(()=>[Y(n,{link:"",size:"small",type:"primary",icon:h(I)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):H("v-if",!0)]),_:1},8,["content-config","search-config","modal-config"])]),_:1})}}});var oe=P(J,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/reportForm/reportRecord/index.vue"]]);export{oe as default};
|