Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Chatopera OpenSource
/
ferry_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6c7a45ca
authored
Aug 19, 2020
by
YuleiLan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善系统配置功能。
parent
09e1815a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
30 deletions
src/layout/components/Sidebar/Logo.vue
src/styles/index.scss
src/views/login/index.vue
src/views/system/settings/index.vue
src/views/system/sysuser/index.vue
src/layout/components/Sidebar/Logo.vue
View file @
6c7a45ca
...
@@ -2,18 +2,19 @@
...
@@ -2,18 +2,19 @@
<div
class=
"sidebar-logo-container"
:class=
"
{'collapse':collapse}">
<div
class=
"sidebar-logo-container"
:class=
"
{'collapse':collapse}">
<transition
name=
"sidebarLogoFade"
>
<transition
name=
"sidebarLogoFade"
>
<router-link
v-if=
"collapse"
key=
"collapse"
class=
"sidebar-logo-link"
to=
"/"
>
<router-link
v-if=
"collapse"
key=
"collapse"
class=
"sidebar-logo-link"
to=
"/"
>
<img
v-if=
"
logo"
src=
"@/assets/logo/ferry_logo_white.png
"
class=
"sidebar-logo"
>
<img
v-if=
"
sysInfo.logo"
:src=
"sysInfo.logo
"
class=
"sidebar-logo"
>
<h1
v-else
class=
"sidebar-title"
>
{{
titl
e
}}
</h1>
<h1
v-else
class=
"sidebar-title"
>
{{
sysInfo
.
nam
e
}}
</h1>
</router-link>
</router-link>
<router-link
v-else
key=
"expand"
class=
"sidebar-logo-link"
to=
"/"
>
<router-link
v-else
key=
"expand"
class=
"sidebar-logo-link"
to=
"/"
>
<img
v-if=
"
logo"
src=
"@/assets/logo/ferry_logo_white.png
"
class=
"sidebar-logo"
>
<img
v-if=
"
sysInfo.logo"
:src=
"sysInfo.logo
"
class=
"sidebar-logo"
>
<h1
class=
"sidebar-title"
>
{{
titl
e
}}
</h1>
<h1
class=
"sidebar-title"
>
{{
sysInfo
.
nam
e
}}
</h1>
</router-link>
</router-link>
</transition>
</transition>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getSettings
}
from
'@/api/system/settings'
export
default
{
export
default
{
name
:
'SidebarLogo'
,
name
:
'SidebarLogo'
,
props
:
{
props
:
{
...
@@ -24,9 +25,18 @@ export default {
...
@@ -24,9 +25,18 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
title
:
'FERRY 管理平台'
,
sysInfo
:
{
logo
:
'@/assets/logo/ferry_logo_white.png'
name
:
''
,
logo
:
''
}
}
}
},
created
()
{
getSettings
({
classify
:
1
}).
then
(
response
=>
{
this
.
sysInfo
=
response
.
data
[
0
].
content
})
}
}
}
}
</
script
>
</
script
>
...
...
src/styles/index.scss
View file @
6c7a45ca
...
@@ -121,7 +121,7 @@ aside {
...
@@ -121,7 +121,7 @@ aside {
//main-container全局样式
//main-container全局样式
.app-container
{
.app-container
{
padding
:
20
px
;
padding
:
15
px
;
}
}
.components-container
{
.components-container
{
...
...
src/views/login/index.vue
View file @
6c7a45ca
...
@@ -114,6 +114,7 @@
...
@@ -114,6 +114,7 @@
<
script
>
<
script
>
import
{
getCodeImg
}
from
'@/api/login'
import
{
getCodeImg
}
from
'@/api/login'
import
{
getSettings
}
from
'@/api/system/settings'
import
moment
from
'moment'
import
moment
from
'moment'
import
SocialSign
from
'./components/SocialSignin'
import
SocialSign
from
'./components/SocialSignin'
...
@@ -171,6 +172,7 @@ export default {
...
@@ -171,6 +172,7 @@ export default {
this
.
getCode
()
this
.
getCode
()
// window.addEventListener('storage', this.afterQRScan)
// window.addEventListener('storage', this.afterQRScan)
this
.
getCurrentTime
()
this
.
getCurrentTime
()
this
.
getSystemSetting
()
},
},
mounted
()
{
mounted
()
{
if
(
this
.
loginForm
.
username
===
''
)
{
if
(
this
.
loginForm
.
username
===
''
)
{
...
@@ -184,6 +186,13 @@ export default {
...
@@ -184,6 +186,13 @@ export default {
// window.removeEventListener('storage', this.afterQRScan)
// window.removeEventListener('storage', this.afterQRScan)
},
},
methods
:
{
methods
:
{
getSystemSetting
()
{
getSettings
({
classify
:
1
}).
then
(
response
=>
{
this
.
sysInfo
=
response
.
data
[
0
].
content
})
},
getCurrentTime
()
{
getCurrentTime
()
{
this
.
timer
=
setInterval
(
_
=>
{
this
.
timer
=
setInterval
(
_
=>
{
this
.
currentTime
=
moment
().
format
(
'YYYY-MM-DD HH时mm分ss秒'
)
this
.
currentTime
=
moment
().
format
(
'YYYY-MM-DD HH时mm分ss秒'
)
...
...
src/views/system/settings/index.vue
View file @
6c7a45ca
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</el-upload>
</el-upload>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-bottom: 0"
>
<el-form-item
style=
"margin-bottom: 0"
>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm', 1)"
>
确定
</el-button>
<el-button
v-permisaction=
"['system:settings:index:config']"
type=
"primary"
@
click=
"submitForm('ruleForm', 1)"
>
确定
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -46,12 +46,12 @@
...
@@ -46,12 +46,12 @@
<el-table-column
<el-table-column
prop=
"local_field_name"
prop=
"local_field_name"
label=
"字段名称"
label=
"字段名称"
width=
"1
8
0"
width=
"1
5
0"
/>
/>
<el-table-column
<el-table-column
prop=
"local_field_nick"
prop=
"local_field_nick"
label=
"字段昵称"
label=
"字段昵称"
width=
"1
8
0"
width=
"1
5
0"
/>
/>
<el-table-column
<el-table-column
prop=
"ldap_field_name"
prop=
"ldap_field_name"
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<div
style=
"margin-top: 20px"
>
<div
style=
"margin-top: 20px"
>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm', 2)"
>
确定
</el-button>
<el-button
v-permisaction=
"['system:settings:index:ldap']"
type=
"primary"
@
click=
"submitForm('ruleForm', 2)"
>
确定
</el-button>
</div>
</div>
</div>
</div>
</el-card>
</el-card>
...
@@ -90,7 +90,7 @@ export default {
...
@@ -90,7 +90,7 @@ export default {
rules
:
{
rules
:
{
name
:
[
name
:
[
{
required
:
true
,
message
:
'请输入系统名称'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入系统名称'
,
trigger
:
'blur'
},
{
min
:
3
,
max
:
5
,
message
:
'长度在 3 到 6
个字符'
,
trigger
:
'blur'
}
{
min
:
3
,
max
:
15
,
message
:
'长度在 3 到 15
个字符'
,
trigger
:
'blur'
}
],
],
logo
:
[
logo
:
[
{
required
:
true
,
message
:
'请设置Logo'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请设置Logo'
,
trigger
:
'blur'
}
...
@@ -107,33 +107,49 @@ export default {
...
@@ -107,33 +107,49 @@ export default {
getSettings
().
then
(
response
=>
{
getSettings
().
then
(
response
=>
{
for
(
var
v
of
response
.
data
)
{
for
(
var
v
of
response
.
data
)
{
if
(
v
.
classify
===
1
)
{
if
(
v
.
classify
===
1
)
{
this
.
ruleForm
=
v
.
content
if
(
v
.
content
===
undefined
||
v
.
content
===
null
)
{
this
.
ruleForm
=
{
name
:
''
,
logo
:
''
}
}
else
{
this
.
ruleForm
=
v
.
content
}
}
else
if
(
v
.
classify
===
2
)
{
}
else
if
(
v
.
classify
===
2
)
{
this
.
tableData
=
v
.
content
if
(
v
.
content
===
undefined
||
v
.
content
===
null
)
{
this
.
tableData
=
[]
}
else
{
this
.
tableData
=
v
.
content
}
}
}
}
}
})
})
},
},
// 提交配置信息
// 提交配置信息
submitForm
(
formName
,
classify
)
{
submitForm
(
formName
,
classify
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
var
requestStatus
=
false
if
(
valid
)
{
var
jsonValue
=
{
var
jsonValue
=
{
classify
:
classify
classify
:
classify
}
}
if
(
classify
===
1
)
{
if
(
classify
===
1
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
jsonValue
.
content
=
this
.
ruleForm
jsonValue
.
content
=
this
.
ruleForm
}
else
if
(
classify
===
2
)
{
requestStatus
=
true
jsonValue
.
content
=
this
.
tableData
}
}
setSettings
(
jsonValue
).
then
(
response
=>
{
})
this
.
$message
({
}
else
if
(
classify
===
2
)
{
message
:
'设置成功'
,
jsonValue
.
content
=
this
.
tableData
type
:
'success'
requestStatus
=
true
})
}
if
(
requestStatus
)
{
setSettings
(
jsonValue
).
then
(
response
=>
{
this
.
$message
({
message
:
'设置成功'
,
type
:
'success'
})
})
}
}
)
}
)
}
},
},
resetForm
(
formName
)
{
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
()
this
.
$refs
[
formName
].
resetFields
()
...
...
src/views/system/sysuser/index.vue
View file @
6c7a45ca
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
>
<!--部门数据-->
<!--部门数据-->
<el-col
:span=
"4"
:xs=
"24"
>
<el-col
:span=
"4"
:xs=
"24"
style=
"padding-right: 0;"
>
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<div
class=
"head-container"
>
<div
class=
"head-container"
>
<el-input
<el-input
...
...
Write
Preview
Markdown
is supported
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