<template>
    <div class="edit-view organization">
        <el-tabs v-model="active">
            <el-tab-pane label="申请信息" name="first"><RateAudit ref="page1" @next="goNext"/></el-tab-pane>
            <el-tab-pane label="专家组" name="second" :disabled="status"><AssignExpert ref="page2"/></el-tab-pane>
            <el-tab-pane label="评分细则" name="third" :disabled="grade"><GradeList ref="page3"/></el-tab-pane>
            <el-tab-pane label="审批进度" name="forth"><RateAuditEdit ref="page4"/></el-tab-pane>
        </el-tabs>

        <div style="min-height:50px"></div>
    </div>
</template>
<script>
import RateAudit from '../rate/RateAudit.vue';
import AssignExpert from '../rate/AssignExpert.vue';
import GradeList from '../rate/GradeList.vue';
import RateAuditEdit from '../rate/RateAuditEdit.vue';
export default {
    name: 'Organization',
    created() {
        let data = this.$route.query.status;
        if (
            data == 'SUBMIT_GRADE' ||
            data == 'REVIEW_PENDING' ||
            data == 'SUBMIT_PAPER_MATERIALS' ||
            data == 'COLLECT_PAPER_MATERIALS' ||
            data == 'COMPLETE'
        ) {
            this.status = false;
        }
        if (
            data == 'SUBMIT_GRADE' ||
            data == 'COMPLETE' ||
            data == 'SUBMIT_PAPER_MATERIALS' ||
            data == 'COLLECT_PAPER_MATERIALS'
        ) {
            this.grade = false;
        }
    },
    data() {
        return {
            active: 'first',
            status: true,
            grade: true
        };
    },
    methods: {
        goNext(page) {
            this.$nextTick(() => {
                this.activeName = 'second';
            });
        }
    },
    components: {
        AssignExpert,
        RateAudit,
        GradeList,
        RateAuditEdit
    }
};
</script>
<style lang="less" scoped></style>
