123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <div class="system_management">
- <el-container>
- <Aside
- v-bind="{
- showMenuIndex: showMenuIndex,
- menuList: menuList,
- handleMenuSelect: handleMenuSelect,
- }"
- ></Aside>
- <el-main>
- <UserManagement v-if="showIndex == '1'"></UserManagement>
- <AuthorityManagement v-if="showIndex == '2'"></AuthorityManagement>
- </el-main>
- </el-container>
- </div>
- </template>
- <script>
- export default {
- props: {
- index: {
- type: Number,
- },
- },
- data() {
- return {
- menuList: null,
- showIndex: "1",
- showMenuIndex: "1",
- };
- },
- components: {
- Aside: () => import("@/components/Currency/Aside.vue"),
- UserManagement: () =>
- import("@/components/SystemManagement/UserManagement.vue"),
- AuthorityManagement: () =>
- import("@/components/SystemManagement/AuthorityManagement.vue"),
- },
- created() {
- let that = this;
- this.menuList =
- this.$store.getters.getMenuListTotal[this.index - 1].children;
- t("", this.menuList);
- function t(beforeindex, arr) {
- if (beforeindex == "") {
- beforeindex = arr[0].index;
- } else {
- beforeindex = beforeindex + "-" + arr[0].index;
- }
- if (arr[0].children) {
- t(beforeindex, arr[0].children);
- } else {
- that.showIndex = beforeindex;
- that.showMenuIndex = beforeindex;
- }
- }
- },
- methods: {
- handleMenuSelect(index) {
- this.showIndex = index;
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .system_management {
- height: 100%;
- width: 100%;
- .el-container {
- height: 100%;
- .el-main {
- padding: 0 0;
- }
- }
- }
- </style>
|