Browse Source

活动公告,创新政策

master
lucky 4 years ago
parent
commit
3a4fad47c6
  1. 2
      src/components/Activity/ActivityAdd.vue
  2. 235
      src/components/Activity/ActivityDate.vue
  3. 296
      src/components/Activity/ActivityEdit.vue
  4. 179
      src/components/Enroll/EnrollDate.vue
  5. 163
      src/components/Enroll/EnrollSearch.vue
  6. 9
      src/components/IndustryInfo/ActivityEdit.vue
  7. 92
      src/components/Page/PageDate.vue
  8. 192
      src/components/Policy/PolicyDate.vue
  9. 121
      src/components/Policy/PolicySearch.vue
  10. 12
      src/config/api.js
  11. 2
      src/plugins/ant-design-vue.js
  12. 8
      src/router/index.js
  13. 85
      src/views/EventRegistration/EventRegistration.vue
  14. 55
      src/views/InnovationPolicy/InnovationPolicy.vue

2
src/components/Activity/ActivityAdd.vue

@ -213,7 +213,7 @@ export default {
return { return {
formItemLayout, formItemLayout,
tailItemLayout, tailItemLayout,
form: this.$form.createForm(this, { name: 'r-d-add' }), form: this.$form.createForm(this, { name: 'activity-add' }),
types: [ types: [
{ id: 0, name: '路演' }, { id: 0, name: '路演' },
{ id: 1, name: '沙龙' }, { id: 1, name: '沙龙' },

235
src/components/Activity/ActivityDate.vue

@ -1,119 +1,134 @@
<template> <template>
<div class="main flex-1"> <div class="main flex-1">
<div style="width:100%" v-if="lists && lists.length > 0"> <a-spin :spinning="showEdit">
<a-table <div style="width:100%" v-if="lists && lists.length > 0">
:columns="columns" <a-table
:data-source="lists" :columns="columns"
:loading="loading" :data-source="lists"
:pagination="pagination" :loading="loading"
:row-key="record => record.activityId" :pagination="pagination"
:scroll="{ y: height }" :row-key="record => record.activityId"
@change="handleTableChange" :scroll="{ y: height }"
@expand="getDetail" @change="handleTableChange"
bordered @expand="getDetail"
class="white" bordered
> class="white"
<template slot="id" slot-scope="text, record, index"> >
<span>{{ index + 1 }}</span> <template slot="id" slot-scope="text, record, index">
</template> <span>{{ index + 1 }}</span>
</template>
<template slot="time" slot-scope="text, record"> <template slot="time" slot-scope="text, record">
<span v-if="record.releaseTime">{{ record.releaseTime}}</span> <span v-if="record.releaseTime">{{ record.releaseTime}}</span>
<span v-if="record.releaseTime">-{{record.releaseTime}}</span> <span v-if="record.closeTime">-{{record.closeTime}}</span>
</template> </template>
<template slot="auditStatus" slot-scope="text, record"> <template slot="auditStatus" slot-scope="text, record">
<a-tag <a-tag
:color="record.auditStatus === 2 ? 'green' : record.auditStatus === 1 ? 'red' : 'blue'" :color="record.auditStatus === 2 ? 'green' : record.auditStatus === 1 ? 'red' : 'blue'"
>{{ record.auditStatus === 2 ? '已通过' : record.auditStatus === 1 ? '未通过' : '审核中' }}</a-tag> >{{ record.auditStatus === 2 ? '已通过' : record.auditStatus === 1 ? '未通过' : '审核中' }}</a-tag>
</template> </template>
<template slot="examine" slot-scope="text, record"> <template slot="examine" slot-scope="text, record">
<div class="d-flex flex-column align-center"> <div class="d-flex flex-column align-center">
<a-button <a-button
@click="handleApply(record, 2)" @click="handleApply(record, 2)"
size="small" size="small"
type="primary" type="primary"
v-if="record.auditStatus !== 2" v-if="record.auditStatus !== 2"
>通过</a-button> >通过</a-button>
<a-button @click="handleApply(record, 1)" size="small" type="danger" v-else>不通过</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" /> <a-textarea class="fill-width mt-3" placeholder="备注" v-model="record.remark" />
</div> </div>
</template> </template>
<template slot="edit" slot-scope="text, record"> <template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal(record)" class="pointer mr-3" theme="twoTone" type="edit" /> <a-icon
</template> @click="showEditModal(record)"
class="pointer mr-5"
theme="twoTone"
type="edit"
/>
<a-button @click="openEnroll(record.activityId)" size="small" type="primary">活动报名</a-button>
</template>
<div <div
class="d-flex flex-column" class="d-flex flex-column"
slot="expandedRowRender" slot="expandedRowRender"
slot-scope="record" slot-scope="record"
style="margin: 0" style="margin: 0"
> >
<a-spin :spinning="spinning" tip="详情加载中..."> <a-spin :spinning="spinning" tip="详情加载中...">
<div class="d-flex flex-nowrap justify-space-between mb-3"> <div class="d-flex flex-nowrap justify-space-between mb-3">
<div class="d-flex flex-row"> <div class="d-flex flex-row">
<span class="font-bold-14">主讲人</span> <span class="font-bold-14">主讲人</span>
<span v-if="record.info && record.info.name">{{ record.info.name }}</span> <span v-if="record.info && record.info.name">{{ record.info.name }}</span>
<span v-else>暂无</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>
<div class="d-flex flex-row"> <div class="d-flex flex-nowrap justify-space-between mb-3">
<span class="font-bold-14"> <div class="d-flex flex-row">
活动类型 <span class="font-bold-14">组织单位</span>
<a-tag <span
color="blue" v-if="record.info && record.info.organization"
v-if="record.info && record.info.activityType !== null" >{{ record.info.organization }}</span>
>{{ record.info.activityType === 0 ? '路演' : record.info.activityType === 1 ? '讲座' : record.info.activityType === 2 ? '沙龙' : '' }}</a-tag> <span v-else>暂无</span>
</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>
<div class="d-flex flex-row"> <div class="mb-3">
<span class="font-bold-14">培训对象</span> <span class="font-bold-14">活动结束内容</span>
<span v-if="record.info && record.info.trainees">{{ record.info.trainees }}</span> <br />
<span v-else>暂无</span> <span v-if="record.info && record.info.endContent">{{ record.info.endContent }}</span>
<span v-else>暂无内容</span>
</div> </div>
</div> <div class="mb-3">
<div class="d-flex flex-nowrap justify-space-between mb-3"> <span class="font-bold-14">公告简介</span>
<div class="d-flex flex-row"> <br />
<span class="font-bold-14">组织单位</span> <span v-if="record.intro">{{ record.intro }}</span>
<span v-if="record.info && record.info.organization">{{ record.info.organization }}</span> <span v-else>暂无内容</span>
<span v-else>暂无</span>
</div> </div>
<div class="d-flex flex-row"> <div v-if="record.info && record.intro">
<span class="font-bold-14"> <span class="font-bold-14">详情</span>
发布平台 <span v-dompurify-html="record.info.content" v-if="record.info.content"></span>
<a-tag <span v-else>暂无内容</span>
color="green"
v-if="record.info && record.info.publishPlatform !== null"
>{{ record.info.publishPlatform === 0 ? '绿谷' : record.info.publishPlatform === 1 ? '创时代' : '' }}</a-tag>
</span>
</div> </div>
</div> </a-spin>
<div class="mb-3"> </div>
<span class="font-bold-14">活动结束内容</span> </a-table>
<br /> </div>
<span v-if="record.info && record.info.endContent">{{ record.info.endContent }}</span> <a-empty v-else />
<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 v-if="record.info && record.intro">
<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" /> <activity-edit
:editItem="editItem"
:editVisible="editVisible"
@closeModal="closeModal"
@getDetail="getDetail"
/>
</a-spin>
</div> </div>
</template> </template>
@ -169,7 +184,6 @@ const columns = [
align: 'center', align: 'center',
dataIndex: 'edit', dataIndex: 'edit',
key: 'edit', key: 'edit',
width: 80,
scopedSlots: { customRender: 'edit' }, scopedSlots: { customRender: 'edit' },
}, },
]; ];
@ -190,6 +204,7 @@ export default {
editVisible: false, editVisible: false,
editItem: null, // editItem: null, //
spinning: false, spinning: false,
showEdit: false,
}; };
}, },
@ -206,8 +221,10 @@ export default {
}, },
methods: { methods: {
showEditModal(record) { async showEditModal(record) {
console.log('record: ', record); this.showEdit = true;
await this.getDetail(true, record);
this.showEdit = false;
this.editItem = record; this.editItem = record;
this.editVisible = true; this.editVisible = true;
}, },
@ -260,6 +277,12 @@ export default {
this.$message.error(error || '审核失败'); this.$message.error(error || '审核失败');
} }
}, },
//
openEnroll(id) {
const { query } = this.$route;
this.$router.push({ path: `/event-registration?activityId=${id}`, query });
},
}, },
}; };
</script> </script>

