<template>
    <div class='input-dialog'>
        <div @click='show' style='color: #c3c7cb;cursor: pointer;position:absolute;top:-45px;right:0px;'>
            <img src='@/assets/imgs/select.png' />
            筛选
        </div>
        <div
            v-if='dialogFormVisible'
            style='width:280px;height:450px;background:rgba(255,255,255,1);
            box-shadow:0px 2px 10px 0px rgba(31,35,41,0.1);border:1px solid rgba(228,229,231,1);z-index:9999;
            position:absolute;top:0px;right:0px;'
        >
            <el-form style=' padding: 20px 24px;'>
                <p style='margin:16px 0 8px 0'>安装位置</p>
                <el-input placeholder='搜索安装位置' style='width:192px;margin-right:12px' size='small' prefix-icon='el-icon-search' v-model='keyword'></el-input>
                <p style='margin:16px 0 8px 0'>生产厂商</p>
                <el-input placeholder='搜索生产厂商' style='width:192px;margin-right:12px' size='small' prefix-icon='el-icon-search' v-model='keyword'></el-input>
                <p style='margin:16px 0 8px 0'>服务商</p>
                <el-input placeholder='搜索服务商' style='width:192px;margin-right:12px' size='small' prefix-icon='el-icon-search' v-model='keyword'></el-input>
                <p style='margin:16px 0 8px 0'>设备编号</p>
                <el-input placeholder='搜索设备编号' style='width:192px;margin-right:12px' size='small' prefix-icon='el-icon-search' v-model='keyword'></el-input>
            </el-form>

            <div style='position:absolute;bottom:40px;right:47px;z-index:9999'>
                <el-button @click='dialogFormVisible = false' size='small'>取 消</el-button>
                <el-button type='primary' @click='confirm' size='small'>确 定</el-button>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            dialogFormVisible: false,
            form: {},
            formLabelWidth: '232px',
            search: {
                type: 'wx',
                msInput4: '',
                zysxInput4: '',
                gdbhInput4: ''
            }
        }
    },
    props: ['type'],
    methods: {
        show() {
            this.dialogFormVisible = !this.dialogFormVisible
        },
        confirm() {
            this.dialogFormVisible = false
            //console.log(this.type)
            if (this.type == 'wx') {
                this.$emit('changeIndex3', this.search)
            }
        }
    },
    mounted() {}
}
</script>

<style lang="less" scoped>
.input-dialog {
    position: relative;
}
</style>