Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
罗鑫霖
/
vion-tools
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a6c479ee
authored
Jul 23, 2025
by
陈岩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 修复系统日志
1 parent
6578b62b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
213 additions
and
213 deletions
src/views/SystemLog/index.vue
src/views/SystemLog/index.vue
View file @
a6c479e
...
@@ -179,217 +179,217 @@
...
@@ -179,217 +179,217 @@
<!-- <!– <moreDialog ref='moreDialogRef'></moreDialog> –>-->
<!-- <!– <moreDialog ref='moreDialogRef'></moreDialog> –>-->
<!--</template>-->
<!--</template>-->
<
!--<script>--
>
<
script
lang=
"jsx"
>
<!--import {reactive, ref, toRaw} from 'vue'-->
import
{
reactive
,
ref
,
toRaw
}
from
'vue'
<!--import moment from 'moment'-->
import
moment
from
'moment'
<!--import SystemLogApi from '@/views/SystemLog/SystemLog.js'-->
import
SystemLogApi
from
'@/views/SystemLog/SystemLog.js'
<!--import {isArray} from '@/PublicUtil/Judgment'-->
import
{
isArray
}
from
'@/PublicUtil/Judgment'
<!--import {filterEmptyValueInObject, formatDate, formatTime} from '@/PublicUtil/PublicUtil'-->
import
{
filterEmptyValueInObject
,
formatDate
,
formatTime
}
from
'@/PublicUtil/PublicUtil'
<!--import {PlusOutlined} from '@ant-design/icons-vue'-->
import
{
PlusOutlined
}
from
'@ant-design/icons-vue'
<!--import moreDialog from './moreDialog.vue'-->
import
moreDialog
from
'./moreDialog.vue'
<!--export default {-->
export
default
{
<!-- components: {-->
components
:
{
<!-- PlusOutlined,-->
PlusOutlined
,
<!-- VNodes: (_, {attrs}) => {-->
VNodes
:
(
_
,
{
attrs
})
=>
{
<!-- return attrs.vnodes-->
return
attrs
.
vnodes
<!-- },-->
},
<!-- moreDialog-->
moreDialog
<!-- },-->
},
<!-- setup() {-->
setup
()
{
<!-- const columns = ref([-->
const
columns
=
ref
([
<!-- {-->
{
<!-- title: '时间',-->
title
:
'时间'
,
<!-- dataIndex: 'time',-->
dataIndex
:
'time'
,
<!-- align: 'center',-->
align
:
'center'
,
<!-- width: 220-->
width
:
220
<!-- },-->
},
<!-- {-->
{
<!-- title: '线程号',-->
title
:
'线程号'
,
<!-- dataIndex: 'thread',-->
dataIndex
:
'thread'
,
<!-- align: 'center',-->
align
:
'center'
,
<!-- width: 120-->
width
:
120
<!-- },-->
},
<!-- {-->
{
<!-- title: '日志位置',-->
title
:
'日志位置'
,
<!-- dataIndex: 'location',-->
dataIndex
:
'location'
,
<!-- align: 'center',-->
align
:
'center'
,
<!-- width: 300-->
width
:
300
<!-- },-->
},
<!-- {-->
{
<!-- title: '日志内容',-->
title
:
'日志内容'
,
<!-- dataIndex: 'content',-->
dataIndex
:
'content'
,
<!-- align: 'center',-->
align
:
'center'
,
<!-- customRender:({text,record})=>{-->
customRender
:({
text
,
record
})
=>
{
<!-- const rawData = toRaw(queryForm)-->
const
rawData
=
toRaw
(
queryForm
)
<!-- if (rawData.content_like && rawData.content_like !== '') {-->
if
(
rawData
.
content_like
&&
rawData
.
content_like
!==
''
)
{
<!-- text = text.split(rawData.content_like).join("<span style='color:red;'>" + rawData.content_like + "</span>")-->
text
=
text
.
split
(
rawData
.
content_like
).
join
(
"<span style='color:red;'>"
+
rawData
.
content_like
+
"</span>"
)
<!-- // console.log(str)-->
// console.log(str)
<!-- // let pHtml = document.createElement("p");-->
// let pHtml = document.createElement("p");
<!-- return (<p v-html='str'>{text}</p>)-->
return
(
<
p
v
-
html
=
'str'
>
{
text
}
<
/p>
)
<!-- }else{-->
}
else
{
<!-- return text-->
return
text
<!-- }-->
}
<!-- }-->
}
<!-- },-->
},
<!-- // {-->
// {
<!-- // title: '日志标识',-->
// title: '日志标识',
<!-- // dataIndex: 'id',-->
// dataIndex: 'id',
<!-- // align: 'center',-->
// align: 'center',
<!-- // }-->
// }
<!-- ])-->
])
<!-- //ref-->
//ref
<!-- const moreDialogRef = ref()-->
const
moreDialogRef
=
ref
()
<!-- // scalar-->
// scalar
<!-- const isLoading = ref(false)-->
const
isLoading
=
ref
(
false
)
<!-- const isSuspended = ref(false)-->
const
isSuspended
=
ref
(
false
)
<!-- const pageNum = ref(1)-->
const
pageNum
=
ref
(
1
)
<!-- const pageSize = ref(20)-->
const
pageSize
=
ref
(
20
)
<!-- const total = ref()-->
const
total
=
ref
()
<!-- // sequence-->
// sequence
<!-- const dataList = ref([])-->
const
dataList
=
ref
([])
<!-- const apptypeList = ref([{-->
const
apptypeList
=
ref
([{
<!-- value: 'store',-->
value
:
'store'
,
<!-- label: 'store',-->
label
:
'store'
,
<!-- },{-->
},{
<!-- value: 'mall',-->
value
:
'mall'
,
<!-- label: 'mall',-->
label
:
'mall'
,
<!-- }])-->
}])
<!-- const appnameList = ref([{-->
const
appnameList
=
ref
([{
<!-- value: 'process',-->
value
:
'process'
,
<!-- label: 'process',-->
label
:
'process'
,
<!-- },{-->
},{
<!-- value: 'receive',-->
value
:
'receive'
,
<!-- label: 'receive',-->
label
:
'receive'
,
<!-- },{-->
},{
<!-- value: 'report',-->
value
:
'report'
,
<!-- label: 'report',-->
label
:
'report'
,
<!-- },{-->
},{
<!-- value: 'openapi',-->
value
:
'openapi'
,
<!-- label: 'openapi',-->
label
:
'openapi'
,
<!-- }])-->
}])
<!-- const levelList = ref([{-->
const
levelList
=
ref
([{
<!-- value: 'info',-->
value
:
'info'
,
<!-- label: 'info',-->
label
:
'info'
,
<!-- },{-->
},{
<!-- value: 'error',-->
value
:
'error'
,
<!-- label: 'error',-->
label
:
'error'
,
<!-- },{-->
},{
<!-- value: 'debug',-->
value
:
'debug'
,
<!-- label: 'debug',-->
label
:
'debug'
,
<!-- },{-->
},{
<!-- value: 'warn',-->
value
:
'warn'
,
<!-- label: 'warn',-->
label
:
'warn'
,
<!-- }])-->
}])
<!-- const queryForm = reactive(-->
const
queryForm
=
reactive
(
<!-- {-->
{
<!-- // apptype:'store',-->
// apptype:'store',
<!-- appname: 'process',-->
appname
:
'process'
,
<!-- levels: ['info','error','debug','warn'],-->
levels
:
[
'info'
,
'error'
,
'debug'
,
'warn'
],
<!-- content_like: '',-->
content_like
:
''
,
<!-- date: moment(moment().format('YYYY-MM-DD'), 'YYYY-MM-DD'),-->
date
:
moment
(
moment
().
format
(
'YYYY-MM-DD'
),
'YYYY-MM-DD'
),
<!-- startTime: moment('00:00:00', 'HH:mm:ss'),-->
startTime
:
moment
(
'00:00:00'
,
'HH:mm:ss'
),
<!-- endTime: moment('23:59:59', 'HH:mm:ss'),-->
endTime
:
moment
(
'23:59:59'
,
'HH:mm:ss'
),
<!-- }-->
}
<!-- )-->
)
<!-- const onPageNumChange = function(num) {-->
const
onPageNumChange
=
function
(
num
)
{
<!-- pageNum.value = num-->
pageNum
.
value
=
num
<!-- confirmSearch()-->
confirmSearch
()
<!-- }-->
}
<!-- -->
<!-- const onPageSizeChange = function(current, size) {-->
const
onPageSizeChange
=
function
(
current
,
size
)
{
<!-- pageNum.value = 1-->
pageNum
.
value
=
1
<!-- pageSize.value = size-->
pageSize
.
value
=
size
<!-- confirmSearch()-->
confirmSearch
()
<!-- }-->
}
<!-- const confirmSearch = function(val){-->
const
confirmSearch
=
function
(
val
){
<!-- isLoading.value = true-->
isLoading
.
value
=
true
<!-- const rawData = toRaw(queryForm)-->
const
rawData
=
toRaw
(
queryForm
)
<!-- pageNum.value = val?1:pageNum.value-->
pageNum
.
value
=
val
?
1
:
pageNum
.
value
<!-- const data = filterEmptyValueInObject(-->
const
data
=
filterEmptyValueInObject
(
<!-- {-->
{
<!-- // apptype: rawData.apptype,-->
// apptype: rawData.apptype,
<!-- appname: rawData.appname,-->
appname
:
rawData
.
appname
,
<!-- levels: rawData.levels?rawData.levels.toString():null,-->
levels
:
rawData
.
levels
?
rawData
.
levels
.
toString
():
null
,
<!-- content_like: rawData.content_like,-->
content_like
:
rawData
.
content_like
,
<!-- startTime: formatDate(rawData.date) + ' ' + formatTime(rawData.startTime),-->
startTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
startTime
),
<!-- endTime: formatDate(rawData.date) + ' ' + formatTime(rawData.endTime),-->
endTime
:
formatDate
(
rawData
.
date
)
+
' '
+
formatTime
(
rawData
.
endTime
),
<!-- page: pageNum.value,-->
page
:
pageNum
.
value
,
<!-- pageSize: pageSize.value,-->
pageSize
:
pageSize
.
value
,
<!-- }-->
}
<!-- )-->
)
<!-- SystemLogApi.getLogSelect(data).then(-->
SystemLogApi
.
getLogSelect
(
data
).
then
(
<!-- (r) => {-->
(
r
)
=>
{
<!-- isLoading.value = false-->
isLoading
.
value
=
false
<!-- dataList.value = []-->
dataList
.
value
=
[]
<!-- if(r.code==200){-->
if
(
r
.
code
==
200
){
<!-- // r.forEach((item,index)=>{-->
// r.forEach((item,index)=>{
<!-- // item.index = index+1-->
// item.index = index+1
<!-- // })-->
// })
<!-- if(r.data){-->
if
(
r
.
data
){
<!-- dataList.value = r.data.list-->
dataList
.
value
=
r
.
data
.
list
<!-- total.value = r.data.total-->
total
.
value
=
r
.
data
.
total
<!-- }-->
}
<!-- -->
<!-- }-->
}
<!-- -->
<!-- }-->
}
<!-- )-->
)
<!-- }-->
}
<!-- const stringFormatter = function(text){-->
const
stringFormatter
=
function
(
text
){
<!-- const rawData = toRaw(queryForm)-->
const
rawData
=
toRaw
(
queryForm
)
<!-- if (rawData.content_like && rawData.content_like !== '') {-->
if
(
rawData
.
content_like
&&
rawData
.
content_like
!==
''
)
{
<!-- let str = text.split(rawData.content_like).join("<span style='color:red;'>" + rawData.content_like + "</span>")-->
let
str
=
text
.
split
(
rawData
.
content_like
).
join
(
"<span style='color:red;'>"
+
rawData
.
content_like
+
"</span>"
)
<!-- return str-->
return
str
<!-- }else{-->
}
else
{
<!-- return text-->
return
text
<!-- }-->
}
<!-- }-->
}
<!-- const contentHeight = ref(0)-->
const
contentHeight
=
ref
(
0
)
<!-- const __main = function() {-->
const
__main
=
function
()
{
<!-- contentHeight.value = window.innerHeight - 230-->
contentHeight
.
value
=
window
.
innerHeight
-
230
<!-- // confirmSearch()-->
// confirmSearch()
<!-- }-->
}
<!-- const confirmSearch1 = function(){-->
const
confirmSearch1
=
function
(){
<!-- moreDialogRef.value.initDialog();-->
moreDialogRef
.
value
.
initDialog
();
<!-- }-->
}
<!-- __main()-->
__main
()
<!-- return {-->
return
{
<!-- // scalar-->
// scalar
<!-- isLoading,-->
isLoading
,
<!-- pageNum,-->
pageNum
,
<!-- pageSize,-->
pageSize
,
<!-- total,-->
total
,
<!-- contentHeight,-->
contentHeight
,
<!-- // sequence-->
// sequence
<!-- apptypeList,-->
apptypeList
,
<!-- appnameList,-->
appnameList
,
<!-- levelList,-->
levelList
,
<!-- dataList,-->
dataList
,
<!-- queryForm,-->
queryForm
,
<!-- columns,-->
columns
,
<!-- // function-->
// function
<!-- confirmSearch,-->
confirmSearch
,
<!-- confirmSearch1,-->
confirmSearch1
,
<!-- stringFormatter,-->
stringFormatter
,
<!-- onPageNumChange,-->
onPageNumChange
,
<!-- onPageSizeChange,-->
onPageSizeChange
,
<!-- //ref-->
//ref
<!-- moreDialogRef-->
moreDialogRef
<!-- }-->
}
<!-- }-->
}
<!--}-->
}
<
!--</script>--
>
<
/
script
>
<
!--<style lang="less" scoped>--
>
<
style
lang=
"less"
scoped
>
<!-- .success {-->
.success
{
<!-- color: #26ff29;-->
color
:
#26ff29
;
<!-- }-->
}
<!-- // /deep/.el-table{-->
//
/
deep
/
.el-table
{
<!-- // th,tr{-->
//
th,tr{
<!-- // background-color: #fafafa;-->
//
background-color
:
#fafafa
;
<!-- // }-->
//
}
<!-- // }-->
//
}
<!-- .failed {-->
.failed
{
<!-- color: red;-->
color
:
red
;
<!-- }-->
}
<
!--</style>--
>
<
/
style
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment