|
@@ -65,7 +65,8 @@
|
|
|
:disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
v-hasPermi="['monitor:logininfor:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -75,7 +76,8 @@
|
|
|
size="mini"
|
|
|
@click="handleClean"
|
|
|
v-hasPermi="['monitor:logininfor:remove']"
|
|
|
- >清空</el-button>
|
|
|
+ >清空
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -86,21 +88,22 @@
|
|
|
:loading="exportLoading"
|
|
|
@click="handleExport"
|
|
|
v-hasPermi="['monitor:logininfor:export']"
|
|
|
- >导出</el-button>
|
|
|
+ >导出
|
|
|
+ </el-button>
|
|
|
</el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
<el-table ref="tables" :header-cell-style="{ background: 'linear-gradient(white, #ccebf9)'}" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="访问编号" align="center" prop="infoId" />
|
|
|
- <el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
|
|
|
- <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="true" />
|
|
|
- <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="msg" />
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
+ <el-table-column label="访问编号" align="center" prop="infoId"/>
|
|
|
+ <el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']"/>
|
|
|
+ <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="true"/>
|
|
|
+ <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="msg"/>
|
|
|
<el-table-column label="登录日期" align="center" prop="loginTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.loginTime) }}</span>
|
|
@@ -119,7 +122,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { list, delLogininfor, cleanLogininfor, exportLogininfor } from "@/api/monitor/logininfor";
|
|
|
+import {cleanLogininfor, delLogininfor, exportLogininfor, list} from "@/api/monitor/logininfor";
|
|
|
|
|
|
export default {
|
|
|
name: "Logininfor",
|
|
@@ -203,43 +206,46 @@ export default {
|
|
|
handleDelete(row) {
|
|
|
const infoIds = row.infoId || this.ids;
|
|
|
this.$confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return delLogininfor(infoIds);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return delLogininfor(infoIds);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
},
|
|
|
/** 清空按钮操作 */
|
|
|
handleClean() {
|
|
|
- this.$confirm('是否确认清空所有登录日志数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return cleanLogininfor();
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("清空成功");
|
|
|
- }).catch(() => {});
|
|
|
+ this.$confirm('是否确认清空所有登录日志数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function () {
|
|
|
+ return cleanLogininfor();
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("清空成功");
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|
|
|
this.$confirm('是否确认导出所有操作日志数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- this.exportLoading = true;
|
|
|
- return exportLogininfor(queryParams);
|
|
|
- }).then(response => {
|
|
|
- this.download(response.msg);
|
|
|
- this.exportLoading = false;
|
|
|
- }).catch(() => {});
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.exportLoading = true;
|
|
|
+ return exportLogininfor(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ this.exportLoading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|