Browse Source

添加企业简报

master
lucky 4 years ago
parent
commit
7dabf3d70c
  1. 292
      src/components/Briefing/ActivityAdd.vue
  2. 309
      src/components/Briefing/ActivityDate.vue
  3. 337
      src/components/Briefing/ActivityEdit.vue
  4. 66
      src/components/Briefing/ActivitySearch.vue
  5. 1
      src/components/BtnCom/BtnCon.vue
  6. 3
      src/config/api.js
  7. 12
      src/router/index.js
  8. 5
      src/views/EventAnnouncement/EventAnnouncement.vue
  9. 85
      src/views/EventAnnouncement/EventRegistration/EventRegistration.vue
  10. 84
      src/views/ReportAnnouncement/ReportAnnouncement.vue
  11. 85
      src/views/ReportRegistration/ReportRegistration.vue

292
src/components/Briefing/ActivityAdd.vue

@ -0,0 +1,292 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal
:maskClosable="false"
@cancel="$emit('closeModal')"
destroyOnClose
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 { saveActivity } 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' }),
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 saveActivity(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>

309
src/components/Briefing/ActivityDate.vue

@ -0,0 +1,309 @@
<template>
<div class="main flex-1">
<a-spin :spinning="showEdit">
<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.activityId"
:scroll="{ y: height }"
@change="handleTableChange"
@expand="getDetail"
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="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.remark" />
</div>
</template>
<template slot="edit" slot-scope="text, record">
<a-icon
@click="showEditModal(record)"
class="pointer mr-5"
theme="twoTone"
type="edit"
/>
<a-popconfirm
@confirm="() => onDelete(record.activityId)"
title="确定要删除这一条?"
v-if="lists.length"
>
<a-icon class="ml-2 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm>
</template>
<div
class="d-flex flex-column"
slot="expandedRowRender"
slot-scope="record"
style="margin: 0"
>
<a-spin :spinning="spinning" tip="详情加载中...">
<div class="d-flex flex-nowrap justify-space-between mb-3">
<div class="d-flex flex-row">
<span class="font-bold-14">主讲人</span>
<span v-if="record.info && record.info.name">{{ record.info.name }}</span>
<span v-else>暂无</span>
</div>
<div class="d-flex flex-row">
<span class="font-bold-14">
活动类型
<a-tag
color="blue"
v-if="record.info && record.info.activityType !== null"
>{{ record.info.activityType === 0 ? '路演' : record.info.activityType === 1 ? '讲座' : record.info.activityType === 2 ? '沙龙' : '' }}</a-tag>
</span>
</div>
<div class="d-flex flex-row">
<span class="font-bold-14">培训对象</span>
<span v-if="record.info && record.info.trainees">{{ record.info.trainees }}</span>
<span v-else>暂无</span>
</div>
</div>
<div class="d-flex flex-nowrap justify-space-between mb-3">
<div class="d-flex flex-row">
<span class="font-bold-14">组织单位</span>
<span
v-if="record.info && record.info.organization"
>{{ record.info.organization }}</span>
<span v-else>暂无</span>
</div>
<div class="d-flex flex-row">
<span class="font-bold-14">
发布平台
<a-tag
color="green"
v-if="record.info && record.info.publishPlatform !== null"
>{{ record.info.publishPlatform === 0 ? '绿谷' : record.info.publishPlatform === 1 ? '创时代' : '' }}</a-tag>
</span>
</div>
</div>
<div class="mb-3">
<span class="font-bold-14">活动结束内容</span>
<br />
<span v-if="record.info && record.info.endContent">{{ record.info.endContent }}</span>
<span v-else>暂无内容</span>
</div>
<div class="mb-3">
<span class="font-bold-14">公告简介</span>
<br />
<span v-if="record.intro">{{ record.intro }}</span>
<span v-else>暂无内容</span>
</div>
<div>
<span class="font-bold-14">详情</span>
<span v-dompurify-html="record.info.content" v-if="record.info.content"></span>
<span v-else>暂无内容</span>
</div>
</a-spin>
</div>
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<activity-edit
:editItem="editItem"
:editVisible="editVisible"
@closeModal="closeModal"
@getDetail="getDetail"
@getSelectTeam="getSelectTeam"
/>
</a-spin>
</div>
</template>
<script>
import ActivityEdit from 'components/Activity/ActivityEdit.vue';
import { getQueryDetail, auditApply, deleteActivity } from 'config/api';
const columns = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
width: 80,
scopedSlots: { customRender: 'id' },
},
{
title: '标题',
align: 'center',
dataIndex: 'title',
key: 'title',
},
{
title: '地点',
align: 'center',
dataIndex: 'address',
key: 'address',
},
{
title: '活动时间',
align: 'center',
dataIndex: 'time',
key: 'time',
scopedSlots: { customRender: 'time' },
},
{
title: '审批状态',
align: 'center',
dataIndex: 'auditStatus',
key: 'auditStatus',
width: 100,
scopedSlots: { customRender: 'auditStatus' },
},
{
title: '审核',
align: 'center',
dataIndex: 'examine',
key: 'examine',
scopedSlots: { customRender: 'examine' },
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
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, //
spinning: false,
showEdit: 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 showEditModal(record) {
this.showEdit = true;
await this.getDetail(true, record);
this.showEdit = false;
this.editItem = record;
this.editVisible = true;
},
closeModal() {
this.editVisible = false;
},
async getSelectTeam() {
await this.$emit('getSelectTeam');
},
//
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
this.$emit('getSelectTeam', condition);
},
//
async getDetail(expanded, record) {
if (!expanded) return;
try {
this.spinning = true;
const params = { param: { activityId: record.activityId } };
const res = await getQueryDetail(params);
const { data, msg, code } = res.data;
this.spinning = false;
if (code === 200) {
const item = this.lists.find(item => item.activityId === record.activityId);
item.info = data;
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '查询失败');
}
},
//
async handleApply(record, auditStatus) {
try {
const params = { param: { activityId: record.activityId, auditStatus, remark: record.remark } };
const res = await auditApply(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 || '审核失败');
}
},
//
async onDelete(activityId) {
try {
const params = { param: { activityId } };
const res = await deleteActivity(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>

337
src/components/Briefing/ActivityEdit.vue

@ -0,0 +1,337 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal
:mask-closable="false"
@cancel="$emit('closeModal')"
destroy-on-close
footer
title="修改企业简报"
v-model="editVisible"
width="700px"
>
<a-form :form="form" @submit="handleSubmit" v-if="editVisible && editItem">
<!-- 标题 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="标题"
>
<a-input
placeholder="标题"
v-decorator="[
'title',
{
initialValue: editItem.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',
{
initialValue: editItem.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
:default-value="[editItem.releaseTime ? editItem.releaseTime : '',editItem.closeTime ? editItem.closeTime : '']"
@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%"
v-decorator="[
'activityType',
{
initialValue: editItem.info && editItem.info.activityType,
},
]"
>
<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',
{
initialValue: (editItem.info && editItem.info.name) ? editItem.info.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',
{
initialValue: (editItem.info && editItem.info.organization) ? editItem.info.organization : '',
},
]"
/>
</a-form-item>
<!-- 其他事宜 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="其他事宜"
>
<a-input
placeholder="其他事宜"
v-decorator="[
'other',
{
initialValue: (editItem.info && editItem.info.other) ? editItem.info.other : '',
},
]"
/>
</a-form-item>
<!-- 会议主题 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="会议主题"
>
<a-input
placeholder="会议主题"
v-decorator="[
'theme',
{
initialValue: (editItem.info && editItem.info.theme) ? editItem.info.theme : '',
},
]"
/>
</a-form-item>
<!-- 培训对象 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="培训对象"
>
<a-input
placeholder="培训对象"
v-decorator="[
'trainees',
{
initialValue: (editItem.info && editItem.info.trainees) ? editItem.info.trainees : '',
},
]"
/>
</a-form-item>
<!-- 报名方式 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="报名方式"
>
<a-input
placeholder="报名方式"
v-decorator="[
'way',
{
initialValue: (editItem.info && editItem.info.way) ? editItem.info.way : '',
},
]"
/>
</a-form-item>
<!-- 活动结束内容 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="活动结束内容"
>
<a-textarea
placeholder="活动结束内容"
v-decorator="[
'endContent',
{
initialValue: (editItem.info && editItem.info.endContent) ? editItem.info.endContent : '',
},
]"
/>
</a-form-item>
<!-- 详情 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="详情"
required
>
<quill-editor
:max-size="maxSize"
:value="(editItem && editItem.info && editItem.info.content) ? editItem.info.content : 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 { updateActivity } 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',
components: { QuillEditor },
props: { editVisible: { type: Boolean, default: false }, editItem: { type: Object, default: () => {} } },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'activity-edit' }),
types: [
{ id: 0, name: '路演' },
{ id: 1, name: '沙龙' },
{ id: 2, name: '论坛' },
],
activityType: null,
maxSize: 2048,
content: null,
releaseTime: null, //
closeTime: null, //
};
},
methods: {
//
changeInput(value) {
this.content = value;
},
//
changeType(value) {
this.activityType = value;
},
//
onChange(dates, dateStrings) {
this.releaseTime = dateStrings[0];
this.closeTime = dateStrings[1];
},
//
verificationTime() {
if (!this.releaseTime || !this.closeTime) {
this.$message.error('时间不能为空');
return false;
} else {
return true;
}
},
//
handleSubmit(e) {
e.preventDefault();
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
try {
if (!this.verificationTime()) return;
console.log('values: ', values);
const { releaseTime, closeTime, content, activityType, editItem } = this;
const params = { param: values };
params.param.activityId = editItem.activityId;
params.param.releaseTime = releaseTime || editItem.releaseTime;
params.param.closeTime = closeTime || editItem.closeTime;
params.param.content = content || editItem.info.content;
params.param.activityType = activityType || editItem.activityType;
console.log('params: ', params);
const res = await updateActivity(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('修改成功');
this.$emit('getSelectTeam');
this.releaseTime = '';
this.closeTime = '';
this.content = '';
this.activityType = '';
} else {
throw msg;
}
this.$emit('closeModal');
} catch (error) {
this.$emit('closeModal');
this.$message.error(error || '修改失败');
}
}
});
},
},
};
</script>
<style scoped lang="stylus"></style>

