| | |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :md="6" :sm="10"> |
| | | <a-form-model-item label="任务类名" prop="jobClassName"> |
| | | <a-input placeholder="请输入任务类名" v-model="queryParam.jobClassName"></a-input> |
| | | <a-form-model-item label="任务名称" prop="jobClassName"> |
| | | <a-input placeholder="请输入任务名称" v-model="queryParam.jobName"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="10"> |
| | | <a-form-model-item label="任务状态" prop="status"> |
| | | <a-select style="width: 220px" v-model="queryParam.status" placeholder="请选择状态"> |
| | | <a-select v-model="queryParam.status" placeholder="请选择状态"> |
| | | <a-select-option value="">全部</a-select-option> |
| | | <a-select-option value="0">正常</a-select-option> |
| | | <a-select-option value="-1">停止</a-select-option> |
| | |
| | | |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="resumeJob(record)" v-if="record.status==-1">启动</a> |
| | | <a @click="pauseJob(record)" v-if="record.status==0">停止</a> |
| | | <a @click="executeImmediately(record)">立即执行</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a @click="handlequartzLog(record)">日志</a> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item><a @click="executeImmediately(record)">立即执行</a></a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="resumeJob(record)" v-if="record.status==-1">启动</a> |
| | | <a @click="pauseJob(record)" v-if="record.status==0">停止</a> |
| | | |
| | | </a-menu-item> |
| | | <a-menu-item><a @click="handleEdit(record)">编辑</a></a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
| | |
| | | |
| | | <!-- 表单区域 --> |
| | | <quartzJob-modal ref="modalForm" @ok="modalFormOk"></quartzJob-modal> |
| | | |
| | | <!--日志--> |
| | | <quartz-job-list-modal ref="modalFormList" @ok="modalFormOk"></quartz-job-list-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import QuartzJobModal from './modules/QuartzJobModal' |
| | | import QuartzJobListModal from './modules/QuartzJobListModal' |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from "@/components/jeecg/JEllipsis"; |
| | |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | QuartzJobModal, |
| | | QuartzJobListModal, |
| | | JEllipsis |
| | | }, |
| | | data () { |
| | |
| | | } |
| | | }, |
| | | { |
| | | title: '任务类名', |
| | | title: '任务名称', |
| | | align:"center", |
| | | dataIndex: 'jobClassName', |
| | | dataIndex: 'jobName', |
| | | sorter: true, |
| | | /* customRender:function (text) { |
| | | return "*"+text.substring(9,text.length); |
| | |
| | | scopedSlots: {customRender: 'parameterRender'}, |
| | | }, |
| | | { |
| | | title: '描述', |
| | | title: '说明', |
| | | align:"center", |
| | | width: 250, |
| | | dataIndex: 'description', |
| | | scopedSlots: {customRender: 'description'}, |
| | | }, |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | handlequartzLog: function (record) { |
| | | this.$refs.modalFormList.openPage(record); |
| | | this.$refs.modalFormList.title = "执行日志"; |
| | | this.$refs.modalFormList.disableSubmit = false; |
| | | }, |
| | | //筛选需要重写handleTableChange |
| | | handleTableChange(pagination, filters, sorter) { |
| | | //分页、排序、筛选变化时触发 |
| | |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | | } |
| | | //这种筛选方式只支持单选 |
| | | |
| | | |
| | | // update-begin-author:liusq date:20210624 for:前台定时任务无法翻页 #2666 |
| | | if(filters && Object.keys(filters).length>0 && filters.status){ |
| | | this.filters.status = filters.status[0]; |
| | |
| | | onOk: function(){ |
| | | getAction(that.url.pause,{id:record.id}).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | onOk: function(){ |
| | | getAction(that.url.resume,{id:record.id}).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | |
| | | onOk: function(){ |
| | | getAction(that.url.execute,{id:record.id}).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | } |