v1.5 beta版发布,详细查看发行版说明

This commit is contained in:
郑杰
2019-01-20 19:34:40 +08:00
parent 5bb9c0a156
commit 45655e2bec
37 changed files with 634 additions and 293 deletions

View File

@@ -28,15 +28,15 @@
</el-button>
<el-popover
v-if="checkPermission(['ADMIN','JOB_ALL','JOB_DELETE'])"
v-model="scope.row.delPopover"
:ref="scope.row.id"
placement="top"
width="200">
<p>确定停止并删除该任务吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.delPopover = false">取消</el-button>
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.$index, scope.row)">确定</el-button>
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
</div>
<el-button slot="reference" type="text" size="mini" @click="scope.row.delPopover = true">删除</el-button>
<el-button slot="reference" type="text" size="mini">删除</el-button>
</el-popover>
</template>
</el-table-column>
@@ -53,7 +53,7 @@
<script>
import checkPermission from '@/utils/permission'
import initData from '../../../mixins/initData'
import initData from '@/mixins/initData'
import { del, updateIsPause, execution } from '@/api/timing'
import { parseTime } from '@/utils/index'
import eHeader from './module/header'
@@ -106,11 +106,11 @@ export default {
console.log(err.response.data.message)
})
},
subDelete(index, row) {
subDelete(id) {
this.delLoading = true
del(row.id).then(res => {
del(id).then(res => {
this.delLoading = false
row.delPopover = false
this.$refs[id].doClose()
this.init()
this.$notify({
title: '删除成功',
@@ -119,7 +119,7 @@ export default {
})
}).catch(err => {
this.delLoading = false
row.delPopover = false
this.$refs[id].doClose()
console.log(err.response.data.message)
})
}

View File

@@ -15,7 +15,11 @@
<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 prop="createTime" label="异常详情" width="90px">
<template slot-scope="scope">
<el-button v-show="scope.row.exceptionDetail" size="mini" type="text" @click="info(scope.row.exceptionDetail)">查看详情</el-button>
</template>
</el-table-column>
<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">
@@ -29,6 +33,11 @@
</template>
</el-table-column>
</el-table>
<el-dialog :visible.sync="errorDialog" append-to-body style="margin-left: 100px" title="异常详情" width="85%">
<span>
{{ errorInfo }}
</span>
</el-dialog>
<!--分页组件-->
<el-pagination
:total="total"
@@ -42,12 +51,13 @@
<script>
import checkPermission from '@/utils/permission'
import initData from '../../../../mixins/initData'
import initData from '@/mixins/initData'
import { parseTime } from '@/utils/index'
export default {
mixins: [initData],
data() {
return {
errorInfo: '', errorDialog: false,
dialog: false, delLoading: false, sup_this: this,
enabledTypeOptions: [
{ key: 'true', display_name: '成功' },
@@ -78,6 +88,10 @@ export default {
if (value) { this.params['jobName'] = value }
if (isSuccess !== '' && isSuccess !== null) { this.params['isSuccess'] = isSuccess }
return true
},
info(errorInfo) {
this.errorInfo = errorInfo
this.errorDialog = true
}
}
}