| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="任务名称" prop="jobName"> |
| | | <el-input |
| | | v-model="queryParams.jobName" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | v-hasPermi="['monitor:job:query']" |
| | | >日志</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange"> |
| | |
| | | /> |
| | | |
| | | <!-- 添加或修改定时任务对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="700px"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="任务名称" prop="jobName"> |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 任务日志详细 --> |
| | | <el-dialog title="任务详细" :visible.sync="openView" width="700px"> |
| | | <el-dialog title="任务详细" :visible.sync="openView" width="700px" append-to-body> |
| | | <el-form ref="form" :model="form" label-width="120px" size="mini"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="是否并发:"> |
| | | <div v-if="form.status == 0">允许</div> |
| | | <div v-else-if="form.status == 1">禁止</div> |
| | | <div v-if="form.concurrent == 0">允许</div> |
| | | <div v-else-if="form.concurrent == 1">禁止</div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { listJob, getJob, delJob, addJob, updateJob, exportJob, runJob, changeJobStatus } from "@/api/monitor/job"; |
| | | |
| | |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 定时任务表格数据 |
| | |
| | | type: "warning" |
| | | }).then(function() { |
| | | return runJob(row.jobId, row.jobGroup); |
| | | }).then(function() { |
| | | }).then(() => { |
| | | this.msgSuccess("执行成功"); |
| | | }).catch(function() {}); |
| | | }, |
| | |
| | | this.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | } else { |
| | | this.msgError(response.msg); |
| | | } |
| | | }); |
| | | } else { |
| | |
| | | this.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | } else { |
| | | this.msgError(response.msg); |
| | | } |
| | | }); |
| | | } |
| | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | </script> |