From a78b5b7b2ac6eff4462548ed523f2e01076e77f3 Mon Sep 17 00:00:00 2001 From: 捏造的信仰 <yiding.he@gmail.com> Date: 星期二, 23 八月 2022 13:36:29 +0800 Subject: [PATCH] 修复执行任务时,若方法入口在任务的父类,则无法执行的问题 实际项目开发中,可能会为所有定时任务类建一个共同的父类,任务的执行入口在父类定义,以便管理。此时使用 `getDeclaredMethod()` 是无法从子类找到要执行的方法的,而是要换用 `getMethod()` 方法。 --- ruoyi-ui/src/components/Crontab/week.vue | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/components/Crontab/week.vue b/ruoyi-ui/src/components/Crontab/week.vue index 4485bc4..1cec700 100644 --- a/ruoyi-ui/src/components/Crontab/week.vue +++ b/ruoyi-ui/src/components/Crontab/week.vue @@ -2,7 +2,7 @@ <el-form size='small'> <el-form-item> <el-radio v-model='radioValue' :label="1"> - 周,允许的通配符[, - * / L #] + 周,允许的通配符[, - * ? / L #] </el-radio> </el-form-item> @@ -60,7 +60,7 @@ <el-radio v-model='radioValue' :label="6"> 指定 <el-select clearable v-model="checkboxList" placeholder="可多选" multiple style="width:100%"> - <el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="item.key">{{item.value}}</el-option> + <el-option v-for="(item,index) of weekList" :key="index" :label="item.value" :value="String(item.key)">{{item.value}}</el-option> </el-select> </el-radio> </el-form-item> @@ -128,13 +128,13 @@ this.$emit('update', 'week', '?'); break; case 3: - this.$emit('update', 'week', this.cycle01 + '-' + this.cycle02); + this.$emit('update', 'week', this.cycleTotal); break; case 4: - this.$emit('update', 'week', this.average02 + '#' + this.average01); + this.$emit('update', 'week', this.averageTotal); break; case 5: - this.$emit('update', 'week', this.weekday + 'L'); + this.$emit('update', 'week', this.weekdayCheck + 'L'); break; case 6: this.$emit('update', 'week', this.checkboxString); @@ -168,7 +168,7 @@ }, }, watch: { - "radioValue": "radioChange", + 'radioValue': 'radioChange', 'cycleTotal': 'cycleChange', 'averageTotal': 'averageChange', 'weekdayCheck': 'weekdayChange', -- Gitblit v1.9.2