1、增加报警状态
2、调度日志增加调度筛选
This commit is contained in:
@@ -34,3 +34,10 @@ export function updateJobInfo(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function jobList() {
|
||||||
|
return request({
|
||||||
|
url: '/job-info/findList',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,50 +1,49 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container calendar-list-container">
|
<div class="app-container calendar-list-container">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
|
<el-select v-model="listQuery.jobId" placeholder="请选择" clearable>
|
||||||
|
<el-option v-for="item in jobList" :key="item.id" :label="item.desc" :value="item.id"/>
|
||||||
|
</el-select>
|
||||||
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">{{$t('table.search')}}</el-button>
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">{{$t('table.search')}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table :key='tableKey' :data="list" v-loading="listLoading" element-loading-text="给我一点时间" border fit highlight-current-row style="width: 100%">
|
<el-table :key='tableKey' :data="list" v-loading="listLoading" element-loading-text="给我一点时间" border fit highlight-current-row style="width: 100%">
|
||||||
<el-table-column align="center" :label="$t('table.id')" width="100">
|
<el-table-column type="index" width="100" :label="$t('table.id')"></el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column align="center" :label="$t('table.handler')" min-width="200">
|
||||||
<span>{{scope.row.id}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" :label="$t('table.handler')" width="200">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{scope.row.handler}}</span>
|
<span>{{scope.row.handler}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" :label="$t('table.jobParam')" width="200">
|
<el-table-column align="center" :label="$t('table.jobParam')" min-width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{scope.row.param}}</span>
|
<span>{{scope.row.param}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" :label="$t('table.jobLogCode')" width="120">
|
<el-table-column align="center" :label="$t('table.jobLogCode')" min-width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag :type="scope.row.code | statusFilter">{{scope.row.code | statusName}}</el-tag>
|
<el-tag :type="scope.row.code | statusFilter">{{scope.row.code | statusName}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" :label="$t('table.jobLogMsg')" width="400">
|
<el-table-column align="center" :label="$t('table.jobLogMsg')" min-width="400">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{scope.row.msg}}</span>
|
<span>{{scope.row.msg}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" :label="$t('table.alarmStatus')" width="120">
|
<el-table-column align="center" :label="$t('table.alarmStatus')" min-width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{scope.row.alarmStatus}}</span>
|
<el-tag :type="scope.row.alarmStatus | alarmStatusFilter">{{scope.row.alarmStatus | salarmStatusName}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" :label="$t('table.createTime')" width="150">
|
<el-table-column align="center" :label="$t('table.createTime')" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{scope.row.createTime | parseTime('{y}-{m}-{d} {h}:{i}')}}</span>
|
<span>{{scope.row.createTime | parseTime('{y}-{m}-{d} {h}:{i}')}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" :label="$t('table.actions')" min-width="120">
|
<!-- <el-table-column align="center" :label="$t('table.actions')" min-width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="primary" @click="handleShowClick(scope.row)">查看日志</el-button>
|
<el-button size="mini" type="primary" @click="handleShowClick(scope.row)">查看日志</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="pagination-container">
|
<div class="pagination-container">
|
||||||
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="listQuery.currentPage"
|
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="listQuery.currentPage"
|
||||||
@@ -56,6 +55,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fetchList } from '@/api/jobLog'
|
import { fetchList } from '@/api/jobLog'
|
||||||
|
import { jobList } from '@/api/jobInfo'
|
||||||
import waves from '@/directive/waves' // 水波纹指令
|
import waves from '@/directive/waves' // 水波纹指令
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -73,7 +73,8 @@ export default {
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
jobId: undefined
|
jobId: undefined
|
||||||
}
|
},
|
||||||
|
jobList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@@ -90,12 +91,32 @@ export default {
|
|||||||
1: 'danger'
|
1: 'danger'
|
||||||
}
|
}
|
||||||
return statusMap[status]
|
return statusMap[status]
|
||||||
|
},
|
||||||
|
salarmStatusName(status) {
|
||||||
|
const statusMap = {
|
||||||
|
0: '-',
|
||||||
|
1: '待发送',
|
||||||
|
2: '发送成功',
|
||||||
|
3: '发送失败'
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
|
},
|
||||||
|
alarmStatusFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
0: 'success',
|
||||||
|
1: 'warning',
|
||||||
|
2: 'success',
|
||||||
|
3: 'danger'
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.getJobList()
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
|
this.getJobList()
|
||||||
if (this.$route.query.jobId) {
|
if (this.$route.query.jobId) {
|
||||||
this.listQuery.jobId = this.$route.query.jobId
|
this.listQuery.jobId = this.$route.query.jobId
|
||||||
console.log(this.listQuery.jobId, this.$route.query.jobId)
|
console.log(this.listQuery.jobId, this.$route.query.jobId)
|
||||||
@@ -111,6 +132,11 @@ export default {
|
|||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getJobList() {
|
||||||
|
jobList().then(response => {
|
||||||
|
this.jobList = response.data.data
|
||||||
|
})
|
||||||
|
},
|
||||||
handleFilter() {
|
handleFilter() {
|
||||||
this.listQuery.currentPage = 1
|
this.listQuery.currentPage = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|||||||
@@ -5,11 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table :key='tableKey' :data="list" v-loading="listLoading" element-loading-text="给我一点时间" border fit highlight-current-row style="width: 100%">
|
<el-table :key='tableKey' :data="list" v-loading="listLoading" element-loading-text="给我一点时间" border fit highlight-current-row style="width: 100%">
|
||||||
<el-table-column align="center" :label="$t('table.id')" width="100">
|
<el-table-column type="index" width="100" :label="$t('table.id')"></el-table-column>
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{scope.row.id}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" :label="$t('table.desc')" width="200">
|
<el-table-column align="center" :label="$t('table.desc')" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{scope.row.desc}}</span>
|
<span>{{scope.row.desc}}</span>
|
||||||
|
|||||||
+1
@@ -32,6 +32,7 @@ import lombok.Getter;
|
|||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum AlarmStatusEnum {
|
public enum AlarmStatusEnum {
|
||||||
|
NOT(0, "-"),
|
||||||
WAIT(1, "待发送"),
|
WAIT(1, "待发送"),
|
||||||
SUCCESS(2, "发送成功"),
|
SUCCESS(2, "发送成功"),
|
||||||
ERROR(3, "发送失败");
|
ERROR(3, "发送失败");
|
||||||
|
|||||||
+1
-1
@@ -77,7 +77,7 @@ public class JobLogService implements IJobCallback {
|
|||||||
public Page<JobLogListRes> page(PageQuery pageQuery, JobLogListReq req) {
|
public Page<JobLogListRes> page(PageQuery pageQuery, JobLogListReq req) {
|
||||||
Page<JobLogListRes> page = Page.create(pageQuery);
|
Page<JobLogListRes> page = Page.create(pageQuery);
|
||||||
|
|
||||||
if(req.getJobId() != null){
|
if(req.getJobId() != null && req.getJobId() > 0){
|
||||||
jobLogMapper.pageByJobId(page, req);
|
jobLogMapper.pageByJobId(page, req);
|
||||||
} else {
|
} else {
|
||||||
jobLogMapper.page(page, req);
|
jobLogMapper.page(page, req);
|
||||||
|
|||||||
Reference in New Issue
Block a user