66
src/components/Briefing/ActivitySearch.vue

@ -0,0 +1,66 @@
<template>
<div class="d-flex flex-wrap pb-3 align-center">
<!-- 活动标题 -->
<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 mb-3" type="primary">增加</a-button>
<!-- 添加 -->
<activity-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import ActivityAdd from 'components/Activity/ActivityAdd.vue';
// import { selLikeTeam } from 'config/api';
export default {
name: 'ActivitySearch',
components: { ActivityAdd },
data() {
return {
visible: false,
titleKey: '',
activityType: [],
startTime: '',
endTime: '',
};
},
methods: {
//
onChangeTime(dates, dateStrings) {
this.startTime = dateStrings[0];
this.endTime = dateStrings[1];
},
showModal() {
this.visible = true;
},
closeModal() {
this.visible = false;
},
async handleTableChange() {
const { titleKey, startTime, endTime } = this;
//
const condition = {
titleKey,
startTime,
endTime,
};
await this.$emit('getSelectTeam', condition);
},
},
};
</script>
<style scoped lang="stylus"></style>

1
src/components/BtnCom/BtnCon.vue

@ -8,6 +8,7 @@
<!-- <div @click="jump('/banner-manage-m')" class="btn">(移动端)轮播图管理</div> -->
<div @click="jump('/communication-community')" class="btn">交流社区</div>
<div @click="jump('/event-announcement')" class="btn">活动公告</div>
<div @click="jump('/report-announcement')" class="btn">企业简报</div>
<div @click="jump('/innovation-policy')" class="btn">创新政策</div>
<div @click="jump('/talent-recruitment')" class="btn">人才招聘</div>
<div @click="jump('/cooperative-partner')" class="btn">合作伙伴</div>

