moreDialog.vue
3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<template>
<a-modal title="查看更多"
v-if='isVisible'
v-model:visible="isVisible"
width="1200px"
height='90%'
class="detail-modal">
<a-form :model="queryForm" layout="inline" :label-col="{ style: { width: '80px' } }">
<a-form-item label="前" style="padding: 5px 0">
<a-input-number v-model:value="queryForm.content_front" placeholder="请输入" style="width: 180px" :min="1" :max="20" /> 行
</a-form-item>
<a-form-item label="后" style="padding: 5px 0">
<a-input-number v-model:value="queryForm.content_after" placeholder="请输入" style="width: 180px" :min="1" :max="20" /> 行
</a-form-item>
<a-form-item style="padding: 5px 0">
<a-button type="primary" @click="confirmSearch" :loading="isLoading">查询</a-button>
</a-form-item>
</a-form>
<a-table :dataSource="dataList" v-loading="isLoading" :columns="columns" :pagination="false">
</a-table>
</a-modal>
</template>
<script>
import {reactive, ref, toRaw} from 'vue'
import moment from 'moment'
import SystemLogApi from '@/views/SystemLog/SystemLog.js'
import {isArray} from '@/PublicUtil/Judgment'
import {filterEmptyValueInObject, formatDate, formatTime} from '@/PublicUtil/PublicUtil'
import {PlusOutlined} from '@ant-design/icons-vue'
const columns = [
{
title: '序号',
dataIndex: 'index',
align: 'center',
width: 100
},
{
title: 'apptype',
dataIndex: 'apptype',
align: 'center',
width: 120
},
{
title: '服务名称',
dataIndex: 'appname',
align: 'center',
width: 120
},
{
title: '服务等级',
dataIndex: 'level',
align: 'center',
width: 120
},
{
title: '时间',
dataIndex: 'time',
align: 'center',
},
{
title: '线程号',
dataIndex: 'thread',
align: 'center',
},
{
title: '日志位置',
dataIndex: 'location',
align: 'center',
},
{
title: '日志内容',
dataIndex: 'content',
align: 'center',
},
{
title: '日志标识',
dataIndex: 'id',
align: 'center',
}
]
export default {
components: {
PlusOutlined,
VNodes: (_, {attrs}) => {
return attrs.vnodes
},
},
setup() {
// scalar
const isLoading = ref(false)
const isSuspended = ref(false)
// sequence
const dataList = ref([])
const isVisible = ref(false)
const queryForm = reactive(
{
apptype:'store',
appname: 'process',
level: 'info',
content_like: '',
date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),
startTime: moment('00:00:00', 'HH:mm:ss'),
endTime: moment('23:59:59', 'HH:mm:ss'),
content_front:10,
content_after:10,
}
)
const confirmSearch = function(){
isLoading.value = true
// SystemLogApi.getLogLimits(data).then(
// (r) => {
// isLoading.value = false
// r.forEach((item,index)=>{
// item.index = index+1
// })
// dataList.value = r
// }
// )
}
const initDialog = function() {
// confirmSearch()
isVisible.value = true;
}
return {
// scalar
isLoading,
isVisible,
// sequence
dataList,
queryForm,
columns,
// function
confirmSearch,
initDialog
}
}
}
</script>
<style lang="less" scoped>
.success {
color: #26ff29;
}
.failed {
color: red;
}
</style>