forked from zhurui/management
1 line
19 KiB
JSON
1 line
19 KiB
JSON
{"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\\applicationPart1\\attendence\\attendancerecords.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\applicationPart1\\attendence\\attendancerecords.vue","mtime":1624888493761},{"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\nimport mixinViewModule from '@/mixins/view-module'\nimport AddOrUpdate from './attendancerecords-add-or-update'\n\nexport default {\n mixins: [mixinViewModule],\n data() {\n return {\n mixinViewModuleOptions: {\n getDataListURL: '/system/attendence/attendancerecords/page',\n getStaticURL: '/system/attendence/attendancerecords/static',\n getDataListIsPage: true,\n deleteURL: '/system/attendence/attendancerecords',\n\n deleteIsBatch: true,\n createdIsNeed: false,\n activatedIsNeed: false,\n },\n staticResult: {normaldays: \"\", totaldays: \"\"},\n editFlag: (this.$store.state.user.roleNames.indexOf(\"审批\") !== -1 || this.$store.state.user.roleNames.indexOf(\"管理\") !== -1),\n dateRange: [\"\", \"\"],\n dataForm: {\n id: \"\",\n studentNumber: (this.$store.state.user.roleNames.indexOf(\"审批\") !== -1 || this.$store.state.user.roleNames.indexOf(\"管理\") !== -1) ?\n '' : ((this.$store.state.user.roleNames.indexOf(\"普通学生\") !== -1) ? this.$store.state.user.username : ''),\n startRange: \"\",\n endRange: \"\",\n },\n popIsEdit: false,\n pickerOptions: {\n shortcuts: [{\n text: '最近一周',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);\n picker.$emit('pick', [start, end]);\n }\n }, {\n text: '最近一个月',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);\n picker.$emit('pick', [start, end]);\n }\n }, {\n text: '最近三个月',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);\n picker.$emit('pick', [start, end]);\n }\n }]\n },\n }\n },\n components: {\n AddOrUpdate\n },\n created() {\n Date.prototype.myFormat = function (fmt) {\n var o = {\n \"M+\": this.getMonth() + 1, //月份\n \"d+\": this.getDate(), //日\n \"h+\": this.getHours(), //小时\n \"m+\": this.getMinutes(), //分\n \"s+\": this.getSeconds(), //秒\n \"q+\": Math.floor((this.getMonth() + 3) / 3), //季度\n \"S\": this.getMilliseconds() //毫秒\n };\n if (/(y+)/.test(fmt)) {\n fmt = fmt.replace(RegExp.$1, (this.getFullYear() + \"\").substr(4 - RegExp.$1.length));\n }\n for (var k in o) {\n if (new RegExp(\"(\" + k + \")\").test(fmt)) {\n fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : ((\"00\" + o[k]).substr((\"\" + o[k]).length)));\n }\n }\n return fmt;\n }\n let end = new Date();\n let start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);\n this.dateRange = [start.myFormat(\"yyyy-MM-dd\"), end.myFormat(\"yyyy-MM-dd\")];\n // var time1 = new Date().myFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n this.myQuery()\n },\n methods: {\n myQuery(){\n this.myRecords()\n this.myStatic()\n },\n myRecords() {\n this.dataListLoading = true\n this.dataForm.startRange = this.dateRange[0]\n this.dataForm.endRange = this.dateRange[1]\n\n this.$http.get(\n this.mixinViewModuleOptions.getDataListURL, {\n params: {\n order: this.order,\n orderField: this.orderField,\n page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,\n limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,\n ...this.dataForm,\n }\n }\n ).then(({\n data: res\n }) => {\n this.dataListLoading = false\n\n if (res.code !== 0) {\n this.dataList = []\n this.total = 0\n return this.$message.error(res.msg)\n }\n this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data\n this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0\n let list = this.checkList[this.page]\n if (this.mixinViewModuleOptions.needCheckRecord && list && list.length > 0) {\n this.$nextTick(() => {\n let func = this.$refs.tableSelect.toggleRowSelection;\n let ids = list.map(item => item.id);\n this.dataList.forEach(item => {\n if (ids.includes(item.id)) {\n func(item, true)\n }\n })\n })\n }\n }).catch(() => {\n this.dataListLoading = false\n });\n },\n myStatic(){\n this.$http.get(\n this.mixinViewModuleOptions.getStaticURL, {\n params: {\n order: this.order,\n orderField: this.orderField,\n page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,\n limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,\n ...this.dataForm,\n }\n }\n ).then(({\n data: res\n }) => {\n // console.log(res);\n\n if (res.code !== 0) {\n this.dataList = []\n this.total = 0\n return this.$message.error(res.msg)\n }\n\n this.staticResult = res.data\n // console.log(\"this.staticResult\")\n // console.log(this.staticResult)\n\n }).catch(() => {\n this.dataListLoading = false\n })\n },\n\n test() {\n console.log(this.dateRange);\n console.log(this.dataForm);\n },\n lookUpInfo(scopeRowId) {\n\n this.popIsEdit = false;\n this.addOrUpdateHandle(scopeRowId)\n\n },\n addOrUpdateHandleWapper(scopeRowId) {\n this.popIsEdit = true;\n this.addOrUpdateHandle(scopeRowId)\n },\n deleteHandleWapper(scopeRowId) {\n this.deleteHandle(scopeRowId)\n },\n }\n\n}\n",{"version":3,"sources":["attendancerecords.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","file":"attendancerecords.vue","sourceRoot":"src/views/modules/applicationPart1/attendence","sourcesContent":["<template>\n <el-card shadow=\"never\" class=\"aui-card--fill\">\n <div class=\"mod-attendence__attendancerecords}\">\n <el-form :inline=\"true\" :model=\"dataForm\" @keyup.enter.native=\"getDataList()\">\n <el-form-item v-if=\"editFlag\">\n <el-input v-model=\"dataForm.studentNumber\" placeholder=\"学号\" clearable ></el-input>\n </el-form-item>\n <el-form-item>\n <el-date-picker\n v-model=\"dateRange\"\n type=\"daterange\"\n align=\"right\"\n unlink-panels\n range-separator=\"至\"\n start-placeholder=\"开始日期\"\n end-placeholder=\"结束日期\"\n value-format=\"yyyy-MM-dd\"\n :picker-options=\"pickerOptions\">\n </el-date-picker>\n </el-form-item>\n\n\n <el-form-item>\n <el-button @click=\"myQuery()\">{{ $t('query') }}</el-button>\n </el-form-item>\n\n <el-button type=\"warning\" v-if=\"this.staticResult.normaldays\">超过8小次打卡 {{ this.staticResult.normaldays }} 次,总共打卡 {{ this.staticResult.totaldays }} 次</el-button>\n <!-- <el-form-item>-->\n <!-- <el-button type=\"primary\" @click=\"test\">{{ $t('add') }}</el-button>-->\n <!-- </el-form-item>-->\n <!-- <el-form-item>-->\n <!-- <el-button type=\"danger\" @click=\"deleteHandleWapper()\">{{ $t('deleteBatch') }}</el-button>-->\n <!-- </el-form-item>-->\n </el-form>\n\n <el-table v-loading=\"dataListLoading\" :data=\"dataList\" border @selection-change=\"dataListSelectionChangeHandle\"\n style=\"width: 100%;\">\n <!-- <el-table-column type=\"selection\" header-align=\"center\" align=\"center\" width=\"50\"></el-table-column>-->\n <!-- <el-table-column prop=\"id\" label=\"记录id\" header-align=\"center\" align=\"center\"></el-table-column>-->\n <el-table-column prop=\"studentNumber\" label=\"学号\" header-align=\"center\" align=\"center\"></el-table-column>\n <el-table-column prop=\"studentName\" label=\"学生名字\" header-align=\"center\" align=\"center\"></el-table-column>\n <el-table-column prop=\"startTime\" label=\"打卡开始时间\" header-align=\"center\" align=\"center\"></el-table-column>\n <el-table-column prop=\"endTime\" label=\"打卡结束时间\" header-align=\"center\" align=\"center\"></el-table-column>\n <el-table-column prop=\"duration\" label=\"持续时间\" header-align=\"center\" align=\"center\"></el-table-column>\n <!-- <el-table-column prop=\"todayDate\" label=\"打卡日期\" header-align=\"center\" align=\"center\"></el-table-column>-->\n <!-- <el-table-column prop=\"createDate\" label=\"创建时间\" header-align=\"center\" align=\"center\"></el-table-column>-->\n <!-- <el-table-column prop=\"creator\" label=\"创建人\" header-align=\"center\" align=\"center\"></el-table-column>-->\n <!-- <el-table-column :label=\"$t('handle')\" fixed=\"right\" header-align=\"center\" align=\"center\" width=\"230\">-->\n <!--<!– <template slot-scope=\"scope\">–>-->\n <!--<!– <el-button size=\"small\" @click=\"lookUpInfo(scope.row.id)\">{{ \"详情\" }}</el-button>–>-->\n <!--<!– <el-button size=\"small\" @click=\"addOrUpdateHandleWapper(scope.row.id)\">{{ $t('update') }}</el-button>–>-->\n <!--<!– <el-button type=\"danger\" size=\"small\" @click=\"deleteHandleWapper(scope.row.id)\">{{ $t('delete') }}</el-button>–>-->\n <!--<!– </template>–>-->\n <!-- </el-table-column>-->\n </el-table>\n <el-pagination\n :current-page=\"page\"\n :page-sizes=\"[10, 20, 50, 100]\"\n :page-size=\"limit\"\n :total=\"total\"\n layout=\"total, sizes, prev, pager, next, jumper\"\n @size-change=\"pageSizeChangeHandle\"\n @current-change=\"pageCurrentChangeHandle\">\n </el-pagination>\n <!-- 弹窗, 新增 / 详情/ 修改 -->\n <!-- <add-or-update :isedit=\"popIsEdit\" v-if=\"addOrUpdateVisible\" ref=\"addOrUpdate\" @refreshDataList=\"getDataList\"></add-or-update>-->\n </div>\n </el-card>\n</template>\n\n<script>\nimport mixinViewModule from '@/mixins/view-module'\nimport AddOrUpdate from './attendancerecords-add-or-update'\n\nexport default {\n mixins: [mixinViewModule],\n data() {\n return {\n mixinViewModuleOptions: {\n getDataListURL: '/system/attendence/attendancerecords/page',\n getStaticURL: '/system/attendence/attendancerecords/static',\n getDataListIsPage: true,\n deleteURL: '/system/attendence/attendancerecords',\n\n deleteIsBatch: true,\n createdIsNeed: false,\n activatedIsNeed: false,\n },\n staticResult: {normaldays: \"\", totaldays: \"\"},\n editFlag: (this.$store.state.user.roleNames.indexOf(\"审批\") !== -1 || this.$store.state.user.roleNames.indexOf(\"管理\") !== -1),\n dateRange: [\"\", \"\"],\n dataForm: {\n id: \"\",\n studentNumber: (this.$store.state.user.roleNames.indexOf(\"审批\") !== -1 || this.$store.state.user.roleNames.indexOf(\"管理\") !== -1) ?\n '' : ((this.$store.state.user.roleNames.indexOf(\"普通学生\") !== -1) ? this.$store.state.user.username : ''),\n startRange: \"\",\n endRange: \"\",\n },\n popIsEdit: false,\n pickerOptions: {\n shortcuts: [{\n text: '最近一周',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);\n picker.$emit('pick', [start, end]);\n }\n }, {\n text: '最近一个月',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);\n picker.$emit('pick', [start, end]);\n }\n }, {\n text: '最近三个月',\n onClick(picker) {\n const end = new Date();\n const start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);\n picker.$emit('pick', [start, end]);\n }\n }]\n },\n }\n },\n components: {\n AddOrUpdate\n },\n created() {\n Date.prototype.myFormat = function (fmt) {\n var o = {\n \"M+\": this.getMonth() + 1, //月份\n \"d+\": this.getDate(), //日\n \"h+\": this.getHours(), //小时\n \"m+\": this.getMinutes(), //分\n \"s+\": this.getSeconds(), //秒\n \"q+\": Math.floor((this.getMonth() + 3) / 3), //季度\n \"S\": this.getMilliseconds() //毫秒\n };\n if (/(y+)/.test(fmt)) {\n fmt = fmt.replace(RegExp.$1, (this.getFullYear() + \"\").substr(4 - RegExp.$1.length));\n }\n for (var k in o) {\n if (new RegExp(\"(\" + k + \")\").test(fmt)) {\n fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : ((\"00\" + o[k]).substr((\"\" + o[k]).length)));\n }\n }\n return fmt;\n }\n let end = new Date();\n let start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);\n this.dateRange = [start.myFormat(\"yyyy-MM-dd\"), end.myFormat(\"yyyy-MM-dd\")];\n // var time1 = new Date().myFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n this.myQuery()\n },\n methods: {\n myQuery(){\n this.myRecords()\n this.myStatic()\n },\n myRecords() {\n this.dataListLoading = true\n this.dataForm.startRange = this.dateRange[0]\n this.dataForm.endRange = this.dateRange[1]\n\n this.$http.get(\n this.mixinViewModuleOptions.getDataListURL, {\n params: {\n order: this.order,\n orderField: this.orderField,\n page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,\n limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,\n ...this.dataForm,\n }\n }\n ).then(({\n data: res\n }) => {\n this.dataListLoading = false\n\n if (res.code !== 0) {\n this.dataList = []\n this.total = 0\n return this.$message.error(res.msg)\n }\n this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data\n this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0\n let list = this.checkList[this.page]\n if (this.mixinViewModuleOptions.needCheckRecord && list && list.length > 0) {\n this.$nextTick(() => {\n let func = this.$refs.tableSelect.toggleRowSelection;\n let ids = list.map(item => item.id);\n this.dataList.forEach(item => {\n if (ids.includes(item.id)) {\n func(item, true)\n }\n })\n })\n }\n }).catch(() => {\n this.dataListLoading = false\n });\n },\n myStatic(){\n this.$http.get(\n this.mixinViewModuleOptions.getStaticURL, {\n params: {\n order: this.order,\n orderField: this.orderField,\n page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,\n limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,\n ...this.dataForm,\n }\n }\n ).then(({\n data: res\n }) => {\n // console.log(res);\n\n if (res.code !== 0) {\n this.dataList = []\n this.total = 0\n return this.$message.error(res.msg)\n }\n\n this.staticResult = res.data\n // console.log(\"this.staticResult\")\n // console.log(this.staticResult)\n\n }).catch(() => {\n this.dataListLoading = false\n })\n },\n\n test() {\n console.log(this.dateRange);\n console.log(this.dataForm);\n },\n lookUpInfo(scopeRowId) {\n\n this.popIsEdit = false;\n this.addOrUpdateHandle(scopeRowId)\n\n },\n addOrUpdateHandleWapper(scopeRowId) {\n this.popIsEdit = true;\n this.addOrUpdateHandle(scopeRowId)\n },\n deleteHandleWapper(scopeRowId) {\n this.deleteHandle(scopeRowId)\n },\n }\n\n}\n</script>\n"]}]} |