Portal/potal_admin/up-portal-admin-1.0.1/js/chunk-4c1a000a.905cd63f.js

1 line
14 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4c1a000a","chunk-32792f0c"],{"28a5":function(t,e,a){"use strict";var n=a("aae3"),i=a("cb7c"),r=a("ebd6"),s=a("0390"),o=a("9def"),c=a("5f1b"),l=a("520a"),d=a("79e5"),u=Math.min,f=[].push,h="split",v="length",m="lastIndex",g=4294967295,p=!d((function(){RegExp(g,"y")}));a("214f")("split",2,(function(t,e,a,d){var w;return w="c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[v]||2!="ab"[h](/(?:ab)*/)[v]||4!="."[h](/(.?)(.?)/)[v]||"."[h](/()()/)[v]>1||""[h](/.?/)[v]?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!n(t))return a.call(i,t,e);var r,s,o,c=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),u=0,h=void 0===e?g:e>>>0,p=new RegExp(t.source,d+"g");while(r=l.call(p,i)){if(s=p[m],s>u&&(c.push(i.slice(u,r.index)),r[v]>1&&r.index<i[v]&&f.apply(c,r.slice(1)),o=r[0][v],u=s,c[v]>=h))break;p[m]===r.index&&p[m]++}return u===i[v]?!o&&p.test("")||c.push(""):c.push(i.slice(u)),c[v]>h?c.slice(0,h):c}:"0"[h](void 0,0)[v]?function(t,e){return void 0===t&&0===e?[]:a.call(this,t,e)}:a,[function(a,n){var i=t(this),r=void 0==a?void 0:a[e];return void 0!==r?r.call(a,i,n):w.call(String(i),a,n)},function(t,e){var n=d(w,t,this,e,w!==a);if(n.done)return n.value;var l=i(t),f=String(this),h=r(l,RegExp),v=l.unicode,m=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(p?"y":"g"),b=new h(p?l:"^(?:"+l.source+")",m),y=void 0===e?g:e>>>0;if(0===y)return[];if(0===f.length)return null===c(b,f)?[f]:[];var D=0,S=0,k=[];while(S<f.length){b.lastIndex=p?S:0;var x,_=c(b,p?f:f.slice(S));if(null===_||(x=u(o(b.lastIndex+(p?0:S)),f.length))===D)S=s(f,S,v);else{if(k.push(f.slice(D,S)),k.length===y)return k;for(var C=1;C<=_.length-1;C++)if(k.push(_[C]),k.length===y)return k;S=D=x}}return k.push(f.slice(D)),k}]}))},"3edf":function(t,e,a){"use strict";a("ccdb")},"3f1d":function(t,e,a){"use strict";a("b5f3")},"457f":function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));a("ac6a");function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label1",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label2",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"label3",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"label4";t.length>0&&(0!==t[0].id||"0"!==t[0].id)&&t.forEach((function(t,e){t.id=[e]}));for(var s={},o={},c={},l={},d="",u="",f="",h="",v=0,m=t.length;v<m;v++)d=t[v][e],u=t[v][a],f=t[v][n],h=t[v][r],s[d]?s[d].push(t[v].id):s[d]=new Array(t[v].id),o[u]?o[u].push(t[v].id):o[u]=new Array(t[v].id),c[f]?c[f].push(t[v].id):c[f]=new Array(t[v].id),l[h]?l[h].push(t[v].id):l[h]=new Array(t[v].id);i(t,s,o,c,l)}function i(t,e,a,n,i){var s=function(s){var o=t.filter((function(t){return t.id===e[s][0]}))[0];o&&(o["firstSpan"]=e[s].length),r(t,e[s],a,n,i)};for(var o in e)s(o)}function r(t,e,a,n,i){var r=[],o=function(n){var i=a[n].filter((function(t){return e.indexOf(t)>-1})),s=t.filter((function(t){return t.id===i[0]}))[0];s&&(s["secondSpan"]=i.length),r.push(i)};for(var c in a)o(c);r.forEach((function(e){s(t,e,n,i)}))}function s(t,e,a,n){var i=[],r=function(n){var r=a[n].filter((function(t){return e.indexOf(t)>-1})),s=t.filter((function(t){return t.id===r[0]}))[0];s&&(s["thirdSpan"]=r.length),i.push(r)};for(var s in a)r(s);i.forEach((function(e){o(t,e,n)}))}function o(t,e,a){var n=function(n){var i=a[n].filter((function(t){return e.indexOf(t)>-1})),r=t.filter((function(t){return t.id===i[0]}))[0];r&&(r["fourthSpan"]=i.length)};for(var i in a)n(i)}},"7e6a":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:"详情",visible:t.dialogVisible,"close-on-click-modal":!1,width:"25%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{staticClass:"calendar"},[a("div",{staticClass:"main"},[a("div",{staticClass:"nav"},[t.row.scStuname?a("div",{staticClass:"name"},[t._v(t._s(t.row.scStuname))]):a("div",{staticClass:"name"},[t._v(t._s(t.scWaname))]),a("div",{staticClass:"yearMonth"},[t._v(t._s(t.yearMonth))]),a("div",{staticClass:"btn-div"},[a("span",{staticClass:"el-icon-arrow-up",on:{click:function(e){return t.monthHandle("pre")}}}),a("span",{staticClass:"el-icon-arrow-down",on:{click:function(e){return t.monthHandle("next")}}})])]),a("div",{staticClass:"weeks"},t._l(t.weekArr,(function(e){return a("div",{staticClass:"week"},[t._v("\n\t\t\t\t\t"+t._s(e)+"\n\t\t\t\t")])})),0),a("div",{staticClass:"content"},t._l(t.dateArr,(function(e){return a("div",{staticClass:"content-item"},[t.loadData(e.date)?a("div",{staticClass:"content-item-div",staticStyle:{"background-color":"#C40","border-radius":"50%"}},[a("div",{style:{color:e.color}},[t._v(t._s(e.day))]),"/system/dataAnalysis/onlyInNotOut"!=t.url?a("div",{staticStyle:{color:"darkred"}},[t._v(t._s(t.loadData(e.date)))]):t._e()]):a("div",{staticClass:"content-item-div"},[a("div",{style:{color:e.color}},[t._v(t._s(e.day))])])])})),0)])])])},i=[],r=(a("ac6a"),{data:function(){return{dialogVisible:!1,weekArr:["一","二","三","四","五","六","日"],dateArr:[],yearMonth:"",dateOf1:"",dateOf28:"",row:{},rows:{},obj:{},url:"",name:"",scWaname:""}},computed:{loadData:function(){return function(t){var e="";return this.rows.scAttendanceStatisticsDataInfoDTOList?this.rows.scAttendanceStatisticsDataInfoDTOList.forEach((function(a){t===a.stDate&&(e=a.stNum+"次")})):this.row.dataAnalysisInfoDTOList.forEach((function(a){t===a.createDate&&(e=a.num+"次")})),e}}},methods:{init:function(t,e,a){this.scWaname=t.scWaname,this.rows=t,this.dialogVisible=!0,this.row=JSON.parse(JSON.stringify(t)),this.obj=JSON.parse(JSON.stringify(e)),this.url=a,this.renderCalender(new Date(this.obj.startDate))},renderCalender:function(t){console.log(t);var e=t.getFullYear(),a=t.getMonth()+1;this.yearMonth="".concat(e,"年").concat(a,"月"),this.dateOf1=new Date("".concat(e,",").concat(a,",1")),this.dateOf28=new Date("".concat(e,",").concat(a,",28"));var n=[31,this.isLeapYear(e),31,30,31,30,31,31,30,31,30,31],i=n[a-1],r=0===this.dateOf1.getDay()?7:this.dateOf1.getDay(),s=n[new Date(new Date(this.dateOf1).getTime()-1728e5).getMonth()],o=new Date(this.dateOf1).getTime()-1728e5,c=new Date(o).getFullYear()+"-"+(new Date(o).getMonth()+1),l=e+"-"+a,d=new Date(this.dateOf28).getTime()+3456e5,u=new Date(d).getFullYear()+"-"+(new Date(d).getMonth()+1);this.dateArr=[];for(var f=1;f<43;f++){var h={day:"",date:"",color:"#000"};f<r?(h.day=s-r+f+1,h.date=c+"-"+h.day,h.color="gray",this.dateArr.push(h)):f>r+i-1?(h.day=f-r-i+1,h.date=u+"-"+h.day,h.color="gray",this.dateArr.push(h)):(h.day=f-r+1,h.date=l+"-"+h.day,this.dateArr.push(h))}this.getData()},getData:function(){var t=this;this.obj.startDate=this.dateArr[0].date,this.obj.endDate=this.dateArr[this.dateArr.length-1].date,this.$http.get(this.url,{params:this.obj}).then((function(e){var a=e.data;a.data.forEach((function(e){e.scStuname?e.scStuname===t.row.scStuname&&(t.row=e):e.scWaname&&e.aeDevicename===t.rows.aeDevicename&&e.scWaname===t.rows.scWaname&&(t.rows=e)}))})).catch((function(){})).finally((function(){t.loading=!1}))},monthHandle:function(t){var e="pre"===t?new Date(this.dateOf1).getTime()-1728e5:new Date(this.dateOf28).getTime()+3456e5;this.renderCalender(new Date(e))},isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0?29:28}}}),s=r,o=(a("3edf"),a("2877")),c=Object(o["a"])(s,n,i,!1,null,"7a743c4a",null);e["default"]=c.exports},"8aa5":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-card",{staticClass:"aui-card--fill staff-report attendance",attrs:{shadow:"never"}},[a("el-form",{ref:"ruleForm",attrs:{inline:"",model:t.dataForm},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getDataList.apply(null,arguments)}}},[a("el-form-item",{attrs:{label:"教职工"}},[a("el-select",{attrs:{placeholder:"请选择",filterable:"",clearable:""},model:{value:t.dataForm.scWaid,callback:function(e){t.$set(t.dataForm,"scWaid",e)},expression:"dataForm.scWaid"}},t._l(t.staffList,(function(t){return a("el-option",{key:t.scWaid,attrs:{label:t.scWaname,value:t.scWaid}})})),1)],1),a("el-form-item",[a("el-button",{on:{click:t.getDataList}},[t._v("查询")]),a("el-button",{attrs:{type:"warning"},on:{click:function(e){return t.reset("ruleForm")}}},[t._v("重置")]),a("el-button",{attrs:{type:"success"},on:{click:function(e){return t.exportDia()}}},[t._v("导出")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.dataList,border:"","element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)","span-method":t.objectSpanMethod}},[a("el-table-column",{attrs:{prop:"scWaname",label:"姓名",align:"center",width:"200"}}),a("el-table-column",{attrs:{prop:"aeDevicename",label:"房间号",align:"center",width:"200"}}),a("el-table-column",{attrs:{align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"squareContent",staticStyle:{display:"flex","flex-wrap":"wrap"}},t._l(t.dateRange,(function(n,i){return a("el-tooltip",{key:i,attrs:{effect:"light",content:t.toolComputed(n,e.row.scAttendanceStatisticsDataInfoDTOList)?t.toolComputed(n,e.row.scAttendanceStatisticsDataInfoDTOList):n,placement:"top-start"}},[a("div",{staticClass:"divSquare",style:{backgroundColor:t.toolComputed(n,e.row.scAttendanceStatisticsDataInfoDTOList)?"red":"green"}})])})),1)]}}])},[a("template",{slot:"header"},[a("div",{staticStyle:{display:"flex","justify-content":"center","align-items":"center"}},[a("div",[t._v("近7日考勤记录")]),a("div",[t._v("")]),a("div",{staticStyle:{width:"12px",height:"12px","background-color":"red",margin:"0 10px"}}),a("div",[t._v("有考情记录")]),a("div",{staticStyle:{width:"12px",height:"12px","background-color":"green",margin:"0 10px"}}),a("div",{staticStyle:{"margin-right":"10px"}},[t._v("无考勤记录")]),a("div",[t._v("")])])])],2),a("el-table-column",{attrs:{align:"center",label:"操作",width:"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.viewHandle(e.row)}}},[t._v("详情")])]}}])})],1),t.viewVisible?a("v-view",{ref:"viewRef"}):t._e(),a("el-dialog",{attrs:{title:"",visible:t.centerDialogVisible,"close-on-click-modal":!1,"before-close":t.handleDialogClose,width:"30%",center:""},on:{"update:visible":function(e){t.centerDialogVisible=e}}},[a("el-form",{ref:"form",attrs:{inline:"",model:t.form,rules:t.ruleform}},[a("el-form-item",{attrs:{label:"时间",prop:"date"}},[a("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd"},model:{value:t.form.date,callback:function(e){t.$set(t.form,"date",e)},expression:"form.date"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.exportHandle()}}},[t._v("导出")])],1)],1)],1)},i=[],r=(a("28a5"),a("ac6a"),a("a78e"),a("4328"),a("ed08")),s=a("7e6a"),o=a("457f"),c={data:function(){return{viewVisible:!1,dataForm:{scWaid:"",startDate:"",endDate:""},dataList:[],staffList:[],centerDialogVisible:!1,form:{date:""},ruleform:{date:{required:!0,message:"请选择日期",trigger:"change"}},loading:!1,dateRange:[]}},components:{vView:s["default"]},computed:{schoolList:function(){return Object(r["c"])("school")},toolComputed:function(){return function(t,e){var a="";return e.forEach((function(e){t===e.stDate&&(a="".concat(e.stDate," ").concat(e.stNum,"次"))})),a}}},mounted:function(){this.getStaffList(),this.getDataList();var t=new Date,e=(new Date((new Date).getTime()-864e5),t.toLocaleString("chinese",{hour12:!1}).split("/").join("-").substr(0,10)),a=t.setDate(t.getDate()-6),n=new Date(parseInt(a)).toLocaleDateString().replaceAll("/","-");this.dataForm.startDate=n,this.dataForm.endDate=e,this.getBetweenDateStr(n,e)},methods:{getBetweenDateStr:function(t,e){var a=[],n=t.split("-"),i=e.split("-"),r=new Date,s=new Array,o=0;r.setDate(n[2]),r.setMonth(n[1]-1),r.setFullYear(n[0]),a.push(t);while(0==o){var c=r.getTime()+864e5;r.setTime(c),s[2]=r.getDate(),s[1]=r.getMonth()+1,s[0]=r.getFullYear(),1==String(s[1]).length&&(s[1]="0"+s[1]),1==String(s[2]).length&&(s[2]="0"+s[2]),a.push(s[0]+"-"+s[1]+"-"+s[2]),s[0]==i[0]&&s[1]==i[1]&&s[2]==i[2]&&(o=1)}this.dateRange=a},getDataList:function(){var t=this;this.loading=!0,this.$http.get("/system/scattendancestatistics/dataInfo",{params:this.dataForm}).then((function(e){var a=e.data;a.data.length>0?(Object(o["a"])(a.data,"scWaname","aeDevicename"),t.dataList=a.data,t.loading=!1):t.dataList=[]})).catch((function(){})).finally((function(){t.loading=!1}))},exportDia:function(){this.centerDialogVisible=!0},exportHandle:function(){var t=this;this.$refs["form"].validate((function(e){if(!e)return!1;var a={endDate:t.form.date[1],startDate:t.form.date[0],scWaid:t.dataForm.scWaid};t.$http.get("/system/scattendancestatistics/export",{responseType:"blob",params:a}).then((function(e){if("application/json"==e.data.type)return t.$message.info("暂无数据导出");var a=e.data,n=new Blob([a],{type:"application/vnd.ms-excel;charset=utf-8"}),i="考勤统计表("+e.config.params.startDate+"-"+e.config.params.endDate+")";if("download"in document.createElement("a")){var r=document.createElement("a");r.download=i,r.style.display="none",r.href=URL.createObjectURL(n),document.body.appendChild(r),r.click(),URL.revokeObjectURL(r.href),document.body.removeChild(r)}else navigator.msSaveBlob(n,i)})).catch((function(t){}))}))},reset:function(t){this.dataForm.scWaid="",this.getDataList()},getStaffList:function(){var t=this;this.$http.get("/system/scworkersarchives/getAll").then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.staffList=a.data})).catch((function(){}))},handleDialogClose:function(){this.centerDialogVisible=!1,this.form.date=""},objectSpanMethod:function(t){var e=t.row,a=(t.column,t.rowIndex,t.columnIndex);return 0===a?this.ret(e,"firstSpan"):1===a?this.ret(e,"secondSpan"):2===a?this.ret(e,"thirdSpan"):void 0},ret:function(t,e){return t&&0!=t[e]?{rowspan:t[e],colspan:1}:{rowspan:0,colspan:0}},viewHandle:function(t){var e=this;this.viewVisible=!0,this.$nextTick((function(){e.$refs.viewRef.init(t,e.dataForm,"/system/scattendancestatistics/dataInfo")}))}}},l=c,d=(a("3f1d"),a("2877")),u=Object(d["a"])(l,n,i,!1,null,"543acc96",null);e["default"]=u.exports},b5f3:function(t,e,a){},ccdb:function(t,e,a){}}]);