72 changed files with 4466 additions and 18037 deletions
File diff suppressed because it is too large
@ -0,0 +1,181 @@ |
|||
<template> |
|||
<div class="main flex-1"> |
|||
<a-spin :spinning="spinning"> |
|||
<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> |
|||
|
|||
<!-- 用户头像 --> |
|||
<template slot="avatarUrl" slot-scope="text, record"> |
|||
<a-avatar :size="50" :src="record.avatarUrl" v-if="record.avatarUrl" /> |
|||
</template> |
|||
|
|||
<!-- 审核状态 --> |
|||
<template slot="comStatus" slot-scope="text, record"> |
|||
<a-tag |
|||
:color="record.comStatus === 0 ? 'green' : 'red'" |
|||
>{{ record.comStatus === 0 ? '正常' : '禁用' }}</a-tag> |
|||
</template> |
|||
|
|||
<template slot="examine" slot-scope="text, record"> |
|||
<a-button |
|||
@click="handleUpTopping({id:record.id,comStatus:0})" |
|||
size="small" |
|||
type="primary" |
|||
v-if="record.comStatus != 0" |
|||
>正常</a-button> |
|||
<a-button |
|||
@click="handleUpTopping({id:record.id,comStatus:1})" |
|||
size="small" |
|||
type="danger" |
|||
v-else |
|||
>禁用</a-button> |
|||
</template> |
|||
|
|||
<div |
|||
class="d-flex flex-column" |
|||
slot="expandedRowRender" |
|||
slot-scope="record" |
|||
style="margin: 0" |
|||
> |
|||
<div> |
|||
<span class="font-bold-14">帖子内容:</span> |
|||
<span v-dompurify-html="record.content" v-if="record.content"></span> |
|||
<span v-else>暂无内容</span> |
|||
</div> |
|||
</div> |
|||
</a-table> |
|||
</div> |
|||
<a-empty v-else /> |
|||
</a-spin> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { upComment } from 'config/api'; |
|||
|
|||
const columns = [ |
|||
{ |
|||
title: '序号', |
|||
align: 'center', |
|||
dataIndex: 'id', |
|||
key: 'id', |
|||
width: '7%', |
|||
scopedSlots: { customRender: 'id' }, |
|||
}, |
|||
{ |
|||
title: '跟帖人', |
|||
align: 'center', |
|||
dataIndex: 'userName', |
|||
key: 'userName', |
|||
}, |
|||
{ |
|||
title: '用户头像', |
|||
align: 'center', |
|||
dataIndex: 'avatarUrl', |
|||
key: 'avatarUrl', |
|||
scopedSlots: { customRender: 'avatarUrl' }, |
|||
}, |
|||
{ |
|||
title: '跟帖时间', |
|||
align: 'center', |
|||
dataIndex: 'creatTime', |
|||
key: 'creatTime', |
|||
}, |
|||
{ |
|||
title: '跟帖状态', |
|||
align: 'center', |
|||
dataIndex: 'comStatus', |
|||
key: 'comStatus', |
|||
scopedSlots: { customRender: 'comStatus' }, |
|||
}, |
|||
{ |
|||
title: '审核', |
|||
align: 'center', |
|||
dataIndex: 'examine', |
|||
key: 'examine', |
|||
scopedSlots: { customRender: 'examine' }, |
|||
}, |
|||
]; |
|||
|
|||
export default { |
|||
name: 'CommunityDate', |
|||
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } }, |
|||
data() { |
|||
return { |
|||
columns, |
|||
loading: false, |
|||
height: '', |
|||
spinning: false, |
|||
}; |
|||
}, |
|||
|
|||
mounted() { |
|||
let th = 250; |
|||
let wh = window.innerHeight; |
|||
this.height = wh - th; |
|||
window.onresize = () => { |
|||
return (() => { |
|||
wh = window.innerHeight; |
|||
this.height = wh - th; |
|||
})(); |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
// 换页 |
|||
handleTableChange(pagination) { |
|||
const { current, pageSize } = pagination; |
|||
const condition = { current, pageSize }; |
|||
this.$emit('getSelectTeam', condition); |
|||
}, |
|||
|
|||
// 置顶/审核 |
|||
async handleUpTopping(options) { |
|||
try { |
|||
this.spinning = true; |
|||
const params = { param: { id: options.id } }; |
|||
if (options) { |
|||
if (options.comStatus !== null) { |
|||
params.param.comStatus = +options.comStatus; |
|||
} |
|||
} |
|||
const res = await upComment(params); |
|||
const { data, msg, code } = res.data; |
|||
this.spinning = false; |
|||
if (code === 200) { |
|||
this.$message.success('修改成功'); |
|||
this.$emit('getSelectTeam'); |
|||
} else { |
|||
throw msg; |
|||
} |
|||
} catch (error) { |
|||
this.spinning = false; |
|||
this.$message.error(error || '修改失败'); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="stylus" scoped> |
|||
.main .img { |
|||
height: 65px; |
|||
} |
|||
|
|||
.main .big_img { |
|||
width: 200px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,52 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<div> |
|||
<!-- 帖子状态 --> |
|||
<a-select |
|||
@change="handleChangeSelect('comStatus',$event)" |
|||
placeholder="跟帖状态" |
|||
style="width: 150px" |
|||
> |
|||
<a-select-option |
|||
:key="index" |
|||
:value="state.id" |
|||
v-for="(state, index) in items" |
|||
>{{ state.value }}</a-select-option> |
|||
</a-select> |
|||
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'ForumSearch', |
|||
data() { |
|||
return { |
|||
items: [ |
|||
{ id: 0, value: '正常' }, |
|||
{ id: 1, value: '禁用' }, |
|||
], |
|||
category: '', |
|||
}; |
|||
}, |
|||
methods: { |
|||
handleChangeSelect(type, value) { |
|||
this[type] = value; |
|||
}, |
|||
|
|||
// 搜索 |
|||
async handleTableChange() { |
|||
const { comStatus } = this; |
|||
// 传参 |
|||
const condition = { |
|||
comStatus, |
|||
}; |
|||
await this.$emit('getSelectTeam', condition); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|||
<style scoped lang="stylus"></style> |
|||
@ -0,0 +1,255 @@ |
|||
<template> |
|||
<div class="main flex-1"> |
|||
<a-spin :spinning="spinning"> |
|||
<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> |
|||
|
|||
<!-- 标题图片 --> |
|||
<template slot="visitLocation" slot-scope="text, record"> |
|||
<img :src="record.visitLocation" class="img" /> |
|||
</template> |
|||
|
|||
<!-- 用户头像 --> |
|||
<template slot="avatarUrl" slot-scope="text, record"> |
|||
<a-avatar :size="50" :src="record.avatarUrl" v-if="record.avatarUrl" /> |
|||
</template> |
|||
|
|||
<!-- 审核状态 --> |
|||
<template slot="comStatus" slot-scope="text, record"> |
|||
<a-tag |
|||
:color="record.comStatus === 0 ? 'green' : 'red'" |
|||
>{{ record.comStatus === 0 ? '正常' : '禁用' }}</a-tag> |
|||
</template> |
|||
|
|||
<!-- 置顶 --> |
|||
<template slot="topping" slot-scope="text, record"> |
|||
<a-switch |
|||
:checked="text === 1" |
|||
@change="onChange($event,record.id)" |
|||
checked-children="是" |
|||
class="ml-4" |
|||
un-checked-children="否" |
|||
/> |
|||
</template> |
|||
|
|||
<template slot="examine" slot-scope="text, record"> |
|||
<a-button |
|||
@click="handleUpTopping({id:record.id,comStatus:0})" |
|||
size="small" |
|||
type="primary" |
|||
v-if="record.comStatus != 0" |
|||
>正常</a-button> |
|||
<a-button |
|||
@click="handleUpTopping({id:record.id,comStatus:1})" |
|||
size="small" |
|||
type="danger" |
|||
v-else |
|||
>禁用</a-button> |
|||
</template> |
|||
|
|||
<template slot="edit" slot-scope="text, record"> |
|||
<a-button @click="openComment(record.id)" size="small" type="primary">查看跟帖</a-button> |
|||
</template> |
|||
|
|||
<div |
|||
class="d-flex flex-column" |
|||
slot="expandedRowRender" |
|||
slot-scope="record" |
|||
style="margin: 0" |
|||
> |
|||
<div> |
|||
<span class="font-bold-14">帖子内容:</span> |
|||
<span v-dompurify-html="record.content" v-if="record.content"></span> |
|||
<span v-else>暂无内容</span> |
|||
</div> |
|||
</div> |
|||
</a-table> |
|||
</div> |
|||
<a-empty v-else /> |
|||
</a-spin> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { upTopping } from 'config/api'; |
|||
|
|||
const columns = [ |
|||
{ |
|||
title: '序号', |
|||
align: 'center', |
|||
dataIndex: 'id', |
|||
key: 'id', |
|||
width: '7%', |
|||
scopedSlots: { customRender: 'id' }, |
|||
}, |
|||
{ |
|||
title: '标题', |
|||
align: 'center', |
|||
dataIndex: 'title', |
|||
key: 'title', |
|||
}, |
|||
{ |
|||
title: '标题图片', |
|||
align: 'center', |
|||
dataIndex: 'visitLocation', |
|||
key: 'visitLocation', |
|||
scopedSlots: { customRender: 'visitLocation' }, |
|||
}, |
|||
{ |
|||
title: '发帖人', |
|||
align: 'center', |
|||
dataIndex: 'userName', |
|||
key: 'userName', |
|||
}, |
|||
{ |
|||
title: '用户头像', |
|||
align: 'center', |
|||
dataIndex: 'avatarUrl', |
|||
key: 'avatarUrl', |
|||
scopedSlots: { customRender: 'avatarUrl' }, |
|||
}, |
|||
{ |
|||
title: '发布时间', |
|||
align: 'center', |
|||
dataIndex: 'createdTime', |
|||
key: 'createdTime', |
|||
}, |
|||
{ |
|||
title: '评论数', |
|||
align: 'center', |
|||
dataIndex: 'commentNum', |
|||
key: 'commentNum', |
|||
}, |
|||
{ |
|||
title: '置顶', |
|||
align: 'center', |
|||
dataIndex: 'topping', |
|||
key: 'topping', |
|||
scopedSlots: { customRender: 'topping' }, |
|||
}, |
|||
{ |
|||
title: '审核状态', |
|||
align: 'center', |
|||
dataIndex: 'comStatus', |
|||
key: 'comStatus', |
|||
scopedSlots: { customRender: 'comStatus' }, |
|||
}, |
|||
{ |
|||
title: '审核', |
|||
align: 'center', |
|||
dataIndex: 'examine', |
|||
key: 'examine', |
|||
scopedSlots: { customRender: 'examine' }, |
|||
}, |
|||
{ |
|||
title: '跟帖', |
|||
align: 'center', |
|||
dataIndex: 'edit', |
|||
key: 'edit', |
|||
scopedSlots: { customRender: 'edit' }, |
|||
}, |
|||
]; |
|||
|
|||
export default { |
|||
name: 'CommunityDate', |
|||
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } }, |
|||
data() { |
|||
return { |
|||
columns, |
|||
loading: false, |
|||
height: '', |
|||
imgVisible: false, |
|||
spinning: false, |
|||
}; |
|||
}, |
|||
|
|||
mounted() { |
|||
let th = 250; |
|||
let wh = window.innerHeight; |
|||
this.height = wh - th; |
|||
window.onresize = () => { |
|||
return (() => { |
|||
wh = window.innerHeight; |
|||
this.height = wh - th; |
|||
})(); |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
onChange(checked, id) { |
|||
const index = this.lists.findIndex(item => item.id === id); |
|||
if (this.lists[index].topping === 1) { |
|||
const options = { id, topping: 0 }; |
|||
this.handleUpTopping(options); |
|||
} else { |
|||
const options = { id, topping: 1 }; |
|||
this.handleUpTopping(options); |
|||
} |
|||
}, |
|||
|
|||
// 换页 |
|||
handleTableChange(pagination) { |
|||
const { current, pageSize } = pagination; |
|||
const condition = { current, pageSize }; |
|||
this.$emit('getSelectTeam', condition); |
|||
}, |
|||
|
|||
// 置顶/审核 |
|||
async handleUpTopping(options) { |
|||
try { |
|||
this.spinning = true; |
|||
const params = { param: { id: options.id } }; |
|||
if (options) { |
|||
if (options.comStatus !== null) { |
|||
params.param.comStatus = +options.comStatus; |
|||
} |
|||
if (options.topping !== null) { |
|||
params.param.topping = +options.topping; |
|||
} |
|||
} |
|||
const res = await upTopping(params); |
|||
const { data, msg, code } = res.data; |
|||
this.spinning = false; |
|||
if (code === 200) { |
|||
this.$message.success('修改成功'); |
|||
this.$emit('getSelectTeam'); |
|||
} else { |
|||
throw msg; |
|||
} |
|||
} catch (error) { |
|||
this.spinning = false; |
|||
this.$message.error(error || '修改失败'); |
|||
} |
|||
}, |
|||
|
|||
// 跟帖 |
|||
openComment(id) { |
|||
const { query } = this.$route; |
|||
this.$router.push({ path: `/comment?id=${id}`, query }); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="stylus" scoped> |
|||
.main .img { |
|||
height: 65px; |
|||
} |
|||
|
|||
.main .big_img { |
|||
width: 200px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,74 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<div> |
|||
<!-- 标题 --> |
|||
<a-input class="ml-3" placeholder="标题" style="width: 150px" v-model="title" /> |
|||
<!-- 发帖类别 --> |
|||
<a-select |
|||
@change="handleChangeSelect('category',$event)" |
|||
class="ml-3" |
|||
placeholder="发帖类别" |
|||
style="width: 150px" |
|||
> |
|||
<a-select-option :key="state.id" :value="state.id" v-for="state in status">{{ state.value }}</a-select-option> |
|||
</a-select> |
|||
<!-- 帖子状态 --> |
|||
<a-select |
|||
@change="handleChangeSelect('comStatus',$event)" |
|||
class="ml-3" |
|||
placeholder="帖子状态" |
|||
style="width: 150px" |
|||
> |
|||
<a-select-option |
|||
:key="index" |
|||
:value="state.id" |
|||
v-for="(state, index) in items" |
|||
>{{ state.value }}</a-select-option> |
|||
</a-select> |
|||
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'ForumSearch', |
|||
data() { |
|||
return { |
|||
title: '', |
|||
items: [ |
|||
{ id: 0, value: '正常' }, |
|||
{ id: 1, value: '禁用' }, |
|||
], |
|||
comStatus: '', |
|||
status: [ |
|||
{ id: 0, value: '主题论坛' }, |
|||
{ id: 1, value: '创新社区' }, |
|||
{ id: 2, value: '孵化社区' }, |
|||
{ id: 3, value: '产业社区' }, |
|||
], |
|||
category: '', |
|||
}; |
|||
}, |
|||
methods: { |
|||
handleChangeSelect(type, value) { |
|||
this[type] = value; |
|||
}, |
|||
|
|||
// 搜索 |
|||
async handleTableChange() { |
|||
const { title, comStatus, category } = this; |
|||
// 传参 |
|||
const condition = { |
|||
title, |
|||
comStatus, |
|||
category, |
|||
}; |
|||
await this.$emit('getSelectTeam', condition); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|||
<style scoped lang="stylus"></style> |
|||
@ -1,166 +0,0 @@ |
|||
<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" |
|||
:row-key="record => record.id" |
|||
bordered |
|||
class="white" |
|||
> |
|||
<template slot="id" slot-scope="text, record, index"> |
|||
<span>{{ index + 1 }}</span> |
|||
</template> |
|||
|
|||
<!-- 需求类型 --> |
|||
<template slot="demandType" slot-scope="text, record"> |
|||
<a-tag color="green">{{ record.demandType }}</a-tag> |
|||
</template> |
|||
|
|||
<!-- 提交时间 --> |
|||
<template slot="submissionTime" slot-scope="text, record">{{ record.submissionTime }}</template> |
|||
|
|||
<!-- 处理状态 --> |
|||
<template slot="processingStatus" slot-scope="text, record, index"> |
|||
<div class="editable-cell d-flex flex-nowrap"> |
|||
<a-badge status="success" /> |
|||
<editable-cell-select |
|||
:arr="status" |
|||
:text="record.processingStatus" |
|||
@change="onCellChange(index, 'processingStatus', $event)" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<!-- 挑战 --> |
|||
<template slot="edit"> |
|||
<a-button class="ml-3" size="small" type="primary">一键挑战</a-button> |
|||
</template> |
|||
</a-table> |
|||
</div> |
|||
<a-empty v-else /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import EditableCellSelect from "components/EditableCellSelect/EditableCellSelect.vue"; |
|||
const columns = [ |
|||
{ |
|||
title: '序号', |
|||
align: 'center', |
|||
dataIndex: 'id', |
|||
key: 'id', |
|||
width: '7%', |
|||
scopedSlots: { customRender: 'id' }, |
|||
}, |
|||
{ |
|||
title: '企业名称', |
|||
align: 'center', |
|||
dataIndex: 'name', |
|||
key: 'name', |
|||
}, |
|||
{ |
|||
title: '联系人', |
|||
align: 'center', |
|||
dataIndex: 'contacts', |
|||
key: 'contacts', |
|||
}, |
|||
{ |
|||
title: '联系方式', |
|||
align: 'center', |
|||
dataIndex: 'phone', |
|||
key: 'phone', |
|||
}, |
|||
{ |
|||
title: '需求类型', |
|||
align: 'center', |
|||
dataIndex: 'demandType', |
|||
key: 'demandType', |
|||
scopedSlots: { customRender: 'demandType' }, |
|||
}, |
|||
{ |
|||
title: '需求描述', |
|||
align: 'center', |
|||
dataIndex: 'requirementDescription', |
|||
key: 'requirementDescription', |
|||
}, |
|||
{ |
|||
title: '提交时间', |
|||
align: 'center', |
|||
dataIndex: 'submissionTime', |
|||
key: 'submissionTime', |
|||
scopedSlots: { customRender: 'submissionTime' }, |
|||
}, |
|||
{ |
|||
title: '处理状态', |
|||
align: 'center', |
|||
dataIndex: 'processingStatus', |
|||
key: 'processingStatus', |
|||
scopedSlots: { customRender: 'processingStatus' }, |
|||
}, |
|||
{ |
|||
title: '挑战', |
|||
align: 'center', |
|||
dataIndex: 'edit', |
|||
key: 'edit', |
|||
scopedSlots: { customRender: 'edit' }, |
|||
}, |
|||
]; |
|||
|
|||
export default { |
|||
name: "DemandDate", |
|||
components: { |
|||
EditableCellSelect, |
|||
}, |
|||
data() { |
|||
return { |
|||
columns, |
|||
loading: false, |
|||
height: '', |
|||
lists:[ |
|||
{ |
|||
id:'001', |
|||
name:'传控科技', |
|||
contacts: 'zhou', |
|||
phone:'15212352621', |
|||
demandType:'技术', |
|||
requirementDescription:'张三', |
|||
submissionTime: '2020-11-17 18:00', |
|||
processingStatus:'处理中' |
|||
}, |
|||
{ |
|||
id:'002', |
|||
name:'中绿环保', |
|||
contacts: 'lili', |
|||
phone:'15254256202', |
|||
demandType:'技术', |
|||
requirementDescription:'李四', |
|||
submissionTime: '2020-11-17 8:00', |
|||
processingStatus:'处理中' |
|||
} |
|||
], |
|||
status:[{id:1,name:'待处理'},{id:2,name:'处理中'},{id:3,name:'已处理'}], |
|||
editable: false, |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150; |
|||
}, |
|||
|
|||
methods: { |
|||
onCellChange(key, dataIndex, value) { |
|||
console.log('key, dataIndex, value: ', key, dataIndex, value); |
|||
const dataSource = [...this.dataSource]; |
|||
const target = dataSource.find(item => item.key === key); |
|||
if (target) { |
|||
target[dataIndex] = value; |
|||
this.dataSource = dataSource; |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="stylus"></style> |
|||
@ -1,37 +0,0 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<!-- 企业名称 --> |
|||
<a-input |
|||
@change="handleChangeName" |
|||
placeholder="企业名称" |
|||
style="width: 150px" |
|||
v-model="companyName" |
|||
/> |
|||
|
|||
<a-button @click="handleTableChange" class="mx-2" icon="search" type="primary">搜索</a-button> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "DemandSearch", |
|||
data() { |
|||
return { |
|||
companyName: '' |
|||
} |
|||
}, |
|||
methods: { |
|||
handleChangeName(value) { |
|||
console.log('value: ', value); |
|||
this.companyName = value; |
|||
}, |
|||
|
|||
handleTableChange() { |
|||
console.log('搜索'); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|||
<style scoped lang="stylus"></style> |
|||
@ -0,0 +1,140 @@ |
|||
<template> |
|||
<div style="width:100%" v-if="record"> |
|||
<div class="d-flex flex-nowrap mb-3"> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">成立时间:</span> |
|||
{{ record.buildTime }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">营业收入:</span> |
|||
{{ record.businessIncome }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">集成电路布图设计:</span> |
|||
{{ record.electricDesign }} |
|||
</div> |
|||
</div> |
|||
<div class="d-flex flex-nowrap mb-3"> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">电子邮箱:</span> |
|||
{{ record.email }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">合作单位:</span> |
|||
{{ record.friendCompany }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">性别:</span> |
|||
{{ record.gender }} |
|||
</div> |
|||
<!--性别0-女,1-男--> |
|||
</div> |
|||
<div class="d-flex flex-nowrap mb-3"> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">身份证号:</span> |
|||
{{ record.idCard }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">大专以上人员:</span> |
|||
{{ record.juniorCollege }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">法人代码:</span> |
|||
{{ record.legalPerson }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="d-flex flex-nowrap mb-3"> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">主营业务:</span> |
|||
{{ record.mainBusiness }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">申请专利数:</span> |
|||
{{ record.patentApply }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">专利授权数:</span> |
|||
{{ record.patentGrented }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="d-flex flex-nowrap mb-3"> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">发明专利数:</span> |
|||
{{ record.patentInvent }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">申请入驻场地类型:</span> |
|||
{{ record.placeType }} |
|||
</div> |
|||
<!--申请入驻场地类型 0-虚拟,1-实体--> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">动植物新品种:</span> |
|||
{{ record.plantKind }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="d-flex flex-nowrap mb-3"> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">职务:</span> |
|||
{{ record.position }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">产品阶段:</span> |
|||
{{ record.productTech }} |
|||
</div> |
|||
<!--产品阶段 0-创意阶段 1-研发阶段 2-转化阶段 3-原型样品 4-产业化开发--> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">注册资金:</span> |
|||
{{ record.registerMoney }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="d-flex flex-nowrap mb-3"> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">现注册地址:</span> |
|||
{{ record.registerSite }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">研发人员:</span> |
|||
{{ record.resarchStaff }} |
|||
</div> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">软件著作权:</span> |
|||
{{ record.softwareRegister }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="d-flex flex-nowrap mb-3"> |
|||
<div class="flex-1"> |
|||
<span class="font-bold-14">员工人数:</span> |
|||
{{ record.staffCount }} |
|||
</div> |
|||
<div class="flex-2"> |
|||
<span class="font-bold-14">文件:</span> |
|||
<span v-if="record.list && record.list.length>0">{{ record.list }}</span> |
|||
<span v-else>暂无</span> |
|||
</div> |
|||
</div> |
|||
<div> |
|||
<span class="font-bold-14">公司介绍:</span> |
|||
<span v-dompurify-html="record.introduce"></span> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'Detail', |
|||
props: { record: { type: Object, default: () => {} } }, |
|||
|
|||
data() { |
|||
return {}; |
|||
}, |
|||
|
|||
methods: {}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="stylus"></style> |
|||
@ -0,0 +1,284 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<!-- 添加 --> |
|||
<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-input |
|||
placeholder="标题" |
|||
v-decorator="[ |
|||
'title', |
|||
{ |
|||
rules: [ |
|||
{ required: true, message: '标题不能为空' }, |
|||
{ whitespace: true, message: '标题不能为空' }, |
|||
{ max: 140, massage: '地点最多140个字符' }, |
|||
], |
|||
}, |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 地点 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="地点" |
|||
> |
|||
<a-input |
|||
placeholder="地点" |
|||
v-decorator="[ |
|||
'address', |
|||
{ |
|||
rules: [ |
|||
{ required: true, message: '地点不能为空' }, |
|||
{ whitespace: true, message: '地点不能为空' }, |
|||
{ max: 140, massage: '地点最多140个字符' }, |
|||
], |
|||
}, |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 时间 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="时间" |
|||
required |
|||
> |
|||
<a-range-picker |
|||
@change="onChange" |
|||
format="YYYY-MM-DD HH:mm:ss" |
|||
show-time |
|||
style="width:100%" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 活动类型 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="活动类型" |
|||
> |
|||
<a-select @change="changeType" placeholder="活动类型" style="width:100%"> |
|||
<a-select-option |
|||
:key="index" |
|||
:value="category.id" |
|||
v-for="(category, index) in types" |
|||
>{{ category.name }}</a-select-option> |
|||
</a-select> |
|||
</a-form-item> |
|||
|
|||
<!-- 主讲人 --> |
|||
<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> |
|||
|
|||
<!-- 组织单位 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="组织单位" |
|||
> |
|||
<a-input |
|||
placeholder="组织单位" |
|||
v-decorator="[ |
|||
'organization' |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
|
|||
<!-- 其他事宜 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="其他事宜" |
|||
> |
|||
<a-input |
|||
placeholder="其他事宜" |
|||
v-decorator="[ |
|||
'other' |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
|
|||
<!-- 会议主题 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="会议主题" |
|||
> |
|||
<a-input |
|||
placeholder="会议主题" |
|||
v-decorator="[ |
|||
'theme' |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
|
|||
<!-- 培训对象 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="培训对象" |
|||
> |
|||
<a-input |
|||
placeholder="培训对象" |
|||
v-decorator="[ |
|||
'trainees' |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
|
|||
<!-- 报名方式 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="报名方式" |
|||
> |
|||
<a-input |
|||
placeholder="报名方式" |
|||
v-decorator="[ |
|||
'way' |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
|
|||
<!-- 活动结束内容 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="活动结束内容" |
|||
> |
|||
<a-textarea |
|||
placeholder="活动结束内容" |
|||
v-decorator="[ |
|||
'endContent', |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
|
|||
<!-- 详情 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="详情" |
|||
required |
|||
> |
|||
<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 { handleApplyBackend } 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: 'EntityApplyAdd', |
|||
props: { visible: { type: Boolean, default: false } }, |
|||
components: { QuillEditor }, |
|||
data() { |
|||
return { |
|||
formItemLayout, |
|||
tailItemLayout, |
|||
form: this.$form.createForm(this, { name: 'activity-add' }), |
|||
types: [ |
|||
{ id: 0, name: '路演' }, |
|||
{ id: 1, name: '沙龙' }, |
|||
{ id: 2, name: '论坛' }, |
|||
], |
|||
activityType: '', |
|||
maxSize: 2048, |
|||
content: '', |
|||
placeholder: '请输入...', |
|||
releaseTime: '', // 开始时间 |
|||
closeTime: '', // 结束时间 |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
// 类型 |
|||
changeType(value) { |
|||
console.log('value: ', value); |
|||
this.activityType = value; |
|||
}, |
|||
|
|||
// 举办时间 |
|||
onChange(dates, dateStrings) { |
|||
console.log('From: ', dates[0], ', to: ', dates[1]); |
|||
console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]); |
|||
this.releaseTime = dateStrings[0]; |
|||
this.closeTime = dateStrings[1]; |
|||
}, |
|||
|
|||
// 修改内容 |
|||
changeInput(value) { |
|||
this.content = value; |
|||
}, |
|||
|
|||
// 提交表单 |
|||
handleSubmit(e) { |
|||
e.preventDefault(); |
|||
this.form.validateFieldsAndScroll(async (err, values) => { |
|||
if (!err) { |
|||
try { |
|||
console.log('values: ', values); |
|||
const { releaseTime, closeTime, content, activityType } = this; |
|||
const params = { param: values }; |
|||
params.param.releaseTime = releaseTime; |
|||
params.param.closeTime = closeTime; |
|||
params.param.content = content; |
|||
params.param.activityType = activityType; |
|||
console.log('params: ', params); |
|||
const res = await handleApplyBackend(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> |
|||
@ -0,0 +1,190 @@ |
|||
<template> |
|||
<div class="main flex-1 flex-column"> |
|||
<div style="width:100%" v-if="lists && lists.length > 0"> |
|||
<a-table |
|||
:columns="columns" |
|||
:data-source="lists" |
|||
:loading="loading" |
|||
:row-key="record => record.id" |
|||
:scroll="{ y: height }" |
|||
bordered |
|||
class="white" |
|||
> |
|||
<template slot="id" slot-scope="text, record, index"> |
|||
<span>{{ index + 1 }}</span> |
|||
</template> |
|||
|
|||
<!-- 需求类型 --> |
|||
<template slot="demandType" slot-scope="text, record"> |
|||
<a-tag color="green">{{ record.demandType }}</a-tag> |
|||
</template> |
|||
|
|||
<!-- 提交时间 --> |
|||
<template slot="submissionTime" slot-scope="text, record">{{ record.submissionTime }}</template> |
|||
|
|||
<!-- 处理状态 --> |
|||
<template slot="processingStatus" slot-scope="text, record, index"> |
|||
<div class="editable-cell d-flex flex-nowrap"> |
|||
<a-badge status="success" /> |
|||
<editable-cell-select |
|||
:arr="status" |
|||
:text="record.processingStatus" |
|||
@change="onCellChange(index, 'processingStatus', $event)" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<template slot="dealStatus" slot-scope="text, record"> |
|||
<a-tag |
|||
:color="record.dealStatus === 2 ? 'green' : record.dealStatus === 1 ? 'red' : 'blue'" |
|||
>{{ record.dealStatus === 2 ? '已通过' : record.dealStatus === 1 ? '未通过' : '审核中' }}</a-tag> |
|||
</template> |
|||
|
|||
<!-- 审批 --> |
|||
<template slot="edit" slot-scope="text, record"> |
|||
<a-button |
|||
@click="handleApply(record.id, 2)" |
|||
class="ml-3" |
|||
size="small" |
|||
type="primary" |
|||
v-if="record.dealStatus === 1" |
|||
>通过</a-button> |
|||
<a-button |
|||
@click="handleApply(record.id, 1)" |
|||
class="ml-3" |
|||
size="small" |
|||
type="danger" |
|||
v-if="record.dealStatus === 2" |
|||
>不通过</a-button> |
|||
</template> |
|||
|
|||
<div |
|||
class="d-flex flex-nowrap justify-space-between" |
|||
slot="expandedRowRender" |
|||
slot-scope="record" |
|||
style="margin: 0" |
|||
> |
|||
<detail :record="record" /> |
|||
</div> |
|||
</a-table> |
|||
</div> |
|||
<a-empty v-else /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import EditableCellSelect from 'components/EditableCellSelect/EditableCellSelect.vue'; |
|||
import Detail from 'components/EntityApply/Detail.vue'; |
|||
import { changeStatus } from 'config/api'; |
|||
|
|||
const columns = [ |
|||
{ |
|||
title: '序号', |
|||
align: 'center', |
|||
dataIndex: 'id', |
|||
key: 'id', |
|||
width: '7%', |
|||
scopedSlots: { customRender: 'id' }, |
|||
}, |
|||
{ |
|||
title: '企业名称', |
|||
align: 'center', |
|||
dataIndex: 'company', |
|||
key: 'company', |
|||
}, |
|||
{ |
|||
title: '主营业务', |
|||
align: 'center', |
|||
dataIndex: 'mainBusiness', |
|||
key: 'mainBusiness', |
|||
}, |
|||
{ |
|||
title: '联系人', |
|||
align: 'center', |
|||
dataIndex: 'name', |
|||
key: 'name', |
|||
}, |
|||
{ |
|||
title: '电话', |
|||
align: 'center', |
|||
dataIndex: 'phone', |
|||
key: 'phone', |
|||
}, |
|||
{ |
|||
title: '处理状态', |
|||
align: 'center', |
|||
dataIndex: 'dealStatus', |
|||
key: 'dealStatus', |
|||
scopedSlots: { customRender: 'dealStatus' }, |
|||
}, |
|||
{ |
|||
title: '审批', |
|||
align: 'center', |
|||
dataIndex: 'edit', |
|||
key: 'edit', |
|||
scopedSlots: { customRender: 'edit' }, |
|||
}, |
|||
]; |
|||
|
|||
export default { |
|||
name: 'DemandDate', |
|||
components: { |
|||
EditableCellSelect, |
|||
Detail, |
|||
}, |
|||
|
|||
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } }, |
|||
|
|||
data() { |
|||
return { |
|||
columns, |
|||
loading: false, |
|||
height: '', |
|||
editable: false, |
|||
}; |
|||
}, |
|||
|
|||
mounted() { |
|||
let th = 250; |
|||
let wh = window.innerHeight; |
|||
this.height = wh - th; |
|||
window.onresize = () => { |
|||
return (() => { |
|||
wh = window.innerHeight; |
|||
this.height = wh - th; |
|||
})(); |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
onCellChange(key, dataIndex, value) { |
|||
console.log('key, dataIndex, value: ', key, dataIndex, value); |
|||
const dataSource = [...this.dataSource]; |
|||
const target = dataSource.find(item => item.key === key); |
|||
if (target) { |
|||
target[dataIndex] = value; |
|||
this.dataSource = dataSource; |
|||
} |
|||
}, |
|||
|
|||
// 审核 |
|||
async handleApply(id, dealStatus) { |
|||
try { |
|||
const params = { param: { id, dealStatus } }; |
|||
const res = await changeStatus(params); |
|||
const { data, msg, code } = res.data; |
|||
if (code === 200) { |
|||
this.$message.success('审核成功'); |
|||
this.$emit('entityApplicationSearch'); |
|||
} else { |
|||
throw msg; |
|||
} |
|||
} catch (error) { |
|||
this.$message.error(error || '审核失败'); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="stylus"></style> |
|||
@ -0,0 +1,89 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<!-- 企业名称 --> |
|||
<a-input class="mr-3" placeholder="姓名" style="width: 150px" v-model="name" /> |
|||
<a-input class="mr-3" placeholder="职务" style="width: 150px" v-model="position" /> |
|||
<a-input class="mr-3" placeholder="联系电话" style="width: 150px" v-model="phone" /> |
|||
<a-input class="mr-3" placeholder="企业/团队" style="width: 150px" v-model="company" /> |
|||
<a-select |
|||
@change="handleChangeSelect('dealStatus',$event)" |
|||
allow-clear |
|||
class="ml-3" |
|||
placeholder="处理状态" |
|||
style="width: 150px" |
|||
> |
|||
<a-select-option |
|||
:key="dealStatus.id" |
|||
:value="dealStatus.id" |
|||
v-for="dealStatus in dealStatuss" |
|||
>{{ dealStatus.value }}</a-select-option> |
|||
</a-select> |
|||
|
|||
<a-button @click="handleTableChange" class="mx-2" icon="search" type="primary">搜索</a-button> |
|||
|
|||
<div class="flex-1"></div> |
|||
<a-button @click="showModal" class="editable-add-btn mb-3" type="primary">增加</a-button> |
|||
|
|||
<!-- 添加 --> |
|||
<entity-apply-add :visible="visible" @closeModal="closeModal" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import EntityApplyAdd from 'components/EntityApply/EntityApplyAdd.vue'; |
|||
|
|||
export default { |
|||
name: 'EntityApplySearch', |
|||
components: { |
|||
EntityApplyAdd, |
|||
}, |
|||
data() { |
|||
return { |
|||
visible: false, |
|||
name: '', |
|||
position: '', |
|||
phone: '', |
|||
company: '', |
|||
dealStatuss: [ |
|||
{ id: 1, value: '审核未通过' }, |
|||
{ id: 2, value: '审核通过' }, |
|||
], |
|||
}; |
|||
}, |
|||
methods: { |
|||
handleChangeName(value) { |
|||
console.log('value: ', value); |
|||
this.companyName = value; |
|||
}, |
|||
|
|||
handleChangeSelect(type, value) { |
|||
this[type] = value; |
|||
}, |
|||
|
|||
showModal() { |
|||
this.visible = true; |
|||
}, |
|||
|
|||
closeModal() { |
|||
this.visible = false; |
|||
}, |
|||
|
|||
async handleTableChange() { |
|||
const { name, position, phone, company, dealStatus } = this; |
|||
console.log(dealStatus); |
|||
// 传参 |
|||
const condition = { |
|||
name, |
|||
position, |
|||
phone, |
|||
company, |
|||
dealStatus, |
|||
}; |
|||
await this.$emit('entityApplicationSearch', condition); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|||
<style scoped lang="stylus"></style> |
|||
@ -1,172 +0,0 @@ |
|||
<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" |
|||
:row-key="record => record.id" |
|||
bordered |
|||
class="white" |
|||
> |
|||
<template slot="id" slot-scope="text, record, index"> |
|||
<span>{{ index + 1 }}</span> |
|||
</template> |
|||
|
|||
<!-- 置顶 --> |
|||
<template slot="topping" slot-scope="text, record"> |
|||
<a-switch checked-children="是" class="ml-4" default-checked un-checked-children="否" /> |
|||
</template> |
|||
|
|||
<!-- 审核状态 --> |
|||
<template slot="auditStatus" slot-scope="text, record"> |
|||
<a-tag :color="record.auditStatus === '通过' ? 'green' : 'red'">{{ record.auditStatus }}</a-tag> |
|||
</template> |
|||
|
|||
<template slot="examine" slot-scope="text, record"> |
|||
<a-button size="small" type="primary" v-if="record.auditStatus != '通过'">通过</a-button> |
|||
<a-button size="small" type="danger" v-else>不通过</a-button> |
|||
</template> |
|||
</a-table> |
|||
</div> |
|||
<a-empty v-else /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
const columns = [ |
|||
{ |
|||
title: '序号', |
|||
align: 'center', |
|||
dataIndex: 'id', |
|||
key: 'id', |
|||
width: '7%', |
|||
scopedSlots: { customRender: 'id' }, |
|||
}, |
|||
{ |
|||
title: '标题', |
|||
align: 'center', |
|||
dataIndex: 'title', |
|||
key: 'title', |
|||
}, |
|||
{ |
|||
title: '发帖人', |
|||
align: 'center', |
|||
dataIndex: 'postedBy', |
|||
key: 'postedBy', |
|||
}, |
|||
{ |
|||
title: '板块', |
|||
align: 'center', |
|||
dataIndex: 'plate', |
|||
key: 'plate', |
|||
}, |
|||
{ |
|||
title: '置顶', |
|||
align: 'center', |
|||
dataIndex: 'topping', |
|||
key: 'topping', |
|||
scopedSlots: { customRender: 'topping' }, |
|||
}, |
|||
{ |
|||
title: '审核状态', |
|||
align: 'center', |
|||
dataIndex: 'auditStatus', |
|||
key: 'auditStatus', |
|||
scopedSlots: { customRender: 'auditStatus' }, |
|||
}, |
|||
{ |
|||
title: '发布时间', |
|||
align: 'center', |
|||
dataIndex: 'releaseTime', |
|||
key: 'releaseTime', |
|||
scopedSlots: { customRender: 'releaseTime' }, |
|||
}, |
|||
{ |
|||
title: '审核', |
|||
align: 'center', |
|||
dataIndex: 'examine', |
|||
key: 'examine', |
|||
scopedSlots: { customRender: 'examine' }, |
|||
}, |
|||
]; |
|||
|
|||
const lists = [ |
|||
{ |
|||
id:'001', |
|||
title:'传控科技', |
|||
postedBy: '张三', |
|||
plate:'一', |
|||
topping: 5, |
|||
auditStatus: '通过', |
|||
releaseTime: '2020/11/18 18:00', |
|||
}, |
|||
{ |
|||
id:'002', |
|||
title:'中绿环保', |
|||
postedBy: '张三', |
|||
plate:'二', |
|||
topping: 6, |
|||
auditStatus: '未通过', |
|||
releaseTime: '2020/11/18 18:00', |
|||
} |
|||
]; |
|||
|
|||
export default { |
|||
name: "ForumDate", |
|||
data() { |
|||
this.cacheData = lists.map(item => ({ ...item })); |
|||
return { |
|||
columns, |
|||
lists, |
|||
loading: false, |
|||
height: '', |
|||
editVisible: false, |
|||
imgVisible: false, |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150; |
|||
}, |
|||
|
|||
methods: { |
|||
showEditModal(){ |
|||
this.editVisible = true; |
|||
}, |
|||
|
|||
closeModal(){ |
|||
this.editVisible = false; |
|||
}, |
|||
|
|||
// 删除 |
|||
async onDelete(teamId) { |
|||
try { |
|||
const params = { param: { teamId } }; |
|||
// const res = await delTeam(params); |
|||
// const { data, msg, code } = res.data; |
|||
// if (code === 200) { |
|||
// this.$message.success('删除成功'); |
|||
// const arr = [...this.lists]; |
|||
// this.lists = arr.filter(item => item.id !== teamId); |
|||
// // TODO: 填到列表中 |
|||
// } else { |
|||
// throw msg; |
|||
// } |
|||
} catch (error) { |
|||
this.$message.error(error || '删除失败'); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang="stylus" scoped> |
|||
.main .img { |
|||
width: 100%; |
|||
} |
|||
|
|||
.main .big_img { |
|||
width: 200px; |
|||
} |
|||
</style> |
|||
@ -1,96 +0,0 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<div> |
|||
<!-- 板块 --> |
|||
<a-input |
|||
@change="handleChange('plate',$event)" |
|||
placeholder="板块" |
|||
style="width: 150px" |
|||
v-model="plate" |
|||
/> |
|||
<!-- 标题 --> |
|||
<a-input |
|||
@change="handleChange('title',$event)" |
|||
class="ml-3" |
|||
placeholder="标题" |
|||
style="width: 150px" |
|||
v-model="title" |
|||
/> |
|||
<!-- 置顶 --> |
|||
<a-select |
|||
@change="handleChangeSelect('topping',$event)" |
|||
class="ml-3" |
|||
default-value="置顶" |
|||
style="width: 150px" |
|||
> |
|||
<a-select-option |
|||
:key="index" |
|||
:value="topping" |
|||
v-for="(topping, index) in items" |
|||
>{{ topping }}</a-select-option> |
|||
</a-select> |
|||
<!-- 审核 --> |
|||
<a-select |
|||
@change="handleChangeSelect('state',$event)" |
|||
class="ml-3" |
|||
default-value="审核通过" |
|||
style="width: 150px" |
|||
> |
|||
<a-select-option |
|||
:key="state.id" |
|||
:value="state.value" |
|||
v-for="state in status" |
|||
>{{ state.value }}</a-select-option> |
|||
</a-select> |
|||
<!-- 发布时间 --> |
|||
<a-range-picker @change="onChange" class="ml-3" format="YYYY/MM/DD HH:mm:ss" show-time /> |
|||
<a-button @click="handleSearch" class="ml-3" type="primary">搜索</a-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "ForumSearch", |
|||
data() { |
|||
return { |
|||
plate: '', |
|||
title: '', |
|||
items: ['置顶','不置顶'], |
|||
topping: '', |
|||
status: [ |
|||
{ id:1, value:'审核通过' }, |
|||
{ id:2, value:'审核未通过' } |
|||
], |
|||
state: '', |
|||
} |
|||
}, |
|||
methods: { |
|||
handleChange(type, e) { |
|||
this[type] = e.target.value; |
|||
}, |
|||
|
|||
handleChangeSelect(type, value) { |
|||
this[type] = value; |
|||
}, |
|||
|
|||
// 发布时间 |
|||
onChange(dates, dateStrings) { |
|||
console.log('From: ', dates[0], ', to: ', dates[1]); |
|||
console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]); |
|||
}, |
|||
|
|||
// 搜索 |
|||
handleSearch(){ |
|||
console.log('搜索'); |
|||
console.log('plate',this.plate); |
|||
console.log('title',this.title); |
|||
console.log('topping',this.topping); |
|||
console.log('state',this.state); |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|||
<style scoped lang="stylus"></style> |
|||
@ -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> |
|||
@ -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> |
|||
@ -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> |
|||
@ -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> |
|||
@ -0,0 +1,71 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<comment-search @getSelectTeam="getSelectTeam" /> |
|||
<comment-date :lists="lists" :pagination="pagination" @getSelectTeam="getSelectTeam" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import CommentSearch from 'components/Community/CommentSearch.vue'; |
|||
import CommentDate from 'components/Community/CommentDate.vue'; |
|||
import { selCommunityH } from 'config/api'; |
|||
|
|||
export default { |
|||
name: 'CommunicationCommunity', |
|||
components: { |
|||
CommentSearch, |
|||
CommentDate, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.getSelectTeam(); |
|||
}, |
|||
|
|||
methods: { |
|||
/** |
|||
* 发帖查询 |
|||
* @param { String } category 发帖类别 |
|||
* @param { String } comStatus 帖子状态 |
|||
* @param { String } title 发帖标题 |
|||
*/ |
|||
async getSelectTeam(condition) { |
|||
try { |
|||
const { query } = this.$route; |
|||
const params = { |
|||
param: { |
|||
commentId: query.id, |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if (condition) { |
|||
if (condition.comStatus !== '') { |
|||
params.param.comStatus = condition.comStatus; |
|||
} |
|||
} |
|||
const res = await selCommunityH(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> |
|||
@ -1,19 +1,75 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<forum-search /> |
|||
<forum-date /> |
|||
<community-search @getSelectTeam="getSelectTeam" /> |
|||
<community-date :lists="lists" :pagination="pagination" @getSelectTeam="getSelectTeam" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import ForumSearch from 'components/Forum/ForumSearch.vue'; |
|||
import ForumDate from 'components/Forum/ForumDate.vue'; |
|||
import CommunitySearch from 'components/Community/CommunitySearch.vue'; |
|||
import CommunityDate from 'components/Community/CommunityDate.vue'; |
|||
import { selCommentH } from 'config/api'; |
|||
|
|||
export default { |
|||
name: 'ForumManage', |
|||
name: 'CommunicationCommunity', |
|||
components: { |
|||
ForumSearch, |
|||
ForumDate, |
|||
CommunitySearch, |
|||
CommunityDate, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.getSelectTeam(); |
|||
}, |
|||
|
|||
methods: { |
|||
/** |
|||
* 发帖查询 |
|||
* @param { String } category 发帖类别 |
|||
* @param { String } comStatus 帖子状态 |
|||
* @param { String } title 发帖标题 |
|||
*/ |
|||
async getSelectTeam(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if (condition) { |
|||
if (condition.title) { |
|||
params.param.title = condition.title; |
|||
} |
|||
if (condition.comStatus !== '') { |
|||
params.param.comStatus = condition.comStatus; |
|||
} |
|||
if (condition.category !== '') { |
|||
params.param.category = condition.category; |
|||
} |
|||
} |
|||
const res = await selCommentH(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> |
|||
|
|||
@ -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> |
|||
@ -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: 'CooperativePartner', |
|||
components: { |
|||
PartnerSearch, |
|||
PartnerDate, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
computed: mapState(['partnerOptions']), |
|||
|
|||
async created() { |
|||
const options = { type: 1, 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> |
|||
@ -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> |
|||
@ -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> |
|||
@ -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> |
|||
@ -1,20 +1,86 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<demand-search /> |
|||
<demand-date /> |
|||
<entity-apply-search @entityApplicationSearch="entityApplicationSearch" /> |
|||
<entity-apply-date |
|||
:lists="lists" |
|||
:pagination="pagination" |
|||
@entityApplicationSearch="entityApplicationSearch" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
// @ is an alias to /src |
|||
import DemandSearch from "components/Demand/DemandSearch.vue"; |
|||
import DemandDate from "components/Demand/DemandDate.vue"; |
|||
import EntityApplySearch from 'components/EntityApply/EntityApplySearch.vue'; |
|||
import EntityApplyDate from 'components/EntityApply/EntityApplyDate.vue'; |
|||
import { entityApplicationSearch } from 'config/api'; |
|||
import { mapMutations, mapState } from 'vuex'; |
|||
|
|||
export default { |
|||
name: "Home", |
|||
name: 'Home', |
|||
components: { |
|||
DemandSearch, |
|||
DemandDate |
|||
} |
|||
EntityApplySearch, |
|||
EntityApplyDate, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
computed: mapState(['placeType']), |
|||
|
|||
async created() { |
|||
this.setPlaceType(1); |
|||
await this.entityApplicationSearch(); |
|||
}, |
|||
|
|||
methods: { |
|||
...mapMutations(['setPlaceType']), |
|||
|
|||
async entityApplicationSearch(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
placeType: this.placeType, |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if (condition) { |
|||
if (condition.name) { |
|||
params.param.name = condition.name; |
|||
} |
|||
if (condition.position) { |
|||
params.param.position = condition.position; |
|||
} |
|||
if (condition.phone) { |
|||
params.param.phone = condition.phone; |
|||
} |
|||
if (condition.company) { |
|||
params.param.company = condition.company; |
|||
} |
|||
if (condition.dealStatus) { |
|||
params.param.dealStatus = condition.dealStatus; |
|||
} |
|||
} |
|||
const res = await entityApplicationSearch(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('123'); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
@ -0,0 +1,86 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<entity-apply-search @entityApplicationSearch="entityApplicationSearch" /> |
|||
<entity-apply-date |
|||
:lists="lists" |
|||
:pagination="pagination" |
|||
@entityApplicationSearch="entityApplicationSearch" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import EntityApplySearch from 'components/EntityApply/EntityApplySearch.vue'; |
|||
import EntityApplyDate from 'components/EntityApply/EntityApplyDate.vue'; |
|||
import { entityApplicationSearch } from 'config/api'; |
|||
import { mapMutations, mapState } from 'vuex'; |
|||
|
|||
export default { |
|||
name: 'VirtualApplication', |
|||
components: { |
|||
EntityApplySearch, |
|||
EntityApplyDate, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
computed: mapState(['placeType']), |
|||
|
|||
async created() { |
|||
this.setPlaceType(0); |
|||
await this.entityApplicationSearch(); |
|||
}, |
|||
|
|||
methods: { |
|||
...mapMutations(['setPlaceType']), |
|||
|
|||
async entityApplicationSearch(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
placeType: this.placeType, |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if (condition) { |
|||
if (condition.name) { |
|||
params.param.name = condition.name; |
|||
} |
|||
if (condition.position) { |
|||
params.param.position = condition.position; |
|||
} |
|||
if (condition.phone) { |
|||
params.param.phone = condition.phone; |
|||
} |
|||
if (condition.company) { |
|||
params.param.company = condition.company; |
|||
} |
|||
if (condition.dealStatus) { |
|||
params.param.dealStatus = condition.dealStatus; |
|||
} |
|||
} |
|||
const res = await entityApplicationSearch(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('123'); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
@ -1,19 +1,64 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<challenge-search /> |
|||
<challenge-date /> |
|||
<challenge-search @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
|||
<challenge-date :pagination="pagination" :lists="lists" @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import ChallengeSearch from "components/Challenge/ChallengeSearch.vue"; |
|||
import ChallengeDate from "components/Challenge/ChallengeDate.vue"; |
|||
import ChallengeSearch from 'components/Challenge/ChallengeSearch.vue'; |
|||
import ChallengeDate from 'components/Challenge/ChallengeDate.vue'; |
|||
import { getInnovativeServiceSearch } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "InnovationChallenge", |
|||
name: 'InnovationChallenge', |
|||
components: { |
|||
ChallengeSearch, |
|||
ChallengeDate, |
|||
} |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: {}, |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.getInnovativeServiceSearch(); |
|||
}, |
|||
|
|||
methods: { |
|||
async getInnovativeServiceSearch(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
name: condition && condition.name ? condition.name : '', |
|||
recStatus: condition && condition.status111 !== '' ? condition.status111 : '', |
|||
serviceType: 2, |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
console.log('params', params); |
|||
const res = await getInnovativeServiceSearch(params); |
|||
const { code, msg, data } = res.data; |
|||
if (code === 200) { |
|||
this.lists = data; |
|||
console.log(this.lists); |
|||
|
|||
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> |
|||
|
|||
@ -1,19 +1,64 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<course-search /> |
|||
<course-date /> |
|||
<course-search @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
|||
<course-date :pagination="pagination" :lists="lists" @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import CourseSearch from "components/Course/CourseSearch.vue"; |
|||
import CourseDate from "components/Course/CourseDate.vue"; |
|||
import CourseSearch from 'components/Course/CourseSearch.vue'; |
|||
import CourseDate from 'components/Course/CourseDate.vue'; |
|||
import { getInnovativeServiceSearch } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "Course", |
|||
name: 'Course', |
|||
components: { |
|||
CourseSearch, |
|||
CourseDate, |
|||
} |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: {}, |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.getInnovativeServiceSearch(); |
|||
}, |
|||
|
|||
methods: { |
|||
async getInnovativeServiceSearch(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
name: condition && condition.name ? condition.name : '', |
|||
recStatus: condition && condition.status111 !== '' ? condition.status111 : '', |
|||
serviceType: 3, |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
console.log('params', params); |
|||
const res = await getInnovativeServiceSearch(params); |
|||
const { code, msg, data } = res.data; |
|||
if (code === 200) { |
|||
this.lists = data; |
|||
console.log(this.lists); |
|||
|
|||
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> |
|||
|
|||
@ -1,19 +1,67 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<development-search /> |
|||
<development-date /> |
|||
<development-search @selResSearch="selResSearch" /> |
|||
<development-date :lists="lists" :pagination="pagination" @selResSearch="selResSearch" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import DevelopmentSearch from "components/Development/DevelopmentSearch.vue"; |
|||
import DevelopmentDate from "components/Development/DevelopmentDate.vue"; |
|||
import { selResSearch } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "ResourceDevelopment", |
|||
components: { |
|||
DevelopmentSearch, |
|||
DevelopmentDate, |
|||
} |
|||
}, |
|||
|
|||
data(){ |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.selResSearch(); |
|||
}, |
|||
|
|||
methods: { |
|||
async selResSearch(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if (condition) { |
|||
if (condition.content) { |
|||
params.param.content = condition.content; |
|||
} |
|||
if (condition.modelIds) { |
|||
params.param.modelIds = condition.modelIds; |
|||
} |
|||
} |
|||
const res = await selResSearch(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> |
|||
|
|||
@ -1,19 +1,67 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<transfer-search /> |
|||
<transfer-date /> |
|||
<transfer-search @selInstrumentSearch="selInstrumentSearch" /> |
|||
<transfer-date :lists="lists" :pagination="pagination" @selInstrumentSearch="selInstrumentSearch" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import TransferSearch from "components/Transfer/TransferSearch.vue"; |
|||
import TransferDate from "components/Transfer/TransferDate.vue"; |
|||
import { selInstrumentSearch } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "TechnologyTransfer", |
|||
components: { |
|||
TransferSearch, |
|||
TransferDate, |
|||
} |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.selInstrumentSearch(); |
|||
}, |
|||
|
|||
methods: { |
|||
async selInstrumentSearch(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if (condition) { |
|||
if (condition.content) { |
|||
params.param.content = condition.content; |
|||
} |
|||
if (condition.modelIds) { |
|||
params.param.modelIds = condition.modelIds; |
|||
} |
|||
} |
|||
const res = await selInstrumentSearch(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> |
|||
|
|||
Loading…
Reference in new issue