3
src/config/api.js

@ -74,6 +74,9 @@ export const saveActivity = params => axios.post(`${activity}/save`, params);
// 修改活动公告
export const updateActivity = params => axios.post(`${activity}/update`, params);
// 删除活动公告
export const deleteActivity = params => axios.post(`${activity}/del`, params);
// 查看活动下所有申请的人员列表
export const getQueryApply = params => axios.post(`${activity}/query/apply`, params);

12
src/router/index.js

@ -65,6 +65,18 @@ const routes = [
name: 'EventRegistration',
component: () => import(/* webpackChunkName: "event-registration" */ 'views/EventRegistration/EventRegistration.vue'),
},
// 企业简报--活动通知
{
path: '/report-announcement',
name: 'ReportAnnouncement',
component: () => import(/* webpackChunkName: "report-announcement" */ 'views/ReportAnnouncement/ReportAnnouncement.vue'),
},
// 企业简报--活动报名
{
path: '/report-registration',
name: 'ReportRegistration',
component: () => import(/* webpackChunkName: "report-registration" */ 'views/ReportRegistration/ReportRegistration.vue'),
},
// 创新政策
{
path: '/innovation-policy',

5
src/views/EventAnnouncement/EventAnnouncement.vue

@ -30,8 +30,8 @@ export default {
methods: {
/**
* 根据团队id查看研发团队相关信息
* @param { String } competeTimeId 第几届信息的id
* 后台查询活动公告
* @param { String } informReport 通知或报道 (0通知 1报道)
*/
async getSelectTeam(condition) {
try {
@ -39,6 +39,7 @@ export default {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
informReport: 0,
},
};
if (condition) {

85
src/views/EventAnnouncement/EventRegistration/EventRegistration.vue

@ -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>

84
src/views/ReportAnnouncement/ReportAnnouncement.vue

@ -0,0 +1,84 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<activity-search @getSelectTeam="getSelectTeam" />
<activity-date :lists="lists" :pagination="pagination" @getSelectTeam="getSelectTeam" />
</div>
</template>
<script>
import ActivitySearch from 'components/Briefing/ActivitySearch.vue';
import ActivityDate from 'components/Briefing/ActivityDate.vue';
import { getQueryBack } from 'config/api';
export default {
name: 'InnovationPolicy',
components: {
ActivitySearch,
ActivityDate,
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() {
this.getSelectTeam();
},
methods: {
/**
* 后台查询活动公告
* @param { String } informReport 通知或报道 (0通知 1报道)
*/
async getSelectTeam(condition) {
try {
const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
informReport: 1,
},
};
if (condition) {
if (condition.activityType) {
params.param.activityType = condition.activityType;
}
if (condition.titleKey) {
params.param.titleKey = condition.titleKey;
}
if (condition.platValue) {
params.param.platValue = condition.platValue;
}
if (condition.startTime) {
params.param.startTime = condition.startTime;
}
if (condition.endTime) {
params.param.endTime = condition.endTime;
}
}
const res = await getQueryBack(params);
const { code, msg, data } = res.data;
if (code === 200) {
let arr = data.list;
arr.forEach(item => {
item.remark = '';
});
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>

85
src/views/ReportRegistration/ReportRegistration.vue

@ -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>
Loading…
Cancel
Save