{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\dataAnalysis\\attendance.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\dataAnalysis\\attendance.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport Cookies from 'js-cookie'\nimport qs from 'qs'\nimport {getDictDataList} from '@/utils'\nimport vView from './v-view'\nimport {\n\t\tbuildMerge\n\t} from \"../../../utils/mergeCell.js\"\n export default {\n data(){\n return{\n viewVisible: false,\n dataForm: {\n scWaid:'',\n startDate:\"\",\n endDate:\"\",\n },\n dataList:[],\n //教职工\n staffList:[],\n centerDialogVisible: false,\n form:{\n date:'',\n },\n ruleform:{\n date:{required: true, message: '请选择日期', trigger: 'change'}\n },\n loading: false,\n dateRange:[]\n }\n },\n components: {\n\t\t\tvView\n\t\t},\n computed: {\n\t\t\tschoolList() {\n\t\t\t\treturn getDictDataList(\"school\")\n },\n toolComputed() {\n\t\t\t\treturn function(dateStr, row) {\n\t\t\t\t\tlet str = \"\"\n\t\t\t\t\trow.forEach(item => {\n\t\t\t\t\t\tif (dateStr === item.stDate) {\n\t\t\t\t\t\t\tstr = `${item.stDate} ${item.stNum}次`\n\t\t\t\t\t\t}\n })\n\t\t\t\t\treturn str\n\t\t\t\t}\n },\n \n },\n mounted(){\n this.getStaffList()\n this.getDataList()\n\n let current=new Date()\n let dd=new Date((new Date).getTime() - 24 * 60 * 60 * 1000)\n let today=current.toLocaleString('chinese', { hour12: false }).split('/').join('-').substr(0,10)\n let old7=current.setDate(current.getDate()-6)\n let time=(new Date(parseInt(old7))).toLocaleDateString().replaceAll('/','-')\n this.dataForm.startDate=time\n this.dataForm.endDate=today\n this.getBetweenDateStr(time, today);\n },\n methods: {\n getBetweenDateStr(start,end){\n var result = [];\n var beginDay = start.split(\"-\");\n var endDay = end.split(\"-\");\n var diffDay = new Date();\n var dateList = new Array;\n var i = 0;\n diffDay.setDate(beginDay[2]);\n diffDay.setMonth(beginDay[1]-1);\n diffDay.setFullYear(beginDay[0]);\n result.push(start);\n while(i == 0){\n var countDay = diffDay.getTime() + 24 * 60 * 60 * 1000;\n diffDay.setTime(countDay);\n dateList[2] = diffDay.getDate();\n dateList[1] = diffDay.getMonth() + 1;\n dateList[0] = diffDay.getFullYear();\n if(String(dateList[1]).length == 1){dateList[1] = \"0\"+dateList[1]};\n if(String(dateList[2]).length == 1){dateList[2] = \"0\"+dateList[2]};\n result.push(dateList[0]+\"-\"+dateList[1]+\"-\"+dateList[2]);\n if(dateList[0] == endDay[0] && dateList[1] == endDay[1] && dateList[2] == endDay[2]){ i = 1;\n }\n }; \n this.dateRange=result;\n },\n getDataList(){\n this.loading = true\n this.$http.get('/system/scattendancestatistics/dataInfo',{params: this.dataForm})\n .then(({data:res})=>{\n if (res.data.length > 0) {\n buildMerge(res.data, 'scWaname', 'aeDevicename') \n\t\t\t\t\t\tthis.dataList = res.data\n\t\t\t\t\t\tthis.loading = false\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.dataList = []\n\t\t\t\t\t}\n }).catch(() => {}).finally(() => {\n\t\t\t\t\tthis.loading = false\n\t\t\t\t})\n },\n exportDia(){\n this.centerDialogVisible=true;\n },\n // 导出\n\t\t\texportHandle() {\n this.$refs['form'].validate((valid) => {\n if (valid) {\n let params={\n endDate: this.form.date[1],\n startDate: this.form.date[0],\n scWaid:this.dataForm.scWaid\n }\n\n this.$http\n .get(`/system/scattendancestatistics/export`, {\n responseType: \"blob\",\n params\n })\n .then(res => {\n if(res.data.type == 'application/json'){\n return this.$message.info(\"暂无数据导出\")\n }\n const content = res.data;\n const blob = new Blob([content], {\n type: \"application/vnd.ms-excel;charset=utf-8\"\n });\n const fileName =\"考勤统计表(\"+res.config.params.startDate+\"-\"+res.config.params.endDate+\")\";\n if (\"download\" in document.createElement(\"a\")) {\n // 非IE下载\n const elink = document.createElement(\"a\");\n elink.download = fileName;\n elink.style.display = \"none\";\n elink.href = URL.createObjectURL(blob);\n document.body.appendChild(elink);\n elink.click();\n URL.revokeObjectURL(elink.href); // 释放URL 对象\n document.body.removeChild(elink);\n } else {\n // IE10+下载\n navigator.msSaveBlob(blob, fileName);\n }\n })\n .catch(err => {});\n } else {\n return false;\n }\n });\t\t\n\t\t\t},\n\t\t\treset(formName) {\n this.dataForm.scWaid='';\n this.getDataList()\n },\n // 获取职工信息\n\t\t\tgetStaffList() {\n\t\t\t\tthis.$http.get(`/system/scworkersarchives/getAll`).then(({\n\t\t\t\t\tdata: res\n\t\t\t\t}) => {\n\t\t\t\t\tif (res.code !== 0) {\n\t\t\t\t\t\treturn this.$message.error(res.msg)\n\t\t\t\t\t}\n\t\t\t\t\tthis.staffList = res.data\n\t\t\t\t}).catch(() => {})\n },\n handleDialogClose(){\n this.centerDialogVisible=false;\n this.form.date=''\n },\n objectSpanMethod({\n\t\t\t\trow,\n\t\t\t\tcolumn,\n\t\t\t\trowIndex,\n\t\t\t\tcolumnIndex\n\t\t\t}) {\n\t\t\t\tif (columnIndex === 0) {\n\t\t\t\t\treturn this.ret(row, 'firstSpan')\n\t\t\t\t} else if (columnIndex === 1) {\n\t\t\t\t\treturn this.ret(row, 'secondSpan')\n\t\t\t\t} else if (columnIndex === 2) {\n\t\t\t\t\treturn this.ret(row, 'thirdSpan')\n\t\t\t\t}\n\t\t\t},\n\t\t\tret(row, obj) {\n\t\t\t\tif (row && row[obj] != 0) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trowspan: row[obj],\n\t\t\t\t\t\tcolspan: 1\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trowspan: 0,\n\t\t\t\t\t\tcolspan: 0\n\t\t\t\t\t}\n\t\t\t\t}\n },\n //xiangqing\n viewHandle(row) {\n\t\t\t\tthis.viewVisible = true\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$refs.viewRef.init(row,this.dataForm,\"/system/scattendancestatistics/dataInfo\")\n\t\t\t\t})\n\t\t\t},\n\t\t}\n }\n",{"version":3,"sources":["attendance.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"attendance.vue","sourceRoot":"src/views/modules/dataAnalysis","sourcesContent":["\n\n\n\n"]}]}