Browse Source

合作伙伴+衍生企业

master
lucky 4 years ago
parent
commit
9126dda3f3
  1. 72
      src/components/Banner/BannerAdd.vue
  2. 6
      src/components/BtnCom/BtnCon.vue
  3. 1
      src/components/Development/DevelopmentDate.vue
  4. 193
      src/components/Partner/PartnerAdd.vue
  5. 204
      src/components/Partner/PartnerDate.vue
  6. 197
      src/components/Partner/PartnerEdit.vue
  7. 78
      src/components/Partner/PartnerSearch.vue
  8. 17
      src/config/api.js
  9. 20
      src/router/index.js
  10. 26
      src/store/mutations.js
  11. 4
      src/store/state.js
  12. 82
      src/views/CooperativePartner/AboutUsDerivativeEnterprise.vue
  13. 55
      src/views/CooperativePartner/CooperativePartner.vue
  14. 82
      src/views/CooperativePartner/HatchCooperativePartner.vue
  15. 82
      src/views/CooperativePartner/IndustryDerivativeEnterprise.vue
  16. 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-form :form="form" @submit="handleSubmit">
<!-- 跳转类型 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="跳转类型">
<a-select @change="getUse($event, 'jumpType')" class="ml-3" default-value="正常" style="width: 150px">
<a-form-item
: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>
</a-form-item>
<!-- 跳转路径 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="图片跳转路径">
<a-input placeholder="图片跳转路径" class="ml-3" />
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片跳转路径"
>
<a-input class="ml-3" placeholder="图片跳转路径" />
</a-form-item>
<!-- 状态 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="状态">
<a-select @change="getUse($event, 'recStatus')" class="ml-3" default-value="启用" style="width: 150px">
<a-form-item
: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>
</a-form-item>
<!-- 页面显示位置 -->
<a-form-item :label-col="formItemLayout.labelCol" :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-form-item
:label-col="formItemLayout.labelCol"
: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-form-item>
<!-- 图片 -->
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="图片">
<a-upload :before-upload="beforeUpload" class="ml-3" :action="upload" list-type="picture" name="files" @change="handleChange">
<a-button v-show="fileList.length - 0 === 0"> <a-icon type="upload" /> 选择图片 </a-button>
<a-form-item
:label-col="formItemLayout.labelCol"
: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-form-item>
<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('/talent-recruitment')" 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 @click="jump('/cooperation-intention')" class="btn">合作意向</div>
@ -26,11 +26,11 @@
<div @click="jump('/virtual-application')" class="btn">入驻虚拟申请</div>
<div @click="jump('/incubation-services')" 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 @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>
</template>

1
src/components/Development/DevelopmentDate.vue

@ -132,7 +132,6 @@ export default {
this.$emit('selResSearch');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== teamId);
// TODO:
} else {
throw msg;
}

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>

17
src/config/api.js

@ -11,9 +11,6 @@ const policy = `${proxyUrl}/policy`; // 创新政策接口
const researchTeam = `${greenvalley}/researchTeam`; // 创新平台相关操作
const page = `${greenvalley}/page`; // 页面管理相关操作
const carousel = `${greenvalley}/carousel`; // 轮播图相关接口
// 上传附件
export const upload = `${greenvalley}/file/upload`;
const industryInfo = `${greenvalley}/industryInfo`; // 行业资讯相关操作
const activity = `${greenvalley}/activity`; // 活动公告相关操作
const creatingPlatform = `${greenvalley}/creatingPlatform`; // 合作意向相关操作
@ -21,6 +18,8 @@ const serviceProject = `${greenvalley}/serviceProject`; // 创新部服务相关
const institute = `${greenvalley}/institute`; // 实验室(研究院)相关操作
const achInstr = `${greenvalley}/achInstr`; // 创新部类型相关操作
const comment = `${greenvalley}/comment`; // 交流社区相关操作
const business = `${greenvalley}/business`; // 交流社区相关操作
export const upload = `${greenvalley}/file/upload`;
// websocket基础地址
export const WS_BASE_URL = msgUrl;
@ -97,6 +96,18 @@ export const selCommunityH = params => axios.post(`${comment}/selCommunityH`, pa
// 修改跟贴表中得数据
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);

20
src/router/index.js

@ -79,9 +79,10 @@ const routes = [
},
// 衍生企业
{
path: '/derivative-enterprise',
name: 'DerivativeEnterprise',
component: () => import(/* webpackChunkName: "derivative-enterprise" */ 'views/DerivativeEnterprise/DerivativeEnterprise.vue'),
path: '/about-us-derivative-enterprise',
name: 'AboutUsDerivativeEnterprise',
component: () =>
import(/* webpackChunkName: "about-us-derivative-enterprise" */ 'views/CooperativePartner/AboutUsDerivativeEnterprise.vue'),
},
// -------创新部
// 合作意向
@ -151,6 +152,12 @@ const routes = [
name: 'HatchingDemandFilling',
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',
name: 'DerivativeEnterprise',
component: () => import(/* webpackChunkName: "derivative-enterprise" */ 'views/DerivativeEnterprise/DerivativeEnterprise.vue'),
path: '/industry-derivative-enterprise',
name: 'IndustryDerivativeEnterprise',
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} RDTeamLists {id, account, phone}
* @param {object} partnerOptions
*/
setRDTeamLists(state, RDTeamLists) {
state.RDTeamLists = RDTeamLists;
},
/**
* 设置页面管理列表信息
* @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);
setPartnerOptions(state, partnerOptions) {
state.partnerOptions = partnerOptions;
},
};

4
src/store/state.js

@ -1,9 +1,7 @@
const state = {
anyringToken: '',
user: { id: '', phone: '', account: '' },
RDTeamLists: [], // 研发团队列表
pageLists: [], // 页面管理列表
partnerOptions: null, // 合作伙伴和衍生企业查询条件
titles: [
{
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>
<div class="pa-3 white fill-height d-flex flex-column">
<activity-search @getBackendSearch="getBackendSearch" />
<activity-date :lists="lists" :pagination="pagination" @getBackendSearch="getBackendSearch" />
<partner-search @getBackendSearch="getBackendSearch" />
<partner-date :lists="lists" :pagination="pagination" @getBackendSearch="getBackendSearch" />
</div>
</template>
<script>
import ActivitySearch from 'components/IndustryInfo/ActivitySearch.vue';
import ActivityDate from 'components/IndustryInfo/ActivityDate.vue';
import { getBackendSearch } from 'config/api';
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: 'ActivityBulletin',
name: 'CooperativePartner',
components: {
ActivitySearch,
ActivityDate,
PartnerSearch,
PartnerDate,
},
data() {
@ -24,41 +25,43 @@ export default {
};
},
created() {
this.getBackendSearch();
computed: mapState(['partnerOptions']),
async created() {
const options = { type: 1, typeOfPlatform: 2 };
this.setPartnerOptions(options);
await this.getBackendSearch();
},
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) {
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.title) {
params.param.title = condition.title;
}
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.name) {
params.param.name = condition.name;
}
if (condition.site) {
params.param.site = condition.site;
if (condition.typeOfTech !== '') {
params.param.typeOfTech = condition.typeOfTech;
}
}
const res = await getBackendSearch(params);
const res = await backendSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
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