Browse Source

首页及导航修改

master
lucky 4 years ago
parent
commit
5dc461b6a0
  1. 8
      src/components/FooterPage/FooterPage.vue
  2. 94
      src/components/HeadNav/HeadNav.vue
  3. 30
      src/components/Index/IndexNewList.vue
  4. 356
      src/components/ServiceDemand/ServiceDemand.vue
  5. 3
      src/config/api.js
  6. 33
      src/router/index.js
  7. 22
      src/store/modules/home/actions.js
  8. 32
      src/views/About/Children/SpinOffs.vue
  9. 2
      src/views/About/components/HNav.vue
  10. 278
      src/views/Briefing/Briefing.vue
  11. 182
      src/views/Briefing/BriefingDetails.vue
  12. 321
      src/views/Briefing/components/Enroll.vue
  13. 181
      src/views/FirstPage/FirstPage.vue
  14. 47
      src/views/IncubationPlatform/Children/Community.vue
  15. 2
      src/views/IncubationPlatform/Children/Incubator.vue
  16. 2
      src/views/IncubationPlatform/Children/MakerSpace.vue
  17. 4
      src/views/IncubationPlatform/Children/Partner.vue
  18. 2
      src/views/IncubationPlatform/Children/PilotBase.vue
  19. 2
      src/views/IncubationPlatform/Children/Products.vue
  20. 2
      src/views/IncubationPlatform/Children/PublicLaboratory.vue
  21. 18
      src/views/IncubationPlatform/Children/Services.vue
  22. 3
      src/views/IncubationPlatform/Children/Tutor.vue
  23. 2
      src/views/IncubationPlatform/Children/place/EntitySpace.vue
  24. 2
      src/views/IncubationPlatform/Children/place/InformationFilling.vue
  25. 2
      src/views/IncubationPlatform/Children/place/VirtualSpace.vue
  26. 6
      src/views/IncubationPlatform/components/HNav.vue
  27. 47
      src/views/Industry/Children/Community.vue
  28. 4
      src/views/Industry/Children/Enterprise.vue
  29. 183
      src/views/Industry/Children/Products.vue
  30. 4
      src/views/Industry/Children/Serve.vue
  31. 4
      src/views/Industry/Children/Union.vue
  32. 23
      src/views/Industry/Children/components/HNav.vue
  33. 228
      src/views/Industry/components/AddModel.vue
  34. 464
      src/views/Industry/components/AddProject.vue
  35. 4
      src/views/Knowledge/Knowledge.vue
  36. 2
      src/views/NewPlatform/Children/AchDet.vue
  37. 47
      src/views/NewPlatform/Children/Community.vue
  38. 4
      src/views/NewPlatform/Children/Core.vue
  39. 4
      src/views/NewPlatform/Children/Develop.vue
  40. 6
      src/views/NewPlatform/Children/Platform.vue
  41. 312
      src/views/NewPlatform/Children/Service.vue
  42. 4
      src/views/NewPlatform/Children/Share.vue
  43. 4
      src/views/NewPlatform/Children/ShareChild/Institute.vue
  44. 4
      src/views/NewPlatform/Children/Transfer.vue
  45. 6
      src/views/NewPlatform/components/HNav.vue
  46. 2
      src/views/Policy/Policy.vue

8
src/components/FooterPage/FooterPage.vue

@ -14,10 +14,10 @@
</div> </div>
<div class="box flex-1 d-flex flex-column" style="padding-left: 13%"> <div class="box flex-1 d-flex flex-column" style="padding-left: 13%">
<div class="title">发现</div> <div class="title">发现</div>
<span @click="$router.push('/Challenge/Solicitation')" class="pointer">创新挑战</span> <span @click="$router.push('/Challenge/Solicitation')" class="pointer">政策资讯</span>
<span @click="$router.push('/NewPlatform/NewCore')" class="pointer">创新平台</span> <span @click="$router.push('/NewPlatform/NewCore')" class="pointer">创新社区</span>
<span @click="$router.push('/IncubationPlatform/MakerSpace')" class="pointer">孵化平台</span> <span @click="$router.push('/IncubationPlatform/MakerSpace')" class="pointer">创业社区</span>
<span @click="$router.push('/Industry/Union')" class="pointer">产业平台</span> <span @click="$router.push('/Industry/Union')" class="pointer">产业社区</span>
<span @click="$router.push('/Community')" class="pointer">交流社区</span> <span @click="$router.push('/Community')" class="pointer">交流社区</span>
</div> </div>
<div class="box flex-1 d-flex flex-column"> <div class="box flex-1 d-flex flex-column">

94
src/components/HeadNav/HeadNav.vue

@ -76,18 +76,18 @@ export default {
url: '/About/Partner', url: '/About/Partner',
}, },
{ {
title: '衍生企业', title: '加入我们',
url: '/About/SpinOffs', url: '/About/SpinOffs',
}, },
], ],
}, },
{ {
name: '创新政策', name: '政策资讯',
children: [], children: [],
url: '/Policy', url: '/Policy',
}, },
{ {
name: '创新平台', name: '创新社区',
children: [ children: [
{ {
title: '协同创新中心', title: '协同创新中心',
@ -101,11 +101,15 @@ export default {
title: '创新服务', title: '创新服务',
url: '/NewPlatform/NewService', url: '/NewPlatform/NewService',
}, },
{
title: '交流社区',
url: '/NewPlatform/Community',
},
], ],
url: '/NewPlatform/NewCore', url: '/NewPlatform/NewCore',
}, },
{ {
name: '孵化平台', name: '创业社区',
url: '/IncubationPlatform/MakerSpace', url: '/IncubationPlatform/MakerSpace',
children: [ children: [
{ {
@ -120,10 +124,14 @@ export default {
title: '产品展示', title: '产品展示',
url: '/IncubationPlatform/Products', url: '/IncubationPlatform/Products',
}, },
{
title: '交流社区',
url: '/IncubationPlatform/Community',
},
], ],
}, },
{ {
name: '产业平台', name: '产业社区',
children: [ children: [
{ {
title: '产业创新联盟', title: '产业创新联盟',
@ -134,50 +142,58 @@ export default {
url: '/Industry/Serve', url: '/Industry/Serve',
}, },
{ {
title: '衍生企业', title: '产品展示',
url: '/Industry/Enterprise', url: '/Industry/Products',
},
],
url: '/Industry/Union',
},
{
name: '知识平台',
children: [],
url: '/Knowledge',
},
{
name: '活动公告',
children: [],
url: '/Activity',
},
{
name: '创新挑战',
children: [
{
title: '需求征集',
url: '/Challenge/Solicitation',
}, },
{ {
title: '项目发布', title: '交流社区',
url: '/Challenge/Release', url: '/Industry/Community',
}, },
{ {
title: '结果公告', title: '衍生企业',
url: '/Challenge/Notice', url: '/Industry/Enterprise',
}, },
], ],
url: '/Challenge/Solicitation', url: '/Industry/Union',
},
{
name: '交流社区',
children: [],
url: '/Community',
}, },
{ {
name: '联系我们', name: '创业学院',
children: [], children: [],
url: '/ContactUs', url: '/Knowledge',
}, },
// {
// name: '',
// children: [],
// url: '/Activity',
// },
// {
// name: '',
// children: [
// {
// title: '',
// url: '/Challenge/Solicitation',
// },
// {
// title: '',
// url: '/Challenge/Release',
// },
// {
// title: '',
// url: '/Challenge/Notice',
// },
// ],
// url: '/Challenge/Solicitation',
// },
// {
// name: '',
// children: [],
// url: '/Community',
// },
// {
// name: '',
// children: [],
// url: '/ContactUs',
// },
], ],
}; };
}, },

30
src/components/Index/IndexNewList.vue

