v1.4 版本发布,修复bug、优化细节、新增定时任务管理,详细信息查看发行版说明

This commit is contained in:
郑杰
2019-01-08 17:01:08 +08:00
parent ff0c36b5d4
commit 7afe6a2129
25 changed files with 522 additions and 8435 deletions

View File

@@ -0,0 +1,83 @@
<template>
<el-dialog :append-to-body="true" :visible.sync="dialog" style="margin-left: 50px;" title="执行日志" width="1040px">
<!-- 搜索 -->
<div class="head-container">
<el-input v-model="query.value" clearable placeholder="输入任务名称搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
<el-select v-model="query.isSuccess" placeholder="日志状态" clearable class="filter-item" style="width: 110px" @change="toQuery">
<el-option v-for="item in enabledTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
</el-select>
<el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button>
</div>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;margin-top: -10px;">
<el-table-column :show-overflow-tooltip="true" prop="jobName" width="90px" label="任务名称"/>
<el-table-column :show-overflow-tooltip="true" prop="beanName" width="90px" label="Bean名称"/>
<el-table-column :show-overflow-tooltip="true" prop="methodName" width="80px" label="执行方法"/>
<el-table-column :show-overflow-tooltip="true" prop="params" width="80px" label="参数"/>
<el-table-column :show-overflow-tooltip="true" prop="cronExpression" width="100px" label="cron表达式"/>
<el-table-column :show-overflow-tooltip="true" prop="exceptionDetail" width="90px" label="异常详情"/>
<el-table-column :show-overflow-tooltip="true" align="center" prop="time" width="100px" label="耗时(毫秒)"/>
<el-table-column align="center" prop="isSuccess" width="80px" label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.isSuccess ? 'success' : 'danger'">{{ scope.row.isSuccess ? '成功' : '失败' }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="remark" width="120px" label="描述"/>
<el-table-column :show-overflow-tooltip="true" prop="createTime" label="创建日期">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total="total"
style="margin-top:8px;"
layout="total, prev, pager, next"
@size-change="sizeChange"
@current-change="pageChange"/>
</el-dialog>
</template>
<script>
import checkPermission from '@/utils/permission'
import initData from '../../../../mixins/initData'
import { parseTime } from '@/utils/index'
export default {
mixins: [initData],
data() {
return {
dialog: false, delLoading: false, sup_this: this,
enabledTypeOptions: [
{ key: 'true', display_name: '成功' },
{ key: 'false', display_name: '失败' }
]
}
},
methods: {
parseTime,
checkPermission,
doInit() {
this.$nextTick(() => {
this.init()
})
},
toQuery() {
this.page = 0
this.doInit()
},
beforeInit() {
this.url = 'api/jobLogs'
const sort = 'id,desc'
const query = this.query
const value = query.value
const isSuccess = query.isSuccess
this.size = 6
this.params = { page: this.page, size: this.size, sort: sort }
if (value) { this.params['jobName'] = value }
if (isSuccess !== '' && isSuccess !== null) { this.params['isSuccess'] = isSuccess }
return true
}
}
}
</script>