<template>
    <div  class="impDiv" @click.stop="void(0)" :style="{width:width+'px',top:xy.top+'px',left:xy.left-width+'px'}">
        <div class="triangle"></div>
        <div class="" style="text-align: center;margin-top:0%;width: 100%;letter-spacing: 5px;color: #cdd2fb;font-size: 18px;">
            <span style="position: relative;">产能预期天数<el-input v-model="preday" type="number" placeholder="选择" style="width: 100px;"/>
                <el-button style="margin:10px" @click="impdata">导出</el-button>
            </span>                
        </div>
        <div>

        </div>
    </div>
</template>
<style>
    @import '../../styles/main.css';
    .el-date-editor.el-input, .el-date-editor.el-input__wrapper{
        width:150px;

    }
    .el-input__wrapper{
        background-color:#1f4774;
        box-shadow: 0 0 0 1px #7f9bdd inset !important;
    }
    .el-input__wrapper input{
        border:0px !important;
        color:#fff;
    }
</style>
<script>
    import { ref,onMounted,watch } from 'vue';
    import api from "@/api/system";
    import { ElDatePicker,ElMessage } from 'element-plus';
    import 'element-plus/dist/index.css'; // 确保导入样式文件
    import * as echarts from 'echarts';
    export default {
        props:{
            xy:{
                type:Object
            }

        },
        setup(props,{emit}){    
            const width=ref(300)       
            let preday=ref(7);
            function impquery(){

            }

            function impdata(){
                if(preday.value=='' || preday.value==null){
                    ElMessage({
                        message: "未输入预期天数",
                        type: "error"
                    })
                    return;
                }
                window.open(ApiServer + "/api/export/yarn-specifications?day="+preday.value)
            }

            onMounted(()=>{
                
            })

            return{
                width,
                preday,
                impdata,
                impquery,
            }
        }
    }
</script>