@ -23,7 +23,7 @@
</div> </div>
<a-divider class="my-3" /> <a-divider class="my-3" />
</div> </div>
<div class="d-flex flex-column" v-else> <div class="d-flex flex-column" v-if="i === 1">
<div class="d-flex flex-nowrap align-center baseColor"> <div class="d-flex flex-nowrap align-center baseColor">
<span class="font-bold-24">活动公告</span> <span class="font-bold-24">活动公告</span>
<img class="bullhorn ml-4" src="@/assets/bullhorn.png" /> <img class="bullhorn ml-4" src="@/assets/bullhorn.png" />
@ -40,18 +40,35 @@
</div> </div>
<a-divider class="my-3" /> <a-divider class="my-3" />
</div> </div>
<div class="d-flex flex-column" v-if="i === 2">
<div class="d-flex flex-nowrap align-center baseColor">
<span class="font-bold-24">企业简报</span>
<img class="bullhorn ml-3" src="@/assets/bullhorn.png" />
<div class="flex-1"></div>
<a-button
@click="$router.push('/Briefing')"
class="d-flex align-end font-16 baseColor pa-0"
style="display: inline-block;"
type="link"
>
more
<a-icon style="font-size:12px" type="right" />
</a-button>
</div>
<a-divider class="my-3" />
</div>
<div class="policy-box" v-if="lists && lists[i].news && lists[i].news.length>0"> <div class="policy-box" v-if="lists && lists[i].news && lists[i].news.length>0">
<div :key="index" class="div-box mb-2" v-for="(item, index) in lists[i].news"> <div :key="index" class="div-box mb-2" v-for="(item, index) in lists[i].news">
<div @click="jumpDetails(item,i)" class="d-flex flex-nowrap" style="cursor: pointer"> <div @click="jumpDetails(item,i)" class="d-flex flex-nowrap" style="cursor: pointer">
<div class="d-flex flex-1 flex-column"> <div class="d-flex flex-1 flex-column">
<div class="item-title">{{ item.title }}</div> <div class="item-title">{{ item.title }}</div>
<div class="original"></div> <div class="original"></div>
<div class="item-content1" v-if="i === 0"> <div class="item-content" v-if="i === 1">
<span v-dompurify-html="item.content"></span>
</div>
<div class="item-content" v-else>
<span v-dompurify-html="item.intro"></span> <span v-dompurify-html="item.intro"></span>
</div> </div>
<div class="item-content1" v-else>
<span v-dompurify-html="item.content || '暂无内容'"></span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -88,6 +105,9 @@ export default {
this.setActDetail(item); this.setActDetail(item);
if (i === 0) { if (i === 0) {
this.$router.push('/ItDetails'); this.$router.push('/ItDetails');
}
if (i === 2) {
this.$router.push('/BriefingDetails');
} else { } else {
this.$router.push('/ActDetails'); this.$router.push('/ActDetails');
} }

356
src/components/ServiceDemand/ServiceDemand.vue

@ -0,0 +1,356 @@
<template>
<div>
<a-modal :footer="null" v-model="showModelIntro">
<p class="mt-3">{{ modelIntro }}</p>
</a-modal>
<a-modal
:confirm-loading="confirmLoading"
:visible="visible"
@cancel="handleCancel"
@ok="handleOk"
title="服务需求"
width="50%"
>
<a-form :form="form">
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="所属社区"
>
<a-radio-group @change="onChange" v-model.trim="platform.platform">
<a-radio :value="1">创新社区</a-radio>
<a-radio :value="2">创业社区</a-radio>
<a-radio :value="3">产业服务</a-radio>
<a-radio :value="0">其他</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司名称"
>
<a-input placeholder="请输入公司名称..." v-model.trim="platform.companyName" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="联系人"
required
>
<a-input placeholder="请输入联系人..." v-model.trim="platform.manName" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="联系电话"
required
>
<a-input
@change="changePhone"
placeholder="请输入联系电话.."
type="tel"
v-decorator="['tel', { rules: phoneRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="图片验证码" type="number" v-model="codeNum" />
<img
:src="picCode.imageBase64"
@click="changePicCode"
class="code_img ml-2"
v-if="picCode && picCode.imageBase64"
/>
<a-button @click="changePicCode" class="code_img ml-2" size="small" v-else>获取验证码</a-button>
<!-- <a-input v-decorator="['account', { rules: rules.account }]" /> -->
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="短信验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入验证码" type="number" v-model="platform.code" />
<a-button
class="code_img ml-2"
disabled
type="primary"
v-if="showInterval"
>重新发送 {{ interval }}</a-button>
<a-button
:disabled="platform.isTel === false"
@click="getCode"
class="code_img ml-2"
type="primary"
v-else
>获取验证码</a-button>
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="需求描述"
>
<a-textarea
placeholder="请输入需求描述..."
style="height: 120px"
v-model.trim="platform.describe"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="上传附件"
>
<a-upload
:action="action"
:before-upload="beforeUpload"
:default-file-list="fileList"
@change="fileChange"
list-type="picture"
name="files"
>
<a-button>
<a-icon type="upload" />点击上传附件
</a-button>
</a-upload>
</a-form-item>
</a-form>
</a-modal>
<!-- 登录提示 -->
<a-modal
:confirm-loading="confirmLoading1"
:visible="visible1"
@cancel="handleCancel1"
@ok="handleOk1"
title="需要登录"
width="30%"
>
还没有登录请您先去登录
<span style="color: rgba(0, 0, 0, 0.45)">点击确定前往登录</span>
</a-modal>
</div>
</template>
<script>
import { mapMutations, mapState, mapActions } from 'vuex';
import { serviceApply, upload } from 'config/api';
const formItemLayout = {
labelCol: { span: 5 },
wrapperCol: { span: 18 },
};
const formTailLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18, offset: 6 },
};
export default {
props: {
modelIntro: {
type: String,
default: '',
},
},
data() {
return {
form: this.$form.createForm(this, { name: 'submit' }),
action: upload,
fileList: [],
visible: false,
formItemLayout,
formTailLayout,
confirmLoading: false,
platform: {
companyName: '', //
manName: '', //
tel: '', //
describe: '', //
code: '', //
files: [], // Id
isTel: false,
platform: 0, //
},
codeRules: [
{ required: true, message: '请输入验证码' },
{ min: 4, max: 4, message: '请输入4位短信验证码' },
],
codeNum: '',
showInterval: false,
codeTimer: null,
interval: 120, //
phoneRules: [
{ required: true, pattern: new RegExp(/^[1][3,4,5,6,7,8,9][0-9]{9}$/), whitespace: true, message: '请输入正确的手机号' },
],
typeData: {
type: 0,
Id: '',
},
showModelIntro: false,
confirmLoading1: false,
visible1: false,
};
},
computed: mapState('user', ['picCode', 'anyringToken']),
methods: {
...mapMutations('home', ['getUserSer']),
...mapActions('user', ['sendCode', 'sendPicCode']),
showModel() {
this.showModelIntro = true;
},
setTypeDataId(id) {
this.typeData.Id = id;
const storageAnyringToken = sessionStorage.getItem('anyringToken') || this.anyringToken;
if (storageAnyringToken) {
this.visible = true;
} else {
this.visible1 = true;
}
},
handleCancel1() {
this.visible1 = false;
},
//
onChange(e) {
console.log('radio checked', e.target.value);
this.platform.platform = e.target.value;
},
//
handleOk1() {
this.$router.push('/login');
},
//
handleCancel(e) {
this.visible = false;
},
//
changePhone(e) {
this.platform.tel = e.target.value;
this.platform.isTel = /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.platform.tel);
},
//
handleOk() {
if (!this.platform.manName) {
this.$message.error('请输入联系人');
} else if (!this.platform.tel) {
this.$message.error('请输入联系电话');
} else if (!this.platform.code) {
this.$message.error('请输入验证码');
} else {
if (this.platform.isTel) {
for (var i = 0; i < this.fileList.length; i++) {
this.platform.files = this.platform.files.concat(this.fileList[i].response.data[0].id);
}
this.subMitAdd();
} else {
this.$message.error('请输入正确的联系电话');
}
}
},
//
async subMitAdd() {
this.confirmLoading = true;
try {
const params = {
param: {
code: this.platform.code,
companyName: this.platform.companyName,
contactName: this.platform.manName,
contactPhone: this.platform.tel,
description: this.platform.describe,
filesId: this.platform.files,
serviceId: this.typeData.Id,
type: this.typeData.type,
platform: this.platform.platform,
},
};
console.log('params: ', params);
const res = await serviceApply(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.$message.success('申请成功');
this.visible = false;
for (let key in this.platform) {
this.platform[key] = '';
}
for (let key in this.typeData) {
this.typeData[key] = '';
}
this.platform.isTel = false;
} else {
throw msg;
}
this.confirmLoading = false;
} catch (error) {
this.$message.error(error);
this.confirmLoading = false;
}
},
//
async getCode() {
try {
const params = {
phone: this.platform.tel,
verificationCodeId: this.picCode.verificationCodeId,
verificationCodeValue: this.codeNum,
};
await this.sendCode(params);
this.getCodeInterval();
} catch (error) {
// throw new Error(`SignIn.vue method getCode: ${error}`);
// console.log(error);
}
},
//
getCodeInterval() {
this.showInterval = true;
this.codeTimer = setInterval(() => {
if (this.interval === 0) {
clearInterval(this.codeTimer);
this.codeTimer = null;
this.showInterval = false;
this.interval = 120;
return;
}
this.interval = this.interval - 1;
}, 1000);
},
//
changePicCode() {
this.sendPicCode();
},
beforeUpload(file) {
return new Promise((resolve, reject) => {
const isLt5M = file.size / 1024 / 1024 < 5;
if (!isLt5M) {
this.$message.warning('上传附件大小不能超过5m!');
return reject(false);
}
return resolve(true);
});
},
fileChange(info) {
this.fileList = info.fileList;
},
},
};
</script>
<style lang="stylus" scoped>
.code_img {
height: 32px;
width: 120px;
}
</style>

3
src/config/api.js

@ -57,6 +57,9 @@ export const front = params => axios.post(`${activity}/query/front`, params);
// 查询活动公告详情 // 查询活动公告详情
export const activeDetail = params => axios.post(`${activity}/query/detail`, params); export const activeDetail = params => axios.post(`${activity}/query/detail`, params);
// 查询企业简报列表
export const frontInfo = params => axios.post(`${activity}/query/frontInfo`, params);
// 申请加入活动 // 申请加入活动
export const apply = params => axios.post(`${activity}/apply`, params); export const apply = params => axios.post(`${activity}/apply`, params);

33
src/router/index.js

@ -111,6 +111,18 @@ const routes = [
name: 'ActDetails', name: 'ActDetails',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Activity/ActDetails.vue'), component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Activity/ActDetails.vue'),
}, },
// 企业简报界面
{
path: '/Briefing',
name: 'Briefing',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Briefing/Briefing.vue'),
},
// 企业简报详情界面
{
path: '/BriefingDetails',
name: 'BriefingDetails',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Briefing/BriefingDetails.vue'),
},
// 联系我们界面 // 联系我们界面
{ {
path: '/ContactUs', path: '/ContactUs',
@ -138,6 +150,11 @@ const routes = [
name: 'Service', name: 'Service',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/Service.vue'), component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/Service.vue'),
}, },
{
path: '/NewPlatform/Community',
name: 'Community',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/NewPlatform/Children/Community.vue'),
},
{ {
path: '/NewPlatform/ServiceDet', path: '/NewPlatform/ServiceDet',
name: 'ServiceDet', name: 'ServiceDet',
@ -235,6 +252,12 @@ const routes = [
name: 'Products', name: 'Products',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/Products.vue'), component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/Products.vue'),
}, },
// 交流社区
{
path: '/IncubationPlatform/Community',
name: 'Community',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/IncubationPlatform/Children/Community.vue'),
},
// 实体众创空间 // 实体众创空间
{ {
path: '/IncubationPlatform/MakerSpace/EntitySpace', path: '/IncubationPlatform/MakerSpace/EntitySpace',
@ -307,6 +330,16 @@ const routes = [
name: 'Enterprise', name: 'Enterprise',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Industry/Children/Enterprise.vue'), component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Industry/Children/Enterprise.vue'),
}, },
{
path: '/Industry/Products',
name: 'Products',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Industry/Children/Products.vue'),
},
{
path: '/Industry/Community',
name: 'Community',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Industry/Children/Community.vue'),
},
], ],
}, },
// 知识平台界面 // 知识平台界面

22
src/store/modules/home/actions.js

