Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
other-project
frontend
Commits
fef7fcc8
Commit
fef7fcc8
authored
Feb 05, 2020
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数管理功能完成
parent
20e7aaa7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
21 deletions
+18
-21
config-add-or-update.vue
src/views/modules/api/sys/config-add-or-update.vue
+8
-8
config.vue
src/views/modules/api/sys/config.vue
+10
-13
No files found.
src/views/modules/api/sys/config-add-or-update.vue
View file @
fef7fcc8
...
@@ -50,15 +50,15 @@
...
@@ -50,15 +50,15 @@
this
.
$refs
[
'dataForm'
].
resetFields
()
this
.
$refs
[
'dataForm'
].
resetFields
()
if
(
this
.
dataForm
.
id
)
{
if
(
this
.
dataForm
.
id
)
{
this
.
$http
({
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/sys/config/info/
${
this
.
dataForm
.
id
}
`
),
url
:
this
.
$http
.
adornUrl
(
`/
api/
sys/config/info/
${
this
.
dataForm
.
id
}
`
),
method
:
'get'
,
method
:
'get'
,
params
:
this
.
$http
.
adornParams
()
params
:
this
.
$http
.
adornParams
()
}).
then
(({
data
})
=>
{
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
200
)
{
this
.
dataForm
.
paramKey
=
data
.
config
.
paramKey
this
.
dataForm
.
paramKey
=
data
.
paramKey
this
.
dataForm
.
paramValue
=
data
.
config
.
paramValue
this
.
dataForm
.
paramValue
=
data
.
paramValue
this
.
dataForm
.
remark
=
data
.
config
.
remark
this
.
dataForm
.
remark
=
data
.
remark
}
})
})
}
}
})
})
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
this
.
$refs
[
'dataForm'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'dataForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
$http
({
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/sys/config/
${
!
this
.
dataForm
.
id
?
'save'
:
'update'
}
`
),
url
:
this
.
$http
.
adornUrl
(
`/
api/
sys/config/
${
!
this
.
dataForm
.
id
?
'save'
:
'update'
}
`
),
method
:
'post'
,
method
:
'post'
,
data
:
this
.
$http
.
adornData
({
data
:
this
.
$http
.
adornData
({
'id'
:
this
.
dataForm
.
id
||
undefined
,
'id'
:
this
.
dataForm
.
id
||
undefined
,
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
'remark'
:
this
.
dataForm
.
remark
'remark'
:
this
.
dataForm
.
remark
})
})
}).
then
(({
data
})
=>
{
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
200
)
{
if
(
!
data
)
{
this
.
$message
({
this
.
$message
({
message
:
'操作成功'
,
message
:
'操作成功'
,
type
:
'success'
,
type
:
'success'
,
...
...
src/views/modules/api/sys/config.vue
View file @
fef7fcc8
...
@@ -101,21 +101,18 @@
...
@@ -101,21 +101,18 @@
getDataList
()
{
getDataList
()
{
this
.
dataListLoading
=
true
this
.
dataListLoading
=
true
this
.
$http
({
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/sys/config/list'
),
url
:
this
.
$http
.
adornUrl
(
'/
api/
sys/config/list'
),
method
:
'get'
,
method
:
'get'
,
params
:
this
.
$http
.
adornParams
({
params
:
this
.
$http
.
adornParams
({
'page'
:
this
.
pageIndex
,
'page
Index
'
:
this
.
pageIndex
,
'
limit
'
:
this
.
pageSize
,
'
pageSize
'
:
this
.
pageSize
,
'paramKey'
:
this
.
dataForm
.
paramKey
'paramKey'
:
this
.
dataForm
.
paramKey
})
})
}).
then
(({
data
})
=>
{
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
200
)
{
this
.
dataList
=
data
.
page
.
list
this
.
dataList
=
data
.
result
this
.
totalCount
=
data
.
page
.
totalCount
this
.
totalCount
=
data
.
total
}
else
{
this
.
dataList
=
[]
this
.
totalCount
=
0
}
this
.
dataListLoading
=
false
this
.
dataListLoading
=
false
})
})
},
},
...
@@ -152,11 +149,11 @@
...
@@ -152,11 +149,11 @@
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
$http
({
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/sys/config/delete'
),
url
:
this
.
$http
.
adornUrl
(
'/
api/
sys/config/delete'
),
method
:
'post'
,
method
:
'post'
,
data
:
this
.
$http
.
adornData
(
ids
,
false
)
data
:
this
.
$http
.
adornData
(
ids
,
false
)
}).
then
(({
data
})
=>
{
}).
then
(({
data
})
=>
{
if
(
data
&&
data
.
code
===
200
)
{
if
(
!
data
)
{
this
.
$message
({
this
.
$message
({
message
:
'操作成功'
,
message
:
'操作成功'
,
type
:
'success'
,
type
:
'success'
,
...
@@ -166,7 +163,7 @@
...
@@ -166,7 +163,7 @@
}
}
})
})
}
else
{
}
else
{
this
.
$message
.
error
(
data
.
m
sg
)
this
.
$message
.
error
(
data
.
m
essage
)
}
}
})
})
}).
catch
(()
=>
{})
}).
catch
(()
=>
{})
...
...
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