Commit 3c9bd665 by 王志慧

commit

1 parent 5a177f0e
<template> <template>
<div class="role-home-page"> <div class="role-home-page">
<div class="top_widget"> <div class="top_widget">
<el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> <!-- <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> -->
<GLButton size="small" fn="创建角色" icon="el-icon-plus" type="primary" display="disabled" @click="toCreatePage">创建角色</GLButton>
</div> </div>
<div class="table_widget"> <div class="table_widget">
<div class="search_widget"> <div class="search_widget">
...@@ -30,8 +31,11 @@ ...@@ -30,8 +31,11 @@
</div> </div>
<GLTable v-if="distoryTable" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="getTableData"> <GLTable v-if="distoryTable" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="getTableData">
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="toLookPage(scope.scope)">查看</el-button> <GLButton type="text" @click="toLookPage(scope.scope)" fn="查看">查看</GLButton>
<el-button v-if="scope.scope.roleName!='超级管理员'" type="text" @click="toEditPage(scope.scope)">修改</el-button> <!-- <GLButton v-if="scope.scope.roleName != '超级管理员'" fn="修改" type="text" display="disabled" @click="toEditPage(scope.scope)">修改</GLButton> -->
<GLButton v-if="!scope.scope.defalutRole" fn="修改" type="text" display="disabled" @click="toEditPage(scope.scope)">修改</GLButton>
<!-- <el-button type="text" @click="toLookPage(scope.scope)">查看</el-button>
<el-button v-if="scope.scope.roleName!='超级管理员'" type="text" @click="toEditPage(scope.scope)">修改</el-button> -->
<el-button v-if="scope.scope.delFlag" type="text" @click="todelete(scope.scope)">删除</el-button> <el-button v-if="scope.scope.delFlag" type="text" @click="todelete(scope.scope)">删除</el-button>
</template> </template>
</GLTable> </GLTable>
...@@ -118,7 +122,8 @@ export default { ...@@ -118,7 +122,8 @@ export default {
let { delFlag, roleName, merchantId } = this.searchForm let { delFlag, roleName, merchantId } = this.searchForm
let para = {} let para = {}
console.log(merchantId) console.log(merchantId)
if (!this.distoryTable) {//代表重置 if (!this.distoryTable) {
//代表重置
para = { para = {
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
...@@ -205,18 +210,17 @@ export default { ...@@ -205,18 +210,17 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}) }).then(() => {
.then(() => { this.$apis.role.deleteRole({ id: row.id }).then(res => {
this.$apis.role.deleteRole({ id: row.id }).then(res => { if (res) {
if (res) { this.getTableData()
this.getTableData() this.$message({
this.$message({ type: 'success',
type: 'success', message: '删除成功!'
message: '删除成功!' })
}) }
}
})
}) })
})
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!