(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c15f4dba"],{"389d":function(e,t,a){"use strict";a.r(t);var s=function(){var e,t=this,a=t._self._c;return a("div",{staticClass:"h-full"},[a("div",{staticClass:"border-b border-gray-200 p-6 flex justify-start items-center mb-4"},[a("el-button",{attrs:{type:"primary",disabled:!t.form.projectId},on:{click:t.handleExport}},[t._v("导出")])],1),a("div",{staticClass:"p-16"},[a("el-form",{staticClass:"grid grid-cols-4",attrs:{model:t.form,inline:!0,rules:t.queryFormRules}},[a("el-form-item",{attrs:{label:"项目名称",prop:"projectId"}},[a("el-select",{attrs:{clearable:""},on:{change:t.getTeamList},model:{value:t.form.projectId,callback:function(e){t.$set(t.form,"projectId",e)},expression:"form.projectId"}},t._l(t.projectList,(function(e){return a("el-option",{key:e.id,attrs:{value:e.id,label:e.itemProjectName,filter:"",placeholder:"请选择项目"}})})),1)],1),a("el-form-item",{attrs:{label:"团队组织名称"}},[a("el-select",{attrs:{multiple:"",disabled:!t.form.projectId,clearable:""},on:{change:t.getSiteList},model:{value:t.form.teamIdList,callback:function(e){t.$set(t.form,"teamIdList",e)},expression:"form.teamIdList"}},t._l(t.teamList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.itemTeamName,value:e.itemTeamId}})})),1)],1),a("el-form-item",{attrs:{label:"日期"}},[a("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd"},on:{change:t.handleDateChange},model:{value:t.dateRange,callback:function(e){t.dateRange=e},expression:"dateRange"}})],1),a("el-form-item",{attrs:{label:"岗点名称"}},[a("el-select",{attrs:{multiple:"",disabled:!t.form.projectId||!t.form.teamIdList||(null===(e=t.form.teamIdList)||void 0===e?void 0:e.length)<=0,clearable:""},model:{value:t.form.siteIdList,callback:function(e){t.$set(t.form,"siteIdList",e)},expression:"form.siteIdList"}},t._l(t.siteList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.itemAttendanceSiteName,value:e.id}})})),1)],1),a("el-form-item",{attrs:{label:"姓名"}},[a("el-input",{attrs:{placeholder:"请输入"},model:{value:t.form.userName,callback:function(e){t.$set(t.form,"userName",e)},expression:"form.userName"}})],1),a("el-form-item",{attrs:{label:"操作类型"}},[a("el-select",{attrs:{placeholder:"请选择操作类型",clearable:""},model:{value:t.form.operateType,callback:function(e){t.$set(t.form,"operateType",e)},expression:"form.operateType"}},[a("el-option",{attrs:{label:"签到",value:0}}),a("el-option",{attrs:{label:"签退",value:1}})],1)],1),a("el-form-item",[a("el-button",{staticClass:"mr-2",attrs:{type:"primary",disabled:!t.form.projectId},on:{click:t.handleQuery}},[t._v("查询")]),a("el-button",{on:{click:t.handleReset}},[t._v("重置")])],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,"span-method":t.objectSpanMethod,border:""}},[a("el-table-column",{attrs:{prop:"projectName",label:"项目名称"}}),a("el-table-column",{attrs:{prop:"statisticsDate",label:"日期"}}),a("el-table-column",{attrs:{prop:"teamName",label:"团队组织名称"}}),a("el-table-column",{attrs:{prop:"siteName",label:"岗点名称"}}),a("el-table-column",{attrs:{prop:"userName",label:"姓名"}}),a("el-table-column",{attrs:{prop:"operateName",label:"操作类型"}}),a("el-table-column",{attrs:{prop:"operateCount",label:"操作次数"}}),a("el-table-column",{attrs:{prop:"operateTime",label:"操作时间"}}),a("el-table-column",{attrs:{prop:"operateAddress",label:"操作地址"}})],1),a("el-pagination",{staticClass:"mt-4",attrs:{"page-size":10,total:t.total,"current-page":t.form.pageNum,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":t.onSizeChange,"current-change":t.handlePageChange}})],1)])},r=[],o=(a("e9f5"),a("7d54"),a("ab43"),a("48fb")),i={name:"SignIn",data(){return{dateRange:[],form:{projectId:"",teamIdList:[],statisticsEndTime:"",statisticsStartTime:"",siteIdList:[],userName:"",operateType:void 0,pageNum:1,pageSize:10},queryFormRules:{projectId:[{required:!0,message:"请选择项目",trigger:"change"}]},projectList:[],teamList:[],siteList:[],tableData:[],total:0}},methods:{handleDateChange(e){e?(this.form.statisticsStartTime=e[0],this.form.statisticsEndTime=e[1]):(this.form.statisticsStartTime="",this.form.statisticsEndTime="")},getProjectList(){Object(o["c"])().then(e=>{e&&(this.projectList=e.data)})},getTeamList(){this.form.teamIdList=[],this.form.projectId&&Object(o["e"])({projectId:this.form.projectId}).then(e=>{e&&(this.teamList=e)})},getSiteList(){var e;this.form.siteIdList=[],!this.form.projectId||!this.form.teamIdList||(null===(e=this.form.teamIdList)||void 0===e?void 0:e.length)<=0||Object(o["d"])({projectId:this.form.projectId,teamIdList:this.form.teamIdList}).then(e=>{e&&(this.siteList=e)})},generateSpans(e){const t=e.map(()=>Array(7).fill({rowspan:1,colspan:1}));for(let a=0;a<7;a++){let s=0,r=[];e.forEach((o,i)=>{const l=this.getKeys(o,a);if(0!==i){if(!this.isSameKeys(r,l,a)){const e=i-s;t[s][a]={rowspan:e,colspan:1};for(let r=s+1;r{console.log(e),200===e.code&&(this.tableData=e.rows||[],this.total=e.total||0)})},handleReset(){this.form={projectId:"",teamIdList:[],statisticsStartTime:"",statisticsEndTime:"",siteIdList:[],userName:"",operateType:void 0},this.dateRange=[]},handlePageChange(e){this.form.pageNum=e,this.handleQuery()},onSizeChange(e){this.form.pageSize=e,this.form.pageNum=1,this.handleQuery()},handleExport(){Object(o["f"])(this.form)}},mounted(){this.getProjectList()}},l=i,n=(a("3ba6"),a("2877")),c=Object(n["a"])(l,s,r,!1,null,"797e3272",null);t["default"]=c.exports},"3ba6":function(e,t,a){"use strict";a("b68e")},"48fb":function(e,t,a){"use strict";a.d(t,"c",(function(){return p})),a.d(t,"d",(function(){return u})),a.d(t,"e",(function(){return f})),a.d(t,"b",(function(){return h})),a.d(t,"a",(function(){return b})),a.d(t,"g",(function(){return g})),a.d(t,"f",(function(){return y}));a("88a7"),a("271a"),a("5494");function s(e){return"application/json"!==e.type}var r=a("cee4"),o=a("5c96"),i=a("21a6");const l=r["a"].create({baseURL:"/statistics/api",timeout:6e4,transformResponse:[e=>"object"!==typeof e||null===e?{data:JSON.parse(e)}:e.data||e]});l.interceptors.request.use(async e=>{var t;const a=null===(t=window.location.href)||void 0===t?void 0:t.split("?")[1],s=new URLSearchParams(a),r=s.get("Accesstoken"),o="production";return"development"!==o||r||(e.headers.accessToken="eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhdXRoMCIsImV4cCI6MTc0NjY4MTU0MCwidXNlcm5hbWUiOiJ4SWt1Zlg1NF9BSUVpRTJSRyJ9.kIY8DyXsTiZSxmoPdrUuaAKQZCWTcKnByyVzduuTA6M"),r&&(e.headers.accessToken=r),e},e=>Promise.reject(e)),l.interceptors.response.use(e=>{const{status:t,data:a}=e;if(200===t)return a});const n=r["a"].create({baseURL:"/statistics/api",timeout:6e4});async function c(e){return l.request(e).then(e=>e.data)}n.interceptors.request.use(async e=>{const t=localStorage.getItem("dispatchToken");return t&&(e.headers.dispatchToken=t),e},e=>Promise.reject(e)),n.interceptors.response.use(e=>{const{status:t,data:a}=e;if(200===t){const{url:t}=e.config;return t&&t.indexOf("json")>-1?a:a.data}});let d=null;function m(e,t,a,r={}){return d=o["Loading"].service({text:"正在下载数据,请稍候",background:"rgba(0, 0, 0, 0.7)"}),l.post(e,t,{headers:{"Content-Type":"application/json"},responseType:"blob",...r}).then(async e=>{var t;const r=s(e);if(r){const t=new Blob([e]);Object(i["saveAs"])(t,a)}else{const t=await e.text(),a=JSON.parse(t);o["Message"].error(a.msg)}null===(t=d)||void 0===t||t.close()}).catch(e=>{var t;console.error(e),o["Message"].error("下载文件出现错误,请联系管理员!"),null===(t=d)||void 0===t||t.close()})}const p=()=>l({url:"/sy/statistics/project",method:"post",data:{}}),u=e=>c({url:"/sy/statistics/site",method:"post",data:e}),f=e=>c({url:"/sy/statistics/team",method:"post",data:e}),h=e=>c({url:"/sy/statistics/attendance",method:"post",data:e}),b=e=>m("/sy/statistics/attendance/excel",e,"考勤统计.xlsx"),g=e=>c({url:"/sy/statistics/sign/in",method:"post",data:e}),y=e=>m("/sy/statistics/sign/in/excel",e,"签到统计.xlsx")},b68e:function(e,t,a){}}]);