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 prop="businessType" label="业务类型" align="center">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="businessTypeOptions" :value="scope.row.businessType" />
|
||||
<dict-tag :options="options.businessTypeOptions" :value="scope.row.businessType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="status">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="statusOptions" :value="row.status"></dict-tag>
|
||||
<dict-tag :options="options.statusOptions" :value="row.status"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -50,6 +50,7 @@
|
||||
<script setup name="operlog">
|
||||
import { list as queryLog } from '@/api/monitor/operlog'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
const { proxy } = getCurrentInstance()
|
||||
// 遮罩层
|
||||
const loading = ref(true)
|
||||
// 总条数
|
||||
@ -63,32 +64,39 @@ const businessTypeOptions = ref([])
|
||||
// 日期范围
|
||||
const dateRange = ref([])
|
||||
|
||||
// 查询参数
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
title: undefined,
|
||||
operName: undefined,
|
||||
businessType: undefined,
|
||||
status: undefined,
|
||||
const state = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
title: undefined,
|
||||
operName: 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 = [
|
||||
{ dictType: 'sys_oper_type', columnName: 'businessTypeOptions' },
|
||||
{ dictType: 'sys_common_status', columnName: 'statusOptions' },
|
||||
]
|
||||
proxy.getDicts(dictParams).then((response) => {
|
||||
response.data.forEach((element) => {
|
||||
proxy[element.columnName] = element.list
|
||||
state.options[element.columnName] = element.list
|
||||
})
|
||||
})
|
||||
|
||||
/** 查询登录日志 */
|
||||
function getList() {
|
||||
loading.value = true
|
||||
queryParams.operName = useUserStore().userInfo.userName
|
||||
queryLog(proxy.addDateRange(queryParams, dateRange.value)).then((response) => {
|
||||
queryParams.value.operName = useUserStore().userInfo.userName
|
||||
queryLog(proxy.addDateRange(queryParams.value, dateRange.value)).then((response) => {
|
||||
loading.value = false
|
||||
if (response.code == 200) {
|
||||
list.value = response.data.result
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user