index.0fbb050b.js 4.9 KB

1
  1. import{aE as d,ae as k,af as B,aC as D,a8 as i,_ as P,d as S,w as E,x as R,r as c,o as b,G as x,C as g,l as A,u as h,J as H,a as q,aQ as v}from"./index.e4510b68.js";import{u as I}from"./use-page-search.9c962c21.js";import{u as O}from"./use-page-modal.15213119.js";const{VITE_PROXY_DOMAIN_REAL:Z,VITE_PROXY_USER_REAL:L}=k(),F=L+"/admin/",z=e=>d.request("post",`${F}execstatlogadd`,{data:e}),N=e=>d.request("post",`${F}execstatloglist`,{data:e}),V=e=>d.request("post",`${F}execlogdel`,{data:e}),$=e=>d.request("post",`${F}execstatall`,{data:e}),C=[{value:"3",label:"\u7ACB\u5373\u6267\u884C"},{value:"4",label:"\u5EF6\u8FDF\u6267\u884C"}],w=[{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:""}],T=[{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:l})=>B(D,{size:l.size,type:String(e.type)==="1"?"":"success"},{default:()=>{var u;return(u=C.find(a=>String(e.type)===a.value))==null?void 0:u.label}})},{label:"\u72B6\u6001",prop:"status",width:"90px",cellRenderer:({row:e,props:l})=>{const{type:u,label:a}=w.find(m=>String(e.status)===m.value);return B(D,{size:l.size,type:u},{default:()=>a})}},{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:"\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"}],W={title:"\u62A5\u8868\u7533\u8BF7\u8BB0\u5F55",columns:T,showDelete:e=>String(e.status)=="1",apis:{httpList:N,httpAdd:z,httpDelete:V}},Y={colLayout:{xl:3,lg:4,md:6,sm:8,xs:12},formItems:[{field:"status",type:"select",placeholder:"\u6267\u884C\u72B6\u6001",options:w},{field:"type",type:"select",placeholder:"\u6267\u884C\u7C7B\u578B",options:C},{field:"name",type:"input",placeholder:"\u62A5\u8868\u540D\u79F0"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},j={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:C},{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"}}]},U=S({__name:"index",setup(e){const l="personnelReportRecord",u=E(j),a=E([]);async function m(){const s=[],{code:r,data:o}=await $({});r===0&&o.forEach(t=>{const n={value:t.id,label:t.name,disabled:String(t.status)=="0"};s.push(n)}),a.value=s,u.value.formItems[0].options=a.value}const M={pageSearchHook:function(){return I(void 0,void 0,Y)},pageModalHook:function(s){return O({pageContentRef:s,confirmCallback:({create_timer:r,type:o})=>{const t=i(r[0]).format("YYYY-MM-DD"),n=i(r[1]).format("YYYY-MM-DD"),p=24*60*60*1e3,f=new Date(t).valueOf(),y=(new Date(n).valueOf()+p-f)/p;return String(o)==="1"&&y>15?(v.warning("\u7ACB\u5373\u6267\u884C\u65F6\uFF0C\u65F6\u95F4\u533A\u95F4\u4E0D\u80FD\u8D85\u8FC715\u5929\uFF01"),!1):String(o)==="2"&&y>31?(v.warning("\u5EF6\u65F6\u6267\u884C\u65F6\uFF0C\u65F6\u95F4\u533A\u95F4\u4E0D\u80FD\u8D85\u8FC731\u5929\uFF01"),!1):{start:t,end:n}}})}};return R(()=>m()),(s,r)=>{const o=c("ElButton"),t=c("el-link"),n=c("PageContainer"),p=c("PageAuth");return b(),x(p,{pageName:l},{default:g(()=>[A(n,{hooks:M,"content-config":h(W),"search-config":h(Y),"modal-config":u.value},{content_action:g(({status:f,down_url:_})=>[String(f)==="2"?(b(),x(t,{key:0,href:_,target:"_blank",underline:!1},{default:g(()=>[A(o,{link:"",size:"small",type:"primary",icon:h(H)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):q("v-if",!0)]),_:1},8,["content-config","search-config","modal-config"])]),_:1})}}});var ee=P(U,[["__file","/Users/apple/Desktop/CompanyProjects/accout-vue3-ui/src/views/reportForm/personnelReportRecord/index.vue"]]);export{ee as default};