privilege_group_list.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <section class="content">
  3. <div class="box box-info">
  4. <div class="box-body">
  5. <el-table :data="privilegeGroupList" border resizable stripe>
  6. <el-table-column prop="id" label="ID" width="100" />
  7. <el-table-column prop="code" label="权限组编码" />
  8. <el-table-column prop="name" label="权限组名称" />
  9. <el-table-column width="300" label="操作">
  10. <div slot-scope="scope">
  11. <el-button
  12. size="small"
  13. type="primary"
  14. @click="editPrivilege(scope.row)"
  15. >
  16. 权限配置
  17. </el-button>
  18. </div>
  19. </el-table-column>
  20. </el-table>
  21. </div>
  22. </div>
  23. </section>
  24. </template>
  25. <script>
  26. import { mapState } from "vuex";
  27. import { CORE_API } from "@/constants/constants.js";
  28. export default {
  29. name: "PrivilegeGroupList",
  30. data() {
  31. return {
  32. privilegeGroupList: []
  33. };
  34. },
  35. computed: {
  36. ...mapState({ user: state => state.user })
  37. },
  38. methods: {
  39. async queryAppList() {
  40. var url = CORE_API + "/rolePrivilege/getPrivilegeGroupList";
  41. const response = await this.$httpWithMsg.get(url);
  42. this.privilegeGroupList = response.data;
  43. },
  44. editPrivilege(row) {
  45. this.$router.push({ path: "/basic/privilege_tree/" + row.id });
  46. }
  47. },
  48. created() {
  49. this.queryAppList();
  50. }
  51. };
  52. </script>
  53. <style scoped></style>