Browse Source

实体申请

master
ma 4 years ago
parent
commit
b0a8bad34d
  1. 72
      src/components/Banner/BannerAdd.vue
  2. 6
      src/components/BtnCom/BtnCon.vue
  3. 2
      src/components/CVideo/VideoDate.vue
  4. 13
      src/components/Community/CommentDate.vue
  5. 1
      src/components/Community/CommentSearch.vue
  6. 8
      src/components/Community/CommunityDate.vue
  7. 30
      src/components/Course/CourseDate.vue
  8. 33
      src/components/Development/DevelopmentDate.vue
  9. 31
      src/components/Institute/InstituteDate.vue
  10. 30
      src/components/Mentor/MentorDate.vue
  11. 193
      src/components/Partner/PartnerAdd.vue
  12. 204
      src/components/Partner/PartnerDate.vue
  13. 197
      src/components/Partner/PartnerEdit.vue
  14. 78
      src/components/Partner/PartnerSearch.vue
  15. 54
      src/components/SpinOff/SpinOffDate.vue
  16. 23
      src/components/Transfer/TransferDate.vue
  17. 48
      src/components/innovativeService/innovativeServiceDate.vue
  18. 48
      src/components/innovativeService/innovativeServiceSearch.vue
  19. 20
      src/config/api.js
  20. 2
      src/plugins/ant-design-vue.js
  21. 20
      src/router/index.js
  22. 26
      src/store/mutations.js
  23. 4
      src/store/state.js
  24. 82
      src/views/CooperativePartner/AboutUsDerivativeEnterprise.vue
  25. 55
      src/views/CooperativePartner/CooperativePartner.vue
  26. 82
      src/views/CooperativePartner/HatchCooperativePartner.vue
  27. 82
      src/views/CooperativePartner/IndustryDerivativeEnterprise.vue
  28. 20
      src/views/DerivativeEnterprise/DerivativeEnterprise.vue

72
src/components/Banner/BannerAdd.vue

