<template>
    <j-modal :title="raw ? ('[' + raw.name + ']-->房价管理') : '房价管理'" :width="width" :visible="visible" switchFullscreen
        @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel"
        cancelText="关闭">
        <a-tabs default-active-key="1" tab-position="left" @change="ontabChange">
            <a-tab-pane tab="全天房" key="1">
                <room-qtf-price-table v-if="raw && tabCurrent == '1'" :layout-id="raw.id"></room-qtf-price-table>
            </a-tab-pane>
            <a-tab-pane tab="钟点房" key="2">
                <room-zdf-price-table v-if="raw && tabCurrent == '2'" :layout-id="raw.id"></room-zdf-price-table>
               
            </a-tab-pane>
        </a-tabs>
    </j-modal>
</template>

<script>
import RoomQtfPriceTable from './RoomQtfPriceTable.vue';
import RoomZdfPriceTable from './RoomZdfPriceTable.vue'

export default {
    components: {
        RoomQtfPriceTable,
        RoomZdfPriceTable
    },
    data() {
        return {
            tabCurrent: '1',
            width: '80%',
            visible: false,
            disableSubmit: false,
            raw: null
        };
    },

    mounted() {

    },

    methods: {
        handleOk() {
            console.log(1)
        },
        ontabChange(e) {
            this.tabCurrent = e
        },
        handleCancel() {
            this.visible = false
        },
        setRaw(layoutId, title) {
            this.raw = {
                id: layoutId,
                name: title
            }
        }

    },
};
</script>

<style  scoped>

</style>