diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue
index bcae113d..5aad70dc 100644
--- a/src/views/portal/case/Index.vue
+++ b/src/views/portal/case/Index.vue
@@ -32,7 +32,7 @@
全部
-
+
{{ item.name}}
@@ -59,7 +59,7 @@
-
+
{{word}}
@@ -201,7 +201,7 @@
{{ item.title }}
-
+
@@ -281,8 +281,9 @@ export default {
speciData:[],
moreState: 1, // 1 加载更多 2 加载中 3无数据
isSeach: false,
- searchwd: true,
+ searchwd: false,
showAll: true, //是否展开全部
+ initHeight:40,//原始 高度
searchRecords: [],
caseList: {
count: 0,
@@ -326,9 +327,9 @@ export default {
this.queryCondition.orgDomain = null;
};
this.specialized();
- this.$nextTick(function() {
- this.closeSearch();
- });
+ // this.$nextTick(function() {
+ // this.closeSearch();
+ // });
if (!this.portalCase.readProtocol) {
this.protocolDialogVisible = true;
}
@@ -345,7 +346,7 @@ export default {
// this.getCaseData();
this.search();
window.addEventListener("scroll", this.handleScroll);
-
+
},
watch: {
@@ -362,9 +363,14 @@ export default {
},
methods: {
specialized(){
+ let $this=this;
apiCase.majorTypes().then(res =>{
if(res.status == 200){
- this.speciData = res.result
+ this.speciData = res.result;
+ this.$nextTick(function() {
+ $this.initHeight = document.getElementById("searchBox").offsetHeight;
+ $this.closeSearch();
+ });
}
})
},
@@ -399,17 +405,18 @@ export default {
closeSearch() {
this.showAll = !this.showAll;
var searchBoxHeght = document.getElementById("searchBox");
- var searchBoxWidth = document.getElementById("searchBox");
- if (searchBoxWidth.clientWidth > 950) {
- this.searchwd = false;
+ //console.log(this.initHeight,'this.initHeight');
+ if(this.initHeight>80){
+ this.searchwd = true;
}
- if (this.showAll == false) {
- searchBoxHeght.style.height = 40 + "px";
- } else {
- searchBoxHeght.style.height = "auto";
+ //console.log(het,'het');
+ if(this.showAll){
+ //searchBoxHeght.style.height = "auto";
+ searchBoxHeght.style.maxHeight = this.initHeight + "px";
+ }else{
+ searchBoxHeght.style.maxHeight = 70 + "px";
}
},
-
getAnkingData() {
apiCase.usernameList(5).then(res => {
if (res.status == 200) {
@@ -632,9 +639,9 @@ export default {
}
},
tagsClose(tag, index) {
-
+
for (let i in this.queryCondition) {
-
+
if (tag.type === i) {
if (i == "majorType") {
this.queryCondition.majorType = '';
@@ -654,11 +661,11 @@ export default {
if (i == "orgDomain") {
this.queryCondition.orgDomain = null;
}
-
+
this.getCaseData();
}
}
-
+
},
getCaseUserData(caseList) {
let ids = caseList.map((item, index) => {
@@ -714,7 +721,7 @@ export default {
title:'',
})
}
-
+
}
}
});
@@ -755,14 +762,14 @@ export default {
margin-right: 20px;
}
.clearfix:after{
- content: "020";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
+ content: "020";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
}
.keyword-text {
-
+
div {
padding:0px 7px;
margin-top: 5px;
@@ -781,6 +788,7 @@ export default {
}
#searchBox {
overflow: hidden;
+
}
.ranking-title {
line-height: 34px;