296
src/components/Activity/ActivityEdit.vue

@ -2,137 +2,221 @@
<div class="d-flex flex-wrap pb-3"> <div class="d-flex flex-wrap pb-3">
<!-- 编辑 --> <!-- 编辑 -->
<a-modal :closable="false" footer title="修改活动公告" v-model="editVisible" width="700px"> <a-modal :closable="false" footer title="修改活动公告" v-model="editVisible" width="700px">
<a-form :form="form" @submit="handleSubmit"> <a-form :form="form" @submit="handleSubmit" v-if="editVisible && editItem">
<!-- 发布平台 --> <!-- 标题 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="发布平台" label="标题"
> >
<a-radio-group @change="getPlatform" v-model="platValue"> <a-input
<a-radio :value="1">绿谷</a-radio> placeholder="标题"
<a-radio :value="2">维基</a-radio> v-decorator="[
</a-radio-group> '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>
<!-- 类型 --> <!-- 时间 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="类型" label="时间"
required
> >
<a-select @change="getPlatform" placeholder="类型" style="width: 200px"> <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 <a-select-option
:key="index" :key="index"
:value="category" :value="category.id"
v-for="(category, index) in categories" v-for="(category, index) in types"
>{{ category }}</a-select-option> >{{ category.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<!-- 计划举办时间 -->
<!-- 主讲人 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="计划举办时间" label="主讲人"
> >
<a-range-picker @change="onChange" format="YYYY/MM/DD HH:mm:ss" show-time /> <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>
<!-- 实际举办时间 --> <!-- 组织单位 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="计划举办时间" label="组织单位"
> >
<a-range-picker @change="onChange" format="YYYY/MM/DD HH:mm:ss" show-time /> <a-input
placeholder="组织单位"
v-decorator="[
'organization',
{
initialValue: (editItem.info && editItem.info.organization) ? editItem.info.organization : '',
},
]"
/>
</a-form-item> </a-form-item>
<!-- 地点 --> <!-- 其他事宜 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="地点" label="其他事宜"
> >
<!-- initialValue: editItem.place, -->
<a-input <a-input
placeholder="地点" placeholder="其他事宜"
v-decorator="[ v-decorator="[
'place', 'other',
{ {
rules: [ initialValue: (editItem.info && editItem.info.other) ? editItem.info.other : '',
{ required: true, message: '地点不能为空' },
{ whitespace: true, message: '地点不能为空' },
{ max: 140, massage: '地点最多140个字符' },
],
}, },
]" ]"
/> />
</a-form-item> </a-form-item>
<!-- 组织人 --> <!-- 会议主题 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="组织人" label="会议主题"
> >
<!-- initialValue: editItem.speaker, -->
<a-input <a-input
placeholder="组织人" placeholder="会议主题"
v-decorator="[ v-decorator="[
'organizer', 'theme',
{ {
rules: [ initialValue: (editItem.info && editItem.info.theme) ? editItem.info.theme : '',
{ required: true, message: '组织人不能为空' },
{ whitespace: true, message: '组织人不能为空' },
{ max: 140, massage: '组织人最多140个字符' },
],
}, },
]" ]"
/> />
</a-form-item> </a-form-item>
<!-- 主讲人 -->
<!-- 培训对象 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="主讲人" label="培训对象"
> >
<!-- initialValue: editItem.speaker, -->
<a-input <a-input
placeholder="主讲人" placeholder="培训对象"
v-decorator="[ v-decorator="[
'speaker', 'trainees',
{ {
rules: [ initialValue: (editItem.info && editItem.info.trainees) ? editItem.info.trainees : '',
{ 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="[
'way',
{
initialValue: (editItem.info && editItem.info.way) ? editItem.info.way : '',
}, },
]" ]"
/> />
</a-form-item> </a-form-item>
<!-- 活动内容 -->
<!-- 活动结束内容 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="活动内容" label="活动结束内容"
> >
<!-- initialValue: editItem.content, -->
<a-textarea <a-textarea
placeholder="活动内容" placeholder="活动结束内容"
v-decorator="[ v-decorator="[
'content', 'endContent',
{
initialValue: (editItem.info && editItem.info.endContent) ? editItem.info.endContent : '',
},
]" ]"
/> />
</a-form-item> </a-form-item>
<!-- 发布状态 --> <!-- 详情 -->
<a-form-item <a-form-item
:label-col="formItemLayout.labelCol" :label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol" :wrapper-col="formItemLayout.wrapperCol"
label="发布状态" label="详情"
required
> >
<a-radio-group @change="getState" v-model="stateValue"> <quill-editor
<a-radio :value="1">发布</a-radio> :max-size="maxSize"
<a-radio :value="2">不发布</a-radio> :value="(editItem && editItem.info && editItem.info.content) ? editItem.info.content : content"
</a-radio-group> @changeInput="changeInput"
/>
</a-form-item> </a-form-item>
<a-form-item class="d-flex flex-row-reverse"> <a-form-item class="d-flex flex-row-reverse">
<a-button @click="$emit('closeModal')" class="mr-3">取消</a-button> <a-button @click="$emit('closeModal')" class="mr-3">取消</a-button>
<a-button class="white--text" html-type="submit" type="primary">保存</a-button> <a-button class="white--text" html-type="submit" type="primary">保存</a-button>
@ -143,7 +227,8 @@
</template> </template>
<script> <script>
// import { upTeam } from 'config/api'; import { updateActivity } from 'config/api';
import QuillEditor from 'components/QuillEditor/QuillEditor.vue';
const formItemLayout = { const formItemLayout = {
labelCol: { span: 6 }, labelCol: { span: 6 },
@ -155,47 +240,50 @@ const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default { export default {
name: 'ActivityEdit', name: 'ActivityEdit',
props: { editVisible: { type: Boolean, default: false }, editItem: { type: Object, default: () => {} } }, props: { editVisible: { type: Boolean, default: false }, editItem: { type: Object, default: () => {} } },
components: { QuillEditor },
data() { data() {
return { return {
formItemLayout, formItemLayout,
tailItemLayout, tailItemLayout,
form: this.$form.createForm(this, { name: 'r-d-add' }), form: this.$form.createForm(this, { name: 'activity-edit' }),
platValue: 1, types: [
categories: [ { id: 0, name: '路演' },
{ id: 1, name: '路演' }, { id: 1, name: '沙龙' },
{ id: 2, name: '沙龙' }, { id: 2, name: '论坛' },
{ id: 3, name: '论坛' },
{ id: 4, name: '培训' },
{ id: 5, name: '讲座' },
{ id: 6, name: '创业活动' },
], ],
category: '', activityType: null,
stateValue: 1, maxSize: 2048,
content: null,
releaseTime: null, //
closeTime: null, //
}; };
}, },
methods: { methods: {
// //
getPlatform(value) { changeInput(value) {
console.log('value: ', value); this.content = value;
this.platValue = value;
},
//
getCategory(value) {
console.log('value: ', value);
this.category = value;
}, },
// //
getState(value) { changeType(value) {
console.log('value: ', value); this.activityType = value;
this.stateValue = value;
}, },
// //
onChange(dates, dateStrings) { onChange(dates, dateStrings) {
console.log('From: ', dates[0], ', to: ', dates[1]); this.releaseTime = dateStrings[0];
console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]); this.closeTime = dateStrings[1];
},
//
verificationTime() {
if (!this.releaseTime || !this.closeTime) {
this.$message.error('时间不能为空');
return false;
} else {
return true;
}
}, },
// //
@ -204,16 +292,28 @@ export default {
this.form.validateFieldsAndScroll(async (err, values) => { this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) { if (!err) {
try { try {
// const params = { param: values }; if (!this.verificationTime()) return;
// const res = await upTeam(params); console.log('values: ', values);
// const { data, msg, code } = res.data; const { releaseTime, closeTime, content, activityType, editItem } = this;
// this.$emit('closeModal'); const params = { param: values };
// if (code === 200) { params.param.activityId = editItem.activityId;
// this.$message.success('') params.param.releaseTime = releaseTime || editItem.releaseTime;
// // TODO: params.param.closeTime = closeTime || editItem.closeTime;
// } else { params.param.content = content || editItem.info.content;
// throw msg; 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('closeModal');
this.releaseTime = '';
this.closeTime = '';
this.content = '';
this.activityType = '';
} else {
throw msg;
}
} catch (error) { } catch (error) {
this.$message.error(error || '修改失败'); this.$message.error(error || '修改失败');
} }

179
src/components/Enroll/EnrollDate.vue

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

163
src/components/Enroll/EnrollSearch.vue

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

9
src/components/IndustryInfo/ActivityEdit.vue

@ -42,10 +42,15 @@
label="时间" label="时间"
> >
<a-date-picker <a-date-picker
:placeholder="editItem.time"
@change="onChange" @change="onChange"
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
show-time show-time
v-decorator="[
'time',
{
initialValue: editItem.time || '',
},
]"
/> />
</a-form-item> </a-form-item>
<!-- 发布部门 --> <!-- 发布部门 -->
@ -139,7 +144,7 @@ export default {
// //
onChange(value, dateString) { onChange(value, dateString) {
console.log('dateString: ', dateString); console.log('dateString: ', dateString);
// this.time = dateString; this.time = dateString;
}, },
// //

92
src/components/Page/PageDate.vue

@ -1,49 +1,55 @@
<template> <template>
<div class="main flex-1"> <div class="main flex-1">
<div style="width:100%" v-if="lists && lists.length > 0"> <a-spin :spinning="showEdit">
<a-table <div style="width:100%" v-if="lists && lists.length > 0">
:columns="columns" <a-table
:data-source="lists" :columns="columns"
:loading="loading" :data-source="lists"
:pagination="pagination" :loading="loading"
:row-key="record => record.id" :pagination="pagination"
:scroll="{ y: height }" :row-key="record => record.id"
@change="handleTableChange" :scroll="{ y: height }"
@expand="getDetail" @change="handleTableChange"
bordered @expand="getDetail"
class="white" bordered
> class="white"
<template slot="id" slot-scope="text, record, index"> >
<span>{{ index + 1 }}</span> <template slot="id" slot-scope="text, record, index">
</template> <span>{{ index + 1 }}</span>
</template>
<template slot="edit" slot-scope="text, record"> <template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal(record)" class="pointer" theme="twoTone" type="edit" /> <a-icon @click="showEditModal(record)" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm @confirm="() => onDelete(record.id)" title="确定要删除这一条?" v-if="lists.length"> <a-popconfirm
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" /> @confirm="() => onDelete(record.id)"
</a-popconfirm> title="确定要删除这一条?"
</template> v-if="lists.length"
>
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm>
</template>
<div <div
class="d-flex flex-nowrap justify-space-between" class="d-flex flex-nowrap justify-space-between"
slot="expandedRowRender" slot="expandedRowRender"
slot-scope="record" slot-scope="record"
style="margin: 0" style="margin: 0"
> >
<div> <div>
<a-spin :spinning="spinning" tip="详情加载中..."> <a-spin :spinning="spinning" tip="详情加载中...">
内容 内容
<span v-dompurify-html="record.content" v-if="record.content"></span> <span v-dompurify-html="record.content" v-if="record.content"></span>
<span v-else>暂无内容</span> <span v-else>暂无内容</span>
</a-spin> </a-spin>
</div>
</div> </div>
</div> </a-table>
</a-table> </div>
</div> <a-empty v-else />
<a-empty v-else />
<!-- 编辑 --> <!-- 编辑 -->
<page-edit :editItem="editItem" :editVisible="editVisible" @closeModal="closeModal" /> <page-edit :editItem="editItem" :editVisible="editVisible" @closeModal="closeModal" />
</a-spin>
</div> </div>
</template> </template>
@ -90,6 +96,7 @@ export default {
editVisible: false, editVisible: false,
editItem: {}, // editItem: {}, //
spinning: false, spinning: false,
showEdit: false,
}; };
}, },
@ -106,7 +113,10 @@ export default {
}, },
methods: { methods: {
showEditModal(record) { async showEditModal(record) {
this.showEdit = true;
await this.getDetail(true, record);
this.showEdit = false;
this.editItem = record; this.editItem = record;
this.editVisible = true; this.editVisible = true;
}, },

192
src/components/Policy/PolicyDate.vue

@ -2,7 +2,14 @@
<div class="main flex-1"> <div class="main flex-1">
<div style="width:100%" v-if="lists && lists.length > 0"> <div style="width:100%" v-if="lists && lists.length > 0">
<div class="mb-4"> <div class="mb-4">
<a-button :disabled="!hasSelected" :loading="loading" @click="start" type="primary">审核通过</a-button> <a-button :disabled="!hasSelected" :loading="loading" @click="start(2)" type="primary">审核通过</a-button>
<a-button
:disabled="!hasSelected"
:loading="loading"
@click="start(1)"
class="ml-3"
type="danger"
>审核不通过</a-button>
<span class="ml-2"> <span class="ml-2">
<template v-if="hasSelected">{{ `选中 ${selectedRowKeys.length} ` }}</template> <template v-if="hasSelected">{{ `选中 ${selectedRowKeys.length} ` }}</template>
</span> </span>
@ -11,8 +18,11 @@
:columns="columns" :columns="columns"
:data-source="lists" :data-source="lists"
:loading="loading" :loading="loading"
:pagination="pagination"
:row-key="record => record.id" :row-key="record => record.id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:scroll="{ y: height }"
@change="handleTableChange"
bordered bordered
class="white" class="white"
> >
@ -20,27 +30,43 @@
<span>{{ index + 1 }}</span> <span>{{ index + 1 }}</span>
</template> </template>
<template slot="tag" slot-scope="text, record"> <template slot="type" slot-scope="text, record">
<a-tag color="blue">{{ record.tag }}</a-tag> <a-tag
color="blue"
>{{ record.type === 0 ? '申报通知' : record.type === 1 ? '公告公示' : record.type === 2 ? '政策动态' : record.type === 3 ? '申报指南' : '' }}</a-tag>
</template> </template>
<template slot="auditStatus" slot-scope="text, record"> <template slot="status" slot-scope="text, record">
<a-tag :color="record.auditStatus === '通过' ? 'green' : 'red'">{{ record.auditStatus }}</a-tag> <a-tag
:color="record.status === 2 ? 'green' : record.status === 1 ? 'red' : 'blue'"
>{{ record.status === 2 ? '已通过' : record.status === 1 ? '未通过' : '审核中' }}</a-tag>
</template> </template>
<template slot="edit" slot-scope="text, record"> <template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal(record)" class="pointer" theme="twoTone" type="edit" /> <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> </template>
<div slot="expandedRowRender" slot-scope="record" style="margin: 0"> <div
<div class="d-flex flex-nowrap mb-2"> class="d-flex flex-column"
<div>发布时间{{ record.releaseTime }}</div> slot="expandedRowRender"
<div class="ml-8">截止时间{{ record.deadline }}</div> slot-scope="record"
style="margin: 0"
>
<div class="mb-3">
<span class="font-bold-14">原文链接</span>
{{ record.titleUrl }}
</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.content" v-if="record.content"></span>
<span v-else>暂无内容</span>
</div> </div>
<div>原文链接{{ record.content }}</div>
</div> </div>
</a-table> </a-table>
</div> </div>
@ -52,8 +78,8 @@
</template> </template>
<script> <script>
import PolicyEdit from "components/Policy/PolicyEdit.vue"; import PolicyEdit from 'components/Policy/PolicyEdit.vue';
// import { delTeam } from 'config/api'; import { upPolicy } from 'config/api';
const columns = [ const columns = [
{ {
@ -61,6 +87,7 @@ const columns = [
align: 'center', align: 'center',
dataIndex: 'id', dataIndex: 'id',
key: 'id', key: 'id',
width: 80,
scopedSlots: { customRender: 'id' }, scopedSlots: { customRender: 'id' },
}, },
{ {
@ -72,80 +99,58 @@ const columns = [
{ {
title: '发布部门', title: '发布部门',
align: 'center', align: 'center',
dataIndex: 'department', dataIndex: 'publishDepartName',
key: 'department', key: 'publishDepartName',
}, },
{ {
title: '政策类型', title: '政策类型',
align: 'center', align: 'center',
dataIndex: 'policyType', dataIndex: 'type',
key: 'policyType', key: 'type',
width: 100,
scopedSlots: { customRender: 'type' },
}, },
{ {
title: '标签', title: '状态',
align: 'center', align: 'center',
dataIndex: 'tag', dataIndex: 'status',
key: 'tag', key: 'status',
scopedSlots: { customRender: 'tag' }, width: 100,
scopedSlots: { customRender: 'status' },
}, },
{ {
title: '审核状态', title: '发布时间',
align: 'center', align: 'center',
dataIndex: 'auditStatus', dataIndex: 'publishTime',
key: 'auditStatus', key: 'publishTime',
scopedSlots: { customRender: 'auditStatus' },
}, },
{ {
title: '编辑', title: '编辑',
align: 'center', align: 'center',
dataIndex: 'edit', dataIndex: 'edit',
key: 'edit', key: 'edit',
width: 80,
scopedSlots: { customRender: 'edit' }, scopedSlots: { customRender: 'edit' },
}, },
]; ];
const lists = [
{
id:'001',
title:'标题一',
department:'部门一',
releaseTime: '2020/11/18 08:00',
deadline: '2020/11/18 18:00',
policyType: '新闻',
tag: '新闻',
auditStatus: '通过',
link: 'http://localhost:8080/',
},
{
id:'002',
title:'标题二',
department:'部门二',
releaseTime: '2020/11/18 08:00',
deadline: '2020/11/18 18:00',
policyType: '政治',
tag: '政治',
auditStatus: '未通过',
link: 'http://localhost:8080/'
}
];
export default { export default {
name: "PolicyDate", name: 'PolicyDate',
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
components: { components: {
PolicyEdit, PolicyEdit,
}, },
data() { data() {
this.cacheData = lists.map(item => ({ ...item }));
return { return {
columns, columns,
lists,
loading: false, loading: false,
selectedRowKeys: [], selectedRowKeys: [],
editingKey: '', editingKey: '',
height: '', height: '',
editVisible: false, editVisible: false,
editItem: null, // editItem: null, //
} };
}, },
computed: { computed: {
@ -155,57 +160,68 @@ export default {
}, },
mounted() { mounted() {
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150; let th = 300;
let wh = window.innerHeight;
this.height = wh - th;
window.onresize = () => {
return (() => {
wh = window.innerHeight;
this.height = wh - th;
})();
};
}, },
methods: { methods: {
start() { //
this.loading = true;
// ajax request after empty completing
setTimeout(() => {
this.loading = false;
this.selectedRowKeys = [];
}, 1000);
},
onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys) {
console.log('selectedRowKeys changed: ', selectedRowKeys); console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys; this.selectedRowKeys = selectedRowKeys;
}, },
showEditModal(record){ //
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
this.$emit('getSelectTeam', condition);
},
//
async start(state) {
try {
this.loading = true;
const params = { param: { ids: this.selectedRowKeys, status: state } };
const res = await upPolicy(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('审批成功');
this.$emit('getSelectTeam');
setTimeout(() => {
this.loading = false;
this.selectedRowKeys = [];
}, 1000);
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '审批失败');
}
},
showEditModal(record) {
console.log('record: ', record); console.log('record: ', record);
this.editItem = record; this.editItem = record;
this.editVisible = true; this.editVisible = true;
}, },
closeModal(){ closeModal() {
this.editVisible = false; 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 || '删除失败');
}
},
// //
openSignUp(){ openSignUp() {
const { query } = this.$route; const { query } = this.$route;
this.$router.push({ path: '/sign-up', query }); this.$router.push({ path: '/sign-up', query });
} },
}, },
}; };
</script> </script>

121
src/components/Policy/PolicySearch.vue

@ -1,16 +1,47 @@
<template> <template>
<div class="d-flex flex-wrap pb-3"> <div>
<div> <div class="d-flex flex-nowrap">
<!-- 标题 --> <!-- 输入框 -->
<a-input @change="handleChangeTitle" placeholder="标题" style="width: 150px" v-model="title" /> <a-select @change="changeType" class="mb-3" placeholder="类型" style="width: 80px">
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button> <a-select-option
</div> :key="index"
:value="type.code"
v-for="(type, index) in types"
>{{ type.value }}</a-select-option>
</a-select>
<a-input class="mb-3" placeholder="标题" style="width: 200px" v-model="options.input" />
<div class="flex-1"></div> <!-- 发布时间 -->
<a-range-picker
@change="onChangeTime"
class="ml-3 mb-3 flex-1"
format="YYYY-MM-DD HH:mm:ss"
show-time
/>
</div>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button> <!-- 是否勾选 -->
<div class="d-flex flex-nowrap ml-3">
<div class="d-flex flex-nowrap align-center">
<a-checkbox @change="onChangeBw" class="mb-3">国家</a-checkbox>
<a-checkbox @change="onChangeSx" class="mb-3">山西省</a-checkbox>
<a-checkbox @change="onChangeZg" class="mb-3">山西省综改区</a-checkbox>
<a-checkbox @change="onChangeTy" class="mb-3">太原市</a-checkbox>
</div>
<!-- 状态 -->
<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="ml-3" type="primary">搜索</a-button>
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
</div>
<!-- 添加 --> <!-- 添加 -->
<policy-add :visible="visible" @closeModal="closeModal" /> <policy-add :visible="visible" @closeModal="closeModal" />
@ -29,7 +60,26 @@ export default {
data() { data() {
return { return {
visible: false, visible: false,
title: '', types: [
{ code: 'title', value: '标题' },
{ code: 'area', value: '地区/发布部门' },
],
policyStatus: [
{ id: 0, value: '审核中' },
{ id: 1, value: '未通过' },
{ id: 2, value: '已通过' },
],
options: {
bw: 0,
sx: 0,
zg: 0,
ty: 0,
input: '',
status: '',
code: '',
startTime: '',
endTime: '',
},
}; };
}, },
methods: { methods: {
@ -41,26 +91,45 @@ export default {
this.visible = false; this.visible = false;
}, },
// //
handleChangeTitle(value) { onChangeBw(e) {
console.log('value: ', value); if (e.target.checked) {
this.title = value; this.options.bw = 1;
}
},
onChangeSx(e) {
if (e.target.checked) {
this.options.sx = 1;
}
},
onChangeZg(e) {
if (e.target.checked) {
this.options.zg = 1;
}
},
onChangeTy(e) {
if (e.target.checked) {
this.options.ty = 1;
}
},
//
changeType(value) {
this.options.code = value;
},
//
changeState(value) {
this.options.status = value;
},
//
onChangeTime(dates, dateStrings) {
this.options.startTime = dateStrings[0];
this.options.endTime = dateStrings[1];
}, },
//
async handleTableChange() { async handleTableChange() {
try { const { options } = this;
// const params = { param: {publishingPlatform: this.publishingPlatform} }; await this.$emit('getSelectTeam', options);
// 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);
}
}, },
}, },
}; };

12
src/config/api.js

@ -59,9 +59,21 @@ export const saveActivity = params => axios.post(`${activity}/save`, params);
// 修改活动公告 // 修改活动公告
export const updateActivity = params => axios.post(`${activity}/update`, params); export const updateActivity = params => axios.post(`${activity}/update`, params);
// 查看活动下所有申请的人员列表
export const getQueryApply = params => axios.post(`${activity}/query/apply`, params);
// 后台审批加入的申请
export const getAuditApply = params => axios.post(`${activity}/audit/apply`, params);
// 导出活动下报名的人员列表(EXCEL)
export const getExport = params => axios.post(`${activity}/export`, params);
// 查询创新政策 // 查询创新政策
export const selLikePolicyBack = params => axios.post(`${policy}/policy/selLikePolicyBack`, params); export const selLikePolicyBack = params => axios.post(`${policy}/policy/selLikePolicyBack`, params);
// 政策审批
export const upPolicy = params => axios.post(`${policy}/policy/upPolicy`, params);
// 合作意向列表查询 // 合作意向列表查询
export const getCreatingPlatformSearch = params => axios.post(`${creatingPlatform}/search`, params); export const getCreatingPlatformSearch = params => axios.post(`${creatingPlatform}/search`, params);

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

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

8
src/router/index.js

@ -41,12 +41,18 @@ const routes = [
name: 'CommunicationCommunity', name: 'CommunicationCommunity',
component: () => import(/* webpackChunkName: "communication-community" */ 'views/CommunicationCommunity/CommunicationCommunity.vue'), component: () => import(/* webpackChunkName: "communication-community" */ 'views/CommunicationCommunity/CommunicationCommunity.vue'),
}, },
// 活动公告 // 活动公告--活动通知
{ {
path: '/event-announcement', path: '/event-announcement',
name: 'EventAnnouncement', name: 'EventAnnouncement',
component: () => import(/* webpackChunkName: "event-announcement" */ 'views/EventAnnouncement/EventAnnouncement.vue'), component: () => import(/* webpackChunkName: "event-announcement" */ 'views/EventAnnouncement/EventAnnouncement.vue'),
}, },
// 活动公告--活动报名
{
path: '/event-registration',
name: 'EventRegistration',
component: () => import(/* webpackChunkName: "event-registration" */ 'views/EventRegistration/EventRegistration.vue'),
},
// 创新政策 // 创新政策
{ {
path: '/innovation-policy', path: '/innovation-policy',

85
src/views/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>

55
src/views/InnovationPolicy/InnovationPolicy.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="pa-3 white fill-height d-flex flex-column"> <div class="pa-3 white fill-height d-flex flex-column">
<policy-search /> <policy-search @getSelectTeam="getSelectTeam" />
<policy-date /> <policy-date :lists="lists" :pagination="pagination" @getSelectTeam="getSelectTeam" />
</div> </div>
</template> </template>
@ -17,6 +17,13 @@ export default {
PolicyDate, PolicyDate,
}, },
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() { created() {
this.getSelectTeam(); this.getSelectTeam();
}, },
@ -26,12 +33,52 @@ export default {
* 查询创新政策 * 查询创新政策
* @param { String } competeTimeId 第几届信息的id * @param { String } competeTimeId 第几届信息的id
*/ */
async getSelectTeam() { async getSelectTeam(condition) {
try { try {
const params = { param: {} }; const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if (condition) {
if (condition.bw) {
params.param.bw = condition.bw;
}
if (condition.sx) {
params.param.sx = condition.sx;
}
if (condition.ty) {
params.param.ty = condition.ty;
}
if (condition.zg) {
params.param.zg = condition.zg;
}
if (condition.code) {
params.param.code = condition.code;
}
if (condition.endTime) {
params.param.endTime = condition.endTime;
}
if (condition.input) {
params.param.input = condition.input;
}
if (condition.startTime) {
params.param.startTime = condition.startTime;
}
if (condition.status) {
params.param.status = condition.status;
}
}
const res = await selLikePolicyBack(params); const res = await selLikePolicyBack(params);
const { code, msg, data } = res.data; const { code, msg, data } = res.data;
if (code === 200) { 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 { } else {
throw msg || '获取失败'; throw msg || '获取失败';
} }

Loading…
Cancel
Save