Commit 3c9bd665 by 王志慧

commit

1 parent 5a177f0e
<template>
<div class="role-home-page">
<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 class="table_widget">
<div class="search_widget">
......@@ -30,8 +31,11 @@
</div>
<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">
<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>
<GLButton type="text" @click="toLookPage(scope.scope)" fn="查看">查看</GLButton>
<!-- <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>
</template>
</GLTable>
......@@ -118,7 +122,8 @@ export default {
let { delFlag, roleName, merchantId } = this.searchForm
let para = {}
console.log(merchantId)
if (!this.distoryTable) {//代表重置
if (!this.distoryTable) {
//代表重置
para = {
pageNum: 1,
pageSize: 10
......@@ -205,18 +210,17 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.role.deleteRole({ id: row.id }).then(res => {
if (res) {
this.getTableData()
this.$message({
type: 'success',
message: '删除成功!'
})
}
})
}).then(() => {
this.$apis.role.deleteRole({ id: row.id }).then(res => {
if (res) {
this.getTableData()
this.$message({
type: 'success',
message: '删除成功!'
})
}
})
})
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!