<template>
    <div class="taskreview-all">
        <el-dialog width="400px" title="AI分析" :visible.sync="taskVisible">
            <div>
                <el-select style="width:100px" v-model="value" filterable placeholder="请选择">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
                <el-date-picker style="width: 250px;" v-model="searchdate" type="daterange" align="right" unlink-panels
                    range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
                </el-date-picker>
            </div>
            <div style="text-align: right; margin-top: 20px;">
                <el-button type="primary" @click="taskVisible = false">确 定</el-button>
            </div>
        </el-dialog>
        <div class="taskreview-hade">
            <div>
                <el-date-picker style="width: 250px;" v-model="searchdate" type="daterange" align="right" unlink-panels
                    range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
                </el-date-picker>
                <el-select style="width: 200px;" v-model="value" placeholder="请选择">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
            </div>
            <el-button type="primary">AI分析</el-button>
        </div>
        <div class="taskreview-table">
            <el-table :data="tableData" border style="width: 100%">
                <el-table-column prop="date" label="序号" width="180">
                </el-table-column>
                <el-table-column prop="name" label="公司名称" width="180">
                </el-table-column>
                <el-table-column prop="name" label="员工" width="180">
                </el-table-column>
                <el-table-column prop="name" label="入职日期" width="180">
                </el-table-column>
                <el-table-column prop="name" label="是否转正" width="180">
                </el-table-column>
                <el-table-column prop="name" label="业务客户量" width="180">
                </el-table-column>
                <el-table-column prop="name" label="是否达标" width="180">
                </el-table-column>
                <el-table-column prop="address" label="地址">
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>
<script>
export default {
    data () {
        return {
            pickerOptions: {
                shortcuts: [{
                    text: '最近一周',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近一个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                        picker.$emit('pick', [start, end]);
                    }
                }, {
                    text: '最近三个月',
                    onClick(picker) {
                        const end = new Date();
                        const start = new Date();
                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                        picker.$emit('pick', [start, end]);
                    }
                }]
            },
            searchdate: '',
            value:'',
            options:[
                {value:'1',label:'正式员工'},
                {value:'2',label:'试用期员工'},

            ],
            tableData:[],
            taskVisible:true,
        }
    },
    methods: {
        textset(){
            var a =[1,2,3];
            var b =[3,4,5];
            var ab=new Set([...a,...b]);
            console.log(Array.from(ab));
            console.log(...a);
            console.log(...b);
        }    
    },
    mounted(){
        this.textset();
    }
}
</script>
<style>
.taskreview-all {
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 0 5px #0005;
    border-radius: 10px;
    min-height: 830px;
}
.taskreview-hade{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
</style>