Commit 059591b3 authored by Asjoker's avatar Asjoker

日志修改 和 彻底干掉zt

parent ddb944e7
...@@ -43,9 +43,9 @@ export function listRole(query) { ...@@ -43,9 +43,9 @@ export function listRole(query) {
}) })
} }
export function queryInAdhibitions() { // export function queryInAdhibitions() {
return request({ // return request({
url: '/authority/system/app/queryInAdhibitions/' + 'zt', // url: '/authority/system/app/queryInAdhibitions/' + 'zt',
method: 'get' // method: 'get'
}) // })
} // }
...@@ -5,9 +5,9 @@ import request from '@/utils/request' ...@@ -5,9 +5,9 @@ import request from '@/utils/request'
* @param params * @param params
* @returns {AxiosPromise} * @returns {AxiosPromise}
*/ */
export function queryInAdhibitions(params) { // export function queryInAdhibitions(params) {
return request({ // return request({
url: '/authority/system/app/queryInAdhibitions/' + params.businessId, // url: '/authority/system/app/queryInAdhibitions/' + params.businessId,
method: 'get' // method: 'get'
}) // })
} // }
...@@ -3,7 +3,7 @@ import request from '@/utils/request' ...@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询异常日志列表 // 查询异常日志列表
export function list(query) { export function list(query) {
return request({ return request({
url: '/authority/monitor/operlog/list', url: '/monitor/operLog/list',
method: 'get', method: 'get',
params: query params: query
}) })
...@@ -12,7 +12,7 @@ export function list(query) { ...@@ -12,7 +12,7 @@ export function list(query) {
// 删除异常日志 // 删除异常日志
export function delErrLog(operId) { export function delErrLog(operId) {
return request({ return request({
url: '/authority/monitor/operlog/' + operId, url: '/authority/monitor/operLog/' + operId,
method: 'delete' method: 'delete'
}) })
} }
...@@ -20,7 +20,7 @@ export function delErrLog(operId) { ...@@ -20,7 +20,7 @@ export function delErrLog(operId) {
// 清空异常日志 // 清空异常日志
export function cleanErrLog() { export function cleanErrLog() {
return request({ return request({
url: '/authority/monitor/operlog/clean/1', url: '/authority/monitor/operLog/clean/1',
method: 'delete' method: 'delete'
}) })
} }
...@@ -28,7 +28,7 @@ export function cleanErrLog() { ...@@ -28,7 +28,7 @@ export function cleanErrLog() {
// 导出异常日志 // 导出异常日志
export function exportErrLog(query) { export function exportErrLog(query) {
return request({ return request({
url: '/authority/monitor/operlog/export', url: '/authority/monitor/operLog/export',
method: 'get', method: 'get',
params: query params: query
}) })
......
...@@ -3,32 +3,32 @@ import request from '@/utils/request' ...@@ -3,32 +3,32 @@ import request from '@/utils/request'
// 查询登录日志列表 // 查询登录日志列表
export function list(query) { export function list(query) {
return request({ return request({
url: '/authority/monitor/logininfor/list', url: '/monitor/loginInfo/list',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 删除登录日志 // 删除登录日志
export function delLogininfor(infoId) { export function delLogininfo(infoId) {
return request({ return request({
url: '/authority/monitor/logininfor/' + infoId, url: '/authority/monitor/logininfo/' + infoId,
method: 'delete' method: 'delete'
}) })
} }
// 清空登录日志 // 清空登录日志
export function cleanLogininfor() { export function cleanLogininfo() {
return request({ return request({
url: '/authority/monitor/logininfor/clean', url: '/authority/monitor/logininfo/clean',
method: 'delete' method: 'delete'
}) })
} }
// 导出登录日志 // 导出登录日志
export function exportLogininfor(query) { export function exportLogininfo(query) {
return request({ return request({
url: '/authority/monitor/logininfor/export', url: '/authority/monitor/logininfo/export',
method: 'get', method: 'get',
params: query params: query
}) })
......
...@@ -3,32 +3,32 @@ import request from '@/utils/request' ...@@ -3,32 +3,32 @@ import request from '@/utils/request'
// 查询操作日志列表 // 查询操作日志列表
export function list(query) { export function list(query) {
return request({ return request({
url: '/authority/monitor/operlog/list', url: '/monitor/operLog/list',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 删除操作日志 // 删除操作日志
export function delOperlog(operId) { export function delOperLog(operId) {
return request({ return request({
url: '/authority/monitor/operlog/' + operId, url: '/authority/monitor/operLog/' + operId,
method: 'delete' method: 'delete'
}) })
} }
// 清空操作日志 // 清空操作日志
export function cleanOperlog() { export function cleanOperLog() {
return request({ return request({
url: '/authority/monitor/operlog/clean/0', url: '/authority/monitor/operLog/clean/0',
method: 'delete' method: 'delete'
}) })
} }
// 导出操作日志 // 导出操作日志
export function exportOperlog(query) { export function exportOperLog(query) {
return request({ return request({
url: '/authority/monitor/operlog/export', url: '/authority/monitor/operLog/export',
method: 'get', method: 'get',
params: query params: query
}) })
......
...@@ -20,7 +20,7 @@ export function getData(dictCode) { ...@@ -20,7 +20,7 @@ export function getData(dictCode) {
// 根据字典类型查询字典数据信息 // 根据字典类型查询字典数据信息
export function getDicts(dictType) { export function getDicts(dictType) {
return request({ return request({
url: '/authority/system/dict/data/type/' + dictType, url: '/system/dict/data/type/' + dictType,
method: 'get' method: 'get'
}) })
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:current-page.sync="currentPage" :current-page.sync="currentPage"
:page-size.sync="pageSize" :page-size.sync="pageSize"
:layout="layout" :layout="layout"
:page-sizes="pageSizes" :page-sizes="rows"
:total="total" :total="total"
v-bind="$attrs" v-bind="$attrs"
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
type: Number, type: Number,
default: 20 default: 20
}, },
pageSizes: { rows: {
type: Array, type: Array,
default() { default() {
return [10, 20, 50, 100] return [10, 20, 50, 100]
......
...@@ -66,7 +66,7 @@ Vue.prototype.$parseDate = (value, format) => { ...@@ -66,7 +66,7 @@ Vue.prototype.$parseDate = (value, format) => {
if (!value || value === '') { if (!value || value === '') {
return '-' return '-'
} }
return moment(value).format(format || 'YYYY-MM-DD HH:mm') return moment(value).format(format || 'YYYY-MM-DD HH:mm:ss')
} }
// 如果想要中文版 element-ui,按如下方式声明 // 如果想要中文版 element-ui,按如下方式声明
// Vue.use(ElementUI) // Vue.use(ElementUI)
...@@ -89,5 +89,5 @@ Vue.filter('transformDateByFormat', (value, format) => { ...@@ -89,5 +89,5 @@ Vue.filter('transformDateByFormat', (value, format) => {
if (!value || value === '') { if (!value || value === '') {
return '-' return '-'
} }
return moment(value).format(format || 'YYYY-MM-DD HH:mm') return moment(value).format(format || 'YYYY-MM-DD HH:mm:ss')
}) })
export default {
'USER_SEX': 'sys_user_sex', // 用户性别
'SHOW_HIDE': 'sys_show_hide', // 菜单状态
'NORMAL_DISABLE': 'sys_normal_disable', // 系统开关
'OPER_TYPE': 'sys_oper_type', // 操作类型
'COMMON_STATUS': 'sys_common_status' // 系统状态
}
...@@ -237,7 +237,7 @@ export default { ...@@ -237,7 +237,7 @@ export default {
pu: 1, pu: 1,
ps: 10, ps: 10,
status: 1, status: 1,
operTime: '', // operTime: '',
title: undefined, title: undefined,
operName: undefined operName: undefined
// businessType: undefined // businessType: undefined
...@@ -245,7 +245,7 @@ export default { ...@@ -245,7 +245,7 @@ export default {
} }
}, },
created() { created() {
this.queryParams.operTime = this.$parseDate(new Date(), 'YYYY-MM') // this.queryParams.operTime = this.$parseDate(new Date(), 'YYYY-MM')
this.getList() this.getList()
this.getDicts('sys_oper_type'.toUpperCase()).then(response => { this.getDicts('sys_oper_type'.toUpperCase()).then(response => {
this.typeOptions = response.data this.typeOptions = response.data
...@@ -259,9 +259,9 @@ export default { ...@@ -259,9 +259,9 @@ export default {
getList() { getList() {
this.loading = true this.loading = true
const query = Object.assign({}, this.queryParams) const query = Object.assign({}, this.queryParams)
query.operTime = query.operTime ? this.$parseDate(new Date(query.operTime), 'YYYYMM') : '' // query.operTime = query.operTime ? this.$parseDate(new Date(query.operTime), 'YYYYMM') : ''
list(query).then(response => { list(query).then(response => {
this.list = response.data.sysOperLogs.map(item => { this.list = response.rows.map(item => {
const title = item.title const title = item.title
if (title) { if (title) {
const temp = title.split('-') const temp = title.split('-')
...@@ -274,7 +274,7 @@ export default { ...@@ -274,7 +274,7 @@ export default {
} }
return item return item
}) })
this.total = response.data.totals this.total = response.total
this.loading = false this.loading = false
} }
) )
...@@ -337,7 +337,7 @@ export default { ...@@ -337,7 +337,7 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = Object.assign({}, this.queryParams) const queryParams = Object.assign({}, this.queryParams)
queryParams.operTime = queryParams.operTime ? this.$parseDate(new Date(queryParams.operTime), 'YYYYMM') : '' // queryParams.operTime = queryParams.operTime ? this.$parseDate(new Date(queryParams.operTime), 'YYYYMM') : ''
delete queryParams.pu delete queryParams.pu
delete queryParams.ps delete queryParams.ps
queryParams.ids = this.ids.join(',') || null queryParams.ids = this.ids.join(',') || null
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" label-width="68px"> <el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" label-width="68px">
<!-- <el-form-item label="登录地址" prop="ipaddr">--> <!-- <el-form-item label="登录地址" prop="ipaddr">-->
<!-- <el-input--> <!-- <el-input-->
<!-- v-model="queryParams.ipaddr"--> <!-- v-model="queryParams.ipaddr"-->
...@@ -38,36 +38,39 @@ ...@@ -38,36 +38,39 @@
<!-- />--> <!-- />-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="登录月份"> <el-form-item label="登录时间">
<el-date-picker <el-date-picker
v-model="queryParams.loginTime" v-model="dateRange"
size="small" size="small"
style="width: 240px" style="width: 240px"
type="month" type="daterange"
value-format="yyyy-MM" range-separator="-"
placeholder="请选择月份" value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="handleQuery">查询</el-button> <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
<div style="float: right"> <div style="float: right">
<el-form-item> <el-form-item>
<!-- v-hasPermi="['zt:loginlog:delete']"-->
<el-button <el-button
v-hasPermi="['zt:loginlog:delete']"
type="danger" type="danger"
size="small" size="small"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
>删除</el-button> >删除</el-button>
<!-- v-hasPermi="['zt:loginlog:clear']"-->
<el-button <el-button
v-hasPermi="['zt:loginlog:clear']"
type="danger" type="danger"
size="small" size="small"
@click="handleClean" @click="handleClean"
>清空</el-button> >清空</el-button>
<!-- v-hasPermi="['zt:loginlog:export']"-->
<el-button <el-button
v-hasPermi="['zt:loginlog:export']"
type="success" type="success"
size="small" size="small"
@click="handleExport" @click="handleExport"
...@@ -80,39 +83,53 @@ ...@@ -80,39 +83,53 @@
<div style="padding:10px"> <div style="padding:10px">
<div class="mb12 font-small-bold">登录日志列表</div> <div class="mb12 font-small-bold">登录日志列表</div>
<el-table v-loading="loading" border :data="list" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="list" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- &lt;!&ndash; <el-table-column type="index" label="序号" width="50" />&ndash;&gt;-->
<!-- <el-table-column label="访问编号" width="100" align="center" prop="infoId" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.infoId || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="用户名称" align="center" prop="userName" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.userName || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="登录地址" align="center" prop="ipaddr" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.ipaddr || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作信息" align="center" prop="msg" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.msg || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- &lt;!&ndash; <el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />&ndash;&gt;-->
<!-- <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />-->
<!-- &lt;!&ndash; <el-table-column label="浏览器" align="center" prop="browser" show-overflow-tooltip>&ndash;&gt;-->
<!-- &lt;!&ndash; <template slot-scope="scope">&ndash;&gt;-->
<!-- &lt;!&ndash; {{ scope.row.browser || '-' }}&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-table-column>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="操作系统" align="center" prop="os" show-overflow-tooltip>&ndash;&gt;-->
<!-- &lt;!&ndash; <template slot-scope="scope">&ndash;&gt;-->
<!-- &lt;!&ndash; {{ scope.row.os || '-' }}&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-table-column>&ndash;&gt;-->
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column type="index" label="序号" width="50" />--> <el-table-column label="访问编号" align="center" prop="infoId" />
<el-table-column label="访问编号" width="100" align="center" prop="infoId" show-overflow-tooltip> <el-table-column label="用户名称" align="center" prop="username" />
<template slot-scope="scope"> <el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
{{ scope.row.infoId || '-' }} <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
</template> <!-- <el-table-column label="浏览器" align="center" prop="browser" />
</el-table-column> <el-table-column label="操作系统" align="center" prop="os" />-->
<el-table-column label="用户名称" align="center" prop="userName" show-overflow-tooltip> <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />
<template slot-scope="scope"> <el-table-column label="操作信息" align="center" prop="msg" />
{{ scope.row.userName || '-' }}
</template>
</el-table-column>
<el-table-column label="操作信息" align="center" prop="msg" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.msg || '-' }}
</template>
</el-table-column>
<!-- <el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />-->
<!-- <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />-->
<el-table-column label="浏览器" align="center" prop="browser" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.browser || '-' }}
</template>
</el-table-column>
<el-table-column label="操作系统" align="center" prop="os" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.os || '-' }}
</template>
</el-table-column>
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<el-table-column label="登录时间" align="center" prop="loginTime" width="180" show-overflow-tooltip> <el-table-column label="登录时间" align="center" prop="loginTime" width="180" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.loginTime | transformDateByFormat('YYYY-MM-DD HH:mm:ss') }}</span> <span>{{ parseTime(scope.row.loginTime) | transformDateByFormat('YYYY-MM-DD HH:mm:ss') }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -120,16 +137,16 @@ ...@@ -120,16 +137,16 @@
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="queryParams.pu" :page.sync="queryParams.page"
:limit.sync="queryParams.ps" :limit.sync="queryParams.rows"
@pagination="getList" @pagination="getList"
/> />
</div> </div>
</template> </template>
<script> <script>
import { list, delLogininfor, cleanLogininfor, exportLogininfor } from '@/api/monitor/loginInfo' import { list, delLogininfo, cleanLogininfo, exportLogininfo } from '@/api/monitor/loginInfo'
import dictCons from '@/utils/dictCons'
export default { export default {
name: 'LoginInfo', name: 'LoginInfo',
data() { data() {
...@@ -140,6 +157,8 @@ export default { ...@@ -140,6 +157,8 @@ export default {
ids: [], ids: [],
// 非多个禁用 // 非多个禁用
multiple: true, multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数 // 总条数
total: 0, total: 0,
// 表格数据 // 表格数据
...@@ -150,16 +169,16 @@ export default { ...@@ -150,16 +169,16 @@ export default {
dateRange: '', dateRange: '',
// 查询参数 // 查询参数
queryParams: { queryParams: {
pu: 1, page: 1,
ps: 10, rows: 10
loginTime: '' // loginTime: ''
} }
} }
}, },
created() { created() {
this.queryParams.loginTime = this.$parseDate(new Date(), 'YYYY-MM') // this.queryParams.loginTime = this.$parseDate(new Date(), 'YYYY-MM-DD HH:mm:ss')
this.getList() this.getList()
this.getDicts('sys_common_status'.toUpperCase()).then(response => { this.getDicts(dictCons['COMMON_STATUS']).then(response => {
this.statusOptions = response.data this.statusOptions = response.data
}) })
}, },
...@@ -168,10 +187,10 @@ export default { ...@@ -168,10 +187,10 @@ export default {
getList() { getList() {
this.loading = true this.loading = true
const query = Object.assign({}, this.queryParams) const query = Object.assign({}, this.queryParams)
query.loginTime = query.loginTime ? this.$parseDate(new Date(query.loginTime), 'YYYYMM') : '' // query.loginTime = query.loginTime ? this.$parseDate(new Date(query.loginTime), 'YYYY-MM-DD HH:mm:ss') : ''
list(query).then(response => { list(query).then(response => {
this.list = response.data.logininfors this.list = response.rows
this.total = response.data.totals this.total = response.total
this.loading = false this.loading = false
}) })
}, },
...@@ -181,7 +200,7 @@ export default { ...@@ -181,7 +200,7 @@ export default {
}, },
/** 查询按钮操作 */ /** 查询按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pu = 1 this.queryParams.page = 1
this.getList() this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
...@@ -202,7 +221,7 @@ export default { ...@@ -202,7 +221,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
return delLogininfor(this.ids) return delLogininfo(this.ids)
}).then(() => { }).then(() => {
this.getList() this.getList()
this.$message.success('删除成功') this.$message.success('删除成功')
...@@ -217,7 +236,7 @@ export default { ...@@ -217,7 +236,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function() { }).then(function() {
return cleanLogininfor() return cleanLogininfo()
}).then(() => { }).then(() => {
this.getList() this.getList()
this.$message.success('清空成功') this.$message.success('清空成功')
...@@ -226,11 +245,11 @@ export default { ...@@ -226,11 +245,11 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = Object.assign({}, this.queryParams) const queryParams = Object.assign({}, this.queryParams)
queryParams.loginTime = queryParams.loginTime ? this.$parseDate(new Date(queryParams.loginTime), 'YYYYMM') : '' // queryParams.loginTime = queryParams.loginTime ? this.$parseDate(new Date(queryParams.loginTime), 'YYYY-MM-DD HH:mm:ss') : ''
delete queryParams.pu delete queryParams.page
delete queryParams.ps delete queryParams.rows
queryParams.ids = this.ids.join(',') || null queryParams.ids = this.ids.join(',') || null
exportLogininfor(queryParams).then(response => { exportLogininfo(queryParams).then(response => {
this.download(response.msg) this.download(response.msg)
}).catch(function() {}) }).catch(function() {})
// this.$confirm('是否确认导出所有操作日志数据项?', '提示', { // this.$confirm('是否确认导出所有操作日志数据项?', '提示', {
...@@ -238,7 +257,7 @@ export default { ...@@ -238,7 +257,7 @@ export default {
// cancelButtonText: '取消', // cancelButtonText: '取消',
// type: 'warning' // type: 'warning'
// }).then(function() { // }).then(function() {
// return exportLogininfor(queryParams) // return exportLogininfo(queryParams)
// }) // })
} }
} }
......
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
</template> </template>
<script> <script>
import { list, delOperlog, cleanOperlog, exportOperlog } from '@/api/monitor/operLog' import { list, delOperLog, cleanOperLog, exportOperLog } from '@/api/monitor/operLog'
export default { export default {
name: 'Operlog', name: 'Operlog',
...@@ -237,7 +237,7 @@ export default { ...@@ -237,7 +237,7 @@ export default {
pu: 1, pu: 1,
ps: 10, ps: 10,
status: 0, status: 0,
operTime: '', // operTime: '',
title: undefined, title: undefined,
operName: undefined operName: undefined
// businessType: undefined // businessType: undefined
...@@ -245,7 +245,7 @@ export default { ...@@ -245,7 +245,7 @@ export default {
} }
}, },
created() { created() {
this.queryParams.operTime = this.$parseDate(new Date(), 'YYYY-MM') // this.queryParams.operTime = this.$parseDate(new Date(), 'YYYY-MM')
this.getList() this.getList()
this.getDicts('sys_oper_type'.toUpperCase()).then(response => { this.getDicts('sys_oper_type'.toUpperCase()).then(response => {
this.typeOptions = response.data this.typeOptions = response.data
...@@ -259,9 +259,9 @@ export default { ...@@ -259,9 +259,9 @@ export default {
getList() { getList() {
this.loading = true this.loading = true
const query = Object.assign({}, this.queryParams) const query = Object.assign({}, this.queryParams)
query.operTime = query.operTime ? this.$parseDate(new Date(query.operTime), 'YYYYMM') : '' // query.operTime = query.operTime ? this.$parseDate(new Date(query.operTime), 'YYYY-MM-DD HH:mm:ss') : ''
list(query).then(response => { list(query).then(response => {
this.list = response.data.sysOperLogs.map(item => { this.list = response.rows.map(item => {
const title = item.title const title = item.title
if (title) { if (title) {
const temp = title.split('-') const temp = title.split('-')
...@@ -274,7 +274,7 @@ export default { ...@@ -274,7 +274,7 @@ export default {
} }
return item return item
}) })
this.total = response.data.totals this.total = response.total
this.loading = false this.loading = false
} }
) )
...@@ -314,7 +314,7 @@ export default { ...@@ -314,7 +314,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delOperlog(this.ids.join(',')).then(() => { delOperLog(this.ids.join(',')).then(() => {
this.getList() this.getList()
this.$message.success('删除成功') this.$message.success('删除成功')
this.ids = [] this.ids = []
...@@ -328,7 +328,7 @@ export default { ...@@ -328,7 +328,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
cleanOperlog().then(() => { cleanOperLog().then(() => {
this.getList() this.getList()
this.$message.success('清空成功') this.$message.success('清空成功')
}).catch(function() {}) }).catch(function() {})
...@@ -337,11 +337,11 @@ export default { ...@@ -337,11 +337,11 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = Object.assign({}, this.queryParams) const queryParams = Object.assign({}, this.queryParams)
queryParams.operTime = queryParams.operTime ? this.$parseDate(new Date(queryParams.operTime), 'YYYYMM') : '' // queryParams.operTime = queryParams.operTime ? this.$parseDate(new Date(queryParams.operTime), 'YYYY-MM-DD HH:mm:ss') : ''
delete queryParams.pu delete queryParams.pu
delete queryParams.ps delete queryParams.ps
queryParams.ids = this.ids.join(',') || null queryParams.ids = this.ids.join(',') || null
exportOperlog(queryParams).then(response => { exportOperLog(queryParams).then(response => {
this.download(response.msg) this.download(response.msg)
}).catch(function() {}) }).catch(function() {})
// this.$confirm('是否确认导出所有操作日志数据项?', '提示', { // this.$confirm('是否确认导出所有操作日志数据项?', '提示', {
...@@ -349,7 +349,7 @@ export default { ...@@ -349,7 +349,7 @@ export default {
// cancelButtonText: '取消', // cancelButtonText: '取消',
// type: 'warning' // type: 'warning'
// }).then(() => { // }).then(() => {
// exportOperlog(queryParams) // exportOperLog(queryParams)
// }).catch() // }).catch()
} }
} }
......
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