|
@@ -6,41 +6,20 @@
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <el-col :span="24" class="one">
|
|
|
- <van-tabs v-model="active" animated>
|
|
|
- <van-tab>
|
|
|
- <template #title>
|
|
|
- <van-icon name="todo-list" />
|
|
|
- <p>技术供求</p>
|
|
|
- </template>
|
|
|
- <technologyList></technologyList>
|
|
|
- </van-tab>
|
|
|
- <van-tab>
|
|
|
- <template #title>
|
|
|
- <van-icon name="cluster" />
|
|
|
- <p>产品供求</p>
|
|
|
- </template>
|
|
|
- <productList></productList>
|
|
|
- </van-tab>
|
|
|
- <van-tab>
|
|
|
- <template #title>
|
|
|
- <van-icon name="label" />
|
|
|
- <p>服务供求</p>
|
|
|
- </template>
|
|
|
- <serviceList></serviceList>
|
|
|
- </van-tab>
|
|
|
- <van-tab>
|
|
|
- <template #title>
|
|
|
- <van-icon name="manager" />
|
|
|
- <p>专家供求</p>
|
|
|
- </template>
|
|
|
- <expertList></expertList>
|
|
|
- </van-tab>
|
|
|
- </van-tabs>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="two">
|
|
|
- <van-button type="primary" @click="$router.push({ path: '/market/detail' })" v-if="user.role == 3 || user.role == 2">发布产品</van-button>
|
|
|
- </el-col>
|
|
|
+ <van-tabs v-model="active">
|
|
|
+ <van-tab title="技术成果">
|
|
|
+ <achieve :list="achieveList" @detailBtn="detailBtn"></achieve>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="科技需求">
|
|
|
+ <technology :list="technologyList" @detailBtn="detailBtn"></technology>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="商务服务">
|
|
|
+ <business :list="businessList" @detailBtn="detailBtn"></business>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="专家智库">
|
|
|
+ <expert :list="expertList"></expert>
|
|
|
+ </van-tab>
|
|
|
+ </van-tabs>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="foot">
|
|
|
<footInfo></footInfo>
|
|
@@ -51,23 +30,29 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+import achieve from './newparts/achieve.vue';
|
|
|
+import technology from './newparts/technology.vue';
|
|
|
+import business from './newparts/business.vue';
|
|
|
+import expert from './newparts/expert.vue';
|
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
|
-import technologyList from './parts/technologyList.vue';
|
|
|
-import productList from './parts/productList.vue';
|
|
|
-import serviceList from './parts/serviceList.vue';
|
|
|
-import expertList from './parts/expertList.vue';
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: product } = createNamespacedHelpers('product');
|
|
|
+const { mapActions: exportuser } = createNamespacedHelpers('exportuser');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
|
components: {
|
|
|
NavBar,
|
|
|
footInfo,
|
|
|
- technologyList, //技术供求
|
|
|
- productList, //产品供求
|
|
|
- serviceList, //服务供求
|
|
|
- expertList, //专家供求
|
|
|
+ // 技术成果
|
|
|
+ achieve,
|
|
|
+ // 科技需求
|
|
|
+ technology,
|
|
|
+ // 商务服务
|
|
|
+ business,
|
|
|
+ // 专家智库
|
|
|
+ expert,
|
|
|
},
|
|
|
data: function() {
|
|
|
return {
|
|
@@ -77,12 +62,39 @@ export default {
|
|
|
isleftarrow: '',
|
|
|
// 返回
|
|
|
navShow: true,
|
|
|
- // 标签
|
|
|
+ // 显示菜单
|
|
|
active: '1',
|
|
|
+ // 技术成果
|
|
|
+ achieveList: [],
|
|
|
+ // 科技需求
|
|
|
+ technologyList: [],
|
|
|
+ // 商务服务
|
|
|
+ businessList: [],
|
|
|
+ // 专家智库
|
|
|
+ expertList: [],
|
|
|
};
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
+ async created() {
|
|
|
+ await this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...product(['query']),
|
|
|
+ ...exportuser({ expertquery: 'query' }),
|
|
|
+ async search() {
|
|
|
+ let res = await this.query({ skip: 0, type: '1', status: '1' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `achieveList`, res.data);
|
|
|
+ res = await this.query({ skip: 0, type: '0', status: '1' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `technologyList`, res.data);
|
|
|
+ res = await this.query({ skip: 0, type: '2', status: '1' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `businessList`, res.data);
|
|
|
+ res = await this.expertquery({ skip: 0, status: '1' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `expertList`, res.data);
|
|
|
+ },
|
|
|
+ // 成果详情
|
|
|
+ detailBtn(data) {
|
|
|
+ this.$router.push({ path: '/market/productDetail', query: { id: data.id, type: data.type } });
|
|
|
+ },
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
},
|
|
@@ -90,6 +102,9 @@ export default {
|
|
|
this.title = this.$route.meta.title;
|
|
|
this.isleftarrow = this.$route.meta.isleftarrow;
|
|
|
},
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -103,37 +118,13 @@ export default {
|
|
|
.top {
|
|
|
height: 46px;
|
|
|
overflow: hidden;
|
|
|
- position: relative;
|
|
|
- z-index: 999;
|
|
|
}
|
|
|
.main {
|
|
|
min-height: 570px;
|
|
|
- .two {
|
|
|
- position: fixed;
|
|
|
- top: 80%;
|
|
|
- left: 10px;
|
|
|
- z-index: 999;
|
|
|
- }
|
|
|
-}
|
|
|
-/deep/.van-tab {
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-/deep/.van-tabs--line .van-tabs__wrap {
|
|
|
- height: 70px;
|
|
|
- margin: 0 0 10px 0;
|
|
|
- position: fixed;
|
|
|
- width: 100%;
|
|
|
- z-index: 999;
|
|
|
-}
|
|
|
-/deep/.van-tabs__content--animated {
|
|
|
- position: relative;
|
|
|
- top: 70px;
|
|
|
margin: 0 0 50px 0;
|
|
|
}
|
|
|
-/deep/.van-tab--active {
|
|
|
- color: red;
|
|
|
-}
|
|
|
-.van-icon {
|
|
|
- font-size: 20px;
|
|
|
+.foot {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
}
|
|
|
</style>
|