Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
ferry_web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jianan
ferry_web
Commits
6c7a45ca
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
+65
-30
src/layout/components/Sidebar/Logo.vue
+16
-6
src/styles/index.scss
+1
-1
src/views/login/index.vue
+9
-0
src/views/system/settings/index.vue
+38
-22
src/views/system/sysuser/index.vue
+1
-1
No files found.
src/layout/components/Sidebar/Logo.vue
View file @
6c7a45ca
...
...
@@ -2,18 +2,19 @@
<div
class=
"sidebar-logo-container"
:class=
"
{'collapse':collapse}">
<transition
name=
"sidebarLogoFade"
>
<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"
>
<h1
v-else
class=
"sidebar-title"
>
{{
titl
e
}}
</h1>
<img
v-if=
"
sysInfo.logo"
:src=
"sysInfo.logo
"
class=
"sidebar-logo"
>
<h1
v-else
class=
"sidebar-title"
>
{{
sysInfo
.
nam
e
}}
</h1>
</router-link>
<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"
>
<h1
class=
"sidebar-title"
>
{{
titl
e
}}
</h1>
<img
v-if=
"
sysInfo.logo"
:src=
"sysInfo.logo
"
class=
"sidebar-logo"
>
<h1
class=
"sidebar-title"
>
{{
sysInfo
.
nam
e
}}
</h1>
</router-link>
</transition>
</div>
</
template
>
<
script
>
import
{
getSettings
}
from
'@/api/system/settings'
export
default
{
name
:
'SidebarLogo'
,
props
:
{
...
...
@@ -24,9 +25,18 @@ export default {
},
data
()
{
return
{
title
:
'FERRY 管理平台'
,
logo
:
'@/assets/logo/ferry_logo_white.png'
sysInfo
:
{
name
:
''
,
logo
:
''
}
}
},
created
()
{
getSettings
({
classify
:
1
}).
then
(
response
=>
{
this
.
sysInfo
=
response
.
data
[
0
].
content
})
}
}
</
script
>
...
...
src/styles/index.scss
View file @
6c7a45ca
...
...
@@ -121,7 +121,7 @@ aside {
//main-container全局样式
.app-container
{
padding
:
20
px
;
padding
:
15
px
;
}
.components-container
{
...
...
src/views/login/index.vue
View file @
6c7a45ca
...
...
@@ -114,6 +114,7 @@
<
script
>
import
{
getCodeImg
}
from
'@/api/login'
import
{
getSettings
}
from
'@/api/system/settings'
import
moment
from
'moment'
import
SocialSign
from
'./components/SocialSignin'
...
...
@@ -171,6 +172,7 @@ export default {
this
.
getCode
()
// window.addEventListener('storage', this.afterQRScan)
this
.
getCurrentTime
()
this
.
getSystemSetting
()
},
mounted
()
{
if
(
this
.
loginForm
.
username
===
''
)
{
...
...
@@ -184,6 +186,13 @@ export default {
// window.removeEventListener('storage', this.afterQRScan)
},
methods
:
{
getSystemSetting
()
{
getSettings
({
classify
:
1
}).
then
(
response
=>
{
this
.
sysInfo
=
response
.
data
[
0
].
content
})
},
getCurrentTime
()
{
this
.
timer
=
setInterval
(
_
=>
{
this
.
currentTime
=
moment
().
format
(
'YYYY-MM-DD HH时mm分ss秒'
)
...
...
src/views/system/settings/index.vue
View file @
6c7a45ca
...
...
@@ -23,7 +23,7 @@
</el-upload>
</el-form-item>
<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>
</div>
...
...
@@ -46,12 +46,12 @@
<el-table-column
prop=
"local_field_name"
label=
"字段名称"
width=
"1
8
0"
width=
"1
5
0"
/>
<el-table-column
prop=
"local_field_nick"
label=
"字段昵称"
width=
"1
8
0"
width=
"1
5
0"
/>
<el-table-column
prop=
"ldap_field_name"
...
...
@@ -66,7 +66,7 @@
</el-table-column>
</el-table>
<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>
</el-card>
...
...
@@ -90,7 +90,7 @@ export default {
rules
:
{
name
:
[
{
required
:
true
,
message
:
'请输入系统名称'
,
trigger
:
'blur'
},
{
min
:
3
,
max
:
5
,
message
:
'长度在 3 到 6
个字符'
,
trigger
:
'blur'
}
{
min
:
3
,
max
:
15
,
message
:
'长度在 3 到 15
个字符'
,
trigger
:
'blur'
}
],
logo
:
[
{
required
:
true
,
message
:
'请设置Logo'
,
trigger
:
'blur'
}
...
...
@@ -107,33 +107,49 @@ export default {
getSettings
().
then
(
response
=>
{
for
(
var
v
of
response
.
data
)
{
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
)
{
this
.
tableData
=
v
.
content
if
(
v
.
content
===
undefined
||
v
.
content
===
null
)
{
this
.
tableData
=
[]
}
else
{
this
.
tableData
=
v
.
content
}
}
}
})
},
// 提交配置信息
submitForm
(
formName
,
classify
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
var
jsonValue
=
{
classify
:
classify
}
if
(
classify
===
1
)
{
var
requestStatus
=
false
var
jsonValue
=
{
classify
:
classify
}
if
(
classify
===
1
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
jsonValue
.
content
=
this
.
ruleForm
}
else
if
(
classify
===
2
)
{
jsonValue
.
content
=
this
.
tableData
requestStatus
=
true
}
setSettings
(
jsonValue
).
then
(
response
=>
{
this
.
$message
({
message
:
'设置成功'
,
type
:
'success'
})
})
}
else
if
(
classify
===
2
)
{
jsonValue
.
content
=
this
.
tableData
requestStatus
=
true
}
if
(
requestStatus
)
{
setSettings
(
jsonValue
).
then
(
response
=>
{
this
.
$message
({
message
:
'设置成功'
,
type
:
'success'
})
}
}
)
}
)
}
},
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
()
...
...
src/views/system/sysuser/index.vue
View file @
6c7a45ca
...
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<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"
>
<div
class=
"head-container"
>
<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