Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nse-ui
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
nse-ui
Commits
f90b1231
Commit
f90b1231
authored
Aug 26, 2025
by
wanglizhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统备份模块
parent
ad1dec32
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
156 行增加
和
4 行删除
+156
-4
src/api/systemConfig/systemBackups.js
+32
-0
src/assets/images/systemConfig/Lisencebg.png
+0
-0
src/assets/images/systemConfig/rightMask.png
+0
-0
src/assets/images/systemConfig/systemBackups.png
+0
-0
src/views/systemConfig/License/index.vue
+4
-3
src/views/systemConfig/SystemBackups/index.vue
+117
-0
src/views/systemConfig/SystemBackups/系统备份.md
+1
-0
src/views/systemConfig/SystemLogManage/index.vue
+2
-1
没有找到文件。
src/api/systemConfig/systemBackups.js
0 → 100644
View file @
f90b1231
import
request
from
'@/utils/request'
/**
* 系统备份 - 数据库导入
* @param {*} data
* @returns
*/
export
function
importSql
(
data
)
{
return
request
({
url
:
'/core/backup/importSql'
,
method
:
'post'
,
data
:
data
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
}
})
}
/**
* 系统备份 - 数据库导出
* @param {*} data
* @returns
*/
export
function
exportSql
(
data
)
{
return
request
({
url
:
'/core/backup/exportSql'
,
method
:
'post'
,
data
:
data
,
responseType
:
'blob'
})
}
src/assets/images/
license
/Lisencebg.png
→
src/assets/images/
systemConfig
/Lisencebg.png
View file @
f90b1231
File moved
src/assets/images/
license
/rightMask.png
→
src/assets/images/
systemConfig
/rightMask.png
View file @
f90b1231
File moved
src/assets/images/systemConfig/systemBackups.png
0 → 100644
View file @
f90b1231
20.6 KB
src/views/systemConfig/License/index.vue
View file @
f90b1231
...
@@ -57,8 +57,8 @@ onMounted(() => {
...
@@ -57,8 +57,8 @@ onMounted(() => {
<div
class=
"infoContainer"
>
<div
class=
"infoContainer"
>
<div
class=
"document"
>
<div
class=
"document"
>
<div
class=
"document-left"
>
<div
class=
"document-left"
>
<img
class=
"licenseBg"
src=
"@/assets/images/
license
/Lisencebg.png"
alt=
"license"
/>
<img
class=
"licenseBg"
src=
"@/assets/images/
systemConfig
/Lisencebg.png"
alt=
"license"
/>
<img
class=
"mask"
v-if=
"infoData.status === '3'"
src=
"@/assets/images/
license
/rightMask.png"
alt=
"mask"
/>
<img
class=
"mask"
v-if=
"infoData.status === '3'"
src=
"@/assets/images/
systemConfig
/rightMask.png"
alt=
"mask"
/>
</div>
</div>
<div
class=
"document-right"
>
<div
class=
"document-right"
>
<div
class=
"title-header"
>
{{ getHeaderName() }}
</div>
<div
class=
"title-header"
>
{{ getHeaderName() }}
</div>
...
@@ -73,7 +73,7 @@ onMounted(() => {
...
@@ -73,7 +73,7 @@ onMounted(() => {
:loading=
"uploadLoading"
:loading=
"uploadLoading"
type=
"primary"
>
{{ (infoData.status === '2' || infoData.status === '3') ? '更新授权文件' : '上传授权文件' }}
</el-button>
type=
"primary"
>
{{ (infoData.status === '2' || infoData.status === '3') ? '更新授权文件' : '上传授权文件' }}
</el-button>
<div
class=
"upload"
>
<div
class=
"upload"
>
<CustomUpload
@
file-change=
"handleFileChange"
/>
<CustomUpload
v-if=
"!uploadLoading"
@
file-change=
"handleFileChange"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -151,6 +151,7 @@ onMounted(() => {
...
@@ -151,6 +151,7 @@ onMounted(() => {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
overflow
:
hidden
;
opacity
:
0
;
opacity
:
0
;
}
}
}
}
...
...
src/views/systemConfig/SystemBackups/index.vue
0 → 100644
View file @
f90b1231
<
script
setup
name=
"SystemBackups"
>
import
{
onMounted
,
ref
,
toRefs
,
onBeforeUnmount
}
from
'vue'
import
{
ElMessage
}
from
"element-plus"
;
import
CustomUpload
from
"@/components/CustomUpload/index.vue"
;
import
{
importSql
,
exportSql
}
from
'@/api/systemConfig/systemBackups.js'
const
uploadLoading
=
ref
(
false
);
// 上传回调
const
handleFileChange
=
(
file
)
=>
{
uploadLoading
.
value
=
true
;
const
formData
=
new
FormData
();
formData
.
append
(
'fileUpload'
,
file
.
raw
);
importSql
(
formData
).
then
(
res
=>
{
const
{
flag
}
=
res
if
(
flag
)
{
uploadLoading
.
value
=
false
;
ElMessage
.
success
(
'导入成功'
);
}
uploadLoading
.
value
=
false
;
}).
catch
(
err
=>
{
uploadLoading
.
value
=
false
;
})
}
// 下载数据库
const
exportSqlFunc
=
async
()
=>
{
exportSql
({}).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
]);
const
link
=
document
.
createElement
(
'a'
)
link
.
href
=
URL
.
createObjectURL
(
blob
)
link
.
download
=
`表.sql`
link
.
click
()
URL
.
revokeObjectURL
(
link
.
href
)
ElMessage
.
success
(
'导出成功'
)
uploadLoading
.
value
=
false
;
}).
catch
(
err
=>
{
uploadLoading
.
value
=
false
;
})
}
</
script
>
<
template
>
<div
class=
"app-container scroller"
>
<PageTitle>
<template
#
title
>
系统备份
</
template
>
</PageTitle>
<div
class=
"app-container__body"
>
<div
class=
"updata"
>
<div
class=
"left"
>
<img
src=
"@/assets/images/systemConfig/systemBackups.png"
alt=
""
style=
"vertical-align: middle; padding-right: 10px;"
/>
</div>
<div
class=
"right"
>
<div
class=
"title-header"
>
系统备份
</div>
<div
style=
"margin-top: 30px;"
>
<el-button
icon=
"Upload"
:loading=
"uploadLoading"
style=
"position: relative;"
>
<span>
数据库导入
</span>
<div
class=
"uploadBut"
>
<CustomUpload
v-if=
"!uploadLoading"
@
file-change=
"handleFileChange"
/>
</div>
</el-button>
<el-button
icon=
"Download"
:loading=
"uploadLoading"
@
click=
"exportSqlFunc"
>
数据库导出
</el-button>
</div>
<div
class=
"title-header"
>
恢复配置库
</div>
<div>
<span
class=
"title-item"
>
注意:
</span>
<span>
您可以将配置库信息导出,也可以随时通过导入功能初始化配置库。
</span>
</div>
</div>
</div>
</div>
</div>
</template>
<
style
lang=
"scss"
scoped
>
.app-container__body
{
align-items
:
center
;
.updata
{
margin-top
:
20%
;
width
:
700px
;
display
:
flex
;
.right
{
padding-left
:
20px
;
.uploadBut
{
position
:
absolute
;
top
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
overflow
:
hidden
;
opacity
:
0
;
}
.title-header
{
height
:
84px
;
line-height
:
40px
;
font-weight
:
700
;
font-size
:
18px
;
color
:
#666
;
position
:
relative
;
top
:
40px
;
}
.title-item
{
font-weight
:
700
;
line-height
:
30px
;
color
:
#666
;
}
}
}
}
</
style
>
\ No newline at end of file
src/views/systemConfig/SystemBackups/系统备份.md
0 → 100644
View file @
f90b1231
++ "b/src/views/systemConfig/SystemBackups/\347\263\273\347\273\237\345\244\207\344\273\275.md"
src/views/systemConfig/SystemLogManage/index.vue
View file @
f90b1231
...
@@ -10,6 +10,7 @@ const queryData = reactive({
...
@@ -10,6 +10,7 @@ const queryData = reactive({
date
:
''
date
:
''
})
// 查询条件
})
// 查询条件
const
resultStr
=
ref
(
''
)
// 日志值
const
resultStr
=
ref
(
''
)
// 日志值
const
loading
=
ref
(
false
)
// 查询月份
// 查询月份
const
handelQuery
=
async
()
=>
{
const
handelQuery
=
async
()
=>
{
...
@@ -71,7 +72,7 @@ const downloadFunc = async () => {
...
@@ -71,7 +72,7 @@ const downloadFunc = async () => {
link
.
download
=
`系统日志
${
queryData
.
date
}
.log`
link
.
download
=
`系统日志
${
queryData
.
date
}
.log`
link
.
click
()
link
.
click
()
URL
.
revokeObjectURL
(
link
.
href
)
URL
.
revokeObjectURL
(
link
.
href
)
ElMessage
.
success
(
'
下载
成功'
)
ElMessage
.
success
(
'成功'
)
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论