Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
fee8a595
"jetbrains:/idea/checkout/git" did not exist on "c4a29593969892b4e6574a66636901c1697aa57f"
Commit
fee8a595
authored
Dec 02, 2019
by
RuoYi
Browse files
若依 2.0
parent
cef26e77
Changes
76
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
fee8a595
...
...
@@ -71,6 +71,10 @@ https://www.oschina.net/project/top_cn_2019#ruoyi
<td><img
src=
"https://oscimg.oschina.net/oscnet/509d2708cfd762b6e6339364cac1cc1970c.jpg"
/></td>
</tr>
<tr>
<td><img
src=
"https://oscimg.oschina.net/oscnet/up-f1fd681cc9d295db74e85ad6d2fe4389454.png"
/></td>
<td><img
src=
"https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"
/></td>
</tr>
<tr>
<td><img
src=
"https://oscimg.oschina.net/oscnet/b6115bc8c31de52951982e509930b20684a.jpg"
/></td>
<td><img
src=
"https://oscimg.oschina.net/oscnet/5f3d39a141f21f81b90536f391b8408f1fa.jpg"
/></td>
</tr>
...
...
ruoyi-ui/package.json
View file @
fee8a595
{
"name"
:
"ruoyi"
,
"version"
:
"
1.1
.0"
,
"version"
:
"
2.0
.0"
,
"description"
:
"若依管理系统"
,
"author"
:
"若依"
,
"license"
:
"MIT"
,
...
...
ruoyi-ui/src/api/system/dict/type.js
View file @
fee8a595
...
...
@@ -51,3 +51,11 @@ export function exportType(query) {
params
:
query
})
}
// 获取字典选择框列表
export
function
optionselect
()
{
return
request
({
url
:
'
/system/dict/type/optionselect
'
,
method
:
'
get
'
})
}
\ No newline at end of file
ruoyi-ui/src/api/system/user.js
View file @
fee8a595
import
request
from
'
@/utils/request
'
import
{
praseStrEmpty
}
from
"
@/utils/ruoyi
"
;
// 查询用户列表
export
function
listUser
(
query
)
{
...
...
@@ -12,7 +13,7 @@ export function listUser(query) {
// 查询用户详细
export
function
getUser
(
userId
)
{
return
request
({
url
:
'
/system/user/
'
+
userId
,
url
:
'
/system/user/
'
+
praseStrEmpty
(
userId
)
,
method
:
'
get
'
})
}
...
...
ruoyi-ui/src/api/tool/gen.js
0 → 100644
View file @
fee8a595
import
request
from
'
@/utils/request
'
// 查询生成表数据
export
function
listTable
(
query
)
{
return
request
({
url
:
'
/tool/gen/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询db数据库列表
export
function
listDbTable
(
query
)
{
return
request
({
url
:
'
/tool/gen/db/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 查询表详细信息
export
function
getGenTable
(
tableId
)
{
return
request
({
url
:
'
/tool/gen/
'
+
tableId
,
method
:
'
get
'
})
}
// 修改代码生成信息
export
function
updateGenTable
(
data
)
{
return
request
({
url
:
'
/tool/gen
'
,
method
:
'
put
'
,
data
:
data
})
}
// 导入表
export
function
importTable
(
data
)
{
return
request
({
url
:
'
/tool/gen/importTable
'
,
method
:
'
post
'
,
params
:
data
})
}
// 预览生成代码
export
function
previewTable
(
tableId
)
{
return
request
({
url
:
'
/tool/gen/preview/
'
+
tableId
,
method
:
'
get
'
})
}
// 删除表数据
export
function
delTable
(
tableId
)
{
return
request
({
url
:
'
/tool/gen/
'
+
tableId
,
method
:
'
delete
'
})
}
ruoyi-ui/src/assets/styles/ruoyi.scss
View file @
fee8a595
...
...
@@ -53,6 +53,10 @@
margin-left
:
20px
;
}
.el-dialog
{
margin-top
:
6vh
!
important
;
}
.el-table
.el-table__header-wrapper
th
{
word-break
:
break-word
;
background-color
:
#f8f8f9
;
...
...
@@ -61,6 +65,16 @@
font-size
:
13px
;
}
/** 表单布局 **/
.form-header
{
font-size
:
15px
;
color
:
#6379bb
;
border-bottom
:
1px
solid
#ddd
;
margin
:
8px
10px
25px
10px
;
padding-bottom
:
5px
}
/** 表格布局 **/
.pagination-container
{
position
:
relative
;
height
:
25px
;
...
...
ruoyi-ui/src/router/index.js
View file @
fee8a595
...
...
@@ -26,17 +26,6 @@ import Layout from '@/layout'
// 公共路由
export
const
constantRoutes
=
[
{
path
:
'
/redirect
'
,
component
:
Layout
,
hidden
:
true
,
children
:
[
{
path
:
'
/redirect/:path*
'
,
component
:
()
=>
import
(
'
@/views/redirect
'
)
}
]
},
{
path
:
'
/login
'
,
component
:
()
=>
import
(
'
@/views/login
'
),
...
...
@@ -74,7 +63,7 @@ export const constantRoutes = [
{
path
:
'
profile
'
,
component
:
()
=>
import
(
'
@/views/system/user/profile/index
'
),
name
:
'
个人中心
'
,
name
:
'
Profile
'
,
meta
:
{
title
:
'
个人中心
'
,
icon
:
'
user
'
}
}
]
...
...
@@ -87,10 +76,23 @@ export const constantRoutes = [
{
path
:
'
type/data/:dictId(
\\
d+)
'
,
component
:
()
=>
import
(
'
@/views/system/dict/data
'
),
name
:
'
字典数据
'
,
name
:
'
Data
'
,
meta
:
{
title
:
'
字典数据
'
,
icon
:
''
}
}
]
},
{
path
:
'
/gen
'
,
component
:
Layout
,
hidden
:
true
,
children
:
[
{
path
:
'
edit
'
,
component
:
()
=>
import
(
'
@/views/tool/gen/editTable
'
),
name
:
'
GenEdit
'
,
meta
:
{
title
:
'
修改生成配置
'
}
}
]
}
]
...
...
ruoyi-ui/src/utils/ruoyi.js
View file @
fee8a595
...
...
@@ -9,21 +9,21 @@ const baseURL = process.env.VUE_APP_BASE_API
export
function
parseTime
(
time
,
pattern
)
{
if
(
arguments
.
length
===
0
)
{
return
null
}
const
format
=
pattern
||
'
{y}-{m}-{d} {h}:{i}:{s}
'
let
date
if
(
typeof
time
===
'
object
'
)
{
}
const
format
=
pattern
||
'
{y}-{m}-{d} {h}:{i}:{s}
'
let
date
if
(
typeof
time
===
'
object
'
)
{
date
=
time
}
else
{
}
else
{
if
((
typeof
time
===
'
string
'
)
&&
(
/^
[
0-9
]
+$/
.
test
(
time
)))
{
time
=
parseInt
(
time
)
time
=
parseInt
(
time
)
}
if
((
typeof
time
===
'
number
'
)
&&
(
time
.
toString
().
length
===
10
))
{
time
=
time
*
1000
time
=
time
*
1000
}
date
=
new
Date
(
time
)
}
const
formatObj
=
{
}
const
formatObj
=
{
y
:
date
.
getFullYear
(),
m
:
date
.
getMonth
()
+
1
,
d
:
date
.
getDate
(),
...
...
@@ -31,22 +31,22 @@ export function parseTime(time, pattern) {
i
:
date
.
getMinutes
(),
s
:
date
.
getSeconds
(),
a
:
date
.
getDay
()
}
const
time_str
=
format
.
replace
(
/{
(
y|m|d|h|i|s|a
)
+}/g
,
(
result
,
key
)
=>
{
}
const
time_str
=
format
.
replace
(
/{
(
y|m|d|h|i|s|a
)
+}/g
,
(
result
,
key
)
=>
{
let
value
=
formatObj
[
key
]
// Note: getDay() returns 0 on Sunday
if
(
key
===
'
a
'
)
{
return
[
'
日
'
,
'
一
'
,
'
二
'
,
'
三
'
,
'
四
'
,
'
五
'
,
'
六
'
][
value
]
}
if
(
key
===
'
a
'
)
{
return
[
'
日
'
,
'
一
'
,
'
二
'
,
'
三
'
,
'
四
'
,
'
五
'
,
'
六
'
][
value
]
}
if
(
result
.
length
>
0
&&
value
<
10
)
{
value
=
'
0
'
+
value
value
=
'
0
'
+
value
}
return
value
||
0
})
return
time_str
})
return
time_str
}
// 表单重置
export
function
resetForm
(
refName
)
{
if
(
this
.
$refs
[
refName
]
!==
undefined
)
{
if
(
this
.
$refs
[
refName
])
{
this
.
$refs
[
refName
].
resetFields
();
}
}
...
...
@@ -54,11 +54,11 @@ export function resetForm(refName) {
// 添加日期范围
export
function
addDateRange
(
params
,
dateRange
)
{
var
search
=
params
;
if
(
null
!=
dateRange
)
{
search
.
params
=
{
beginTime
:
this
.
dateRange
[
0
],
end
Time
:
this
.
dateRange
[
1
]
}
;
search
.
beginTime
=
""
;
search
.
endTime
=
""
;
if
(
null
!=
dateRange
&&
''
!=
dateRange
)
{
search
.
begin
Time
=
this
.
dateRange
[
0
];
search
.
endTime
=
this
.
dateRange
[
1
]
;
}
return
search
;
}
...
...
@@ -92,4 +92,12 @@ export function sprintf(str) {
return
arg
;
});
return
flag
?
str
:
''
;
}
// 转换字符串,undefined,null等转化为""
export
function
praseStrEmpty
(
str
)
{
if
(
!
str
||
str
==
"
undefined
"
||
str
==
"
null
"
)
{
return
""
;
}
return
str
;
}
\ No newline at end of file
ruoyi-ui/src/utils/zipdownload.js
0 → 100644
View file @
fee8a595
import
axios
from
'
axios
'
import
{
getToken
}
from
'
@/utils/auth
'
const
mimeMap
=
{
xlsx
:
'
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
'
,
zip
:
'
application/zip
'
}
const
baseUrl
=
process
.
env
.
VUE_APP_BASE_API
export
function
downLoadZip
(
str
,
filename
)
{
var
url
=
baseUrl
+
str
axios
({
method
:
'
get
'
,
url
:
url
,
responseType
:
'
blob
'
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
getToken
()
}
}).
then
(
res
=>
{
resolveBlob
(
res
,
mimeMap
.
zip
)
})
}
/**
* 解析blob响应内容并下载
* @param {*} res blob响应内容
* @param {String} mimeType MIME类型
*/
export
function
resolveBlob
(
res
,
mimeType
)
{
const
aLink
=
document
.
createElement
(
'
a
'
)
var
blob
=
new
Blob
([
res
.
data
],
{
type
:
mimeType
})
// //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
var
patt
=
new
RegExp
(
'
filename=([^;]+
\\
.[^
\\
.;]+);*
'
)
var
contentDisposition
=
decodeURI
(
res
.
headers
[
'
content-disposition
'
])
var
result
=
patt
.
exec
(
contentDisposition
)
var
fileName
=
result
[
1
]
fileName
=
fileName
.
replace
(
/
\"
/g
,
''
)
aLink
.
href
=
URL
.
createObjectURL
(
blob
)
aLink
.
setAttribute
(
'
download
'
,
fileName
)
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
)
aLink
.
click
()
document
.
body
.
appendChild
(
aLink
)
}
ruoyi-ui/src/views/monitor/druid/index.vue
View file @
fee8a595
...
...
@@ -5,6 +5,7 @@
</
template
>
<
script
>
export
default
{
name
:
"
Druid
"
,
data
()
{
return
{
src
:
process
.
env
.
VUE_APP_BASE_API
+
"
/druid/index.html
"
,
...
...
ruoyi-ui/src/views/monitor/logininfor/index.vue
View file @
fee8a595
...
...
@@ -117,6 +117,7 @@
import
{
list
,
delLogininfor
,
cleanLogininfor
,
exportLogininfor
}
from
"
@/api/monitor/logininfor
"
;
export
default
{
name
:
"
Logininfor
"
,
data
()
{
return
{
// 遮罩层
...
...
ruoyi-ui/src/views/monitor/online/index.vue
View file @
fee8a595
...
...
@@ -68,6 +68,7 @@
import
{
list
,
forceLogout
}
from
"
@/api/monitor/online
"
;
export
default
{
name
:
"
Online
"
,
data
()
{
return
{
// 遮罩层
...
...
ruoyi-ui/src/views/monitor/operlog/index.vue
View file @
fee8a595
...
...
@@ -186,6 +186,7 @@
import
{
list
,
delOperlog
,
cleanOperlog
,
exportOperlog
}
from
"
@/api/monitor/operlog
"
;
export
default
{
name
:
"
Operlog
"
,
data
()
{
return
{
// 遮罩层
...
...
ruoyi-ui/src/views/monitor/server/index.vue
View file @
fee8a595
...
...
@@ -175,6 +175,7 @@
import
{
getServer
}
from
"
@/api/monitor/server
"
;
export
default
{
name
:
"
Server
"
,
data
()
{
return
{
// 加载层信息
...
...
ruoyi-ui/src/views/redirect.vue
deleted
100644 → 0
View file @
cef26e77
<
script
>
export
default
{
created
()
{
const
{
params
,
query
}
=
this
.
$route
const
{
path
}
=
params
this
.
$router
.
replace
({
path
:
'
/
'
+
path
,
query
})
},
render
:
function
(
h
)
{
return
h
()
// avoid warning message
}
}
</
script
>
ruoyi-ui/src/views/system/config/index.vue
View file @
fee8a595
...
...
@@ -168,6 +168,7 @@
import
{
listConfig
,
getConfig
,
delConfig
,
addConfig
,
updateConfig
,
exportConfig
}
from
"
@/api/system/config
"
;
export
default
{
name
:
"
Config
"
,
data
()
{
return
{
// 遮罩层
...
...
ruoyi-ui/src/views/system/dept/index.vue
View file @
fee8a595
...
...
@@ -143,6 +143,7 @@ import Treeselect from "@riophae/vue-treeselect";
import
"
@riophae/vue-treeselect/dist/vue-treeselect.css
"
;
export
default
{
name
:
"
Dept
"
,
components
:
{
Treeselect
},
data
()
{
return
{
...
...
ruoyi-ui/src/views/system/dict/data.vue
View file @
fee8a595
...
...
@@ -159,6 +159,7 @@ import { listData, getData, delData, addData, updateData, exportData } from "@/a
import
{
listType
,
getType
}
from
"
@/api/system/dict/type
"
;
export
default
{
name
:
"
Data
"
,
data
()
{
return
{
// 遮罩层
...
...
ruoyi-ui/src/views/system/dict/index.vue
View file @
fee8a595
...
...
@@ -176,6 +176,7 @@
import
{
listType
,
getType
,
delType
,
addType
,
updateType
,
exportType
}
from
"
@/api/system/dict/type
"
;
export
default
{
name
:
"
Dict
"
,
data
()
{
return
{
// 遮罩层
...
...
ruoyi-ui/src/views/system/menu/index.vue
View file @
fee8a595
...
...
@@ -179,6 +179,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import
IconSelect
from
"
@/components/IconSelect
"
;
export
default
{
name
:
"
Menu
"
,
components
:
{
Treeselect
,
IconSelect
},
data
()
{
return
{
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment