Explorar el Código

修正单词拼写错误

RuoYi hace 4 años
padre
commit
cd4119b26a

+ 2 - 2
ruoyi-ui/src/components/Crontab/day.vue

@@ -75,7 +75,7 @@ export default {
75 75
 			if (this.radioValue === 1) {
76 76
 				this.$emit('update', 'day', '*', 'day');
77 77
 				this.$emit('update', 'week', '?', 'day');
78
-				this.$emit('update', 'mouth', '*', 'day');
78
+				this.$emit('update', 'month', '*', 'day');
79 79
 			} else {
80 80
 				if (this.cron.hour === '*') {
81 81
 					this.$emit('update', 'hour', '0', 'day');
@@ -176,4 +176,4 @@ export default {
176 176
 		}
177 177
 	}
178 178
 }
179
-</script>
179
+</script>

+ 71 - 71
ruoyi-ui/src/components/Crontab/index.vue

@@ -2,59 +2,59 @@
2 2
   <div>
3 3
     <el-tabs type="border-card">
4 4
       <el-tab-pane label="秒" v-if="shouldHide('second')">
5
-        <CrontabSecond @update="updateContabValue" :check="checkNumber" ref="cronsecond" />
5
+        <CrontabSecond @update="updateCrontabValue" :check="checkNumber" ref="cronsecond" />
6 6
       </el-tab-pane>
7 7
 
8 8
       <el-tab-pane label="分钟" v-if="shouldHide('min')">
9 9
         <CrontabMin
10
-          @update="updateContabValue"
10
+          @update="updateCrontabValue"
11 11
           :check="checkNumber"
12
-          :cron="contabValueObj"
12
+          :cron="crontabValueObj"
13 13
           ref="cronmin"
14 14
         />
15 15
       </el-tab-pane>
16 16
 
17 17
       <el-tab-pane label="小时" v-if="shouldHide('hour')">
18 18
         <CrontabHour
19
-          @update="updateContabValue"
19
+          @update="updateCrontabValue"
20 20
           :check="checkNumber"
21
-          :cron="contabValueObj"
21
+          :cron="crontabValueObj"
22 22
           ref="cronhour"
23 23
         />
24 24
       </el-tab-pane>
25 25
 
26 26
       <el-tab-pane label="日" v-if="shouldHide('day')">
27 27
         <CrontabDay
28
-          @update="updateContabValue"
28
+          @update="updateCrontabValue"
29 29
           :check="checkNumber"
30
-          :cron="contabValueObj"
30
+          :cron="crontabValueObj"
31 31
           ref="cronday"
32 32
         />
33 33
       </el-tab-pane>
34 34
 
35
-      <el-tab-pane label="月" v-if="shouldHide('mouth')">
36
-        <CrontabMouth
37
-          @update="updateContabValue"
35
+      <el-tab-pane label="月" v-if="shouldHide('month')">
36
+        <CrontabMonth
37
+          @update="updateCrontabValue"
38 38
           :check="checkNumber"
39
-          :cron="contabValueObj"
40
-          ref="cronmouth"
39
+          :cron="crontabValueObj"
40
+          ref="cronmonth"
41 41
         />
42 42
       </el-tab-pane>
43 43
 
44 44
       <el-tab-pane label="周" v-if="shouldHide('week')">
45 45
         <CrontabWeek
46
-          @update="updateContabValue"
46
+          @update="updateCrontabValue"
47 47
           :check="checkNumber"
48
-          :cron="contabValueObj"
48
+          :cron="crontabValueObj"
49 49
           ref="cronweek"
50 50
         />
51 51
       </el-tab-pane>
52 52
 
53 53
       <el-tab-pane label="年" v-if="shouldHide('year')">
54 54
         <CrontabYear
55
-          @update="updateContabValue"
55
+          @update="updateCrontabValue"
56 56
           :check="checkNumber"
57
-          :cron="contabValueObj"
57
+          :cron="crontabValueObj"
58 58
           ref="cronyear"
59 59
         />
60 60
       </el-tab-pane>
@@ -70,33 +70,33 @@
70 70
           </thead>
71 71
           <tbody>
72 72
             <td>
73
-              <span>{{contabValueObj.second}}</span>
73
+              <span>{{crontabValueObj.second}}</span>
74 74
             </td>
75 75
             <td>
76
-              <span>{{contabValueObj.min}}</span>
76
+              <span>{{crontabValueObj.min}}</span>
77 77
             </td>
78 78
             <td>
79
-              <span>{{contabValueObj.hour}}</span>
79
+              <span>{{crontabValueObj.hour}}</span>
80 80
             </td>
81 81
             <td>
82
-              <span>{{contabValueObj.day}}</span>
82
+              <span>{{crontabValueObj.day}}</span>
83 83
             </td>
84 84
             <td>
85
-              <span>{{contabValueObj.mouth}}</span>
85
+              <span>{{crontabValueObj.month}}</span>
86 86
             </td>
87 87
             <td>
88
-              <span>{{contabValueObj.week}}</span>
88
+              <span>{{crontabValueObj.week}}</span>
89 89
             </td>
90 90
             <td>
91
-              <span>{{contabValueObj.year}}</span>
91
+              <span>{{crontabValueObj.year}}</span>
92 92
             </td>
93 93
             <td>
94
-              <span>{{contabValueString}}</span>
94
+              <span>{{crontabValueString}}</span>
95 95
             </td>
96 96
           </tbody>
97 97
         </table>
98 98
       </div>
99
-      <CrontabResult :ex="contabValueString"></CrontabResult>
99
+      <CrontabResult :ex="crontabValueString"></CrontabResult>
100 100
 
101 101
       <div class="pop_btn">
102 102
         <el-button size="small" type="primary" @click="submitFill">确定</el-button>
@@ -112,7 +112,7 @@ import CrontabSecond from "./second.vue";
112 112
 import CrontabMin from "./min.vue";
113 113
 import CrontabHour from "./hour.vue";
114 114
 import CrontabDay from "./day.vue";
115
-import CrontabMouth from "./mouth.vue";
115
+import CrontabMonth from "./month.vue";
116 116
 import CrontabWeek from "./week.vue";
117 117
 import CrontabYear from "./year.vue";
118 118
 import CrontabResult from "./result.vue";
@@ -123,12 +123,12 @@ export default {
123 123
       tabTitles: ["秒", "分钟", "小时", "日", "月", "周", "年"],
124 124
       tabActive: 0,
125 125
       myindex: 0,
126
-      contabValueObj: {
126
+      crontabValueObj: {
127 127
         second: "*",
128 128
         min: "*",
129 129
         hour: "*",
130 130
         day: "*",
131
-        mouth: "*",
131
+        month: "*",
132 132
         week: "?",
133 133
         year: "",
134 134
       },
@@ -142,7 +142,7 @@ export default {
142 142
       return true;
143 143
     },
144 144
     resolveExp() {
145
-      //反解析 表达式
145
+      // 反解析 表达式
146 146
       if (this.expression) {
147 147
         let arr = this.expression.split(" ");
148 148
         if (arr.length >= 6) {
@@ -152,11 +152,11 @@ export default {
152 152
             min: arr[1],
153 153
             hour: arr[2],
154 154
             day: arr[3],
155
-            mouth: arr[4],
155
+            month: arr[4],
156 156
             week: arr[5],
157 157
             year: arr[6] ? arr[6] : "",
158 158
           };
159
-          this.contabValueObj = {
159
+          this.crontabValueObj = {
160 160
             ...obj,
161 161
           };
162 162
           for (let i in obj) {
@@ -164,7 +164,7 @@ export default {
164 164
           }
165 165
         }
166 166
       } else {
167
-        //没有传入的表达式 则还原
167
+        // 没有传入的表达式 则还原
168 168
         this.clearCron();
169 169
       }
170 170
     },
@@ -173,122 +173,122 @@ export default {
173 173
       this.tabActive = index;
174 174
     },
175 175
     // 由子组件触发,更改表达式组成的字段值
176
-    updateContabValue(name, value, from) {
177
-      "updateContabValue", name, value, from;
178
-      this.contabValueObj[name] = value;
176
+    updateCrontabValue(name, value, from) {
177
+      "updateCrontabValue", name, value, from;
178
+      this.crontabValueObj[name] = value;
179 179
       if (from && from !== name) {
180 180
         console.log(`来自组件 ${from} 改变了 ${name} ${value}`);
181 181
         this.changeRadio(name, value);
182 182
       }
183 183
     },
184
-    //赋值到组件
184
+    // 赋值到组件
185 185
     changeRadio(name, value) {
186
-      let arr = ["second", "min", "hour", "mouth"],
186
+      let arr = ["second", "min", "hour", "month"],
187 187
         refName = "cron" + name,
188
-        insVlaue;
188
+        insValue;
189 189
 
190 190
       if (!this.$refs[refName]) return;
191 191
 
192 192
       if (arr.includes(name)) {
193 193
         if (value === "*") {
194
-          insVlaue = 1;
194
+          insValue = 1;
195 195
         } else if (value.indexOf("-") > -1) {
196 196
           let indexArr = value.split("-");
197 197
           isNaN(indexArr[0])
198 198
             ? (this.$refs[refName].cycle01 = 0)
199 199
             : (this.$refs[refName].cycle01 = indexArr[0]);
200 200
           this.$refs[refName].cycle02 = indexArr[1];
201
-          insVlaue = 2;
201
+          insValue = 2;
202 202
         } else if (value.indexOf("/") > -1) {
203 203
           let indexArr = value.split("/");
204 204
           isNaN(indexArr[0])
205 205
             ? (this.$refs[refName].average01 = 0)
206 206
             : (this.$refs[refName].average01 = indexArr[0]);
207 207
           this.$refs[refName].average02 = indexArr[1];
208
-          insVlaue = 3;
208
+          insValue = 3;
209 209
         } else {
210
-          insVlaue = 4;
210
+          insValue = 4;
211 211
           this.$refs[refName].checkboxList = value.split(",");
212 212
         }
213 213
       } else if (name == "day") {
214 214
         if (value === "*") {
215
-          insVlaue = 1;
215
+          insValue = 1;
216 216
         } else if (value == "?") {
217
-          insVlaue = 2;
217
+          insValue = 2;
218 218
         } else if (value.indexOf("-") > -1) {
219 219
           let indexArr = value.split("-");
220 220
           isNaN(indexArr[0])
221 221
             ? (this.$refs[refName].cycle01 = 0)
222 222
             : (this.$refs[refName].cycle01 = indexArr[0]);
223 223
           this.$refs[refName].cycle02 = indexArr[1];
224
-          insVlaue = 3;
224
+          insValue = 3;
225 225
         } else if (value.indexOf("/") > -1) {
226 226
           let indexArr = value.split("/");
227 227
           isNaN(indexArr[0])
228 228
             ? (this.$refs[refName].average01 = 0)
229 229
             : (this.$refs[refName].average01 = indexArr[0]);
230 230
           this.$refs[refName].average02 = indexArr[1];
231
-          insVlaue = 4;
231
+          insValue = 4;
232 232
         } else if (value.indexOf("W") > -1) {
233 233
           let indexArr = value.split("W");
234 234
           isNaN(indexArr[0])
235 235
             ? (this.$refs[refName].workday = 0)
236 236
             : (this.$refs[refName].workday = indexArr[0]);
237
-          insVlaue = 5;
237
+          insValue = 5;
238 238
         } else if (value === "L") {
239
-          insVlaue = 6;
239
+          insValue = 6;
240 240
         } else {
241 241
           this.$refs[refName].checkboxList = value.split(",");
242
-          insVlaue = 7;
242
+          insValue = 7;
243 243
         }
244 244
       } else if (name == "week") {
245 245
         if (value === "*") {
246
-          insVlaue = 1;
246
+          insValue = 1;
247 247
         } else if (value == "?") {
248
-          insVlaue = 2;
248
+          insValue = 2;
249 249
         } else if (value.indexOf("-") > -1) {
250 250
           let indexArr = value.split("-");
251 251
           isNaN(indexArr[0])
252 252
             ? (this.$refs[refName].cycle01 = 0)
253 253
             : (this.$refs[refName].cycle01 = indexArr[0]);
254 254
           this.$refs[refName].cycle02 = indexArr[1];
255
-          insVlaue = 3;
255
+          insValue = 3;
256 256
         } else if (value.indexOf("#") > -1) {
257 257
           let indexArr = value.split("#");
258 258
           isNaN(indexArr[0])
259 259
             ? (this.$refs[refName].average01 = 1)
260 260
             : (this.$refs[refName].average01 = indexArr[0]);
261 261
           this.$refs[refName].average02 = indexArr[1];
262
-          insVlaue = 4;
262
+          insValue = 4;
263 263
         } else if (value.indexOf("L") > -1) {
264 264
           let indexArr = value.split("L");
265 265
           isNaN(indexArr[0])
266 266
             ? (this.$refs[refName].weekday = 1)
267 267
             : (this.$refs[refName].weekday = indexArr[0]);
268
-          insVlaue = 5;
268
+          insValue = 5;
269 269
         } else {
270 270
           this.$refs[refName].checkboxList = value.split(",");
271
-          insVlaue = 7;
271
+          insValue = 7;
272 272
         }
273 273
       } else if (name == "year") {
274 274
         if (value == "") {
275
-          insVlaue = 1;
275
+          insValue = 1;
276 276
         } else if (value == "*") {
277
-          insVlaue = 2;
277
+          insValue = 2;
278 278
         } else if (value.indexOf("-") > -1) {
279
-          insVlaue = 3;
279
+          insValue = 3;
280 280
         } else if (value.indexOf("/") > -1) {
281
-          insVlaue = 4;
281
+          insValue = 4;
282 282
         } else {
283 283
           this.$refs[refName].checkboxList = value.split(",");
284
-          insVlaue = 5;
284
+          insValue = 5;
285 285
         }
286 286
       }
287
-      this.$refs[refName].radioValue = insVlaue;
287
+      this.$refs[refName].radioValue = insValue;
288 288
     },
289 289
     // 表单选项的子组件校验数字格式(通过-props传递)
290 290
     checkNumber(value, minLimit, maxLimit) {
291
-      //检查必须为整数
291
+      // 检查必须为整数
292 292
       value = Math.floor(value);
293 293
       if (value < minLimit) {
294 294
         value = minLimit;
@@ -303,29 +303,29 @@ export default {
303 303
     },
304 304
     // 填充表达式
305 305
     submitFill() {
306
-      this.$emit("fill", this.contabValueString);
306
+      this.$emit("fill", this.crontabValueString);
307 307
       this.hidePopup();
308 308
     },
309 309
     clearCron() {
310 310
       // 还原选择项
311 311
       ("准备还原");
312
-      this.contabValueObj = {
312
+      this.crontabValueObj = {
313 313
         second: "*",
314 314
         min: "*",
315 315
         hour: "*",
316 316
         day: "*",
317
-        mouth: "*",
317
+        month: "*",
318 318
         week: "?",
319 319
         year: "",
320 320
       };
321
-      for (let j in this.contabValueObj) {
322
-        this.changeRadio(j, this.contabValueObj[j]);
321
+      for (let j in this.crontabValueObj) {
322
+        this.changeRadio(j, this.crontabValueObj[j]);
323 323
       }
324 324
     },
325 325
   },
326 326
   computed: {
327
-    contabValueString: function() {
328
-      let obj = this.contabValueObj;
327
+    crontabValueString: function() {
328
+      let obj = this.crontabValueObj;
329 329
       let str =
330 330
         obj.second +
331 331
         " " +
@@ -335,7 +335,7 @@ export default {
335 335
         " " +
336 336
         obj.day +
337 337
         " " +
338
-        obj.mouth +
338
+        obj.month +
339 339
         " " +
340 340
         obj.week +
341 341
         (obj.year == "" ? "" : " " + obj.year);
@@ -347,7 +347,7 @@ export default {
347 347
     CrontabMin,
348 348
     CrontabHour,
349 349
     CrontabDay,
350
-    CrontabMouth,
350
+    CrontabMonth,
351 351
     CrontabWeek,
352 352
     CrontabYear,
353 353
     CrontabResult,

+ 128 - 128
ruoyi-ui/src/components/Crontab/mouth.vue

@@ -1,128 +1,128 @@
1
-<template>
2
-	<el-form size='small'>
3
-		<el-form-item>
4
-			<el-radio v-model='radioValue' :label="1">
5
-				月,允许的通配符[, - * /]
6
-			</el-radio>
7
-		</el-form-item>
8
-
9
-		<el-form-item>
10
-			<el-radio v-model='radioValue' :label="2">
11
-				周期从
12
-				<el-input-number v-model='cycle01' :min="1" :max="12" /> -
13
-				<el-input-number v-model='cycle02' :min="1" :max="12" /> 月
14
-			</el-radio>
15
-		</el-form-item>
16
-
17
-		<el-form-item>
18
-			<el-radio v-model='radioValue' :label="3">
19
-				从
20
-				<el-input-number v-model='average01' :min="1" :max="12" /> 月开始,每
21
-				<el-input-number v-model='average02' :min="1" :max="12" /> 月月执行一次
22
-			</el-radio>
23
-		</el-form-item>
24
-
25
-		<el-form-item>
26
-			<el-radio v-model='radioValue' :label="4">
27
-				指定
28
-				<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
29
-					<el-option v-for="item in 12" :key="item" :value="item">{{item}}</el-option>
30
-				</el-select>
31
-			</el-radio>
32
-		</el-form-item>
33
-	</el-form>
34
-</template>
35
-
36
-<script>
37
-export default {
38
-	data() {
39
-		return {
40
-			radioValue: 1,
41
-			cycle01: 1,
42
-			cycle02: 2,
43
-			average01: 1,
44
-			average02: 1,
45
-			checkboxList: [],
46
-			checkNum: this.check
47
-		}
48
-	},
49
-	name: 'crontab-mouth',
50
-	props: ['check', 'cron'],
51
-	methods: {
52
-		// 单选按钮值变化时
53
-		radioChange() {
54
-			if (this.radioValue === 1) {
55
-				this.$emit('update', 'mouth', '*');
56
-				this.$emit('update', 'year', '*');
57
-			} else {
58
-				if (this.cron.day === '*') {
59
-					this.$emit('update', 'day', '0', 'mouth');
60
-				}
61
-				if (this.cron.hour === '*') {
62
-					this.$emit('update', 'hour', '0', 'mouth');
63
-				}
64
-				if (this.cron.min === '*') {
65
-					this.$emit('update', 'min', '0', 'mouth');
66
-				}
67
-				if (this.cron.second === '*') {
68
-					this.$emit('update', 'second', '0', 'mouth');
69
-				}
70
-			}
71
-			switch (this.radioValue) {
72
-				case 2:
73
-					this.$emit('update', 'mouth', this.cycle01 + '-' + this.cycle02);
74
-					break;
75
-				case 3:
76
-					this.$emit('update', 'mouth', this.average01 + '/' + this.average02);
77
-					break;
78
-				case 4:
79
-					this.$emit('update', 'mouth', this.checkboxString);
80
-					break;
81
-			}
82
-		},
83
-		// 周期两个值变化时
84
-		cycleChange() {
85
-			if (this.radioValue == '2') {
86
-				this.$emit('update', 'mouth', this.cycleTotal);
87
-			}
88
-		},
89
-		// 平均两个值变化时
90
-		averageChange() {
91
-			if (this.radioValue == '3') {
92
-				this.$emit('update', 'mouth', this.averageTotal);
93
-			}
94
-		},
95
-		// checkbox值变化时
96
-		checkboxChange() {
97
-			if (this.radioValue == '4') {
98
-				this.$emit('update', 'mouth', this.checkboxString);
99
-			}
100
-		}
101
-	},
102
-	watch: {
103
-		"radioValue": "radioChange",
104
-		'cycleTotal': 'cycleChange',
105
-		'averageTotal': 'averageChange',
106
-		'checkboxString': 'checkboxChange'
107
-	},
108
-	computed: {
109
-		// 计算两个周期值
110
-		cycleTotal: function () {
111
-			this.cycle01 = this.checkNum(this.cycle01, 1, 12)
112
-			this.cycle02 = this.checkNum(this.cycle02, 1, 12)
113
-			return this.cycle01 + '-' + this.cycle02;
114
-		},
115
-		// 计算平均用到的值
116
-		averageTotal: function () {
117
-			this.average01 = this.checkNum(this.average01, 1, 12)
118
-			this.average02 = this.checkNum(this.average02, 1, 12)
119
-			return this.average01 + '/' + this.average02;
120
-		},
121
-		// 计算勾选的checkbox值合集
122
-		checkboxString: function () {
123
-			let str = this.checkboxList.join();
124
-			return str == '' ? '*' : str;
125
-		}
126
-	}
127
-}
128
-</script>
1
+<template>
2
+	<el-form size='small'>
3
+		<el-form-item>
4
+			<el-radio v-model='radioValue' :label="1">
5
+				月,允许的通配符[, - * /]
6
+			</el-radio>
7
+		</el-form-item>
8
+
9
+		<el-form-item>
10
+			<el-radio v-model='radioValue' :label="2">
11
+				周期从
12
+				<el-input-number v-model='cycle01' :min="1" :max="12" /> -
13
+				<el-input-number v-model='cycle02' :min="1" :max="12" /> 月
14
+			</el-radio>
15
+		</el-form-item>
16
+
17
+		<el-form-item>
18
+			<el-radio v-model='radioValue' :label="3">
19
+				从
20
+				<el-input-number v-model='average01' :min="1" :max="12" /> 月开始,每
21
+				<el-input-number v-model='average02' :min="1" :max="12" /> 月月执行一次
22
+			</el-radio>
23
+		</el-form-item>
24
+
25
+		<el-form-item>
26
+			<el-radio v-model='radioValue' :label="4">
27
+				指定
28
+				<el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%">
29
+					<el-option v-for="item in 12" :key="item" :value="item">{{item}}</el-option>
30
+				</el-select>
31
+			</el-radio>
32
+		</el-form-item>
33
+	</el-form>
34
+</template>
35
+
36
+<script>
37
+export default {
38
+	data() {
39
+		return {
40
+			radioValue: 1,
41
+			cycle01: 1,
42
+			cycle02: 2,
43
+			average01: 1,
44
+			average02: 1,
45
+			checkboxList: [],
46
+			checkNum: this.check
47
+		}
48
+	},
49
+	name: 'crontab-month',
50
+	props: ['check', 'cron'],
51
+	methods: {
52
+		// 单选按钮值变化时
53
+		radioChange() {
54
+			if (this.radioValue === 1) {
55
+				this.$emit('update', 'month', '*');
56
+				this.$emit('update', 'year', '*');
57
+			} else {
58
+				if (this.cron.day === '*') {
59
+					this.$emit('update', 'day', '0', 'month');
60
+				}
61
+				if (this.cron.hour === '*') {
62
+					this.$emit('update', 'hour', '0', 'month');
63
+				}
64
+				if (this.cron.min === '*') {
65
+					this.$emit('update', 'min', '0', 'month');
66
+				}
67
+				if (this.cron.second === '*') {
68
+					this.$emit('update', 'second', '0', 'month');
69
+				}
70
+			}
71
+			switch (this.radioValue) {
72
+				case 2:
73
+					this.$emit('update', 'month', this.cycle01 + '-' + this.cycle02);
74
+					break;
75
+				case 3:
76
+					this.$emit('update', 'month', this.average01 + '/' + this.average02);
77
+					break;
78
+				case 4:
79
+					this.$emit('update', 'month', this.checkboxString);
80
+					break;
81
+			}
82
+		},
83
+		// 周期两个值变化时
84
+		cycleChange() {
85
+			if (this.radioValue == '2') {
86
+				this.$emit('update', 'month', this.cycleTotal);
87
+			}
88
+		},
89
+		// 平均两个值变化时
90
+		averageChange() {
91
+			if (this.radioValue == '3') {
92
+				this.$emit('update', 'month', this.averageTotal);
93
+			}
94
+		},
95
+		// checkbox值变化时
96
+		checkboxChange() {
97
+			if (this.radioValue == '4') {
98
+				this.$emit('update', 'month', this.checkboxString);
99
+			}
100
+		}
101
+	},
102
+	watch: {
103
+		"radioValue": "radioChange",
104
+		'cycleTotal': 'cycleChange',
105
+		'averageTotal': 'averageChange',
106
+		'checkboxString': 'checkboxChange'
107
+	},
108
+	computed: {
109
+		// 计算两个周期值
110
+		cycleTotal: function () {
111
+			this.cycle01 = this.checkNum(this.cycle01, 1, 12)
112
+			this.cycle02 = this.checkNum(this.cycle02, 1, 12)
113
+			return this.cycle01 + '-' + this.cycle02;
114
+		},
115
+		// 计算平均用到的值
116
+		averageTotal: function () {
117
+			this.average01 = this.checkNum(this.average01, 1, 12)
118
+			this.average02 = this.checkNum(this.average02, 1, 12)
119
+			return this.average01 + '/' + this.average02;
120
+		},
121
+		// 计算勾选的checkbox值合集
122
+		checkboxString: function () {
123
+			let str = this.checkboxList.join();
124
+			return str == '' ? '*' : str;
125
+		}
126
+	}
127
+}
128
+</script>

+ 46 - 46
ruoyi-ui/src/components/Crontab/result.vue

@@ -37,7 +37,7 @@ export default {
37 37
 			// 获取当前时间精确至[年、月、日、时、分、秒]
38 38
 			let nTime = new Date();
39 39
 			let nYear = nTime.getFullYear();
40
-			let nMouth = nTime.getMonth() + 1;
40
+			let nMonth = nTime.getMonth() + 1;
41 41
 			let nDay = nTime.getDate();
42 42
 			let nHour = nTime.getHours();
43 43
 			let nMin = nTime.getMinutes();
@@ -47,7 +47,7 @@ export default {
47 47
 			this.getMinArr(ruleArr[1]);
48 48
 			this.getHourArr(ruleArr[2]);
49 49
 			this.getDayArr(ruleArr[3]);
50
-			this.getMouthArr(ruleArr[4]);
50
+			this.getMonthArr(ruleArr[4]);
51 51
 			this.getWeekArr(ruleArr[5]);
52 52
 			this.getYearArr(ruleArr[6], nYear);
53 53
 			// 将获取到的数组赋值-方便使用
@@ -62,7 +62,7 @@ export default {
62 62
 			let mIdx = this.getIndex(mDate, nMin);
63 63
 			let hIdx = this.getIndex(hDate, nHour);
64 64
 			let DIdx = this.getIndex(DDate, nDay);
65
-			let MIdx = this.getIndex(MDate, nMouth);
65
+			let MIdx = this.getIndex(MDate, nMonth);
66 66
 			let YIdx = this.getIndex(YDate, nYear);
67 67
 			// 重置月日时分秒的函数(后面用的比较多)
68 68
 			const resetSecond = function () {
@@ -84,17 +84,17 @@ export default {
84 84
 				nDay = DDate[DIdx]
85 85
 				resetHour();
86 86
 			}
87
-			const resetMouth = function () {
87
+			const resetMonth = function () {
88 88
 				MIdx = 0;
89
-				nMouth = MDate[MIdx]
89
+				nMonth = MDate[MIdx]
90 90
 				resetDay();
91 91
 			}
92 92
 			// 如果当前年份不为数组中当前值
93 93
 			if (nYear !== YDate[YIdx]) {
94
-				resetMouth();
94
+				resetMonth();
95 95
 			}
96 96
 			// 如果当前月份不为数组中当前值
97
-			if (nMouth !== MDate[MIdx]) {
97
+			if (nMonth !== MDate[MIdx]) {
98 98
 				resetDay();
99 99
 			}
100 100
 			// 如果当前“日”不为数组中当前值
@@ -114,12 +114,12 @@ export default {
114 114
 			goYear: for (let Yi = YIdx; Yi < YDate.length; Yi++) {
115 115
 				let YY = YDate[Yi];
116 116
 				// 如果到达最大值时
117
-				if (nMouth > MDate[MDate.length - 1]) {
118
-					resetMouth();
117
+				if (nMonth > MDate[MDate.length - 1]) {
118
+					resetMonth();
119 119
 					continue;
120 120
 				}
121 121
 				// 循环月份数组
122
-				goMouth: for (let Mi = MIdx; Mi < MDate.length; Mi++) {
122
+				goMonth: for (let Mi = MIdx; Mi < MDate.length; Mi++) {
123 123
 					// 赋值、方便后面运算
124 124
 					let MM = MDate[Mi];
125 125
 					MM = MM < 10 ? '0' + MM : MM;
@@ -127,7 +127,7 @@ export default {
127 127
 					if (nDay > DDate[DDate.length - 1]) {
128 128
 						resetDay();
129 129
 						if (Mi == MDate.length - 1) {
130
-							resetMouth();
130
+							resetMonth();
131 131
 							continue goYear;
132 132
 						}
133 133
 						continue;
@@ -144,10 +144,10 @@ export default {
144 144
 							if (Di == DDate.length - 1) {
145 145
 								resetDay();
146 146
 								if (Mi == MDate.length - 1) {
147
-									resetMouth();
147
+									resetMonth();
148 148
 									continue goYear;
149 149
 								}
150
-								continue goMouth;
150
+								continue goMonth;
151 151
 							}
152 152
 							continue;
153 153
 						}
@@ -155,11 +155,11 @@ export default {
155 155
 						// 判断日期的合法性,不合法的话也是跳出当前循环
156 156
 						if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true && this.dayRule !== 'workDay' && this.dayRule !== 'lastWeek' && this.dayRule !== 'lastDay') {
157 157
 							resetDay();
158
-							continue goMouth;
158
+							continue goMonth;
159 159
 						}
160 160
 						// 如果日期规则中有值时
161 161
 						if (this.dayRule == 'lastDay') {
162
-							//如果不是合法日期则需要将前将日期调到合法日期即月末最后一天
162
+							// 如果不是合法日期则需要将前将日期调到合法日期即月末最后一天
163 163
 
164 164
 							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
165 165
 								while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
@@ -169,7 +169,7 @@ export default {
169 169
 								}
170 170
 							}
171 171
 						} else if (this.dayRule == 'workDay') {
172
-							//校验并调整如果是2月30号这种日期传进来时需调整至正常月底
172
+							// 校验并调整如果是2月30号这种日期传进来时需调整至正常月底
173 173
 							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
174 174
 								while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
175 175
 									DD--;
@@ -180,15 +180,15 @@ export default {
180 180
 							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week');
181 181
 							// 当星期日时
182 182
 							if (thisWeek == 0) {
183
-								//先找下一个日,并判断是否为月底
183
+								// 先找下一个日,并判断是否为月底
184 184
 								DD++;
185 185
 								thisDD = DD < 10 ? '0' + DD : DD;
186
-								//判断下一日已经不是合法日期
186
+								// 判断下一日已经不是合法日期
187 187
 								if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
188 188
 									DD -= 3;
189 189
 								}
190 190
 							} else if (thisWeek == 6) {
191
-								//当星期6时只需判断不是1号就可进行操作
191
+								// 当星期6时只需判断不是1号就可进行操作
192 192
 								if (this.dayRuleSup !== 1) {
193 193
 									DD--;
194 194
 								} else {
@@ -196,25 +196,25 @@ export default {
196 196
 								}
197 197
 							}
198 198
 						} else if (this.dayRule == 'weekDay') {
199
-							//如果指定了是星期几
200
-							//获取当前日期是属于星期几
199
+							// 如果指定了是星期几
200
+							// 获取当前日期是属于星期几
201 201
 							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
202
-							//校验当前星期是否在星期池(dayRuleSup)中
202
+							// 校验当前星期是否在星期池(dayRuleSup)中
203 203
 							if (Array.indexOf(this.dayRuleSup, thisWeek) < 0) {
204 204
 								// 如果到达最大值时
205 205
 								if (Di == DDate.length - 1) {
206 206
 									resetDay();
207 207
 									if (Mi == MDate.length - 1) {
208
-										resetMouth();
208
+										resetMonth();
209 209
 										continue goYear;
210 210
 									}
211
-									continue goMouth;
211
+									continue goMonth;
212 212
 								}
213 213
 								continue;
214 214
 							}
215 215
 						} else if (this.dayRule == 'assWeek') {
216
-							//如果指定了是第几周的星期几
217
-							//获取每月1号是属于星期几
216
+							// 如果指定了是第几周的星期几
217
+							// 获取每月1号是属于星期几
218 218
 							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week');
219 219
 							if (this.dayRuleSup[1] >= thisWeek) {
220 220
 								DD = (this.dayRuleSup[0] - 1) * 7 + this.dayRuleSup[1] - thisWeek + 1;
@@ -222,17 +222,17 @@ export default {
222 222
 								DD = this.dayRuleSup[0] * 7 + this.dayRuleSup[1] - thisWeek + 1;
223 223
 							}
224 224
 						} else if (this.dayRule == 'lastWeek') {
225
-							//如果指定了每月最后一个星期几
226
-							//校验并调整如果是2月30号这种日期传进来时需调整至正常月底
225
+							// 如果指定了每月最后一个星期几
226
+							// 校验并调整如果是2月30号这种日期传进来时需调整至正常月底
227 227
 							if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
228 228
 								while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) {
229 229
 									DD--;
230 230
 									thisDD = DD < 10 ? '0' + DD : DD;
231 231
 								}
232 232
 							}
233
-							//获取月末最后一天是星期几
233
+							// 获取月末最后一天是星期几
234 234
 							let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + thisDD + ' 00:00:00'), 'week');
235
-							//找到要求中最近的那个星期几
235
+							// 找到要求中最近的那个星期几
236 236
 							if (this.dayRuleSup < thisWeek) {
237 237
 								DD -= thisWeek - this.dayRuleSup;
238 238
 							} else if (this.dayRuleSup > thisWeek) {
@@ -254,10 +254,10 @@ export default {
254 254
 									if (Di == DDate.length - 1) {
255 255
 										resetDay();
256 256
 										if (Mi == MDate.length - 1) {
257
-											resetMouth();
257
+											resetMonth();
258 258
 											continue goYear;
259 259
 										}
260
-										continue goMouth;
260
+										continue goMonth;
261 261
 									}
262 262
 									continue goDay;
263 263
 								}
@@ -277,10 +277,10 @@ export default {
277 277
 											if (Di == DDate.length - 1) {
278 278
 												resetDay();
279 279
 												if (Mi == MDate.length - 1) {
280
-													resetMouth();
280
+													resetMonth();
281 281
 													continue goYear;
282 282
 												}
283
-												continue goMouth;
283
+												continue goMonth;
284 284
 											}
285 285
 											continue goDay;
286 286
 										}
@@ -296,9 +296,9 @@ export default {
296 296
 										resultArr.push(YY + '-' + MM + '-' + DD + ' ' + hh + ':' + mm + ':' + ss)
297 297
 										nums++;
298 298
 									}
299
-									//如果条数满了就退出循环
299
+									// 如果条数满了就退出循环
300 300
 									if (nums == 5) break goYear;
301
-									//如果到达最大值时
301
+									// 如果到达最大值时
302 302
 									if (si == sDate.length - 1) {
303 303
 										resetSecond();
304 304
 										if (mi == mDate.length - 1) {
@@ -308,10 +308,10 @@ export default {
308 308
 												if (Di == DDate.length - 1) {
309 309
 													resetDay();
310 310
 													if (Mi == MDate.length - 1) {
311
-														resetMouth();
311
+														resetMonth();
312 312
 														continue goYear;
313 313
 													}
314
-													continue goMouth;
314
+													continue goMonth;
315 315
 												}
316 316
 												continue goDay;
317 317
 											}
@@ -323,7 +323,7 @@ export default {
323 323
 							} //goMin
324 324
 						}//goHour
325 325
 					}//goDay
326
-				}//goMouth
326
+				}//goMonth
327 327
 			}
328 328
 			// 判断100年内的结果条数
329 329
 			if (resultArr.length == 0) {
@@ -339,7 +339,7 @@ export default {
339 339
 
340 340
 
341 341
 		},
342
-		//用于计算某位数字在数组中的索引
342
+		// 用于计算某位数字在数组中的索引
343 343
 		getIndex(arr, value) {
344 344
 			if (value <= arr[0] || value > arr[arr.length - 1]) {
345 345
 				return 0;
@@ -365,7 +365,7 @@ export default {
365 365
 			}
366 366
 		},
367 367
 		// 获取"月"数组
368
-		getMouthArr(rule) {
368
+		getMonthArr(rule) {
369 369
 			this.dateArr[4] = this.getOrderArr(1, 12);
370 370
 			if (rule.indexOf('-') >= 0) {
371 371
 				this.dateArr[4] = this.getCycleArr(rule, 12, false)
@@ -377,7 +377,7 @@ export default {
377 377
 		},
378 378
 		// 获取"日"数组-主要为日期规则
379 379
 		getWeekArr(rule) {
380
-			//只有当日期规则的两个值均为“”时则表达日期是有选项的
380
+			// 只有当日期规则的两个值均为“”时则表达日期是有选项的
381 381
 			if (this.dayRule == '' && this.dayRuleSup == '') {
382 382
 				if (rule.indexOf('-') >= 0) {
383 383
 					this.dayRule = 'weekDay';
@@ -401,7 +401,7 @@ export default {
401 401
 					this.dayRule = 'weekDay';
402 402
 					this.dayRuleSup = this.getAssignArr(rule)
403 403
 				}
404
-				//如果weekDay时将7调整为0【week值0即是星期日】
404
+				// 如果weekDay时将7调整为0【week值0即是星期日】
405 405
 				if (this.dayRule == 'weekDay') {
406 406
 					for (let i = 0; i < this.dayRuleSup.length; i++) {
407 407
 						if (this.dayRuleSup[i] == 7) {
@@ -502,7 +502,7 @@ export default {
502 502
 		},
503 503
 		// 根据规则返回一个具有周期性的数组
504 504
 		getCycleArr(rule, limit, status) {
505
-			//status--表示是否从0开始(则从1开始)
505
+			// status--表示是否从0开始(则从1开始)
506 506
 			let arr = [];
507 507
 			let cycleArr = rule.split('-');
508 508
 			let min = Number(cycleArr[0]);
@@ -520,7 +520,7 @@ export default {
520 520
 			arr.sort(this.compare)
521 521
 			return arr;
522 522
 		},
523
-		//比较数字大小(用于Array.sort)
523
+		// 比较数字大小(用于Array.sort)
524 524
 		compare(value1, value2) {
525 525
 			if (value2 - value1 > 0) {
526 526
 				return -1;
@@ -563,4 +563,4 @@ export default {
563 563
 	}
564 564
 }
565 565
 
566
-</script>
566
+</script>

+ 2 - 2
ruoyi-ui/src/components/Crontab/second.vue

@@ -86,7 +86,7 @@ export default {
86 86
 			}
87 87
 		},
88 88
 		othChange() {
89
-			//反解析 
89
+			// 反解析
90 90
 			let ins = this.cron.second
91 91
 			('反解析 second', ins);
92 92
 			if (ins === '*') {
@@ -130,4 +130,4 @@ export default {
130 130
 		}
131 131
 	}
132 132
 }
133
-</script>
133
+</script>

+ 3 - 3
ruoyi-ui/src/components/Crontab/week.vue

@@ -71,8 +71,8 @@ export default {
71 71
 				this.$emit('update', 'week', '*');
72 72
 				this.$emit('update', 'year', '*');
73 73
 			} else {
74
-				if (this.cron.mouth === '*') {
75
-					this.$emit('update', 'mouth', '0', 'week');
74
+				if (this.cron.month === '*') {
75
+					this.$emit('update', 'month', '0', 'week');
76 76
 				}
77 77
 				if (this.cron.day === '*') {
78 78
 					this.$emit('update', 'day', '0', 'week');
@@ -164,4 +164,4 @@ export default {
164 164
 		}
165 165
 	}
166 166
 }
167
-</script>
167
+</script>

+ 4 - 4
ruoyi-ui/src/components/Crontab/year.vue

@@ -55,12 +55,12 @@ export default {
55 55
 		}
56 56
 	},
57 57
 	name: 'crontab-year',
58
-	props: ['check', 'mouth', 'cron'],
58
+	props: ['check', 'month', 'cron'],
59 59
 	methods: {
60 60
 		// 单选按钮值变化时
61 61
 		radioChange() {
62
-			if (this.cron.mouth === '*') {
63
-				this.$emit('update', 'mouth', '0', 'year');
62
+			if (this.cron.month === '*') {
63
+				this.$emit('update', 'month', '0', 'year');
64 64
 			}
65 65
 			if (this.cron.day === '*') {
66 66
 				this.$emit('update', 'day', '0', 'year');
@@ -141,4 +141,4 @@ export default {
141 141
 		this.fullYear = Number(new Date().getFullYear());
142 142
 	}
143 143
 }
144
-</script>
144
+</script>