forked from zhurui/management
1 line
15 KiB
JSON
1 line
15 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=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 = pre
|