import{d as g,h as C,l as r,U as x,o as u,a as B,x as l,y as p,w as v,b as z,p as I,q as F,B as E,_ as N}from"./index.4042ed24.js";import{C as k}from"./api.3ac03a55.js";const A={class:"dialog-container"},T=g({name:"configDialog"}),j=g({...T,props:{platform:{type:String,required:!0}},emits:["refresh"],setup(c,{expose:m,emit:P}){const d=c,a=C({tableData:{data:[],total:0,loading:!1,param:{pageIndex:1,pageSize:10,employeeId:""}},propsParam:{},configForm:{employeeId:"",organizationId:""},dialog:{isShowDialog:!1,type:"",title:"",submitTxt:""}}),D=(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},b=o=>{a.tableData.param.pageSize=o,s()},f=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,e.deskTypes=d.platform==="2"?["Proprietor"]:d.platform==="3"?["TemporarySecurity"]:["Normal"],k().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)},_=()=>{a.dialog.isShowDialog=!1,E(()=>{})},w=()=>{_()};return m({openDialog:D}),(o,e)=>{const t=r("el-table-column"),n=r("el-table"),S=r("el-pagination"),h=r("el-dialog"),y=x("loading");return u(),B("div",A,[l(h,{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:w},{default:p(()=>[v((u(),z(n,{data:a.tableData.data,style:{width:"100%"}},{default:p(()=>[l(t,{label:"\u5E8F\u53F7",width:"60"},{default:p(i=>[I(F(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"])),[[y,a.tableData.loading]]),l(S,{onSizeChange:b,onCurrentChange:f,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=N(j,[["__scopeId","data-v-7c740fd1"],["__file","/data/jenkins/workspace/badp-bcxin-web-5.x-dispatchBusiness/src/views/dispatchView/signedManage/commandDialog.vue"]]);export{J as default};
