aBin 5 years ago
parent
commit
16e89888ab
  1. 6
      src/common/portrait.styl
  2. 4
      src/components/Index/IndexNewList.vue
  3. 111
      src/components/Introduce/IntentionModel.vue
  4. 21
      src/components/PlatformList/PlatformList.vue
  5. 17
      src/config/api.js
  6. 13
      src/views/IncubationPlatform/Children/Products.vue
  7. 60
      src/views/IncubationPlatform/Children/Tutor.vue
  8. 65
      src/views/NewPlatform/Children/ShareChild/InsDet.vue

6
src/common/portrait.styl

@ -411,9 +411,15 @@ h2{
background: #F5F5F5
}
.ant-btn {
color: #13acc4 !important;
border-color: #13acc4 !important;
}
.ant-btn-primary{
background-color: #13ACC4
border-color: #13ACC4;
color: #fff!important;
}
.ant-btn-link:hover, .ant-btn-link:focus{

4
src/components/Index/IndexNewList.vue

@ -5,7 +5,7 @@
-->
<template>
<div class="wrap">
<div class="index-wrap">
<div class="d-flex flex-nowrap align-center baseColor" v-if="i === 0">
<span class="font-bold-24">行业资讯</span>
<img class="bullhorn ml-4" src="@/assets/bullhorn.png" />
@ -82,7 +82,7 @@ export default {
</script>
<style scoped lang="stylus">
.wrap {
.index-wrap {
width: 90%;
height: 342px;
margin: 15px auto 15px auto;

111
src/components/Introduce/IntentionModel.vue

@ -1,47 +1,112 @@
<template>
<div>
<a-button type="primary" @click="showModal">
{{ str }}
</a-button>
<a-modal width="50%" :title="title" :visible="visible" :confirm-loading="confirmLoading" @ok="handleOk" @cancel="handleCancel">
<a-button @click="showModal">{{ typeData.type === 1 ? '意向填报' : '直接购买' }}</a-button>
<a-modal
:confirm-loading="confirmLoading"
:title="typeData.type === 1 ? '意向填报' : '产品购买'"
: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 v-model.trim="platform.companyName" placeholder="请输入公司名称..." />
<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 v-model.trim="platform.manName" placeholder="请输入联系人..." />
<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" type="tel" v-decorator="['tel', { rules: phoneRules }]" placeholder="请输入联系电话.." />
<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>
<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" />
<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>
<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>
<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="项目信息简述" required>
<a-textarea v-model.trim="platform.describe" style="height: 120px" placeholder="请输入项目信息简述..." />
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="项目信息简述"
required
>
<a-textarea
placeholder="请输入项目信息简述..."
style="height: 120px"
v-model.trim="platform.describe"
/>
</a-form-item>
<a-form-item
v-show="typeData.type === 0"
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="上传附件"
v-show="typeData.type === 0"
>
<a-upload :action="action" :default-file-list="fileList" @change="fileChange" list-type="picture" name="files">
<a-button> <a-icon type="upload" />点击上传附件 </a-button>
<a-upload
:action="action"
: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>
@ -74,8 +139,6 @@ export default {
action: upload,
fileList: [],
visible: false,
title: '意向填报',
str: '意向填报',
formItemLayout,
formTailLayout,
confirmLoading: false,

21
src/components/PlatformList/PlatformList.vue

@ -1,11 +1,20 @@
<template>
<div>
<div class="inner d-flex flex-wrap">
<div :class="(index + 1) % 4 === 0 ? 'margin-0' : ''" :key="index" class="item-box mb-6" v-for="(item, index) in list">
<img v-if="item.picUrl" :src="item.picUrl" style="height: 220px; width: 100%" />
<img v-else :src="item.visitLocation" style="height: 220px; width: 100%" />
<div
:class="(index + 1) % 4 === 0 ? 'margin-0' : ''"
:key="index"
class="item-box mb-6"
v-for="(item, index) in list"
>
<img :src="item.picUrl" style="height: 220px; width: 100%" v-if="item.picUrl" />
<img :src="item.visitLocation" style="height: 220px; width: 100%" v-else />
<p class="font-24 my-4 title">{{ item.name }}</p>
<p @click="jump(item.id)" class="font-16 baseColor" style="text-align: right; cursor: pointer">了解更多</p>
<p
@click="jump(item.id)"
class="font-16 baseColor"
style="text-align: right; cursor: pointer"
>了解更多</p>
</div>
</div>
<div class="inner">
@ -25,7 +34,7 @@
<script>
import { mapMutations, mapState } from 'vuex';
import { selInstrument, searchFront } from 'config/api';
import { selInstrument, searchFront, selProduct } from 'config/api';
export default {
name: 'PlatformList',
data() {
@ -156,7 +165,7 @@ export default {
pageSize: this.pageSize,
},
};
const res = await selInstrument(params);
const res = await selProduct(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.list = data.list;

17
src/config/api.js

@ -16,6 +16,8 @@ const page = `${greenvalley}/page`; // 页面详情相关接口
const achInstr = `${greenvalley}/achInstr`; // 轮播图相关接口
const service = `${greenvalley}/service`; // 服务相关接口
const user = `${greenvalley}/user`; // 用户相关接口
const product = `${greenvalley}/product`; // 产品相关接口
const tutorRelated = `${greenvalley}/tutorRelated`; // 导师相关接口
// websocket基础地址
export const WS_BASE_URL = msgUrl;
@ -61,12 +63,16 @@ export const selModel = params => axios.post(`${achInstr}/selModel`, params);
// 仪器列表查询
export const selInstrument = params => axios.post(`${achInstr}/selInstrument`, params);
// 仪器详情查询
export const selInstrumentMes = params => axios.post(`${achInstr}/selInstrumentMes`, params);
// 通过研究院(实验室)Id查询仪器列表
export const selInstrumentByRes = params => axios.post(`${achInstr}/selInstrumentByRes`, params);
// 研究院(实验室)列表查询
export const searchFront = params => axios.post(`${greenvalley}/institute/searchFront`, params);
// 研究院团队详情查询
export const teamSearch = params => axios.post(`${greenvalley}/teamGuide/teamSearch`, params);
@ -87,6 +93,8 @@ export const SearchCar = params => axios.post(`${service}/SearchCar`, params);
export const serviceApply = params => axios.post(`${service}/serviceApply`, params);
// 加入购物车
export const addCar = params => axios.post(`${service}/addCar`, params);
// 查询用户购物车
export const searchCar = params => axios.post(`${service}/SearchCar`, params);
// 加入购物车后购买
@ -94,3 +102,12 @@ export const carAndBuy = params => axios.post(`${service}/CarAndBuy`, params);
// 登录人信息
export const getUserSer = params => axios.post(`${user}/userSer`, params);
// 查询 产品列表
export const selProduct = params => axios.post(`${product}/selProduct`, params);
// 查询 产品列表 详情
export const selProductMes = params => axios.post(`${product}/selProductMes`, params);
// 查询 创业导师
export const selTeacher = () => axios.post(`${tutorRelated}/selTeacher`);

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

@ -14,12 +14,16 @@
@click="choose(index)"
class="ins-name"
v-for="(item, index) in productLists"
>
{{ item.name }}
</span>
>{{ item.name }}</span>
</div>
<div class="flex-1 align-center">
<a-input-search @search="searchProduct" class="item-search" enter-button="搜索" placeholder="请输入" v-model="productIpt" />
<a-input-search
@search="searchProduct"
class="item-search"
enter-button="搜索"
placeholder="请输入"
v-model="productIpt"
/>
</div>
</div>
</div>
@ -36,6 +40,7 @@ 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';
export default {
name: 'Products',
components: { BreadCrumb, HNav, PlatformList },

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

@ -4,8 +4,18 @@
<h-nav />
<div class="inner">
<bread-crumb :arr="arr" />
<div class="white pa-5 my-5">
<rich-text :title="title" />
<div class="py-5 my-5" v-if="teachers && teachers.length>0">
<div :key="teacher.categoryId" class="mb-4" v-for="teacher in teachers">
<p class="font-bold-24 title-color">{{ teacher.categoryName }}</p>
<div class="d-flex flex-wrap mb-10" v-if="teacher.services && teacher.services.length">
<div
:class="(index+1)%5===0? 'teacher-item1' : ''"
:key="index"
class="teacher-item font-24 mb-3"
v-for="(item,index) in teacher.services"
>{{ item.name }}</div>
</div>
</div>
</div>
</div>
</div>
@ -16,6 +26,7 @@ import Banner from 'components/Banner/Banner.vue';
import HNav from './../components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import RichText from 'components/Introduce/RichText.vue';
import { selTeacher } from 'config/api';
export default {
name: 'Tutor',
@ -28,10 +39,43 @@ export default {
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' },
{ name: '创业导师', url: '' },
],
teachers: [],
};
},
methods: {},
created() {
this.handleTeacher();
},
methods: {
//
async handleTeacher() {
try {
const res = await selTeacher();
const { code, msg, data } = res.data;
if (code === 200) {
this.teachers = data;
for (let i = 0; i < this.teachers.length; i++) {
const element = this.teachers[i];
for (let j = 0; j < element.services.length; j++) {
for (let k = 0; k < element.services.length - j; k++) {
if (element.services[k].order > element.services[k + 1].order) {
let a = {};
a = element.services[k + 1].order;
element.services[k + 1].order = element.services[k].order;
element.services[k].order = a;
}
}
}
}
} else {
this.$message.error(msg);
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>
@ -39,4 +83,14 @@ export default {
.inner {
margin: 40px auto;
}
.teacher-item {
width: 12%;
margin-right: 10%;
text-indent: 1em;
}
.teacher-item1 {
margin-right: 0;
}
</style>

65
src/views/NewPlatform/Children/ShareChild/InsDet.vue

@ -1,11 +1,12 @@
<template>
<div class="inner equ-box">
<div class="equ-info d-flex">
<img :src="obj.img" alt="" />
<img :src="obj.img" alt v-if="listState === 1" />
<img :src="obj.visitLocation" alt v-if="listState === 3" />
<div class="equ-info-box">
<p class="equ-name">{{ obj.name }}</p>
<div class="d-flex flex-wrap">
<div style="width: 200px" class="equ-info-left">
<div class="d-flex flex-wrap" v-if="listState === 1">
<div class="equ-info-left" style="width: 200px">
<p>仪器名字</p>
<p>制造商</p>
<p>型号</p>
@ -21,15 +22,32 @@
<p>{{ obj.specifications }}</p>
<p>{{ obj.performance }}</p>
<p>
<span v-for="(item, index) in obj.selPeoList" :key="index">{{ item.contactsName }}</span>
<span :key="index" v-for="(item, index) in obj.selPeoList">{{ item.contactsName }}</span>
</p>
<p>
<span v-for="(item, index) in obj.selPeoList" :key="index">{{ item.contactsPhone }}</span>
<span :key="index" v-for="(item, index) in obj.selPeoList">{{ item.contactsPhone }}</span>
</p>
</div>
</div>
<div class="d-flex flex-wrap" v-if="listState === 3">
<div class="equ-info-left" style="width: 200px">
<p>公司名称</p>
<p>产品编号</p>
<p>联系人</p>
</div>
<div style="width: 500px">
<p>{{ obj.companyname }}</p>
<p>{{ obj.identifier }}</p>
<p>
<span :key="index" v-for="(item, index) in obj.selPeoList">{{ item.contactsName }}</span>
</p>
</div>
</div>
<p class="equ-btn">
<intention-model :type-data="typeData" style="margin-right: 20px; float: left" />
<intention-model
:type-data="listState === 1 ? typeData : typeProductData"
style="margin-right: 20px; float: left"
/>
<!-- <a-button style="margin-right: 20px">转化意向</a-button> -->
<!-- <a-button type="primary">加入购物车</a-button> -->
<add-shopping :type-data="typeData" style="margin-right: 20px; float: right" />
@ -37,13 +55,15 @@
</div>
</div>
<div class="content-box">
<div v-dompurify-html="obj.purpose"></div>
<div v-dompurify-html="obj.purpose" v-if="listState === 1"></div>
<div v-dompurify-html="obj.details" v-if="listState === 3"></div>
</div>
</div>
</template>
<script>
import { selInstrumentMes } from 'config/api';
import { mapState } from 'vuex';
import { selInstrumentMes, selProductMes } from 'config/api';
import IntentionModel from 'components/Introduce/IntentionModel.vue';
import AddShopping from 'components/Introduce/AddShopping.vue';
export default {
@ -56,13 +76,24 @@ export default {
type: 1,
Id: '',
},
typeProductData: {
type: 3,
Id: '',
},
id: 0,
};
},
computed: mapState('home', ['listState']),
created() {
this.id = this.$route.params.id;
this.typeData.Id = this.$route.params.id;
this.getData();
if (this.listState === 1) {
this.typeData.Id = this.$route.params.id;
this.getData();
}
if (this.listState === 3) {
this.typeProductData.Id = this.$route.params.id;
this.getProductData();
}
},
methods: {
async getData() {
@ -70,6 +101,20 @@ export default {
const params = { param: { id: this.id } };
const res = await selInstrumentMes(params);
const { code, data, msg } = res.data;
if (code === 200) {
this.obj = data;
}
} catch (error) {
console.log(error);
}
},
//
async getProductData() {
try {
const params = { param: { id: this.id } };
const res = await selProductMes(params);
const { code, data, msg } = res.data;
if (code === 200) {
console.log(data);
this.obj = data;

Loading…
Cancel
Save