Commit fcd80451 by cwq0219

接口

1 parent 68074757
...@@ -10,16 +10,10 @@ ...@@ -10,16 +10,10 @@
<gl-button class="control-tabledata-button" size="small" @click="handleCreateOrEdit(roleParam, '新增角色')">创建</gl-button> <gl-button class="control-tabledata-button" size="small" @click="handleCreateOrEdit(roleParam, '新增角色')">创建</gl-button>
<role-create :createVisible="createVisible" :roleParam="roleParam" :createOrEditTitle="createOrEditTitle" @createClose="handleCreateClose"></role-create> <role-create :createVisible="createVisible" :roleParam="roleParam" :createOrEditTitle="createOrEditTitle" @createClose="handleCreateClose"></role-create>
<div class="m-b8"> <div class="m-b8">
<gl-table :table="roleData"></gl-table> <transition>
<gl-pagination <gl-table :table="roleData"></gl-table>
background </transition>
@size-change="handleSizeChange" <gl-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pagination.pageNum" :page-sizes="[10,20,30,40]" :page-size="pagination.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total">
@current-change="handleCurrentChange"
:current-page="pagination.pageNum"
:page-sizes="[10,20,30,40]"
:page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</gl-pagination> </gl-pagination>
<role-detail :detailVisible="detailVisible" :roleParam="roleParam" @detailClose="handleDetailClose"></role-detail> <role-detail :detailVisible="detailVisible" :roleParam="roleParam" @detailClose="handleDetailClose"></role-detail>
<user-detail :userDetailVisible="userDetailVisible" :userDetailTitle="userDetailTitle" @userDetailClose="handleUserDetailClose" :dataParam="[]" :columnParam="columnParam" :consoleParam="consoleParam"></user-detail> <user-detail :userDetailVisible="userDetailVisible" :userDetailTitle="userDetailTitle" @userDetailClose="handleUserDetailClose" :dataParam="[]" :columnParam="columnParam" :consoleParam="consoleParam"></user-detail>
...@@ -125,7 +119,14 @@ export default { ...@@ -125,7 +119,14 @@ export default {
// console.log(err) // console.log(err)
// }) // })
}, },
watch: {
roleName(val) {
!val
}
},
methods: { methods: {
getRoleList() {
},
message(message, type) { message(message, type) {
type && this.$message({ type && this.$message({
showClose: true, showClose: true,
...@@ -143,7 +144,6 @@ export default { ...@@ -143,7 +144,6 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.roleData.data.splice(index, 1)
rows.splice(index, 1) rows.splice(index, 1)
this.message('删除成功', 'success') this.message('删除成功', 'success')
}).catch(() => { }).catch(() => {
...@@ -177,7 +177,12 @@ export default { ...@@ -177,7 +177,12 @@ export default {
this.pagination.pageNum = val this.pagination.pageNum = val
}, },
handleSearchRoleName() { handleSearchRoleName() {
this.roleName = '' this.roleData.data = this.roleData.data.filter(item => {
if (item.roleName.indexOf(this.roleName) !== -1) {
return item
}
})
// this.roleName = ''
}, },
handleGetRoleDetail(params) { handleGetRoleDetail(params) {
this.roleParam = params this.roleParam = params
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!