From 03f0e3a13707e07d023013528da75b8a8e889aeb Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期一, 16 十一月 2020 14:12:14 +0800
Subject: [PATCH] 为所有MP插件和配置增加官方链接
---
ruoyi-ui/src/views/monitor/logininfor/index.vue | 230 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 230 insertions(+), 0 deletions(-)
diff --git a/ruoyi-ui/src/views/monitor/logininfor/index.vue b/ruoyi-ui/src/views/monitor/logininfor/index.vue
new file mode 100644
index 0000000..c5eb4f5
--- /dev/null
+++ b/ruoyi-ui/src/views/monitor/logininfor/index.vue
@@ -0,0 +1,230 @@
+<template>
+ <div class="app-container">
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+ <el-form-item label="鐧诲綍鍦板潃" prop="ipaddr">
+ <el-input
+ v-model="queryParams.ipaddr"
+ placeholder="璇疯緭鍏ョ櫥褰曞湴鍧�"
+ clearable
+ style="width: 240px;"
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鐢ㄦ埛鍚嶇О" prop="userName">
+ <el-input
+ v-model="queryParams.userName"
+ placeholder="璇疯緭鍏ョ敤鎴峰悕绉�"
+ clearable
+ style="width: 240px;"
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鐘舵��" prop="status">
+ <el-select
+ v-model="queryParams.status"
+ placeholder="鐧诲綍鐘舵��"
+ clearable
+ size="small"
+ style="width: 240px"
+ >
+ <el-option
+ v-for="dict in statusOptions"
+ :key="dict.dictValue"
+ :label="dict.dictLabel"
+ :value="dict.dictValue"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鐧诲綍鏃堕棿">
+ <el-date-picker
+ v-model="dateRange"
+ size="small"
+ style="width: 240px"
+ value-format="yyyy-MM-dd"
+ type="daterange"
+ range-separator="-"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ ></el-date-picker>
+ </el-form-item>
+ <el-form-item>
+ <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>
+
+ <el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <el-button
+ type="danger"
+ icon="el-icon-delete"
+ size="mini"
+ :disabled="multiple"
+ @click="handleDelete"
+ v-hasPermi="['monitor:logininfor:remove']"
+ >鍒犻櫎</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="danger"
+ icon="el-icon-delete"
+ size="mini"
+ @click="handleClean"
+ v-hasPermi="['monitor:logininfor:remove']"
+ >娓呯┖</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="warning"
+ icon="el-icon-download"
+ size="mini"
+ @click="handleExport"
+ v-hasPermi="['system:logininfor:export']"
+ >瀵煎嚭</el-button>
+ </el-col>
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+ </el-row>
+
+ <el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
+ <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" />
+ <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" />
+ <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" width="180">
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.loginTime) }}</span>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <pagination
+ v-show="total>0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="getList"
+ />
+ </div>
+</template>
+
+<script>
+import { list, delLogininfor, cleanLogininfor, exportLogininfor } from "@/api/monitor/logininfor";
+
+export default {
+ name: "Logininfor",
+ data() {
+ return {
+ // 閬僵灞�
+ loading: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 琛ㄦ牸鏁版嵁
+ list: [],
+ // 鐘舵�佹暟鎹瓧鍏�
+ statusOptions: [],
+ // 鏃ユ湡鑼冨洿
+ dateRange: [],
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ ipaddr: undefined,
+ userName: undefined,
+ status: undefined
+ }
+ };
+ },
+ created() {
+ this.getList();
+ this.getDicts("sys_common_status").then(response => {
+ this.statusOptions = response.data;
+ });
+ },
+ methods: {
+ /** 鏌ヨ鐧诲綍鏃ュ織鍒楄〃 */
+ getList() {
+ this.loading = true;
+ list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+ this.list = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ }
+ );
+ },
+ // 鐧诲綍鐘舵�佸瓧鍏哥炕璇�
+ statusFormat(row, column) {
+ return this.selectDictLabel(this.statusOptions, row.status);
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.dateRange = [];
+ this.resetForm("queryForm");
+ this.handleQuery();
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ this.ids = selection.map(item => item.infoId)
+ this.multiple = !selection.length
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ 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("鍒犻櫎鎴愬姛");
+ })
+ },
+ /** 娓呯┖鎸夐挳鎿嶄綔 */
+ handleClean() {
+ this.$confirm('鏄惁纭娓呯┖鎵�鏈夌櫥褰曟棩蹇楁暟鎹」?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(function() {
+ return cleanLogininfor();
+ }).then(() => {
+ this.getList();
+ this.msgSuccess("娓呯┖鎴愬姛");
+ })
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ const queryParams = this.queryParams;
+ this.$confirm('鏄惁纭瀵煎嚭鎵�鏈夋搷浣滄棩蹇楁暟鎹」?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(function() {
+ return exportLogininfor(queryParams);
+ }).then(response => {
+ this.download(response.msg);
+ })
+ }
+ }
+};
+</script>
+
--
Gitblit v1.9.3