{"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=script&lang=js&","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\\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\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tdialogVisible: false,\n\t\t\tweekArr: [\"一\", \"二\", \"三\", \"四\", \"五\", \"六\", \"日\"], // 周列表\n\t\t\tdateArr: [], // 日期列表\n\t\t\tyearMonth: \"\", // XXXX年XX月\n\t\t\tdateOf1: \"\", // 1号的日期\n\t\t\tdateOf28: \"\", // 28号的日期,\n\n\t\t\trow: {}, // 父组件传递的表格数据 \n\t\t\trows: {}, // 父组件传递的表格数据 \n\t\t\tobj: {}, // 父组件传递的表单数据\n\t\t\turl: \"\",\n\t\t\tname: \"\",\n\t\t\tscWaname:\"\"\n\t\t}\n\t},\n\tcomputed: {\n\t\tloadData() {\n\t\t\treturn function(date) {\n\t\t\t\tlet num = \"\"\n\t\t\t\tif(this.rows.scAttendanceStatisticsDataInfoDTOList){\n\t\t\t\t\tthis.rows.scAttendanceStatisticsDataInfoDTOList.forEach(item => {\n\t\t\t\t\t\tif (date === item.stDate) {\n\t\t\t\t\t\t\tnum = item.stNum + \"次\"\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}else{\n\t\t\t\t\tthis.row.dataAnalysisInfoDTOList.forEach(item => {\n\t\t\t\t\t\tif (date === item.createDate) {\n\t\t\t\t\t\t\tnum = item.num + \"次\"\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn num\n\t\t\t}\n\t\t},\n\t},\n\tmethods: {\n\t\tinit(row, obj, url) {\n\t\t\tthis.scWaname=row.scWaname;\n\t\t\tthis.rows=row;\n\t\t\tthis.dialogVisible = true\n\t\t\tthis.row = JSON.parse(JSON.stringify(row))\n\t\t\tthis.obj = JSON.parse(JSON.stringify(obj))\n\t\t\tthis.url = url\n\t\t\tthis.renderCalender(new Date(this.obj.startDate))\n\t\t},\n\n\t\trenderCalender(date) {\n\t\t\tconsole.log(date);\n\t\t\tlet year = date.getFullYear() // 年\n\t\t\tlet month = date.getMonth() + 1 // 月\n\t\t\tthis.yearMonth = `${year}年${month}月` // XXXX年XX月\n\n\t\t\tthis.dateOf1 = new Date(`${year},${month},1`) // 1号的日期(年月日)\n\t\t\tthis.dateOf28 = new Date(`${year},${month},28`) // 28号的日期(年月日)\n\n\t\t\tlet monthArr = [31, this.isLeapYear(year), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] // 每月的天数\n\t\t\tlet days = monthArr[month - 1] // 本月多少天\n\t\t\tlet week = this.dateOf1.getDay() === 0 ? 7 : this.dateOf1.getDay() // 1号是周几\n\n\t\t\tlet preDays = monthArr[new Date(new Date(this.dateOf1).getTime() - 2 * 24 * 60 * 60 * 1000).getMonth()] // 上个月多少天\n\n\t\t\tlet preStamp = new Date(this.dateOf1).getTime() - 2 * 24 * 60 * 60 * 1000\n\t\t\tlet preYearMonthDay = new Date(preStamp).getFullYear() + \"-\" + (new Date(preStamp).getMonth() + 1) // 上个月年月\n\t\t\tlet curYearMonthDay = year + \"-\" + month // 当前年月\n\t\t\tlet nextStamp = new Date(this.dateOf28).getTime() + 4 * 24 * 60 * 60 * 1000\n\t\t\tlet nextYearMonthDay = new Date(nextStamp).getFullYear() + \"-\" + (new Date(nextStamp).getMonth() + 1) // 下个月年月\n\t\t\tthis.dateArr = []\n\t\t\tfor (let i = 1; i < 43; i++) {\n\t\t\t\tlet obj = {\n\t\t\t\t\tday: \"\",\n\t\t\t\t\tdate: \"\",\n\t\t\t\t\tcolor: \"#000\",\n\t\t\t\t}\n\t\t\t\tif (i < week) {\n\t\t\t\t\tobj.day = preDays - week + i + 1\n\t\t\t\t\tobj.date = preYearMonthDay + \"-\" + obj.day\n\t\t\t\t\tobj.color = \"gray\"\n\t\t\t\t\tthis.dateArr.push(obj)\n\t\t\t\t} else if (i > week + days - 1) {\n\t\t\t\t\tobj.day = i - week - days + 1\n\t\t\t\t\tobj.date = nextYearMonthDay + \"-\" + obj.day\n\t\t\t\t\tobj.color = \"gray\"\n\t\t\t\t\tthis.dateArr.push(obj)\n\t\t\t\t} else {\n\t\t\t\t\tobj.day = i - week + 1\n\t\t\t\t\tobj.date = curYearMonthDay + \"-\" + obj.day\n\t\t\t\t\tthis.dateArr.push(obj)\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.getData()\n\t\t},\n\n\t\tgetData() {\n\t\t\tthis.obj.startDate = this.dateArr[0].date\n\t\t\tthis.obj.endDate = this.dateArr[this.dateArr.length - 1].date\n\n\t\t\tthis.$http.get(this.url, {\n\t\t\t\tparams: this.obj\n\t\t\t}).then(({\n\t\t\t\tdata: res\n\t\t\t}) => {\n\t\t\t\tres.data.forEach(item => {\n\t\t\t\t\t\n\t\t\t\t\tif(item.scStuname){\n\t\t\t\t\t\tif (item.scStuname === this.row.scStuname) {\n\t\t\t\t\t\t\tthis.row = item\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(item.scWaname){\n\t\t\t\t\t\tif((item.aeDevicename === this.rows.aeDevicename)&&(item.scWaname === this.rows.scWaname)){\n\t\t\t\t\t\t\tthis.rows = item\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}).catch(() => {}).finally(() => {\n\t\t\t\tthis.loading = false\n\t\t\t})\n\t\t},\n\n\t\t//上个月、下个月\n\t\tmonthHandle(monthStatus) {\n\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.getTime() + 4 * 24 * 60 * 60 * 1000\n\t\t\tthis.renderCalender(new Date(date))\n\t\t},\n\t\t/**\n\t\t * 是否为闰年\n\t\t * @param {Number} year\n\t\t */\n\t\tisLeapYear(year) {\n\t\t\tif (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {\n\t\t\t\treturn 29\n\t\t\t} else {\n\t\t\t\treturn 28\n\t\t\t}\n\t\t}\n\t},\n}\n",{"version":3,"sources":["v-view.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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","file":"v-view.vue","sourceRoot":"src/views/modules/dataAnalysis","sourcesContent":["\n\n\n"]}]}