Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
admin-base
Commits
e43e074d
Commit
e43e074d
authored
Nov 20, 2018
by
王
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统管理,后台管理添加操作确认
parent
01df4bec
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
158 additions
and
84 deletions
+158
-84
index.vue
src/components/externalLaunch/index.vue
+13
-7
admin.vue
src/components/system/admin.vue
+39
-21
banner.vue
src/components/system/banner.vue
+28
-14
menu.vue
src/components/system/menu.vue
+26
-14
role.vue
src/components/system/role.vue
+26
-14
sysConfigDialog.vue
src/components/system/sysConfigDialog.vue
+26
-14
No files found.
src/components/externalLaunch/index.vue
View file @
e43e074d
...
@@ -173,14 +173,20 @@
...
@@ -173,14 +173,20 @@
let
id
=
this
.
commentForm
.
id
;
let
id
=
this
.
commentForm
.
id
;
let
desc
=
this
.
commentForm
.
desc
?
this
.
commentForm
.
desc
:
''
;
let
desc
=
this
.
commentForm
.
desc
?
this
.
commentForm
.
desc
:
''
;
if
(
!
desc
)
return
;
if
(
!
desc
)
return
;
updateAdsInnerApi
(
id
,{
desc
:
desc
}).
then
(
res
=>
{
this
.
$confirm
(
'确认编辑备注'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'继续'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'编辑备注成功'
type
:
'warning'
}).
then
(()
=>
{
updateAdsInnerApi
(
id
,{
desc
:
desc
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'编辑备注成功'
});
this
.
showCommentDialog
=
false
this
.
initPage
();
});
});
this
.
showCommentDialog
=
false
})
this
.
initPage
();
});
},
},
editComment
(
id
,
desc
)
{
editComment
(
id
,
desc
)
{
this
.
showCommentDialog
=
true
;
this
.
showCommentDialog
=
true
;
...
...
src/components/system/admin.vue
View file @
e43e074d
...
@@ -328,13 +328,19 @@
...
@@ -328,13 +328,19 @@
desc
:
dia
.
form
.
desc
,
desc
:
dia
.
form
.
desc
,
status
:
dia
.
form
.
status
status
:
dia
.
form
.
status
};
};
editAdminListApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
$confirm
(
'此操作将编辑该账号?'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'确定'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'修改成功!'
type
:
'warning'
});
}).
then
(()
=>
{
dia
.
show
=
false
;
editAdminListApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
dia
.
show
=
false
;
this
.
getList
()
})
})
})
}
else
if
(
dia
.
dialogType
===
0
){
}
else
if
(
dia
.
dialogType
===
0
){
let
json
=
{
let
json
=
{
...
@@ -343,25 +349,37 @@
...
@@ -343,25 +349,37 @@
passwd
:
md5
(
dia
.
form
.
password
),
passwd
:
md5
(
dia
.
form
.
password
),
username
:
dia
.
form
.
username
username
:
dia
.
form
.
username
};
};
addAdminListApi
(
json
).
then
(()
=>
{
this
.
$confirm
(
'此操作将添加新账号?'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'确定'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'添加成功!'
type
:
'warning'
});
}).
then
(()
=>
{
dia
.
show
=
false
;
addAdminListApi
(
json
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'添加成功!'
});
dia
.
show
=
false
;
this
.
getList
()
})
})
})
}
else
if
(
dia
.
dialogType
===
2
){
}
else
if
(
dia
.
dialogType
===
2
){
let
json
=
{
let
json
=
{
passwd_new
:
md5
(
dia
.
form
.
password
)
passwd_new
:
md5
(
dia
.
form
.
password
)
}
}
editPasswordApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
$confirm
(
'此操作将修改此账号密码?'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'确定'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'修改成功!'
type
:
'warning'
});
}).
then
(()
=>
{
dia
.
show
=
false
;
editPasswordApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
dia
.
show
=
false
;
this
.
getList
()
})
})
})
}
}
// }
// }
...
...
src/components/system/banner.vue
View file @
e43e074d
...
@@ -261,14 +261,21 @@
...
@@ -261,14 +261,21 @@
if
(
this
.
imageList
.
length
>
0
)
{
if
(
this
.
imageList
.
length
>
0
)
{
json
.
url
=
this
.
imageList
[
0
].
url
json
.
url
=
this
.
imageList
[
0
].
url
}
}
editBannerApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
$confirm
(
'确认修改Banner'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'继续'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'修改成功!'
type
:
'warning'
});
}).
then
(()
=>
{
dia
.
show
=
false
;
editBannerApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
dia
.
show
=
false
;
this
.
getList
()
})
})
})
}
else
{
}
else
{
let
json
=
{
let
json
=
{
title
:
dia
.
form
.
title
,
title
:
dia
.
form
.
title
,
...
@@ -277,14 +284,21 @@
...
@@ -277,14 +284,21 @@
if
(
this
.
imageList
.
length
>
0
)
{
if
(
this
.
imageList
.
length
>
0
)
{
json
.
url
=
this
.
imageList
[
0
].
url
json
.
url
=
this
.
imageList
[
0
].
url
}
}
addBannerApi
(
json
).
then
(()
=>
{
this
.
$confirm
(
'确认添加Banner'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'继续'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'添加成功!'
type
:
'warning'
});
}).
then
(()
=>
{
dia
.
show
=
false
;
addBannerApi
(
json
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'添加成功!'
});
dia
.
show
=
false
;
this
.
getList
()
})
})
})
}
}
}
}
})
})
...
...
src/components/system/menu.vue
View file @
e43e074d
...
@@ -156,13 +156,19 @@
...
@@ -156,13 +156,19 @@
cover
:
dia
.
form
.
cover
,
cover
:
dia
.
form
.
cover
,
pid
:
dia
.
form
.
pid
pid
:
dia
.
form
.
pid
};
};
updateMenuApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
$confirm
(
'此操作将修改该菜单?'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'确定'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'修改成功!'
type
:
'warning'
});
}).
then
(()
=>
{
dia
.
show
=
false
;
updateMenuApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
dia
.
show
=
false
;
this
.
getList
()
})
})
})
}
else
{
}
else
{
let
json
=
{
let
json
=
{
...
@@ -170,13 +176,19 @@
...
@@ -170,13 +176,19 @@
cover
:
dia
.
form
.
cover
,
cover
:
dia
.
form
.
cover
,
pid
:
dia
.
form
.
pid
pid
:
dia
.
form
.
pid
};
};
saveMenuApi
(
json
).
then
(()
=>
{
this
.
$confirm
(
'此操作将添加新菜单?'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'确定'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'添加成功!'
type
:
'warning'
});
}).
then
(()
=>
{
dia
.
show
=
false
;
saveMenuApi
(
json
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'添加成功!'
});
dia
.
show
=
false
;
this
.
getList
()
})
})
})
}
}
}
}
...
...
src/components/system/role.vue
View file @
e43e074d
...
@@ -238,26 +238,38 @@
...
@@ -238,26 +238,38 @@
name
:
dia
.
form
.
name
,
name
:
dia
.
form
.
name
,
menu_ids
:
JSON
.
stringify
(
menu_ids
)
menu_ids
:
JSON
.
stringify
(
menu_ids
)
};
};
updateRoleApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
$confirm
(
'此操作将修改该角色?'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'确定'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'修改成功!'
type
:
'warning'
});
}).
then
(()
=>
{
dia
.
show
=
false
;
updateRoleApi
(
dia
.
form
.
id
,
json
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
dia
.
show
=
false
;
this
.
getList
()
})
})
})
}
else
{
}
else
{
let
json
=
{
let
json
=
{
name
:
dia
.
form
.
name
,
name
:
dia
.
form
.
name
,
menu_ids
:
JSON
.
stringify
(
menu_ids
)
menu_ids
:
JSON
.
stringify
(
menu_ids
)
};
};
saveRoleApi
(
json
).
then
(()
=>
{
this
.
$confirm
(
'此操作将添加新角色?'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'确定'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'添加成功!'
type
:
'warning'
});
}).
then
(()
=>
{
dia
.
show
=
false
;
saveRoleApi
(
json
).
then
(()
=>
{
this
.
getList
()
this
.
$message
({
type
:
'success'
,
message
:
'添加成功!'
});
dia
.
show
=
false
;
this
.
getList
()
})
})
})
}
}
}
}
...
...
src/components/system/sysConfigDialog.vue
View file @
e43e074d
...
@@ -82,26 +82,38 @@
...
@@ -82,26 +82,38 @@
if
(
this
.
dialogObj
.
id
){
if
(
this
.
dialogObj
.
id
){
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
){
if
(
valid
){
updateConfigApi
(
this
.
id
,
this
.
form
).
then
(
res
=>
{
this
.
$confirm
(
'此操作将修改该配置?'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'确定'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'修改成功!'
type
:
'warning'
});
}).
then
(()
=>
{
this
.
$emit
(
"reflash"
);
updateConfigApi
(
this
.
id
,
this
.
form
).
then
(
res
=>
{
this
.
show
=
false
;
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
this
.
$emit
(
"reflash"
);
this
.
show
=
false
;
})
})
})
}
}
});
});
}
else
{
}
else
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
){
if
(
valid
){
saveConfigApi
(
this
.
form
).
then
(
res
=>
{
this
.
$confirm
(
'此操作将添加新配置?'
,
'提示'
,
{
this
.
$message
({
confirmButtonText
:
'确定'
,
type
:
'success'
,
cancelButtonText
:
'取消'
,
message
:
'新增成功!'
type
:
'warning'
});
}).
then
(()
=>
{
this
.
$emit
(
"reflash"
);
saveConfigApi
(
this
.
form
).
then
(
res
=>
{
this
.
show
=
false
;
this
.
$message
({
type
:
'success'
,
message
:
'新增成功!'
});
this
.
$emit
(
"reflash"
);
this
.
show
=
false
;
})
})
})
}
}
});
});
...
...
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