{"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\\week.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\timing\\components\\week.vue","mtime":1732871026803},{"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//\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\r\nexport default {\r\n name: 'CrontabWeek',\r\n props: ['check', 'cron'],\r\n data() {\r\n return {\r\n radioValue: 2,\r\n weekday: 2,\r\n cycle01: 2,\r\n cycle02: 3,\r\n average01: 1,\r\n average02: 2,\r\n checkboxList: [],\r\n weekList: [\r\n {\r\n key: 2,\r\n value: '星期一'\r\n },\r\n {\r\n key: 3,\r\n value: '星期二'\r\n },\r\n {\r\n key: 4,\r\n value: '星期三'\r\n },\r\n {\r\n key: 5,\r\n value: '星期四'\r\n },\r\n {\r\n key: 6,\r\n value: '星期五'\r\n },\r\n {\r\n key: 7,\r\n value: '星期六'\r\n },\r\n {\r\n key: 1,\r\n value: '星期日'\r\n }\r\n ],\r\n checkNum: this.$options.propsData.check\r\n }\r\n },\r\n computed: {\r\n // 计算两个周期值\r\n cycleTotal: function() {\r\n this.cycle01 = this.checkNum(this.cycle01, 1, 7)\r\n this.cycle02 = this.checkNum(this.cycle02, 1, 7)\r\n return this.cycle01 + '-' + this.cycle02\r\n },\r\n // 计算平均用到的值\r\n averageTotal: function() {\r\n this.average01 = this.checkNum(this.average01, 1, 4)\r\n this.average02 = this.checkNum(this.average02, 1, 7)\r\n return this.average02 + '#' + this.average01\r\n },\r\n // 最近的工作日(格式)\r\n weekdayCheck: function() {\r\n this.weekday = this.checkNum(this.weekday, 1, 7)\r\n return this.weekday\r\n },\r\n // 计算勾选的checkbox值合集\r\n checkboxString: function() {\r\n const str = this.checkboxList.join()\r\n return str == '' ? '*' : str\r\n }\r\n },\r\n watch: {\r\n 'radioValue': 'radioChange',\r\n 'cycleTotal': 'cycleChange',\r\n 'averageTotal': 'averageChange',\r\n 'weekdayCheck': 'weekdayChange',\r\n 'checkboxString': 'checkboxChange'\r\n },\r\n methods: {\r\n // 单选按钮值变化时\r\n radioChange() {\r\n if (this.radioValue !== 2 && this.cron.day !== '?') {\r\n this.$emit('update', 'day', '?', 'week')\r\n }\r\n switch (this.radioValue) {\r\n case 1:\r\n this.$emit('update', 'week', '*')\r\n break\r\n case 2:\r\n this.$emit('update', 'week', '?')\r\n break\r\n case 3:\r\n this.$emit('update', 'week', this.cycleTotal)\r\n break\r\n case 4:\r\n this.$emit('update', 'week', this.averageTotal)\r\n break\r\n case 5:\r\n this.$emit('update', 'week', this.weekdayCheck + 'L')\r\n break\r\n case 6:\r\n this.$emit('update', 'week', this.checkboxString)\r\n break\r\n }\r\n },\r\n\r\n // 周期两个值变化时\r\n cycleChange() {\r\n if (this.radioValue == '3') {\r\n this.$emit('update', 'week', this.cycleTotal)\r\n }\r\n },\r\n // 平均两个值变化时\r\n averageChange() {\r\n if (this.radioValue == '4') {\r\n this.$emit('update', 'week', this.averageTotal)\r\n }\r\n },\r\n // 最近工作日值变化时\r\n weekdayChange() {\r\n if (this.radioValue == '5') {\r\n this.$emit('update', 'week', this.weekday + 'L')\r\n }\r\n },\r\n // checkbox值变化时\r\n checkboxChange() {\r\n if (this.radioValue == '6') {\r\n this.$emit('update', 'week', this.checkboxString)\r\n }\r\n }\r\n }\r\n}\r\n",null]}