From 61daaa35063b5590d7dcecc69f27d8b931475c08 Mon Sep 17 00:00:00 2001
From: Nguyendream <728115857@qq.com>
Date: 星期一, 19 七月 2021 18:45:18 +0800
Subject: [PATCH] fix 未完全解决的代码生成字典问题
---
ruoyi-ui/src/views/monitor/online/index.vue | 249 +++++++++++++++++++++++++------------------------
1 files changed, 128 insertions(+), 121 deletions(-)
diff --git a/ruoyi-ui/src/views/monitor/online/index.vue b/ruoyi-ui/src/views/monitor/online/index.vue
index 17104de..64aa25c 100644
--- a/ruoyi-ui/src/views/monitor/online/index.vue
+++ b/ruoyi-ui/src/views/monitor/online/index.vue
@@ -1,121 +1,128 @@
-<template>
- <div class="app-container">
- <el-form :inline="true">
- <el-form-item label="鐧诲綍鍦板潃">
- <el-input
- v-model="queryParams.ipaddr"
- placeholder="璇疯緭鍏ョ櫥褰曞湴鍧�"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="鐢ㄦ埛鍚嶇О">
- <el-input
- v-model="queryParams.userName"
- placeholder="璇疯緭鍏ョ敤鎴峰悕绉�"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
- </el-form-item>
- </el-form>
-
- <el-table
- v-loading="loading"
- :data="list.slice((pageNum-1)*pageSize,pageNum*pageSize)"
- style="width: 100%;"
- >
- <el-table-column label="搴忓彿" type="index" align="center">
- <template slot-scope="scope">
- <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
- </template>
- </el-table-column>
- <el-table-column label="浼氳瘽缂栧彿" align="center" prop="tokenId" :show-overflow-tooltip="true" />
- <el-table-column label="鐧诲綍鍚嶇О" align="center" prop="userName" :show-overflow-tooltip="true" />
- <el-table-column label="閮ㄩ棬鍚嶇О" align="center" prop="deptName" />
- <el-table-column label="涓绘満" align="center" prop="ipaddr" :show-overflow-tooltip="true" />
- <el-table-column label="鐧诲綍鍦扮偣" align="center" prop="loginLocation" />
- <el-table-column label="娴忚鍣�" align="center" prop="browser" />
- <el-table-column label="鎿嶄綔绯荤粺" align="center" prop="os" />
- <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-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleForceLogout(scope.row)"
- v-hasPermi="['monitor:online:forceLogout']"
- >寮洪��</el-button>
- </template>
- </el-table-column>
- </el-table>
-
- <pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
- </div>
-</template>
-
-<script>
-import { list, forceLogout } from "@/api/monitor/online";
-
-export default {
- data() {
- return {
- // 閬僵灞�
- loading: true,
- // 鎬绘潯鏁�
- total: 0,
- // 琛ㄦ牸鏁版嵁
- list: [],
- pageNum: 1,
- pageSize: 10,
- // 鏌ヨ鍙傛暟
- queryParams: {
- ipaddr: undefined,
- userName: undefined
- }
- };
- },
- created() {
- this.getList();
- },
- methods: {
- /** 鏌ヨ鐧诲綍鏃ュ織鍒楄〃 */
- getList() {
- this.loading = true;
- list(this.queryParams).then(response => {
- this.list = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- /** 鎼滅储鎸夐挳鎿嶄綔 */
- handleQuery() {
- this.pageNum = 1;
- this.getList();
- },
- /** 寮洪��鎸夐挳鎿嶄綔 */
- handleForceLogout(row) {
- this.$confirm('鏄惁纭寮洪��鍚嶇О涓�"' + row.userName + '"鐨勬暟鎹」?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(function() {
- return forceLogout(row.tokenId);
- }).then(() => {
- this.getList();
- this.msgSuccess("寮洪��鎴愬姛");
- }).catch(function() {});
- }
- }
-};
-</script>
-
+<template>
+ <div class="app-container">
+ <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+ <el-form-item label="鐧诲綍鍦板潃" prop="ipaddr">
+ <el-input
+ v-model="queryParams.ipaddr"
+ placeholder="璇疯緭鍏ョ櫥褰曞湴鍧�"
+ clearable
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鐢ㄦ埛鍚嶇О" prop="userName">
+ <el-input
+ v-model="queryParams.userName"
+ placeholder="璇疯緭鍏ョ敤鎴峰悕绉�"
+ clearable
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" 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-table
+ v-loading="loading"
+ :data="list.slice((pageNum-1)*pageSize,pageNum*pageSize)"
+ style="width: 100%;"
+ >
+ <el-table-column label="搴忓彿" type="index" align="center">
+ <template slot-scope="scope">
+ <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="浼氳瘽缂栧彿" align="center" prop="tokenId" :show-overflow-tooltip="true" />
+ <el-table-column label="鐧诲綍鍚嶇О" align="center" prop="userName" :show-overflow-tooltip="true" />
+ <el-table-column label="閮ㄩ棬鍚嶇О" align="center" prop="deptName" />
+ <el-table-column label="涓绘満" align="center" prop="ipaddr" :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="loginTime" width="180">
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.loginTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ @click="handleForceLogout(scope.row)"
+ v-hasPermi="['monitor:online:forceLogout']"
+ >寮洪��</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
+ </div>
+</template>
+
+<script>
+import { list, forceLogout } from "@/api/monitor/online";
+
+export default {
+ name: "Online",
+ data() {
+ return {
+ // 閬僵灞�
+ loading: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 琛ㄦ牸鏁版嵁
+ list: [],
+ pageNum: 1,
+ pageSize: 10,
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ ipaddr: undefined,
+ userName: undefined
+ }
+ };
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ /** 鏌ヨ鐧诲綍鏃ュ織鍒楄〃 */
+ getList() {
+ this.loading = true;
+ list(this.queryParams).then(response => {
+ this.list = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.pageNum = 1;
+ this.getList();
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.resetForm("queryForm");
+ this.handleQuery();
+ },
+ /** 寮洪��鎸夐挳鎿嶄綔 */
+ handleForceLogout(row) {
+ this.$confirm('鏄惁纭寮洪��鍚嶇О涓�"' + row.userName + '"鐨勬暟鎹」?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(function() {
+ return forceLogout(row.tokenId);
+ }).then(() => {
+ this.getList();
+ this.msgSuccess("寮洪��鎴愬姛");
+ }).catch(() => {});
+ }
+ }
+};
+</script>
+
--
Gitblit v1.9.3