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

修改日志管理bug

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