Commit e43e074d authored by 王's avatar

系统管理,后台管理添加操作确认

parent 01df4bec
...@@ -173,6 +173,11 @@ ...@@ -173,6 +173,11 @@
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;
this.$confirm('确认编辑备注', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateAdsInnerApi(id,{desc: desc}).then(res=>{ updateAdsInnerApi(id,{desc: desc}).then(res=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -181,6 +186,7 @@ ...@@ -181,6 +186,7 @@
this.showCommentDialog = false this.showCommentDialog = false
this.initPage(); this.initPage();
}); });
})
}, },
editComment(id, desc) { editComment(id, desc) {
this.showCommentDialog = true; this.showCommentDialog = true;
......
...@@ -328,6 +328,11 @@ ...@@ -328,6 +328,11 @@
desc:dia.form.desc, desc:dia.form.desc,
status:dia.form.status status:dia.form.status
}; };
this.$confirm('此操作将编辑该账号?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
editAdminListApi(dia.form.id,json).then(()=>{ editAdminListApi(dia.form.id,json).then(()=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -336,6 +341,7 @@ ...@@ -336,6 +341,7 @@
dia.show = false; dia.show = false;
this.getList() this.getList()
}) })
})
}else if(dia.dialogType === 0){ }else if(dia.dialogType === 0){
let json = { let json = {
role_id:dia.form.role_id, role_id:dia.form.role_id,
...@@ -343,6 +349,11 @@ ...@@ -343,6 +349,11 @@
passwd:md5(dia.form.password), passwd:md5(dia.form.password),
username:dia.form.username username:dia.form.username
}; };
this.$confirm('此操作将添加新账号?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
addAdminListApi(json).then(()=>{ addAdminListApi(json).then(()=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -351,10 +362,16 @@ ...@@ -351,10 +362,16 @@
dia.show = false; dia.show = false;
this.getList() 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)
} }
this.$confirm('此操作将修改此账号密码?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
editPasswordApi(dia.form.id,json).then(()=>{ editPasswordApi(dia.form.id,json).then(()=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -363,6 +380,7 @@ ...@@ -363,6 +380,7 @@
dia.show = false; dia.show = false;
this.getList() this.getList()
}) })
})
} }
// } // }
// }) // })
......
...@@ -261,6 +261,11 @@ ...@@ -261,6 +261,11 @@
if (this.imageList.length > 0) { if (this.imageList.length > 0) {
json.url = this.imageList[0].url json.url = this.imageList[0].url
} }
this.$confirm('确认修改Banner', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
editBannerApi(dia.form.id,json).then(()=>{ editBannerApi(dia.form.id,json).then(()=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -269,6 +274,8 @@ ...@@ -269,6 +274,8 @@
dia.show = false; dia.show = false;
this.getList() this.getList()
}) })
})
}else{ }else{
let json = { let json = {
title:dia.form.title, title:dia.form.title,
...@@ -277,6 +284,11 @@ ...@@ -277,6 +284,11 @@
if (this.imageList.length > 0) { if (this.imageList.length > 0) {
json.url = this.imageList[0].url json.url = this.imageList[0].url
} }
this.$confirm('确认添加Banner', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
addBannerApi(json).then(()=>{ addBannerApi(json).then(()=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -285,6 +297,8 @@ ...@@ -285,6 +297,8 @@
dia.show = false; dia.show = false;
this.getList() this.getList()
}) })
})
} }
} }
}) })
......
...@@ -156,6 +156,11 @@ ...@@ -156,6 +156,11 @@
cover:dia.form.cover, cover:dia.form.cover,
pid:dia.form.pid pid:dia.form.pid
}; };
this.$confirm('此操作将修改该菜单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateMenuApi(dia.form.id,json).then(()=>{ updateMenuApi(dia.form.id,json).then(()=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -164,12 +169,18 @@ ...@@ -164,12 +169,18 @@
dia.show = false; dia.show = false;
this.getList() this.getList()
}) })
})
}else{ }else{
let json = { let json = {
name:dia.form.name, name:dia.form.name,
cover:dia.form.cover, cover:dia.form.cover,
pid:dia.form.pid pid:dia.form.pid
}; };
this.$confirm('此操作将添加新菜单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
saveMenuApi(json).then(()=>{ saveMenuApi(json).then(()=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -178,6 +189,7 @@ ...@@ -178,6 +189,7 @@
dia.show = false; dia.show = false;
this.getList() this.getList()
}) })
})
} }
} }
}) })
......
...@@ -238,6 +238,11 @@ ...@@ -238,6 +238,11 @@
name:dia.form.name, name:dia.form.name,
menu_ids:JSON.stringify(menu_ids) menu_ids:JSON.stringify(menu_ids)
}; };
this.$confirm('此操作将修改该角色?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateRoleApi(dia.form.id,json).then(()=>{ updateRoleApi(dia.form.id,json).then(()=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -246,11 +251,17 @@ ...@@ -246,11 +251,17 @@
dia.show = false; dia.show = false;
this.getList() 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)
}; };
this.$confirm('此操作将添加新角色?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
saveRoleApi(json).then(()=>{ saveRoleApi(json).then(()=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -259,6 +270,7 @@ ...@@ -259,6 +270,7 @@
dia.show = false; dia.show = false;
this.getList() this.getList()
}) })
})
} }
} }
}) })
......
...@@ -82,6 +82,11 @@ ...@@ -82,6 +82,11 @@
if(this.dialogObj.id){ if(this.dialogObj.id){
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if(valid){ if(valid){
this.$confirm('此操作将修改该配置?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateConfigApi(this.id,this.form).then(res=>{ updateConfigApi(this.id,this.form).then(res=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -90,11 +95,17 @@ ...@@ -90,11 +95,17 @@
this.$emit("reflash"); this.$emit("reflash");
this.show = false; this.show = false;
}) })
})
} }
}); });
}else{ }else{
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if(valid){ if(valid){
this.$confirm('此操作将添加新配置?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
saveConfigApi(this.form).then(res=>{ saveConfigApi(this.form).then(res=>{
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -103,6 +114,7 @@ ...@@ -103,6 +114,7 @@
this.$emit("reflash"); this.$emit("reflash");
this.show = false; this.show = false;
}) })
})
} }
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment