Browse Source

添加U8日志

master
07 3 years ago
parent
commit
5925fdaa81
  1. 4
      public/config.js
  2. 10
      src/api/logpage.js
  3. 4
      src/api/order.js
  4. 15
      src/router/index.js
  5. 77
      src/views/logpage/index.vue

4
public/config.js

@ -1,3 +1,3 @@
window.config = {
"base_url":"http://192.168.0.9:7101"
}
"base_url":"http://192.168.0.3:7100"
}

10
src/api/logpage.js

@ -0,0 +1,10 @@
import request from '@/utils/request'
export function getList(data) {
return request({
url: '/api/list',
method: 'get',
params:data
})
}

4
src/api/order.js

@ -3,8 +3,8 @@ import request from '@/utils/request'
export function getList(token) {
return request({
url: '/lzOrder/list',
url: '/api/lzOrder/list',
method: 'get',
params: { token }
params: token
})
}

15
src/router/index.js

@ -70,6 +70,21 @@ export const constantRoutes = [
}
]
},
{
path: '/u8log',
component: Layout,
redirect: '/u8log',
name: 'u8log',
meta: { title: 'U8日志', icon: 'el-icon-s-help' },
children: [
{
path: 'errlist',
name: 'errlist',
component: () => import('@/views/logpage/index'),
meta: { title: 'U8日志', icon: 'table' }
}
]
},
// 404 page must be placed at the end !!!
{ path: '*', redirect: '/404', hidden: true }

77
src/views/logpage/index.vue

@ -0,0 +1,77 @@
<template>
<div class="app-container">
<el-table v-loading="listLoading" :data="list" element-loading-text="Loading" style="width: 100%" border fit highlight-current-row>
<!-- <el-table-column align="center" label="ID" width="95">
<template slot-scope="scope">
{{ scope.$index }}
</template>
</el-table-column> -->
<el-table-column label="单据号" width="150" fixed="left">
<template slot-scope="scope">
{{ scope.row.apiPk }}
</template>
</el-table-column>
<el-table-column label="帐套" width="100">
<template slot-scope="scope">
{{ scope.row.tenant }}
</template>
</el-table-column>
<el-table-column label="请求参数" >
<template slot-scope="scope">
{{ scope.row.reqParams }}
</template>
</el-table-column>
<el-table-column label="返回参数" align="center">
<template slot-scope="scope">
{{ scope.row.respContext }}
</template>
</el-table-column>
<el-table-column label="状态" width="150" align="center">
<template slot-scope="scope">
{{ scope.row.status }}
</template>
</el-table-column>
<el-table-column align="center" prop="created_at" label="录入时间" width="200">
<template slot-scope="scope">
<i class="el-icon-time" />
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { getList } from '@/api/logpage'
export default {
filters: {
statusFilter(status) {
const statusMap = {
published: 'success',
draft: 'gray',
deleted: 'danger'
}
return statusMap[status]
}
},
data() {
return {
list: null,
listLoading: true
}
},
created() {
this.fetchData()
},
methods: {
fetchData() {
this.listLoading = true
getList({pageNum:1,pageSize:10}).then(response => {
this.list = response.data.records
this.listLoading = false
})
}
}
}
</script>
Loading…
Cancel
Save