@ -1,6 +1,6 @@
import axios from 'axios'; import axios from 'axios';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { industryInfo, front, getPageDetail, queryRotation, frontSearchCompany, getUserSer } from '@/config/api'; import { industryInfo, front, frontInfo, getPageDetail, queryRotation, frontSearchCompany, getUserSer } from '@/config/api';
const actions = { const actions = {
/** /**
@ -43,6 +43,26 @@ const actions = {
} }
}, },
/**
* 获取企业简报列表
* @param {any} commit
* @param {object} params 提交的数据
*/
async getFrontInfoList({ commit }, params) {
try {
const res = await frontInfo(params);
const { code, msg, data } = res.data;
if (code === 200) {
return data;
} else {
message.error(msg || '获取失败');
throw msg;
}
} catch (error) {
throw error || '获取失败';
}
},
/** /**
* 介绍页面详情查询 * 介绍页面详情查询
* @param {any} commit * @param {any} commit

32
src/views/About/Children/SpinOffs.vue

@ -4,8 +4,21 @@
<div class="inner my-1"> <div class="inner my-1">
<bread-crumb :arr="arr" /> <bread-crumb :arr="arr" />
</div> </div>
<div> <!-- <div>
<derive-enterprise :title="title" :type-of-platform="typeOfPlatform" /> <derive-enterprise :title="title" :type-of-platform="typeOfPlatform" />
</div>-->
<div class="inner" style="margin-bottom: 40px">
<!-- 联系我们 -->
<div>
<p class="font-bold-24 title-color small-title">联系我们</p>
<contact />
</div>
<!-- 加入我们 -->
<div>
<p class="font-bold-24 title-color small-title">加入我们</p>
<rich-text :title="title" />
<model class="mt-8" />
</div>
</div> </div>
</div> </div>
</template> </template>
@ -14,18 +27,23 @@
import { mapState, mapMutations, mapActions } from 'vuex'; import { mapState, mapMutations, mapActions } from 'vuex';
import HNav from './../components/HNav.vue'; import HNav from './../components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue'; import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import DeriveEnterprise from 'components/Introduce/DeriveEnterprise.vue'; // import DeriveEnterprise from 'components/Introduce/DeriveEnterprise.vue';
import Contact from 'components/Introduce/ContactUs.vue';
import RichText from 'components/Introduce/RichText.vue';
import Model from 'components/Introduce/Model.vue';
export default { export default {
name: 'Partner', name: 'Partner',
components: { HNav, BreadCrumb, DeriveEnterprise }, components: { HNav, BreadCrumb, Contact, RichText, Model },
data() { data() {
return { return {
title: '衍生企业', title: '联系我们',
typeOfPlatform: '关于我们', typeOfPlatform: '关于我们',
arr: [ arr: [
{ name: '关于我们', url: '/About/Introduce' }, { name: '关于我们', url: '/About/Introduce' },
{ name: '衍生企业', url: '' }, { name: '加入我们', url: '' },
], ],
}; };
}, },
@ -36,4 +54,8 @@ export default {
.inner { .inner {
margin: 10px auto 15px; margin: 10px auto 15px;
} }
.small-title {
margin: 1em 0;
}
</style> </style>

2
src/views/About/components/HNav.vue

@ -30,7 +30,7 @@ export default {
url: '/About/Partner', url: '/About/Partner',
}, },
{ {
title: '衍生企业', title: '加入我们',
url: '/About/SpinOffs', url: '/About/SpinOffs',
}, },
], ],

278
src/views/Briefing/Briefing.vue

@ -0,0 +1,278 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div>
<div class="inner my-1">
<bread-crumb :arr="arr" />
</div>
<div class="inner">
<div class="policy-box">
<div
:key="index"
class="list-box d-flex flex-row flex-nowrap align-center"
v-for="(item, index) in lists"
>
<div @click="jumpDetails(item)" class="date-box pointer" v-if="item.releaseTime">
<p class="date-mon">{{ monthEnglish[item.releaseTime.split('-')[1] - 1] }}.</p>
<p class="date-day">{{ item.releaseTime.split(' ')[0].split('-')[2] }}</p>
</div>
<div class="d-flex flex-column flex-1">
<p @click="jumpDetails(item)" class="item-title pointer">{{ item.title }}</p>
</div>
</div>
</div>
<a-pagination
:current="actCurrent"
:page-size="pageSize"
:total="total"
@change="onShowSizeChange"
class="pagination"
show-less-items
show-quick-jumper
v-show="total > 5"
/>
</div>
</div>
</template>
<script>
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import { mapState, mapMutations } from 'vuex';
import { frontInfo } from 'config/api';
export default {
name: 'Briefing',
components: { BreadCrumb },
data() {
return {
arr: [{ name: '企业简报', url: '/Briefing' }],
total: 0,
pageSize: 20,
iptCon: '',
sta: {
ly: 0,
jz: 0,
sl: 0,
},
aList: [],
lists: [],
monthEnglish: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Spt', 'Oct', 'Nov', 'Dec'],
nowData: '',
};
},
computed: mapState('home', ['actList', 'actIpCon', 'actCurrent']),
created() {
this.iptCon = this.actIpCon;
this.aList = this.actList;
for (var i = 0; i < this.aList.length; i++) {
if (this.aList[i] === 0) {
this.sta.ly = 1;
}
if (this.aList[i] === 1) {
this.sta.jz = 1;
}
if (this.aList[i] === 2) {
this.sta.sl = 1;
}
}
this.getData();
//
var aData = new Date();
// console.log(aData); //Wed Aug 21 2019 10:00:58 GMT+0800 ()
this.nowData =
aData.getFullYear() +
'-' +
(aData.getMonth() + 1) +
'-' +
aData.getDate() +
' ' +
aData.getHours() +
':' +
aData.getMinutes() +
':' +
aData.getSeconds();
// console.log(this.nowData); //2019-8-20
},
methods: {
...mapMutations('home', ['setActList', 'setActIpCon', 'setActCurrent', 'setActDetail']),
//
async getData() {
try {
this.setActIpCon(this.iptCon);
const params = {
param: {
pageNum: this.actCurrent,
pageSize: 20,
},
};
const res = await frontInfo(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.lists = data.list;
this.total = parseInt(data.total);
} else {
this.$message.error(msg || '获取失败');
}
} catch (error) {
console.log(error);
}
},
//
cSta(index) {
this.aList = [];
if (this.sta[index] === 0) {
this.sta[index] = 1;
// console.log(this.sta);
} else {
this.sta[index] = 0;
// console.log(this.sta);
}
if (this.sta.ly === 1) {
this.aList = this.aList.concat(0);
}
if (this.sta.jz === 1) {
this.aList = this.aList.concat(1);
}
if (this.sta.sl === 1) {
this.aList = this.aList.concat(2);
}
this.setActList(this.aList);
this.getData();
},
//
onShowSizeChange(current, size) {
this.setActCurrent(current);
this.getData();
},
//
jumpDetails(item) {
this.setActDetail(item);
this.$router.push('/BriefingDetails');
},
//
formatDate() {
var date = new Date('2020-04-07 18:08:58');
//
var time1 = date.getTime();
var time2 = date.valueOf();
var time3 = Date.parse(date);
// console.log(time1); //1586254138000
// console.log(time2); //1586254138000
// console.log(time3); //1586254138000
},
},
};
</script>
<style scoped lang="stylus">
.inner {
margin: 20px auto;
}
.policy-box {
.list-box {
width: 100%;
overflow: hidden;
background: #fff;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
margin-top: 24px;
padding: 10px 25px;
}
}
.item-title {
margin-bottom: 10px;
font-size: 24px;
color: rgba(0, 0, 0, 0.65);
font-family: Microsoft YaHei;
font-weight: bold;
}
.item-content {
text-indent: 2em;
font-size: 16px;
line-height: 36px;
color: rgba(0, 0, 0, 0.35);
font-family: Microsoft YaHei;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.source {
cursor: pointer;
font-family: Microsoft YaHei;
font-weight: 400;
opacity: 1;
margin-right: 24px;
}
.time {
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
color: rgba(0, 0, 0, 0.25);
opacity: 1;
}
.original {
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 22px;
opacity: 1;
margin-bottom: 0;
span {
cursor: pointer;
}
}
.date-box {
width: 160px !important;
text-align: center;
box-shadow: none !important;
margin-top: 0 !important;
padding: 0 !important;
p {
margin-bottom: 0 !important;
}
}
.date-mon {
font-size: 26px;
height: 26px;
line-height: 26px;
font-weight: 500;
color: #13ACC4;
}
.date-day {
font-size: 46px;
height: 56px;
line-height: 56px;
font-weight: bold;
color: #13ACC4;
}
.source-time {
margin-bottom: 0;
}
.pagination {
margin-top: 68px;
text-align: right;
}
</style>

182
src/views/Briefing/BriefingDetails.vue

@ -0,0 +1,182 @@
<template>
<div class="box">
<div>
<div class="policy-title">
<span>{{ actDetail.title }}</span>
</div>
<!-- && hdDetail.content -->
<div v-if="hdDetail !== null">
<div class="policy-info">
<div>
<span>
<a-icon
class="baseColor"
style="font-size: 14px; margin-right: 10px"
type="clock-circle"
/>
<span>
{{ hdDetail.releaseTime }}
<span v-if="hdDetail.closeTime">- {{ hdDetail.closeTime }}</span>
</span>
</span>
<span style="margin-left: 60px">
<a-icon class="baseColor" style="margin-right: 10px" type="environment" />
<span>{{ hdDetail.address }}</span>
</span>
</div>
<!-- </div> -->
<!-- <div class="policy-info"> -->
</div>
<div class="policy-content" v-dompurify-html="hdDetail.content"></div>
<div class="policy-other">
<div>
<span style="font-size: 14px">会议主题</span>
<span>{{ hdDetail.theme }}</span>
</div>
<div>
<span>{{ hdDetail.organization }}</span>
</div>
<div>
<span style="font-size: 14px">主讲嘉宾</span>
<span>{{ hdDetail.name }}</span>
</div>
<div v-if="hdDetail.other">其他事宜:{{ hdDetail.other }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex';
import { activeDetail } from 'config/api';
export default {
name: 'BriefingDetails',
data() {
return { nowData: '', hdDetail: null };
},
computed: mapState('home', ['actDetail']),
async created() {
await this.getData();
//
var aData = new Date();
// console.log(aData); //Wed Aug 21 2019 10:00:58 GMT+0800 ()
this.nowData =
aData.getFullYear() +
'-' +
(aData.getMonth() + 1) +
'-' +
aData.getDate() +
' ' +
aData.getHours() +
':' +
aData.getMinutes() +
':' +
aData.getSeconds();
// console.log(this.nowData); //2019-8-20
},
methods: {
//
async getData() {
try {
const params = { param: { activityId: this.actDetail.activityId } };
const res = await activeDetail(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.hdDetail = data;
}
} catch (error) {
// console.log(error);
}
},
},
};
</script>
<style lang="stylus" scoped>
.box {
width: 1260px;
position: relative;
margin: 80px auto;
background: #fff;
min-height: 1037px;
overflow: hidden;
opacity: 1;
padding-bottom: 480px;
}
.back-btn {
width: 80px;
position: absolute;
right: 0;
}
.policy-title {
height: 120px;
font-size: 24px;
font-family: Microsoft YaHei;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
opacity: 1;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
padding: 0 150px;
border-bottom: 1px solid #707070;
}
.policy-info {
height: 76px;
line-height: 76px;
text-align: center;
}
.policy-content {
padding: 0 25px;
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
font-weight: 400;
font-family: Microsoft YaHei;
}
.coms-style {
height: 480px;
padding: 25px 0;
border-top: 2px solid #ccc;
position: absolute;
bottom: 0;
width: 100%;
}
.coms-top {
height: 280px;
padding: 0 25px;
overflow: auto;
box-shadow: 0 0 5px #ccc;
}
.coms-btm {
margin-top: 20px;
padding: 0 10px;
}
.coms-content {
background: rgba(19, 172, 196, 0.1);
}
.sub {
position: absolute;
right: 20px;
bottom: 20px;
}
.policy-other {
margin: 50px 25px;
font-size: 16px;
color: rgba(0, 0, 0, 0.65);
font-weight: 400;
font-family: Microsoft YaHei;
}
</style>

321
src/views/Briefing/components/Enroll.vue

@ -0,0 +1,321 @@
<template>
<div>
<a-button @click="showModal" type="primary">立即报名</a-button>
<a-modal
:confirm-loading="confirmLoading"
:title="title"
:visible="visible"
@cancel="handleCancel"
@ok="handleOk"
width="50%"
>
<a-form :form="form">
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="活动名称"
>
<a-input :value="actName" disabled />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="申请单位"
required
>
<a-input placeholder="请输入申请单位..." v-model.trim="platform.companyName" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="mb-3"
label="参加人员"
required
>
<div :key="index" class="d-flex flex-nowrap mb-3" v-for="(item, index) in people">
<a-input class="flex-1 mr-3" placeholder="姓名" v-model.trim="item.name" />
<a-input class="flex-1 mr-3" placeholder="职称" v-model.trim="item.duties" />
<a-input class="flex-1 mr-3" placeholder="职务" v-model.trim="item.positional" />
<a-button
@click="changePerson(index)"
icon="plus"
type="link"
v-if="index === people.length - 1"
/>
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="联系人"
required
>
<a-input placeholder="请输入联系人..." v-model.trim="platform.manName" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="联系电话"
required
>
<a-input
@change="changePhone"
placeholder="请输入联系电话.."
type="tel"
v-decorator="['tel', { rules: phoneRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="图片验证码" type="number" v-model="codeNum" />
<img
:src="picCode.imageBase64"
@click="changePicCode"
class="code_img ml-2"
v-if="picCode && picCode.imageBase64"
/>
<a-button @click="changePicCode" class="code_img ml-2" size="small" v-else>获取验证码</a-button>
<!-- <a-input v-decorator="['account', { rules: rules.account }]" /> -->
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="短信验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入验证码" type="number" v-model="platform.code" />
<a-button
class="code_img ml-2"
disabled
type="primary"
v-if="showInterval"
>重新发送 {{ interval }}</a-button>
<a-button
:disabled="platform.isTel === false"
@click="getCode"
class="code_img ml-2"
type="primary"
v-else
>获取验证码</a-button>
</div>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex';
import { apply } from 'config/api';
const formItemLayout = {
labelCol: { span: 5 },
wrapperCol: { span: 18 },
};
const formTailLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18, offset: 6 },
};
export default {
name: 'Enroll',
props: {
activityId: {
type: Number,
default: 0,
},
actName: {
type: String,
default: '',
},
},
data() {
return {
form: this.$form.createForm(this, { name: 'submit' }),
visible: false,
title: '活动报名',
formItemLayout,
formTailLayout,
confirmLoading: false,
//
people: [
{
name: '',
duties: '',
positional: '',
},
],
platform: {
companyName: '', //
manName: '', //
tel: '', //
code: '', //
isTel: false,
},
codeRules: [
{ required: true, message: '请输入验证码' },
{ min: 4, max: 4, message: '请输入4位短信验证码' },
],
codeNum: '',
showInterval: false,
codeTimer: null,
interval: 120, //
phoneRules: [
{ required: true, pattern: new RegExp(/^[1][3,4,5,6,7,8,9][0-9]{9}$/), whitespace: true, message: '请输入正确的手机号' },
],
};
},
computed: mapState('user', ['picCode']),
async created() {
this.sendPicCode();
await this.getUserSer();
if (this.userSer) {
if (this.userSer.name) {
this.platform.manName = this.userSer.name;
}
if (this.userSer.phone) {
this.platform.tel = this.userSer.phone;
}
if (this.userSer.companyName) {
this.platform.companyName = this.userSer.companyName;
}
}
},
methods: {
...mapActions('user', ['sendCode', 'sendPicCode']),
...mapActions('home', ['getUserSer']),
changePerson(index) {
// if (this.people[index].name && this.people[index].positional && this.people[index].duties) {
const a = { name: '', positional: '', duties: '' };
this.people.push(a);
// }
},
//
showModal() {
this.visible = true;
},
//
handleCancel(e) {
this.visible = false;
},
//
changePhone(e) {
this.platform.tel = e.target.value;
this.platform.isTel = /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.platform.tel);
},
//
handleOk() {
if (!this.platform.companyName) {
this.$message.error('请输入申请单位');
} else if (!this.people[0].name || !this.people[0].positional || !this.people[0].duties) {
this.$message.error('请至少输入一名参加人员');
} else if (!this.platform.tel) {
this.$message.error('请输入联系电话');
} else if (!this.platform.code) {
this.$message.error('请输入验证码');
} else {
if (this.platform.isTel) {
this.subMitAdd();
} else {
this.$message.error('请输入正确的联系电话');
}
}
},
//
async subMitAdd() {
this.confirmLoading = true;
try {
const { activityId, platform, people } = this;
people.forEach(item => {
item.activityId = activityId;
});
const params = {
param: {
activityId,
code: platform.code,
companyName: platform.companyName,
contactName: platform.manName,
contactPhone: platform.tel,
peoples: people,
},
};
// console.log('params: ', params);
const res = await apply(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.$message.success('申请成功');
this.visible = false;
this.confirmLoading = false;
for (let key in this.platform) {
this.platform[key] = '';
}
this.platform.isTel = false;
} else {
throw msg;
this.confirmLoading = false;
}
} catch (error) {
this.$message.error(error);
this.confirmLoading = false;
}
},
//
async getCode() {
// console.log(111);
try {
const params = {
phone: this.platform.tel,
verificationCodeId: this.picCode.verificationCodeId,
verificationCodeValue: this.codeNum,
};
await this.sendCode(params);
this.getCodeInterval();
} catch (error) {
// throw new Error(`SignIn.vue method getCode: ${error}`);
// console.log(error);
}
},
//
getCodeInterval() {
this.showInterval = true;
this.codeTimer = setInterval(() => {
if (this.interval === 0) {
clearInterval(this.codeTimer);
this.codeTimer = null;
this.showInterval = false;
this.interval = 120;
return;
}
this.interval = this.interval - 1;
}, 1000);
},
//
changePicCode() {
this.sendPicCode();
},
},
};
</script>
<style lang="stylus" scoped>
.must-color {
color: red;
}
.code_img {
height: 32px;
width: 120px;
}
</style>

181
src/views/FirstPage/FirstPage.vue

@ -8,47 +8,61 @@
<rotation /> <rotation />
<div class="inner"> <div class="inner">
<a-row> <a-row>
<a-col :span="18" id="hy-news"> <a-col :span="24">
<a-row> <a-row>
<a-col :key="server.id" :span="8" v-for="server in services"> <a-col :key="platform.id" :span="6" v-for="platform in platforms">
<div @click="$router.push(server.path)" class="mr-4 d-flex pointer"> <div @click="$router.push(platform.path)" class="mr-4 d-flex pointer">
<div class="server-box d-flex fill-width"> <div class="server-box d-flex fill-width">
<img :src="server.url" style="width:100%" /> <img :src="platform.url" style="width:100%" />
</div> </div>
</div> </div>
</a-col> </a-col>
<a-col :span="6" style="color: #13acc4;font-size: 24px;padding-left: 15px;">
<p @click="showIntro" class="pointer">
需求征集
<span>>>></span>
</p>
<p @click="$router.push('/Challenge/Solicitation')" class="pointer">
创新挑战
<span>>>></span>
</p>
</a-col>
</a-row> </a-row>
<a-row class="mt-8"> <a-row class="mt-4">
<a-col :span="8" class="fill-width d-flex flex-nowrap flex-row justify-space-between"> <a-col :key="server.id" :span="6" v-for="server in services">
<div <div @click="$router.push(server.path)" class="mr-4 d-flex pointer">
:key="platform.id" <div class="server-box d-flex fill-width" id="hy-news">
@click="$router.push(platform.path)" <img :src="server.url" style="width:100%" />
class="platform-box"
v-for="platform in platforms"
>
<div class="d-flex flex-column align-center pointer">
<img :src="platform.url" style="width:48%" />
<div class="platform-txt mt-3">{{ platform.firstName }}</div>
<div class="platform-txt">{{ platform.secondName }}</div>
</div> </div>
</div> </div>
</a-col> </a-col>
</a-row> <a-col
<a-row class="mt-8 mr-4 flex-1"> :span="6"
<a-col :span="24"> :style="{ height: height + 'px' }"
class="hd-news"
style="overflow: hidden"
>
<div class="white d-flex flex-column justify-center"> <div class="white d-flex flex-column justify-center">
<index-new-list :i="0" :lists="lists" /> <index-new-list :i="1" :lists="lists" />
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row class="mt-4 flex-1">
<a-col :span="12">
<div class="white d-flex flex-column justify-center mr-4">
<index-new-list :i="0" :lists="lists" />
</div>
</a-col> </a-col>
<a-col :span="6" :style="{ height: height }" class="hd-news"> <a-col :span="12">
<div class="white d-flex flex-column justify-center"> <div class="white d-flex flex-column justify-center">
<index-new-list :i="1" :lists="lists" /> <index-new-list :i="2" :lists="lists" />
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
</a-col>
</a-row>
</div> </div>
<service-demand :model-intro="modelIntro" ref="child" />
</div> </div>
</template> </template>
@ -57,9 +71,10 @@ import { mapState, mapActions } from 'vuex';
import Rotation from 'components/Rotation/Rotation.vue'; import Rotation from 'components/Rotation/Rotation.vue';
import IndexNewList from 'components/Index/IndexNewList.vue'; import IndexNewList from 'components/Index/IndexNewList.vue';
import { frontSearchFriend, frontSearchCompany } from 'config/api'; import { frontSearchFriend, frontSearchCompany } from 'config/api';
import ServiceDemand from 'components/ServiceDemand/ServiceDemand.vue';
export default { export default {
components: { Rotation, IndexNewList }, components: { Rotation, IndexNewList, ServiceDemand },
data() { data() {
return { return {
services: [ services: [
@ -67,59 +82,67 @@ export default {
id: '01', id: '01',
chinese: '创新服务', chinese: '创新服务',
english: 'INNOVATIVE', english: 'INNOVATIVE',
path: '/NewPlatform/NewService', path: '/NewPlatform/NewCore',
url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index06.png', url: 'https://www.sxgreenvalley.com/gateway/greenvalley/uploads/2021-07-06/01.png',
}, },
{ {
id: '02', id: '02',
chinese: '孵化服务', chinese: '创业服务',
english: 'INCUBATION', english: 'INCUBATION',
path: '/IncubationPlatform/Services', path: '/IncubationPlatform/MakerSpace',
url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index07.png', url: 'https://www.sxgreenvalley.com/gateway/greenvalley/uploads/2021-07-06/02.png',
}, },
{ {
id: '03', id: '03',
chinese: '产业服务', chinese: '产业服务',
english: 'INDUSTRIAL', english: 'INDUSTRIAL',
path: '/Industry/Serve', path: '/Industry/Products',
url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index08.png', url: 'https://www.sxgreenvalley.com/gateway/greenvalley/uploads/2021-07-06/03.png',
}, },
], ],
platforms: [ platforms: [
{ {
id: '04', id: '04',
firstName: '创新挑战',
secondName: '',
path: '/Challenge/Solicitation', path: '/Challenge/Solicitation',
url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index01.png', url: 'https://www.sxgreenvalley.com/gateway/greenvalley/uploads/2021-07-06/04.png',
}, },
{ {
id: '05', id: '05',
firstName: '科技资源开放共享服务平台',
secondName: '',
path: '/NewPlatform/Share', path: '/NewPlatform/Share',
url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index02.png', url: 'https://www.sxgreenvalley.com/gateway/greenvalley/uploads/2021-07-06/05.png',
}, },
{ {
id: '06', id: '06',
firstName: '知识产权与技术转移转化服务平台',
secondName: '',
path: '/NewPlatform/Transfer', path: '/NewPlatform/Transfer',
url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index03.png', url: 'https://www.sxgreenvalley.com/gateway/greenvalley/uploads/2021-07-06/06.png',
},
{
id: '07',
firstName: '知识培训与科技人才服务平台',
secondName: '',
path: '/NewPlatform/Develop',
url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index04.png',
}, },
// { // {
// id: '08', // id: '04',
// firstName: '', // firstName: '',
// secondName: '',
// path: '/Challenge/Solicitation',
// url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index01.png',
// },
// {
// id: '05',
// firstName: '',
// secondName: '',
// path: '/NewPlatform/Share',
// url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index02.png',
// },
// {
// id: '06',
// firstName: '',
// secondName: '',
// path: '/NewPlatform/Transfer',
// url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index03.png',
// },
// {
// id: '07',
// firstName: '',
// secondName: '', // secondName: '',
// path: '/Knowledge', // path: '/NewPlatform/Develop',
// url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index05.png', // url: 'https://www.sxwikionline.com/gateway/greenvalley/uploads/upload/20210119/index04.png',
// }, // },
], ],
lists: [ lists: [
@ -133,23 +156,45 @@ export default {
name: '活动公告', name: '活动公告',
news: [], news: [],
}, },
{
id: 3,
name: '企业简报',
news: [],
},
], ],
height: '', height: 150,
timer: null,
modelIntro: '',
}; };
}, },
computed: mapState('home', ['actList', 'actIpCon', 'actCurrent']), computed: mapState('home', ['actList', 'actIpCon', 'actCurrent']),
created() { created() {
this.getData1(); this.getData1();
this.getData2(); this.getData2();
this.getIndustryInfoLists(); this.getIndustryInfoLists();
this.getFrontLists(); this.getFrontListInfoLists();
}, },
mounted() { mounted() {
var oDiv = document.getElementById('hy-news'); var oDiv = document.getElementById('hy-news');
this.height = oDiv.offsetHeight + 60 + 'px'; if (!oDiv.offsetHeight || oDiv.offsetHeight === 0) {
this.timer = setInterval(() => {
oDiv = document.getElementById('hy-news');
if (oDiv.offsetHeight) {
this.height = oDiv.offsetHeight;
this.getFrontLists();
}
}, 1000);
} else {
this.height = oDiv.offsetHeight;
this.getFrontLists();
}
}, },
methods: { methods: {
...mapActions('home', ['getIndustryInfoList', 'getFrontList']), ...mapActions('home', ['getIndustryInfoList', 'getFrontList', 'getFrontInfoList']),
// //
async getData1() { async getData1() {
@ -201,19 +246,39 @@ export default {
this.lists[0].news = res.list; this.lists[0].news = res.list;
}, },
//
async getFrontListInfoLists() {
const params = {
param: {
pageNum: 1,
pageSize: 3,
},
};
const res = await this.getFrontInfoList(params);
this.lists[2].news = res.list;
},
// //
async getFrontLists() { async getFrontLists() {
clearInterval(this.timer);
const params = { const params = {
param: { param: {
activityType: [], activityType: [],
pageNum: 1, pageNum: 1,
pageSize: 6, pageSize: this.height > 160 ? 3 : 2,
title: '', title: '',
}, },
}; };
const res = await this.getFrontList(params); const res = await this.getFrontList(params);
this.lists[1].news = res.list; this.lists[1].news = res.list;
}, },
//
showIntro() {
// this.$refs.child.showModel();
this.modelIntro = '服务需求';
this.$refs.child.setTypeDataId(0);
},
}, },
}; };
</script> </script>
@ -253,9 +318,9 @@ export default {
transition: all 0.2s ease 0s; transition: all 0.2s ease 0s;
} }
.hy-news { // .hy-news {
height: 746px; // height: 746px;
} // }
.hd-news { .hd-news {
background: white; background: white;

47
src/views/IncubationPlatform/Children/Community.vue

@ -0,0 +1,47 @@
<!--
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-01-13 17:21:29
* @LastEditors: wally
* @LastEditTime: 2021-01-20 09:56:56
-->
<template>
<div>
<h-nav />
<div class="inner my-1">
<bread-crumb :arr="arr" />
</div>
<div style="padding-bottom: 50px">
<community />
</div>
</div>
</template>
<script>
import HNav from './../components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import Community from '../../Community/Community.vue';
export default {
name: 'News',
components: { HNav, BreadCrumb, Community },
data() {
return {
typeOfPlatform: '创业社区',
arr: [
{ name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '交流社区', url: '' },
],
btnType: 'default',
};
},
methods: {},
};
</script>
<style lang="stylus" scoped>
.inner {
margin: 10px auto 15px;
}
</style>

2
src/views/IncubationPlatform/Children/Incubator.vue

@ -37,7 +37,7 @@ export default {
title: '孵化平台-孵化场所', title: '孵化平台-孵化场所',
showPage: 45, showPage: 45,
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '众创空间', url: '/IncubationPlatform/MakerSpace' }, { name: '众创空间', url: '/IncubationPlatform/MakerSpace' },
{ name: '实体众创空间', url: '/IncubationPlatform/MakerSpace/EntitySpace' }, { name: '实体众创空间', url: '/IncubationPlatform/MakerSpace/EntitySpace' },
{ name: '孵化场所', url: '' }, { name: '孵化场所', url: '' },

2
src/views/IncubationPlatform/Children/MakerSpace.vue

@ -136,7 +136,7 @@ export default {
return { return {
showPage: 41, showPage: 41,
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '众创空间', url: '' }, { name: '众创空间', url: '' },
], ],
list: [ list: [

4
src/views/IncubationPlatform/Children/Partner.vue

@ -24,9 +24,9 @@ export default {
data() { data() {
return { return {
title: '合作伙伴', title: '合作伙伴',
typeOfPlatform: '孵化平台', typeOfPlatform: '创业社区',
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '第三方专业机构', url: '' }, { name: '第三方专业机构', url: '' },
], ],
}; };

2
src/views/IncubationPlatform/Children/PilotBase.vue

@ -27,7 +27,7 @@ export default {
title: '孵化平台-中试基地', title: '孵化平台-中试基地',
showPage: 43, showPage: 43,
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '众创空间', url: '/IncubationPlatform/MakerSpace' }, { name: '众创空间', url: '/IncubationPlatform/MakerSpace' },
{ name: '实体众创空间', url: '/IncubationPlatform/MakerSpace/EntitySpace' }, { name: '实体众创空间', url: '/IncubationPlatform/MakerSpace/EntitySpace' },
{ name: '中试基地', url: '' }, { name: '中试基地', url: '' },

2
src/views/IncubationPlatform/Children/Products.vue

@ -53,7 +53,7 @@ export default {
data() { data() {
return { return {
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '产品展示', url: '' }, { name: '产品展示', url: '' },
], ],
productIpt: '', // productIpt: '', //

2
src/views/IncubationPlatform/Children/PublicLaboratory.vue

@ -27,7 +27,7 @@ export default {
title: '孵化平台-公共实验室', title: '孵化平台-公共实验室',
showPage: 42, showPage: 42,
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '众创空间', url: '/IncubationPlatform/MakerSpace' }, { name: '众创空间', url: '/IncubationPlatform/MakerSpace' },
{ name: '实体众创空间', url: '/IncubationPlatform/MakerSpace/EntitySpace' }, { name: '实体众创空间', url: '/IncubationPlatform/MakerSpace/EntitySpace' },
{ name: '公共实验室', url: '' }, { name: '公共实验室', url: '' },

18
src/views/IncubationPlatform/Children/Services.vue

@ -26,27 +26,26 @@
style="height: 220px; width: 100%; border: 1px solid #ccc" style="height: 220px; width: 100%; border: 1px solid #ccc"
/> />
<p @click="showModal(item.id)" class="font-24 my-2 text-center">{{ item.name }}</p> <p @click="showModal(item.id)" class="font-24 my-2 text-center">{{ item.name }}</p>
<div v-if="item.intro.length>45" class="font-16 textColor item-intro mb-2"> <div class="font-16 textColor item-intro mb-2" v-if="item.intro.length>45">
{{ item.intro.slice(0,45) }} {{ item.intro.slice(0,45) }}
<a-button <a-button
@click="showIntro(index)" @click="showIntro(index)"
class="font-16 baseColor" class="font-16 baseColor"
type="link"
style="height:20px;float:right;padding:0px" style="height:20px;float:right;padding:0px"
type="link"
> >
more more
<a-icon style="font-size:12px" type="right" /> <a-icon style="font-size:12px" type="right" />
</a-button> </a-button>
</div> </div>
<div v-if="item.intro.length<=45" class="font-16 textColor item-intro"> <div class="font-16 textColor item-intro" v-if="item.intro.length<=45">
<p>{{ item.intro }}</p> <p>{{ item.intro }}</p>
</div> </div>
<!-- <p @click="showDiv(index)" class="baseColor d-flex flex-row-reverse">{{ showList[index] }}</p> --> <!-- <p @click="showDiv(index)" class="baseColor d-flex flex-row-reverse">{{ showList[index] }}</p> -->
</div> </div>
</div> </div>
<a-modal v-model="showModelIntro" :footer="null"> <a-modal :footer="null" v-model="showModelIntro">
<p class="mt-3">{{ modelIntro }}</p> <p class="mt-3">{{ modelIntro }}</p>
</a-modal> </a-modal>
<div class="inner"> <div class="inner">
@ -197,7 +196,7 @@ export default {
title: '创业服务', title: '创业服务',
showPage: 46, showPage: 46,
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '创业服务', url: '/IncubationPlatform/Services' }, { name: '创业服务', url: '/IncubationPlatform/Services' },
], ],
list: [], list: [],
@ -238,7 +237,7 @@ export default {
id: '', id: '',
}, },
showModelIntro: false, showModelIntro: false,
modelIntro: '' modelIntro: '',
}; };
}, },
computed: mapState('user', ['picCode']), computed: mapState('user', ['picCode']),
@ -269,8 +268,8 @@ export default {
this.current = current; this.current = current;
}, },
showIntro(index) { showIntro(index) {
this.showModelIntro = true this.showModelIntro = true;
this.modelIntro = this.list[index].intro this.modelIntro = this.list[index].intro;
}, },
// //
async getService() { async getService() {
@ -453,6 +452,7 @@ export default {
border-radius: 4px; border-radius: 4px;
// text-align: center; // text-align: center;
} }
.text-center { .text-center {
text-align: center; text-align: center;
} }

3
src/views/IncubationPlatform/Children/Tutor.vue

@ -53,10 +53,9 @@ export default {
data() { data() {
return { return {
title: '孵化平台-创业导师', title: '孵化平台-创业导师',
typeOfPlatform: '孵化平台',
showPage: 44, showPage: 44,
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '创业导师', url: '' }, { name: '创业导师', url: '' },
], ],
teachers: [], teachers: [],

2
src/views/IncubationPlatform/Children/place/EntitySpace.vue

@ -133,7 +133,7 @@ export default {
return { return {
title: '实体众创空间', title: '实体众创空间',
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '众创空间', url: '/IncubationPlatform/MakerSpace' }, { name: '众创空间', url: '/IncubationPlatform/MakerSpace' },
{ name: '实体众创空间', url: '' }, { name: '实体众创空间', url: '' },
], ],

2
src/views/IncubationPlatform/Children/place/InformationFilling.vue

@ -30,7 +30,7 @@ export default {
data() { data() {
return { return {
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '众创空间', url: '/IncubationPlatform/MakerSpace' }, { name: '众创空间', url: '/IncubationPlatform/MakerSpace' },
{ name: '统计信息填报', url: '' }, { name: '统计信息填报', url: '' },
], ],

2
src/views/IncubationPlatform/Children/place/VirtualSpace.vue

@ -38,7 +38,7 @@ export default {
return { return {
title: '虚拟众创空间', title: '虚拟众创空间',
arr: [ arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' }, { name: '创业社区', url: '/IncubationPlatform/MakerSpace' },
{ name: '众创空间', url: '/IncubationPlatform/MakerSpace' }, { name: '众创空间', url: '/IncubationPlatform/MakerSpace' },
{ name: '虚拟众创空间', url: '' }, { name: '虚拟众创空间', url: '' },
], ],

6
src/views/IncubationPlatform/components/HNav.vue

@ -40,6 +40,10 @@ export default {
title: '产品展示', title: '产品展示',
url: '/IncubationPlatform/Products', url: '/IncubationPlatform/Products',
}, },
{
title: '交流社区',
url: '/IncubationPlatform/Community',
},
], ],
}; };
}, },
@ -49,6 +53,8 @@ export default {
this.activeNum = 1; this.activeNum = 1;
} else if (this.$route.fullPath === '/IncubationPlatform/Products') { } else if (this.$route.fullPath === '/IncubationPlatform/Products') {
this.activeNum = 2; this.activeNum = 2;
} else if (this.$route.fullPath === '/IncubationPlatform/Community') {
this.activeNum = 3;
} else { } else {
this.activeNum = 0; this.activeNum = 0;
} }

47
src/views/Industry/Children/Community.vue

@ -0,0 +1,47 @@
<!--
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-01-13 17:21:29
* @LastEditors: wally
* @LastEditTime: 2021-01-20 09:56:56
-->
<template>
<div>
<h-nav />
<div class="inner my-1">
<bread-crumb :arr="arr" />
</div>
<div style="padding-bottom: 50px">
<community />
</div>
</div>
</template>
<script>
import HNav from './components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import Community from '../../Community/Community.vue';
export default {
name: 'News',
components: { HNav, BreadCrumb, Community },
data() {
return {
typeOfPlatform: '产业社区',
arr: [
{ name: '产业社区', url: '/Industry/Union' },
{ name: '交流社区', url: '' },
],
btnType: 'default',
};
},
methods: {},
};
</script>
<style lang="stylus" scoped>
.inner {
margin: 10px auto 15px;
}
</style>

4
src/views/Industry/Children/Enterprise.vue

@ -20,9 +20,9 @@ export default {
data() { data() {
return { return {
title: '衍生企业', title: '衍生企业',
typeOfPlatform: '产业平台', typeOfPlatform: '产业社区',
arr: [ arr: [
{ name: '产业平台', url: '/Challenge/Union' }, { name: '产业社区', url: '/Industry/Union' },
{ name: '衍生企业', url: '' }, { name: '衍生企业', url: '' },
], ],
}; };

183
src/views/Industry/Children/Products.vue

@ -0,0 +1,183 @@
<template>
<div>
<h-nav />
<div class="inner my-1">
<bread-crumb :arr="arr" />
</div>
<div class="inner">
<div>
<div class="search-background">
<div class="d-flex">
<div class="flex-3 flex-wrap">
<span class="ins-title">产品类目</span>
<span v-if="productLists && productLists.length">
<span
:class="item.isActive ? 'act-color' : ''"
:key="index"
@click="choose(index)"
class="ins-name"
v-for="(item, index) in productLists"
>{{ item.name }}</span>
</span>
</div>
<div class="flex-1 align-center">
<a-input-search
@search="searchProduct"
class="item-search"
enter-button="搜索"
placeholder="请输入"
v-model="productIpt"
/>
<add-project @update="update" />
</div>
</div>
</div>
</div>
<p class="font-bold-24">产品展示</p>
</div>
<platform-list ref="child" />
</div>
</template>
<script>
import { mapMutations } from 'vuex';
import { selModel } from 'config/api';
import PlatformList from 'components/PlatformList/PlatformList.vue';
import HNav from './components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import AddProject from '../components/AddProject.vue';
export default {
name: 'Products',
components: { BreadCrumb, HNav, PlatformList, AddProject },
data() {
return {
arr: [
{ name: '产业社区', url: '/Industry/Union' },
{ name: '产品展示', url: '' },
],
productIpt: '', //
productLists: [], //
productList: [], //
showAddProject: false,
};
},
watch: {
productIpt(val) {
const obj = {
content: this.productIpt,
isBtn: 0,
};
this.setProductIpt(obj);
},
},
created() {
const obj = {
content: '',
isBtn: 0,
};
this.setListState(3);
this.setProductList([]);
this.setProductIpt(obj);
this.getType(3);
},
methods: {
...mapMutations('home', ['setProductIpt', 'setProductList', 'setListState']),
async getType(num) {
try {
const params = { param: { model: num } };
const res = await selModel(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.productLists = data.list;
for (let i = 0; i < this.productLists.length; i++) {
this.productLists[i].isActive = false;
}
} else {
this.$message.error(msg || '分类获取失败');
}
} catch (error) {
console.log(error);
}
},
//
choose(index) {
this.productList = [];
const { productLists } = this;
for (let i = 0; i < productLists.length; i++) {
productLists[i].isActive = false;
}
this.setListState(3);
productLists[index].isActive = !productLists[index].isActive;
this.productLists = [...productLists];
for (let i = 0; i < productLists.length; i++) {
if (productLists[i].isActive) {
this.productList.push(productLists[i].id);
}
}
this.setProductList(this.productList);
},
//
searchProduct() {
const { productLists } = this;
for (let i = 0; i < productLists.length; i++) {
productLists[i].isActive = false;
}
this.productLists = [...productLists];
this.setListState(3);
this.productIpt = '';
const obj = {
content: this.productIpt,
isBtn: 1,
};
this.setProductList(obj);
},
//
update() {
this.$refs.child.getProductLists();
},
},
};
</script>
<style lang="stylus" scoped>
.inner {
margin: 40px auto;
}
.search-background {
background: rgba(0, 0, 0, 0.02);
border: 1px solid rgba(0, 0, 0, 0.06);
height: auto;
padding: 0 20px;
width: 100%;
margin: 40px auto;
line-height: 44px;
}
.item-search {
width: 100%;
height: 32px;
}
.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;
}
</style>

4
src/views/Industry/Children/Serve.vue

@ -185,9 +185,9 @@ export default {
data() { data() {
return { return {
title: '产业服务', title: '产业服务',
typeOfPlatform: '产业平台', typeOfPlatform: '产业社区',
arr: [ arr: [
{ name: '产业平台', url: '/Challenge/Union' }, { name: '产业社区', url: '/Industry/Union' },
{ name: '产业服务', url: '/Industry/Serve' }, { name: '产业服务', url: '/Industry/Serve' },
], ],
showPage: 52, showPage: 52,

4
src/views/Industry/Children/Union.vue

@ -25,9 +25,9 @@ export default {
data() { data() {
return { return {
title: '产业平台-产业创新联盟', title: '产业平台-产业创新联盟',
typeOfPlatform: '产业平台', typeOfPlatform: '产业社区',
arr: [ arr: [
{ name: '产业平台', url: '/Challenge/Union' }, { name: '产业社区', url: '/Industry/Union' },
{ name: '产业创新联盟', url: '' }, { name: '产业创新联盟', url: '' },
], ],
list: [], list: [],

23
src/views/Industry/Children/components/HNav.vue

@ -1,8 +1,11 @@
<template> <template>
<div class="nav-box d-flex"> <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)"> <div
{{ item.title }} :class="activeNum === index ? 'nav-box-active' : ''"
</div> :key="index"
@click="jump(item.url)"
v-for="(item, index) in list"
>{{ item.title }}</div>
</div> </div>
</template> </template>
@ -22,6 +25,14 @@ export default {
title: '产业服务', title: '产业服务',
url: '/Industry/Serve', url: '/Industry/Serve',
}, },
{
title: '产品展示',
url: '/Industry/Products',
},
{
title: '交流社区',
url: '/Industry/Community',
},
{ {
title: '衍生企业', title: '衍生企业',
url: '/Industry/Enterprise', url: '/Industry/Enterprise',
@ -33,8 +44,12 @@ export default {
console.log(); console.log();
if (this.$route.fullPath === '/Industry/Serve') { if (this.$route.fullPath === '/Industry/Serve') {
this.activeNum = 1; this.activeNum = 1;
} else if (this.$route.fullPath === '/Industry/Enterprise') { } else if (this.$route.fullPath === '/Industry/Products') {
this.activeNum = 2; this.activeNum = 2;
} else if (this.$route.fullPath === '/Industry/Community') {
this.activeNum = 3;
} else if (this.$route.fullPath === '/Industry/Enterprise') {
this.activeNum = 4;
} else { } else {
this.activeNum = 0; this.activeNum = 0;
} }

228
src/views/Industry/components/AddModel.vue

@ -0,0 +1,228 @@
<template>
<div>
<a-button @click="showModal" style="height: 100%; width: 100%" type="primary" v-if="value !== 1">{{ str }}</a-button>
<a-modal :confirm-loading="confirmLoading" :title="title" :visible="visible" @cancel="handleCancel" @ok="handleOk" width="50%">
<p style="text-align: center" v-show="value === 1">
<a-radio-group style="margin-bottom: 20px !important" v-model="platform.val">
<a-radio :value="2" style="margin-right: 100px">实体空间</a-radio>
<a-radio :value="3">虚拟空间</a-radio>
</a-radio-group>
</p>
<a-form :form="form">
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="公司名称">
<a-input placeholder="请输入公司名称..." v-model.trim="platform.companyName" />
</a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="联系人" required>
<a-input placeholder="请输入联系人..." v-model.trim="platform.manName" />
</a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="联系电话" required>
<a-input @change="changePhone" placeholder="请输入联系电话.." type="tel" v-decorator="['tel', { rules: phoneRules }]" />
</a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="图片验证码" required>
<div class="d-flex flex-nowrap">
<a-input placeholder="图片验证码" type="number" v-model="codeNum" />
<img :src="picCode.imageBase64" @click="changePicCode" class="code_img ml-2" v-if="picCode && picCode.imageBase64" />
<a-button @click="changePicCode" class="code_img ml-2" size="small" v-else>获取验证码</a-button>
<!-- <a-input v-decorator="['account', { rules: rules.account }]" /> -->
</div>
</a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="短信验证码" required>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入验证码" type="number" v-model="platform.code" />
<a-button class="code_img ml-2" disabled type="primary" v-if="showInterval">重新发送 {{ interval }}</a-button>
<a-button :disabled="platform.isTel === false" @click="getCode" class="code_img ml-2" type="primary" v-else>
获取验证码
</a-button>
</div>
</a-form-item>
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="合作信息简述">
<a-textarea placeholder="请输入合作信息简述..." style="height: 120px" v-model.trim="platform.describe" />
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex';
import { JoinPlatform } from 'config/api';
const formItemLayout = {
labelCol: { span: 5 },
wrapperCol: { span: 18 },
};
const formTailLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18, offset: 6 },
};
export default {
name: 'AddModel',
props: {
value: {
type: Number,
default: 1,
},
},
data() {
return {
form: this.$form.createForm(this, { name: 'submit' }),
visible: false,
title: '申请加入',
str: '加入我们',
formItemLayout,
formTailLayout,
confirmLoading: false,
platform: {
companyName: '', //
manName: '', //
tel: '', //
describe: '', //
code: '', //
val: 0,
isTel: false,
},
codeRules: [
{ required: true, message: '请输入验证码' },
{ min: 4, max: 4, message: '请输入4位短信验证码' },
],
codeNum: '',
showInterval: false,
codeTimer: null,
interval: 120, //
phoneRules: [
{ required: true, pattern: new RegExp(/^[1][3,4,5,6,7,8,9][0-9]{9}$/), whitespace: true, message: '请输入正确的手机号' },
],
};
},
computed: mapState('user', ['picCode']),
async created() {
this.sendPicCode();
await this.getUserSer();
if (this.userSer) {
if (this.userSer.name) {
this.platform.manName = this.userSer.name;
}
if (this.userSer.phone) {
this.platform.tel = this.userSer.phone;
}
if (this.userSer.companyName) {
this.platform.companyName = this.userSer.companyName;
}
}
},
methods: {
...mapActions('user', ['sendCode', 'sendPicCode']),
...mapActions('home', ['getUserSer']),
//
showModal() {
this.visible = true;
},
//
handleCancel(e) {
this.visible = false;
},
//
changePhone(e) {
this.platform.tel = e.target.value;
this.platform.isTel = /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.platform.tel);
},
//
handleOk() {
if (!this.platform.manName) {
this.$message.error('请输入联系人');
} else if (!this.platform.tel) {
this.$message.error('请输入联系电话');
} else if (!this.platform.code) {
this.$message.error('请输入验证码');
} else if (!this.platform.val) {
this.$message.error('请选择孵化器');
} else {
if (this.platform.isTel) {
this.subMitAdd();
} else {
this.$message.error('请输入正确的联系电话');
}
}
},
//
async subMitAdd() {
this.confirmLoading = true;
try {
const params = {
param: {
code: this.platform.code,
companyName: this.platform.companyName,
contactName: this.platform.manName,
contactPhone: this.platform.tel,
description: this.platform.describe,
type: this.platform.val,
},
};
const res = await JoinPlatform(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.$message.success('申请成功');
this.visible = false;
this.confirmLoading = false;
for (let key in this.platform) {
this.platform[key] = '';
}
this.platform.isTel = false;
} else {
throw msg;
this.confirmLoading = false;
}
} catch (error) {
this.$message.error(error);
this.confirmLoading = false;
}
},
//
async getCode() {
// console.log(111);
try {
const params = {
phone: this.platform.tel,
verificationCodeId: this.picCode.verificationCodeId,
verificationCodeValue: this.codeNum,
};
await this.sendCode(params);
this.getCodeInterval();
} catch (error) {
// throw new Error(`SignIn.vue method getCode: ${error}`);
// console.log(error);
}
},
//
getCodeInterval() {
this.showInterval = true;
this.codeTimer = setInterval(() => {
if (this.interval === 0) {
clearInterval(this.codeTimer);
this.codeTimer = null;
this.showInterval = false;
this.interval = 120;
return;
}
this.interval = this.interval - 1;
}, 1000);
},
//
changePicCode() {
this.sendPicCode();
},
},
};
</script>
<style lang="stylus" scoped>
.must-color {
color: red;
}
.code_img {
height: 32px;
width: 120px;
}
</style>

464
src/views/Industry/components/AddProject.vue

@ -0,0 +1,464 @@
<template>
<div>
<a-button @click="showModal" class="ml-3" type="primary">添加</a-button>
<a-modal
:confirm-loading="confirmLoading"
:title="title"
:visible="visible"
@cancel="handleCancel"
@ok="handleOk"
width="50%"
>
<a-form :form="form">
<!-- 公司名称 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="mb-3"
label="公司名称"
required
>
<a-auto-complete
@search="handleSearchTasks"
@select="onSelect"
placeholder="公司名称"
v-model="platform.companyname"
>
<template slot="dataSource">
<a-select-option
:key="task.id"
:value="`${task.id}`"
v-for="task in dataSource"
>{{ task.company }}</a-select-option>
</template>
</a-auto-complete>
<!-- <a-input placeholder="请输入公司名称..." v-model.trim="platform.companyname" /> -->
</a-form-item>
<!-- 产品名称 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="mb-3"
label="产品名称"
required
>
<a-input placeholder="请输入需求名称..." v-model.trim="platform.name" />
</a-form-item>
<!-- 产品编号 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="mb-3"
label="产品编号"
>
<a-input placeholder="请输入产品编号..." v-model.trim="platform.identifier" />
</a-form-item>
<!-- 产品图片 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="mb-3"
label="产品图片"
required
>
<a-upload
:action="action"
:before-upload="beforeUpload"
:show-upload-list="false"
@change="handleChange"
class="avatar-uploader"
list-type="picture-card"
name="files"
>
<img :src="imageUrl" alt="avatar" v-if="imageUrl" />
<div v-else>
<a-icon :type="loading ? 'loading' : 'plus'" />
<div class="ant-upload-text">Upload</div>
</div>
</a-upload>
</a-form-item>
<!-- 产品分类 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="mb-3"
label="产品分类"
required
>
<a-checkbox-group @change="onChange" class="line-height-30">
<a-checkbox
:key="index"
:value="item.id"
v-for="(item, index) in productLists"
>{{ item.name }}</a-checkbox>
</a-checkbox-group>
</a-form-item>
<!-- 产品简介 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="mb-3"
label="产品简介"
required
>
<a-textarea
placeholder="请输入产品简介..."
style="min-height: 100px"
v-model.trim="platform.synopsis"
/>
</a-form-item>
<!-- 产品详情 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
class="mb-3"
label="产品详情"
required
>
<quill-editor
:options="editorOption"
@blur="onEditorBlur($event)"
@change="onEditorChange($event)"
@focus="onEditorFocus($event)"
class="editor-box"
ref="myQuillEditor"
v-model="needContent"
></quill-editor>
<a-upload
:action="action"
:multiple="false"
@change="fileChange"
accept="image/png, image/jpeg"
name="files"
style="display: none"
>
<a-button id="upload-img">
<a-icon type="upload" />
</a-button>
</a-upload>
</a-form-item>
</a-form>
</a-modal>
<a-modal
:confirm-loading="confirmLoading1"
:visible="visible1"
@cancel="handleCancel1"
@ok="handleOk1"
title="需要登录"
width="30%"
>
还没有登录请您先去登录
<span style="color: rgba(0, 0, 0, 0.45)">点击确定前往登录</span>
</a-modal>
</div>
</template>
<script>
import debounce from 'lodash/debounce';
import { mapState } from 'vuex';
import { quillEditor } from 'vue-quill-editor'; //
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css';
import { upload, addProduct, selModel, queryInfo } from 'config/api';
const formItemLayout = {
labelCol: { span: 5 },
wrapperCol: { span: 18 },
};
const formTailLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18, offset: 6 },
};
const toolbarOptions = [
['bold', 'italic', 'underline', 'strike'], //线线
['blockquote', 'code-block'], //
[{ header: 1 }, { header: 2 }], // 12
[{ list: 'ordered' }, { list: 'bullet' }], //
[{ script: 'sub' }, { script: 'super' }], //
[{ indent: '-1' }, { indent: '+1' }], //
[{ direction: 'rtl' }], //
// [{ size: ['small', false, 'large', 'huge'] }], //
// [{ header: [1, 2, 3, 4, 5, 6, false] }], //
[{ color: [] }, { background: [] }], //
// [{ font: [] }], //
[{ align: [] }], //
['clean'], //
['image', 'video'], //
];
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener('load', () => callback(reader.result));
reader.readAsDataURL(img);
}
export default {
name: 'Enroll',
components: { quillEditor },
data() {
this.handleSearchTasks = debounce(this.handleSearchTasks, 500);
return {
form: this.$form.createForm(this, { name: 'submit' }),
visible: false,
visible1: false,
title: '需求征集',
action: upload,
loading: false,
imageUrl: '',
formItemLayout,
formTailLayout,
confirmLoading: false,
confirmLoading1: false,
needContent: ``,
editorOption: {
placeholder: '在这里输入...',
modules: {
toolbar: {
container: toolbarOptions, //
handlers: {
image: function(value) {
if (value) {
// alert('');
document.getElementById('upload-img').click();
} else {
this.quill.format('image', false);
}
},
video: function(value) {
if (value) {
alert('自定义视频');
} else {
this.quill.format('image', false);
}
},
},
},
},
},
platform: {
companyname: '',
name: '',
identifier: '',
pic: '',
modelIds: [],
synopsis: '',
},
hideMessage: null,
productLists: [], //
dataSource: [],
};
},
computed: mapState('user', ['anyringToken']),
created() {
this.getType(3);
},
methods: {
//
async handleSearchTasks() {
try {
const params = { param: { company: this.platform.companyname } };
const res = await queryInfo(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.dataSource = data;
} else {
this.$message.error(msg);
}
} catch (error) {
console.log(error);
}
},
onSelect(value) {
const item = this.dataSource.find(item => item.id === +value);
this.platform.companyname = item.company;
},
onEditorReady(editor) {
//
},
onEditorBlur() {}, //
onEditorFocus() {}, //
onEditorChange() {
//
// console.log(this.content);
},
onChange(e) {
console.log(e);
this.platform.modelIds = e;
},
//
handleChange(info) {
if (info.file.status === 'uploading') {
this.loading = true;
return;
}
if (info.file.status === 'done') {
// Get this url from response in real world.
getBase64(info.file.originFileObj, imageUrl => {
this.imageUrl = imageUrl;
this.loading = false;
});
if (info.fileList && info.fileList.length && info.fileList[0].response.data && info.fileList[0].response.data.length) {
this.platform.pic = info.fileList[0].response.data[0].id;
}
}
},
beforeUpload(file) {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
this.$message.error('You can only upload JPG file!');
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$message.error('Image must smaller than 2MB!');
}
return isJpgOrPng && isLt2M;
},
//
fileChange(info) {
console.log(info);
if (info.file.status === 'uploading') {
if (!this.hideMessage) {
this.hideMessage = this.$message.loading('上传中...');
}
}
// this.fileList = info.fileList;
if (info.file.status === 'done') {
this.files = [];
const img = `<img src=${info.file.response.data[0].visitUrl} >`;
this.needContent += img;
setTimeout(this.hideMessage, 0);
this.$message.success('上传成功');
}
},
//
showModal() {
const storageAnyringToken = sessionStorage.getItem('anyringToken') || this.anyringToken;
if (storageAnyringToken) {
this.visible = true;
} else {
this.visible1 = true;
}
},
//
handleCancel(e) {
this.visible = false;
},
//
async handleOk() {
const { companyname, name, pic, modelIds, synopsis, needContent } = this.platform;
if (!companyname) {
this.$message.error('请输入公司名称');
return;
}
if (!name) {
this.$message.error('请输入产品名称');
return;
}
if (!pic) {
this.$message.error('请上传产品图片');
return;
}
if (!modelIds) {
this.$message.error('请输入产品分类');
return;
}
if (!synopsis) {
this.$message.error('请输入产品简介');
return;
}
if (!needContent) {
this.$message.error('请输入产品详情');
return;
}
await this.subMitAdd();
},
handleCancel1() {
this.visible1 = false;
},
//
handleOk1() {
this.$router.push('/login');
},
//
async subMitAdd() {
this.confirmLoading = true;
try {
const params = {
param: {
companyname: this.platform.companyname,
name: this.platform.name,
identifier: this.platform.identifier,
pic: this.platform.pic,
modelIds: this.platform.modelIds,
synopsis: this.platform.synopsis,
details: this.needContent,
},
};
const res = await addProduct(params);
const { code, msg, data } = res.data;
this.confirmLoading = false;
if (code === 200) {
for (let key in this.platform) {
this.platform[key] = '';
}
this.imageUrl = '';
this.needContent = ``;
this.visible = false;
this.$message.success('添加成功');
this.$emit('update');
} else {
throw msg;
}
} catch (error) {
this.$message.error(error);
this.confirmLoading = false;
}
},
//
async getType(num) {
try {
const params = { param: { model: num } };
const res = await selModel(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.productLists = data.list;
} else {
this.$message.error(msg || '分类获取失败');
}
} catch (error) {
console.log(error);
}
},
},
};
</script>
<style lang="stylus" scoped>
.must-color {
color: red;
}
.code_img {
height: 32px;
width: 120px;
}
.ql-editor {
min-height: 600px;
max-height: 800px;
}
.editor-box >>> .ql-editor {
min-height: 150px;
}
</style>

4
src/views/Knowledge/Knowledge.vue

@ -40,8 +40,8 @@ export default {
return { return {
str: '知识培训服务平台', str: '知识培训服务平台',
title: '知识平台', title: '知识平台',
typeOfPlatform: '知识平台', typeOfPlatform: '创业学院',
arr: [{ name: '知识平台', url: '/Knowledge' }], arr: [{ name: '创业学院', url: '/Knowledge' }],
list: [], list: [],
current: 1, current: 1,
pageSize: 6, pageSize: 6,

2
src/views/NewPlatform/Children/AchDet.vue

@ -67,7 +67,7 @@ export default {
return { return {
typeOfPlatform: '成果详情', typeOfPlatform: '成果详情',
arr: [ arr: [
{ name: '创新平台', url: '/NewPlatform/NewCore' }, { name: '创新社区', url: '/NewPlatform/NewCore' },
{ name: '创新资源平台', url: '/NewPlatform/News' }, { name: '创新资源平台', url: '/NewPlatform/News' },
{ name: '知识产权与技术转移转化服务平台', url: '/NewPlatform/Transfer' }, { name: '知识产权与技术转移转化服务平台', url: '/NewPlatform/Transfer' },
{ name: '成果详情', url: '' }, { name: '成果详情', url: '' },

47
src/views/NewPlatform/Children/Community.vue

@ -0,0 +1,47 @@
<!--
* @Author: wally
* @email: 18603454788@163.com
* @Date: 2021-01-13 17:21:29
* @LastEditors: wally
* @LastEditTime: 2021-01-20 09:56:56
-->
<template>
<div>
<h-nav />
<div class="inner my-1">
<bread-crumb :arr="arr" />
</div>
<div style="padding-bottom: 50px">
<community />
</div>
</div>
</template>
<script>
import HNav from './../components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import Community from '../../Community/Community.vue';
export default {
name: 'News',
components: { HNav, BreadCrumb, Community },
data() {
return {
typeOfPlatform: '创新社区',
arr: [
{ name: '创新社区', url: '/NewPlatform/NewCore' },
{ name: '交流社区', url: '' },
],
btnType: 'default',
};
},
methods: {},
};
</script>
<style lang="stylus" scoped>
.inner {
margin: 10px auto 15px;
}
</style>

4
src/views/NewPlatform/Children/Core.vue

@ -82,9 +82,9 @@ export default {
str: '这是中心界面', str: '这是中心界面',
title: '创新平台-协同创新中心', title: '创新平台-协同创新中心',
title1: '创新平台-组织机构', title1: '创新平台-组织机构',
typeOfPlatform: '创新平台', typeOfPlatform: '创新社区',
arr: [ arr: [
{ name: '创新平台', url: '/NewPlatform/NewCore' }, { name: '创新社区', url: '/NewPlatform/NewCore' },
{ name: '协同创新中心', url: '' }, { name: '协同创新中心', url: '' },
], ],
showDiv: true, showDiv: true,

4
src/views/NewPlatform/Children/Develop.vue

@ -48,9 +48,9 @@ export default {
data() { data() {
return { return {
title: '知识培训与科技人才服务平台', title: '知识培训与科技人才服务平台',
typeOfPlatform: '创新平台', typeOfPlatform: '创新社区',
arr: [ arr: [
{ name: '创新平台', url: '/NewPlatform/NewCore' }, { name: '创新社区', url: '/NewPlatform/NewCore' },
{ name: '创新资源平台', url: '/NewPlatform/News' }, { name: '创新资源平台', url: '/NewPlatform/News' },
{ name: '知识培训与科技人才服务平台', url: '' }, { name: '知识培训与科技人才服务平台', url: '' },
], ],

6
src/views/NewPlatform/Children/Platform.vue

@ -13,7 +13,7 @@
</div> </div>
<div class="newBox"> <div class="newBox">
<banner :show-page="showPage" /> <banner :show-page="showPage" />
<new-model :btnType="btnType" class="btn" ref="childModel" /> <new-model :btn-type="btnType" class="btn" ref="childModel" />
</div> </div>
<div style="padding-bottom: 50px"> <div style="padding-bottom: 50px">
<div class="inner d-flex flex-nowrap justify-space-between"> <div class="inner d-flex flex-nowrap justify-space-between">
@ -54,9 +54,9 @@ export default {
return { return {
str: '这是政策界面', str: '这是政策界面',
title: '创新资源平台', title: '创新资源平台',
typeOfPlatform: '创新平台', typeOfPlatform: '创新社区',
arr: [ arr: [
{ name: '创新平台', url: '/NewPlatform/NewCore' }, { name: '创新社区', url: '/NewPlatform/NewCore' },
{ name: '创新资源平台', url: '' }, { name: '创新资源平台', url: '' },
], ],
btnType: 'default', btnType: 'default',

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

@ -15,11 +15,14 @@
<div <div
:class="(index + 1) % 4 === 0 ? 'margin-0' : ''" :class="(index + 1) % 4 === 0 ? 'margin-0' : ''"
:key="index" :key="index"
class="item-box mb-8 pointer" class="item-box mb-8 pointer"
v-for="(item, index) in list" v-for="(item, index) in list"
> >
<img @click="showModal(item.id)" :src="item.picUrl" style="height: 220px; width: 100%; border: 1px solid #ccc" /> <img
:src="item.picUrl"
@click="showModal(item.id)"
style="height: 220px; width: 100%; border: 1px solid #ccc"
/>
<p class="font-24 my-4" style="text-align: center"> <p class="font-24 my-4" style="text-align: center">
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</p> </p>
@ -27,21 +30,26 @@
class="font-16 my-4 textColor line-height-30 item-content" class="font-16 my-4 textColor line-height-30 item-content"
v-if="item.intro" v-if="item.intro"
>{{ item.intro }}</p>--> >{{ item.intro }}</p>-->
<div v-if="item.intro === null? false: item.intro.length>45" class="font-16 textColor item-intro mb-2"> <div
class="font-16 textColor item-intro mb-2"
v-if="item.intro === null? false: item.intro.length>45"
>
{{ item.intro.slice(0,45) }} {{ item.intro.slice(0,45) }}
<a-button <a-button
@click="showIntro(index)" @click="showIntro(index)"
class="font-16 baseColor" class="font-16 baseColor"
type="link"
style="height:20px;float:right;padding:0px" style="height:20px;float:right;padding:0px"
type="link"
> >
more more
<a-icon style="font-size:12px" type="right" /> <a-icon style="font-size:12px" type="right" />
</a-button> </a-button>
</div> </div>
<div v-if="item.intro === null? false:item.intro.length<=45" class="font-16 textColor item-intro"> <div
class="font-16 textColor item-intro"
v-if="item.intro === null? false:item.intro.length<=45"
>
<p>{{ item.intro }}</p> <p>{{ item.intro }}</p>
</div> </div>
<!-- <p <!-- <p
@ -52,147 +60,28 @@
>了解更多</p>--> >了解更多</p>-->
</div> </div>
</div> </div>
<a-modal v-model="showModelIntro" :footer="null"> <service-demand :model-intro="modelIntro" ref="child" />
<p class="mt-3"> {{ modelIntro }} </p>
</a-modal>
<a-modal
:confirm-loading="confirmLoading"
:visible="visible"
@cancel="handleCancel"
@ok="handleOk"
title="服务需求"
width="50%"
>
<a-form :form="form">
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司名称"
>
<a-input placeholder="请输入公司名称..." v-model.trim="platform.companyName" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="联系人"
required
>
<a-input placeholder="请输入联系人..." v-model.trim="platform.manName" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="联系电话"
required
>
<a-input
@change="changePhone"
placeholder="请输入联系电话.."
type="tel"
v-decorator="['tel', { rules: phoneRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="图片验证码" type="number" v-model="codeNum" />
<img
:src="picCode.imageBase64"
@click="changePicCode"
class="code_img ml-2"
v-if="picCode && picCode.imageBase64"
/>
<a-button @click="changePicCode" class="code_img ml-2" size="small" v-else>获取验证码</a-button>
<!-- <a-input v-decorator="['account', { rules: rules.account }]" /> -->
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="短信验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入验证码" type="number" v-model="platform.code" />
<a-button
class="code_img ml-2"
disabled
type="primary"
v-if="showInterval"
>重新发送 {{ interval }}</a-button>
<a-button
:disabled="platform.isTel === false"
@click="getCode"
class="code_img ml-2"
type="primary"
v-else
>获取验证码</a-button>
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="需求描述"
>
<a-textarea
placeholder="请输入需求描述..."
style="height: 120px"
v-model.trim="platform.describe"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="上传附件"
>
<a-upload
:action="action"
:before-upload="beforeUpload"
:default-file-list="fileList"
@change="fileChange"
list-type="picture"
name="files"
>
<a-button>
<a-icon type="upload" />点击上传附件
</a-button>
</a-upload>
</a-form-item>
</a-form>
</a-modal>
</div> </div>
</template> </template>
<script> <script>
import { mapMutations, mapState, mapActions } from 'vuex'; import { mapMutations, mapState } from 'vuex';
import { selService, serviceApply, upload } from 'config/api'; import { selService } from 'config/api';
import Banner from 'components/Banner/Banner.vue'; import Banner from 'components/Banner/Banner.vue';
import HNav from './../components/HNav.vue'; import HNav from './../components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue'; import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import ServiceDemand from 'components/ServiceDemand/ServiceDemand.vue';
const formItemLayout = {
labelCol: { span: 5 },
wrapperCol: { span: 18 },
};
const formTailLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 18, offset: 6 },
};
export default { export default {
name: 'Service', name: 'Service',
components: { HNav, Banner, BreadCrumb }, components: { HNav, Banner, BreadCrumb, ServiceDemand },
data() { data() {
return { return {
str: '这是服务界面', str: '这是服务界面',
title: '创新服务', title: '创新服务',
typeOfPlatform: '创新平台', typeOfPlatform: '创新社区',
arr: [ arr: [
{ name: '创新平台', url: '/NewPlatform/NewCore' }, { name: '创新社区', url: '/NewPlatform/NewCore' },
{ name: '创新服务', url: '/NewPlatform/NewService' }, { name: '创新服务', url: '/NewPlatform/NewService' },
], ],
showPage: 33, showPage: 33,
@ -200,52 +89,19 @@ export default {
current: 1, current: 1,
pageSize: 8, pageSize: 8,
total: 0, total: 0,
form: this.$form.createForm(this, { name: 'submit' }), modelIntro: '',
action: upload,
fileList: [],
visible: false,
formItemLayout,
formTailLayout,
confirmLoading: false,
platform: {
companyName: '', //
manName: '', //
tel: '', //
describe: '', //
code: '', //
files: [], // Id
isTel: false,
},
codeRules: [
{ required: true, message: '请输入验证码' },
{ min: 4, max: 4, message: '请输入4位短信验证码' },
],
codeNum: '',
showInterval: false,
codeTimer: null,
interval: 120, //
phoneRules: [
{ required: true, pattern: new RegExp(/^[1][3,4,5,6,7,8,9][0-9]{9}$/), whitespace: true, message: '请输入正确的手机号' },
],
typeData: {
type: 0,
Id: '',
},
showModelIntro: false,
modelIntro: ''
}; };
}, },
computed: mapState('user', ['picCode']),
created() { created() {
this.getService(); this.getService();
}, },
methods: { methods: {
...mapMutations('home', ['setServiceArr', 'getUserSer']), ...mapMutations('home', ['setServiceArr']),
...mapActions('user', ['sendCode', 'sendPicCode']),
showIntro(index) { showIntro(index) {
this.showModelIntro = true this.$refs.child.showModel();
this.modelIntro = this.list[index].intro this.modelIntro = this.list[index].intro;
}, },
// //
async getService() { async getService() {
@ -273,121 +129,7 @@ export default {
// //
showModal(id) { showModal(id) {
this.typeData.Id = id; this.$refs.child.setTypeDataId(id);
this.visible = true;
},
//
handleCancel(e) {
this.visible = false;
},
//
changePhone(e) {
this.platform.tel = e.target.value;
this.platform.isTel = /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.platform.tel);
},
//
handleOk() {
if (!this.platform.manName) {
this.$message.error('请输入联系人');
} else if (!this.platform.tel) {
this.$message.error('请输入联系电话');
} else if (!this.platform.code) {
this.$message.error('请输入验证码');
} else {
if (this.platform.isTel) {
for (var i = 0; i < this.fileList.length; i++) {
this.platform.files = this.platform.files.concat(this.fileList[i].response.data[0].id);
}
this.subMitAdd();
// console.log(this.platform.files);
} else {
this.$message.error('请输入正确的联系电话');
}
}
},
//
async subMitAdd() {
this.confirmLoading = true;
try {
const params = {
param: {
code: this.platform.code,
companyName: this.platform.companyName,
contactName: this.platform.manName,
contactPhone: this.platform.tel,
description: this.platform.describe,
filesId: this.platform.files,
serviceId: this.typeData.Id,
type: this.typeData.type,
},
};
const res = await serviceApply(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.$message.success('申请成功');
this.visible = false;
this.confirmLoading = false;
for (let key in this.platform) {
this.platform[key] = '';
}
this.platform.isTel = false;
} else {
throw msg;
this.confirmLoading = false;
}
} catch (error) {
this.$message.error(error);
this.confirmLoading = false;
}
},
//
async getCode() {
// console.log(111);
try {
const params = {
phone: this.platform.tel,
verificationCodeId: this.picCode.verificationCodeId,
verificationCodeValue: this.codeNum,
};
await this.sendCode(params);
this.getCodeInterval();
} catch (error) {
// throw new Error(`SignIn.vue method getCode: ${error}`);
// console.log(error);
}
},
//
getCodeInterval() {
this.showInterval = true;
this.codeTimer = setInterval(() => {
if (this.interval === 0) {
clearInterval(this.codeTimer);
this.codeTimer = null;
this.showInterval = false;
this.interval = 120;
return;
}
this.interval = this.interval - 1;
}, 1000);
},
//
changePicCode() {
this.sendPicCode();
},
beforeUpload(file) {
return new Promise((resolve, reject) => {
const isLt5M = file.size / 1024 / 1024 < 5;
if (!isLt5M) {
this.$message.warning('上传附件大小不能超过5m!');
return reject(false);
}
return resolve(true);
});
},
fileChange(info) {
this.fileList = info.fileList;
}, },
}, },
}; };

4
src/views/NewPlatform/Children/Share.vue

@ -71,9 +71,9 @@ export default {
return { return {
str: '这是科技资源开放共享服务平台', str: '这是科技资源开放共享服务平台',
title: '科技资源开放共享服务平台', title: '科技资源开放共享服务平台',
typeOfPlatform: '创新平台', typeOfPlatform: '创新社区',
arr: [ arr: [
{ name: '创新平台', url: '/NewPlatform/NewCore' }, { name: '创新社区', url: '/NewPlatform/NewCore' },
{ name: '创新资源平台', url: '/NewPlatform/News' }, { name: '创新资源平台', url: '/NewPlatform/News' },
{ name: '科技资源开放共享服务平台', url: '' }, { name: '科技资源开放共享服务平台', url: '' },
], ],

4
src/views/NewPlatform/Children/ShareChild/Institute.vue

@ -117,10 +117,10 @@ export default {
return { return {
id: 0, id: 0,
title: '研究院详情', title: '研究院详情',
typeOfPlatform: '创新平台', typeOfPlatform: '创新社区',
showPage: 32, showPage: 32,
arr: [ arr: [
{ name: '创新平台', url: '/NewPlatform/NewCore' }, { name: '创新社区', url: '/NewPlatform/NewCore' },
{ name: '创新资源平台', url: '/NewPlatform/News' }, { name: '创新资源平台', url: '/NewPlatform/News' },
{ name: '科技资源开放共享服务平台', url: '/NewPlatform/Share' }, { name: '科技资源开放共享服务平台', url: '/NewPlatform/Share' },
{ name: '研究院详情', url: '' }, { name: '研究院详情', url: '' },

4
src/views/NewPlatform/Children/Transfer.vue

@ -49,9 +49,9 @@ export default {
return { return {
str: '这是知识产权与技术转移转化服务平台', str: '这是知识产权与技术转移转化服务平台',
title: '知识产权与技术转移转化服务平台', title: '知识产权与技术转移转化服务平台',
typeOfPlatform: '创新平台', typeOfPlatform: '创新社区',
arr: [ arr: [
{ name: '创新平台', url: '/NewPlatform/NewCore' }, { name: '创新社区', url: '/NewPlatform/NewCore' },
{ name: '创新资源平台', url: '/NewPlatform/News' }, { name: '创新资源平台', url: '/NewPlatform/News' },
{ name: '知识产权与技术转移转化服务平台', url: '' }, { name: '知识产权与技术转移转化服务平台', url: '' },
], ],

6
src/views/NewPlatform/components/HNav.vue

@ -29,6 +29,10 @@ export default {
title: '创新服务', title: '创新服务',
url: '/NewPlatform/NewService', url: '/NewPlatform/NewService',
}, },
{
title: '交流社区',
url: '/NewPlatform/Community',
},
], ],
}; };
}, },
@ -40,6 +44,8 @@ export default {
this.activeNum = 1; this.activeNum = 1;
} else if (this.$route.fullPath === '/NewPlatform/NewService') { } else if (this.$route.fullPath === '/NewPlatform/NewService') {
this.activeNum = 2; this.activeNum = 2;
} else if (this.$route.fullPath === '/NewPlatform/Community') {
this.activeNum = 3;
} else { } else {
this.activeNum = 0; this.activeNum = 0;
} }

2
src/views/Policy/Policy.vue

@ -28,7 +28,7 @@ export default {
return { return {
showType: 1, showType: 1,
list: [], list: [],
arr: [{ name: '创新政策', url: '' }], arr: [{ name: '政策资讯', url: '' }],
}; };
}, },
methods: {}, methods: {},

Loading…
Cancel
Save