update 同步 ruoyi

* update element-ui 2.15.10 => 2.15.12
* update 优化 tagsView右选框,首页不应该存在关闭左侧选项
* update copyright 2023
* update 优化 监控页面图标显示
* update 优化 日志注解支持排除指定的请求参数
* update 优化 业务校验优化代码
* fix 修复 优化文件下载出现的异常
* fix 修复 修改密码日志存储明文问题
This commit is contained in:
疯狂的狮子li
2023-03-07 12:20:14 +08:00
parent d6c49b915f
commit 31194414eb
37 changed files with 102 additions and 140 deletions

View File

@ -87,7 +87,7 @@ export default {
},
isFirstView() {
try {
return this.selectedTag.fullPath === this.visitedViews[1].fullPath || this.selectedTag.fullPath === '/index'
return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath
} catch (err) {
return false
}

View File

@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/auth-redirect', '/bind', '/register']
const whiteList = ['/login', '/register']
router.beforeEach((to, from, next) => {
NProgress.start()

View File

@ -17,9 +17,9 @@ export default {
url: url,
responseType: 'blob',
headers: { 'Authorization': 'Bearer ' + getToken() }
}).then(async (res) => {
const isLogin = await blobValidate(res.data);
if (isLogin) {
}).then((res) => {
const isBlob = blobValidate(res.data);
if (isBlob) {
const blob = new Blob([res.data], { type: 'application/octet-stream' })
this.saveAs(blob, decodeURIComponent(res.headers['download-filename']))
} else {
@ -42,9 +42,9 @@ export default {
'Authorization': 'Bearer ' + getToken(),
'datasource': localStorage.getItem("dataName")
}
}).then(async (res) => {
const isLogin = await blobValidate(res.data);
if (isLogin) {
}).then((res) => {
const isBlob = blobValidate(res.data);
if (isBlob) {
const blob = new Blob([res.data], { type: 'application/zip' })
this.saveAs(blob, name)
} else {

View File

@ -74,7 +74,7 @@ service.interceptors.response.use(res => {
// 获取错误信息
const msg = errorCode[code] || res.data.msg || errorCode['default']
// 二进制数据则直接返回
if(res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer'){
if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
return res.data
}
if (code === 401) {
@ -127,8 +127,8 @@ export function download(url, params, filename, config) {
responseType: 'blob',
...config
}).then(async (data) => {
const isLogin = await blobValidate(data);
if (isLogin) {
const isBlob = blobValidate(data);
if (isBlob) {
const blob = new Blob([data])
saveAs(blob, filename)
} else {

View File

@ -228,12 +228,6 @@ export function tansParams(params) {
}
// 验证是否为blob格式
export async function blobValidate(data) {
try {
const text = await data.text();
JSON.parse(text);
return false;
} catch (error) {
return true;
}
export function blobValidate(data) {
return data.type !== 'application/json'
}

View File

@ -56,7 +56,7 @@
</el-form>
<!-- 底部 -->
<div class="el-login-footer">
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>
<span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>
</div>
</div>
</template>

View File

@ -3,7 +3,7 @@
<el-row>
<el-col :span="24" class="card-box">
<el-card>
<div slot="header"><span>基本信息</span></div>
<div slot="header"><span><i class="el-icon-monitor"></i> 基本信息</span></div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<table cellspacing="0" style="width: 100%">
<tbody>
@ -45,7 +45,7 @@
<el-col :span="12" class="card-box">
<el-card>
<div slot="header"><span>命令统计</span></div>
<div slot="header"><span><i class="el-icon-pie-chart"></i> 命令统计</span></div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<div ref="commandstats" style="height: 420px" />
</div>
@ -54,9 +54,7 @@
<el-col :span="12" class="card-box">
<el-card>
<div slot="header">
<span>内存信息</span>
</div>
<div slot="header"><span><i class="el-icon-odometer"></i> 内存信息</span></div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<div ref="usedmemory" style="height: 420px" />
</div>

View File

@ -4,7 +4,7 @@
<el-col :span="8">
<el-card style="height: calc(100vh - 125px)">
<div slot="header">
<span>缓存列表</span>
<span><i class="el-icon-collection"></i> 缓存列表</span>
<el-button
style="float: right; padding: 3px 0"
type="text"
@ -62,7 +62,7 @@
<el-col :span="8">
<el-card style="height: calc(100vh - 125px)">
<div slot="header">
<span>键名列表</span>
<span><i class="el-icon-key"></i> 键名列表</span>
<el-button
style="float: right; padding: 3px 0"
type="text"
@ -112,7 +112,7 @@
<el-col :span="8">
<el-card :bordered="false" style="height: calc(100vh - 125px)">
<div slot="header">
<span>缓存内容</span>
<span><i class="el-icon-document"></i> 缓存内容</span>
<el-button
style="float: right; padding: 3px 0"
type="text"

View File

@ -61,7 +61,7 @@
</el-form>
<!-- 底部 -->
<div class="el-register-footer">
<span>Copyright © 2018-2022 ruoyi.vip All Rights Reserved.</span>
<span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>
</div>
</div>
</template>

View File

@ -107,7 +107,7 @@
<el-table-column label="参数主键" align="center" prop="configId" />
<el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />
<el-table-column label="参数键名" align="center" prop="configKey" :show-overflow-tooltip="true" />
<el-table-column label="参数键值" align="center" prop="configValue" />
<el-table-column label="参数键值" align="center" prop="configValue" :show-overflow-tooltip="true" />
<el-table-column label="系统内置" align="center" prop="configType">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.configType"/>