<template>
|
<header>
|
<div class="headerContent">
|
<div class="search">
|
<span>筛选条件:</span>
|
<el-input placeholder="请输入内容" v-model="search"></el-input>
|
<div class="findBtn">
|
<el-button type="primary" @click="setSearch">查询</el-button>
|
</div>
|
</div>
|
<div class="addUser">
|
<!-- :before-close="handleClose" -->
|
<el-button class="addBtn" type="primary" @click="dialogCreate = true">添加用户</el-button>
|
<el-dialog :visible.sync="dialogCreate" title="新增账户" width="60%" v-if="dialogCreate"
|
:before-close="handleClose">
|
<createUser @sendDialog="sendDialog" />
|
</el-dialog>
|
</div>
|
</div>
|
</header>
|
</template>
|
<script>
|
import createUser from "../createUser";
|
export default {
|
components: {
|
createUser,
|
},
|
data() {
|
return {
|
dialogCreate: false,
|
search: '',
|
}
|
},
|
methods: {
|
setSearch() {
|
this.$emit('getSearch', { text: this.search })
|
},
|
sendDialog(flag) {
|
console.log(flag);
|
this.dialogCreate = flag.flag;
|
this.$emit('setDialog', { flag: true })
|
},
|
handleClose(done) {
|
this.$confirm('确认关闭?')
|
.then(_ => {
|
this.dialogCreate = false;
|
done();
|
})
|
.catch(_ => { });
|
}
|
},
|
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;
|
|
.search {
|
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;
|
}
|
}
|
|
}
|
|
.findBtn {
|
line-height: 100px;
|
margin-left: 15px;
|
display: flex;
|
align-items: center;
|
margin-top: -2px;
|
|
.el-button {
|
padding: 12px 25px;
|
border-radius: 20px;
|
}
|
}
|
|
.addBtn {
|
background-color: #eb5d01;
|
border: none;
|
border-radius: 20px;
|
padding: 12px 30px;
|
}
|
|
|
}
|
}
|
</style>
|