Files
foton-laws-system-front/src/pages/home2/components/searchGroup/index.vue
T

141 lines
2.9 KiB
Vue

<!-- 搜索栏 -->
<template>
<div class="search-group">
<el-select
v-model="checkState"
class="search-group-item"
placeholder="请选择"
>
<el-option
v-for="item in jumpPage"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<div class="search-condition">
<el-input
@keyup.native.enter="search"
v-model="checkContent">
type="text"
placeholder="请输入关键词"
clearable
></el-input>
<el-button style="box-shadow:1px 1px 10px rgba(0,0,0,0.2);margin-left: 5px;" type="primary" @click="search">一般检索</el-button>
<el-button style="box-shadow:1px 1px 10px rgba(0,0,0,0.2);margin-left: 5px;" type="primary" @click="seniorSearch">高级检索</el-button>
</div>
</div>
</template>
<script>
export default {
name: 'SearchGroup',
components: {},
mixins: [],
data() {
return {
// 当前查询状态
checkState: 'All',
// 查询内容
checkContent: '',
jumpPage: [
{
label: '全部',
value: 'All'
},
{
label: '国内标准法规',
value: 'stand'
},
{
label: '海外标准法规', // value没改
value: 'bussstand'
},
// {
// label: '国内外政策',
// value: 'laws'
// },
{
label: '企业标准',
value: 'enterprise'
}
],
}
},
computed: {},
watch: {},
methods: {
search() {
this.$router.push({
name: 'StandardSearch',
params: {
selectKey: this.checkState,
searchValue: this.checkContent || undefined
}
})
},
seniorSearch(){
this.$router.push({
name: 'AdvancedSearch',
params: {
selectKey: this.checkState,
searchValue: this.checkContent || undefined
}
})
},
},
mounted(){
},
}
</script>
<style lang="less" scoped>
.search-group {
display: flex;
width: 100%;
height: 40px;
margin-bottom: 10px;
.search-group-item {
margin-right: 20px;
border-radius: 5px;
::v-deep {
.el-input__inner {
width: 18vm;
height: 40px;
color: #333333;
font-size: 14px;
border: 0;
border-radius: 3px;
background-color: #FFFFFF;
box-shadow:1px -2px 10px rgba(0,0,0,0.1);
}
}
}
.search-condition {
display: flex;
flex: 1;
::v-deep {
.el-input__inner {
height: 40px;
font-size: 14px;
color: #333333;
border: 0;
border-radius: 3px;
background: #FFFFFF;
box-shadow:1px -2px 10px rgba(0,0,0,0.1);
}
}
}
.primary_button {
width: 7.2vw;
height: 40px;
border: 0;
border-radius: 3px;
background-color: #5ea9f6;
}
}
</style>