Commit 4481a194 authored by 杨硕's avatar 杨硕

修改日志管理bug

parent 23527a1c
import request from '@/utils/request'
import Qs from 'qs'
// 查询异常日志列表
export function list(query) {
......@@ -10,10 +11,15 @@ export function list(query) {
}
// 删除异常日志
export function delErrLog(operId) {
export function delErrLog(data) {
// data = Qs.stringify(data)
return request({
url: '/monitor/errorLog/' + operId,
method: 'delete'
url: '/monitor/errorLog/delete',
method: 'post',
data,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
......
import request from '@/utils/request'
import Qs from 'qs'
// 查询登录日志列表
export function list(query) {
......@@ -10,10 +11,15 @@ export function list(query) {
}
// 删除登录日志
export function delLogininfo(infoId) {
export function delLogininfo(data) {
// data = Qs.stringify(data)
return request({
url: '/monitor/loginInfo/' + infoId,
method: 'delete'
url: '/monitor/loginInfo/delete',
method: 'post',
data,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
......
import request from '@/utils/request'
import Qs from 'qs'
// 查询操作日志列表
export function list(query) {
......@@ -10,10 +11,15 @@ export function list(query) {
}
// 删除操作日志
export function delOperLog(operId) {
export function delOperLog(data) {
// data = Qs.stringify(data)
return request({
url: '/monitor/operLog/' + operId,
method: 'delete'
url: '/monitor/operLog/delete',
method: 'post',
data,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
......
......@@ -142,6 +142,7 @@ export default {
// this.$router.push({ path: `http://main.court.com${this.redirect || "/"}` });
this.loading = false
this.$router.push('/welcome')
// this.$router.push('/home')
})
.catch(() => {
this.loading = false
......
......@@ -315,7 +315,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.operId)
this.ids = selection.map(item => item.businessId)
},
/** 详细按钮操作 */
handleView(row) {
......@@ -329,7 +329,13 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return delErrLog(this.ids)
const id = this.ids.join(',')
// TODO: clear this log
console.log(`this.ids`, id)
const query = {
deleteIds: id
}
return delErrLog(query)
}).then(() => {
this.getList()
this.$message.success('删除成功')
......
......@@ -122,7 +122,7 @@
<el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
<!-- <el-table-column label="浏览器" align="center" prop="browser" />
<el-table-column label="操作系统" align="center" prop="os" />-->
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<el-table-column label="登录状态" align="center" prop="status">
<template slot-scope="scope">
<span v-if="scope.row.status === '0'">失败</span>
......@@ -238,7 +238,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.infoId)
this.ids = selection.map(item => item.businessId)
this.multiple = !selection.length
},
/** 删除按钮操作 */
......@@ -248,7 +248,13 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return delLogininfo(this.ids)
const id = this.ids.join(',')
// TODO: clear this log
console.log(`this.ids`, id)
const query = {
deleteIds: id
}
return delLogininfo(query)
}).then(() => {
this.getList()
this.$message.success('删除成功')
......
......@@ -316,7 +316,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.operId)
this.ids = selection.map(item => item.businessId)
},
/** 详细按钮操作 */
handleView(row) {
......@@ -330,7 +330,14 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return delOperLog(this.ids)
const id = this.ids.join(',')
// TODO: clear this log
console.log(`this.ids`, id)
const query = {
deleteIds: id
}
// const deleteIds = JSON.stringify(query)
return delOperLog(query)
}).then(() => {
this.getList()
this.$message.success('删除成功')
......
......@@ -107,7 +107,7 @@
{{ isNaN(scope.row.dictSort) ? '-' : scope.row.dictSort }}
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="flag" :formatter="statusFormat">
<el-table-column label="状态" align="center" prop="flag">
<template slot-scope="scope">
<el-switch
v-model="scope.row.flag"
......@@ -143,15 +143,15 @@
type="text"
@click="handleDelete(scope.row)"
>删除</el-button>
<el-switch
v-model="scope.row.status"
v-hasPermi="['sys:dictConfig:toggle']"
disabled
class="switchDisabledStyle"
active-value="0"
inactive-value="1"
@click.native="changeStatus(scope.row)"
/>
<!-- <el-switch-->
<!-- v-model="scope.row.status"-->
<!-- v-hasPermi="['sys:dictConfig:toggle']"-->
<!-- disabled-->
<!-- class="switchDisabledStyle"-->
<!-- active-value="0"-->
<!-- inactive-value="1"-->
<!-- @click.native="changeStatus(scope.row)"-->
<!-- />-->
</template>
</el-table-column>
</el-table>
......@@ -290,9 +290,9 @@ export default {
const dictId = this.$route.params && this.$route.params.dictId
this.getType(dictId)
this.getTypeList()
this.getDicts(dictCons['NORMAL_DISABLE']).then(response => {
this.statusOptions = response.data
})
// this.getDicts(dictCons['NORMAL_DISABLE']).then(response => {
// this.statusOptions = response.data
// })
},
methods: {
// 状态
......@@ -331,19 +331,17 @@ export default {
getList() {
this.loading = true
listData(this.queryParams).then(response => {
if (response.code === 200) {
if (response.rows) {
this.dataList = response.rows
this.total = response.total
this.loading = false
} else {
this.loading = false
}
this.loading = false
})
},
// 数据状态字典翻译
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.flag)
},
// statusFormat(row, column) {
// return this.selectDictLabel(this.statusOptions, row.flag)
// },
// 取消按钮
cancel() {
this.open = false
......
......@@ -109,13 +109,13 @@
style="color: #49cec9"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
v-hasPermi="['sys:role:update']"
size="mini"
type="text"
icon="el-icon-circle-check"
@click="handleMenu(scope.row)"
>数据权限</el-button>
<!-- <el-button-->
<!-- v-hasPermi="['sys:role:update']"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-circle-check"-->
<!-- @click="handleMenu(scope.row)"-->
<!-- >数据权限</el-button>-->
<el-button
size="mini"
type="text"
......
......@@ -129,7 +129,7 @@
{{ scope.row.username || '-' }}
</template>
</el-table-column>
<el-table-column label="用户类型" prop="userType" :show-overflow-tooltip="true">
<el-table-column label="用户名称" prop="userType" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.name || '-' }}
</template>
......@@ -248,8 +248,8 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="用户类型" prop="name">
<el-input v-model.trim="form.name" placeholder="请输入用户类型" />
<el-form-item label="用户名称" prop="name">
<el-input v-model.trim="form.name" placeholder="请输入用户名称" />
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -652,6 +652,7 @@ export default {
roleChange(e) {
// TODO: clear this log
console.log(`e`, e)
this.$forceUpdate()
},
/** 查询部门下拉树结构 */
getTreeSelect() {
......
......@@ -79,10 +79,10 @@ module.exports = {
// }
// },
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.1.29:8088/`,
// target: `http://192.168.1.29:8088/`,
// target: `http://10.5.87.231:10010/internal`,
// target: `http://117.122.212.91:32012/`,
// target: `http://192.144.239.97:20070/`,
target: `http://192.144.239.97:20070/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment