|
|
@@ -308,16 +308,25 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="间隔时长:" prop="triggerInterval">
|
|
|
- <el-input-number
|
|
|
- v-model="formJi.triggerInterval"
|
|
|
- style="width: 100%;"
|
|
|
- class="mx-4"
|
|
|
- :min="1"
|
|
|
- :max="10"
|
|
|
- controls-position="right"
|
|
|
- @CHANGE="handleChange"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
+ <el-input-number
|
|
|
+ v-model="formJi.triggerInterval"
|
|
|
+ v-if="formJi.triggerType==2"
|
|
|
+ style="width: 100%;"
|
|
|
+ class="mx-4"
|
|
|
+ :min="1"
|
|
|
+ :max="10"
|
|
|
+ controls-position="right"
|
|
|
+ @CHANGE="handleChange"
|
|
|
+ />
|
|
|
+ <el-input v-if="formJi.triggerType==3" v-model="formJi.triggerInterval" placeholder="请输入cron执行表达式">
|
|
|
+ <template #append>
|
|
|
+ <el-button type="primary" @click="handleShowCron">
|
|
|
+ 生成表达式
|
|
|
+ <i class="el-icon-time el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="48">
|
|
|
@@ -715,14 +724,20 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="Cron表达式生成器" v-model="openCron" append-to-body destroy-on-close>
|
|
|
+ <crontab ref="crontabRef" @hide="openCron=false" @fill="crontabFill" :expression="expression"></crontab>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</template>
|
|
|
<script setup>
|
|
|
+import Crontab from '@/components/Crontab'
|
|
|
import { Search,RefreshRight,Plus,Download,Upload,Delete,Setting,Minus} from '@element-plus/icons-vue'
|
|
|
import { reactive } from 'vue'
|
|
|
import Codemirror from 'codemirror-editor-vue3';
|
|
|
import { snailList,addSnail,snailDe,snailEdit,delSnamil,snailSta,snailTri } from "@/api/service/timing";
|
|
|
import { ref, onMounted, onUnmounted, nextTick } from 'vue';
|
|
|
const groupName= ref('')
|
|
|
+const expression = ref('')
|
|
|
const jobName= ref('')
|
|
|
const jobStatus= ref('')
|
|
|
const executorInfo= ref('')
|
|
|
@@ -742,6 +757,7 @@ const isAdd = ref(false)
|
|
|
const isAddTa = ref(false)
|
|
|
const treeId = ref('');
|
|
|
const titleDe = ref('')
|
|
|
+const openCron = ref(false)
|
|
|
const parTag = ref([])
|
|
|
const optionsTaskType = ref([
|
|
|
{
|
|
|
@@ -792,9 +808,16 @@ const showTablepane = ref({
|
|
|
gx:true,
|
|
|
})
|
|
|
const formJi = ref({
|
|
|
+ routeKey:4,
|
|
|
+ blockStrategy:1,
|
|
|
+ triggerType:2,
|
|
|
+ triggerInterval:10,
|
|
|
+ executorTimeout:10,
|
|
|
+ maxRetryTimes:3,
|
|
|
+ retryInterval:1,
|
|
|
+ jobStatus:1,
|
|
|
jobName:'',
|
|
|
groupName:'',
|
|
|
- jobStatus:'',
|
|
|
taskType:'',
|
|
|
executorInfo:'',
|
|
|
executorInfoTy:'',
|
|
|
@@ -884,6 +907,13 @@ function snaliTrigger(row){
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+function handleShowCron() {
|
|
|
+ expression.value = formJi.value.triggerInterval;
|
|
|
+ openCron.value = true;
|
|
|
+}
|
|
|
+function crontabFill(value) {
|
|
|
+ formJi.value.triggerInterval = value;
|
|
|
+}
|
|
|
function showCode(){
|
|
|
Object.keys(rulesJi).forEach(key => {
|
|
|
delete rulesJi[key];
|