management/front/dkha-web-sz-main/node_modules/.cache/babel-loader/b3de24550e38c41f28ff4e1c843...

1 line
27 KiB
JSON
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.

{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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":["import \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\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 { buildMerge } from \"../../../utils/mergeCell.js\";\nexport default {\n data: function 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: {\n required: true,\n message: '请选择日期',\n trigger: 'change'\n }\n },\n loading: false,\n dateRange: []\n };\n },\n components: {\n vView: vView\n },\n computed: {\n schoolList: function schoolList() {\n return getDictDataList(\"school\");\n },\n toolComputed: function toolComputed() {\n return function (dateStr, row) {\n var str = \"\";\n row.forEach(function (item) {\n if (dateStr === item.stDate) {\n str = \"\".concat(item.stDate, \" \").concat(item.stNum, \"\\u6B21\");\n }\n });\n return str;\n };\n }\n },\n mounted: function mounted() {\n this.getStaffList();\n this.getDataList();\n var current = new Date();\n var dd = new Date(new Date().getTime() - 24 * 60 * 60 * 1000);\n var today = current.toLocaleString('chinese', {\n hour12: false\n }).split('/').join('-').substr(0, 10);\n var old7 = current.setDate(current.getDate() - 6);\n var 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: function 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\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\n if (String(dateList[1]).length == 1) {\n dateList[1] = \"0\" + dateList[1];\n }\n\n ;\n\n if (String(dateList[2]).length == 1) {\n dateList[2] = \"0\" + dateList[2];\n }\n\n ;\n result.push(dateList[0] + \"-\" + dateList[1] + \"-\" + dateList[2]);\n\n if (dateList[0] == endDay[0] && dateList[1] == endDay[1] && dateList[2] == endDay[2]) {\n i = 1;\n }\n }\n\n ;\n this.dateRange = result;\n },\n getDataList: function getDataList() {\n var _this = this;\n\n this.loading = true;\n this.$http.get('/system/scattendancestatistics/dataInfo', {\n params: this.dataForm\n }).then(function (_ref) {\n var res = _ref.data;\n\n if (res.data.length > 0) {\n buildMerge(res.data, 'scWaname', 'aeDevicename');\n _this.dataList = res.data;\n _this.loading = false;\n } else {\n _this.dataList = [];\n }\n }).catch(function () {}).finally(function () {\n _this.loading = false;\n });\n },\n exportDia: function exportDia() {\n this.centerDialogVisible = true;\n },\n // 导出\n exportHandle: function exportHandle() {\n var _this2 = this;\n\n this.$refs['form'].validate(function (valid) {\n if (valid) {\n var params = {\n endDate: _this2.form.date[1],\n startDate: _this2.form.date[0],\n scWaid: _this2.dataForm.scWaid\n };\n\n _this2.$http.get(\"/system/scattendancestatistics/export\", {\n responseType: \"blob\",\n params: params\n }).then(function (res) {\n if (res.data.type == 'application/json') {\n return _this2.$message.info(\"暂无数据导出\");\n }\n\n var content = res.data;\n var blob = new Blob([content], {\n type: \"application/vnd.ms-excel;charset=utf-8\"\n });\n var fileName = \"考勤统计表(\" + res.config.params.startDate + \"-\" + res.config.params.endDate + \")\";\n\n if (\"download\" in document.createElement(\"a\")) {\n // 非IE下载\n var 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\n document.body.removeChild(elink);\n } else {\n // IE10+下载\n navigator.msSaveBlob(blob, fileName);\n }\n }).catch(function (err) {});\n } else {\n return false;\n }\n });\n },\n reset: function reset(formName) {\n this.dataForm.scWaid = '';\n this.getDataList();\n },\n // 获取职工信息\n getStaffList: function getStaffList() {\n var _this3 = this;\n\n this.$http.get(\"/system/scworkersarchives/getAll\").then(function (_ref2) {\n var res = _ref2.data;\n\n if (res.code !== 0) {\n return _this3.$message.error(res.msg);\n }\n\n _this3.staffList = res.data;\n }).catch(function () {});\n },\n handleDialogClose: function handleDialogClose() {\n this.centerDialogVisible = false;\n this.form.date = '';\n },\n objectSpanMethod: function objectSpanMethod(_ref3) {\n var row = _ref3.row,\n column = _ref3.column,\n rowIndex = _ref3.rowIndex,\n columnIndex = _ref3.columnIndex;\n\n if (columnIndex === 0) {\n return this.ret(row, 'firstSpan');\n } else if (columnIndex === 1) {\n return this.ret(row, 'secondSpan');\n } else if (columnIndex === 2) {\n return this.ret(row, 'thirdSpan');\n }\n },\n ret: function ret(row, obj) {\n if (row && row[obj] != 0) {\n return {\n rowspan: row[obj],\n colspan: 1\n };\n } else {\n return {\n rowspan: 0,\n colspan: 0\n };\n }\n },\n //xiangqing\n viewHandle: function viewHandle(row) {\n var _this4 = this;\n\n this.viewVisible = true;\n this.$nextTick(function () {\n _this4.$refs.viewRef.init(row, _this4.dataForm, \"/system/scattendancestatistics/dataInfo\");\n });\n }\n }\n};",{"version":3,"sources":["attendance.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA,OAAA,OAAA,MAAA,WAAA;AACA,OAAA,EAAA,MAAA,IAAA;AACA,SAAA,eAAA,QAAA,SAAA;AACA,OAAA,KAAA;AACA,SACA,UADA;AAGA,eAAA;AACA,EAAA,IADA,kBACA;AACA,WAAA;AACA,MAAA,WAAA,EAAA,KADA;AAEA,MAAA,QAAA,EAAA;AACA,QAAA,MAAA,EAAA,EADA;AAEA,QAAA,SAAA,EA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wGA;AACA,WAAA,mBAAA,GAAA,KAAA;AACA,WAAA,IAAA,CAAA,IAAA,GAAA,EAAA;AACA,KA3GA;AA4GA,IAAA,gBA5GA,mCAiHA;AAAA,UAJA,GAIA,SAJA,GAIA;AAAA,UAHA,MAGA,SAHA,MAGA;AAAA,UAFA,QAEA,SAFA,QAEA;AAAA,UADA,WACA,SADA,WACA;;AACA,UAAA,WAAA,KAAA,CAAA,EAAA;AACA,eAAA,KAAA,GAAA,CAAA,GAAA,EAAA,WAAA,CAAA;AACA,OAFA,MAEA,IAAA,WAAA,KAAA,CAAA,EAAA;AACA,eAAA,KAAA,GAAA,CAAA,GAAA,EAAA,YAAA,CAAA;AACA,OAFA,MAEA,IAAA,WAAA,KAAA,CAAA,EAAA;AACA,eAAA,KAAA,GAAA,CAAA,GAAA,EAAA,WAAA,CAAA;AACA;AACA,KAzHA;AA0HA,IAAA,GA1HA,eA0HA,GA1HA,EA0HA,GA1HA,EA0HA;AACA,UAAA,GAAA,IAAA,GAAA,CAAA,GAAA,CAAA,IAAA,CAAA,EAAA;AACA,eAAA;AACA,UAAA,OAAA,EAAA,GAAA,CAAA,GAAA,CADA;AAEA,UAAA,OAAA,EAAA;AAFA,SAAA;AAIA,OALA,MAKA;AACA,eAAA;AACA,UAAA,OAAA,EAAA,CADA;AAEA,UAAA,OAAA,EAAA;AAFA,SAAA;AAIA;AACA,KAtIA;AAuIA;AACA,IAAA,UAxIA,sBAwIA,GAxIA,EAwIA;AAAA;;AACA,WAAA,WAAA,GAAA,IAAA;AACA,WAAA,SAAA,CAAA,YAAA;AACA,QAAA,MAAA,CAAA,KAAA,CAAA,OAAA,CAAA,IAAA,CAAA,GAAA,EAAA,MAAA,CAAA,QAAA,EAAA,yCAAA;AACA,OAFA;AAGA;AA7IA;AAxDA,CAAA","sourcesContent":["<template>\n <el-card shadow=\"never\" class=\"aui-card--fill staff-report attendance\">\n <el-form inline :model=\"dataForm\" ref=\"ruleForm\" @keyup.enter.native=\"getDataList\">\n\t\t\t<el-form-item label=\"教职工\">\n\t\t\t\t<el-select v-model=\"dataForm.scWaid\" placeholder=\"请选择\" filterable clearable>\n\t\t\t\t\t<el-option v-for=\"item in staffList\" :label=\"item.scWaname\" :value=\"item.scWaid\" :key=\"item.scWaid\"></el-option>\n\t\t\t\t</el-select>\n </el-form-item>\n\t\t\t<el-form-item>\n\t\t\t\t<el-button @click=\"getDataList\">查询</el-button>\n\t\t\t\t<el-button type=\"warning\" @click=\"reset('ruleForm')\">重置</el-button>\n <el-button type=\"success\" @click=\"exportDia()\">导出</el-button>\n\t\t\t</el-form-item>\n\t\t</el-form>\n\n <el-table v-loading=\"loading\" :data=\"dataList\" style=\"width: 100%;\" border element-loading-text=\"拼命加载中\" element-loading-spinner=\"el-icon-loading\"\n\t\t element-loading-background=\"rgba(0, 0, 0, 0.8)\" :span-method=\"objectSpanMethod\">\n\t\t\t<el-table-column prop=\"scWaname\" label=\"姓名\" align=\"center\" width=\"200\"></el-table-column>\n\t\t\t<el-table-column prop=\"aeDevicename\" label=\"房间号\" align=\"center\" width=\"200\"></el-table-column>\n\t\t\t<el-table-column align=\"center\">\n\t\t\t\t<template slot=\"header\">\n\t\t\t\t\t<div style=\"display: flex;justify-content: center;align-items: center;\">\n\t\t\t\t\t\t<div>近7日考勤记录</div>\n\t\t\t\t\t\t<div></div>\n\t\t\t\t\t\t<div style=\"width: 12px;height: 12px;background-color: red;margin: 0 10px;\"></div>\n\t\t\t\t\t\t<div>有考情记录</div>\n\t\t\t\t\t\t<div style=\"width: 12px;height: 12px;background-color: green;margin: 0 10px\"></div>\n\t\t\t\t\t\t<div style=\"margin-right: 10px;\">无考勤记录</div>\n\t\t\t\t\t\t<div></div>\n\t\t\t\t\t</div>\n\n\t\t\t\t</template>\n\t\t\t\t<template slot-scope=\"scope\">\n\t\t\t\t\t<div class=\"squareContent\" style=\"display: flex;flex-wrap:wrap\">\n\t\t\t\t\t\t<el-tooltip v-for=\"(item,index) in dateRange\" effect=\"light\" :content=\"toolComputed(item,scope.row.scAttendanceStatisticsDataInfoDTOList) ? toolComputed(item,scope.row.scAttendanceStatisticsDataInfoDTOList) : item\"\n\t\t\t\t\t\t placement=\"top-start\" :key=\"index\">\n\t\t\t\t\t\t\t<div class=\"divSquare\" :style=\"{backgroundColor:toolComputed(item,scope.row.scAttendanceStatisticsDataInfoDTOList) ? 'red' : 'green'}\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</el-tooltip>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</el-table-column>\n <el-table-column align=\"center\" label=\"操作\" width=\"180\">\n\t\t\t\t<template slot-scope=\"scope\">\n\t\t\t\t\t<el-button type=\"text\" @click=\"viewHandle(scope.row)\">详情</el-button>\n\t\t\t\t</template>\n\t\t\t</el-table-column>\n\t\t</el-table>\n <v-view ref=\"viewRef\" v-if=\"viewVisible\"></v-view>\n\n <el-dialog\n title=\"\"\n :visible.sync=\"centerDialogVisible\"\n :close-on-click-modal=\"false\"\n :before-close=\"handleDialogClose\"\n width=\"30%\"\n center>\n <el-form inline :model=\"form\" ref=\"form\" :rules=\"ruleform\">\n <el-form-item label=\"时间\" prop=\"date\">\n <el-date-picker\n v-model=\"form.date\"\n type=\"daterange\"\n range-separator=\"至\"\n start-placeholder=\"开始日期\"\n end-placeholder=\"结束日期\"\n format=\"yyyy-MM-dd\" \n value-format=\"yyyy-MM-dd\">\n </el-date-picker>\n </el-form-item>\n </el-form>\n <span slot=\"footer\" class=\"dialog-footer\">\n <el-button type=\"primary\" @click=\"exportHandle()\">导出</el-button>\n </span>\n </el-dialog>\n\n </el-card>\n</template>\n\n<script>\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</script>\n\n<style lang=\"scss\" scoped>\n\t.attendance {\n\t\t.squareContent {\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\n\t\t\t.divSquare {\n\t\t\t\tmargin: 8px;\n\t\t\t\twidth: 10px;\n\t\t\t\theight: 10px;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t}\n\t}\n</style>"],"sourceRoot":"src/views/modules/dataAnalysis"}]}