|
@@ -2,47 +2,21 @@
|
|
<div class='m-container'>
|
|
<div class='m-container'>
|
|
<h2>系统角色权限管理</h2>
|
|
<h2>系统角色权限管理</h2>
|
|
<div class="m-core">
|
|
<div class="m-core">
|
|
- <div class='newBand'>添加</div>
|
|
|
|
- <!-- 搜索类型 -->
|
|
|
|
- <el-form :inline="true"
|
|
|
|
- class="searchForm"
|
|
|
|
- v-model="searchForm">
|
|
|
|
- <el-form-item>
|
|
|
|
- <el-select v-model="searchForm.status"
|
|
|
|
- placeholder="角色类型">
|
|
|
|
- <el-option v-for="item in roleList" :key="item.value"
|
|
|
|
- :label="item.label" :value="item.value"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item>
|
|
|
|
- <el-input suffix-icon="el-icon-search"
|
|
|
|
- placeholder="请输入搜索内容"></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- <!-- 查询列表 -->
|
|
|
|
- <!-- <div class="searchWrap">
|
|
|
|
- <p>查询条件:</p>
|
|
|
|
- <div class="searchItem"
|
|
|
|
- @click="closeSearch(item)"
|
|
|
|
- v-for="(item,index) in searchLsit">
|
|
|
|
- {{ item.key }}
|
|
|
|
- <i class="el-icon-close"></i>
|
|
|
|
- </div>
|
|
|
|
- </div> -->
|
|
|
|
|
|
+ <div @click="onAdminOperation('create')" class='newBand'>添加</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<div class="tableWrap">
|
|
<div class="tableWrap">
|
|
- <el-table :data='tableList'>
|
|
|
|
- <el-table-column align='center'
|
|
|
|
- label="角色分类">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align='center'
|
|
|
|
- label="状态">
|
|
|
|
|
|
+ <el-table :data='tableList' header-cell-class-name="headerName">
|
|
|
|
+ <el-table-column align='center' prop="roleName"
|
|
|
|
+ label="角色类型">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column align='center'
|
|
|
|
|
|
+ <el-table-column align='center' prop="roleDesc"
|
|
label="权限范围">
|
|
label="权限范围">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align='center'
|
|
<el-table-column align='center'
|
|
label="操作">
|
|
label="操作">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button @click="onAdminOperation('update', scope.row)" type="text">修改</el-button>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<pagination :total="pageInfo.total"
|
|
<pagination :total="pageInfo.total"
|
|
@@ -56,17 +30,13 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import pagination from '@/components/Pagination/index'
|
|
import pagination from '@/components/Pagination/index'
|
|
-import { getUserRole } from '@/api/systemManage'
|
|
|
|
|
|
+import { roleQueryPage } from '@/api/systemManage'
|
|
import store from '@/store'
|
|
import store from '@/store'
|
|
export default {
|
|
export default {
|
|
components: { pagination },
|
|
components: { pagination },
|
|
name: 'adminManager',
|
|
name: 'adminManager',
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
- searchForm: {
|
|
|
|
- status: ''
|
|
|
|
- },
|
|
|
|
- searchLsit: [],
|
|
|
|
tableList: [],
|
|
tableList: [],
|
|
pageInfo: {
|
|
pageInfo: {
|
|
// 分页规则
|
|
// 分页规则
|
|
@@ -75,27 +45,38 @@ export default {
|
|
total: 0, // 总条数
|
|
total: 0, // 总条数
|
|
page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
},
|
|
},
|
|
- organId: store.getters.organ,
|
|
|
|
- roleList: [], // 角色列表
|
|
|
|
|
|
+ organId: store.getters.organ
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.getRoleList()
|
|
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- getList () { },
|
|
|
|
- getRoleList() {
|
|
|
|
- getUserRole({ organId: this.organId }).then(res => {
|
|
|
|
- if(res.code == 200) {
|
|
|
|
- this.roleList = {
|
|
|
|
- label: res.data.roleName,
|
|
|
|
- value: res.data.id
|
|
|
|
- }
|
|
|
|
|
|
+ getList () {
|
|
|
|
+ roleQueryPage({ organId: this.organId }).then(res => {
|
|
|
|
+ if(res.code == 200 && res.data && res.data.rows.length > 0) {
|
|
|
|
+ this.tableList = res.data.rows
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ onAdminOperation(type, row) {
|
|
|
|
+ let params = {
|
|
|
|
+ path: '/system/insideSetting/adminoperation',
|
|
|
|
+ query: {
|
|
|
|
+ type: type
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(row) {
|
|
|
|
+ params.query.id = row.id
|
|
|
|
+ }
|
|
|
|
+ this.$router.push(params)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
|
|
+.headerName {
|
|
|
|
+ background-color: #EDEEF0 !important;
|
|
|
|
+ color: #444444;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|