Files
tekelanew_acs/acs/nladmin-ui/node_modules/.cache/vue-loader/e6397b0ff4899cfa82c0f5bfb2d19eca.json

1 line
22 KiB
JSON
Raw Normal View History

2024-12-03 17:40:13 +08:00
{"remainingRequest":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\timing\\components\\result.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\timing\\components\\result.vue","mtime":1732871026799},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1732872825017},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":1732872825835}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nexport default {\r\n name: 'CrontabResult',\r\n props: ['ex'],\r\n data() {\r\n return {\r\n dayRule: '',\r\n dayRuleSup: '',\r\n dateArr: [],\r\n resultList: [],\r\n isShow: false\r\n }\r\n },\r\n watch: {\r\n 'ex': 'expressionChange'\r\n },\r\n mounted: function() {\r\n // 初始化 获取一次结果\r\n this.expressionChange()\r\n },\r\n methods: {\r\n // 表达式值变化时,开始去计算结果\r\n expressionChange() {\r\n // 计算开始-隐藏结果\r\n this.isShow = false\r\n // 获取规则数组[0秒、1分、2时、3日、4月、5星期、6年]\r\n const ruleArr = this.$options.propsData.ex.split(' ')\r\n // 用于记录进入循环的次数\r\n let nums = 0\r\n // 用于暂时存符号时间规则结果的数组\r\n const resultArr = []\r\n // 获取当前时间精确至[年、月、日、时、分、秒]\r\n const nTime = new Date()\r\n const nYear = nTime.getFullYear()\r\n let nMonth = nTime.getMonth() + 1\r\n let nDay = nTime.getDate()\r\n let nHour = nTime.getHours()\r\n let nMin = nTime.getMinutes()\r\n let nSecond = nTime.getSeconds()\r\n // 根据规则获取到近100年可能年数组、月数组等等\r\n this.getSecondArr(ruleArr[0])\r\n this.getMinArr(ruleArr[1])\r\n this.getHourArr(ruleArr[2])\r\n this.getDayArr(ruleArr[3])\r\n this.getMonthArr(ruleArr[4])\r\n this.getWeekArr(ruleArr[5])\r\n this.getYearArr(ruleArr[6], nYear)\r\n // 将获取到的数组赋值-方便使用\r\n const sDate = this.dateArr[0]\r\n const mDate = this.dateArr[1]\r\n const hDate = this.dateArr[2]\r\n const DDate = this.dateArr[3]\r\n const MDate = this.dateArr[4]\r\n const YDate = this.dateArr[5]\r\n // 获取当前时间在数组中的索引\r\n let sIdx = this.getIndex(sDate, nSecond)\r\n let mIdx = this.getIndex(mDate, nMin)\r\n let hIdx = this.getIndex(hDate, nHour)\r\n let DIdx = this.getIndex(DDate, nDay)\r\n let MIdx = this.getIndex(MDate, nMonth)\r\n const YIdx = this.getIndex(YDate, nYear)\r\n // 重置月日时分秒的函数(后面用的比较多)\r\n const resetSecond = function() {\r\n sIdx = 0\r\n nSecond = sDate[sIdx]\r\n }\r\n const resetMin = function() {\r\n mIdx = 0\r\n nMin = mDate[mIdx]\r\n resetSecond()\r\n }\r\n const resetHour = function() {\r\n hIdx = 0\r\n nHour = hDate[hIdx]\r\n resetMin()\r\n }\r\n const resetDay = function() {\r\n DIdx = 0\r\n nDay = DDate[DIdx]\r\n resetHour()\r\n }\r\n const resetMonth = function() {\r\n MIdx = 0\r\n nMonth = MDate[MIdx]\r\n resetDay()\r\n }\r\n // 如果当前年份不为数组中当前值\r\n if (nYear !== YDate[YIdx]) {\r\n resetMonth()\r\n }\r\n // 如果当前月份不为数组中当前值\r\n if (nMonth !== MDate[MIdx]) {\r\n resetDay()\r\n }\r\n // 如果当前“日”不为数组