Commit b5e5e201 authored by zhangyanni's avatar zhangyanni

对接的项目一半

parent a4e5d42e
......@@ -13,7 +13,8 @@ export default new Vuex.Store({
searchResult:new Map(),//搜索结果
projectSearch:new Map(),
saveSearchResultKeyword:new Map(),//搜索key
saleManageRequireListSearch:new Map(),//销售维护的需求分页
saleManageRequireListSearch:new Map(),//销售维护的需求搜索+分页
saleManageProjectListSearch:new Map(),//销售对接的项目搜索
},
mutations: {
SAVE_LIST_PAGE_PARS:(state,{path,pars})=>{
......@@ -51,6 +52,11 @@ export default new Vuex.Store({
//销售维护的需求分页
saleManageRequireListSearch_Func:(state,{path,pars})=>{
state.saleManageRequireListSearch.set(path,pars);
},
//销售对接的项目分页
saleManageProjectListSearch_Func:(state,{path,pars})=>{
state.saleManageProjectListSearch.set(path,pars);
}
},
actions: {
......@@ -89,6 +95,10 @@ export default new Vuex.Store({
commit('saleManageRequireListSearch_Func',{ path,pars });
},
saleManageProjectListSearchAction: ({ commit },{path,pars}) => {
commit('saleManageProjectListSearch_Func',{ path,pars });
},
},
getters:{
}
......
......@@ -13,13 +13,13 @@
<el-tabs v-model="activeName">
<el-tab-pane :label="$t('projectdynamics.minInitiated')" name="first">
<el-row style="text-align: left;margin: 0 20px;">
<page-screen class="statebottm" :screenlist="industryList" :screenchildListIf="true" ref="screenchild" :titleName="$t('projectdynamics.cooperation')" @changecheck="screenData"></page-screen>
<page-screen class="statebottm" :screenlist="progressList" :screenchildListIf="true" ref="purposechild" :titleName="$t('projectdynamics.progressstatus')" @changecheck="purposeData"></page-screen>
<page-screen class="statebottm" :checkboxGroupstate="searchData.resultIndustryList" :screenlist="industryList" :screenchildListIf="true" ref="screenchild" :titleName="$t('projectdynamics.cooperation')" @changecheck="screenData"></page-screen>
<page-screen class="statebottm" :screenlist="progressList" :screenchildListIf="true" ref="purposechild" :titleName="$t('projectdynamics.progressstatus')" @changecheck="purposeData"></page-screen>
</el-row>
</el-tab-pane>
<el-tab-pane :label="$t('projectdynamics.maxInitiated')" name="second">
<el-row style="text-align: left;margin: 0 20px;">
<page-screen class="statebottm" :screenlist="industryList" :screenchildListIf="true" ref="screenchild" :titleName="$t('projectdynamics.cooperation')" @changecheck="screenData"></page-screen>
<page-screen class="statebottm" :checkboxGroupstate="searchData.resultIndustryList" :screenlist="industryList" :screenchildListIf="true" ref="screenchild" :titleName="$t('projectdynamics.cooperation')" @changecheck="screenData"></page-screen>
<page-screen class="statebottm" :screenlist="progressList" :screenchildListIf="true" ref="purposechild" :titleName="$t('projectdynamics.progressstatus')" @changecheck="purposeData"></page-screen>
</el-row>
......@@ -68,7 +68,9 @@
processType:null,
processCodeList:[],
industryFirst:null,
industrySecondList:[]
industrySecondList:[],
resultIndustryList:[],
resultProgressList:[],
},
industryChildren:[]
}
......@@ -108,6 +110,7 @@
item.screenchildList = item.data;
} );
this.purposelist = res.result;
console.log(this.purposelist)
}else{
this.$message.error(res.msg);
}
......@@ -116,44 +119,42 @@
})
},
//状态
handleChangeIndustry(data) {
if (data.length > 1) data.shift();
this.industryChild = [];
this.searchData.industryFirst = data[0]==0?null:data[0];
this.searchData.industrySecondList = [];
if(data[0]!=0) this.industryChildren = this.industryList[data[0]].childrenList;
},
handleChangeIndustryChild(data){
this.searchData.industrySecondList = data;
},
//达成进度
handleChangeProgress(data){
if (data.length > 1) data.shift();
this.progressChild = [];
this.searchData.processType = data[0]==-1?null:data[0];
this.searchData.processCodeList = [];
if(data[0]==0) this.processChildren = this.progressList[1].data;
},
handleChangeChildProgress(data){
this.searchData.processCodeList = data;
},
screenData(a,b){
this.searchData.industryFirst = a;
this.searchData.industrySecondList = b;
if(b){
this.searchData.resultIndustryList = b;
}else{
this.searchData.resultIndustryList = [this.searchData.industryFirst];
}
this.$store.dispatch('saleManageProjectListSearchAction',{path:this.$route.path,pars:this.searchData});
},
purposeData(a,b){
console.log(a,b);
this.searchData.processType = a;
this.searchData.processCodeList = b;
if(b){
this.searchData.resultProgressList = b;
}else{
this.searchData.resultProgressList = [this.searchData.processType];
}
this.$store.dispatch('saleManageProjectListSearchAction',{path:this.$route.path,pars:this.searchData});
},
},
mounted() {
if(this.$store.state.saleManageProjectListSearch.has(this.$route.path)) {
this.searchData=this.$store.state.saleManageProjectListSearch.get(this.$route.path);
}
this.getIndustryStatus();
this.getprogressList();
},
beforeRouteLeave(to,from,next){
if(to.name!="saleActiveStatus"||to.name==undefined) {
this.$store.dispatch('saleManageProjectListSearchAction',{path:this.$route.path,pars:{}});
next()
}else{
next()
}
}
}
</script>
......
......@@ -152,6 +152,9 @@
handelChangePage(index) {
this.page = index;
this.fullscreenLoading = true;
var searchData = this.searchData;
searchData.page = index;
this.$store.dispatch('saleManageProjectListSearchAction',{path:this.$route.path,pars:searchData});
this.getInitList();
},
//切换页面条数
......@@ -176,12 +179,21 @@
},
getInitList(type){
var searchVal;
if(this.$store.state.saleManageProjectListSearch.has(this.$route.path)) {
// this.searchData=this.$store.state.saleManageProjectListSearch.get(this.$route.path);
searchVal = this.$store.state.saleManageProjectListSearch.get(this.$route.path);
this.page = searchVal.page?searchVal.page:1;
console.log(searchVal.resultProgressList)
}else {
searchVal = this.searchData;
}
let params = {
pagination:{
numberOfPages:this.page,
numberOfPages:this.$store.state.saleManageProjectListSearch.has(this.$route.path)?searchVal.page:this.page,
number:this.pageSize
},
search:this.searchData
search:searchVal
};
api.getProBySmallBusinessList(params).then((res)=>{
this.fullscreenLoading = false;
......@@ -193,6 +205,15 @@
}else{
this.pageShow = false;
}
if(res.result.pages<this.page){
this.page = 1;
var searchData = this.searchData;
searchData.page = 1;
this.$store.dispatch('saleManageProjectListSearchAction',{path:this.$route.path,pars:searchData});
if(res.result.pages!=0){
this.getInitList(true);
}
}
}else{
this.$message.error(res.msg);
}
......@@ -203,6 +224,7 @@
},
mounted() {
this.getInitList();
},
watch:{
searchData:{
......
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