/** * 组件名称；权限配置修改 * @author:laiyh * @Date:2020-07-27 */

<template>
    <div class="authen-main authorization-edit-maintain">
        <el-tabs v-model="active" type="card" @tab-click="tableClick">
            <el-tab-pane label="角色管理" name="roleManage">
                <author-role-manage :appId="sizeForm.id || ''" v-if="tabFirst" />
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
import AuthorRoleManage from "./author-role-manage";
export default {
    name: "",
    components: {
        AuthorRoleManage,
    },
    // 接收父节点的参数
    props: {
        sizeForm: {
            type: Object,
            default: () => {}
        }
    },
    data() {
        return {
            active: "roleManage",
            tabFirst: true,
            tabSecond: false
        };
    },
    // 方法
    methods: {
        tableClick(tabName) {
            const active_1 = this.active;
            if (active_1 === "roleManage") {
                this.tabFirst = true;
                this.tabSecond = false;
            } else if (active_1 === "sourceManage") {
                this.tabFirst = false;
                this.tabSecond = true;
            }
        }
    },
    // 页面创建完成$data可访问 $el不可以访问
    created() {}
};
</script>

<style lang="scss" scope>
@import "@/assets/style/my-card.scss";
</style>
<style lang="scss" scope>
.authorization-edit-maintain {
    .edit-header-tabs-text {
        height: 30px;
        line-height: 30px;
        border-bottom: 1px solid darkgray;
        margin-bottom: 10px;
        padding-left: 10px;
        border-bottom-style: dashed;
    }
}
</style>
