privilege_group_list.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <div>
  3. <section class="content" style="margin-top: -10px;">
  4. <div class="box box-info">
  5. <div class="box-header with-border">
  6. <h3 class="box-title">鉴权管理 &gt; 权限组管理</h3>
  7. </div>
  8. <!-- 正文信息 -->
  9. <div class="box-body">
  10. <el-table
  11. :data="privilegeGroupList"
  12. border
  13. resizable
  14. stripe
  15. style="width: 100%;text-align:center;"
  16. >
  17. <el-table-column prop="id" label="ID" width="100" />
  18. <el-table-column prop="code" label="权限组编码" />
  19. <el-table-column prop="name" label="权限组名称" />
  20. <el-table-column prop="appName" label="应用名称" />
  21. <el-table-column width="300" label="操作">
  22. <div slot-scope="scope">
  23. <el-button
  24. size="small"
  25. type="primary"
  26. @click="editPrivilege(scope.row);"
  27. >
  28. 权限配置
  29. </el-button>
  30. </div>
  31. </el-table-column>
  32. </el-table>
  33. </div>
  34. </div>
  35. </section>
  36. </div>
  37. </template>
  38. <script>
  39. import { mapState } from "vuex";
  40. import { core_api } from "@/constants/constants.js";
  41. export default {
  42. data() {
  43. return {
  44. privilegeGroupList: []
  45. };
  46. },
  47. computed: {
  48. ...mapState({ user: state => state.user })
  49. },
  50. methods: {
  51. async queryAppList() {
  52. var url = core_api + "/rolePrivilege/getPrivilegeGroupList";
  53. const response = await this.$http.get(url);
  54. this.privilegeGroupList = response.data;
  55. },
  56. editPrivilege(row) {
  57. this.$router.replace({ path: "/index/privilege_tree/" + row.id });
  58. }
  59. },
  60. created() {
  61. this.queryAppList();
  62. }
  63. };
  64. </script>
  65. <style scoped></style>