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
46444bd0
Commit
46444bd0
authored
Oct 08, 2019
by
RuoYi
Browse files
RuoYi-Vue 1.0
parent
5bc74554
Changes
400
Hide whitespace changes
Inline
Side-by-side
ruoyi-ui/src/utils/ruoyi.js
0 → 100644
View file @
46444bd0
/**
* 通用js方法封装处理
* Copyright (c) 2019 ruoyi
*/
// 日期格式化
export
function
dateFormat
(
date
,
pattern
)
{
var
d
=
new
Date
(
date
).
Format
(
"
yyyy-MM-dd hh:mm:ss
"
);
if
(
pattern
)
{
d
=
new
Date
(
date
).
Format
(
pattern
);
}
return
d
.
toLocaleString
();
}
// 表单重置
export
function
resetForm
(
refName
)
{
if
(
this
.
$refs
[
refName
]
!==
undefined
)
{
this
.
$refs
[
refName
].
resetFields
();
}
}
// 添加日期范围
export
function
addDateRange
(
params
,
dateRange
)
{
var
search
=
params
;
if
(
null
!=
dateRange
)
{
search
.
params
=
{
beginTime
:
this
.
dateRange
[
0
],
endTime
:
this
.
dateRange
[
1
]
};
}
return
search
;
}
// 回显数据字典
export
function
selectDictLabel
(
datas
,
value
)
{
var
actions
=
[];
Object
.
keys
(
datas
).
map
((
key
)
=>
{
if
(
datas
[
key
].
dictValue
==
(
''
+
value
))
{
actions
.
push
(
datas
[
key
].
dictLabel
);
return
false
;
}
})
return
actions
.
join
(
''
);
}
// 字符串格式化(%s )
export
function
sprintf
(
str
)
{
var
args
=
arguments
,
flag
=
true
,
i
=
1
;
str
=
str
.
replace
(
/%s/g
,
function
()
{
var
arg
=
args
[
i
++
];
if
(
typeof
arg
===
'
undefined
'
)
{
flag
=
false
;
return
''
;
}
return
arg
;
});
return
flag
?
str
:
''
;
}
Date
.
prototype
.
Format
=
function
(
fmt
)
{
var
o
=
{
"
M+
"
:
this
.
getMonth
()
+
1
,
// 月份
"
d+
"
:
this
.
getDate
(),
// 日
"
h+
"
:
this
.
getHours
(),
// 小时
"
m+
"
:
this
.
getMinutes
(),
// 分
"
s+
"
:
this
.
getSeconds
(),
// 秒
"
q+
"
:
Math
.
floor
((
this
.
getMonth
()
+
3
)
/
3
),
// 季度
"
S
"
:
this
.
getMilliseconds
()
// 毫秒
};
if
(
/
(
y+
)
/
.
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
this
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
for
(
var
k
in
o
)
if
(
new
RegExp
(
"
(
"
+
k
+
"
)
"
).
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"
00
"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)));
return
fmt
;
}
\ No newline at end of file
ruoyi-ui/src/utils/scroll-to.js
0 → 100644
View file @
46444bd0
Math
.
easeInOutQuad
=
function
(
t
,
b
,
c
,
d
)
{
t
/=
d
/
2
if
(
t
<
1
)
{
return
c
/
2
*
t
*
t
+
b
}
t
--
return
-
c
/
2
*
(
t
*
(
t
-
2
)
-
1
)
+
b
}
// requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
var
requestAnimFrame
=
(
function
()
{
return
window
.
requestAnimationFrame
||
window
.
webkitRequestAnimationFrame
||
window
.
mozRequestAnimationFrame
||
function
(
callback
)
{
window
.
setTimeout
(
callback
,
1000
/
60
)
}
})()
/**
* Because it's so fucking difficult to detect the scrolling element, just move them all
* @param {number} amount
*/
function
move
(
amount
)
{
document
.
documentElement
.
scrollTop
=
amount
document
.
body
.
parentNode
.
scrollTop
=
amount
document
.
body
.
scrollTop
=
amount
}
function
position
()
{
return
document
.
documentElement
.
scrollTop
||
document
.
body
.
parentNode
.
scrollTop
||
document
.
body
.
scrollTop
}
/**
* @param {number} to
* @param {number} duration
* @param {Function} callback
*/
export
function
scrollTo
(
to
,
duration
,
callback
)
{
const
start
=
position
()
const
change
=
to
-
start
const
increment
=
20
let
currentTime
=
0
duration
=
(
typeof
(
duration
)
===
'
undefined
'
)
?
500
:
duration
var
animateScroll
=
function
()
{
// increment the time
currentTime
+=
increment
// find the value with the quadratic in-out easing function
var
val
=
Math
.
easeInOutQuad
(
currentTime
,
start
,
change
,
duration
)
// move the document.body
move
(
val
)
// do the animation unless its over
if
(
currentTime
<
duration
)
{
requestAnimFrame
(
animateScroll
)
}
else
{
if
(
callback
&&
typeof
(
callback
)
===
'
function
'
)
{
// the animation is done so lets callback
callback
()
}
}
}
animateScroll
()
}
ruoyi-ui/src/utils/validate.js
0 → 100644
View file @
46444bd0
/**
* @param {string} path
* @returns {Boolean}
*/
export
function
isExternal
(
path
)
{
return
/^
(
https
?
:|mailto:|tel:
)
/
.
test
(
path
)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export
function
validUsername
(
str
)
{
const
valid_map
=
[
'
admin
'
,
'
editor
'
]
return
valid_map
.
indexOf
(
str
.
trim
())
>=
0
}
/**
* @param {string} url
* @returns {Boolean}
*/
export
function
validURL
(
url
)
{
const
reg
=
/^
(
https
?
|ftp
)
:
\/\/([
a-zA-Z0-9.-
]
+
(
:
[
a-zA-Z0-9.&%$-
]
+
)
*@
)
*
((
25
[
0-5
]
|2
[
0-4
][
0-9
]
|1
[
0-9
]{2}
|
[
1-9
][
0-9
]?)(\.(
25
[
0-5
]
|2
[
0-4
][
0-9
]
|1
[
0-9
]{2}
|
[
1-9
]?[
0-9
])){3}
|
([
a-zA-Z0-9-
]
+
\.)
*
[
a-zA-Z0-9-
]
+
\.(
com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|
[
a-zA-Z
]{2}))(
:
[
0-9
]
+
)
*
(\/(
$|
[
a-zA-Z0-9.,?'
\\
+&%$#=~_-
]
+
))
*$/
return
reg
.
test
(
url
)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export
function
validLowerCase
(
str
)
{
const
reg
=
/^
[
a-z
]
+$/
return
reg
.
test
(
str
)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export
function
validUpperCase
(
str
)
{
const
reg
=
/^
[
A-Z
]
+$/
return
reg
.
test
(
str
)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export
function
validAlphabets
(
str
)
{
const
reg
=
/^
[
A-Za-z
]
+$/
return
reg
.
test
(
str
)
}
/**
* @param {string} email
* @returns {Boolean}
*/
export
function
validEmail
(
email
)
{
const
reg
=
/^
(([^
<>()
\[\]\\
.,;:
\s
@"
]
+
(\.[^
<>()
\[\]\\
.,;:
\s
@"
]
+
)
*
)
|
(
".+"
))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\])
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
return
reg
.
test
(
email
)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export
function
isString
(
str
)
{
if
(
typeof
str
===
'
string
'
||
str
instanceof
String
)
{
return
true
}
return
false
}
/**
* @param {Array} arg
* @returns {Boolean}
*/
export
function
isArray
(
arg
)
{
if
(
typeof
Array
.
isArray
===
'
undefined
'
)
{
return
Object
.
prototype
.
toString
.
call
(
arg
)
===
'
[object Array]
'
}
return
Array
.
isArray
(
arg
)
}
ruoyi-ui/src/views/components/icons/element-icons.js
0 → 100644
View file @
46444bd0
const
elementIcons
=
[
'
info
'
,
'
error
'
,
'
success
'
,
'
warning
'
,
'
question
'
,
'
back
'
,
'
arrow-left
'
,
'
arrow-down
'
,
'
arrow-right
'
,
'
arrow-up
'
,
'
caret-left
'
,
'
caret-bottom
'
,
'
caret-top
'
,
'
caret-right
'
,
'
d-arrow-left
'
,
'
d-arrow-right
'
,
'
minus
'
,
'
plus
'
,
'
remove
'
,
'
circle-plus
'
,
'
remove-outline
'
,
'
circle-plus-outline
'
,
'
close
'
,
'
check
'
,
'
circle-close
'
,
'
circle-check
'
,
'
circle-close-outline
'
,
'
circle-check-outline
'
,
'
zoom-out
'
,
'
zoom-in
'
,
'
d-caret
'
,
'
sort
'
,
'
sort-down
'
,
'
sort-up
'
,
'
tickets
'
,
'
document
'
,
'
goods
'
,
'
sold-out
'
,
'
news
'
,
'
message
'
,
'
date
'
,
'
printer
'
,
'
time
'
,
'
bell
'
,
'
mobile-phone
'
,
'
service
'
,
'
view
'
,
'
menu
'
,
'
more
'
,
'
more-outline
'
,
'
star-on
'
,
'
star-off
'
,
'
location
'
,
'
location-outline
'
,
'
phone
'
,
'
phone-outline
'
,
'
picture
'
,
'
picture-outline
'
,
'
delete
'
,
'
search
'
,
'
edit
'
,
'
edit-outline
'
,
'
rank
'
,
'
refresh
'
,
'
share
'
,
'
setting
'
,
'
upload
'
,
'
upload2
'
,
'
download
'
,
'
loading
'
]
export
default
elementIcons
ruoyi-ui/src/views/components/icons/index.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
class=
"icons-container"
>
<aside>
<a
href=
"#"
target=
"_blank"
>
Add and use
</a>
</aside>
<el-tabs
type=
"border-card"
>
<el-tab-pane
label=
"Icons"
>
<div
v-for=
"item of svgIcons"
:key=
"item"
>
<el-tooltip
placement=
"top"
>
<div
slot=
"content"
>
{{
generateIconCode
(
item
)
}}
</div>
<div
class=
"icon-item"
>
<svg-icon
:icon-class=
"item"
class-name=
"disabled"
/>
<span>
{{
item
}}
</span>
</div>
</el-tooltip>
</div>
</el-tab-pane>
<el-tab-pane
label=
"Element-UI Icons"
>
<div
v-for=
"item of elementIcons"
:key=
"item"
>
<el-tooltip
placement=
"top"
>
<div
slot=
"content"
>
{{
generateElementIconCode
(
item
)
}}
</div>
<div
class=
"icon-item"
>
<i
:class=
"'el-icon-' + item"
/>
<span>
{{
item
}}
</span>
</div>
</el-tooltip>
</div>
</el-tab-pane>
</el-tabs>
</div>
</
template
>
<
script
>
import
svgIcons
from
'
./svg-icons
'
import
elementIcons
from
'
./element-icons
'
export
default
{
name
:
'
Icons
'
,
data
()
{
return
{
svgIcons
,
elementIcons
}
},
methods
:
{
generateIconCode
(
symbol
)
{
return
`<svg-icon icon-class="
${
symbol
}
" />`
},
generateElementIconCode
(
symbol
)
{
return
`<i class="el-icon-
${
symbol
}
" />`
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.icons-container
{
margin
:
10px
20px
0
;
overflow
:
hidden
;
.icon-item
{
margin
:
20px
;
height
:
85px
;
text-align
:
center
;
width
:
100px
;
float
:
left
;
font-size
:
30px
;
color
:
#24292e
;
cursor
:
pointer
;
}
span
{
display
:
block
;
font-size
:
16px
;
margin-top
:
10px
;
}
.disabled
{
pointer-events
:
none
;
}
}
</
style
>
ruoyi-ui/src/views/components/icons/svg-icons.js
0 → 100644
View file @
46444bd0
const
req
=
require
.
context
(
'
../../../assets/icons/svg
'
,
false
,
/
\.
svg$/
)
const
requireAll
=
requireContext
=>
requireContext
.
keys
()
const
re
=
/
\.\/(
.*
)\.
svg/
const
svgIcons
=
requireAll
(
req
).
map
(
i
=>
{
return
i
.
match
(
re
)[
1
]
})
export
default
svgIcons
ruoyi-ui/src/views/dashboard/BarChart.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
:class=
"className"
:style=
"
{height:height,width:width}" />
</
template
>
<
script
>
import
echarts
from
'
echarts
'
require
(
'
echarts/theme/macarons
'
)
// echarts theme
import
resize
from
'
./mixins/resize
'
const
animationDuration
=
6000
export
default
{
mixins
:
[
resize
],
props
:
{
className
:
{
type
:
String
,
default
:
'
chart
'
},
width
:
{
type
:
String
,
default
:
'
100%
'
},
height
:
{
type
:
String
,
default
:
'
300px
'
}
},
data
()
{
return
{
chart
:
null
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
initChart
()
})
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
}
this
.
chart
.
dispose
()
this
.
chart
=
null
},
methods
:
{
initChart
()
{
this
.
chart
=
echarts
.
init
(
this
.
$el
,
'
macarons
'
)
this
.
chart
.
setOption
({
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'
shadow
'
// 默认为直线,可选为:'line' | 'shadow'
}
},
grid
:
{
top
:
10
,
left
:
'
2%
'
,
right
:
'
2%
'
,
bottom
:
'
3%
'
,
containLabel
:
true
},
xAxis
:
[{
type
:
'
category
'
,
data
:
[
'
Mon
'
,
'
Tue
'
,
'
Wed
'
,
'
Thu
'
,
'
Fri
'
,
'
Sat
'
,
'
Sun
'
],
axisTick
:
{
alignWithLabel
:
true
}
}],
yAxis
:
[{
type
:
'
value
'
,
axisTick
:
{
show
:
false
}
}],
series
:
[{
name
:
'
pageA
'
,
type
:
'
bar
'
,
stack
:
'
vistors
'
,
barWidth
:
'
60%
'
,
data
:
[
79
,
52
,
200
,
334
,
390
,
330
,
220
],
animationDuration
},
{
name
:
'
pageB
'
,
type
:
'
bar
'
,
stack
:
'
vistors
'
,
barWidth
:
'
60%
'
,
data
:
[
80
,
52
,
200
,
334
,
390
,
330
,
220
],
animationDuration
},
{
name
:
'
pageC
'
,
type
:
'
bar
'
,
stack
:
'
vistors
'
,
barWidth
:
'
60%
'
,
data
:
[
30
,
52
,
200
,
334
,
390
,
330
,
220
],
animationDuration
}]
})
}
}
}
</
script
>
ruoyi-ui/src/views/dashboard/LineChart.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
:class=
"className"
:style=
"
{height:height,width:width}" />
</
template
>
<
script
>
import
echarts
from
'
echarts
'
require
(
'
echarts/theme/macarons
'
)
// echarts theme
import
resize
from
'
./mixins/resize
'
export
default
{
mixins
:
[
resize
],
props
:
{
className
:
{
type
:
String
,
default
:
'
chart
'
},
width
:
{
type
:
String
,
default
:
'
100%
'
},
height
:
{
type
:
String
,
default
:
'
350px
'
},
autoResize
:
{
type
:
Boolean
,
default
:
true
},
chartData
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
return
{
chart
:
null
}
},
watch
:
{
chartData
:
{
deep
:
true
,
handler
(
val
)
{
this
.
setOptions
(
val
)
}
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
initChart
()
})
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
}
this
.
chart
.
dispose
()
this
.
chart
=
null
},
methods
:
{
initChart
()
{
this
.
chart
=
echarts
.
init
(
this
.
$el
,
'
macarons
'
)
this
.
setOptions
(
this
.
chartData
)
},
setOptions
({
expectedData
,
actualData
}
=
{})
{
this
.
chart
.
setOption
({
xAxis
:
{
data
:
[
'
Mon
'
,
'
Tue
'
,
'
Wed
'
,
'
Thu
'
,
'
Fri
'
,
'
Sat
'
,
'
Sun
'
],
boundaryGap
:
false
,
axisTick
:
{
show
:
false
}
},
grid
:
{
left
:
10
,
right
:
10
,
bottom
:
20
,
top
:
30
,
containLabel
:
true
},
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
type
:
'
cross
'
},
padding
:
[
5
,
10
]
},
yAxis
:
{
axisTick
:
{
show
:
false
}
},
legend
:
{
data
:
[
'
expected
'
,
'
actual
'
]
},
series
:
[{
name
:
'
expected
'
,
itemStyle
:
{
normal
:
{
color
:
'
#FF005A
'
,
lineStyle
:
{
color
:
'
#FF005A
'
,
width
:
2
}
}
},
smooth
:
true
,
type
:
'
line
'
,
data
:
expectedData
,
animationDuration
:
2800
,
animationEasing
:
'
cubicInOut
'
},
{
name
:
'
actual
'
,
smooth
:
true
,
type
:
'
line
'
,
itemStyle
:
{
normal
:
{
color
:
'
#3888fa
'
,
lineStyle
:
{
color
:
'
#3888fa
'
,
width
:
2
},
areaStyle
:
{
color
:
'
#f3f8ff
'
}
}
},
data
:
actualData
,
animationDuration
:
2800
,
animationEasing
:
'
quadraticOut
'
}]
})
}
}
}
</
script
>
ruoyi-ui/src/views/dashboard/PanelGroup.vue
0 → 100644
View file @
46444bd0
<
template
>
<el-row
:gutter=
"40"
class=
"panel-group"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('newVisitis')"
>
<div
class=
"card-panel-icon-wrapper icon-people"
>
<svg-icon
icon-class=
"peoples"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
访客
</div>
<count-to
:start-val=
"0"
:end-val=
"102400"
:duration=
"2600"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('messages')"
>
<div
class=
"card-panel-icon-wrapper icon-message"
>
<svg-icon
icon-class=
"message"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
消息
</div>
<count-to
:start-val=
"0"
:end-val=
"81212"
:duration=
"3000"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('purchases')"
>
<div
class=
"card-panel-icon-wrapper icon-money"
>
<svg-icon
icon-class=
"money"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
金额
</div>
<count-to
:start-val=
"0"
:end-val=
"9280"
:duration=
"3200"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"handleSetLineChartData('shoppings')"
>
<div
class=
"card-panel-icon-wrapper icon-shopping"
>
<svg-icon
icon-class=
"shopping"
class-name=
"card-panel-icon"
/>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
订单
</div>
<count-to
:start-val=
"0"
:end-val=
"13600"
:duration=
"3600"
class=
"card-panel-num"
/>
</div>
</div>
</el-col>
</el-row>
</
template
>
<
script
>
import
CountTo
from
'
vue-count-to
'
export
default
{
components
:
{
CountTo
},
methods
:
{
handleSetLineChartData
(
type
)
{
this
.
$emit
(
'
handleSetLineChartData
'
,
type
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.panel-group
{
margin-top
:
18px
;
.card-panel-col
{
margin-bottom
:
32px
;
}
.card-panel
{
height
:
108px
;
cursor
:
pointer
;
font-size
:
12px
;
position
:
relative
;
overflow
:
hidden
;
color
:
#666
;
background
:
#fff
;
box-shadow
:
4px
4px
40px
rgba
(
0
,
0
,
0
,
.05
);
border-color
:
rgba
(
0
,
0
,
0
,
.05
);
&
:hover
{
.card-panel-icon-wrapper
{
color
:
#fff
;
}
.icon-people
{
background
:
#40c9c6
;
}
.icon-message
{
background
:
#36a3f7
;
}
.icon-money
{
background
:
#f4516c
;
}
.icon-shopping
{
background
:
#34bfa3
}
}
.icon-people
{
color
:
#40c9c6
;
}
.icon-message
{
color
:
#36a3f7
;
}
.icon-money
{
color
:
#f4516c
;
}
.icon-shopping
{
color
:
#34bfa3
}
.card-panel-icon-wrapper
{
float
:
left
;
margin
:
14px
0
0
14px
;
padding
:
16px
;
transition
:
all
0
.38s
ease-out
;
border-radius
:
6px
;
}
.card-panel-icon
{
float
:
left
;
font-size
:
48px
;
}
.card-panel-description
{
float
:
right
;
font-weight
:
bold
;
margin
:
26px
;
margin-left
:
0px
;
.card-panel-text
{
line-height
:
18px
;
color
:
rgba
(
0
,
0
,
0
,
0
.45
);
font-size
:
16px
;
margin-bottom
:
12px
;
}
.card-panel-num
{
font-size
:
20px
;
}
}
}
}
@media
(
max-width
:
550px
)
{
.card-panel-description
{
display
:
none
;
}
.card-panel-icon-wrapper
{
float
:
none
!
important
;
width
:
100%
;
height
:
100%
;
margin
:
0
!
important
;
.svg-icon
{
display
:
block
;
margin
:
14px
auto
!
important
;
float
:
none
!
important
;
}
}
}
</
style
>
ruoyi-ui/src/views/dashboard/PieChart.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
:class=
"className"
:style=
"
{height:height,width:width}" />
</
template
>
<
script
>
import
echarts
from
'
echarts
'
require
(
'
echarts/theme/macarons
'
)
// echarts theme
import
resize
from
'
./mixins/resize
'
export
default
{
mixins
:
[
resize
],
props
:
{
className
:
{
type
:
String
,
default
:
'
chart
'
},
width
:
{
type
:
String
,
default
:
'
100%
'
},
height
:
{
type
:
String
,
default
:
'
300px
'
}
},
data
()
{
return
{
chart
:
null
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
initChart
()
})
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
}
this
.
chart
.
dispose
()
this
.
chart
=
null
},
methods
:
{
initChart
()
{
this
.
chart
=
echarts
.
init
(
this
.
$el
,
'
macarons
'
)
this
.
chart
.
setOption
({
tooltip
:
{
trigger
:
'
item
'
,
formatter
:
'
{a} <br/>{b} : {c} ({d}%)
'
},
legend
:
{
left
:
'
center
'
,
bottom
:
'
10
'
,
data
:
[
'
Industries
'
,
'
Technology
'
,
'
Forex
'
,
'
Gold
'
,
'
Forecasts
'
]
},
series
:
[
{
name
:
'
WEEKLY WRITE ARTICLES
'
,
type
:
'
pie
'
,
roseType
:
'
radius
'
,
radius
:
[
15
,
95
],
center
:
[
'
50%
'
,
'
38%
'
],
data
:
[
{
value
:
320
,
name
:
'
Industries
'
},
{
value
:
240
,
name
:
'
Technology
'
},
{
value
:
149
,
name
:
'
Forex
'
},
{
value
:
100
,
name
:
'
Gold
'
},
{
value
:
59
,
name
:
'
Forecasts
'
}
],
animationEasing
:
'
cubicInOut
'
,
animationDuration
:
2600
}
]
})
}
}
}
</
script
>
ruoyi-ui/src/views/dashboard/RaddarChart.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
:class=
"className"
:style=
"
{height:height,width:width}" />
</
template
>
<
script
>
import
echarts
from
'
echarts
'
require
(
'
echarts/theme/macarons
'
)
// echarts theme
import
resize
from
'
./mixins/resize
'
const
animationDuration
=
3000
export
default
{
mixins
:
[
resize
],
props
:
{
className
:
{
type
:
String
,
default
:
'
chart
'
},
width
:
{
type
:
String
,
default
:
'
100%
'
},
height
:
{
type
:
String
,
default
:
'
300px
'
}
},
data
()
{
return
{
chart
:
null
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
initChart
()
})
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
}
this
.
chart
.
dispose
()
this
.
chart
=
null
},
methods
:
{
initChart
()
{
this
.
chart
=
echarts
.
init
(
this
.
$el
,
'
macarons
'
)
this
.
chart
.
setOption
({
tooltip
:
{
trigger
:
'
axis
'
,
axisPointer
:
{
// 坐标轴指示器,坐标轴触发有效
type
:
'
shadow
'
// 默认为直线,可选为:'line' | 'shadow'
}
},
radar
:
{
radius
:
'
66%
'
,
center
:
[
'
50%
'
,
'
42%
'
],
splitNumber
:
8
,
splitArea
:
{
areaStyle
:
{
color
:
'
rgba(127,95,132,.3)
'
,
opacity
:
1
,
shadowBlur
:
45
,
shadowColor
:
'
rgba(0,0,0,.5)
'
,
shadowOffsetX
:
0
,
shadowOffsetY
:
15
}
},
indicator
:
[
{
name
:
'
Sales
'
,
max
:
10000
},
{
name
:
'
Administration
'
,
max
:
20000
},
{
name
:
'
Information Techology
'
,
max
:
20000
},
{
name
:
'
Customer Support
'
,
max
:
20000
},
{
name
:
'
Development
'
,
max
:
20000
},
{
name
:
'
Marketing
'
,
max
:
20000
}
]
},
legend
:
{
left
:
'
center
'
,
bottom
:
'
10
'
,
data
:
[
'
Allocated Budget
'
,
'
Expected Spending
'
,
'
Actual Spending
'
]
},
series
:
[{
type
:
'
radar
'
,
symbolSize
:
0
,
areaStyle
:
{
normal
:
{
shadowBlur
:
13
,
shadowColor
:
'
rgba(0,0,0,.2)
'
,
shadowOffsetX
:
0
,
shadowOffsetY
:
10
,
opacity
:
1
}
},
data
:
[
{
value
:
[
5000
,
7000
,
12000
,
11000
,
15000
,
14000
],
name
:
'
Allocated Budget
'
},
{
value
:
[
4000
,
9000
,
15000
,
15000
,
13000
,
11000
],
name
:
'
Expected Spending
'
},
{
value
:
[
5500
,
11000
,
12000
,
15000
,
12000
,
12000
],
name
:
'
Actual Spending
'
}
],
animationDuration
:
animationDuration
}]
})
}
}
}
</
script
>
ruoyi-ui/src/views/dashboard/mixins/resize.js
0 → 100644
View file @
46444bd0
import
{
debounce
}
from
'
@/utils
'
export
default
{
data
()
{
return
{
$_sidebarElm
:
null
}
},
mounted
()
{
this
.
$_initResizeEvent
()
this
.
$_initSidebarResizeEvent
()
},
beforeDestroy
()
{
this
.
$_destroyResizeEvent
()
this
.
$_destroySidebarResizeEvent
()
},
activated
()
{
this
.
$_initResizeEvent
()
this
.
$_initSidebarResizeEvent
()
},
deactivated
()
{
this
.
$_destroyResizeEvent
()
this
.
$_destroySidebarResizeEvent
()
},
methods
:
{
$_resizeHandler
()
{
return
debounce
(()
=>
{
if
(
this
.
chart
)
{
this
.
chart
.
resize
()
}
},
100
)()
},
$_initResizeEvent
()
{
window
.
addEventListener
(
'
resize
'
,
this
.
$_resizeHandler
)
},
$_destroyResizeEvent
()
{
window
.
removeEventListener
(
'
resize
'
,
this
.
$_resizeHandler
)
},
$_sidebarResizeHandler
(
e
)
{
if
(
e
.
propertyName
===
'
width
'
)
{
this
.
$_resizeHandler
()
}
},
$_initSidebarResizeEvent
()
{
this
.
$_sidebarElm
=
document
.
getElementsByClassName
(
'
sidebar-container
'
)[
0
]
this
.
$_sidebarElm
&&
this
.
$_sidebarElm
.
addEventListener
(
'
transitionend
'
,
this
.
$_sidebarResizeHandler
)
},
$_destroySidebarResizeEvent
()
{
this
.
$_sidebarElm
&&
this
.
$_sidebarElm
.
removeEventListener
(
'
transitionend
'
,
this
.
$_sidebarResizeHandler
)
}
}
}
ruoyi-ui/src/views/error/401.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
class=
"errPage-container"
>
<el-button
icon=
"arrow-left"
class=
"pan-back-btn"
@
click=
"back"
>
返回
</el-button>
<el-row>
<el-col
:span=
"12"
>
<h1
class=
"text-jumbo text-ginormous"
>
Oops!
</h1>
gif来源
<a
href=
"https://zh.airbnb.com/"
target=
"_blank"
>
airbnb
</a>
页面
<h2>
你没有权限去该页面
</h2>
<h6>
如有不满请联系你领导
</h6>
<ul
class=
"list-unstyled"
>
<li>
或者你可以去:
</li>
<li
class=
"link-type"
>
<router-link
to=
"/dashboard"
>
回首页
</router-link>
</li>
<li
class=
"link-type"
>
<a
href=
"https://www.taobao.com/"
>
随便看看
</a>
</li>
<li><a
href=
"#"
@
click.prevent=
"dialogVisible=true"
>
点我看图
</a></li>
</ul>
</el-col>
<el-col
:span=
"12"
>
<img
:src=
"errGif"
width=
"313"
height=
"428"
alt=
"Girl has dropped her ice cream."
>
</el-col>
</el-row>
<el-dialog
:visible.sync=
"dialogVisible"
title=
"随便看"
>
<img
:src=
"ewizardClap"
class=
"pan-img"
>
</el-dialog>
</div>
</
template
>
<
script
>
import
errGif
from
'
@/assets/401_images/401.gif
'
export
default
{
name
:
'
Page401
'
,
data
()
{
return
{
errGif
:
errGif
+
'
?
'
+
+
new
Date
(),
ewizardClap
:
'
https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646
'
,
dialogVisible
:
false
}
},
methods
:
{
back
()
{
if
(
this
.
$route
.
query
.
noGoBack
)
{
this
.
$router
.
push
({
path
:
'
/dashboard
'
})
}
else
{
this
.
$router
.
go
(
-
1
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.errPage-container
{
width
:
800px
;
max-width
:
100%
;
margin
:
100px
auto
;
.pan-back-btn
{
background
:
#008489
;
color
:
#fff
;
border
:
none
!
important
;
}
.pan-gif
{
margin
:
0
auto
;
display
:
block
;
}
.pan-img
{
display
:
block
;
margin
:
0
auto
;
width
:
100%
;
}
.text-jumbo
{
font-size
:
60px
;
font-weight
:
700
;
color
:
#484848
;
}
.list-unstyled
{
font-size
:
14px
;
li
{
padding-bottom
:
5px
;
}
a
{
color
:
#008489
;
text-decoration
:
none
;
&
:hover
{
text-decoration
:
underline
;
}
}
}
}
</
style
>
ruoyi-ui/src/views/error/404.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
class=
"wscn-http404-container"
>
<div
class=
"wscn-http404"
>
<div
class=
"pic-404"
>
<img
class=
"pic-404__parent"
src=
"@/assets/404_images/404.png"
alt=
"404"
>
<img
class=
"pic-404__child left"
src=
"@/assets/404_images/404_cloud.png"
alt=
"404"
>
<img
class=
"pic-404__child mid"
src=
"@/assets/404_images/404_cloud.png"
alt=
"404"
>
<img
class=
"pic-404__child right"
src=
"@/assets/404_images/404_cloud.png"
alt=
"404"
>
</div>
<div
class=
"bullshit"
>
<div
class=
"bullshit__oops"
>
OOPS!
</div>
<div
class=
"bullshit__info"
>
All rights reserved
<a
style=
"color:#20a0ff"
href=
"https://wallstreetcn.com"
target=
"_blank"
>
wallstreetcn
</a>
</div>
<div
class=
"bullshit__headline"
>
{{
message
}}
</div>
<div
class=
"bullshit__info"
>
Please check that the URL you entered is correct, or click the button below to return to the homepage.
</div>
<a
href=
""
class=
"bullshit__return-home"
>
Back to home
</a>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'
Page404
'
,
computed
:
{
message
()
{
return
'
The webmaster said that you can not enter this page...
'
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.wscn-http404-container
{
transform
:
translate
(
-50%
,-
50%
);
position
:
absolute
;
top
:
40%
;
left
:
50%
;
}
.wscn-http404
{
position
:
relative
;
width
:
1200px
;
padding
:
0
50px
;
overflow
:
hidden
;
.pic-404
{
position
:
relative
;
float
:
left
;
width
:
600px
;
overflow
:
hidden
;
&
__parent
{
width
:
100%
;
}
&
__child
{
position
:
absolute
;
&
.left
{
width
:
80px
;
top
:
17px
;
left
:
220px
;
opacity
:
0
;
animation-name
:
cloudLeft
;
animation-duration
:
2s
;
animation-timing-function
:
linear
;
animation-fill-mode
:
forwards
;
animation-delay
:
1s
;
}
&
.mid
{
width
:
46px
;
top
:
10px
;
left
:
420px
;
opacity
:
0
;
animation-name
:
cloudMid
;
animation-duration
:
2s
;
animation-timing-function
:
linear
;
animation-fill-mode
:
forwards
;
animation-delay
:
1
.2s
;
}
&
.right
{
width
:
62px
;
top
:
100px
;
left
:
500px
;
opacity
:
0
;
animation-name
:
cloudRight
;
animation-duration
:
2s
;
animation-timing-function
:
linear
;
animation-fill-mode
:
forwards
;
animation-delay
:
1s
;
}
@keyframes
cloudLeft
{
0
%
{
top
:
17px
;
left
:
220px
;
opacity
:
0
;
}
20
%
{
top
:
33px
;
left
:
188px
;
opacity
:
1
;
}
80
%
{
top
:
81px
;
left
:
92px
;
opacity
:
1
;
}
100
%
{
top
:
97px
;
left
:
60px
;
opacity
:
0
;
}
}
@keyframes
cloudMid
{
0
%
{
top
:
10px
;
left
:
420px
;
opacity
:
0
;
}
20
%
{
top
:
40px
;
left
:
360px
;
opacity
:
1
;
}
70
%
{
top
:
130px
;
left
:
180px
;
opacity
:
1
;
}
100
%
{
top
:
160px
;
left
:
120px
;
opacity
:
0
;
}
}
@keyframes
cloudRight
{
0
%
{
top
:
100px
;
left
:
500px
;
opacity
:
0
;
}
20
%
{
top
:
120px
;
left
:
460px
;
opacity
:
1
;
}
80
%
{
top
:
180px
;
left
:
340px
;
opacity
:
1
;
}
100
%
{
top
:
200px
;
left
:
300px
;
opacity
:
0
;
}
}
}
}
.bullshit
{
position
:
relative
;
float
:
left
;
width
:
300px
;
padding
:
30px
0
;
overflow
:
hidden
;
&
__oops
{
font-size
:
32px
;
font-weight
:
bold
;
line-height
:
40px
;
color
:
#1482f0
;
opacity
:
0
;
margin-bottom
:
20px
;
animation-name
:
slideUp
;
animation-duration
:
0
.5s
;
animation-fill-mode
:
forwards
;
}
&
__headline
{
font-size
:
20px
;
line-height
:
24px
;
color
:
#222
;
font-weight
:
bold
;
opacity
:
0
;
margin-bottom
:
10px
;
animation-name
:
slideUp
;
animation-duration
:
0
.5s
;
animation-delay
:
0
.1s
;
animation-fill-mode
:
forwards
;
}
&
__info
{
font-size
:
13px
;
line-height
:
21px
;
color
:
grey
;
opacity
:
0
;
margin-bottom
:
30px
;
animation-name
:
slideUp
;
animation-duration
:
0
.5s
;
animation-delay
:
0
.2s
;
animation-fill-mode
:
forwards
;
}
&
__return-home
{
display
:
block
;
float
:
left
;
width
:
110px
;
height
:
36px
;
background
:
#1482f0
;
border-radius
:
100px
;
text-align
:
center
;
color
:
#ffffff
;
opacity
:
0
;
font-size
:
14px
;
line-height
:
36px
;
cursor
:
pointer
;
animation-name
:
slideUp
;
animation-duration
:
0
.5s
;
animation-delay
:
0
.3s
;
animation-fill-mode
:
forwards
;
}
@keyframes
slideUp
{
0
%
{
transform
:
translateY
(
60px
);
opacity
:
0
;
}
100
%
{
transform
:
translateY
(
0
);
opacity
:
1
;
}
}
}
}
</
style
>
ruoyi-ui/src/views/index.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
class=
"dashboard-editor-container"
>
<panel-group
@
handleSetLineChartData=
"handleSetLineChartData"
/>
<el-row
style=
"background:#fff;padding:16px 16px 0;margin-bottom:32px;"
>
<line-chart
:chart-data=
"lineChartData"
/>
</el-row>
<el-row
:gutter=
"32"
>
<el-col
:xs=
"24"
:sm=
"24"
:lg=
"8"
>
<div
class=
"chart-wrapper"
>
<raddar-chart
/>
</div>
</el-col>
<el-col
:xs=
"24"
:sm=
"24"
:lg=
"8"
>
<div
class=
"chart-wrapper"
>
<pie-chart
/>
</div>
</el-col>
<el-col
:xs=
"24"
:sm=
"24"
:lg=
"8"
>
<div
class=
"chart-wrapper"
>
<bar-chart
/>
</div>
</el-col>
</el-row>
</div>
</
template
>
<
script
>
import
PanelGroup
from
'
./dashboard/PanelGroup
'
import
LineChart
from
'
./dashboard/LineChart
'
import
RaddarChart
from
'
./dashboard/RaddarChart
'
import
PieChart
from
'
./dashboard/PieChart
'
import
BarChart
from
'
./dashboard/BarChart
'
const
lineChartData
=
{
newVisitis
:
{
expectedData
:
[
100
,
120
,
161
,
134
,
105
,
160
,
165
],
actualData
:
[
120
,
82
,
91
,
154
,
162
,
140
,
145
]
},
messages
:
{
expectedData
:
[
200
,
192
,
120
,
144
,
160
,
130
,
140
],
actualData
:
[
180
,
160
,
151
,
106
,
145
,
150
,
130
]
},
purchases
:
{
expectedData
:
[
80
,
100
,
121
,
104
,
105
,
90
,
100
],
actualData
:
[
120
,
90
,
100
,
138
,
142
,
130
,
130
]
},
shoppings
:
{
expectedData
:
[
130
,
140
,
141
,
142
,
145
,
150
,
160
],
actualData
:
[
120
,
82
,
91
,
154
,
162
,
140
,
130
]
}
}
export
default
{
name
:
'
Index
'
,
components
:
{
PanelGroup
,
LineChart
,
RaddarChart
,
PieChart
,
BarChart
},
data
()
{
return
{
lineChartData
:
lineChartData
.
newVisitis
}
},
methods
:
{
handleSetLineChartData
(
type
)
{
this
.
lineChartData
=
lineChartData
[
type
]
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.dashboard-editor-container
{
padding
:
32px
;
background-color
:
rgb
(
240
,
242
,
245
);
position
:
relative
;
.chart-wrapper
{
background
:
#fff
;
padding
:
16px
16px
0
;
margin-bottom
:
32px
;
}
}
@media
(
max-width
:
1024px
)
{
.chart-wrapper
{
padding
:
8px
;
}
}
</
style
>
ruoyi-ui/src/views/login.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
class=
"login"
>
<el-form
ref=
"loginForm"
:model=
"loginForm"
:rules=
"loginRules"
class=
"login-form"
>
<h3
class=
"title"
>
若依后台管理系统
</h3>
<el-form-item
prop=
"username"
>
<el-input
v-model=
"loginForm.username"
type=
"text"
auto-complete=
"off"
placeholder=
"账号"
>
<svg-icon
slot=
"prefix"
icon-class=
"user"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-input
v-model=
"loginForm.password"
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
@
keyup.enter.native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item
prop=
"code"
>
<el-input
v-model=
"loginForm.code"
auto-complete=
"off"
placeholder=
"验证码"
style=
"width: 63%"
@
keyup.enter.native=
"handleLogin"
>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
</el-input>
<div
class=
"login-code"
>
<img
:src=
"codeUrl"
@
click=
"getCode"
/>
</div>
</el-form-item>
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:0px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-form-item
style=
"width:100%;"
>
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
@
click.native.prevent=
"handleLogin"
>
<span
v-if=
"!loading"
>
登 录
</span>
<span
v-else
>
登 录 中...
</span>
</el-button>
</el-form-item>
</el-form>
<!-- 底部 -->
<div
class=
"el-login-footer"
>
<span>
Copyright © 2018-2019 ruoyi.vip All Rights Reserved.
</span>
</div>
</div>
</
template
>
<
script
>
import
{
getCodeImg
}
from
"
@/api/login
"
;
import
Cookies
from
"
js-cookie
"
;
export
default
{
name
:
"
Login
"
,
data
()
{
return
{
codeUrl
:
""
,
cookiePassword
:
""
,
loginForm
:
{
username
:
"
admin
"
,
password
:
"
admin123
"
,
rememberMe
:
false
,
code
:
""
,
uuid
:
""
},
loginRules
:
{
username
:
[
{
required
:
true
,
trigger
:
"
blur
"
,
message
:
"
用户名不能为空
"
}
],
password
:
[
{
required
:
true
,
trigger
:
"
blur
"
,
message
:
"
密码不能为空
"
}
],
code
:
[{
required
:
true
,
trigger
:
"
change
"
,
message
:
"
验证码不能为空
"
}]
},
loading
:
false
,
redirect
:
undefined
};
},
watch
:
{
$route
:
{
handler
:
function
(
route
)
{
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
;
},
immediate
:
true
}
},
created
()
{
this
.
getCode
();
this
.
getCookie
();
},
methods
:
{
getCode
()
{
getCodeImg
().
then
(
res
=>
{
this
.
codeUrl
=
"
data:image/gif;base64,
"
+
res
.
img
;
this
.
loginForm
.
uuid
=
res
.
uuid
;
});
},
getCookie
()
{
const
username
=
Cookies
.
get
(
"
username
"
);
const
password
=
Cookies
.
get
(
"
password
"
);
const
rememberMe
=
Cookies
.
get
(
'
rememberMe
'
)
this
.
loginForm
=
{
username
:
username
===
undefined
?
this
.
loginForm
.
username
:
username
,
password
:
password
===
undefined
?
this
.
loginForm
.
password
:
password
,
rememberMe
:
rememberMe
===
undefined
?
false
:
Boolean
(
rememberMe
)
};
},
handleLogin
()
{
this
.
$refs
.
loginForm
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loading
=
true
;
if
(
this
.
loginForm
.
rememberMe
)
{
Cookies
.
set
(
"
username
"
,
this
.
loginForm
.
username
,
{
expires
:
30
});
Cookies
.
set
(
"
password
"
,
this
.
loginForm
.
password
,
{
expires
:
30
});
Cookies
.
set
(
'
rememberMe
'
,
this
.
loginForm
.
rememberMe
,
{
expires
:
30
});
}
else
{
Cookies
.
remove
(
"
username
"
);
Cookies
.
remove
(
"
password
"
);
Cookies
.
remove
(
'
rememberMe
'
);
}
this
.
$store
.
dispatch
(
"
Login
"
,
this
.
loginForm
)
.
then
(()
=>
{
this
.
loading
=
false
;
this
.
$router
.
push
({
path
:
this
.
redirect
||
"
/
"
});
})
.
catch
(()
=>
{
this
.
loading
=
false
;
this
.
getCode
();
});
}
});
}
}
};
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
>
.login
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
100%
;
background-image
:
url("../assets/image/login-background.jpg")
;
background-size
:
cover
;
}
.title
{
margin
:
0px
auto
30px
auto
;
text-align
:
center
;
color
:
#707070
;
}
.login-form
{
border-radius
:
6px
;
background
:
#ffffff
;
width
:
400px
;
padding
:
25px
25px
5px
25px
;
.el-input
{
height
:
38px
;
input
{
height
:
38px
;
}
}
.input-icon
{
height
:
39px
;
width
:
14px
;
margin-left
:
2px
;
}
}
.login-tip
{
font-size
:
13px
;
text-align
:
center
;
color
:
#bfbfbf
;
}
.login-code
{
width
:
33%
;
height
:
38px
;
float
:
right
;
img
{
cursor
:
pointer
;
vertical-align
:
middle
;
}
}
.el-login-footer
{
height
:
40px
;
line-height
:
40px
;
position
:
fixed
;
bottom
:
0
;
width
:
100%
;
text-align
:
center
;
color
:
#fff
;
font-family
:
Arial
;
font-size
:
12px
;
letter-spacing
:
1px
;
}
</
style
>
ruoyi-ui/src/views/login/auth-redirect.vue
0 → 100644
View file @
46444bd0
<
script
>
export
default
{
name
:
'
AuthRedirect
'
,
created
()
{
const
hash
=
window
.
location
.
search
.
slice
(
1
)
if
(
window
.
localStorage
)
{
window
.
localStorage
.
setItem
(
'
x-admin-oauth-code
'
,
hash
)
window
.
close
()
}
},
render
:
function
(
h
)
{
return
h
()
// avoid warning message
}
}
</
script
>
ruoyi-ui/src/views/login/components/SocialSignin.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
class=
"social-signup-container"
>
<div
class=
"sign-btn"
@
click=
"wechatHandleClick('wechat')"
>
<span
class=
"wx-svg-container"
><svg-icon
icon-class=
"wechat"
class=
"icon"
/></span>
WeChat
</div>
<div
class=
"sign-btn"
@
click=
"tencentHandleClick('tencent')"
>
<span
class=
"qq-svg-container"
><svg-icon
icon-class=
"qq"
class=
"icon"
/></span>
QQ
</div>
</div>
</
template
>
<
script
>
// import openWindow from '@/utils/open-window'
export
default
{
name
:
'
SocialSignin
'
,
methods
:
{
wechatHandleClick
(
thirdpart
)
{
alert
(
'
ok
'
)
// this.$store.commit('SET_AUTH_TYPE', thirdpart)
// const appid = 'xxxxx'
// const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/auth-redirect')
// const url = 'https://open.weixin.qq.com/connect/qrconnect?appid=' + appid + '&redirect_uri=' + redirect_uri + '&response_type=code&scope=snsapi_login#wechat_redirect'
// openWindow(url, thirdpart, 540, 540)
},
tencentHandleClick
(
thirdpart
)
{
alert
(
'
ok
'
)
// this.$store.commit('SET_AUTH_TYPE', thirdpart)
// const client_id = 'xxxxx'
// const redirect_uri = encodeURIComponent('xxx/redirect?redirect=' + window.location.origin + '/auth-redirect')
// const url = 'https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id=' + client_id + '&redirect_uri=' + redirect_uri
// openWindow(url, thirdpart, 540, 540)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.social-signup-container
{
margin
:
20px
0
;
.sign-btn
{
display
:
inline-block
;
cursor
:
pointer
;
}
.icon
{
color
:
#fff
;
font-size
:
24px
;
margin-top
:
8px
;
}
.wx-svg-container
,
.qq-svg-container
{
display
:
inline-block
;
width
:
40px
;
height
:
40px
;
line-height
:
40px
;
text-align
:
center
;
padding-top
:
1px
;
border-radius
:
4px
;
margin-bottom
:
20px
;
margin-right
:
5px
;
}
.wx-svg-container
{
background-color
:
#24da70
;
}
.qq-svg-container
{
background-color
:
#6BA2D6
;
margin-left
:
50px
;
}
}
</
style
>
ruoyi-ui/src/views/monitor/druid/index.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
v-loading=
"loading"
:style=
"'height:'+ height"
>
<iframe
:src=
"src"
frameborder=
"no"
style=
"width: 100%;height: 100%"
scrolling=
"auto"
/>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
src
:
process
.
env
.
VUE_APP_BASE_API
+
"
/druid/index.html
"
,
height
:
document
.
documentElement
.
clientHeight
-
94.5
+
"
px;
"
,
loading
:
true
};
},
mounted
:
function
()
{
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
230
);
const
that
=
this
;
window
.
onresize
=
function
temp
()
{
that
.
height
=
document
.
documentElement
.
clientHeight
-
94.5
+
"
px;
"
;
};
}
};
</
script
>
ruoyi-ui/src/views/monitor/job/index.vue
0 → 100644
View file @
46444bd0
<
template
>
<div
class=
"app-container"
>
定时任务
</div>
</
template
>
\ No newline at end of file
Prev
1
…
5
6
7
8
9
10
11
12
13
…
20
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