提交 | 用户 | 时间
|
850106
|
1 |
<template> |
H |
2 |
<el-dialog :visible.sync="visible" :title="$t('schedule.log')" :close-on-click-modal="false" :close-on-press-escape="false" width="75%"> |
|
3 |
<el-form :inline="true" :model="dataForm" ref="dataForm" @keyup.enter.native="getDataList()"> |
|
4 |
<el-form-item prop="startTime"> |
|
5 |
<el-date-picker |
|
6 |
v-model="dataForm.startTime" |
|
7 |
type="datetime" |
|
8 |
value-format="yyyy-MM-dd HH:mm:ss" |
|
9 |
placeholder="选择日期时间"> |
|
10 |
</el-date-picker> |
|
11 |
</el-form-item> |
|
12 |
<el-form-item prop="endTime"> |
|
13 |
<el-date-picker |
|
14 |
v-model="dataForm.endTime" |
|
15 |
type="datetime" |
|
16 |
value-format="yyyy-MM-dd HH:mm:ss" |
|
17 |
placeholder="选择日期时间"> |
|
18 |
</el-date-picker> |
|
19 |
</el-form-item> |
|
20 |
<el-form-item> |
|
21 |
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
|
22 |
</el-form-item> |
|
23 |
</el-form> |
|
24 |
<el-table |
|
25 |
v-loading="dataListLoading" |
|
26 |
:data="dataList" |
|
27 |
border |
|
28 |
@sort-change="dataListSortChangeHandle" |
|
29 |
height="460" |
|
30 |
style="width: 100%;"> |
|
31 |
<el-table-column prop="runTime" :label="$t('runLog.runTime')" header-align="center" align="center" width="180"></el-table-column> |
|
32 |
<el-table-column prop="runType" :label="$t('runLog.runType')" header-align="center" align="center" width="180"></el-table-column> |
|
33 |
<el-table-column prop="runResult" :label="$t('runLog.runResult')" header-align="center" align="center"></el-table-column> |
|
34 |
</el-table> |
|
35 |
<el-pagination |
|
36 |
:current-page="page" |
|
37 |
:page-sizes="[10, 20, 50, 100]" |
|
38 |
:page-size="limit" |
|
39 |
:total="total" |
|
40 |
layout="total, sizes, prev, pager, next, jumper" |
|
41 |
@size-change="pageSizeChangeHandle" |
|
42 |
@current-change="pageCurrentChangeHandle"> |
|
43 |
</el-pagination> |
|
44 |
</el-dialog> |
|
45 |
</template> |
|
46 |
|
|
47 |
<script> |
|
48 |
import mixinViewModule from '@/mixins/view-module' |
|
49 |
export default { |
|
50 |
mixins: [mixinViewModule], |
|
51 |
data () { |
|
52 |
return { |
|
53 |
visible: false, |
|
54 |
mixinViewModuleOptions: { |
|
55 |
getDataListURL: '/mcs/runlog/page', |
|
56 |
getDataListIsPage: true |
|
57 |
}, |
|
58 |
dataForm: { |
|
59 |
modelId: '0', |
|
60 |
startTime: '', |
|
61 |
endTime: '' |
|
62 |
} |
|
63 |
} |
|
64 |
}, |
|
65 |
methods: { |
|
66 |
init (modelId) { |
|
67 |
this.visible = true |
|
68 |
this.dataForm.modelId = modelId |
|
69 |
this.$nextTick(() => { |
|
70 |
this.$refs['dataForm'].resetFields() |
|
71 |
this.getDataList() |
|
72 |
}) |
|
73 |
} |
|
74 |
} |
|
75 |
} |
|
76 |
</script> |