😴发布 4.8.2 正式进入维护状态

This commit is contained in:
疯狂的狮子Li
2023-11-27 13:23:41 +08:00
parent a6f62ca86f
commit 267ff79b0c
53 changed files with 398 additions and 288 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ruoyi-vue-plus",
"version": "4.8.1",
"version": "4.8.2",
"description": "RuoYi-Vue-Plus后台管理系统",
"author": "LionLi",
"license": "MIT",
@ -15,7 +15,7 @@
},
"dependencies": {
"@element-plus/icons-vue": "2.0.10",
"@vueup/vue-quill": "1.1.0",
"@vueup/vue-quill": "1.2.0",
"@vueuse/core": "9.5.0",
"axios": "0.27.2",
"echarts": "5.4.0",

View File

@ -9,14 +9,13 @@
name="file"
:show-file-list="false"
:headers="headers"
style="display: none"
ref="uploadRef"
v-if="type == 'url'"
>
</el-upload>
<div class="editor">
<quill-editor
ref="myQuillEditor"
ref="quillEditorRef"
v-model:content="content"
contentType="html"
@textChange="(e) => $emit('update:modelValue', content)"
@ -68,7 +67,7 @@ const { proxy } = getCurrentInstance();
// 上传的图片服务器地址
const uploadUrl = ref(import.meta.env.VITE_APP_BASE_API + "/system/oss/upload");
const headers = ref({ Authorization: "Bearer " + getToken() });
const myQuillEditor = ref();
const quillEditorRef = ref();
const options = ref({
theme: "snow",
@ -101,7 +100,7 @@ const options = ref({
},
}
},
placeholder: '请输入内容',
placeholder: "请输入内容",
readOnly: props.readOnly,
});
@ -114,7 +113,7 @@ const styles = computed(() => {
style.height = `${props.height}px`;
}
return style;
})
});
const content = ref("");
watch(() => props.modelValue, (v) => {
@ -125,10 +124,10 @@ watch(() => props.modelValue, (v) => {
// 图片上传成功返回图片地址
function handleUploadSuccess(res, file) {
// 获取富文本实例
let quill = toRaw(myQuillEditor.value).getQuill();
// 如果上传成功
if (res.code == 200) {
// 获取富文本实例
let quill = toRaw(quillEditorRef.value).getQuill();
// 获取光标位置
let length = quill.selection.savedRange.index;
// 插入图片res为服务器返回的图片链接地址
@ -144,6 +143,13 @@ function handleUploadSuccess(res, file) {
// 图片上传前拦截
function handleBeforeUpload(file) {
const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"];
const isJPG = type.includes(file.type);
//检验文件格式
if (!isJPG) {
proxy.$modal.msgError(`图片格式错误!`);
return false;
}
// 校检文件大小
if (props.fileSize) {
const isLt = file.size / 1024 / 1024 < props.fileSize;
@ -164,6 +170,9 @@ function handleUploadError(err) {
</script>
<style>
.editor-img-uploader {
display: none;
}
.editor, .ql-toolbar {
white-space: pre-wrap !important;
line-height: normal !important;

View File

@ -45,12 +45,17 @@ function close() {
}
function change(val) {
const path = val.path;
const query = val.query;
if (isHttp(path)) {
// http(s):// 路径新窗口打开
const pindex = path.indexOf("http");
window.open(path.substr(pindex, path.length), "_blank");
} else {
router.push(path)
if (query) {
router.push({ path: path, query: JSON.parse(query) });
} else {
router.push(path)
}
}
search.value = ''
@ -77,7 +82,7 @@ function initFuse(list) {
}
// Filter out the routes that can be displayed in the sidebar
// And generate the internationalized title
function generateRoutes(routes, basePath = '', prefixTitle = []) {
function generateRoutes(routes, basePath = '', prefixTitle = [], query = {}) {
let res = []
for (const r of routes) {
@ -99,9 +104,13 @@ function generateRoutes(routes, basePath = '', prefixTitle = []) {
}
}
if (r.query) {
data.query = r.query
}
// recursive child routes
if (r.children) {
const tempRoutes = generateRoutes(r.children, data.path, data.title)
const tempRoutes = generateRoutes(r.children, data.path, data.title, data.query)
if (tempRoutes.length >= 1) {
res = [...res, ...tempRoutes]
}
@ -176,4 +185,4 @@ watch(searchPool, (list) => {
}
}
}
</style>
</style>

View File

@ -5,15 +5,23 @@
:key="item.path"
:iframeId="'iframe' + index"
v-show="route.path === item.path"
:src="item.meta.link"
:src="iframeUrl(item.meta.link, item.query)"
></inner-link>
</transition-group>
</template>
<script setup>
import InnerLink from "../InnerLink/index"
import useTagsViewStore from '@/store/modules/tagsView'
import InnerLink from "../InnerLink/index";
import useTagsViewStore from "@/store/modules/tagsView";
const route = useRoute();
const tagsViewStore = useTagsViewStore()
const tagsViewStore = useTagsViewStore();
function iframeUrl(url, query) {
if (Object.keys(query).length > 0) {
let params = Object.keys(query).map((key) => key + "=" + query[key]).join("&");
return url + "?" + params;
}
return url;
}
</script>

View File

@ -101,6 +101,10 @@ function filterChildren(childrenMap, lastRouter = false) {
}
if (lastRouter) {
el.path = lastRouter.path + '/' + el.path
if (el.children && el.children.length) {
children = children.concat(filterChildren(el.children, el))
return
}
}
children = children.concat(el)
})

View File

@ -7,6 +7,7 @@ const useUserStore = defineStore(
{
state: () => ({
token: getToken(),
id: '',
name: '',
avatar: '',
roles: [],
@ -42,8 +43,9 @@ const useUserStore = defineStore(
} else {
this.roles = ['ROLE_DEFAULT']
}
this.id = user.userId
this.name = user.userName
this.avatar = avatar;
this.avatar = avatar
resolve(res)
}).catch(error => {
reject(error)

View File

@ -336,7 +336,7 @@ function submitForm() {
proxy.$refs["demoRef"].validate(valid => {
if (valid) {
buttonLoading.value = true;
if (form.value.ossConfigId != null) {
if (form.value.id != null) {
updateDemo(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;

View File

@ -243,7 +243,7 @@ function submitForm() {
proxy.$refs["treeRef"].validate(valid => {
if (valid) {
buttonLoading.value = true;
if (form.value.ossConfigId != null) {
if (form.value.id != null) {
updateTree(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;

View File

@ -103,7 +103,7 @@
</template>
<script setup name="Index">
const version = ref('4.8.1')
const version = ref('4.8.2')
function goTarget(url) {
window.open(url, '__blank')

View File

@ -1,7 +1,16 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="系统模块" prop="title">
<el-form-item label="操作地址" prop="operIp">
<el-input
v-model="queryParams.operIp"
placeholder="请输入操作地址"
clearable
style="width: 240px;"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="系统模块" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入系统模块"
@ -107,9 +116,12 @@
<dict-tag :options="sys_oper_type" :value="scope.row.businessType" />
</template>
</el-table-column>
<el-table-column label="请求方式" align="center" prop="requestMethod" />
<el-table-column label="操作人员" align="center" width="110" prop="operName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
<el-table-column label="主机" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
<el-table-column label="操作状态" align="center" prop="status">
<el-table-column label="部门" align="center" prop="deptName" width="130" :show-overflow-tooltip="true" />
<el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
<el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" />
<el-table-column label="操作状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_common_status" :value="scope.row.status" />
</template>
@ -143,15 +155,16 @@
<el-dialog title="操作日志详细" v-model="open" width="700px" append-to-body>
<el-form :model="form" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
<el-col :span="24">
<el-form-item
label="登录信息:"
>{{ form.operName }} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
>{{ form.operName }} / {{form.deptName}} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="请求地址">{{ form.operUrl }}</el-form-item>
<el-form-item label="请求方式:">{{ form.requestMethod }}</el-form-item>
<el-form-item label="请求信息">{{ form.requestMethod }} {{form.operUrl }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="操作方法:">{{ form.method }}</el-form-item>
@ -211,6 +224,7 @@ const data = reactive({
queryParams: {
pageNum: 1,
pageSize: 10,
operIp: undefined,
title: undefined,
operName: undefined,
businessType: undefined,

View File

@ -246,7 +246,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType != 'F'">
<el-col :span="12">
<el-form-item>
<template #label>
<span>

View File

@ -149,7 +149,7 @@
<el-form-item prop="roleKey">
<template #label>
<span>
<el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">
<el-tooltip content="控制器中定义的权限字符,如:@SaCheckRole('admin')" placement="top">
<el-icon><question-filled /></el-icon>
</el-tooltip>
权限字符

View File

@ -605,4 +605,7 @@ function submitForm() {
getDeptTree();
getList();
proxy.getConfigKey("sys.user.initPassword").then(response => {
initPassword.value = response.msg;
});
</script>