|
@@ -25,13 +25,12 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-button type="primary pull-right" class="releaseBtn" @click="checkLogin()">免费发布众测需求</el-button>
|
|
<el-button type="primary pull-right" class="releaseBtn" @click="checkLogin()">免费发布众测需求</el-button>
|
|
- <el-button type="primary pull-right" class="releaseBtn" @click="expertList()">专家列表</el-button>
|
|
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<!--TabNav-->
|
|
<!--TabNav-->
|
|
<el-tabs v-model="currTab" @tab-click="handleTabClick" class="square-tab">
|
|
<el-tabs v-model="currTab" @tab-click="handleTabClick" class="square-tab">
|
|
<el-tab-pane v-for="item in homeTabArr.menuArr1" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
|
|
<el-tab-pane v-for="item in homeTabArr.menuArr1" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
|
|
- <el-tab-pane v-for="item in homeTabArr.menuArr2" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
|
|
|
|
|
|
+ <el-tab-pane v-for="item in homeTabArr.menuArr2" :label="item.name" :name="item.code" :key="item.code"></el-tab-pane>
|
|
<el-tab-pane v-for="item in homeTabArr.menuArr3" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
|
|
<el-tab-pane v-for="item in homeTabArr.menuArr3" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
<div>
|
|
<div>
|
|
@@ -83,7 +82,7 @@
|
|
import {mapActions,mapGetters} from 'vuex'
|
|
import {mapActions,mapGetters} from 'vuex'
|
|
import Waterfall from 'vue-waterfall/lib/waterfall'
|
|
import Waterfall from 'vue-waterfall/lib/waterfall'
|
|
import WaterfallSlot from 'vue-waterfall/lib/waterfall-slot'
|
|
import WaterfallSlot from 'vue-waterfall/lib/waterfall-slot'
|
|
- import {storageGet} from '@/js/index.js'
|
|
|
|
|
|
+ import {storageGet, getAllFields} from '@/js/index.js'
|
|
import {notify} from "../../constants";
|
|
import {notify} from "../../constants";
|
|
// console.log(commonData);
|
|
// console.log(commonData);
|
|
export default {
|
|
export default {
|
|
@@ -138,12 +137,7 @@
|
|
{label: "众测技术", name: "technology",linkTo:'technology'}
|
|
{label: "众测技术", name: "technology",linkTo:'technology'}
|
|
],
|
|
],
|
|
menuArr2:[
|
|
menuArr2:[
|
|
- {label: "科技服务", name: "monograph"},
|
|
|
|
- {label: "服务互联网", name: "Internet"},
|
|
|
|
- {label: "集成电路", name: "integratedCircuit"},
|
|
|
|
- {label: "智能传感器", name: "Sensor"},
|
|
|
|
- {label: "高端装备", name: "Assembly"},
|
|
|
|
- {label: "更多", name: "more"}
|
|
|
|
|
|
+ {code: '', name: ''}
|
|
],
|
|
],
|
|
menuArr3:[
|
|
menuArr3:[
|
|
{label: "找机构", name: "findInstitution"},
|
|
{label: "找机构", name: "findInstitution"},
|
|
@@ -160,6 +154,7 @@
|
|
if (storageGet('user') != null) {
|
|
if (storageGet('user') != null) {
|
|
this.isLogin = true;
|
|
this.isLogin = true;
|
|
}
|
|
}
|
|
|
|
+ this.setFields();
|
|
Http.get('/api/common/index/info').then((res)=>{
|
|
Http.get('/api/common/index/info').then((res)=>{
|
|
this.homeData = res.data;
|
|
this.homeData = res.data;
|
|
this.homeData.applicationTypeList.map((item)=>{
|
|
this.homeData.applicationTypeList.map((item)=>{
|
|
@@ -168,6 +163,13 @@
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ setFields(){
|
|
|
|
+ getAllFields().then((res) => {
|
|
|
|
+ this.homeTabArr.menuArr2 = res
|
|
|
|
+ console.log(this.homeTabArr.menuArr2)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
checkLogin(){
|
|
checkLogin(){
|
|
if(!this.isLogin){
|
|
if(!this.isLogin){
|
|
console.log("请登录后访问");
|
|
console.log("请登录后访问");
|
|
@@ -177,9 +179,6 @@
|
|
this.$router.push('/project/create');
|
|
this.$router.push('/project/create');
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- expertList(){
|
|
|
|
- this.$router.push('/expert/list');
|
|
|
|
- },
|
|
|
|
handleTabClick(tab){
|
|
handleTabClick(tab){
|
|
this.currTab = tab.name;
|
|
this.currTab = tab.name;
|
|
this.$router.push(this.homeTabArr.menuArr1[Number(tab.index)].linkTo);
|
|
this.$router.push(this.homeTabArr.menuArr1[Number(tab.index)].linkTo);
|
|
@@ -188,25 +187,15 @@
|
|
this.searchType = tab.name
|
|
this.searchType = tab.name
|
|
},
|
|
},
|
|
handleSearchData(){
|
|
handleSearchData(){
|
|
- let url = '/api/common/index/page';
|
|
|
|
- let params = {
|
|
|
|
- "keyword": this.searchVal,
|
|
|
|
- "activePage": 1,
|
|
|
|
- "columnFilters": [
|
|
|
|
- {
|
|
|
|
- "field": "type",
|
|
|
|
- "type": "enums",
|
|
|
|
- "enums":this.searchTypeArr,
|
|
|
|
- "value": this.searchType
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ if(this.searchType == 0){
|
|
|
|
+ // this.$router.push({name: 'Square2.0', params: {searchVal: this.searchVal, searchType: "project"}});
|
|
|
|
+ }else if(this.searchType == 1){
|
|
|
|
+ this.$router.push({name: 'AgencyList', params: {searchVal: this.searchVal}});
|
|
|
|
+ }else if(this.searchType == 2){
|
|
|
|
+ this.$router.push({name: 'ResourceList', params: {searchVal: this.searchVal}});
|
|
|
|
+ }else if(this.searchType == 3){
|
|
|
|
+ this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
|
|
}
|
|
}
|
|
- Http.post(url,params).then((res)=>{
|
|
|
|
- if(this.searchType == 1){
|
|
|
|
- this.$router.push({name: 'AgencyList'});
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|