|
@@ -5,11 +5,13 @@
|
|
<div class="bar1">
|
|
<div class="bar1">
|
|
<div class="search-con">
|
|
<div class="search-con">
|
|
<input v-model="key" @keyup.enter="getCollection" placeholder="搜索文物" type="text">
|
|
<input v-model="key" @keyup.enter="getCollection" placeholder="搜索文物" type="text">
|
|
|
|
+ <img class="shugang" :src="require('@/assets/images/icon/shugeng.png')" alt="">
|
|
<img @click="getCollection" :src="require('@/assets/images/search_w.png')" alt="">
|
|
<img @click="getCollection" :src="require('@/assets/images/search_w.png')" alt="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<ul class="typelist">
|
|
<ul class="typelist">
|
|
|
|
+ <li :class="{active:typeActive==''}" @click="typeActive=''">全部</li>
|
|
<li :class="{active:item.id==typeActive.id}" @click="typeActive=item" :key="i" v-for="(item,i) in typeLi">{{item.name}}</li>
|
|
<li :class="{active:item.id==typeActive.id}" @click="typeActive=item" :key="i" v-for="(item,i) in typeLi">{{item.name}}</li>
|
|
</ul>
|
|
</ul>
|
|
<collection :data="list" @toggle="handleToggle"/>
|
|
<collection :data="list" @toggle="handleToggle"/>
|
|
@@ -87,8 +89,8 @@ export default {
|
|
},
|
|
},
|
|
paging:{
|
|
paging:{
|
|
deep:true,
|
|
deep:true,
|
|
- handler:function (newVal) {
|
|
|
|
- console.log(newVal);
|
|
|
|
|
|
+ handler:function () {
|
|
|
|
+ this.getCollection()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -102,7 +104,6 @@ export default {
|
|
return alert('获取展区列表失败')
|
|
return alert('获取展区列表失败')
|
|
}
|
|
}
|
|
this.typeLi = result.data
|
|
this.typeLi = result.data
|
|
- this.typeActive = this.typeLi[0]
|
|
|
|
this.getCollection()
|
|
this.getCollection()
|
|
},
|
|
},
|
|
async getCollection() {
|
|
async getCollection() {
|
|
@@ -110,7 +111,7 @@ export default {
|
|
pageNum:this.paging.current,
|
|
pageNum:this.paging.current,
|
|
pageSize: this.paging.pageSize,
|
|
pageSize: this.paging.pageSize,
|
|
searchKey: this.key,
|
|
searchKey: this.key,
|
|
- zoneId:this.typeActive.id
|
|
|
|
|
|
+ zoneId:this.typeActive&&this.typeActive.id
|
|
}
|
|
}
|
|
|
|
|
|
let result = await this.$http({
|
|
let result = await this.$http({
|
|
@@ -123,13 +124,13 @@ export default {
|
|
}
|
|
}
|
|
this.list = result.data.list
|
|
this.list = result.data.list
|
|
this.paging.total = result.data.total
|
|
this.paging.total = result.data.total
|
|
- this.paging.pageNum = result.data.pageNum
|
|
|
|
},
|
|
},
|
|
handleToggle(data){
|
|
handleToggle(data){
|
|
this.isShow = data
|
|
this.isShow = data
|
|
},
|
|
},
|
|
pageChange(val){
|
|
pageChange(val){
|
|
- this.paging.pageNum = val
|
|
|
|
|
|
+ console.log(val);
|
|
|
|
+ this.paging.current = val
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
@@ -188,11 +189,15 @@ export default {
|
|
border:none;
|
|
border:none;
|
|
text-align: center;
|
|
text-align: center;
|
|
width: calc(100% - 20px);
|
|
width: calc(100% - 20px);
|
|
- border-right: 1px dotted #fff;
|
|
|
|
&::placeholder{
|
|
&::placeholder{
|
|
color: rgba(255, 255, 255, 0.55);
|
|
color: rgba(255, 255, 255, 0.55);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .shugang{
|
|
|
|
+ width: 1px;
|
|
|
|
+ height: 100%;
|
|
|
|
+ cursor: auto;
|
|
|
|
+ }
|
|
>img{
|
|
>img{
|
|
width: 20px;
|
|
width: 20px;
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|