Browse Source

创新挑战界面

master
aBin 5 years ago
parent
commit
110deb9a99
  1. 2
      src/common/platform.styl
  2. 21
      src/components/HeadNav/HeadNav.vue
  3. 25
      src/router/index.js
  4. 13
      src/views/Challenge/Challenge.vue
  5. 222
      src/views/Challenge/Children/Notice.vue
  6. 231
      src/views/Challenge/Children/Release.vue
  7. 57
      src/views/Challenge/Children/Solicitation.vue
  8. 54
      src/views/Challenge/components/HNav.vue
  9. 51
      src/views/NewPlatform/Children/Service.vue
  10. 11
      src/views/NewPlatform/Children/ServiceDet.vue

2
src/common/platform.styl

@ -32,7 +32,7 @@
float: right;
margin: 70px 0;
margin-right: 12%;
width: 60%;
width: 62%;
padding: 0;
font-size: 16px;
color: #fff;

21
src/components/HeadNav/HeadNav.vue

@ -2,12 +2,7 @@
<div class="head">
<img @click="jumUrl('/')" alt class="logo-img" src="@/assets/logo.png" style="cursor: pointer" />
<div class="li-box">
<a-dropdown
:disabled="item.children.length > 0 ? false : true"
:key="a"
class="list-down"
v-for="(item, a) in list"
>
<a-dropdown :disabled="item.children.length > 0 ? false : true" :key="a" class="list-down" v-for="(item, a) in list">
<a @click="jumUrl(item.url)" class="ant-dropdown-link">
{{ item.name }}&nbsp;&nbsp;
<a-icon type="down" v-show="item.children.length > 0" />
@ -24,12 +19,7 @@
<template slot="title">
<span>点击查看购物车</span>
</template>
<a-icon
@click="$router.push('/Cart')"
class="icon-head baseColor"
style="right: 100px"
type="shopping-cart"
/>
<a-icon @click="$router.push('/Cart')" class="icon-head baseColor" style="right: 100px" type="shopping-cart" />
</a-tooltip>
<router-link tag="span" to="/login">
<a-icon class="icon-head" style="right: 50px" type="user" />
@ -145,17 +135,18 @@ export default {
children: [
{
title: '需求征集',
url: '',
url: '/Challenge/Solicitation',
},
{
title: '项目发布',
url: '',
url: '/Challenge/Release',
},
{
title: '结果公告',
url: '',
url: '/Challenge/Notice',
},
],
url: '/Challenge/Solicitation',
},
{
name: '交流社区',

25
src/router/index.js

@ -111,8 +111,8 @@ const routes = [
name: 'ContactUs',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/ContactUs/ContactUs.vue'),
},
{
// 创新平台
path: '/NewPlatform/NewCore',
name: 'NewPlatform',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/NewPlatform.vue'),
@ -181,6 +181,29 @@ const routes = [
name: 'Cart',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Cart/Cart.vue'),
},
// 创新挑战
{
path: '/Challenge/Solicitation',
name: 'Challenge',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Challenge/Challenge.vue'),
children: [
{
path: '/Challenge/Solicitation',
name: 'Solicitation',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Challenge/Children/Solicitation.vue'),
},
{
path: '/Challenge/Release',
name: 'Release',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Challenge/Children/Release.vue'),
},
{
path: '/Challenge/Notice',
name: 'Notice',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Challenge/Children/Notice.vue'),
},
],
},
];
const router = new VueRouter({

13
src/views/Challenge/Challenge.vue

@ -0,0 +1,13 @@
<template>
<div>
<router-view></router-view>
</div>
</template>
<script>
export default {
data() {
return {};
},
};
</script>

222
src/views/Challenge/Children/Notice.vue

@ -0,0 +1,222 @@
<template>
<div>
<h-nav />
<div class="search-background">
<div class="d-flex">
<div class="flex-3 flex-wrap">
<span class="ins-title">技术领域</span>
<span
:class="item.isActive ? 'act-color' : ''"
v-for="(item, index) in list"
:key="index"
class="ins-name"
@click="choose(index)"
>
{{ item.name }}
</span>
</div>
</div>
</div>
<div class="inner d-flex flex-wrap">
<div class="pro-box" v-for="(item, index) in lists" :key="index" :class="(index + 1) % 4 === 0 ? 'margin-0' : ''">
<p class="pro-title">{{ item.title }}</p>
<p class="pro-content">{{ item.content }}</p>
<p class="pro-time">时间{{ item.time }}</p>
</div>
</div>
<div class="inner">
<a-pagination
:current="current"
:total="total"
:page-size="pageSize"
@change="onShowSizeChange"
class="pagination"
show-less-items
show-quick-jumper
/>
</div>
</div>
</template>
<script>
import HNav from './../components/HNav.vue';
export default {
name: 'Release',
components: { HNav },
data() {
return {
str: '发布界面',
current: 1,
pageSize: 8,
total: 10,
list: [
{
id: 1,
name: '功能食品',
isActive: false,
},
{
id: 2,
name: '生物医药',
isActive: false,
},
{
id: 3,
name: '大健康',
isActive: false,
},
],
lists: [
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
{
title: '需求标题',
content: 'XXX挑战成功',
time: '2020-11-20',
},
],
};
},
methods: {
choose(index) {
const that = this;
// that.achList = [];
const { list } = this;
list[index].isActive = !list[index].isActive;
this.list = [...list];
// for (let i = 0; i < list.length; i++) {
// if (list[i].isActive) {
// this.achList.push(list[i].id);
// }
// }
// this.setAchList(this.achList);
},
//
onShowSizeChange(current, size) {
this.current = current;
},
},
};
</script>
<style lang="stylus" scoped>
.search-background {
background: rgba(0, 0, 0, 0.02);
border: 1px solid rgba(0, 0, 0, 0.06);
height: auto;
padding: 0 20px;
width: 82%;
margin: 40px auto;
line-height: 44px;
}
.pagination {
margin: 40px 0;
text-align: right;
}
.ins-title {
font-size: 16px;
font-weight: bold;
color: rgba(0, 0, 0, 0.65);
}
.ins-name {
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
padding: 0 10px;
cursor: pointer;
}
.act-color {
color: #13ACC4 !important;
}
.margin-0 {
margin-right: 0% !important;
}
.pro-box {
width: 20.5%;
margin-right: 6%;
height: auto;
background: #FFFFFF;
padding: 24px 20px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
position: relative;
margin-bottom: 20px;
opacity: 1;
}
.pro-title {
font-size: 24px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 31px;
color: rgba(0, 0, 0, 0.85);
opacity: 1;
}
.pro-content {
font-size: 30px;
overflow: hidden;
font-family: Microsoft YaHei;
font-weight: bold;
color: #13ACC4;
margin-bottom: 60px;
opacity: 1;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
}
.pro-time {
position: absolute;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 22px;
color: rgba(0, 0, 0, 0.45);
opacity: 1;
bottom: 0;
}
.pro-btn {
position: absolute;
bottom: 24px;
width: 100px;
}
</style>

231
src/views/Challenge/Children/Release.vue

@ -0,0 +1,231 @@
<template>
<div>
<h-nav />
<div class="search-background">
<div class="d-flex">
<div class="flex-3 flex-wrap">
<span class="ins-title">技术领域</span>
<span
:class="item.isActive ? 'act-color' : ''"
v-for="(item, index) in list"
:key="index"
class="ins-name"
@click="choose(index)"
>
{{ item.name }}
</span>
</div>
</div>
</div>
<div class="inner d-flex flex-wrap">
<div class="pro-box" v-for="(item, index) in lists" :key="index" :class="(index + 1) % 4 === 0 ? 'margin-0' : ''">
<p class="pro-title">{{ item.title }}</p>
<p class="pro-content">{{ item.content }}</p>
<p class="pro-time">时间{{ item.time }}</p>
<a-button class="pro-btn" type="primary">揭榜</a-button>
</div>
</div>
<div class="inner">
<a-pagination
:current="current"
:total="total"
:page-size="pageSize"
@change="onShowSizeChange"
class="pagination"
show-less-items
show-quick-jumper
/>
</div>
</div>
</template>
<script>
import HNav from './../components/HNav.vue';
export default {
name: 'Release',
components: { HNav },
data() {
return {
str: '发布界面',
current: 1,
pageSize: 8,
total: 10,
list: [
{
id: 1,
name: '功能食品',
isActive: false,
},
{
id: 2,
name: '生物医药',
isActive: false,
},
{
id: 3,
name: '大健康',
isActive: false,
},
],
lists: [
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
{
title: '需求标题',
content:
'需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容需求内容求内容需求内容求内容需求内容',
time: '2020-11-20',
},
],
};
},
methods: {
choose(index) {
const that = this;
// that.achList = [];
const { list } = this;
list[index].isActive = !list[index].isActive;
this.list = [...list];
// for (let i = 0; i < list.length; i++) {
// if (list[i].isActive) {
// this.achList.push(list[i].id);
// }
// }
// this.setAchList(this.achList);
},
//
onShowSizeChange(current, size) {
this.current = current;
},
},
};
</script>
<style lang="stylus" scoped>
.search-background {
background: rgba(0, 0, 0, 0.02);
border: 1px solid rgba(0, 0, 0, 0.06);
height: auto;
padding: 0 20px;
width: 82%;
margin: 40px auto;
line-height: 44px;
}
.pagination {
margin: 40px 0;
text-align: right;
}
.ins-title {
font-size: 16px;
font-weight: bold;
color: rgba(0, 0, 0, 0.65);
}
.ins-name {
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
padding: 0 10px;
cursor: pointer;
}
.act-color {
color: #13ACC4 !important;
}
.margin-0 {
margin-right: 0% !important;
}
.pro-box {
width: 20.5%;
margin-right: 6%;
height: 300px;
background: #FFFFFF;
padding: 24px 20px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
position: relative;
margin-bottom: 20px;
opacity: 1;
}
.pro-title {
font-size: 24px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 31px;
color: rgba(0, 0, 0, 0.85);
opacity: 1;
}
.pro-content {
font-size: 16px;
overflow: hidden;
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 24px;
color: rgba(0, 0, 0, 0.65);
opacity: 1;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
}
.pro-time {
position: absolute;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 22px;
color: rgba(0, 0, 0, 0.45);
opacity: 1;
bottom: 60px;
}
.pro-btn {
position: absolute;
bottom: 24px;
width: 100px;
}
</style>

57
src/views/Challenge/Children/Solicitation.vue

@ -0,0 +1,57 @@
<template>
<div>
<h-nav />
<div class="top-box">
<div class="top-title">创新挑战</div>
<div class="top-content">
山西绿谷生物科技股份有限公司立足功能食品生物医药和大健康产业聚焦创新聚力孵化聚合产业
致力建设集创新链孵化链和产业链为一体产学研协同多学科交叉大中小企业融通
线上线下相结合的融合发展机制和开放式创新创业平台培育打造全链条一体化新型社会研发机构和创新创业生态系统
构筑专业化集群化园区化产业发展新模式和新业态公司秉持创新开放协同融合发展理
赋能健康中国筑梦绿色未来为愿景构建创新创业生态发展特色产业集群打造全链条一体化开放
式创新创业高地为使命大力推动建设共融共生共建 共创价值共同体
</div>
</div>
<div class="center-box" style="margin-bottom: 160px">
<div class="center-title">
<div class="circular"></div>
<div style="margin-left: 40px">需求征集</div>
</div>
<div class="center-content">
山西绿谷生物科技股份有限公司立足功能食品生物医药和大健康产业聚焦创新聚力孵化聚合产业
致力建设集创新链孵化链和产业链为一体产学研协同多学科交叉大中小企业融通
线上线下相结合的融合发展机制和开放式创新创业平台培育打造全链条一体化新型社会研发机构和创新创业生态系统
构筑专业化集群化园区化产业发展新模式和新业态公司秉持创新开放协同融合发展理
赋能健康中国筑梦绿色未来为愿景构建创新创业生态发展特色产业集群打造全链条一体化开放
式创新创业高地为使命大力推动建设共融共生共建 共创价值共同体
</div>
<a-button class="center-btn" type="primary">需求填报</a-button>
</div>
</div>
</template>
<script>
import HNav from './../components/HNav.vue';
export default {
name: 'Solicitation',
components: { HNav },
data() {
return {
str: '征集界面',
list: [],
};
},
};
</script>
<style lang="stylus" scoped>
.top-box {
background: -webkit-linear-gradient(left, #13ACC4, #A9C300) !important;
}
.center-btn {
position: absolute;
left: 26%;
bottom: 100px;
}
</style>

54
src/views/Challenge/components/HNav.vue

@ -0,0 +1,54 @@
<template>
<div class="nav-box d-flex">
<div v-for="(item, index) in list" :key="index" :class="activeNum === index ? 'nav-box-active' : ''" @click="jump(item.url)">
{{ item.title }}
</div>
</div>
</template>
<script>
export default {
name: 'HNav',
data() {
return {
str: '导航条',
activeNum: 0,
list: [
{
title: '需求征集',
url: '/Challenge/Solicitation',
},
{
title: '项目发布',
url: '/Challenge/Release',
},
{
title: '结果公告',
url: '/Challenge/Notice',
},
],
};
},
created() {
console.log();
if (this.$route.fullPath === '/Challenge/Release') {
this.activeNum = 1;
} else if (this.$route.fullPath === '/Challenge/Notice') {
this.activeNum = 2;
} else {
this.activeNum = 0;
}
},
methods: {
jump(url) {
if (this.$route.fullPath === url) {
this.$message.success('已在当前界面');
} else {
this.$router.push(url);
}
},
},
};
</script>
<style lang="stylus" scoped></style>

51
src/views/NewPlatform/Children/Service.vue

@ -9,28 +9,19 @@
<span class="login-color">购物车</span> 后可通过顶部菜单栏的购物车查看
</div>
</div>
<div class="inner d-flex flex-wrap">
<div class="inner d-flex flex-wrap" style="margin: 60px auto">
<div v-for="(item, index) in list" :key="index" class="item-box" :class="(index + 1) % 4 === 0 ? 'margin-0' : ''">
<img :src="item.imgUrl" style="height: 220px; width: 100%; border: 1px solid #ccc" />
<p class="font-24 my-4">{{ item.name }}</p>
<img :src="item.picUrl" style="height: 220px; width: 100%; border: 1px solid #ccc" />
<p class="font-24 item-title">{{ item.name }}</p>
<p class="font-24 my-4 item-content">{{ item.intro }}</p>
<p class="font-16 baseColor" style="text-align: right; cursor: pointer" @click="jump(item.id)">了解更多</p>
</div>
</div>
<div class="inner">
<a-pagination
:current="current"
:total="total"
:page-size="pageSize"
@change="onShowSizeChange"
class="pagination"
show-less-items
show-quick-jumper
/>
</div>
</div>
</template>
<script>
import { selService } from 'config/api';
import Rotation from 'components/Rotation/Rotation.vue';
import HNav from './../components/HNav.vue';
export default {
@ -45,14 +36,25 @@ export default {
total: 0,
};
},
created() {
this.getService();
},
methods: {
//
onShowSizeChange(current, size) {
this.current = current;
//
async getService() {
try {
const params = { param: {} };
const res = await selService(params);
const { code, data, msg } = res.data;
if (code === 200) {
this.list = data;
}
} catch (error) {
console.log(data);
}
},
//
jump(id) {
console.log(id);
this.$router.push({
path: '/NewPlatform/ServiceDet',
name: 'ServiceDet',
@ -70,6 +72,7 @@ export default {
}
.item-box {
position: relative;
width: 20.5%;
margin-right: 6%;
border-radius: 4px;
@ -79,4 +82,16 @@ export default {
.margin-0 {
margin-right: 0 !important;
}
.item-title {
position: absolute;
top: 100px;
width: 100%;
text-align: center;
}
.item-content {
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
}
</style>

11
src/views/NewPlatform/Children/ServiceDet.vue

@ -1,6 +1,12 @@
<template>
<div>
<div class="inner service-box">服务详情页</div>
<div class="inner service-box">
<div style="margin-bottom: 40px">简介</div>
<div>
<a-button>直接申请</a-button>
<a-button type="primary">加入购物车</a-button>
</div>
</div>
</div>
</template>
@ -10,6 +16,9 @@ export default {
data() {
return {};
},
created() {
console.log(this.$route.params.id);
},
};
</script>

Loading…
Cancel
Save