fix:个人中心操作日志查询bug
This commit is contained in:
parent
7dd74427e8
commit
6c76658d46
@ -24,14 +24,14 @@
|
|||||||
<el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
|
<el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
|
||||||
<el-table-column prop="businessType" label="业务类型" align="center">
|
<el-table-column prop="businessType" label="业务类型" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="businessTypeOptions" :value="scope.row.businessType" />
|
<dict-tag :options="options.businessTypeOptions" :value="scope.row.businessType" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="请求方式" align="center" prop="requestMethod" />
|
<el-table-column label="请求方式" align="center" prop="requestMethod" />
|
||||||
<el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" />
|
<el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作状态" align="center" prop="status">
|
<el-table-column label="操作状态" align="center" prop="status">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-tag :options="statusOptions" :value="row.status"></dict-tag>
|
<dict-tag :options="options.statusOptions" :value="row.status"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@ -50,6 +50,7 @@
|
|||||||
<script setup name="operlog">
|
<script setup name="operlog">
|
||||||
import { list as queryLog } from '@/api/monitor/operlog'
|
import { list as queryLog } from '@/api/monitor/operlog'
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
// 总条数
|
// 总条数
|
||||||
@ -63,32 +64,39 @@ const businessTypeOptions = ref([])
|
|||||||
// 日期范围
|
// 日期范围
|
||||||
const dateRange = ref([])
|
const dateRange = ref([])
|
||||||
|
|
||||||
// 查询参数
|
const state = reactive({
|
||||||
const queryParams = reactive({
|
form: {},
|
||||||
pageNum: 1,
|
queryParams: {
|
||||||
pageSize: 10,
|
pageNum: 1,
|
||||||
title: undefined,
|
pageSize: 20,
|
||||||
operName: undefined,
|
title: undefined,
|
||||||
businessType: undefined,
|
operName: undefined,
|
||||||
status: undefined,
|
businessType: undefined,
|
||||||
|
status: undefined
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
//业务类型(0其它 1新增 2修改 3删除)选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
|
||||||
|
businessTypeOptions: [],
|
||||||
|
statusOptions: []
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
const { form, queryParams, options } = toRefs(state)
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
var dictParams = [
|
var dictParams = [
|
||||||
{ dictType: 'sys_oper_type', columnName: 'businessTypeOptions' },
|
{ dictType: 'sys_oper_type', columnName: 'businessTypeOptions' },
|
||||||
{ dictType: 'sys_common_status', columnName: 'statusOptions' },
|
{ dictType: 'sys_common_status', columnName: 'statusOptions' },
|
||||||
]
|
]
|
||||||
proxy.getDicts(dictParams).then((response) => {
|
proxy.getDicts(dictParams).then((response) => {
|
||||||
response.data.forEach((element) => {
|
response.data.forEach((element) => {
|
||||||
proxy[element.columnName] = element.list
|
state.options[element.columnName] = element.list
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 查询登录日志 */
|
/** 查询登录日志 */
|
||||||
function getList() {
|
function getList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
queryParams.operName = useUserStore().userInfo.userName
|
queryParams.value.operName = useUserStore().userInfo.userName
|
||||||
queryLog(proxy.addDateRange(queryParams, dateRange.value)).then((response) => {
|
queryLog(proxy.addDateRange(queryParams.value, dateRange.value)).then((response) => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
if (response.code == 200) {
|
if (response.code == 200) {
|
||||||
list.value = response.data.result
|
list.value = response.data.result
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user