Commit 1ce840fc authored by zhangyanni's avatar zhangyanni

保留筛选条件

parent c87602ca
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<script> <script>
export default { export default {
props:[ props:[
'screenlist','titleName','screenchildListIf','checkboxGroupstate','checkboxGroupchildstate','states','childSingle','thirdChildren' 'screenlist','titleName','screenchildListIf','checkboxGroupstate','checkboxGroupchildstate','states','childSingle','thirdChildren','requireStatus'
], ],
name : "Pagescreen", name : "Pagescreen",
data() { data() {
...@@ -244,6 +244,10 @@ ...@@ -244,6 +244,10 @@
} }
}, },
mounted() { mounted() {
if(this.requireStatus&&this.checkboxGroupstate.length>0){
this.wholecheck = [];
this.checkboxGroup = this.checkboxGroupstate;
}
}, },
watch:{ watch:{
screenlist(val){ screenlist(val){
......
...@@ -13,14 +13,7 @@ ...@@ -13,14 +13,7 @@
</el-button> </el-button>
</ul> </ul>
<ul class="statusWrap" v-if="operationVisible"> <ul class="statusWrap" v-if="operationVisible">
<!--<span style="font-weight: bold;">{{$t("requireInfo.statusTitle")}}</span>--> <page-screen class="statebottm" :requireStatus="true" :screenlist="statusList" :checkboxGroupstate="statusType" :screenchildListIf="true" ref="screenchild" :titleName="$t('saleManage.requireStatus')" @changecheck="handleChangeStatus"></page-screen>
<page-screen class="statebottm" :isSingle="true" :screenlist="statusList" :screenchildListIf="true" ref="screenchild" :titleName="$t('saleManage.requireStatus')" @changecheck="handleChangeStatus"></page-screen>
<!--<el-checkbox-group v-model="currentStatus" style="display: inline-block;" size="mini" class="checkbox"-->
<!--@change="handleChangeStatus">-->
<!--<el-checkbox-button v-for="item in statusList" :label="item.dictKey" :key="item.dictKey">-->
<!--{{item.dictValue}}-->
<!--</el-checkbox-button>-->
<!--</el-checkbox-group>-->
</ul> </ul>
<div class="mainWrapper" id="ancuor-0"> <div class="mainWrapper" id="ancuor-0">
<p>{{$t("bigBusiness.detailInfo.requireList")}}</p> <p>{{$t("bigBusiness.detailInfo.requireList")}}</p>
...@@ -325,7 +318,8 @@ ...@@ -325,7 +318,8 @@
saleDisabledFlag:0, saleDisabledFlag:0,
isFlag:false, isFlag:false,
isTrans:this.$i18n.locale=="zh-CN"?false:true, isTrans:this.$i18n.locale=="zh-CN"?false:true,
statusType:[],
pathfrom:""
} }
}, },
...@@ -507,6 +501,7 @@ ...@@ -507,6 +501,7 @@
// this.$router.push({path: "/require/detail", query: {id: data.detailId,isId:isId}}) // this.$router.push({path: "/require/detail", query: {id: data.detailId,isId:isId}})
// } // }
// } // }
this.publicFun.setUserInfoCookie("requirementStatus",JSON.stringify(this.currentStatus))
let isId = this.$route.query.id?this.$route.query.id:0; let isId = this.$route.query.id?this.$route.query.id:0;
if(this.$route.query.oM){ if(this.$route.query.oM){
this.$router.push({path: "/require/detail", query: {id: data.detailId,isId:isId,oM:this.$route.query.oM}}) this.$router.push({path: "/require/detail", query: {id: data.detailId,isId:isId,oM:this.$route.query.oM}})
...@@ -872,7 +867,6 @@ ...@@ -872,7 +867,6 @@
}; };
api.getCompanyScale(params).then((res) => { api.getCompanyScale(params).then((res) => {
if (res.code == 0) { if (res.code == 0) {
// this.statusList = this.statusList.concat(res.result);
res.result.forEach((item)=>{ res.result.forEach((item)=>{
item.checked = false; item.checked = false;
item.industryName = item.dictValue; item.industryName = item.dictValue;
...@@ -925,7 +919,18 @@ ...@@ -925,7 +919,18 @@
} }
}, },
},
beforeRouteEnter(to, from, next) {
next(vm=>{ // 这里的vm指的就是vue实例,可以用来当做this使用
vm.pathfrom = from.path;
if(vm.pathfrom == '/require/detail'){
vm.currentStatus = JSON.parse(vm.publicFun.getCookie("requirementStatus"));
if(vm.currentStatus!=null) vm.statusType.push(vm.currentStatus);
}else{
vm.publicFun.removeCookie("requirementStatus")
} }
})
},
} }
</script> </script>
......
...@@ -152,10 +152,10 @@ ...@@ -152,10 +152,10 @@
vm.pathfrom = from.path; vm.pathfrom = from.path;
if(vm.pathfrom == '/saleproject/active'){ if(vm.pathfrom == '/saleproject/active'){
vm.searchData = JSON.parse(vm.publicFun.getCookie("saleprojectActive")); vm.searchData = JSON.parse(vm.publicFun.getCookie("saleprojectActive"));
if(vm.searchData.processType !=''||vm.searchData.processType !=null){ if(vm.searchData.processType !=''&&vm.searchData.processType !=null){
vm.processTypeed.push(vm.searchData.processType) vm.processTypeed.push(vm.searchData.processType)
} }
if(vm.searchData.industryFirst !=''||vm.searchData.industryFirst !=null){ if(vm.searchData.industryFirst !=''&&vm.searchData.industryFirst !=null){
vm.industryFirsted.push(vm.searchData.industryFirst) vm.industryFirsted.push(vm.searchData.industryFirst)
} }
}else{ }else{
......
...@@ -141,6 +141,7 @@ ...@@ -141,6 +141,7 @@
empTypeed:[], empTypeed:[],
authenticationStateed:[], authenticationStateed:[],
isPublished:[], isPublished:[],
pathfrom:""
} }
}, },
components:{ components:{
...@@ -180,7 +181,7 @@ ...@@ -180,7 +181,7 @@
this.getInitList(); this.getInitList();
}, },
handleLook(val){ handleLook(val){
this.publicFun.setUserInfoCookie("aggregatetab",JSON.stringify(this.search)) this.publicFun.setUserInfoCookie("saleManageList",JSON.stringify(this.search))
this.$router.push({path:"/aggregatetab",query:{empId:val.empId,flag:1,isSale:1}}); this.$router.push({path:"/aggregatetab",query:{empId:val.empId,flag:1,isSale:1}});
}, },
// 分页导航 // 分页导航
...@@ -227,8 +228,29 @@ ...@@ -227,8 +228,29 @@
}, },
mounted() { mounted() {
this.diven_zh = this.publicFun.getCookie("language") == "en" ? false : true; this.diven_zh = this.publicFun.getCookie("language") == "en" ? false : true;
this.getInitList(); },
beforeRouteEnter(to, from, next) {
next(vm=>{ // 这里的vm指的就是vue实例,可以用来当做this使用
vm.pathfrom = from.path;
if(vm.pathfrom == '/aggregatetab'){
vm.search = JSON.parse(vm.publicFun.getCookie("saleManageList"));
if(vm.search.registerSource!=null){
vm.registerTypeed.push(Number(vm.search.registerSource))
}
if(vm.search.authenticationState!=''&&vm.search.authenticationState!=null){
vm.authenticationStateed.push(vm.search.authenticationState)
}
if(vm.search.isPublish !=''&&vm.search.isPublish !=null){
vm.isPublished.push(vm.search.isPublish)
} }
vm.getInitList();
}else{
vm.getInitList();
vm.publicFun.removeCookie("saleManageList")
}
})
},
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment