index.08f6887b.js 4.3 KB

1
  1. import{Z as h,cr as g,S as r,_ as A,d as E,m as F,n as M,r as i,o as C,A as _,x as c,h as y,u as d,D as k,a as w}from"./index.56449854.js";import{h as S,a as H,b as R,c as P}from"./index.da4cf859.js";import{u as z}from"./use-page-search.59eb5443.js";import{u as I}from"./use-page-modal.682b86d9.js";const m=[{value:"3",label:"\u7ACB\u5373\u6267\u884C"},{value:"4",label:"\u5EF6\u8FDF\u6267\u884C"}],b=[{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:""}],L=[{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})=>h(g,{size:o.size,type:String(e.type)==="1"?"":"success"},{default:()=>{var t;return(t=m.find(l=>String(e.type)===l.value))==null?void 0:t.label}})},{label:"\u72B6\u6001",prop:"status",width:"90px",cellRenderer:({row:e,props:o})=>{const{type:t,label:l}=b.find(f=>String(e.status)===f.value);return h(g,{size:o.size,type:t},{default:()=>l})}},{label:"\u5F00\u59CB\u65F6\u95F4",prop:"start",width:"140px",formatter:({start:e})=>r(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u7ED3\u675F\u65F6\u95F4",prop:"end",width:"140px",formatter:({end:e})=>r(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})=>r(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],N={title:"\u62A5\u8868\u7533\u8BF7\u8BB0\u5F55",columns:L,showDelete:e=>String(e.status)=="1"||String(e.status)==="3",apis:{httpList:S,httpAdd:H,httpDelete:R}},B={colLayout:{xl:3,lg:4,md:6,sm:8,xs:12},formItems:[{field:"status",type:"select",placeholder:"\u6267\u884C\u72B6\u6001",options:b},{field:"type",type:"select",placeholder:"\u6267\u884C\u7C7B\u578B",options:m},{field:"name",type:"input",placeholder:"\u62A5\u8868\u540D\u79F0"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},q={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:m},{field:"create_timer",type:"date_picker",label:"\u62A5\u8868\u65F6\u95F4",labelWidth:"120px",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u62A5\u8868\u65F6\u95F4"}],otherOptions:{placeholder:"\u8BF7\u9009\u62E9\u62A5\u8868\u65F6\u95F4",format:"YYYY-MM",type:"month"}}]},O="personnelReportRecord",W=E({__name:"index",setup(e){const o=F(q),t=F([]);async function l(){const n=[],{code:s,data:a}=await P({});s===0&&a.forEach(u=>{const p={value:u.id,label:u.name,disabled:String(u.status)=="0"};n.push(p)}),t.value=n,o.value.formItems[0].options=t.value}const Y={pageSearchHook:function(){return z(void 0,void 0,B)},pageModalHook:function(n){return I({pageContentRef:n,confirmCallback:({create_timer:s})=>{const a=r(s).format("YYYY-MM-DD"),u=r(a).endOf("month").format("YYYY-MM-DD");return{start:a,end:u}}})}};return M(()=>l()),(n,s)=>{const a=i("ElButton"),u=i("el-link"),p=i("PageContainer"),v=i("PageAuth");return C(),_(v,{pageName:O},{default:c(()=>[y(p,{hooks:Y,"content-config":d(N),"search-config":d(B),"modal-config":o.value},{content_action:c(({status:D,down_url:x})=>[String(D)==="2"?(C(),_(u,{key:0,href:x,target:"_blank",underline:!1},{default:c(()=>[y(a,{link:"",size:"small",type:"primary",icon:d(k)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):w("v-if",!0)]),_:1},8,["content-config","search-config","modal-config"])]),_:1})}}});var G=A(W,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/reportCollection/personnel/components/reportRecord/index.vue"]]);export{G as default};