Commit 5100a810 by cwq0219

role删除接口

1 parent 4cc488d1
......@@ -25,7 +25,7 @@
<script>
import { RoleCreate, RoleDetail, UserDetail } from '@/components/index'
// 接口
import { getRoleList } from '@/api/api'
import { getRoleList, deleteRoleById } from '@/api/api'
import { roleCreateStructure, userRoleDetailColumn, userRoleDetailConsole } from '@/common/commonConst'
export default {
name: 'role',
......@@ -132,6 +132,8 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 删除角色,根据返回的code值来判断是否删除成功
this.deleteRole(rows[index].id)
rows.splice(index, 1)
this.message('删除成功', 'success')
}).catch(() => {
......@@ -162,6 +164,14 @@ export default {
console.log(err)
})
},
// 删除角色
deleteRole(params) {
deleteRoleById.req(params).then(res => {
console.log(res)
}).catch(err => {
console.log(err)
})
},
// 接口请求-end---------------------------------------
// 新增用户到页面
aaaddRole(data) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!