forked from zhurui/management
1 line
12 KiB
JSON
1 line
12 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\\dataAnalysis\\v-view.vue?vue&type=style&index=0&id=437e79f3&lang=scss&scoped=true&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\dataAnalysis\\v-view.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\css-loader\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\sass-loader\\lib\\loader.js","mtime":1533139052000},{"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\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/deep/.el-dialog__body {\n\tpadding: 0 0 30px 0;\n}\n\n.calendar {\n\tdisplay: flex;\n\tjustify-content: center;\n\n\t.main {\n\t\tbackground-color: #FFF;\n\t\tborder-radius: 4px;\n\n\t\t.nav {\n\t\t\tfont-size: 24px;\n\t\t\tcolor: #FFF;\n\t\t\theight: 40px;\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t\tbackground-color: #c40;\n\t\t\tpadding: 0 20px;\n\t\t\tbox-sizing: border-box;\n\n\t\t\t.name {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\twidth: 30%;\n\t\t\t}\n\n\t\t\t.yearMonth {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\twidth: 50%;\n\t\t\t}\n\n\t\t\t.btn-div {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: space-between;\n\t\t\t\tfont-size: 18px;\n\t\t\t\twidth: 20%;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t}\n\n\t\t.weeks {\n\t\t\tfont-size: 22px;\n\t\t\theight: 40px;\n\t\t\tdisplay: flex;\n\n\t\t\t.week {\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: center;\n\t\t\t\talign-items: center;\n\t\t\t\tflex-basis: 60px;\n\t\t\t\tcolor: #000;\n\t\t\t}\n\t\t}\n\n\t\t.content {\n\t\t\tfont-size: 18px;\n\t\t\twidth: 420px;\n\t\t\theight: 360px;\n\t\t\tdisplay: flex;\n\t\t\tflex-wrap: wrap;\n\n\t\t\t.content-item {\n\t\t\t\theight: 60px;\n\t\t\t\twidth: 60px;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\n\t\t\t\t.content-item-div {\n\t\t\t\t\theight: 50px;\n\t\t\t\t\twidth: 50px;\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",{"version":3,"sources":["v-view.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmLA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"v-view.vue","sourceRoot":"src/views/modules/dataAnalysis","sourcesContent":["<template>\n\t<el-dialog title=\"详情\" :visible.sync=\"dialogVisible\" :close-on-click-modal=\"false\" width=\"25%\">\n\t\t<div class=\"calendar\">\n\t\t\t<div class=\"main\">\n\t\t\t\t<div class=\"nav\">\n\t\t\t\t\t<div class=\"name\" v-if=\"row.scStuname\">{{row.scStuname}}</div>\n\t\t\t\t\t<div class=\"name\" v-else>{{scWaname}}</div>\n\t\t\t\t\t<div class=\"yearMonth\">{{yearMonth}}</div>\n\t\t\t\t\t<div class=\"btn-div\">\n\t\t\t\t\t\t<span class=\"el-icon-arrow-up\" @click=\"monthHandle('pre')\"></span>\n\t\t\t\t\t\t<span class=\"el-icon-arrow-down\" @click=\"monthHandle('next')\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"weeks\">\n\t\t\t\t\t<div v-for=\"item in weekArr\" class=\"week\">\n\t\t\t\t\t\t{{item}}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<div v-for=\"item in dateArr\" class=\"content-item\">\n\t\t\t\t\t\t<div class=\"content-item-div\" v-if=\"loadData(item.date)\" style=\"background-color: #C40;border-radius: 50%;\">\n\t\t\t\t\t\t\t<div :style=\"{color:item.color}\">{{item.day}}</div>\n\t\t\t\t\t\t\t<div style=\"color:darkred\" v-if=\"url != '/system/dataAnalysis/onlyInNotOut'\">{{loadData(item.date)}}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"content-item-div\" v-else>\n\t\t\t\t\t\t\t<div :style=\"{color:item.color}\">{{item.day}}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</el-dialog>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tdialogVisible: false,\n\t\t\t\tweekArr: [\"一\", \"二\", \"三\", \"四\", \"五\", \"六\", \"日\"], // 周列表\n\t\t\t\tdateArr: [], // 日期列表\n\t\t\t\tyearMonth: \"\", // XXXX年XX月\n\t\t\t\tdateOf1: \"\", // 1号的日期\n\t\t\t\tdateOf28: \"\", // 28号的日期,\n\n\t\t\t\trow: {}, // 父组件传递的表格数据 \n\t\t\t\trows: {}, // 父组件传递的表格数据 \n\t\t\t\tobj: {}, // 父组件传递的表单数据\n\t\t\t\turl: \"\",\n\t\t\t\tname: \"\",\n\t\t\t\tscWaname:\"\"\n\t\t\t}\n\t\t},\n\t\tcomputed: {\n\t\t\tloadData() {\n\t\t\t\treturn function(date) {\n\t\t\t\t\tlet num = \"\"\n\t\t\t\t\tif(this.rows.scAttendanceStatisticsDataInfoDTOList){\n\t\t\t\t\t\tthis.rows.scAttendanceStatisticsDataInfoDTOList.forEach(item => {\n\t\t\t\t\t\t\tif (date === item.stDate) {\n\t\t\t\t\t\t\t\tnum = item.stNum + \"次\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}else{\n\t\t\t\t\t\tthis.row.dataAnalysisInfoDTOList.forEach(item => {\n\t\t\t\t\t\t\tif (date === item.createDate) {\n\t\t\t\t\t\t\t\tnum = item.num + \"次\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn num\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tmethods: {\n\t\t\tinit(row, obj, url) {\n\t\t\t\tthis.scWaname=row.scWaname;\n\t\t\t\tthis.rows=row;\n\t\t\t\tthis.dialogVisible = true\n\t\t\t\tthis.row = JSON.parse(JSON.stringify(row))\n\t\t\t\tthis.obj = JSON.parse(JSON.stringify(obj))\n\t\t\t\tthis.url = url\n\t\t\t\tthis.renderCalender(new Date(this.obj.startDate))\n\t\t\t},\n\n\t\t\trenderCalender(date) {\n\t\t\t\tconsole.log(date);\n\t\t\t\tlet year = date.getFullYear() // 年\n\t\t\t\tlet month = date.getMonth() + 1 // 月\n\t\t\t\tthis.yearMonth = `${year}年${month}月` // XXXX年XX月\n\n\t\t\t\tthis.dateOf1 = new Date(`${year},${month},1`) // 1号的日期(年月日)\n\t\t\t\tthis.dateOf28 = new Date(`${year},${month},28`) // 28号的日期(年月日)\n\n\t\t\t\tlet monthArr = [31, this.isLeapYear(year), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] // 每月的天数\n\t\t\t\tlet days = monthArr[month - 1] // 本月多少天\n\t\t\t\tlet week = this.dateOf1.getDay() === 0 ? 7 : this.dateOf1.getDay() // 1号是周几\n\n\t\t\t\tlet preDays = monthArr[new Date(new Date(this.dateOf1).getTime() - 2 * 24 * 60 * 60 * 1000).getMonth()] // 上个月多少天\n\n\t\t\t\tlet preStamp = new Date(this.dateOf1).getTime() - 2 * 24 * 60 * 60 * 1000\n\t\t\t\tlet preYearMonthDay = new Date(preStamp).getFullYear() + \"-\" + (new Date(preStamp).getMonth() + 1) // 上个月年月\n\t\t\t\tlet curYearMonthDay = year + \"-\" + month // 当前年月\n\t\t\t\tlet nextStamp = new Date(this.dateOf28).getTime() + 4 * 24 * 60 * 60 * 1000\n\t\t\t\tlet nextYearMonthDay = new Date(nextStamp).getFullYear() + \"-\" + (new Date(nextStamp).getMonth() + 1) // 下个月年月\n\t\t\t\tthis.dateArr = []\n\t\t\t\tfor (let i = 1; i < 43; i++) {\n\t\t\t\t\tlet obj = {\n\t\t\t\t\t\tday: \"\",\n\t\t\t\t\t\tdate: \"\",\n\t\t\t\t\t\tcolor: \"#000\",\n\t\t\t\t\t}\n\t\t\t\t\tif (i < week) {\n\t\t\t\t\t\tobj.day = preDays - week + i + 1\n\t\t\t\t\t\tobj.date = preYearMonthDay + \"-\" + obj.day\n\t\t\t\t\t\tobj.color = \"gray\"\n\t\t\t\t\t\tthis.dateArr.push(obj)\n\t\t\t\t\t} else if (i > week + days - 1) {\n\t\t\t\t\t\tobj.day = i - week - days + 1\n\t\t\t\t\t\tobj.date = nextYearMonthDay + \"-\" + obj.day\n\t\t\t\t\t\tobj.color = \"gray\"\n\t\t\t\t\t\tthis.dateArr.push(obj)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tobj.day = i - week + 1\n\t\t\t\t\t\tobj.date = curYearMonthDay + \"-\" + obj.day\n\t\t\t\t\t\tthis.dateArr.push(obj)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.getData()\n\t\t\t},\n\n\t\t\tgetData() {\n\t\t\t\tthis.obj.startDate = this.dateArr[0].date\n\t\t\t\tthis.obj.endDate = this.dateArr[this.dateArr.length - 1].date\n\n\t\t\t\tthis.$http.get(this.url, {\n\t\t\t\t\tparams: this.obj\n\t\t\t\t}).then(({\n\t\t\t\t\tdata: res\n\t\t\t\t}) => {\n\t\t\t\t\tres.data.forEach(item => {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(item.scStuname){\n\t\t\t\t\t\t\tif (item.scStuname === this.row.scStuname) {\n\t\t\t\t\t\t\t\tthis.row = item\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(item.scWaname){\n\t\t\t\t\t\t\tif((item.aeDevicename === this.rows.aeDevicename)&&(item.scWaname === this.rows.scWaname)){\n\t\t\t\t\t\t\t\tthis.rows = item\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}).catch(() => {}).finally(() => {\n\t\t\t\t\tthis.loading = false\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t//上个月、下个月\n\t\t\tmonthHandle(monthStatus) {\n\t\t\t\tlet date = monthStatus === 'pre' ? new Date(this.dateOf1).getTime() - 2 * 24 * 60 * 60 * 1000 : new Date(this.dateOf28)\n\t\t\t\t\t.getTime() + 4 * 24 * 60 * 60 * 1000\n\t\t\t\tthis.renderCalender(new Date(date))\n\t\t\t},\n\t\t\t/**\n\t\t\t * 是否为闰年\n\t\t\t * @param {Number} year\n\t\t\t */\n\t\t\tisLeapYear(year) {\n\t\t\t\tif (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {\n\t\t\t\t\treturn 29\n\t\t\t\t} else {\n\t\t\t\t\treturn 28\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style lang=\"scss\" scoped>\n\t/deep/.el-dialog__body {\n\t\tpadding: 0 0 30px 0;\n\t}\n\n\t.calendar {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t.main {\n\t\t\tbackground-color: #FFF;\n\t\t\tborder-radius: 4px;\n\n\t\t\t.nav {\n\t\t\t\tfont-size: 24px;\n\t\t\t\tcolor: #FFF;\n\t\t\t\theight: 40px;\n\t\t\t\tdisplay: flex;\n\t\t\t\tjustify-content: space-between;\n\t\t\t\tbackground-color: #c40;\n\t\t\t\tpadding: 0 20px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t.name {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\twidth: 30%;\n\t\t\t\t}\n\n\t\t\t\t.yearMonth {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\twidth: 50%;\n\t\t\t\t}\n\n\t\t\t\t.btn-div {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: space-between;\n\t\t\t\t\tfont-size: 18px;\n\t\t\t\t\twidth: 20%;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.weeks {\n\t\t\t\tfont-size: 22px;\n\t\t\t\theight: 40px;\n\t\t\t\tdisplay: flex;\n\n\t\t\t\t.week {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tflex-basis: 60px;\n\t\t\t\t\tcolor: #000;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.content {\n\t\t\t\tfont-size: 18px;\n\t\t\t\twidth: 420px;\n\t\t\t\theight: 360px;\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\n\t\t\t\t.content-item {\n\t\t\t\t\theight: 60px;\n\t\t\t\t\twidth: 60px;\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\n\t\t\t\t\t.content-item-div {\n\t\t\t\t\t\theight: 50px;\n\t\t\t\t\t\twidth: 50px;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n</style>\n"]}]} |