<template>
    <fieldset>
        <legend>
            <el-tag type="info">按需操作</el-tag>
        </legend>
        <div class="op-header">
            <div class="left-panel">
                <el-button type="success" icon="el-icon-plus" @click="table_add()">新增门店</el-button>
                <el-button icon="el-icon-delete" @click="table_del()" :disabled="dataSelect.length>0?false:true">删除</el-button>
                <el-button icon="el-icon-document" @click="table_batch_status(0)" :disabled="dataSelect.length>0?false:true">启用</el-button>
                <el-button icon="el-icon-lock" @click="table_batch_status(3)" :disabled="dataSelect.length>0?false:true">禁用</el-button>
                <!-- <el-button type="primary" icon="el-icon-download" @click="table_export()">导出</el-button> -->
            </div>
        </div>
    </fieldset>
    <formMain ref="formMain" @success="handleSuccess"></formMain>
</template>

<script>
import formMain from './form';
export default {
    components: {
        formMain
    },
    props: {
        type: { type: String, default: "1" },
        dataSelect: { type: Array, default: () => [] },
        dataSelectFull: { type: Array, default: () => [] }
    },
    data(){
        return {

        }
    },
    methods: {
        handleSuccess(){
            this.$emit("success");
        },
        table_add(){
            this.$nextTick(() => {
                this.$refs.formMain.open()
            })
        },
    }
}
</script>