53 changed files with 28157 additions and 9434 deletions
File diff suppressed because it is too large
@ -1,152 +1,106 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<div> |
|||
<!-- 发布平台 --> |
|||
<a-select @change="getPlatform" placeholder="发布平台" style="width: 100px"> |
|||
<a-select-option :key="index" :value="plat" v-for="(plat, index) in platforms">{{ plat }}</a-select-option> |
|||
</a-select> |
|||
<!-- 类型 --> |
|||
<a-select @change="getCategory" class="ml-3" placeholder="类型" style="width: 100px"> |
|||
<a-select-option |
|||
:key="index" |
|||
:value="category.name" |
|||
v-for="(category, index) in categories" |
|||
>{{ category.name }}</a-select-option> |
|||
</a-select> |
|||
<!-- 举办时间 --> |
|||
<a-range-picker |
|||
@change="onChange" |
|||
class="ml-3" |
|||
format="YYYY/MM/DD HH:mm:ss" |
|||
show-time |
|||
style="width: 200px" |
|||
/> |
|||
<!-- 地点 --> |
|||
<a-input |
|||
@change="handleChange('place',$event)" |
|||
class="ml-3" |
|||
placeholder="地点" |
|||
style="width: 100px" |
|||
v-model="place" |
|||
/> |
|||
<!-- 组织人 --> |
|||
<a-input |
|||
@change="handleChange('organizer',$event)" |
|||
class="ml-3" |
|||
placeholder="组织人" |
|||
style="width: 100px" |
|||
v-model="organizer" |
|||
/> |
|||
<!-- 主讲人 --> |
|||
<a-input |
|||
@change="handleChange('speaker',$event)" |
|||
class="ml-3" |
|||
placeholder="主讲人" |
|||
style="width: 100px" |
|||
v-model="speaker" |
|||
/> |
|||
<!-- 发布状态 --> |
|||
<a-select @change="getState" class="ml-3" placeholder="发布状态" style="width: 100px"> |
|||
<a-select-option :key="index" :value="state" v-for="(state, index) in status">{{ state }}</a-select-option> |
|||
</a-select> |
|||
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button> |
|||
<div class="d-flex flex-wrap pb-3 align-center"> |
|||
<!-- 活动类型 0路演 1讲座 2沙龙 不传参数则查询全部 --> |
|||
<div class="mb-3"> |
|||
<span class="font-bold-14">活动类型:</span> |
|||
<a-checkbox-group :options="items" @change="onChange" /> |
|||
</div> |
|||
|
|||
<!-- 发布平台 --> |
|||
<div class="mb-3"> |
|||
<span class="font-bold-14 ml-8">发布平台:</span> |
|||
<a-radio-group @change="getPlatform" v-model="publishPlatform"> |
|||
<a-radio :value="0">绿谷</a-radio> |
|||
<a-radio :value="1">创时代</a-radio> |
|||
</a-radio-group> |
|||
</div> |
|||
<!-- 活动标题 --> |
|||
<a-input class="ml-3 mb-3" placeholder="标题" style="width: 150px" v-model="titleKey" /> |
|||
<!-- 发布时间 --> |
|||
<a-range-picker |
|||
@change="onChangeTime" |
|||
class="ml-3 mb-3" |
|||
format="YYYY-MM-DD HH:mm:ss" |
|||
show-time |
|||
/> |
|||
<a-button @click="handleTableChange" class="ml-3 mb-3" type="primary">搜索</a-button> |
|||
<div class="flex-1"></div> |
|||
|
|||
<a-button @click="showModal" class="editable-add-btn">增加</a-button> |
|||
|
|||
<a-button @click="showModal" class="editable-add-btn mb-3" type="primary">增加</a-button> |
|||
<!-- 添加 --> |
|||
<activity-add :visible="visible" @closeModal="closeModal" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import ActivityAdd from "components/Activity/ActivityAdd.vue"; |
|||
import ActivityAdd from 'components/Activity/ActivityAdd.vue'; |
|||
// import { selLikeTeam } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "ActivitySearch", |
|||
name: 'ActivitySearch', |
|||
components: { |
|||
ActivityAdd, |
|||
}, |
|||
data() { |
|||
return { |
|||
visible: false, |
|||
publishingPlatform: '', |
|||
categories: [ |
|||
{id:1,name:'路演'}, |
|||
{id:2,name:'沙龙'}, |
|||
{id:3,name:'论坛'}, |
|||
{id:4,name:'培训'}, |
|||
{id:5,name:'讲座'}, |
|||
{id:6,name:'创业活动'} |
|||
], |
|||
category: '', |
|||
place: '', |
|||
organizer: '', |
|||
speaker: '', |
|||
status: ['发布','不发布'], |
|||
state: '', |
|||
platforms: ['绿谷','维基'], |
|||
platform: '' |
|||
} |
|||
titleKey: '', |
|||
items: ['路演', '讲座', '沙龙'], |
|||
activityType: [], |
|||
checkedValues: [], |
|||
publishPlatform: '', // 发布平台 |
|||
startTime: '', |
|||
endTime: '', |
|||
}; |
|||
}, |
|||
methods: { |
|||
showModal(){ |
|||
this.visible = true; |
|||
}, |
|||
|
|||
closeModal(){ |
|||
this.visible = false; |
|||
}, |
|||
|
|||
handleChange(type, e) { |
|||
this.type = e.target.value; |
|||
}, |
|||
|
|||
methods: { |
|||
// 发布平台 |
|||
getPlatform(value) { |
|||
console.log('value: ', value); |
|||
this.platform = value; |
|||
this.publishPlatform = value; |
|||
}, |
|||
|
|||
// 类型 |
|||
getCategory(value) { |
|||
console.log('value: ', value); |
|||
this.category = value; |
|||
// 发布时间 |
|||
onChangeTime(dates, dateStrings) { |
|||
this.startTime = dateStrings[0]; |
|||
this.endTime = dateStrings[1]; |
|||
}, |
|||
|
|||
// 发布状态 |
|||
getState(value) { |
|||
console.log('value: ', value); |
|||
this.state = value; |
|||
showModal() { |
|||
this.visible = true; |
|||
}, |
|||
|
|||
closeModal() { |
|||
this.visible = false; |
|||
}, |
|||
|
|||
// 举办时间 |
|||
onChange(dates, dateStrings) { |
|||
console.log('From: ', dates[0], ', to: ', dates[1]); |
|||
console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]); |
|||
onChange(checkedValues) { |
|||
this.checkedValues = checkedValues; |
|||
}, |
|||
|
|||
async handleTableChange() { |
|||
try { |
|||
// const params = { param: {publishingPlatform: this.publishingPlatform} }; |
|||
// const res = await selLikeTeam(params); |
|||
// const { data, msg, code } = res.data; |
|||
// if (code === 200) { |
|||
// console.log('搜索结果',data); |
|||
// // TODO: 填到列表中 |
|||
// } else { |
|||
// throw msg; |
|||
// } |
|||
} catch (error) { |
|||
this.$message.error(error); |
|||
const { activityType, titleKey, checkedValues, publishPlatform, startTime, endTime } = this; |
|||
for (let i = 0; i < checkedValues.length; i++) { |
|||
const item = checkedValues[i]; |
|||
const currentIndex = this.items.indexOf(item); |
|||
const a = this.items.findIndex(a => a === item); |
|||
const index = this.activityType.findIndex(c => c === a.label); |
|||
if (index === -1) { |
|||
this.activityType.push(currentIndex); |
|||
} |
|||
} |
|||
// 传参 |
|||
const condition = { |
|||
activityType, |
|||
titleKey, |
|||
publishPlatform, |
|||
startTime, |
|||
endTime, |
|||
}; |
|||
await this.$emit('getSelectTeam', condition); |
|||
this.activityType = []; |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|||
<style scoped lang="stylus"></style> |
|||
|
@ -0,0 +1,179 @@ |
|||
<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> |
|||
|
|||
<template slot="time" slot-scope="text, record"> |
|||
<span v-if="record.releaseTime">{{ record.releaseTime}}</span> |
|||
<span v-if="record.closeTime">-{{record.closeTime}}</span> |
|||
</template> |
|||
|
|||
<template slot="platforms" slot-scope="text, record"> |
|||
<a-tag |
|||
:color="record.platforms === 0 ? 'green' : 'blue'" |
|||
>{{ record.platforms === 0 ? '绿谷' : '创时代' }}</a-tag> |
|||
</template> |
|||
|
|||
<template slot="auditStatus" slot-scope="text, record"> |
|||
<a-tag |
|||
:color="record.auditStatus === 2 ? 'green' : record.auditStatus === 1 ? 'red' : 'blue'" |
|||
>{{ record.auditStatus === 2 ? '已通过' : record.auditStatus === 1 ? '未通过' : '审核中' }}</a-tag> |
|||
</template> |
|||
|
|||
<template slot="examine" slot-scope="text, record"> |
|||
<div class="d-flex flex-column align-center"> |
|||
<a-button |
|||
@click="handleApply(record, 2)" |
|||
size="small" |
|||
type="primary" |
|||
v-if="record.auditStatus !== 2" |
|||
>通过</a-button> |
|||
<a-button @click="handleApply(record, 1)" size="small" type="danger" v-else>不通过</a-button> |
|||
<a-textarea class="fill-width mt-3" placeholder="备注" v-model="record.applyRemark" /> |
|||
</div> |
|||
</template> |
|||
</a-table> |
|||
</div> |
|||
<a-empty v-else /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getAuditApply } from 'config/api'; |
|||
const columns = [ |
|||
{ |
|||
title: '序号', |
|||
align: 'center', |
|||
dataIndex: 'id', |
|||
key: 'id', |
|||
width: 80, |
|||
scopedSlots: { customRender: 'id' }, |
|||
}, |
|||
{ |
|||
title: '企业名', |
|||
align: 'center', |
|||
dataIndex: 'companyName', |
|||
key: 'companyName', |
|||
}, |
|||
{ |
|||
title: '申请人姓名', |
|||
align: 'center', |
|||
dataIndex: 'contactName', |
|||
key: 'contactName', |
|||
}, |
|||
{ |
|||
title: '联系方式', |
|||
align: 'center', |
|||
dataIndex: 'contactPhone', |
|||
key: 'contactPhone', |
|||
}, |
|||
{ |
|||
title: '申请时间', |
|||
align: 'center', |
|||
dataIndex: 'time', |
|||
key: 'time', |
|||
}, |
|||
{ |
|||
title: '申请平台', |
|||
align: 'center', |
|||
dataIndex: 'platforms', |
|||
key: 'platforms', |
|||
scopedSlots: { customRender: 'platforms' }, |
|||
}, |
|||
{ |
|||
title: '审核状态', |
|||
align: 'center', |
|||
dataIndex: 'auditStatus', |
|||
key: 'auditStatus', |
|||
scopedSlots: { customRender: 'auditStatus' }, |
|||
}, |
|||
{ |
|||
title: '备注', |
|||
align: 'center', |
|||
dataIndex: 'remark', |
|||
key: 'remark', |
|||
scopedSlots: { customRender: 'remark' }, |
|||
}, |
|||
{ |
|||
title: '审核', |
|||
align: 'center', |
|||
dataIndex: 'examine', |
|||
key: 'examine', |
|||
scopedSlots: { customRender: 'examine' }, |
|||
}, |
|||
]; |
|||
|
|||
export default { |
|||
name: 'ActivityDate', |
|||
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } }, |
|||
|
|||
data() { |
|||
return { |
|||
columns, |
|||
loading: false, |
|||
height: '', |
|||
editVisible: false, |
|||
editItem: null, // 修改的那条 |
|||
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: { |
|||
async closeModal() { |
|||
this.editVisible = false; |
|||
await this.$emit('getSelectTeam'); |
|||
}, |
|||
|
|||
// 换页 |
|||
handleTableChange(pagination) { |
|||
const { current, pageSize } = pagination; |
|||
const condition = { current, pageSize }; |
|||
this.$emit('getSelectTeam', condition); |
|||
}, |
|||
|
|||
// 审核 |
|||
async handleApply(record, auditStatus) { |
|||
try { |
|||
const params = { param: { applyId: record.applyActivityId, auditStatus, remark: record.applyRemark } }; |
|||
const res = await getAuditApply(params); |
|||
const { data, msg, code } = res.data; |
|||
if (code === 200) { |
|||
this.$message.success('审核成功'); |
|||
this.$emit('getSelectTeam'); |
|||
} else { |
|||
throw msg; |
|||
} |
|||
} catch (error) { |
|||
this.$message.error(error || '审核失败'); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="stylus"></style> |
@ -0,0 +1,163 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3 align-center"> |
|||
<!-- 审核状态 --> |
|||
<div class="ml-3 mb-3"> |
|||
<a-select @change="getAuditStatus" placeholder="审核状态" style="width: 150px"> |
|||
<a-select-option |
|||
:key="index" |
|||
:value="state.id" |
|||
v-for="(state, index) in status" |
|||
>{{ state.value }}</a-select-option> |
|||
</a-select> |
|||
</div> |
|||
<!-- 发布平台 --> |
|||
<div class="ml-3 mb-3"> |
|||
<a-select @change="getPlatform" placeholder="发布平台" style="width: 150px"> |
|||
<a-select-option |
|||
:key="platform.id" |
|||
:value="platform.id" |
|||
v-for="platform in platforms" |
|||
>{{ platform.value }}</a-select-option> |
|||
</a-select> |
|||
</div> |
|||
<!-- 单位名称 --> |
|||
<a-input class="ml-3 mb-3" placeholder="单位名称" style="width: 150px" v-model="companyName" /> |
|||
<!-- 申请人姓名 --> |
|||
<a-input class="ml-3 mb-3" placeholder="申请人姓名" style="width: 150px" v-model="contactName" /> |
|||
<!-- 联系方式 --> |
|||
<a-input class="ml-3 mb-3" placeholder="联系方式" style="width: 150px" v-model="contactPhone" /> |
|||
|
|||
<a-button @click="handleTableChange" class="ml-3 mb-3" type="primary">搜索</a-button> |
|||
|
|||
<div class="flex-1"></div> |
|||
<!-- 导出 --> |
|||
<a-popover placement="bottom" trigger="click"> |
|||
<template slot="content"> |
|||
<div class="d-flex flex-column"> |
|||
<a-select |
|||
@change="exportAuditStatus" |
|||
class="mb-3" |
|||
placeholder="审核状态" |
|||
style="width: 150px" |
|||
> |
|||
<a-select-option value>全部</a-select-option> |
|||
<a-select-option |
|||
:key="index" |
|||
:value="state.id" |
|||
v-for="(state, index) in status" |
|||
>{{ state.value }}</a-select-option> |
|||
</a-select> |
|||
<a-select @change="exportPlatform" class="mb-3" placeholder="发布平台" style="width: 150px"> |
|||
<a-select-option value>全部</a-select-option> |
|||
<a-select-option |
|||
:key="platform.id" |
|||
:value="platform.id" |
|||
v-for="platform in platforms" |
|||
>{{ platform.value }}</a-select-option> |
|||
</a-select> |
|||
<a-button @click="handleExport" type="primary">导出</a-button> |
|||
</div> |
|||
</template> |
|||
<a-button type="primary">导出</a-button> |
|||
</a-popover> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getExport } from 'config/api'; |
|||
|
|||
export default { |
|||
name: 'ActivitySearch', |
|||
data() { |
|||
return { |
|||
status: [ |
|||
{ |
|||
id: 0, |
|||
value: '待审核', |
|||
}, |
|||
{ |
|||
id: 1, |
|||
value: '未通过', |
|||
}, |
|||
{ |
|||
id: 2, |
|||
value: '已通过', |
|||
}, |
|||
], |
|||
auditStatus: '', // 审核状态 |
|||
exportStatus: '', // 导出审核状态 |
|||
platforms: [ |
|||
{ |
|||
id: 0, |
|||
value: '绿谷', |
|||
}, |
|||
{ |
|||
id: 1, |
|||
value: '创时代', |
|||
}, |
|||
], |
|||
publishPlatform: '', // 发布平台 |
|||
exportPublishPlatform: '', // 导出发布平台 |
|||
companyName: '', // 单位名称 |
|||
contactName: '', // 申请人姓名 |
|||
contactPhone: '', // 联系方式 |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
// 审核状态 |
|||
getAuditStatus(value) { |
|||
this.auditStatus = value; |
|||
}, |
|||
|
|||
// 导出的审核状态 |
|||
exportAuditStatus(value) { |
|||
this.exportStatus = value; |
|||
}, |
|||
|
|||
// 发布平台 |
|||
getPlatform(value) { |
|||
this.publishPlatform = value; |
|||
}, |
|||
|
|||
// 导出的发布平台 |
|||
exportPlatform(value) { |
|||
this.exportPublishPlatform = value; |
|||
}, |
|||
|
|||
// 查询 |
|||
async handleTableChange() { |
|||
const { auditStatus, publishPlatform, companyName, contactName, contactPhone } = this; |
|||
// 传参 |
|||
const condition = { |
|||
auditStatus, |
|||
publishPlatform, |
|||
companyName, |
|||
contactName, |
|||
contactPhone, |
|||
}; |
|||
await this.$emit('getSelectTeam', condition); |
|||
}, |
|||
|
|||
// 导出 |
|||
async handleExport() { |
|||
try { |
|||
const { query } = this.$route; |
|||
const params = { param: { activityId: query.activityId, auditStatus: this.exportStatus, platforms: this.exportPublishPlatform } }; |
|||
const res = await getExport(params); |
|||
const { data, msg, code } = res.data; |
|||
if (code === 200) { |
|||
this.$message.success('导出成功'); |
|||
window.location.href = data; |
|||
} else { |
|||
throw msg; |
|||
} |
|||
} catch (error) { |
|||
this.$message.error(error || '导出失败'); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="stylus"></style> |
@ -0,0 +1,177 @@ |
|||
<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="[ |
|||
'site', |
|||
{ |
|||
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-date-picker |
|||
@change="onChange" |
|||
format="YYYY-MM-DD HH:mm:ss" |
|||
placeholder="请选择时间" |
|||
show-time |
|||
/> |
|||
</a-form-item> |
|||
|
|||
<!-- 发布部门 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="发布部门" |
|||
> |
|||
<a-input |
|||
placeholder="发布部门" |
|||
v-decorator="[ |
|||
'spreadDepartment', |
|||
{ |
|||
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-textarea |
|||
placeholder="简介" |
|||
v-decorator="[ |
|||
'description', |
|||
]" |
|||
/> |
|||
</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 { addIndustryInfo } 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: 'ActivityAdd', |
|||
props: { visible: { type: Boolean, default: false } }, |
|||
components: { QuillEditor }, |
|||
data() { |
|||
return { |
|||
formItemLayout, |
|||
tailItemLayout, |
|||
form: this.$form.createForm(this, { name: 'activity-add' }), |
|||
maxSize: 2048, |
|||
content: '', |
|||
placeholder: '请输入...', |
|||
time: '', |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
// 举办时间 |
|||
onChange(value, dateString) { |
|||
this.time = dateString; |
|||
}, |
|||
|
|||
// 修改内容 |
|||
changeInput(value) { |
|||
this.content = value; |
|||
}, |
|||
|
|||
// 提交表单 |
|||
handleSubmit(e) { |
|||
e.preventDefault(); |
|||
this.form.validateFieldsAndScroll(async (err, values) => { |
|||
if (!err) { |
|||
try { |
|||
const { content, time } = this; |
|||
const params = { param: values }; |
|||
params.param.time = time; |
|||
params.param.content = content; |
|||
const res = await addIndustryInfo(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,166 @@ |
|||
<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> |
|||
|
|||
<template slot="time" slot-scope="text, record"> |
|||
<span>{{ record.time}}</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 v-dompurify-html="record.content"></span> |
|||
</div> |
|||
</div> |
|||
</a-table> |
|||
</div> |
|||
<a-empty v-else /> |
|||
|
|||
<!-- 编辑 --> |
|||
<activity-edit :editItem="editItem" :editVisible="editVisible" @closeModal="closeModal" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import ActivityEdit from 'components/IndustryInfo/ActivityEdit.vue'; |
|||
import { deleteIndustryInfo } from 'config/api'; |
|||
|
|||
const columns = [ |
|||
{ |
|||
title: '序号', |
|||
align: 'center', |
|||
dataIndex: 'id', |
|||
key: 'id', |
|||
scopedSlots: { customRender: 'id' }, |
|||
}, |
|||
{ |
|||
title: '标题', |
|||
align: 'center', |
|||
dataIndex: 'title', |
|||
key: 'title', |
|||
}, |
|||
{ |
|||
title: '地点', |
|||
align: 'center', |
|||
dataIndex: 'site', |
|||
key: 'site', |
|||
}, |
|||
{ |
|||
title: '活动时间', |
|||
align: 'center', |
|||
dataIndex: 'time', |
|||
key: 'time', |
|||
scopedSlots: { customRender: 'time' }, |
|||
}, |
|||
{ |
|||
title: '公告简介', |
|||
align: 'center', |
|||
dataIndex: 'description', |
|||
key: 'description', |
|||
}, |
|||
{ |
|||
title: '编辑', |
|||
align: 'center', |
|||
dataIndex: 'edit', |
|||
key: 'edit', |
|||
width: 200, |
|||
scopedSlots: { customRender: 'edit' }, |
|||
}, |
|||
]; |
|||
|
|||
export default { |
|||
name: 'ActivityDate', |
|||
components: { |
|||
ActivityEdit, |
|||
}, |
|||
|
|||
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) { |
|||
console.log('record: ', 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 deleteIndustryInfo(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 scoped lang="stylus"></style> |
@ -0,0 +1,181 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<!-- 编辑 --> |
|||
<a-modal :closable="false" footer title="修改行业资讯" v-model="editVisible" 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', |
|||
{ |
|||
initialValue: editItem.title, |
|||
}, |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 地点 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="地点" |
|||
> |
|||
<a-input |
|||
placeholder="地点" |
|||
v-decorator="[ |
|||
'site', |
|||
{ |
|||
initialValue: editItem.site, |
|||
}, |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 时间 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="时间" |
|||
> |
|||
<a-date-picker |
|||
@change="onChange" |
|||
format="YYYY-MM-DD HH:mm:ss" |
|||
show-time |
|||
v-decorator="[ |
|||
'time', |
|||
{ |
|||
initialValue: editItem.time || '', |
|||
}, |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 发布部门 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="发布部门" |
|||
> |
|||
<a-input |
|||
placeholder="发布部门" |
|||
v-decorator="[ |
|||
'spreadDepartment', |
|||
{ |
|||
initialValue: editItem.spreadDepartment, |
|||
}, |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 简介 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="简介" |
|||
> |
|||
<a-textarea |
|||
placeholder="简介" |
|||
v-decorator="[ |
|||
'description', |
|||
{ |
|||
initialValue: editItem.description, |
|||
}, |
|||
]" |
|||
/> |
|||
</a-form-item> |
|||
<!-- 详情 --> |
|||
<a-form-item |
|||
:label-col="formItemLayout.labelCol" |
|||
:wrapper-col="formItemLayout.wrapperCol" |
|||
label="详情" |
|||
> |
|||
<quill-editor |
|||
:max-size="maxSize" |
|||
:value="editItem && (editItem.content ? editItem.content : '')" |
|||
@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 { updateIndustryInfo } 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: 'ActivityEdit', |
|||
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, |
|||
content: '', |
|||
titleCode: '', |
|||
edtiTitleCode: '', |
|||
time: '', |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
// 修改内容 |
|||
changeInput(value) { |
|||
this.content = value; |
|||
}, |
|||
|
|||
// 举办时间 |
|||
onChange(value, dateString) { |
|||
console.log('dateString: ', dateString); |
|||
this.time = dateString; |
|||
}, |
|||
|
|||
// 提交表单 |
|||
handleSubmit(e) { |
|||
e.preventDefault(); |
|||
this.form.validateFieldsAndScroll(async (err, values) => { |
|||
if (!err) { |
|||
try { |
|||
const { time, content, editItem } = this; |
|||
const params = { param: values }; |
|||
params.param.id = editItem.id; |
|||
params.param.time = time ? time : editItem.time; |
|||
params.param.content = content ? content : editItem.content; |
|||
const res = await updateIndustryInfo(params); |
|||
const { data, msg, code } = res.data; |
|||
if (code === 200) { |
|||
this.$message.success('修改成功'); |
|||
this.$emit('closeModal'); |
|||
this.time = ''; |
|||
this.content = ''; |
|||
} else { |
|||
throw msg; |
|||
} |
|||
} catch (error) { |
|||
this.$message.error(error || '修改失败'); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped lang="stylus"></style> |
@ -0,0 +1,80 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<div> |
|||
<!-- 活动标题 --> |
|||
<a-input class="ml-3" placeholder="标题" style="width: 150px" v-model="titleKey" /> |
|||
|
|||
<!-- 地点 --> |
|||
<a-input class="ml-3" placeholder="地点" style="width: 150px" v-model="site" /> |
|||
|
|||
<!-- 发布部门 --> |
|||
<a-input class="ml-3" placeholder="标题" style="width: 150px" v-model="spreadDepartment" /> |
|||
|
|||
<!-- 发布时间 --> |
|||
<a-range-picker @change="onChange" class="ml-3" format="YYYY-MM-DD HH:mm:ss" show-time /> |
|||
|
|||
<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> |
|||
|
|||
<!-- 添加 --> |
|||
<activity-add :visible="visible" @closeModal="closeModal" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import ActivityAdd from 'components/IndustryInfo/ActivityAdd.vue'; |
|||
|
|||
export default { |
|||
name: 'ActivitySearch', |
|||
components: { |
|||
ActivityAdd, |
|||
}, |
|||
data() { |
|||
return { |
|||
visible: false, |
|||
titleKey: '', |
|||
site: '', |
|||
spreadDepartment: '', |
|||
startTime: '', |
|||
endTime: '', |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
showModal() { |
|||
this.visible = true; |
|||
}, |
|||
|
|||
async closeModal() { |
|||
this.visible = false; |
|||
await this.$emit('getBackendSearch'); |
|||
}, |
|||
|
|||
// 发布时间 |
|||
onChange(dates, dateStrings) { |
|||
this.startTime = dateStrings[0]; |
|||
this.endTime = dateStrings[1]; |
|||
}, |
|||
|
|||
async handleTableChange() { |
|||
const { titleKey, site, spreadDepartment, startTime, endTime } = this; |
|||
// 传参 |
|||
const condition = { |
|||
titleKey, |
|||
site, |
|||
spreadDepartment, |
|||
startTime, |
|||
endTime, |
|||
}; |
|||
await this.$emit('getBackendSearch', condition); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|||
<style scoped lang="stylus"></style> |
@ -0,0 +1,263 @@ |
|||
<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" |
|||
@change="handleTableChange" |
|||
:scroll="{ y: height }" |
|||
bordered |
|||
class="white" |
|||
> |
|||
<template slot="id" slot-scope="text, record, index"> |
|||
<span>{{ index + 1 }}</span> |
|||
</template> |
|||
|
|||
<!-- 说明图片 --> |
|||
<template slot="researchDirection" slot-scope="text, record"> |
|||
<img :src="record.researchDirection" class="img" /> |
|||
<a-modal :imgVisible="imgVisible" @cancel="imgVisible = false" footer title="身份证明"> |
|||
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" /> |
|||
</a-modal> |
|||
</template> |
|||
|
|||
<!-- 分类管理 --> |
|||
<!-- <template slot="categoryManage" slot-scope="text, record"> |
|||
<a-button @click="openCategoryManage" size="small" type="primary">仪器分类管理</a-button> |
|||
</template> --> |
|||
|
|||
<!-- 研究院类型 --> |
|||
<template slot="serviceType" slot-scope="text, record"> |
|||
<span v-if=" record.serviceType === 1">创新平台</span> |
|||
<span v-if=" record.serviceType === 2">孵化平台</span> |
|||
<span v-if=" record.serviceType === 3">产业平台</span> |
|||
</template> |
|||
|
|||
<template slot="edit" slot-scope="text, record"> |
|||
<a-icon @click="showEditModal" 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 v-dompurify-html="record.direction"></span></div> |
|||
</div> |
|||
<div slot="expandedRowRender" slot-scope="record" style="margin: 0"> |
|||
<div>简介: |
|||
<span v-dompurify-html="record.description"></span></div> |
|||
</div> --> |
|||
|
|||
|
|||
|
|||
<div |
|||
class="d-flex flex-nowrap justify-space-between" |
|||
slot="expandedRowRender" |
|||
slot-scope="record" |
|||
style="margin: 0" |
|||
> |
|||
<div class="ml-3">分类:<span v-dompurify-html="record.direction"></span></div> |
|||
<div class="ml-3">备注:{{ record.description }}</div> |
|||
</div> |
|||
</a-table> |
|||
</div> |
|||
<a-empty v-else /> |
|||
|
|||
<!-- 编辑 --> |
|||
<institute-edit :editVisible="editVisible" @closeModal="closeModal" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import InstituteEdit from "components/Institute/InstituteEdit.vue"; |
|||
import { deleteInstitute } from 'config/api'; |
|||
|
|||
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: 'phone', |
|||
key: 'phone', |
|||
}, |
|||
// { |
|||
// title: '简介', |
|||
// align: 'center', |
|||
// dataIndex: 'description', |
|||
// key: 'description', |
|||
// }, |
|||
// { |
|||
// title: '研究方向', |
|||
// align: 'center', |
|||
// dataIndex: 'direction', |
|||
// key: 'direction', |
|||
// }, |
|||
{ |
|||
title: '可做实验', |
|||
align: 'center', |
|||
dataIndex: 'experiments', |
|||
key: 'experiments', |
|||
}, |
|||
{ |
|||
title: '图片', |
|||
align: 'center', |
|||
dataIndex: 'picId', |
|||
key: 'picId', |
|||
}, |
|||
{ |
|||
title: '项目分类', |
|||
align: 'center', |
|||
dataIndex: 'projectKind', |
|||
key: 'projectKind', |
|||
}, |
|||
{ |
|||
title: '研究院类型', |
|||
align: 'center', |
|||
dataIndex: 'type', |
|||
key: 'type', |
|||
}, |
|||
{ |
|||
title: '校验', |
|||
align: 'center', |
|||
dataIndex: 'vertify', |
|||
key: 'vertify', |
|||
}, |
|||
{ |
|||
title: '编辑', |
|||
align: 'center', |
|||
dataIndex: 'edit', |
|||
key: 'edit', |
|||
scopedSlots: { customRender: 'edit' }, |
|||
}, |
|||
]; |
|||
|
|||
// const lists = [ |
|||
// { |
|||
// id:'001', |
|||
// chineseName:'传控科技', |
|||
// englishName: 'zhou', |
|||
// performance:'传控科技', |
|||
// researchDirection:'assets/logo.png', |
|||
// equipmentOwnership: '软件', |
|||
// category:'A', |
|||
// remark: '无' |
|||
// }, |
|||
// { |
|||
// id:'002', |
|||
// chineseName:'中绿环保', |
|||
// englishName: 'lili', |
|||
// performance:'中绿环保', |
|||
// researchDirection:'assets/logo.png', |
|||
// equipmentOwnership:'软件', |
|||
// category:'B', |
|||
// remark: '无' |
|||
// } |
|||
// ]; |
|||
|
|||
export default { |
|||
name: "InstituteDate", |
|||
components: { |
|||
InstituteEdit, |
|||
}, |
|||
|
|||
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } }, |
|||
|
|||
data() { |
|||
return { |
|||
columns, |
|||
loading: false, |
|||
editingKey: '', |
|||
height: '', |
|||
editVisible: false, |
|||
imgVisible: false, |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
let th = 250; |
|||
let wh = window.innerHeight; |
|||
this.height = wh - th; |
|||
window.onresize = () => { |
|||
return (() => { |
|||
wh = window.innerHeight; |
|||
this.height = wh - th; |
|||
})(); |
|||
}; |
|||
}, |
|||
|
|||
methods: { |
|||
showEditModal(){ |
|||
this.editVisible = true; |
|||
}, |
|||
|
|||
async closeModal(){ |
|||
this.editVisible = false; |
|||
await this.$emit('getInstituteSearchBack'); |
|||
}, |
|||
|
|||
// 打开团队成员 |
|||
openTeamMember(){ |
|||
const { query } = this.$route; |
|||
this.$router.push({ path: '/RD-team-member', query }); |
|||
}, |
|||
|
|||
// 打开分类管理 |
|||
openCategoryManage(){ |
|||
const { query } = this.$route; |
|||
this.$router.push({ path: '/category-manage', query }); |
|||
}, |
|||
|
|||
handleTableChange(pagination) { |
|||
const { current, pageSize } = pagination; |
|||
const condition = { current, pageSize }; |
|||
this.$emit('getInstituteSearchBack', condition); |
|||
}, |
|||
|
|||
// 删除 |
|||
async onDelete(id) { |
|||
try { |
|||
const params = { param:{id}}; |
|||
const res = await deleteInstitute(params); |
|||
const { data, msg, code } = res.data; |
|||
if (code === 200) { |
|||
this.$message.success('删除成功'); |
|||
this.$emit('getInstituteSearchBack'); |
|||
// const arr = [...this.lists]; |
|||
// this.lists = arr.filter(item => item.id !== id); |
|||
// 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,204 +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="researchDirection" slot-scope="text, record"> |
|||
<img :src="record.researchDirection" class="img" /> |
|||
<a-modal :imgVisible="imgVisible" @cancel="imgVisible = false" footer title="身份证明"> |
|||
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" /> |
|||
</a-modal> |
|||
</template> |
|||
|
|||
<!-- 分类管理 --> |
|||
<template slot="categoryManage" slot-scope="text, record"> |
|||
<a-button @click="openCategoryManage" size="small" type="primary">仪器分类管理</a-button> |
|||
</template> |
|||
|
|||
<template slot="edit" slot-scope="text, record"> |
|||
<a-icon @click="showEditModal" 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 |
|||
class="d-flex flex-nowrap justify-space-between" |
|||
slot="expandedRowRender" |
|||
slot-scope="record" |
|||
style="margin: 0" |
|||
> |
|||
<div>设备所属:{{ record.equipmentOwnership }}</div> |
|||
<div class="ml-3">分类:{{ record.category }}</div> |
|||
<div class="ml-3">备注:{{ record.remark }}</div> |
|||
</div> |
|||
</a-table> |
|||
</div> |
|||
<a-empty v-else /> |
|||
|
|||
<!-- 编辑 --> |
|||
<sharing-edit :editVisible="editVisible" @closeModal="closeModal" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import SharingEdit from "components/Sharing/SharingEdit.vue"; |
|||
|
|||
const columns = [ |
|||
{ |
|||
title: '序号', |
|||
align: 'center', |
|||
dataIndex: 'id', |
|||
key: 'id', |
|||
width: '7%', |
|||
scopedSlots: { customRender: 'id' }, |
|||
}, |
|||
{ |
|||
title: '中文名称', |
|||
align: 'center', |
|||
dataIndex: 'chineseName', |
|||
key: 'chineseName', |
|||
}, |
|||
{ |
|||
title: '英文名称', |
|||
align: 'center', |
|||
dataIndex: 'englishName', |
|||
key: 'englishName', |
|||
}, |
|||
{ |
|||
title: '主要性能指标及功能用途', |
|||
align: 'center', |
|||
dataIndex: 'performance', |
|||
key: 'performance', |
|||
}, |
|||
{ |
|||
title: '说明图片', |
|||
align: 'center', |
|||
dataIndex: 'researchDirection', |
|||
key: 'researchDirection', |
|||
scopedSlots: { customRender: 'researchDirection' }, |
|||
}, |
|||
{ |
|||
title: '分类管理', |
|||
align: 'center', |
|||
dataIndex: 'categoryManage', |
|||
key: 'categoryManage', |
|||
scopedSlots: { customRender: 'categoryManage' }, |
|||
}, |
|||
{ |
|||
title: '编辑', |
|||
align: 'center', |
|||
dataIndex: 'edit', |
|||
key: 'edit', |
|||
scopedSlots: { customRender: 'edit' }, |
|||
}, |
|||
]; |
|||
|
|||
const lists = [ |
|||
{ |
|||
id:'001', |
|||
chineseName:'传控科技', |
|||
englishName: 'zhou', |
|||
performance:'传控科技', |
|||
researchDirection:'assets/logo.png', |
|||
equipmentOwnership: '软件', |
|||
category:'A', |
|||
remark: '无' |
|||
}, |
|||
{ |
|||
id:'002', |
|||
chineseName:'中绿环保', |
|||
englishName: 'lili', |
|||
performance:'中绿环保', |
|||
researchDirection:'assets/logo.png', |
|||
equipmentOwnership:'软件', |
|||
category:'B', |
|||
remark: '无' |
|||
} |
|||
]; |
|||
|
|||
export default { |
|||
name: "SharingDate", |
|||
components: { |
|||
SharingEdit, |
|||
}, |
|||
data() { |
|||
this.cacheData = lists.map(item => ({ ...item })); |
|||
return { |
|||
columns, |
|||
lists, |
|||
loading: false, |
|||
editingKey: '', |
|||
height: '', |
|||
editVisible: false, |
|||
imgVisible: false, |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150; |
|||
}, |
|||
|
|||
methods: { |
|||
showEditModal(){ |
|||
this.editVisible = true; |
|||
}, |
|||
|
|||
closeModal(){ |
|||
this.editVisible = false; |
|||
}, |
|||
|
|||
// 打开团队成员 |
|||
openTeamMember(){ |
|||
const { query } = this.$route; |
|||
this.$router.push({ path: '/RD-team-member', query }); |
|||
}, |
|||
|
|||
// 打开分类管理 |
|||
openCategoryManage(){ |
|||
const { query } = this.$route; |
|||
this.$router.push({ path: '/category-manage', query }); |
|||
}, |
|||
|
|||
// 删除 |
|||
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> |
@ -0,0 +1,91 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<!-- 团队名称 --> |
|||
<div> |
|||
<a-input |
|||
|
|||
placeholder="服务名称" |
|||
style="width: 150px" |
|||
v-model="name" |
|||
/> |
|||
|
|||
服务类型: |
|||
<a-select |
|||
@change="handleChangeSelect('serviceType',$event)" |
|||
class="ml-3" |
|||
style="width: 150px" |
|||
allow-clear |
|||
> |
|||
<a-select-option |
|||
:key="serviceType.id" |
|||
:value="serviceType.id" |
|||
v-for="serviceType in serviceTypes" |
|||
>{{ serviceType.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">增加</a-button> |
|||
|
|||
<!-- 添加 --> |
|||
<r-d-member-add :visible="visible" @closeModal="closeModal" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import RDMemberAdd from "components/innovativeService/innovativeServiceAdd.vue"; |
|||
|
|||
export default { |
|||
name: "innovativeServiceSearch", |
|||
components: { |
|||
RDMemberAdd, |
|||
}, |
|||
data() { |
|||
return { |
|||
visible: false, |
|||
name: '', |
|||
serviceTypes: [ |
|||
{ id:1, value:'创新平台' }, |
|||
{ id:2, value:'孵化平台' }, |
|||
{ id:3, value:'产业平台' }, |
|||
], |
|||
} |
|||
}, |
|||
methods: { |
|||
showModal(){ |
|||
this.visible = true; |
|||
}, |
|||
|
|||
closeModal(){ |
|||
this.visible = false; |
|||
}, |
|||
|
|||
handleChangeSelect(type, value) { |
|||
this[type] = value; |
|||
}, |
|||
|
|||
handleChangeName(value) { |
|||
console.log('value: ', value); |
|||
this.name = value; |
|||
}, |
|||
|
|||
async handleTableChange() { |
|||
console.log('搜索'); |
|||
const { name,serviceType} = this; |
|||
console.log(name,serviceType) |
|||
// 传参 |
|||
const condition = { |
|||
name,serviceType |
|||
} |
|||
await this.$emit('getInnovativeServiceSearch',condition) |
|||
this.activityType = []; |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|||
<style scoped lang="stylus"></style> |
@ -1,19 +1,70 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<spin-off-search /> |
|||
<spin-off-date /> |
|||
<spin-off-search @getCreatingPlatformSearch="getCreatingPlatformSearch" /> |
|||
<spin-off-date :pagination="pagination" :lists="lists" @getCreatingPlatformSearch="getCreatingPlatformSearch"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import SpinOffSearch from "components/SpinOff/SpinOffSearch.vue"; |
|||
import SpinOffDate from "components/SpinOff/SpinOffDate.vue"; |
|||
import { getCreatingPlatformSearch } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "DerivativeSpinOffs", |
|||
components: { |
|||
SpinOffSearch, |
|||
SpinOffDate, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.getCreatingPlatformSearch() |
|||
}, |
|||
|
|||
methods: { |
|||
async getCreatingPlatformSearch(condition){ |
|||
try { |
|||
const params = { |
|||
param: { |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
|
|||
if(condition){ |
|||
if(condition.companyName){ |
|||
params.param.companyName = condition.companyName |
|||
} |
|||
if(condition.companyType){ |
|||
params.param.companyType = condition.companyType |
|||
} |
|||
} |
|||
|
|||
const res = await getCreatingPlatformSearch(params); |
|||
const { code, msg, data } = res.data; |
|||
if (code === 200) { |
|||
console.log(data) |
|||
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,85 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<enroll-search @getSelectTeam="getSelectTeam" /> |
|||
<enroll-date :lists="lists" :pagination="pagination" @getSelectTeam="getSelectTeam" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import EnrollSearch from 'components/Enroll/EnrollSearch.vue'; |
|||
import EnrollDate from 'components/Enroll/EnrollDate.vue'; |
|||
import { getQueryApply } from 'config/api'; |
|||
|
|||
export default { |
|||
name: 'InnovationPolicy', |
|||
components: { |
|||
EnrollSearch, |
|||
EnrollDate, |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.getSelectTeam(); |
|||
}, |
|||
|
|||
methods: { |
|||
/** |
|||
* 后台查看活动下所有申请的人员列表 |
|||
* @param { String } activityId 活动id |
|||
*/ |
|||
async getSelectTeam(condition) { |
|||
try { |
|||
const { query } = this.$route; |
|||
const params = { |
|||
param: { |
|||
activityId: query.activityId, |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if (condition) { |
|||
if (condition.auditStatus) { |
|||
params.param.auditStatus = condition.auditStatus; |
|||
} |
|||
if (condition.publishPlatform) { |
|||
params.param.publishPlatform = condition.publishPlatform; |
|||
} |
|||
if (condition.companyName) { |
|||
params.param.companyName = condition.companyName; |
|||
} |
|||
if (condition.contactName) { |
|||
params.param.contactName = condition.contactName; |
|||
} |
|||
if (condition.contactPhone) { |
|||
params.param.contactPhone = condition.contactPhone; |
|||
} |
|||
} |
|||
const res = await getQueryApply(params); |
|||
const { code, msg, data } = res.data; |
|||
if (code === 200) { |
|||
let arr = data.list; |
|||
arr.forEach(item => { |
|||
item.applyRemark = ''; |
|||
}); |
|||
this.lists = [...arr]; |
|||
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,66 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<sharing-search /> |
|||
<sharing-date /> |
|||
<institute-search @getInstituteSearchBack="getInstituteSearchBack" /> |
|||
<institute-date :pagination="pagination" :lists="lists" @getInstituteSearchBack="getInstituteSearchBack" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import SharingSearch from "components/Sharing/SharingSearch.vue"; |
|||
import SharingDate from "components/Sharing/SharingDate.vue"; |
|||
import InstituteSearch from "components/Institute/InstituteSearch.vue"; |
|||
import InstituteDate from "components/Institute/InstituteDate.vue"; |
|||
import { getInstituteSearchBack } from "config/api"; |
|||
|
|||
export default { |
|||
name: "ResourceSharing", |
|||
components: { |
|||
SharingSearch, |
|||
SharingDate, |
|||
} |
|||
InstituteSearch, |
|||
InstituteDate, |
|||
}, |
|||
|
|||
data(){ |
|||
return{ |
|||
lists: [], |
|||
pagination: { current: 1, pageSize: 10 }, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.getInstituteSearchBack() |
|||
}, |
|||
|
|||
methods: { |
|||
async getInstituteSearchBack(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if(condition){ |
|||
if(condition.name){ |
|||
params.param.name = condition.name |
|||
} |
|||
} |
|||
console.log('params',params) |
|||
const res = await getInstituteSearchBack(params); |
|||
const { code, msg, data } = res.data; |
|||
if (code === 200) { |
|||
console.log(data) |
|||
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 +1,78 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<r-d-member-search /> |
|||
<r-d-member-date /> |
|||
<!-- <r-d-member-search /> |
|||
<r-d-member-date /> --> |
|||
<innovative-service-search @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
|||
<innovative-service-date :pagination="pagination" :lists="lists" @getInnovativeServiceSearch="getInnovativeServiceSearch" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
// @ is an alias to /src |
|||
import RDMemberSearch from "components/RDMember/RDMemberSearch.vue"; |
|||
import RDMemberDate from "components/RDMember/RDMemberDate.vue"; |
|||
import innovativeServiceSearch from "components/innovativeService/innovativeServiceSearch.vue"; |
|||
import innovativeServiceDate from "components/innovativeService/innovativeServiceDate.vue"; |
|||
import { getInnovativeServiceSearch } from 'config/api'; |
|||
|
|||
export default { |
|||
name: "RDTeamMember", |
|||
components: { |
|||
RDMemberSearch, |
|||
RDMemberDate, |
|||
innovativeServiceSearch, |
|||
innovativeServiceDate, |
|||
}, |
|||
|
|||
data(){ |
|||
return{ |
|||
lists: [], |
|||
pagination:{ current: 1,pageSize: 10}, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.getInnovativeServiceSearch() |
|||
}, |
|||
|
|||
methods: { |
|||
async getInnovativeServiceSearch(condition) { |
|||
try { |
|||
const params = { |
|||
param: { |
|||
pageNum: (condition && condition.current) || 1, |
|||
pageSize: (condition && condition.pageSize) || 10, |
|||
}, |
|||
}; |
|||
if(condition){ |
|||
if(condition.id){ |
|||
params.param.id = condition.id |
|||
} |
|||
if(condition.name){ |
|||
params.param.name = condition.name |
|||
} |
|||
if(condition.recStatus){ |
|||
params.param.recStatus = condition.recStatus |
|||
} |
|||
if(condition.serviceType){ |
|||
params.param.serviceType = condition.serviceType |
|||
} |
|||
} |
|||
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,20 +1,21 @@ |
|||
<template> |
|||
<div class="pa-3 white fill-height d-flex flex-column"> |
|||
<enterprise-search /> |
|||
<enterprise-date /> |
|||
<!-- <user-search /> |
|||
<user-date />--> |
|||
开发中... ... |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
// @ is an alias to /src |
|||
import EnterpriseSearch from "components/Enterprise/EnterpriseSearch.vue"; |
|||
import EnterpriseDate from "components/Enterprise/EnterpriseDate.vue"; |
|||
import UserSearch from 'components/User/UserSearch.vue'; |
|||
import UserDate from 'components/User/UserDate.vue'; |
|||
|
|||
export default { |
|||
name: "Home", |
|||
name: 'Home', |
|||
components: { |
|||
EnterpriseSearch, |
|||
EnterpriseDate |
|||
} |
|||
UserSearch, |
|||
UserDate, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
File diff suppressed because it is too large
Loading…
Reference in new issue