From 76d2c779a6850d3b6253d5779f5eb2176fca331a Mon Sep 17 00:00:00 2001 From: lcr <977192391@qq.com> Date: Mon, 17 Jun 2024 17:43:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=90=E8=A1=8C=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/business/ctApplyPlan/index.vue | 104 +++++++++++++++++++---- 1 file changed, 87 insertions(+), 17 deletions(-) diff --git a/src/views/business/ctApplyPlan/index.vue b/src/views/business/ctApplyPlan/index.vue index d4f9a84..ef95cf8 100644 --- a/src/views/business/ctApplyPlan/index.vue +++ b/src/views/business/ctApplyPlan/index.vue @@ -50,7 +50,7 @@ {{ scope.$index + 1 }} - + @@ -61,7 +61,16 @@ - + + + + {{ scope.row.planParams }} + + 显示参数 + + + + @@ -80,6 +89,8 @@ + + @@ -105,7 +116,7 @@ - + - - + + + + + 生成表达式 + + + + @@ -200,8 +218,9 @@ - 添加参数 - 清空参数 + 添加参数 + 清空参数 @@ -219,18 +238,21 @@ + + + - - + + + :value="dict.value"> - + @@ -238,11 +260,32 @@ - + + + + + + + + + + + + + + + + + + + + + @@ -258,12 +301,19 @@ import { listCtApplyPlan, getCtApplyPlan, delCtApplyPlan, addCtApplyPlan, updateCtApplyPlan } from "@/api/business/ctApplyPlan"; import { listRebotAll } from "@/api/business/ctRebot"; import { listApplyAll } from "@/api/business/ctApply"; +import Crontab from '@/components/Crontab' + export default { + components: { Crontab }, name: "CtApplyPlan", - dicts: ['plan_type', 'wait_timeout', , 'exc_type', 'plan_run_status','app_param_type'], + dicts: ['plan_type', 'wait_timeout', , 'exc_type', 'plan_run_status', 'app_param_type'], data() { return { + // 是否显示Cron表达式弹出层 + openCron: false, + // 传入的表达式 + expression: "", // 添加参数 addParamVisible: false, // 遮罩层 @@ -310,9 +360,9 @@ export default { // 应用列表 applyList: [], // 参数集 - params:[], + params: [], // 单个参数对象 - param:{}, + param: {}, }; }, created() { @@ -320,11 +370,22 @@ export default { }, methods: { // 添加参数 - addParam(){ + addParam() { this.params.push(this.param); this.form.planParams = JSON.stringify(this.params); this.addParamVisible = false; }, + // 清空参数 + clearAddParam() { + this.form.planParams = '' + this.params = []; + this.param = {}; + }, + // 打开添加参数 + showAddParam() { + this.addParamVisible = true; + this.param = {}; + }, /** 查询应用执行计划管理列表 */ getList() { this.loading = true; @@ -476,7 +537,16 @@ export default { }); return sums; - } + }, + /** cron表达式按钮操作 */ + handleShowCron() { + this.expression = this.form.cronExpression; + this.openCron = true; + }, + /** 确定后回传值 */ + crontabFill(value) { + this.form.cronExpression = value; + }, } }; \ No newline at end of file
{{ scope.row.planParams }}