import{C as h}from"./api.a76c2034.js";import{d as u,a as C,c as r,R as y,f as d,g as x,l,m as p,w as B,M as v,j as z,k as I,x as F}from"./index.3a30a18d.js";import{_ as E}from"./_plugin-vue_export-helper.cdc0426e.js";const N={class:"dialog-container"},A=u({name:"configDialog"}),j=u({...A,emits:["refresh"],setup(k,{expose:g,emit:T}){const a=C({tableData:{data:[],total:0,loading:!1,param:{pageIndex:1,pageSize:10,employeeId:""}},propsParam:{},configForm:{employeeId:"",organizationId:""},dialog:{isShowDialog:!1,type:"",title:"",submitTxt:""}}),c=(o,e,t)=>{if(a.propsParam=t,o==="edit"){let n=JSON.parse(JSON.stringify(e));console.log("rowobj",n),a.configForm=n,a.dialog.title="\u7B7E\u5230/\u7B7E\u9000\u8BB0\u5F55\u660E\u7EC6",s()}else a.configForm=Object.assign({}),a.dialog.title="\u65B0\u589E",a.dialog.submitTxt="\u4FDD \u5B58",a.dialog.type="add";a.dialog.isShowDialog=!0},m=o=>{a.tableData.param.pageSize=o,s()},b=o=>{a.tableData.param.pageIndex=o,s()},s=()=>{a.tableData.loading=!0;let o=a.tableData.param;o.employeeId=a.configForm.employeeId,a.propsParam.pageIndex=a.tableData.param.pageIndex,a.propsParam.pageSize=a.tableData.param.pageSize;let e=JSON.parse(JSON.stringify(a.propsParam));delete e.options,delete e.superviseDepartIdArr,delete e.createdStarEndDate,e.hasSecurityCertificateNo=e.hasSecurityCertificateNo===null||e.hasSecurityCertificateNo===""?null:e.hasSecurityCertificateNo,e.recordStatuses=e.recordStatuses?[e.recordStatuses]:[],e.organizationId=a.configForm.organizationId,h().attendanceDetailApi(o,e).then(t=>{console.log("response\u67E5\u8BE211",t),console.log("response.data",t.data),t.status==200&&(a.tableData.data=t.data.data,a.tableData.total=t.data.totalCount)}),setTimeout(()=>{a.tableData.loading=!1},500)},D=()=>{a.dialog.isShowDialog=!1,F(()=>{})},f=()=>{D()};return g({openDialog:c}),(o,e)=>{const t=r("el-table-column"),n=r("el-table"),_=r("el-pagination"),w=r("el-dialog"),S=y("loading");return d(),x("div",N,[l(w,{title:a.dialog.title,modelValue:a.dialog.isShowDialog,"onUpdate:modelValue":e[2]||(e[2]=i=>a.dialog.isShowDialog=i),width:"1000px","close-on-click-modal":!1,draggable:"","destroy-on-close":"",onClose:f},{default:p(()=>[B((d(),v(n,{data:a.tableData.data,style:{width:"100%"}},{default:p(()=>[l(t,{label:"\u5E8F\u53F7",width:"60"},{default:p(i=>[z(I(i.$index+1+(a.tableData.param.pageIndex-1)*a.tableData.param.pageSize),1)]),_:1}),l(t,{prop:"status",label:"\u64CD\u4F5C\u7C7B\u578B",align:"center","show-overflow-tooltip":""}),l(t,{prop:"createdTime",label:"\u64CD\u4F5C\u65F6\u95F4",align:"center","show-overflow-tooltip":""}),l(t,{prop:"address",label:"\u64CD\u4F5C\u5730\u5740","min-width":"110",align:"center","show-overflow-tooltip":""}),l(t,{prop:"securityStationName",label:"\u9A7B\u52E4\u70B9\u540D\u79F0","min-width":"110",align:"center","show-overflow-tooltip":""}),l(t,{prop:"securityDepartName",label:"\u9A7B\u52E4\u70B9\u76D1\u7BA1\u673A\u6784",align:"center","min-width":"100","show-overflow-tooltip":""}),l(t,{prop:"securityStationAddress",label:"\u9A7B\u52E4\u70B9\u5730\u5740",align:"center","min-width":"100","show-overflow-tooltip":""})]),_:1},8,["data"])),[[S,a.tableData.loading]]),l(_,{onSizeChange:m,onCurrentChange:b,class:"mt15","pager-count":5,"page-sizes":[10,20,30,100,200,300,1e3],"current-page":a.tableData.param.pageIndex,"onUpdate:current-page":e[0]||(e[0]=i=>a.tableData.param.pageIndex=i),background:"","page-size":a.tableData.param.pageSize,"onUpdate:page-size":e[1]||(e[1]=i=>a.tableData.param.pageSize=i),layout:"total, sizes, prev, pager, next, jumper",total:a.tableData.total},null,8,["current-page","page-size","total"])]),_:1},8,["title","modelValue"])])}}});const J=E(j,[["__scopeId","data-v-578bbb62"]]);export{J as default};
