Portal/potal_admin/up-portal-admin-1.0.1/js/chunk-377cca88.c94e228e.js

1 line
14 KiB
JavaScript
Raw Permalink 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-377cca88","chunk-32792f0c"],{1380: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 not-in-or-out",attrs:{shadow:"never"}},[a("el-form",{ref:"ruleForm",attrs:{model:t.dataForm,inline:!0},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getDataList()}}},[a("el-form-item",{attrs:{label:"时间选择"}},[a("el-date-picker",{attrs:{type:"daterange","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":t.pickerOptions},model:{value:t.daterange,callback:function(e){t.daterange=e},expression:"daterange"}})],1),a("el-form-item",{attrs:{label:"次数"}},[a("el-input",{model:{value:t.dataForm.num,callback:function(e){t.$set(t.dataForm,"num",e)},expression:"dataForm.num"}})],1),a("el-form-item",{attrs:{label:"类型",prop:"typeArr"}},[a("el-select",{staticStyle:{width:"500px"},attrs:{filterable:"",placeholder:"请选择",multiple:"",clearable:""},model:{value:t.typeArr,callback:function(e){t.typeArr=e},expression:"typeArr"}},t._l(t.options,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),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("重置")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",staticStyle:{width:"100%"},attrs:{"element-loading-text":"拼命加载中","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(0, 0, 0, 0.8)",border:"","span-method":t.objectSpanMethod,data:t.dataList,"header-cell-style":{fontSize:"16px"}}},[a("el-table-column",{attrs:{prop:"scStuname",align:"center",label:"姓名",width:"100"}}),a("el-table-column",{attrs:{align:"center",label:"性别",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n\t\t\t\t"+t._s(t.$getDictLabel("gender",e.row.scSex))+"\n\t\t\t")]}}])}),a("el-table-column",{attrs:{prop:"scPhonenum",align:"center",label:"联系电话",width:"200"}}),a("el-table-column",{attrs:{prop:"type",align:"center",label:"位置",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.type?a("span",[t._v("宿舍闸机")]):2==e.row.type?a("span",[t._v("教学楼闸机")]):4==e.row.type?a("span",[t._v("UWB")]):t._e()]}}])}),a("el-table-column",{attrs:{prop:"times",align:"center",label:"异常次数",width:"180"}}),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.dataAnalysisInfoDTOList)?t.toolComputed(n,e.row.dataAnalysisInfoDTOList):n,placement:"top-start"}},[a("div",{staticClass:"divSquare",style:{backgroundColor:t.toolComputed(n,e.row.dataAnalysisInfoDTOList)?"red":"green"}})])})),1)]}}])},[a("template",{slot:"header"},[a("div",{staticStyle:{display:"flex","justify-content":"center","align-items":"center"}},[a("div",[t._v("结果描述")]),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()],1)},i=[],r=a("53ca"),o=(a("ac6a"),a("ce0c")),s=a("457f"),l=a("7e6a"),c={components:{vView:l["default"]},data:function(){return{viewVisible:!1,loading:!1,options:[{value:"1",label:"宿舍闸机"},{value:"2",label:"教学楼闸机"},{value:"4",label:"UWB"}],pickerOptions:{disabledDate:function(t){return t.getTime()>Date.now()-864e5}},daterange:[new Date((new Date).getTime()-1296e6),new Date(new Date-864e5)],typeArr:["1","2"],dataForm:{startDate:"",endDate:"",num:3,type:""},dataList:[],dateRange:[]}},watch:{daterange:function(t){t?(this.dataForm.startDate=t[0],this.dataForm.endDate=t[1]):(this.dataForm.startDate="",this.dataForm.endDate="")}},computed:{toolComputed:function(){return function(t,e){var a="";return e.forEach((function(e){t===e.createDate&&(a="".concat(e.createDate," ").concat(e.num,"次"))})),a}}},mounted:function(){this.getDataList()},methods:{viewHandle:function(t){var e=this;this.viewVisible=!0,this.$nextTick((function(){e.$refs.viewRef.init(t,e.dataForm,"/system/dataAnalysis/onlyOutNotIn")}))},getDataList:function(){var t=this;if(0===this.typeArr.length)return this.$message.warning("类型不能为空");this.dataForm.type=this.typeArr.join(),this.daterange&&(this.dataForm.startDate=this.daterange[0],this.dataForm.endDate=this.daterange[1],"object"===Object(r["a"])(this.dataForm.startDate)?this.dateRange=Object(o["a"])(Object(o["b"])(this.dataForm.startDate),Object(o["b"])(this.dataForm.endDate)):this.dateRange=Object(o["a"])(this.dataForm.startDate,this.dataForm.endDate)),this.loading=!0,this.$http.get("/system/dataAnalysis/onlyOutNotIn",{params:this.dataForm}).then((function(e){var a=e.data;a.data.length>0?(Object(s["a"])(a.data,"scStuname","scSex","scPhonenum"),t.dataList=a.data.map((function(t){return t.times=0,t.dataAnalysisInfoDTOList.forEach((function(e){t.times=t.times+e.num})),t})),t.loading=!1):t.dataList=[]})).catch((function(){})).finally((function(){t.loading=!1}))},reset:function(t){this.$refs[t].resetFields(),this.daterange=[new Date((new Date).getTime()-1296e6),new Date(new Date-864e5)],this.typeArr=["1","2"],this.getDataList()},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}}}},d=c,u=(a("c090"),a("2877")),f=Object(u["a"])(d,n,i,!1,null,"5a99cb58",null);e["default"]=f.exports},"28a5":function(t,e,a){"use strict";var n=a("aae3"),i=a("cb7c"),r=a("ebd6"),o=a("0390"),s=a("9def"),l=a("5f1b"),c=a("520a"),d=a("79e5"),u=Math.min,f=[].push,h="split",p="length",v="lastIndex",m=4294967295,g=!d((function(){RegExp(m,"y")}));a("214f")("split",2,(function(t,e,a,d){var y;return y="c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[p]||2!="ab"[h](/(?:ab)*/)[p]||4!="."[h](/(.?)(.?)/)[p]||"."[h](/()()/)[p]>1||""[h](/.?/)[p]?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,o,s,l=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),u=0,h=void 0===e?m:e>>>0,g=new RegExp(t.source,d+"g");while(r=c.call(g,i)){if(o=g[v],o>u&&(l.push(i.slice(u,r.index)),r[p]>1&&r.index<i[p]&&f.apply(l,r.slice(1)),s=r[0][p],u=o,l[p]>=h))break;g[v]===r.index&&g[v]++}return u===i[p]?!s&&g.test("")||l.push(""):l.push(i.slice(u)),l[p]>h?l.slice(0,h):l}:"0"[h](void 0,0)[p]?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):y.call(String(i),a,n)},function(t,e){var n=d(y,t,this,e,y!==a);if(n.done)return n.value;var c=i(t),f=String(this),h=r(c,RegExp),p=c.unicode,v=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(g?"y":"g"),w=new h(g?c:"^(?:"+c.source+")",v),b=void 0===e?m:e>>>0;if(0===b)return[];if(0===f.length)return null===l(w,f)?[f]:[];var D=0,S=0,_=[];while(S<f.length){w.lastIndex=g?S:0;var k,O=l(w,g?f:f.slice(S));if(null===O||(k=u(s(w.lastIndex+(g?0:S)),f.length))===D)S=o(f,S,p);else{if(_.push(f.slice(D,S)),_.length===b)return _;for(var x=1;x<=O.length-1;x++)if(_.push(O[x]),_.length===b)return _;S=D=k}}return _.push(f.slice(D)),_}]}))},"3edf":function(t,e,a){"use strict";a("ccdb")},"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 o={},s={},l={},c={},d="",u="",f="",h="",p=0,v=t.length;p<v;p++)d=t[p][e],u=t[p][a],f=t[p][n],h=t[p][r],o[d]?o[d].push(t[p].id):o[d]=new Array(t[p].id),s[u]?s[u].push(t[p].id):s[u]=new Array(t[p].id),l[f]?l[f].push(t[p].id):l[f]=new Array(t[p].id),c[h]?c[h].push(t[p].id):c[h]=new Array(t[p].id);i(t,o,s,l,c)}function i(t,e,a,n,i){var o=function(o){var s=t.filter((function(t){return t.id===e[o][0]}))[0];s&&(s["firstSpan"]=e[o].length),r(t,e[o],a,n,i)};for(var s in e)o(s)}function r(t,e,a,n,i){var r=[],s=function(n){var i=a[n].filter((function(t){return e.indexOf(t)>-1})),o=t.filter((function(t){return t.id===i[0]}))[0];o&&(o["secondSpan"]=i.length),r.push(i)};for(var l in a)s(l);r.forEach((function(e){o(t,e,n,i)}))}function o(t,e,a,n){var i=[],r=function(n){var r=a[n].filter((function(t){return e.indexOf(t)>-1})),o=t.filter((function(t){return t.id===r[0]}))[0];o&&(o["thirdSpan"]=r.length),i.push(r)};for(var o in a)r(o);i.forEach((function(e){s(t,e,n)}))}function s(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)}},"53ca":function(t,e,a){"use strict";function n(t){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}a.d(e,"a",(function(){return n}))},"7d1c":function(t,e,a){},"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(),o=n[new Date(new Date(this.dateOf1).getTime()-1728e5).getMonth()],s=new Date(this.dateOf1).getTime()-1728e5,l=new Date(s).getFullYear()+"-"+(new Date(s).getMonth()+1),c=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=o-r+f+1,h.date=l+"-"+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=c+"-"+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}}}),o=r,s=(a("3edf"),a("2877")),l=Object(s["a"])(o,n,i,!1,null,"7a743c4a",null);e["default"]=l.exports},c090:function(t,e,a){"use strict";a("7d1c")},ccdb:function(t,e,a){},ce0c:function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return r}));a("28a5");var n=function(t){var e="",a=t.getMonth()+1>=10?t.getMonth()+1:"0"+(t.getMonth()+1),n=t.getDate()>=10?t.getDate():"0"+t.getDate();return e+=t.getFullYear()+"-",e+=a+"-",e+=n,e},i=function(t,e){var a=[],i=t.split("-"),r=e.split("-"),o=new Date;o.setUTCFullYear(i[0],i[1]-1,i[2]);var s=new Date;s.setUTCFullYear(r[0],r[1]-1,r[2]);var l,c=o.getTime(),d=s.getTime(),u=864e5;for(l=c;l<=d;)a.push(n(new Date(parseInt(l)))),l+=u;return a};function r(t){var e="-",a=t.getFullYear(),n=t.getMonth()+1,i=t.getDate();n>=1&&n<=9&&(n="0"+n),i>=0&&i<=9&&(i="0"+i);var r=a+e+n+e+i;return r}}}]);