“dzb”
2022-11-03 41dabb0db9619b8dbb8a311966e0b9920f67f7c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<template>
    <header>
        <div class="headerContent">
            <div class="find">
                <div class="search">
                    <span>输入查询:</span>
                    <el-input placeholder="店铺(门店)名称" v-model="search"></el-input>
                </div>
                <div class="status">
                    <span>店铺状态:</span>
                    <el-select v-model="storeState" placeholder="选择店铺状态">
                        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                        </el-option>
                    </el-select>
                </div>
                <div class="findBtn">
                    <el-button type="primary" @click="setSearch" icon="el-icon-search">查询</el-button>
                    <el-button icon="el-icon-delete-solid" @click="handleReset">重置</el-button>
                </div>
            </div>
        </div>
    </header>
</template>
<script>
export default {
    components: {
    },
    data() {
        return {
            dialogCreate: false,
            search: '',
            storeState: null,
            options:[
                {
                    label:'营业',
                    value:1
                },
                {
                    label:'倒闭',
                    value:2
                }
            ]
        }
    },
    methods: {
        setSearch() {
            this.$emit('getSearch', { text: this.search })
        },
        sendDialog(flag) {
            console.log(flag);
            this.dialogCreate = flag.flag;
            this.$emit('setDialog', { flag: true })
        },
        // 重置搜索条件
        handleReset(){
            console.group(1)
            this.search = '',
            this.storeState =null
        }
    },
    props: ['setDialog', 'getSearch', 'flag'],
}
</script>
<style lang="scss" scoped>
header {
    background-color: #09152f;
    border: 1pox solid #fff;
 
    .headerContent {
        padding: 0 40px;
        display: flex;
        line-height: 100px;
        justify-content: space-between;
        align-items: center;
 
        .find {
            display: flex;
        }
 
        .search,
        .status {
            display: flex;
            justify-content: flex-start;
 
            span {
                flex: 1;
            }
 
            .el-input {
                flex: 2;
                color: #1d3f57;
 
                &::v-deep .el-input__inner {
                    background-color: #09152f;
                    border: 1px solid #17324c;
                }
            }
 
        }
 
        .status {
            margin-left: 20px;
        }
 
        .findBtn {
            line-height: 100px;
            margin-left: 15px;
            display: flex;
            align-items: center;
 
            .el-button {
                padding: 12px 25px;
            }
        }
 
        .addBtn {
            padding: 12px 30px;
            margin-left: 20%;
        }
 
 
    }
}
</style>