@ -4,31 +4,79 @@
<a-modal :closable="false" footer title="添加轮播图" v-model="visible" width="700px"> <a-modal :closable="false" footer title="添加轮播图" v-model="visible" width="700px">
<a-form :form="form" @submit="handleSubmit"> <a-form :form="form" @submit="handleSubmit">
<!-- 跳转类型 --> <!-- 跳转类型 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="跳转类型"> <a-form-item
<a-select @change="getUse($event, 'jumpType')" class="ml-3" default-value="正常" style="width: 150px"> :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="跳转类型"
>
<a-select
@change="getUse($event, 'jumpType')"
class="ml-3"
default-value="正常"
style="width: 150px"
>
<a-select-option :key="item" :value="index" v-for="(item, index) in enable">{{ item }}</a-select-option> <a-select-option :key="item" :value="index" v-for="(item, index) in enable">{{ item }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<!-- 跳转路径 --> <!-- 跳转路径 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="图片跳转路径"> <a-form-item
<a-input placeholder="图片跳转路径" class="ml-3" /> :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片跳转路径"
>
<a-input class="ml-3" placeholder="图片跳转路径" />
</a-form-item> </a-form-item>
<!-- 状态 --> <!-- 状态 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="状态"> <a-form-item
<a-select @change="getUse($event, 'recStatus')" class="ml-3" default-value="启用" style="width: 150px"> :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="状态"
>
<a-select
@change="getUse($event, 'recStatus')"
class="ml-3"
default-value="启用"
style="width: 150px"
>
<a-select-option :key="item" :value="index" v-for="(item, index) in enable">{{ item }}</a-select-option> <a-select-option :key="item" :value="index" v-for="(item, index) in enable">{{ item }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<!-- 页面显示位置 --> <!-- 页面显示位置 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="页面显示位置"> <a-form-item
<a-select @change="getUse($event, 'showPage')" class="ml-3" default-value="首页" style="width: 100%"> :label-col="formItemLayout.labelCol"
<a-select-option :key="item.page" :value="item.page" v-for="item in enable2">{{ item.name }}</a-select-option> :wrapper-col="formItemLayout.wrapperCol"
label="页面显示位置"
>
<a-select
@change="getUse($event, 'showPage')"
class="ml-3"
default-value="首页"
style="width: 100%"
>
<a-select-option
:key="item.page"
:value="item.page"
v-for="item in enable2"
>{{ item.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<!-- 图片 --> <!-- 图片 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="图片"> <a-form-item
<a-upload :before-upload="beforeUpload" class="ml-3" :action="upload" list-type="picture" name="files" @change="handleChange"> :label-col="formItemLayout.labelCol"
<a-button v-show="fileList.length - 0 === 0"> <a-icon type="upload" /> 选择图片 </a-button> :wrapper-col="formItemLayout.wrapperCol"
label="图片"
>
<a-upload
:action="upload"
:before-upload="beforeUpload"
@change="handleChange"
class="ml-3"
list-type="picture"
name="files"
>
<a-button v-show="fileList.length - 0 === 0">
<a-icon type="upload" />选择图片
</a-button>
</a-upload> </a-upload>
</a-form-item> </a-form-item>
<a-form-item class="d-flex flex-row-reverse"> <a-form-item class="d-flex flex-row-reverse">

6
src/components/BtnCom/BtnCon.vue

@ -10,7 +10,7 @@
<div @click="jump('/innovation-policy')" class="btn">创新政策</div> <div @click="jump('/innovation-policy')" class="btn">创新政策</div>
<div @click="jump('/talent-recruitment')" class="btn">人才招聘</div> <div @click="jump('/talent-recruitment')" class="btn">人才招聘</div>
<div @click="jump('/cooperative-partner')" class="btn">合作伙伴</div> <div @click="jump('/cooperative-partner')" class="btn">合作伙伴</div>
<div @click="jump('/derivative-enterprise')" class="btn">衍生企业</div> <div @click="jump('/about-us-derivative-enterprise')" class="btn">衍生企业</div>
<div class="font-bold-24">创新部</div> <div class="font-bold-24">创新部</div>
<div @click="jump('/cooperation-intention')" class="btn">合作意向</div> <div @click="jump('/cooperation-intention')" class="btn">合作意向</div>
@ -26,11 +26,11 @@
<div @click="jump('/virtual-application')" class="btn">入驻虚拟申请</div> <div @click="jump('/virtual-application')" class="btn">入驻虚拟申请</div>
<div @click="jump('/incubation-services')" class="btn">服务</div> <div @click="jump('/incubation-services')" class="btn">服务</div>
<div @click="jump('/entrepreneurial-mentor')" class="btn">需求填报</div> <div @click="jump('/entrepreneurial-mentor')" class="btn">需求填报</div>
<div @click="jump('/cooperative-partner')" class="btn">合作伙伴</div> <div @click="jump('/hatch-cooperative-partner')" class="btn">合作伙伴</div>
<div class="font-bold-24">产业部</div> <div class="font-bold-24">产业部</div>
<div @click="jump('/industrial-services')" class="btn">服务</div> <div @click="jump('/industrial-services')" class="btn">服务</div>
<div @click="jump('/derivative-enterprise')" class="btn">衍生企业</div> <div @click="jump('/industry-derivative-enterprise')" class="btn">衍生企业</div>
<div @click="jump('/industry-demand-report')" class="btn">需求填报</div> <div @click="jump('/industry-demand-report')" class="btn">需求填报</div>
</div> </div>
</template> </template>

2
src/components/CVideo/VideoDate.vue

@ -190,7 +190,7 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.main .img { .main .img {
width: 100%; height: 65px;
} }
.main .big_img { .main .big_img {

13
src/components/Community/CommentDate.vue

@ -19,7 +19,7 @@
<!-- 用户头像 --> <!-- 用户头像 -->
<template slot="avatarUrl" slot-scope="text, record"> <template slot="avatarUrl" slot-scope="text, record">
<img :src="record.avatarUrl" class="img" /> <a-avatar :size="50" :src="record.avatarUrl" v-if="record.avatarUrl" />
</template> </template>
<!-- 审核状态 --> <!-- 审核状态 -->
@ -64,7 +64,7 @@
</template> </template>
<script> <script>
import { upTopping } from 'config/api'; import { upComment } from 'config/api';
const columns = [ const columns = [
{ {
@ -149,13 +149,10 @@ export default {
const params = { param: { id: options.id } }; const params = { param: { id: options.id } };
if (options) { if (options) {
if (options.comStatus !== null) { if (options.comStatus !== null) {
params.param.comStatus = options.comStatus; params.param.comStatus = +options.comStatus;
}
if (options.topping !== null) {
params.param.topping = options.topping;
} }
} }
const res = await upTopping(params); const res = await upComment(params);
const { data, msg, code } = res.data; const { data, msg, code } = res.data;
this.spinning = false; this.spinning = false;
if (code === 200) { if (code === 200) {
@ -175,7 +172,7 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.main .img { .main .img {
width: 100%; height: 65px;
} }
.main .big_img { .main .big_img {

1
src/components/Community/CommentSearch.vue

@ -4,7 +4,6 @@
<!-- 帖子状态 --> <!-- 帖子状态 -->
<a-select <a-select
@change="handleChangeSelect('comStatus',$event)" @change="handleChangeSelect('comStatus',$event)"
class="ml-3"
placeholder="跟帖状态" placeholder="跟帖状态"
style="width: 150px" style="width: 150px"
> >

8
src/components/Community/CommunityDate.vue

@ -24,7 +24,7 @@
<!-- 用户头像 --> <!-- 用户头像 -->
<template slot="avatarUrl" slot-scope="text, record"> <template slot="avatarUrl" slot-scope="text, record">
<img :src="record.avatarUrl" class="img" /> <a-avatar :size="50" :src="record.avatarUrl" v-if="record.avatarUrl" />
</template> </template>
<!-- 审核状态 --> <!-- 审核状态 -->
@ -214,10 +214,10 @@ export default {
const params = { param: { id: options.id } }; const params = { param: { id: options.id } };
if (options) { if (options) {
if (options.comStatus !== null) { if (options.comStatus !== null) {
params.param.comStatus = options.comStatus; params.param.comStatus = +options.comStatus;
} }
if (options.topping !== null) { if (options.topping !== null) {
params.param.topping = options.topping; params.param.topping = +options.topping;
} }
} }
const res = await upTopping(params); const res = await upTopping(params);
@ -246,7 +246,7 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.main .img { .main .img {
width: 100%; height: 65px;
} }
.main .big_img { .main .big_img {

30
src/components/Course/CourseDate.vue

@ -55,7 +55,7 @@
</template> </template>
<script> <script>
import CourseEdit from "components/Course/CourseEdit.vue"; import CourseEdit from 'components/Course/CourseEdit.vue';
const columns = [ const columns = [
{ {
@ -104,23 +104,23 @@ const columns = [
const lists = [ const lists = [
{ {
id:'001', id: '001',
courseName:'传控科技', courseName: '传控科技',
courseProfile:'传控科技简介', courseProfile: '传控科技简介',
introductionPicture:'assets/logo.png', introductionPicture: 'assets/logo.png',
auditStatus: '通过', auditStatus: '通过',
}, },
{ {
id:'002', id: '002',
courseName:'中绿环保', courseName: '中绿环保',
courseProfile:'中绿环保简介', courseProfile: '中绿环保简介',
introductionPicture:'assets/logo.png', introductionPicture: 'assets/logo.png',
auditStatus: '未通过', auditStatus: '未通过',
} },
]; ];
export default { export default {
name: "CourseDate", name: 'CourseDate',
components: { components: {
CourseEdit, CourseEdit,
}, },
@ -133,7 +133,7 @@ export default {
height: '', height: '',
editVisible: false, editVisible: false,
imgVisible: false, imgVisible: false,
} };
}, },
mounted() { mounted() {
@ -141,11 +141,11 @@ export default {
}, },
methods: { methods: {
showEditModal(){ showEditModal() {
this.editVisible = true; this.editVisible = true;
}, },
closeModal(){ closeModal() {
this.editVisible = false; this.editVisible = false;
}, },
@ -173,7 +173,7 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.main .img { .main .img {
width: 100%; height: 65px;
} }
.main .big_img { .main .big_img {

33
src/components/Development/DevelopmentDate.vue

@ -16,7 +16,7 @@
<!-- 图片 --> <!-- 图片 -->
<template slot="visitLocation" slot-scope="text, record"> <template slot="visitLocation" slot-scope="text, record">
<img :src="record.visitLocation" width="50" height="50"> <img :src="record.visitLocation" height="50" width="50" />
</template> </template>
<!-- 说明图片 --> <!-- 说明图片 -->
@ -43,7 +43,7 @@
</template> </template>
<script> <script>
import DevelopmentEdit from "components/Development/DevelopmentEdit.vue"; import DevelopmentEdit from 'components/Development/DevelopmentEdit.vue';
import { selResDelete } from 'config/api'; import { selResDelete } from 'config/api';
const columns = [ const columns = [
@ -83,21 +83,8 @@ const columns = [
}, },
]; ];
// const lists = [
// {
// id:'001',
// directory:'',
// introductionPicture:'assets/logo.png',
// },
// {
// id:'002',
// directory:'绿',
// introductionPicture:'assets/logo.png',
// }
// ];
export default { export default {
name: "DevelopmentDate", name: 'DevelopmentDate',
components: { components: {
DevelopmentEdit, DevelopmentEdit,
}, },
@ -111,7 +98,7 @@ export default {
height: '', height: '',
editVisible: false, editVisible: false,
imgVisible: false, imgVisible: false,
} };
}, },
mounted() { mounted() {
@ -127,18 +114,15 @@ export default {
}, },
methods: { methods: {
showEditModal(){ showEditModal() {
this.editVisible = true; this.editVisible = true;
}, },
async closeModal(){ async closeModal() {},
this.editVisible = false;
await this.$emit('selResSearch');
},
// //
async onDelete(id) { async onDelete(id) {
console.log(id); console.log(id);
try { try {
const params = { param: { id } }; const params = { param: { id } };
const res = await selResDelete(params); const res = await selResDelete(params);
@ -148,7 +132,6 @@ export default {
this.$emit('selResSearch'); this.$emit('selResSearch');
// const arr = [...this.lists]; // const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== teamId); // this.lists = arr.filter(item => item.id !== teamId);
// TODO:
} else { } else {
throw msg; throw msg;
} }
@ -162,7 +145,7 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.main .img { .main .img {
width: 100%; height: 65px;
} }
.main .big_img { .main .big_img {

31
src/components/Institute/InstituteDate.vue

@ -6,8 +6,8 @@
:data-source="lists" :data-source="lists"
:loading="loading" :loading="loading"
:row-key="record => record.id" :row-key="record => record.id"
@change="handleTableChange"
:scroll="{ y: height }" :scroll="{ y: height }"
@change="handleTableChange"
bordered bordered
class="white" class="white"
> >
@ -26,7 +26,7 @@
<!-- 分类管理 --> <!-- 分类管理 -->
<!-- <template slot="categoryManage" slot-scope="text, record"> <!-- <template slot="categoryManage" slot-scope="text, record">
<a-button @click="openCategoryManage" size="small" type="primary">仪器分类管理</a-button> <a-button @click="openCategoryManage" size="small" type="primary">仪器分类管理</a-button>
</template> --> </template>-->
<!-- 研究院类型 --> <!-- 研究院类型 -->
<template slot="serviceType" slot-scope="text, record"> <template slot="serviceType" slot-scope="text, record">
@ -49,9 +49,7 @@
<div slot="expandedRowRender" slot-scope="record" style="margin: 0"> <div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div>简介 <div>简介
<span v-dompurify-html="record.description"></span></div> <span v-dompurify-html="record.description"></span></div>
</div> --> </div>-->
<div <div
class="d-flex flex-nowrap justify-space-between" class="d-flex flex-nowrap justify-space-between"
@ -59,7 +57,10 @@
slot-scope="record" slot-scope="record"
style="margin: 0" style="margin: 0"
> >
<div class="ml-3">分类<span v-dompurify-html="record.direction"></span></div> <div class="ml-3">
分类
<span v-dompurify-html="record.direction"></span>
</div>
<div class="ml-3">备注{{ record.description }}</div> <div class="ml-3">备注{{ record.description }}</div>
</div> </div>
</a-table> </a-table>
@ -72,7 +73,7 @@
</template> </template>
<script> <script>
import InstituteEdit from "components/Institute/InstituteEdit.vue"; import InstituteEdit from 'components/Institute/InstituteEdit.vue';
import { deleteInstitute } from 'config/api'; import { deleteInstitute } from 'config/api';
const columns = [ const columns = [
@ -171,7 +172,7 @@ const columns = [
// ]; // ];
export default { export default {
name: "InstituteDate", name: 'InstituteDate',
components: { components: {
InstituteEdit, InstituteEdit,
}, },
@ -186,7 +187,7 @@ export default {
height: '', height: '',
editVisible: false, editVisible: false,
imgVisible: false, imgVisible: false,
} };
}, },
mounted() { mounted() {
@ -202,23 +203,23 @@ export default {
}, },
methods: { methods: {
showEditModal(){ showEditModal() {
this.editVisible = true; this.editVisible = true;
}, },
async closeModal(){ async closeModal() {
this.editVisible = false; this.editVisible = false;
await this.$emit('getInstituteSearchBack'); await this.$emit('getInstituteSearchBack');
}, },
// //
openTeamMember(){ openTeamMember() {
const { query } = this.$route; const { query } = this.$route;
this.$router.push({ path: '/RD-team-member', query }); this.$router.push({ path: '/RD-team-member', query });
}, },
// //
openCategoryManage(){ openCategoryManage() {
const { query } = this.$route; const { query } = this.$route;
this.$router.push({ path: '/category-manage', query }); this.$router.push({ path: '/category-manage', query });
}, },
@ -232,7 +233,7 @@ export default {
// //
async onDelete(id) { async onDelete(id) {
try { try {
const params = { param:{id}}; const params = { param: { id } };
const res = await deleteInstitute(params); const res = await deleteInstitute(params);
const { data, msg, code } = res.data; const { data, msg, code } = res.data;
if (code === 200) { if (code === 200) {
@ -254,7 +255,7 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.main .img { .main .img {
width: 100%; height: 65px;
} }
.main .big_img { .main .big_img {

30
src/components/Mentor/MentorDate.vue

@ -55,7 +55,7 @@
</template> </template>
<script> <script>
import MentorEdit from "components/Mentor/MentorEdit.vue"; import MentorEdit from 'components/Mentor/MentorEdit.vue';
const columns = [ const columns = [
{ {
@ -104,23 +104,23 @@ const columns = [
const lists = [ const lists = [
{ {
id:'001', id: '001',
tutorName:'传控科技', tutorName: '传控科技',
tutorProfile:'传控科技简介', tutorProfile: '传控科技简介',
headPortrait:'assets/logo.png', headPortrait: 'assets/logo.png',
auditStatus: '通过', auditStatus: '通过',
}, },
{ {
id:'002', id: '002',
tutorName:'中绿环保', tutorName: '中绿环保',
tutorProfile:'中绿环保简介', tutorProfile: '中绿环保简介',
headPortrait:'assets/logo.png', headPortrait: 'assets/logo.png',
auditStatus: '未通过', auditStatus: '未通过',
} },
]; ];
export default { export default {
name: "MentorDate", name: 'MentorDate',
components: { components: {
MentorEdit, MentorEdit,
}, },
@ -133,7 +133,7 @@ export default {
height: '', height: '',
editVisible: false, editVisible: false,
imgVisible: false, imgVisible: false,
} };
}, },
mounted() { mounted() {
@ -141,11 +141,11 @@ export default {
}, },
methods: { methods: {
showEditModal(){ showEditModal() {
this.editVisible = true; this.editVisible = true;
}, },
closeModal(){ closeModal() {
this.editVisible = false; this.editVisible = false;
}, },
@ -173,7 +173,7 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.main .img { .main .img {
width: 100%; height: 65px;
} }
.main .big_img { .main .big_img {

193
src/components/Partner/PartnerAdd.vue

@ -0,0 +1,193 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal
:closable="false"
:title="`添加${partnerOptions.type === 1 ? '合作伙伴' : '衍生企业'} `"
footer
v-model="visible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit">
<!-- 公司名称 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司名称"
>
<a-input
placeholder="公司名称"
v-decorator="[
'name',
{
rules: [
{ required: true, message: '公司名称不能为空' },
{ whitespace: true, message: '公司名称不能为空' },
{ max: 140, massage: '公司名称最多140个字符' },
],
},
]"
/>
</a-form-item>
<!-- logo -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司logo"
required
>
<a-upload
:action="upload"
:before-upload="beforeUpload"
@change="handleChange"
list-type="picture"
name="files"
>
<a-button v-show="fileList.length - 0 === 0">
<a-icon type="upload" />选择图片
</a-button>
</a-upload>
</a-form-item>
<!-- 公司类型 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司类型"
required
>
<a-select @change="getStatus" placeholder="公司类型" style="width: 100%">
<a-select-option
:key="index"
:value="item.id"
v-for="(item, index) in policyStatus"
>{{ item.value }}</a-select-option>
</a-select>
</a-form-item>
<!-- 公司简介 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司简介"
>
<quill-editor :max-size="maxSize" :placeholder="placeholder" @changeInput="changeInput" />
</a-form-item>
<a-form-item class="d-flex flex-row-reverse">
<a-button @click="$emit('closeModal')" class="mr-3">取消</a-button>
<a-button class="white--text" html-type="submit" type="primary">保存</a-button>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import { mapState } from 'vuex';
import { upload, backendAdd } from 'config/api';
import QuillEditor from 'components/QuillEditor/QuillEditor.vue';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 16 },
};
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: 'PartnerAdd',
props: { visible: { type: Boolean, default: false } },
components: { QuillEditor },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'activity-add' }),
maxSize: 2048,
description: '',
placeholder: '请输入...',
policyStatus: [
{ id: 0, value: '高校' },
{ id: 1, value: '院所' },
{ id: 2, value: '企业' },
],
typeOfTech: '',
upload: upload,
fileList: [],
//
beforeUpload: file => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
this.$message.error('仅支持 JPG/PNG 格式的图片!');
}
return isJpgOrPng;
},
};
},
computed: mapState(['partnerOptions']),
methods: {
//
getStatus(value) {
this.typeOfTech = value;
},
//
handleChange(info) {
if (info.file.status === 'done') {
this.fileList.push(info.file.response.data[0].id);
} else if (info.file.status === 'removed') {
this.fileList = info.fileList;
}
},
//
changeInput(value) {
this.description = value;
},
//
verification() {
const { typeOfTech, fileList } = this;
if (fileList.length < 1) {
this.$message.error('请选择公司logo');
return false;
}
if (typeOfTech === '') {
this.$message.error('请选择公司类型');
return false;
}
return true;
},
//
handleSubmit(e) {
e.preventDefault();
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
try {
if (!this.verification()) return;
const { name } = values;
const { description, typeOfTech, fileList, partnerOptions } = this;
const params = { param: { name, type: partnerOptions.type, typeOfPlatform: partnerOptions.typeOfPlatform } };
params.param.description = description;
params.param.typeOfTech = typeOfTech;
params.param.logo = fileList[0];
const res = await backendAdd(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('添加成功');
this.$emit('closeModal');
} else {
this.$emit('closeModal');
throw msg;
}
} catch (error) {
this.$message.error(error || '添加失败');
}
}
});
},
},
};
</script>
<style scoped lang="stylus"></style>

204
src/components/Partner/PartnerDate.vue

@ -0,0 +1,204 @@
<template>
<div class="main flex-1">
<div style="width:100%" v-if="lists && lists.length > 0">
<a-table
:columns="columns"
:data-source="lists"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
:scroll="{ y: height }"
@change="handleTableChange"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<!-- logo地址 -->
<template slot="logoUrl" slot-scope="text, record">
<img :src="record.logoUrl" height="50" width="50" />
</template>
<!-- 合作关系 -->
<template slot="type" slot-scope="text">
<span>{{ text === 1 ? '合作伙伴' : text === 2 ? '衍生企业' : '' }}</span>
</template>
<!-- 展示位置 -->
<template slot="typeOfPlatform" slot-scope="text">
<span>{{ text === 1 ? '产业平台' : text === 2 ? '关于我们' : text === 3 ? '孵化平台' : '' }}</span>
</template>
<!-- 公司类型 -->
<template slot="typeOfTech" slot-scope="text">
<span>{{ text === 0 ? '高校' : text === 1 ? '院所' : text === 2 ? '企业' : '' }}</span>
</template>
<template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal(record)" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm @confirm="() => onDelete(record.id)" title="确定要删除这一条?" v-if="lists.length">
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm>
</template>
<div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div>
<span class="font-bold-14">简介</span>
<span v-dompurify-html="record.description"></span>
</div>
</div>
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<partner-edit :editItem="editItem" :editVisible="editVisible" @closeModal="closeModal" />
</div>
</template>
<script>
import PartnerEdit from 'components/Partner/PartnerEdit.vue';
import { backendDelete } from 'config/api';
const columns = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
scopedSlots: { customRender: 'id' },
},
{
title: 'logo',
align: 'center',
dataIndex: 'logo',
key: 'logo',
},
{
title: 'logo地址',
align: 'center',
dataIndex: 'logoUrl',
key: 'logoUrl',
scopedSlots: { customRender: 'logoUrl' },
},
{
title: '公司名',
align: 'center',
dataIndex: 'name',
key: 'name',
},
{
title: '合作关系',
align: 'center',
dataIndex: 'type',
key: 'type',
scopedSlots: { customRender: 'type' },
},
{
title: '展示位置',
align: 'center',
dataIndex: 'typeOfPlatform',
key: 'typeOfPlatform',
scopedSlots: { customRender: 'typeOfPlatform' },
},
{
title: '公司类型',
align: 'center',
dataIndex: 'typeOfTech',
key: 'typeOfTech',
scopedSlots: { customRender: 'typeOfTech' },
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 200,
scopedSlots: { customRender: 'edit' },
},
];
export default {
name: 'PartnerDate',
components: {
PartnerEdit,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() {
return {
columns,
loading: false,
height: '',
editVisible: false,
editItem: null, //
};
},
mounted() {
let th = 250;
let wh = window.innerHeight;
this.height = wh - th;
window.onresize = () => {
return (() => {
wh = window.innerHeight;
this.height = wh - th;
})();
};
},
methods: {
showEditModal(record) {
this.editItem = record;
this.editVisible = true;
},
async closeModal() {
this.editVisible = false;
await this.$emit('getBackendSearch');
},
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
this.$emit('getBackendSearch', condition);
},
//
async onDelete(id) {
try {
const params = { param: { id } };
const res = await backendDelete(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('删除成功');
this.$emit('getBackendSearch');
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '删除失败');
}
},
//
openSignUp() {
const { query } = this.$route;
this.$router.push({ path: '/sign-up', query });
},
},
};
</script>
<style lang="stylus" scoped>
.main .img {
height: 65px;
}
.main .big_img {
width: 200px;
}
</style>

197
src/components/Partner/PartnerEdit.vue

@ -0,0 +1,197 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal
:closable="false"
:title="`修改${partnerOptions.type === 1 ? '合作伙伴' : '衍生企业'} `"
footer
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit" v-if="editItem">
<!-- 公司名称 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司名称"
>
<a-input
placeholder="公司名称"
v-decorator="[
'name',
{
initialValue: editItem.name,
rules: [
{ required: true, message: '公司名称不能为空' },
{ whitespace: true, message: '公司名称不能为空' },
{ max: 140, massage: '公司名称最多140个字符' },
],
},
]"
/>
</a-form-item>
<!-- logo -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司logo"
required
>
<a-upload
:action="upload"
:before-upload="beforeUpload"
@change="handleChange"
list-type="picture"
name="files"
>
<a-button v-show="fileList.length - 0 === 0">
<a-icon type="upload" />选择图片
</a-button>
</a-upload>
</a-form-item>
<!-- 公司类型 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司类型"
required
>
<a-select
@change="getStatus"
placeholder="公司类型"
style="width: 100%"
v-decorator="[
'typeOfTech',
{
initialValue: editItem.typeOfTech,
},
]"
>
<a-select-option
:key="index"
:value="item.id"
v-for="(item, index) in policyStatus"
>{{ item.value }}</a-select-option>
</a-select>
</a-form-item>
<!-- 公司简介 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="公司简介"
>
<quill-editor
:max-size="maxSize"
:value="editItem && (editItem.description ? editItem.description : '')"
@changeInput="changeInput"
/>
</a-form-item>
<a-form-item class="d-flex flex-row-reverse">
<a-button @click="$emit('closeModal')" class="mr-3">取消</a-button>
<a-button class="white--text" html-type="submit" type="primary">保存</a-button>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import { mapState } from 'vuex';
import { upload, backendUpdate } from 'config/api';
import QuillEditor from 'components/QuillEditor/QuillEditor.vue';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 16 },
};
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: 'PartnerEdit',
props: { editVisible: { type: Boolean, default: false }, editItem: { type: Object, default: () => {} } },
components: { QuillEditor },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'r-d-add' }),
maxSize: 2048,
description: '',
placeholder: '请输入...',
policyStatus: [
{ id: 0, value: '高校' },
{ id: 1, value: '院所' },
{ id: 2, value: '企业' },
],
typeOfTech: '',
upload: upload,
fileList: [],
//
beforeUpload: file => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
if (!isJpgOrPng) {
this.$message.error('仅支持 JPG/PNG 格式的图片!');
}
return isJpgOrPng;
},
};
},
computed: mapState(['partnerOptions']),
methods: {
//
getStatus(value) {
this.typeOfTech = value;
},
//
handleChange(info) {
if (info.file.status === 'done') {
this.fileList.push(info.file.response.data[0].id);
} else if (info.file.status === 'removed') {
this.fileList = info.fileList;
}
},
//
changeInput(value) {
this.description = value;
},
//
handleSubmit(e) {
e.preventDefault();
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
try {
const { name } = values;
const { description, typeOfTech, fileList, editItem } = this;
const params = { param: { name } };
params.param.id = editItem.id;
params.param.description = description ? description : editItem.description;
params.param.typeOfTech = typeOfTech ? typeOfTech : editItem.typeOfTech;
params.param.logo = fileList && fileList.length > 0 ? fileList[0] : editItem.logo;
const res = await backendUpdate(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('修改成功');
this.$emit('closeModal');
this.description = '';
this.typeOfTech = '';
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '修改失败');
}
}
});
},
},
};
</script>
<style scoped lang="stylus"></style>

78
src/components/Partner/PartnerSearch.vue

@ -0,0 +1,78 @@
<template>
<div class="d-flex flex-wrap pb-3">
<div>
<!-- 活动标题 -->
<a-input class="ml-3" placeholder="标题" style="width: 150px" v-model="name" />
<!-- 公司类型 -->
<a-select @change="changeState" class="ml-3 mb-3" placeholder="公司类型" style="width: 150px">
<a-select-option
:key="index"
:value="state.id"
v-for="(state, index) in policyStatus"
>{{ state.value }}</a-select-option>
</a-select>
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
</div>
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<partner-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import PartnerAdd from 'components/Partner/PartnerAdd.vue';
export default {
name: 'PartnerSearch',
components: {
PartnerAdd,
},
data() {
return {
visible: false,
name: '',
policyStatus: [
{ id: 0, value: '高校' },
{ id: 1, value: '院所' },
{ id: 2, value: '企业' },
],
typeOfTech: '',
};
},
methods: {
//
changeState(value) {
this.typeOfTech = value;
},
showModal() {
this.visible = true;
},
async closeModal() {
this.visible = false;
await this.$emit('getBackendSearch');
},
async handleTableChange() {
const { name, typeOfTech } = this;
//
const condition = {
name,
typeOfTech,
};
await this.$emit('getBackendSearch', condition);
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus"></style>

54
src/components/SpinOff/SpinOffDate.vue

@ -14,7 +14,6 @@
</template> </template>
<template slot="position" slot-scope="text, record"> <template slot="position" slot-scope="text, record">
<span v-if=" record.position === 0">功能食品协同创新中心</span> <span v-if=" record.position === 0">功能食品协同创新中心</span>
<span v-if=" record.position === 1">现代医药</span> <span v-if=" record.position === 1">现代医药</span>
<span v-if=" record.position === 2">生物医学工程</span> <span v-if=" record.position === 2">生物医学工程</span>
@ -25,11 +24,20 @@
<template slot="dealStatus" slot-scope="text, record"> <template slot="dealStatus" slot-scope="text, record">
<!-- <a-tag <!-- <a-tag
:color="record.dealStatus === 1 ? 'blue' : 'red'" :color="record.dealStatus === 1 ? 'blue' : 'red'"
>{{ record.dealStatus === 0 ? '未审核' : '不通过' }}</a-tag> --> >{{ record.dealStatus === 0 ? '未审核' : '不通过' }}</a-tag>-->
<a-tag :color="record.dealStatus === 1 ? 'blue' : 'red'" v-if=" record.dealStatus === 0">未审核</a-tag> <a-tag
<a-tag :color="record.dealStatus === 1 ? 'blue' : 'red'" v-if=" record.dealStatus === 1">通过</a-tag> :color="record.dealStatus === 1 ? 'blue' : 'red'"
<a-tag :color="record.dealStatus === 1 ? 'blue' : 'red'" v-if=" record.dealStatus === 2">未通过</a-tag> v-if=" record.dealStatus === 0"
>未审核</a-tag>
<a-tag
:color="record.dealStatus === 1 ? 'blue' : 'red'"
v-if=" record.dealStatus === 1"
>通过</a-tag>
<a-tag
:color="record.dealStatus === 1 ? 'blue' : 'red'"
v-if=" record.dealStatus === 2"
>未通过</a-tag>
</template> </template>
<!-- 说明图片 --> <!-- 说明图片 -->
@ -56,8 +64,8 @@
</template> </template>
<script> <script>
import SpinOffEdit from "components/SpinOff/SpinOffEdit.vue"; import SpinOffEdit from 'components/SpinOff/SpinOffEdit.vue';
import {getCreatingPlatformDelete} from "config/api" import { getCreatingPlatformDelete } from 'config/api';
const columns = [ const columns = [
{ {
@ -122,7 +130,7 @@ const columns = [
align: 'center', align: 'center',
dataIndex: 'dealStatus', dataIndex: 'dealStatus',
key: 'dealStatus', key: 'dealStatus',
scopedSlots: { customRender: 'dealStatus' }, scopedSlots: { customRender: 'dealStatus' },
}, },
{ {
title: '编辑', title: '编辑',
@ -135,26 +143,26 @@ const columns = [
const lists = [ const lists = [
{ {
id:'001', id: '001',
logo:'assets/logo.png', logo: 'assets/logo.png',
companyName:'传控科技', companyName: '传控科技',
englishName:'ckkj', englishName: 'ckkj',
}, },
{ {
id:'002', id: '002',
logo:'assets/logo.png', logo: 'assets/logo.png',
companyName:'中绿环保', companyName: '中绿环保',
englishName:'zlhb', englishName: 'zlhb',
} },
]; ];
export default { export default {
name: "SpinOffDate", name: 'SpinOffDate',
components: { components: {
SpinOffEdit, SpinOffEdit,
}, },
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } }, props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() { data() {
this.cacheData = lists.map(item => ({ ...item })); this.cacheData = lists.map(item => ({ ...item }));
@ -164,7 +172,7 @@ export default {
height: '', height: '',
editVisible: false, editVisible: false,
imgVisible: false, imgVisible: false,
} };
}, },
mounted() { mounted() {
@ -172,11 +180,11 @@ export default {
}, },
methods: { methods: {
showEditModal(){ showEditModal() {
this.editVisible = true; this.editVisible = true;
}, },
closeModal(){ closeModal() {
this.editVisible = false; this.editVisible = false;
}, },
@ -205,7 +213,7 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.main .img { .main .img {
width: 100%; height: 65px;
} }
.main .big_img { .main .big_img {

23
src/components/Transfer/TransferDate.vue

@ -26,7 +26,7 @@
<!-- 图片 --> <!-- 图片 -->
<template slot="visitLocation" slot-scope="text, record"> <template slot="visitLocation" slot-scope="text, record">
<img :src="record.visitLocation" width="50" height="50"> <img :src="record.visitLocation" height="50" width="50" />
</template> </template>
<template slot="edit" slot-scope="text, record"> <template slot="edit" slot-scope="text, record">
@ -54,7 +54,7 @@
<div class="ml-3">软件著作权名称{{ record.patentStatus }}</div> <div class="ml-3">软件著作权名称{{ record.patentStatus }}</div>
<div class="ml-3">成果关键性能指标简介{{ record.researchForm }}</div> <div class="ml-3">成果关键性能指标简介{{ record.researchForm }}</div>
</div> </div>
</div> --> </div>-->
</a-table> </a-table>
</div> </div>
<a-empty v-else /> <a-empty v-else />
@ -65,7 +65,7 @@
</template> </template>
<script> <script>
import TransferEdit from "components/Transfer/TransferEdit.vue"; import TransferEdit from 'components/Transfer/TransferEdit.vue';
import { selInstrumentDelete } from 'config/api'; import { selInstrumentDelete } from 'config/api';
const columns = [ const columns = [
@ -118,9 +118,8 @@ const columns = [
}, },
]; ];
export default { export default {
name: "TransferDate", name: 'TransferDate',
components: { components: {
TransferEdit, TransferEdit,
}, },
@ -135,7 +134,7 @@ export default {
height: '', height: '',
editVisible: false, editVisible: false,
imgVisible: false, imgVisible: false,
} };
}, },
mounted() { mounted() {
@ -151,23 +150,23 @@ export default {
}, },
methods: { methods: {
showEditModal(){ showEditModal() {
this.editVisible = true; this.editVisible = true;
}, },
async closeModal(){ async closeModal() {
this.editVisible = false; this.editVisible = false;
await this.$emit('selInstrumentSearch'); await this.$emit('selInstrumentSearch');
}, },
// //
openTeamMember(){ openTeamMember() {
const { query } = this.$route; const { query } = this.$route;
this.$router.push({ path: '/RD-team-member', query }); this.$router.push({ path: '/RD-team-member', query });
}, },
// //
openCategoryManage(){ openCategoryManage() {
const { query } = this.$route; const { query } = this.$route;
this.$router.push({ path: '/category-manage', query }); this.$router.push({ path: '/category-manage', query });
}, },
@ -197,7 +196,7 @@ export default {
<style lang="stylus" scoped> <style lang="stylus" scoped>
.main .img { .main .img {
width: 100%; height: 65px;
} }
.main .big_img { .main .big_img {

48
src/components/innovativeService/innovativeServiceDate.vue

@ -15,7 +15,7 @@
</template> </template>
<template slot="picUrl" slot-scope="text, record"> <template slot="picUrl" slot-scope="text, record">
<img :src="record.picUrl" width="50" height="50"> <img :src="record.picUrl" height="50" width="50" />
</template> </template>
<template slot="serviceType" slot-scope="text, record"> <template slot="serviceType" slot-scope="text, record">
@ -35,12 +35,12 @@
<a-empty v-else /> <a-empty v-else />
<!-- 编辑 --> <!-- 编辑 -->
<r-d-member-edit :editVisible="editVisible" @closeModal="closeModal" /> <r-d-member-edit :edit-visible="editVisible" @closeModal="closeModal" />
</div> </div>
</template> </template>
<script> <script>
import RDMemberEdit from "components/innovativeService/innovativeServiceEdit.vue"; import RDMemberEdit from 'components/innovativeService/innovativeServiceEdit.vue';
const columns = [ const columns = [
{ {
@ -68,7 +68,7 @@ const columns = [
align: 'center', align: 'center',
dataIndex: 'picUrl', dataIndex: 'picUrl',
key: 'picUrl', key: 'picUrl',
    scopedSlots: { customRender: 'picUrl' }, scopedSlots: { customRender: 'picUrl' },
}, },
{ {
title: '服务状态', title: '服务状态',
@ -83,7 +83,7 @@ const columns = [
key: 'serviceType', key: 'serviceType',
scopedSlots: { customRender: 'serviceType' }, scopedSlots: { customRender: 'serviceType' },
}, },
// { // {
// title: '/', // title: '/',
// align: 'center', // align: 'center',
@ -107,35 +107,9 @@ const columns = [
}, },
]; ];
// const columns = [
// {
// id:'001',
// name:'',
// sex: '',
// supportUnit:'',
// birth:'1990-01-01',
// education: '',
// jobTitle: '',
// researchDirection: '',
// },
// {
// id:'002',
// name:'',
// sex: '',
// supportUnit:'绿',
// birth:'1995-01-01',
// education: '',
// jobTitle: '',
// researchDirection: '',
// }
// ];
export default { export default {
name: "innovativeServiceDate", name: 'InnovativeServiceDate',
components: { components: { RDMemberEdit },
RDMemberEdit,
},
// props: { lists: { type: Array, default: () => {} } },
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } }, props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() { data() {
@ -144,8 +118,8 @@ export default {
loading: false, loading: false,
editingKey: '', editingKey: '',
height: '', height: '',
editVisible: false editVisible: false,
} };
}, },
mounted() { mounted() {
@ -161,11 +135,11 @@ export default {
}, },
methods: { methods: {
showEditModal(){ showEditModal() {
this.editVisible = true; this.editVisible = true;
}, },
closeModal(){ closeModal() {
this.editVisible = false; this.editVisible = false;
}, },

48
src/components/innovativeService/innovativeServiceSearch.vue

@ -2,19 +2,12 @@
<div class="d-flex flex-wrap pb-3"> <div class="d-flex flex-wrap pb-3">
<!-- 团队名称 --> <!-- 团队名称 -->
<div> <div>
<a-input <a-input placeholder="服务名称" style="width: 150px" v-model="name" />服务类型:
placeholder="服务名称"
style="width: 150px"
v-model="name"
/>
服务类型:
<a-select <a-select
@change="handleChangeSelect('serviceType',$event)" @change="handleChangeSelect('serviceType',$event)"
allow-clear
class="ml-3" class="ml-3"
style="width: 150px" style="width: 150px"
allow-clear
> >
<a-select-option <a-select-option
:key="serviceType.id" :key="serviceType.id"
@ -22,7 +15,7 @@
v-for="serviceType in serviceTypes" v-for="serviceType in serviceTypes"
>{{ serviceType.value }}</a-select-option> >{{ serviceType.value }}</a-select-option>
</a-select> </a-select>
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button> <a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
</div> </div>
@ -36,37 +29,35 @@
</template> </template>
<script> <script>
import RDMemberAdd from "components/innovativeService/innovativeServiceAdd.vue"; import RDMemberAdd from 'components/innovativeService/innovativeServiceAdd.vue';
export default { export default {
name: "innovativeServiceSearch", name: 'InnovativeServiceSearch',
components: { components: { RDMemberAdd },
RDMemberAdd,
},
data() { data() {
return { return {
visible: false, visible: false,
name: '', name: '',
serviceTypes: [ serviceTypes: [
{ id:1, value:'创新平台' }, { id: 1, value: '创新平台' },
{ id:2, value:'孵化平台' }, { id: 2, value: '孵化平台' },
{ id:3, value:'产业平台' }, { id: 3, value: '产业平台' },
], ],
} };
}, },
methods: { methods: {
showModal(){ showModal() {
this.visible = true; this.visible = true;
}, },
closeModal(){ closeModal() {
this.visible = false; this.visible = false;
}, },
handleChangeSelect(type, value) { handleChangeSelect(type, value) {
this[type] = value; this[type] = value;
}, },
handleChangeName(value) { handleChangeName(value) {
console.log('value: ', value); console.log('value: ', value);
this.name = value; this.name = value;
@ -74,13 +65,14 @@ export default {
async handleTableChange() { async handleTableChange() {
console.log('搜索'); console.log('搜索');
const { name,serviceType} = this; const { name, serviceType } = this;
console.log(name,serviceType) console.log(name, serviceType);
// //
const condition = { const condition = {
name,serviceType name,
} serviceType,
await this.$emit('getInnovativeServiceSearch',condition) };
await this.$emit('getInnovativeServiceSearch', condition);
this.activityType = []; this.activityType = [];
}, },
}, },

20
src/config/api.js

@ -11,9 +11,6 @@ const policy = `${proxyUrl}/policy`; // 创新政策接口
const researchTeam = `${greenvalley}/researchTeam`; // 创新平台相关操作 const researchTeam = `${greenvalley}/researchTeam`; // 创新平台相关操作
const page = `${greenvalley}/page`; // 页面管理相关操作 const page = `${greenvalley}/page`; // 页面管理相关操作
const carousel = `${greenvalley}/carousel`; // 轮播图相关接口 const carousel = `${greenvalley}/carousel`; // 轮播图相关接口
// 上传附件
export const upload = `${greenvalley}/file/upload`;
const industryInfo = `${greenvalley}/industryInfo`; // 行业资讯相关操作 const industryInfo = `${greenvalley}/industryInfo`; // 行业资讯相关操作
const activity = `${greenvalley}/activity`; // 活动公告相关操作 const activity = `${greenvalley}/activity`; // 活动公告相关操作
const creatingPlatform = `${greenvalley}/creatingPlatform`; // 合作意向相关操作 const creatingPlatform = `${greenvalley}/creatingPlatform`; // 合作意向相关操作
@ -22,6 +19,8 @@ const institute = `${greenvalley}/institute`; // 实验室(研究院)相关操
const achInstr = `${greenvalley}/achInstr`; // 创新部类型相关操作 const achInstr = `${greenvalley}/achInstr`; // 创新部类型相关操作
const comment = `${greenvalley}/comment`; // 交流社区相关操作 const comment = `${greenvalley}/comment`; // 交流社区相关操作
const place = `${greenvalley}/place`; // 孵化部入驻实体申请相关操作 const place = `${greenvalley}/place`; // 孵化部入驻实体申请相关操作
const business = `${greenvalley}/business`; // 交流社区相关操作
export const upload = `${greenvalley}/file/upload`;
// websocket基础地址 // websocket基础地址
export const WS_BASE_URL = msgUrl; export const WS_BASE_URL = msgUrl;
@ -95,6 +94,21 @@ export const upTopping = params => axios.post(`${comment}/upTopping`, params);
// 跟帖查询 // 跟帖查询
export const selCommunityH = params => axios.post(`${comment}/selCommunityH`, params); export const selCommunityH = params => axios.post(`${comment}/selCommunityH`, params);
// 修改跟贴表中得数据
export const upComment = params => axios.post(`${comment}/upComment`, params);
// 后台查询合作伙伴和衍生企业
export const backendSearch = params => axios.post(`${business}/backendSearch`, params);
// 后台增加合作伙伴和衍生企业
export const backendAdd = params => axios.post(`${business}/backendAdd`, params);
// 后台删除合作伙伴和衍生企业
export const backendDelete = params => axios.post(`${business}/backendDelete`, params);
// 后台修改合作伙伴或者衍生企业
export const backendUpdate = params => axios.post(`${business}/backendUpdate`, params);
// 合作意向列表查询 // 合作意向列表查询
export const getCreatingPlatformSearch = params => axios.post(`${creatingPlatform}/search`, params); export const getCreatingPlatformSearch = params => axios.post(`${creatingPlatform}/search`, params);

2
src/plugins/ant-design-vue.js

@ -24,6 +24,7 @@ import {
Spin, Spin,
Tooltip, Tooltip,
Popover, Popover,
Avatar,
} from 'ant-design-vue'; } from 'ant-design-vue';
import { ConfigProvider } from 'ant-design-vue'; import { ConfigProvider } from 'ant-design-vue';
Vue.component(ConfigProvider.name, ConfigProvider); Vue.component(ConfigProvider.name, ConfigProvider);
@ -49,6 +50,7 @@ Vue.use(Checkbox);
Vue.use(Spin); Vue.use(Spin);
Vue.use(Tooltip); Vue.use(Tooltip);
Vue.use(Popover); Vue.use(Popover);
Vue.use(Avatar);
Vue.prototype.$message = message; Vue.prototype.$message = message;
Vue.prototype.$notification = notification; Vue.prototype.$notification = notification;

20
src/router/index.js

@ -79,9 +79,10 @@ const routes = [
}, },
// 衍生企业 // 衍生企业
{ {
path: '/derivative-enterprise', path: '/about-us-derivative-enterprise',
name: 'DerivativeEnterprise', name: 'AboutUsDerivativeEnterprise',
component: () => import(/* webpackChunkName: "derivative-enterprise" */ 'views/DerivativeEnterprise/DerivativeEnterprise.vue'), component: () =>
import(/* webpackChunkName: "about-us-derivative-enterprise" */ 'views/CooperativePartner/AboutUsDerivativeEnterprise.vue'),
}, },
// -------创新部 // -------创新部
// 合作意向 // 合作意向
@ -151,6 +152,12 @@ const routes = [
name: 'HatchingDemandFilling', name: 'HatchingDemandFilling',
component: () => import(/* webpackChunkName: "hatching-demand-filling" */ 'views/HatchingDemandFilling/HatchingDemandFilling.vue'), component: () => import(/* webpackChunkName: "hatching-demand-filling" */ 'views/HatchingDemandFilling/HatchingDemandFilling.vue'),
}, },
// 合作伙伴
{
path: '/hatch-cooperative-partner',
name: 'HatchCooperativePartner',
component: () => import(/* webpackChunkName: "hatch-cooperative-partner" */ 'views/CooperativePartner/HatchCooperativePartner.vue'),
},
// -------产业部 // -------产业部
// 服务 // 服务
{ {
@ -160,9 +167,10 @@ const routes = [
}, },
// 衍生企业 // 衍生企业
{ {
path: '/derivative-enterprise', path: '/industry-derivative-enterprise',
name: 'DerivativeEnterprise', name: 'IndustryDerivativeEnterprise',
component: () => import(/* webpackChunkName: "derivative-enterprise" */ 'views/DerivativeEnterprise/DerivativeEnterprise.vue'), component: () =>
import(/* webpackChunkName: "industry-derivative-enterprise" */ 'views/CooperativePartner/IndustryDerivativeEnterprise.vue'),
}, },
// 需求填报 // 需求填报
{ {

26
src/store/mutations.js

@ -21,30 +21,12 @@ const mutations = {
}, },
/** /**
* 设置研发团队列表信息 * 设置合作伙伴和衍生企业查询条件
* @param {object} state * @param {object} state
* @param {object} RDTeamLists {id, account, phone} * @param {object} partnerOptions
*/ */
setRDTeamLists(state, RDTeamLists) { setPartnerOptions(state, partnerOptions) {
state.RDTeamLists = RDTeamLists; state.partnerOptions = partnerOptions;
},
/**
* 设置页面管理列表信息
* @param {object} state
* @param {object} pageLists
*/
setPageLists(state, pageLists) {
state.pageLists = pageLists;
},
/**
* 添加页面管理列表信息
* @param {object} state
* @param {object} item
*/
setAddPageLists(state, item) {
state.pageLists.push(item);
}, },
}; };

4
src/store/state.js

@ -1,9 +1,7 @@
const state = { const state = {
anyringToken: '', anyringToken: '',
user: { id: '', phone: '', account: '' }, user: { id: '', phone: '', account: '' },
partnerOptions: null, // 合作伙伴和衍生企业查询条件
RDTeamLists: [], // 研发团队列表
pageLists: [], // 页面管理列表
titles: [ titles: [
{ {
value: '关于我们', value: '关于我们',

82
src/views/CooperativePartner/AboutUsDerivativeEnterprise.vue

@ -0,0 +1,82 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<partner-search @getBackendSearch="getBackendSearch" />
<partner-date :lists="lists" :pagination="pagination" @getBackendSearch="getBackendSearch" />
</div>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
import PartnerSearch from 'components/Partner/PartnerSearch.vue';
import PartnerDate from 'components/Partner/PartnerDate.vue';
import { backendSearch } from 'config/api';
export default {
name: 'AboutUsDerivativeEnterprise',
components: {
PartnerSearch,
PartnerDate,
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
computed: mapState(['partnerOptions']),
async created() {
const options = { type: 2, typeOfPlatform: 2 };
this.setPartnerOptions(options);
await this.getBackendSearch();
},
methods: {
...mapMutations(['setPartnerOptions']),
/**
* 后台查询合作伙伴和衍生企业
* @param { String } name 公司名
* @param { Number } type 1-合作伙伴 2-衍生企业
* @param { Number } typeOfPlatform 1-创新平台 2-关于我们 3-孵化平台
* @param { Number } typeOfTech 0-高校 1-院所 2-企业
*/
async getBackendSearch(condition) {
try {
const params = {
param: {
type: this.partnerOptions.type,
typeOfPlatform: this.partnerOptions.typeOfPlatform,
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if (condition) {
if (condition.name) {
params.param.name = condition.name;
}
if (condition.typeOfTech !== '') {
params.param.typeOfTech = condition.typeOfTech;
}
}
const res = await backendSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.lists = data.list;
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>

55
src/views/CooperativePartner/CooperativePartner.vue

@ -1,20 +1,21 @@
<template> <template>
<div class="pa-3 white fill-height d-flex flex-column"> <div class="pa-3 white fill-height d-flex flex-column">
<activity-search @getBackendSearch="getBackendSearch" /> <partner-search @getBackendSearch="getBackendSearch" />
<activity-date :lists="lists" :pagination="pagination" @getBackendSearch="getBackendSearch" /> <partner-date :lists="lists" :pagination="pagination" @getBackendSearch="getBackendSearch" />
</div> </div>
</template> </template>
<script> <script>
import ActivitySearch from 'components/IndustryInfo/ActivitySearch.vue'; import { mapState, mapMutations } from 'vuex';
import ActivityDate from 'components/IndustryInfo/ActivityDate.vue'; import PartnerSearch from 'components/Partner/PartnerSearch.vue';
import { getBackendSearch } from 'config/api'; import PartnerDate from 'components/Partner/PartnerDate.vue';
import { backendSearch } from 'config/api';
export default { export default {
name: 'ActivityBulletin', name: 'CooperativePartner',
components: { components: {
ActivitySearch, PartnerSearch,
ActivityDate, PartnerDate,
}, },
data() { data() {
@ -24,41 +25,43 @@ export default {
}; };
}, },
created() { computed: mapState(['partnerOptions']),
this.getBackendSearch();
async created() {
const options = { type: 1, typeOfPlatform: 2 };
this.setPartnerOptions(options);
await this.getBackendSearch();
}, },
methods: { methods: {
...mapMutations(['setPartnerOptions']),
/** /**
* 根据团队id查看研发团队相关信息 * 后台查询合作伙伴和衍生企业
* @param { String } competeTimeId 第几届信息的id * @param { String } name 公司名
* @param { Number } type 1-合作伙伴 2-衍生企业
* @param { Number } typeOfPlatform 1-创新平台 2-关于我们 3-孵化平台
* @param { Number } typeOfTech 0-高校 1-院所 2-企业
*/ */
async getBackendSearch(condition) { async getBackendSearch(condition) {
try { try {
const params = { const params = {
param: { param: {
type: this.partnerOptions.type,
typeOfPlatform: this.partnerOptions.typeOfPlatform,
pageNum: (condition && condition.current) || 1, pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10, pageSize: (condition && condition.pageSize) || 10,
}, },
}; };
if (condition) { if (condition) {
if (condition.title) { if (condition.name) {
params.param.title = condition.title; params.param.name = condition.name;
}
if (condition.spreadDepartment) {
params.param.spreadDepartment = condition.spreadDepartment;
}
if (condition.startTime) {
params.param.startTime = condition.startTime;
}
if (condition.endTime) {
params.param.endTime = condition.endTime;
} }
if (condition.site) { if (condition.typeOfTech !== '') {
params.param.site = condition.site; params.param.typeOfTech = condition.typeOfTech;
} }
} }
const res = await getBackendSearch(params); const res = await backendSearch(params);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
if (code === 200) { if (code === 200) {
this.lists = data.list; this.lists = data.list;

82
src/views/CooperativePartner/HatchCooperativePartner.vue

@ -0,0 +1,82 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<partner-search @getBackendSearch="getBackendSearch" />
<partner-date :lists="lists" :pagination="pagination" @getBackendSearch="getBackendSearch" />
</div>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
import PartnerSearch from 'components/Partner/PartnerSearch.vue';
import PartnerDate from 'components/Partner/PartnerDate.vue';
import { backendSearch } from 'config/api';
export default {
name: 'HatchCooperativePartner',
components: {
PartnerSearch,
PartnerDate,
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
computed: mapState(['partnerOptions']),
async created() {
const options = { type: 1, typeOfPlatform: 3 };
this.setPartnerOptions(options);
await this.getBackendSearch();
},
methods: {
...mapMutations(['setPartnerOptions']),
/**
* 后台查询合作伙伴和衍生企业
* @param { String } name 公司名
* @param { Number } type 1-合作伙伴 2-衍生企业
* @param { Number } typeOfPlatform 1-创新平台 2-关于我们 3-孵化平台
* @param { Number } typeOfTech 0-高校 1-院所 2-企业
*/
async getBackendSearch(condition) {
try {
const params = {
param: {
type: this.partnerOptions.type,
typeOfPlatform: this.partnerOptions.typeOfPlatform,
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if (condition) {
if (condition.name) {
params.param.name = condition.name;
}
if (condition.typeOfTech !== '') {
params.param.typeOfTech = condition.typeOfTech;
}
}
const res = await backendSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.lists = data.list;
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>

82
src/views/CooperativePartner/IndustryDerivativeEnterprise.vue

@ -0,0 +1,82 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<partner-search @getBackendSearch="getBackendSearch" />
<partner-date :lists="lists" :pagination="pagination" @getBackendSearch="getBackendSearch" />
</div>
</template>
<script>
import { mapState, mapMutations } from 'vuex';
import PartnerSearch from 'components/Partner/PartnerSearch.vue';
import PartnerDate from 'components/Partner/PartnerDate.vue';
import { backendSearch } from 'config/api';
export default {
name: 'IndustryDerivativeEnterprise',
components: {
PartnerSearch,
PartnerDate,
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
computed: mapState(['partnerOptions']),
async created() {
const options = { type: 2, typeOfPlatform: 1 };
this.setPartnerOptions(options);
await this.getBackendSearch();
},
methods: {
...mapMutations(['setPartnerOptions']),
/**
* 后台查询合作伙伴和衍生企业
* @param { String } name 公司名
* @param { Number } type 1-合作伙伴 2-衍生企业
* @param { Number } typeOfPlatform 1-创新平台 2-关于我们 3-孵化平台
* @param { Number } typeOfTech 0-高校 1-院所 2-企业
*/
async getBackendSearch(condition) {
try {
const params = {
param: {
type: this.partnerOptions.type,
typeOfPlatform: this.partnerOptions.typeOfPlatform,
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if (condition) {
if (condition.name) {
params.param.name = condition.name;
}
if (condition.typeOfTech !== '') {
params.param.typeOfTech = condition.typeOfTech;
}
}
const res = await backendSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.lists = data.list;
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>

20
src/views/DerivativeEnterprise/DerivativeEnterprise.vue

@ -1,20 +0,0 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<sign-up-search />
<sign-up-date />
</div>
</template>
<script>
// @ is an alias to /src
import SignUpSearch from "components/SignUp/SignUpSearch.vue";
import SignUpDate from "components/SignUp/SignUpDate.vue";
export default {
name: "SignUp",
components: {
SignUpSearch,
SignUpDate,
}
};
</script>
Loading…
Cancel
Save