初始化
This commit is contained in:
		| @ -0,0 +1,93 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" ?> | ||||
| <!DOCTYPE mapper | ||||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
| <mapper namespace="com.ruoyi.quartz.mapper.SysJobLogMapper"> | ||||
|  | ||||
| 	<resultMap type="SysJobLog" id="SysJobLogResult"> | ||||
| 		<id     property="jobLogId"       column="job_log_id"      /> | ||||
| 		<result property="jobName"        column="job_name"        /> | ||||
| 		<result property="jobGroup"       column="job_group"       /> | ||||
| 		<result property="invokeTarget"   column="invoke_target"   /> | ||||
| 		<result property="jobMessage"     column="job_message"     /> | ||||
| 		<result property="status"         column="status"          /> | ||||
| 		<result property="exceptionInfo"  column="exception_info"  /> | ||||
| 		<result property="createTime"     column="create_time"     /> | ||||
| 	</resultMap> | ||||
| 	 | ||||
| 	<sql id="selectJobLogVo"> | ||||
|         select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time  | ||||
| 		from sys_job_log | ||||
|     </sql> | ||||
| 	 | ||||
| 	<select id="selectJobLogList" parameterType="SysJobLog" resultMap="SysJobLogResult"> | ||||
| 		<include refid="selectJobLogVo"/> | ||||
| 		<where> | ||||
| 			<if test="jobName != null and jobName != ''"> | ||||
| 				AND job_name like concat('%', #{jobName}, '%') | ||||
| 			</if> | ||||
| 			<if test="jobGroup != null and jobGroup != ''"> | ||||
| 				AND job_group = #{jobGroup} | ||||
| 			</if> | ||||
| 			<if test="status != null and status != ''"> | ||||
| 				AND status = #{status} | ||||
| 			</if> | ||||
| 			<if test="invokeTarget != null and invokeTarget != ''"> | ||||
| 				AND invoke_target like concat('%', #{invokeTarget}, '%') | ||||
| 			</if> | ||||
| 			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> | ||||
| 				and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') | ||||
| 			</if> | ||||
| 			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> | ||||
| 				and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') | ||||
| 			</if> | ||||
| 		</where> | ||||
| 	</select> | ||||
| 	 | ||||
| 	<select id="selectJobLogAll" resultMap="SysJobLogResult"> | ||||
| 		<include refid="selectJobLogVo"/> | ||||
| 	</select> | ||||
| 	 | ||||
| 	<select id="selectJobLogById" parameterType="Long" resultMap="SysJobLogResult"> | ||||
| 		<include refid="selectJobLogVo"/> | ||||
| 		where job_log_id = #{jobLogId} | ||||
| 	</select> | ||||
| 	 | ||||
| 	<delete id="deleteJobLogById" parameterType="Long"> | ||||
|  		delete from sys_job_log where job_log_id = #{jobLogId} | ||||
|  	</delete> | ||||
|  	 | ||||
|  	<delete id="deleteJobLogByIds" parameterType="String"> | ||||
|  		delete from sys_job_log where job_log_id in | ||||
|  		<foreach collection="array" item="jobLogId" open="(" separator="," close=")"> | ||||
|  			#{jobLogId} | ||||
|         </foreach>  | ||||
|  	</delete> | ||||
|  	 | ||||
|  	<update id="cleanJobLog"> | ||||
|         truncate table sys_job_log | ||||
|     </update> | ||||
|  	 | ||||
|  	<insert id="insertJobLog" parameterType="SysJobLog"> | ||||
|  		insert into sys_job_log( | ||||
|  			<if test="jobLogId != null and jobLogId != 0">job_log_id,</if> | ||||
|  			<if test="jobName != null and jobName != ''">job_name,</if> | ||||
|  			<if test="jobGroup != null and jobGroup != ''">job_group,</if> | ||||
|  			<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if> | ||||
|  			<if test="jobMessage != null and jobMessage != ''">job_message,</if> | ||||
|  			<if test="status != null and status != ''">status,</if> | ||||
|  			<if test="exceptionInfo != null and exceptionInfo != ''">exception_info,</if> | ||||
|  			create_time | ||||
|  		)values( | ||||
|  			<if test="jobLogId != null and jobLogId != 0">#{jobLogId},</if> | ||||
|  			<if test="jobName != null and jobName != ''">#{jobName},</if> | ||||
|  			<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if> | ||||
|  			<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if> | ||||
|  			<if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if> | ||||
|  			<if test="status != null and status != ''">#{status},</if> | ||||
|  			<if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if> | ||||
|  			sysdate() | ||||
|  		) | ||||
| 	</insert> | ||||
|  | ||||
| </mapper>  | ||||
							
								
								
									
										111
									
								
								ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,111 @@ | ||||
| <?xml version="1.0" encoding="UTF-8" ?> | ||||
| <!DOCTYPE mapper | ||||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
| <mapper namespace="com.ruoyi.quartz.mapper.SysJobMapper"> | ||||
|  | ||||
| 	<resultMap type="SysJob" id="SysJobResult"> | ||||
| 		<id     property="jobId"          column="job_id"          /> | ||||
| 		<result property="jobName"        column="job_name"        /> | ||||
| 		<result property="jobGroup"       column="job_group"       /> | ||||
| 		<result property="invokeTarget"   column="invoke_target"   /> | ||||
| 		<result property="cronExpression" column="cron_expression" /> | ||||
| 		<result property="misfirePolicy"  column="misfire_policy"  /> | ||||
| 		<result property="concurrent"     column="concurrent"      /> | ||||
| 		<result property="status"         column="status"          /> | ||||
| 		<result property="createBy"       column="create_by"       /> | ||||
| 		<result property="createTime"     column="create_time"     /> | ||||
| 		<result property="updateBy"       column="update_by"       /> | ||||
| 		<result property="updateTime"     column="update_time"     /> | ||||
| 		<result property="remark"         column="remark"          /> | ||||
| 	</resultMap> | ||||
| 	 | ||||
| 	<sql id="selectJobVo"> | ||||
|         select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark  | ||||
| 		from sys_job | ||||
|     </sql> | ||||
| 	 | ||||
| 	<select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult"> | ||||
| 		<include refid="selectJobVo"/> | ||||
| 		<where> | ||||
| 			<if test="jobName != null and jobName != ''"> | ||||
| 				AND job_name like concat('%', #{jobName}, '%') | ||||
| 			</if> | ||||
| 			<if test="jobGroup != null and jobGroup != ''"> | ||||
| 				AND job_group = #{jobGroup} | ||||
| 			</if> | ||||
| 			<if test="status != null and status != ''"> | ||||
| 				AND status = #{status} | ||||
| 			</if> | ||||
| 			<if test="invokeTarget != null and invokeTarget != ''"> | ||||
| 				AND invoke_target like concat('%', #{invokeTarget}, '%') | ||||
| 			</if> | ||||
| 		</where> | ||||
| 	</select> | ||||
| 	 | ||||
| 	<select id="selectJobAll" resultMap="SysJobResult"> | ||||
| 		<include refid="selectJobVo"/> | ||||
| 	</select> | ||||
| 	 | ||||
| 	<select id="selectJobById" parameterType="Long" resultMap="SysJobResult"> | ||||
| 		<include refid="selectJobVo"/> | ||||
| 		where job_id = #{jobId} | ||||
| 	</select> | ||||
| 	 | ||||
| 	<delete id="deleteJobById" parameterType="Long"> | ||||
|  		delete from sys_job where job_id = #{jobId} | ||||
|  	</delete> | ||||
|  	 | ||||
|  	<delete id="deleteJobByIds" parameterType="Long"> | ||||
|  		delete from sys_job where job_id in | ||||
|  		<foreach collection="array" item="jobId" open="(" separator="," close=")"> | ||||
|  			#{jobId} | ||||
|         </foreach>  | ||||
|  	</delete> | ||||
|  	 | ||||
|  	<update id="updateJob" parameterType="SysJob"> | ||||
|  		update sys_job | ||||
|  		<set> | ||||
|  			<if test="jobName != null and jobName != ''">job_name = #{jobName},</if> | ||||
|  			<if test="jobGroup != null and jobGroup != ''">job_group = #{jobGroup},</if> | ||||
|  			<if test="invokeTarget != null and invokeTarget != ''">invoke_target = #{invokeTarget},</if> | ||||
|  			<if test="cronExpression != null and cronExpression != ''">cron_expression = #{cronExpression},</if> | ||||
|  			<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy = #{misfirePolicy},</if> | ||||
|  			<if test="concurrent != null and concurrent != ''">concurrent = #{concurrent},</if> | ||||
|  			<if test="status !=null">status = #{status},</if> | ||||
|  			<if test="remark != null and remark != ''">remark = #{remark},</if> | ||||
|  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> | ||||
|  			update_time = sysdate() | ||||
|  		</set> | ||||
|  		where job_id = #{jobId} | ||||
| 	</update> | ||||
|  	 | ||||
|  	<insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId"> | ||||
|  		insert into sys_job( | ||||
|  			<if test="jobId != null and jobId != 0">job_id,</if> | ||||
|  			<if test="jobName != null and jobName != ''">job_name,</if> | ||||
|  			<if test="jobGroup != null and jobGroup != ''">job_group,</if> | ||||
|  			<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if> | ||||
|  			<if test="cronExpression != null and cronExpression != ''">cron_expression,</if> | ||||
|  			<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy,</if> | ||||
|  			<if test="concurrent != null and concurrent != ''">concurrent,</if> | ||||
|  			<if test="status != null and status != ''">status,</if> | ||||
|  			<if test="remark != null and remark != ''">remark,</if> | ||||
|  			<if test="createBy != null and createBy != ''">create_by,</if> | ||||
|  			create_time | ||||
|  		)values( | ||||
|  			<if test="jobId != null and jobId != 0">#{jobId},</if> | ||||
|  			<if test="jobName != null and jobName != ''">#{jobName},</if> | ||||
|  			<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if> | ||||
|  			<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if> | ||||
|  			<if test="cronExpression != null and cronExpression != ''">#{cronExpression},</if> | ||||
|  			<if test="misfirePolicy != null and misfirePolicy != ''">#{misfirePolicy},</if> | ||||
|  			<if test="concurrent != null and concurrent != ''">#{concurrent},</if> | ||||
|  			<if test="status != null and status != ''">#{status},</if> | ||||
|  			<if test="remark != null and remark != ''">#{remark},</if> | ||||
|  			<if test="createBy != null and createBy != ''">#{createBy},</if> | ||||
|  			sysdate() | ||||
|  		) | ||||
| 	</insert> | ||||
|  | ||||
| </mapper>  | ||||
							
								
								
									
										109
									
								
								ruoyi-quartz/src/main/resources/templates/monitor/job/add.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										109
									
								
								ruoyi-quartz/src/main/resources/templates/monitor/job/add.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,109 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="zh" xmlns:th="http://www.thymeleaf.org" > | ||||
| <head> | ||||
| 	<th:block th:include="include :: header('新增定时任务')" /> | ||||
| </head> | ||||
| <body class="white-bg"> | ||||
| 	<div class="wrapper wrapper-content animated fadeInRight ibox-content"> | ||||
| 		<form class="form-horizontal m" id="form-job-add"> | ||||
| 		    <input type="hidden" name="createBy" th:value="${@permission.getPrincipalProperty('loginName')}"> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label is-required">任务名称:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<input class="form-control" type="text" name="jobName" id="jobName" required> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label">任务分组:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<select name="jobGroup" class="form-control m-b" th:with="type=${@dict.getType('sys_job_group')}"> | ||||
| 		                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> | ||||
| 		            </select> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label is-required">调用目标字符串:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<input class="form-control" type="text" name="invokeTarget" id="invokeTarget" required> | ||||
| 				    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> Bean调用示例:ryTask.ryParams('ry')</span> | ||||
| 				    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> Class类调用示例:com.ruoyi.quartz.task.RyTask.ryParams('ry')</span> | ||||
| 				    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 参数说明:支持字符串,布尔类型,长整型,浮点型,整型</span> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label is-required">cron表达式:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<input class="form-control" type="text" name="cronExpression" id="cronExpression" required> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label">执行策略:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<label class="radio-box"> <input type="radio" name="misfirePolicy" value="1" th:checked="true"/> 立即执行 </label>  | ||||
| 					<label class="radio-box"> <input type="radio" name="misfirePolicy" value="2" /> 执行一次 </label>  | ||||
| 					<label class="radio-box"> <input type="radio" name="misfirePolicy" value="3" /> 放弃执行 </label> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label">并发执行:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<label class="radio-box"> <input type="radio" name="concurrent" value="0"/> 允许 </label>  | ||||
| 					<label class="radio-box"> <input type="radio" name="concurrent" value="1" th:checked="true"/> 禁止 </label>  | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label">状态:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 				    <div class="radio-box" th:each="dict : ${@dict.getType('sys_job_status')}"> | ||||
| 						<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}"> | ||||
| 						<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label">备注:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<textarea id="remark" name="remark" class="form-control"></textarea> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</form> | ||||
| 	</div> | ||||
| 	<th:block th:include="include :: footer" /> | ||||
| 	<script type="text/javascript"> | ||||
| 		var prefix = ctx + "monitor/job"; | ||||
| 	 | ||||
| 		$("#form-job-add").validate({ | ||||
| 			onkeyup: false, | ||||
| 			rules:{ | ||||
| 				cronExpression:{ | ||||
| 					remote: { | ||||
| 	                    url: prefix + "/checkCronExpressionIsValid", | ||||
| 	                    type: "post", | ||||
| 	                    dataType: "json", | ||||
| 	                    data: { | ||||
| 	                        "cronExpression": function() { | ||||
| 	                            return $.common.trim($("#cronExpression").val()); | ||||
| 	                        } | ||||
| 	                    }, | ||||
| 	                    dataFilter: function(data, type) { | ||||
| 	                    	return data; | ||||
| 	                    } | ||||
| 	                } | ||||
| 				}, | ||||
| 			}, | ||||
| 			messages: { | ||||
| 	            "cronExpression": { | ||||
| 	                remote: "表达式不正确" | ||||
| 	            } | ||||
| 	        }, | ||||
| 	        focusCleanup: true | ||||
| 		}); | ||||
| 		 | ||||
| 		function submitHandler() { | ||||
| 	        if ($.validate.form()) { | ||||
| 	        	$.operate.save(prefix + "/add", $('#form-job-add').serialize()); | ||||
| 	        } | ||||
| 	    } | ||||
| 	</script> | ||||
| </body> | ||||
| </html> | ||||
							
								
								
									
										1172
									
								
								ruoyi-quartz/src/main/resources/templates/monitor/job/cron.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1172
									
								
								ruoyi-quartz/src/main/resources/templates/monitor/job/cron.html
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -0,0 +1,99 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="zh" xmlns:th="http://www.thymeleaf.org" > | ||||
| <head> | ||||
| 	<th:block th:include="include :: header('定时任务详细')" /> | ||||
| </head> | ||||
| <body class="white-bg"> | ||||
| 	<div class="wrapper wrapper-content animated fadeInRight ibox-content"> | ||||
| 	 | ||||
| 	<form class="form-horizontal m-t" id="jobLogForm" th:if="${name == 'jobLog'}"> | ||||
| 	    <div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">日志序号:</label> | ||||
| 			<div class="form-control-static" th:text="${jobLog.jobLogId}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">任务名称:</label> | ||||
| 			<div class="form-control-static" th:text="${jobLog.jobName}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">任务分组:</label> | ||||
| 			<div class="form-control-static" th:text="${@dict.getLabel('sys_job_group', jobLog.jobGroup)}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">调用目标字符串:</label> | ||||
| 			<div class="form-control-static" th:text="${jobLog.invokeTarget}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">日志信息:</label> | ||||
| 			<div class="form-control-static" th:text="${jobLog.jobMessage}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">执行状态:</label> | ||||
| 			<div class="form-control-static" th:class="${jobLog.status == '0' ? 'label label-primary' : 'label label-danger'}" th:text="${jobLog.status == '0' ? '正常' : '失败'}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group" th:style="'display:' + ${jobLog.status == '0' ? 'none' : 'block'}"> | ||||
| 			<label class="col-sm-3 control-label">异常信息:</label> | ||||
| 			<div class="form-control-static" th:text="${jobLog.exceptionInfo}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</form> | ||||
| 	 | ||||
| 	<form class="form-horizontal m-t" id="jobForm" th:if="${name == 'job'}"> | ||||
| 	    <div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">任务序号:</label> | ||||
| 			<div class="form-control-static" th:text="${job.jobId}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">任务名称:</label> | ||||
| 			<div class="form-control-static" th:text="${job.jobName}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">任务分组:</label> | ||||
| 			<div class="form-control-static" th:text="${job.jobGroup}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">调用目标字符串:</label> | ||||
| 			<div class="form-control-static" th:text="${job.invokeTarget}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">执行表达式:</label> | ||||
| 			<div class="form-control-static" th:text="${job.cronExpression}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">下次执行时间:</label> | ||||
| 			<div class="form-control-static" th:text="${#dates.format(job.nextValidTime, 'yyyy-MM-dd HH:mm:ss')}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">执行策略:</label> | ||||
| 			<div class="form-control-static" th:if="${job.misfirePolicy == '0'}">默认策略</div> | ||||
| 			<div class="form-control-static" th:if="${job.misfirePolicy == '1'}">立即执行</div> | ||||
| 			<div class="form-control-static" th:if="${job.misfirePolicy == '2'}">执行一次</div> | ||||
| 			<div class="form-control-static" th:if="${job.misfirePolicy == '3'}">放弃执行</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">并发执行:</label> | ||||
| 			<div class="form-control-static" th:class="${job.concurrent == '0' ? 'label label-primary' : 'label label-danger'}" th:text="${job.concurrent == '0' ? '允许' : '禁止'}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="form-group"> | ||||
| 			<label class="col-sm-3 control-label">执行状态:</label> | ||||
| 			<div class="form-control-static" th:class="${job.status == '0' ? 'label label-primary' : 'label label-danger'}" th:text="${job.status == '0' ? '正常' : '暂停'}"> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</form> | ||||
| 	 | ||||
|     </div> | ||||
| </body> | ||||
| </html> | ||||
							
								
								
									
										111
									
								
								ruoyi-quartz/src/main/resources/templates/monitor/job/edit.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								ruoyi-quartz/src/main/resources/templates/monitor/job/edit.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,111 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="zh" xmlns:th="http://www.thymeleaf.org" > | ||||
| <head> | ||||
| 	<th:block th:include="include :: header('修改定时任务')" /> | ||||
| </head> | ||||
| <body class="white-bg"> | ||||
| 	<div class="wrapper wrapper-content animated fadeInRight ibox-content"> | ||||
| 		<form class="form-horizontal m" id="form-job-edit" th:object="${job}"> | ||||
| 			<input id="jobId" name="jobId" type="hidden" th:field="*{jobId}"/> | ||||
| 			<input type="hidden" name="updateBy" th:value="${@permission.getPrincipalProperty('loginName')}"> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label is-required">任务名称:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<input class="form-control" type="text" name="jobName" id="jobName" th:field="*{jobName}" required> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label">任务分组:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<select name="jobGroup" class="form-control m-b" th:with="type=${@dict.getType('sys_job_group')}"> | ||||
| 		                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{jobGroup}"></option> | ||||
| 		            </select> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label is-required">调用目标字符串:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<input class="form-control" type="text" name="invokeTarget" id="invokeTarget" th:field="*{invokeTarget}" required> | ||||
| 				    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> Bean调用示例:ryTask.ryParams('ry')</span> | ||||
| 				    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> Class类调用示例:com.ruoyi.quartz.task.RyTask.ryParams('ry')</span> | ||||
| 				    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 参数说明:支持字符串,布尔类型,长整型,浮点型,整型</span> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label is-required">cron表达式:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<input class="form-control" type="text" name="cronExpression" id="cronExpression" th:field="*{cronExpression}" required> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label">执行策略:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="1" /> 立即执行 </label>  | ||||
| 					<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="2" /> 执行一次 </label>  | ||||
| 					<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="3" /> 放弃执行 </label> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label">并发执行:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<label class="radio-box"> <input type="radio" th:field="*{concurrent}" name="concurrent" value="0"/> 允许 </label>  | ||||
| 					<label class="radio-box"> <input type="radio" th:field="*{concurrent}" name="concurrent" value="1"/> 禁止 </label>  | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label">状态:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<div class="radio-box" th:each="dict : ${@dict.getType('sys_job_status')}"> | ||||
| 						<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}"> | ||||
| 						<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 			<div class="form-group"> | ||||
| 				<label class="col-sm-3 control-label">备注:</label> | ||||
| 				<div class="col-sm-8"> | ||||
| 					<textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</form> | ||||
| 	</div> | ||||
| 	<th:block th:include="include :: footer" /> | ||||
| 	<script type="text/javascript"> | ||||
| 		var prefix = ctx + "monitor/job"; | ||||
| 	 | ||||
| 		$("#form-job-edit").validate({ | ||||
| 			onkeyup: false, | ||||
| 			rules:{ | ||||
| 				cronExpression:{ | ||||
| 					required:true, | ||||
| 					remote: { | ||||
| 	                    url: prefix + "/checkCronExpressionIsValid", | ||||
| 	                    type: "post", | ||||
| 	                    dataType: "json", | ||||
| 	                    data: { | ||||
| 	                        "cronExpression": function() { | ||||
| 	                            return $.common.trim($("#cronExpression").val()); | ||||
| 	                        } | ||||
| 	                    }, | ||||
| 	                    dataFilter: function(data, type) { | ||||
| 	                    	return data; | ||||
| 	                    } | ||||
| 	                } | ||||
| 				}, | ||||
| 			}, | ||||
| 			messages: { | ||||
| 	            "cronExpression": { | ||||
| 	                remote: "表达式不正确" | ||||
| 	            } | ||||
| 	        }, | ||||
| 	        focusCleanup: true | ||||
| 		}); | ||||
| 		 | ||||
| 		function submitHandler() { | ||||
| 	        if ($.validate.form()) { | ||||
| 	        	$.operate.save(prefix + "/edit", $('#form-job-edit').serialize()); | ||||
| 	        } | ||||
| 	    } | ||||
| 	</script> | ||||
| </body> | ||||
| </html> | ||||
							
								
								
									
										198
									
								
								ruoyi-quartz/src/main/resources/templates/monitor/job/job.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										198
									
								
								ruoyi-quartz/src/main/resources/templates/monitor/job/job.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,198 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | ||||
| <head> | ||||
| 	<th:block th:include="include :: header('定时任务列表')" /> | ||||
| </head> | ||||
| <body class="gray-bg"> | ||||
| 	<div class="container-div"> | ||||
| 		<div class="row"> | ||||
| 			<div class="col-sm-12 search-collapse"> | ||||
| 				<form id="job-form"> | ||||
| 					<div class="select-list"> | ||||
| 						<ul> | ||||
| 							<li> | ||||
| 								任务名称:<input type="text" name="jobName"/> | ||||
| 							</li> | ||||
| 							<li> | ||||
| 								任务分组:<select name="jobGroup" th:with="type=${@dict.getType('sys_job_group')}"> | ||||
| 									<option value="">所有</option> | ||||
| 									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> | ||||
| 								</select> | ||||
| 							</li> | ||||
| 							<li> | ||||
| 								任务状态:<select name="status" th:with="type=${@dict.getType('sys_job_status')}"> | ||||
| 									<option value="">所有</option> | ||||
| 									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> | ||||
| 								</select> | ||||
| 							</li> | ||||
| 							<li> | ||||
| 								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> | ||||
| 								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> | ||||
| 							</li> | ||||
| 						</ul> | ||||
| 					</div> | ||||
| 				</form> | ||||
| 			</div> | ||||
| 			 | ||||
| 			<div class="btn-group-sm" id="toolbar" role="group"> | ||||
| 				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="monitor:job:add"> | ||||
| 	                <i class="fa fa-plus"></i> 新增 | ||||
| 	            </a> | ||||
| 	            <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="monitor:job:edit"> | ||||
| 		            <i class="fa fa-edit"></i> 修改 | ||||
| 		        </a> | ||||
| 				<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove"> | ||||
| 		            <i class="fa fa-remove"></i> 删除 | ||||
| 		        </a> | ||||
| 		         <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export"> | ||||
| 		            <i class="fa fa-download"></i> 导出 | ||||
| 		        </a> | ||||
| 		        <a class="btn btn-primary" onclick="javascript:cron()"> | ||||
| 		            <i class="fa fa-code"></i> 生成表达式 | ||||
| 		        </a> | ||||
| 		        <a class="btn btn-info" onclick="javascript:jobLog()" shiro:hasPermission="monitor:job:detail"> | ||||
| 		            <i class="fa fa-list"></i> 日志 | ||||
| 		        </a> | ||||
| 	        </div> | ||||
|          | ||||
| 	        <div class="col-sm-12 select-table table-striped"> | ||||
| 			    <table id="bootstrap-table"></table> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</div> | ||||
| 	<th:block th:include="include :: footer" /> | ||||
| 	<script th:inline="javascript"> | ||||
|         var detailFlag = [[${@permission.hasPermi('monitor:job:detail')}]]; | ||||
| 		var editFlag = [[${@permission.hasPermi('monitor:job:edit')}]]; | ||||
| 		var removeFlag = [[${@permission.hasPermi('monitor:job:remove')}]]; | ||||
| 		var statusFlag = [[${@permission.hasPermi('monitor:job:changeStatus')}]]; | ||||
| 		var datas = [[${@dict.getType('sys_job_group')}]]; | ||||
| 		var prefix = ctx + "monitor/job"; | ||||
|  | ||||
| 		$(function() { | ||||
| 		    var options = { | ||||
| 		        url: prefix + "/list", | ||||
| 		        detailUrl: prefix + "/detail/{id}", | ||||
| 		        createUrl: prefix + "/add", | ||||
| 		        updateUrl: prefix + "/edit/{id}", | ||||
| 		        removeUrl: prefix + "/remove", | ||||
| 		        exportUrl: prefix + "/export", | ||||
| 		        sortName: "createTime", | ||||
| 		        sortOrder: "desc", | ||||
| 		        modalName: "任务", | ||||
| 		        columns: [{ | ||||
| 		            checkbox: true | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'jobId', | ||||
| 		            title: '任务编号' | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'jobName', | ||||
| 		            title: '任务名称', | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'jobGroup', | ||||
| 		            title: '任务分组', | ||||
| 		            formatter: function(value, row, index) { | ||||
| 		            	return $.table.selectDictLabel(datas, value); | ||||
| 		            } | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'invokeTarget', | ||||
| 		            title: '调用目标字符串', | ||||
| 		            formatter: function(value, row, index) { | ||||
|                     	return $.table.tooltip(value); | ||||
|                     } | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'cronExpression', | ||||
| 		            title: '执行表达式' | ||||
| 		        }, | ||||
| 		        { | ||||
| 		        	visible: statusFlag == 'hidden' ? false : true, | ||||
| 		        	title: '任务状态', | ||||
| 		        	align: 'center', | ||||
| 		        	formatter: function (value, row, index) { | ||||
| 		        		return statusTools(row); | ||||
| 		        	} | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'createTime', | ||||
| 		            title: '创建时间', | ||||
| 		            sortable: true | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            title: '操作', | ||||
| 		            align: 'center', | ||||
| 		            formatter: function(value, row, index) { | ||||
| 		                var actions = []; | ||||
| 		                actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.jobId + '\')"><i class="fa fa-edit"></i>编辑</a> '); | ||||
| 		                actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.jobId + '\')"><i class="fa fa-remove"></i>删除</a> '); | ||||
| 		                var more = []; | ||||
| 		                more.push("<a class='btn btn-default btn-xs " + statusFlag + "' href='javascript:void(0)' onclick='run(" + row.jobId + ")'><i class='fa fa-play-circle-o'></i> 执行一次</a> "); | ||||
| 		                more.push("<a class='btn btn-default btn-xs " + detailFlag + "' href='javascript:void(0)' onclick='$.operate.detail(" + row.jobId + ")'><i class='fa fa-search'></i>任务详细</a> "); | ||||
| 		                more.push("<a class='btn btn-default btn-xs " + detailFlag + "' href='javascript:void(0)' onclick='jobLog(" + row.jobId + ")'><i class='fa fa-list'></i>调度日志</a>"); | ||||
| 		                actions.push('<a class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>更多操作</a>'); | ||||
| 		                return actions.join(''); | ||||
| 		            } | ||||
| 		        }] | ||||
| 		    }; | ||||
| 		    $.table.init(options); | ||||
| 		}); | ||||
|          | ||||
| 		/* 调度任务状态显示 */ | ||||
| 		function statusTools(row) { | ||||
| 		    if (row.status == 1) { | ||||
|     			return '<i class=\"fa fa-toggle-off text-info fa-2x\" onclick="start(\'' + row.jobId + '\', \'' + row.jobGroup + '\')"></i> '; | ||||
|     		} else { | ||||
|     			return '<i class=\"fa fa-toggle-on text-info fa-2x\" onclick="stop(\'' + row.jobId + '\', \'' + row.jobGroup + '\')"></i> '; | ||||
|     		} | ||||
| 		} | ||||
| 		 | ||||
| 		/* 立即执行一次 */ | ||||
| 		function run(jobId) { | ||||
| 			$.modal.confirm("确认要立即执行一次任务吗?", function() { | ||||
| 				$.operate.post(prefix + "/run", { "jobId": jobId}); | ||||
| 		    }) | ||||
| 		} | ||||
|  | ||||
| 		/* 调度任务-停用 */ | ||||
| 		function stop(jobId, jobGroup) { | ||||
| 			$.modal.confirm("确认要停用任务吗?", function() { | ||||
| 				$.operate.post(prefix + "/changeStatus", { "jobId": jobId, "jobGroup": jobGroup, "status": 1 }); | ||||
| 		    }) | ||||
| 		} | ||||
|  | ||||
| 		/* 调度任务-启用 */ | ||||
| 		function start(jobId, jobGroup) { | ||||
| 			$.modal.confirm("确认要启用任务吗?", function() { | ||||
| 				$.operate.post(prefix + "/changeStatus", { "jobId": jobId, "jobGroup": jobGroup, "status": 0 }); | ||||
| 		    }) | ||||
| 		} | ||||
|  | ||||
| 		/* 调度日志查询 */ | ||||
| 		function jobLog(jobId) { | ||||
| 		    var url = ctx + 'monitor/jobLog'; | ||||
| 		    if ($.common.isNotEmpty(jobId)) { | ||||
| 		        url += '?jobId=' + jobId; | ||||
| 		    } | ||||
| 		    $.modal.openTab("调度日志", url); | ||||
| 		} | ||||
| 		 | ||||
| 		/* cron表达式生成 */ | ||||
| 		function cron() { | ||||
| 		    var url = prefix + '/cron'; | ||||
|             var height = $(window).height() - 50; | ||||
|             top.layer.open({ | ||||
|                 maxmin: true, | ||||
|                 title: "Cron表达式生成器", | ||||
|                 type: 2, | ||||
|                 area: ['800px', height + "px" ], //宽高 | ||||
|                 shadeClose: true, | ||||
|                 content: url | ||||
|             }); | ||||
| 		} | ||||
| 	</script> | ||||
| </body> | ||||
| </html> | ||||
| @ -0,0 +1,138 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | ||||
| <head> | ||||
| 	<th:block th:include="include :: header('定时任务日志列表')" /> | ||||
| </head> | ||||
| <body class="gray-bg"> | ||||
|  | ||||
| 	<div class="container-div"> | ||||
| 		<div class="row"> | ||||
| 			<div class="col-sm-12 search-collapse"> | ||||
| 				<form id="jobLog-form"> | ||||
| 					<div class="select-list"> | ||||
| 						<ul> | ||||
| 							<li> | ||||
| 								任务名称:<input type="text" name="jobName" th:value="${job!=null?job.jobName:''}"/> | ||||
| 							</li> | ||||
| 							<li> | ||||
| 								任务分组:<select name="jobGroup" th:with="type=${@dict.getType('sys_job_group')}"> | ||||
| 									<option value="">所有</option> | ||||
| 									<th:block th:if="${job==null}"><option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option></th:block> | ||||
| 									<th:block th:if="${job!=null}"><option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{job.jobGroup}"></option></th:block> | ||||
| 								</select> | ||||
| 							</li> | ||||
| 							<li> | ||||
| 								执行状态:<select name="status" th:with="type=${@dict.getType('sys_common_status')}"> | ||||
| 									<option value="">所有</option> | ||||
| 									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> | ||||
| 								</select> | ||||
| 							</li> | ||||
| 							<li class="select-time"> | ||||
| 								<label>执行时间: </label> | ||||
| 								<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/> | ||||
| 								<span>-</span> | ||||
| 								<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/> | ||||
| 							</li> | ||||
| 							<li> | ||||
| 								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> | ||||
| 								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> | ||||
| 							</li> | ||||
| 						</ul> | ||||
| 					</div> | ||||
| 				</form> | ||||
| 			</div> | ||||
| 			 | ||||
| 			<div class="btn-group-sm" id="toolbar" role="group"> | ||||
| 				 <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove"> | ||||
| 	                <i class="fa fa-remove"></i> 删除 | ||||
| 	            </a> | ||||
| 	            <a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:job:remove"> | ||||
| 	                <i class="fa fa-trash"></i> 清空 | ||||
| 	            </a> | ||||
| 	            <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export"> | ||||
| 		            <i class="fa fa-download"></i> 导出 | ||||
| 		        </a> | ||||
| 		        <a class="btn btn-danger" onclick="closeItem()"> | ||||
| 		            <i class="fa fa-reply-all"></i> 关闭 | ||||
| 		        </a> | ||||
| 	        </div> | ||||
| 	         | ||||
| 	        <div class="col-sm-12 select-table table-striped"> | ||||
| 			    <table id="bootstrap-table"></table> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</div> | ||||
| 	<th:block th:include="include :: footer" /> | ||||
| 	<script th:inline="javascript"> | ||||
| 		var detailFlag = [[${@permission.hasPermi('monitor:job:detail')}]]; | ||||
| 		var statusDatas = [[${@dict.getType('sys_common_status')}]]; | ||||
| 		var groupDatas = [[${@dict.getType('sys_job_group')}]]; | ||||
| 		var prefix = ctx + "monitor/jobLog"; | ||||
|  | ||||
| 		$(function() { | ||||
| 		    var options = { | ||||
| 		        url: prefix + "/list", | ||||
| 		        cleanUrl: prefix + "/clean", | ||||
| 		        detailUrl: prefix + "/detail/{id}", | ||||
| 		        removeUrl: prefix + "/remove", | ||||
| 		        exportUrl: prefix + "/export", | ||||
| 		        sortName: "createTime", | ||||
| 		        sortOrder: "desc", | ||||
| 		        modalName: "调度日志", | ||||
| 		        columns: [{ | ||||
| 		            checkbox: true | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'jobLogId', | ||||
| 		            title: '日志编号' | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'jobName', | ||||
| 		            title: '任务名称' | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'jobGroup', | ||||
| 		            title: '任务分组', | ||||
| 		            formatter: function(value, row, index) { | ||||
| 		            	return $.table.selectDictLabel(groupDatas, value); | ||||
| 		            } | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'invokeTarget', | ||||
| 		            title: '调用目标字符串', | ||||
| 		            formatter: function(value, row, index) { | ||||
|                     	return $.table.tooltip(value); | ||||
|                     } | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'jobMessage', | ||||
| 		            title: '日志信息' | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'status', | ||||
| 		            title: '状态', | ||||
| 		            align: 'center', | ||||
| 		            formatter: function(value, row, index) { | ||||
| 		            	return $.table.selectDictLabel(statusDatas, value); | ||||
| 		            } | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            field: 'createTime', | ||||
| 		            title: '创建时间', | ||||
| 		            sortable: true | ||||
| 		        }, | ||||
| 		        { | ||||
| 		            title: '操作', | ||||
| 		            align: 'center', | ||||
| 		            formatter: function(value, row, index) { | ||||
| 		                var actions = []; | ||||
| 		                actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.jobLogId + '\')"><i class="fa fa-search"></i>详细</a>'); | ||||
| 		                return actions.join(''); | ||||
| 		            } | ||||
| 		        }] | ||||
| 		    }; | ||||
| 		    $.table.init(options); | ||||
| 		}); | ||||
| 	</script> | ||||
| </body> | ||||
| </html> | ||||
		Reference in New Issue
	
	Block a user
	 19173159168
					19173159168