Browse Source

创新部服务查询删除,研究院查询删除,类型查询删除

master
ma 4 years ago
parent
commit
22a59e921e
  1. 251
      src/components/Activity/ActivityAdd.vue
  2. 256
      src/components/Activity/ActivityDate.vue
  3. 304
      src/components/Activity/ActivityEdit.vue
  4. 99
      src/components/Activity/ActivitySearch.vue
  5. 14
      src/components/Banner/BannerSearch.vue
  6. 12
      src/components/CVideo/VideoSearch.vue
  7. 14
      src/components/Challenge/ChallengeSearch.vue
  8. 12
      src/components/Course/CourseSearch.vue
  9. 12
      src/components/Development/DevelopmentSearch.vue
  10. 179
      src/components/Enroll/EnrollDate.vue
  11. 163
      src/components/Enroll/EnrollSearch.vue
  12. 177
      src/components/IndustryInfo/ActivityAdd.vue
  13. 166
      src/components/IndustryInfo/ActivityDate.vue
  14. 181
      src/components/IndustryInfo/ActivityEdit.vue
  15. 80
      src/components/IndustryInfo/ActivitySearch.vue
  16. 6
      src/components/Institute/InstituteSearch.vue
  17. 10
      src/components/Manage/ManageSearch.vue
  18. 12
      src/components/Mentor/MentorSearch.vue
  19. 92
      src/components/Page/PageDate.vue
  20. 192
      src/components/Policy/PolicyDate.vue
  21. 131
      src/components/Policy/PolicySearch.vue
  22. 16
      src/components/RD/RDSearch.vue
  23. 59
      src/components/RDMember/RDMemberSearch.vue
  24. 35
      src/components/SpinOff/SpinOffSearch.vue
  25. 12
      src/components/Transfer/TransferSearch.vue
  26. 35
      src/config/api.js
  27. 8
      src/plugins/ant-design-vue.js
  28. 8
      src/router/index.js
  29. 54
      src/views/EventAnnouncement/EventAnnouncement.vue
  30. 85
      src/views/EventRegistration/EventRegistration.vue
  31. 34
      src/views/IndustryInfo/IndustryInfo.vue
  32. 69
      src/views/InnovationPolicy/InnovationPolicy.vue
  33. 2
      src/views/TalentRecruitment/TalentRecruitment.vue
  34. 15
      src/views/UserManage/UserManage.vue

251
src/components/Activity/ActivityAdd.vue

@ -1,136 +1,190 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 添加 -->
<a-modal :closable="false" footer title="添加研发团队" v-model="visible" width="700px">
<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="发布平台"
label="标题"
>
<a-radio-group @change="getPlatform" v-model="platValue">
<a-radio :value="1">绿谷</a-radio>
<a-radio :value="2">维基</a-radio>
</a-radio-group>
<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="类型"
label="地点"
>
<a-select @change="getPlatform" placeholder="类型" style="width: 200px">
<a-select-option
:key="index"
:value="category"
v-for="(category, index) in categories"
>{{ category }}</a-select-option>
</a-select>
<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="计划举办时间"
label="时间"
required
>
<a-range-picker @change="onChange" format="YYYY/MM/DD HH:mm:ss" show-time />
<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="计划举办时间"
label="活动类型"
>
<a-range-picker @change="onChange" format="YYYY/MM/DD HH:mm:ss" show-time />
<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="地点"
label="主讲人"
>
<!-- initialValue: editItem.place, -->
<a-input
placeholder="地点"
placeholder="主讲人"
v-decorator="[
'place',
'name',
{
rules: [
{ required: true, message: '地点不能为空' },
{ whitespace: true, message: '地点不能为空' },
{ max: 140, massage: '地点最多140个字符' },
{ 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="组织"
label="组织单位"
>
<!-- initialValue: editItem.speaker, -->
<a-input
placeholder="组织"
placeholder="组织单位"
v-decorator="[
'organizer',
{
rules: [
{ required: true, message: '组织人不能为空' },
{ whitespace: true, message: '组织人不能为空' },
{ max: 140, massage: '组织人最多140个字符' },
],
},
'organization'
]"
/>
</a-form-item>
<!-- 主讲人 -->
<!-- 其他事宜 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="主讲人"
label="其他事宜"
>
<!-- initialValue: editItem.speaker, -->
<a-input
placeholder="主讲人"
placeholder="其他事宜"
v-decorator="[
'speaker',
{
rules: [
{ required: true, message: '主讲人不能为空' },
{ whitespace: true, message: '主讲人不能为空' },
{ max: 140, massage: '主讲人最多140个字符' },
],
},
'other'
]"
/>
</a-form-item>
<!-- 活动内容 -->
<!-- 会议主题 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="活动内容"
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="活动结束内容"
>
<!-- initialValue: editItem.content, -->
<a-textarea
placeholder="活动内容"
placeholder="活动结束内容"
v-decorator="[
'content',
'endContent',
]"
/>
</a-form-item>
<!-- 发布状态 -->
<!-- 详情 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="发布状态"
label="详情"
required
>
<a-radio-group @change="getState" v-model="stateValue">
<a-radio :value="1">发布</a-radio>
<a-radio :value="2">不发布</a-radio>
</a-radio-group>
<quill-editor :max-size="maxSize" :placeholder="placeholder" @changeInput="changeInput" />
</a-form-item>
<a-form-item class="d-flex flex-row-reverse">
@ -143,7 +197,8 @@
</template>
<script>
import { addTeam } from 'config/api'
import { saveActivity } from 'config/api';
import QuillEditor from 'components/QuillEditor/QuillEditor.vue';
const formItemLayout = {
labelCol: { span: 6 },
@ -151,49 +206,46 @@ const formItemLayout = {
};
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "ActivityAdd",
name: 'ActivityAdd',
props: { visible: { type: Boolean, default: false } },
components: { QuillEditor },
data() {
return {
formItemLayout,
tailItemLayout,
form: this.$form.createForm(this, { name: 'r-d-add' }),
platValue: 1,
categories: [
{id:1,name:'路演'},
{id:2,name:'沙龙'},
{id:3,name:'论坛'},
{id:4,name:'培训'},
{id:5,name:'讲座'},
{id:6,name:'创业活动'}
form: this.$form.createForm(this, { name: 'activity-add' }),
types: [
{ id: 0, name: '路演' },
{ id: 1, name: '沙龙' },
{ id: 2, name: '论坛' },
],
category: '',
stateValue: 1
}
activityType: '',
maxSize: 2048,
content: '',
placeholder: '请输入...',
releaseTime: '', //
closeTime: '', //
};
},
methods: {
//
getPlatform(value) {
console.log('value: ', value);
this.platValue = value;
},
//
getCategory(value) {
console.log('value: ', value);
this.category = value;
},
//
getState(value) {
changeType(value) {
console.log('value: ', value);
this.stateValue = 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;
},
//
@ -202,14 +254,21 @@ export default {
this.form.validateFieldsAndScroll(async (err, values) => {
if (!err) {
try {
console.log('values: ', values);
const { releaseTime, closeTime, content, activityType } = this;
const params = { param: values };
const res = await addTeam(params);
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;
this.$emit('closeModal');
if (code === 200) {
this.$message.success('添加成功')
// TODO:
this.$message.success('添加成功');
this.$emit('closeModal');
} else {
this.$emit('closeModal');
throw msg;
}
} catch (error) {

256
src/components/Activity/ActivityDate.vue

@ -1,48 +1,140 @@
<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"
@change="handleTableChange"
:row-key="record => record.id"
:scroll="{ y: height }"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<template slot="time" slot-scope="text, record">
<span v-if="record.releaseTime">{{ record.releaseTime}}</span><span v-if="record.releaseTime">-{{record.releaseTime}}</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" />
<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-button @click="openEnroll(record.activityId)" size="small" type="primary">活动报名</a-button>
</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 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"
@getDetail="getDetail"
/>
</a-spin>
</div>
</template>
<script>
import ActivityEdit from "components/Activity/ActivityEdit.vue";
import { deleteIndustryInfo } from 'config/api';
import ActivityEdit from 'components/Activity/ActivityEdit.vue';
import { getQueryDetail, auditApply } from 'config/api';
const columns = [
{
@ -50,9 +142,10 @@ const columns = [
align: 'center',
dataIndex: 'id',
key: 'id',
width: 80,
scopedSlots: { customRender: 'id' },
},
{
{
title: '标题',
align: 'center',
dataIndex: 'title',
@ -72,23 +165,31 @@ const columns = [
scopedSlots: { customRender: 'time' },
},
{
title: '公告简介',
title: '审批状态',
align: 'center',
dataIndex: 'auditStatus',
key: 'auditStatus',
width: 100,
scopedSlots: { customRender: 'auditStatus' },
},
{
title: '审核',
align: 'center',
dataIndex: 'intro',
key: 'intro',
dataIndex: 'examine',
key: 'examine',
scopedSlots: { customRender: 'examine' },
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 200,
scopedSlots: { customRender: 'edit' },
},
];
export default {
name: "ActivityDate",
name: 'ActivityDate',
components: {
ActivityEdit,
},
@ -102,7 +203,9 @@ export default {
height: '',
editVisible: false,
editItem: null, //
}
spinning: false,
showEdit: false,
};
},
mounted() {
@ -118,45 +221,68 @@ export default {
},
methods: {
showEditModal(record){
console.log('record: ', record);
async showEditModal(record) {
this.showEdit = true;
await this.getDetail(true, record);
this.showEdit = false;
this.editItem = record;
this.editVisible = true;
},
async closeModal(){
async closeModal() {
this.editVisible = false;
await this.$emit('getBackendSearch');
await this.$emit('getSelectTeam');
},
//
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
this.$emit('getBackendSearch', condition);
this.$emit('getSelectTeam', condition);
},
//
async onDelete(id) {
//
async getDetail(expanded, record) {
if (!expanded) return;
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{
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 || '删除失败');
this.$message.error(error || '查询失败');
}
},
//
openSignUp(){
//
async handleApply(record, auditStatus) {
try {
const params = { param: { applyId: 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 || '审核失败');
}
},
//
openEnroll(id) {
const { query } = this.$route;
this.$router.push({ path: '/sign-up', query });
}
this.$router.push({ path: `/event-registration?activityId=${id}`, query });
},
},
};
</script>

304
src/components/Activity/ActivityEdit.vue

@ -1,138 +1,222 @@
<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-modal :closable="false" 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="发布平台"
label="标题"
>
<a-radio-group @change="getPlatform" v-model="platValue">
<a-radio :value="1">绿谷</a-radio>
<a-radio :value="2">维基</a-radio>
</a-radio-group>
<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="类型"
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
:key="index"
:value="category"
v-for="(category, index) in categories"
>{{ category }}</a-select-option>
: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="计划举办时间"
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
:label-col="formItemLayout.labelCol"
: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
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="地点"
label="其他事宜"
>
<!-- initialValue: editItem.place, -->
<a-input
placeholder="地点"
placeholder="其他事宜"
v-decorator="[
'place',
'other',
{
rules: [
{ required: true, message: '地点不能为空' },
{ whitespace: true, message: '地点不能为空' },
{ max: 140, massage: '地点最多140个字符' },
],
initialValue: (editItem.info && editItem.info.other) ? editItem.info.other : '',
},
]"
/>
</a-form-item>
<!-- 组织人 -->
<!-- 会议主题 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="组织人"
label="会议主题"
>
<!-- initialValue: editItem.speaker, -->
<a-input
placeholder="组织人"
placeholder="会议主题"
v-decorator="[
'organizer',
'theme',
{
rules: [
{ required: true, message: '组织人不能为空' },
{ whitespace: true, message: '组织人不能为空' },
{ max: 140, massage: '组织人最多140个字符' },
],
initialValue: (editItem.info && editItem.info.theme) ? editItem.info.theme : '',
},
]"
/>
</a-form-item>
<!-- 主讲人 -->
<!-- 培训对象 -->
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="主讲人"
label="培训对象"
>
<!-- initialValue: editItem.speaker, -->
<a-input
placeholder="主讲人"
placeholder="培训对象"
v-decorator="[
'speaker',
'trainees',
{
rules: [
{ required: true, message: '主讲人不能为空' },
{ whitespace: true, message: '主讲人不能为空' },
{ max: 140, massage: '主讲人最多140个字符' },
],
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="活动内容"
label="活动结束内容"
>
<!-- initialValue: editItem.content, -->
<a-textarea
placeholder="活动内容"
placeholder="活动结束内容"
v-decorator="[
'content',
'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="发布状态"
label="详情"
required
>
<a-radio-group @change="getState" v-model="stateValue">
<a-radio :value="1">发布</a-radio>
<a-radio :value="2">不发布</a-radio>
</a-radio-group>
<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>
@ -143,7 +227,8 @@
</template>
<script>
// import { upTeam } from 'config/api';
import { updateActivity } from 'config/api';
import QuillEditor from 'components/QuillEditor/QuillEditor.vue';
const formItemLayout = {
labelCol: { span: 6 },
@ -153,49 +238,52 @@ const formItemLayout = {
const tailItemLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: "ActivityEdit",
props: { editVisible: { type: Boolean, default: false },editItem: { type: Object, 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' }),
platValue: 1,
categories: [
{id:1,name:'路演'},
{id:2,name:'沙龙'},
{id:3,name:'论坛'},
{id:4,name:'培训'},
{id:5,name:'讲座'},
{id:6,name:'创业活动'}
form: this.$form.createForm(this, { name: 'activity-edit' }),
types: [
{ id: 0, name: '路演' },
{ id: 1, name: '沙龙' },
{ id: 2, name: '论坛' },
],
category: '',
stateValue: 1
}
activityType: null,
maxSize: 2048,
content: null,
releaseTime: null, //
closeTime: null, //
};
},
methods: {
//
getPlatform(value) {
console.log('value: ', value);
this.platValue = value;
},
//
getCategory(value) {
console.log('value: ', value);
this.category = value;
//
changeInput(value) {
this.content = value;
},
//
getState(value) {
console.log('value: ', value);
this.stateValue = value;
//
changeType(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];
},
//
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) => {
if (!err) {
try {
// const params = { param: values };
// const res = await upTeam(params);
// const { data, msg, code } = res.data;
// this.$emit('closeModal');
// if (code === 200) {
// this.$message.success('')
// // TODO:
// } else {
// throw msg;
// }
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('closeModal');
this.releaseTime = '';
this.closeTime = '';
this.content = '';
this.activityType = '';
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '修改失败');
}

99
src/components/Activity/ActivitySearch.vue

@ -1,36 +1,41 @@
<template>
<div class="d-flex flex-wrap pb-3">
<div>
<!-- 活动标题 -->
<a-input
class="ml-3"
placeholder="标题"
style="width: 150px"
v-model="titleKey"
/>
<!-- 活动类型 0路演 1讲座 2沙龙 不传参数则查询全部 -->
<span class="ml-8">活动类型</span>
<a-checkbox-group :options="items" @change="onChange"/>
<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,
},
@ -38,46 +43,64 @@ export default {
return {
visible: false,
titleKey: '',
items: ['路演','讲座','沙龙'],
items: ['路演', '讲座', '沙龙'],
activityType: [],
checkedValues: []
}
checkedValues: [],
publishPlatform: '', //
startTime: '',
endTime: '',
};
},
methods: {
showModal(){
//
getPlatform(value) {
console.log('value: ', value);
this.publishPlatform = value;
},
//
onChangeTime(dates, dateStrings) {
this.startTime = dateStrings[0];
this.endTime = dateStrings[1];
},
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},
onChange(checkedValues) {
this.checkedValues = checkedValues
this.checkedValues = checkedValues;
},
async handleTableChange() {
const { activityType,titleKey,checkedValues} = this;
for (let i = 0;i < checkedValues.length;i++) {
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 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
}
await this.$emit('getSelectTeam',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>

14
src/components/Banner/BannerSearch.vue

@ -12,7 +12,7 @@
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<banner-add :visible="visible" @closeModal="closeModal" />
@ -20,27 +20,27 @@
</template>
<script>
import BannerAdd from "components/Banner/BannerAdd.vue";
import BannerAdd from 'components/Banner/BannerAdd.vue';
// import { selLikeTeam } from 'config/api';
export default {
name: "BannerSearch",
name: 'BannerSearch',
components: {
BannerAdd,
},
data() {
return {
visible: false,
enable: ['启用','禁用'],
enable: ['启用', '禁用'],
use: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

12
src/components/CVideo/VideoSearch.vue

@ -8,7 +8,7 @@
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<video-add :visible="visible" @closeModal="closeModal" />
@ -16,10 +16,10 @@
</template>
<script>
import VideoAdd from "components/CVideo/VideoAdd.vue";
import VideoAdd from 'components/CVideo/VideoAdd.vue';
export default {
name: "VideoSearch",
name: 'VideoSearch',
components: {
VideoAdd,
},
@ -27,14 +27,14 @@ export default {
return {
visible: false,
course: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

14
src/components/Challenge/ChallengeSearch.vue

@ -9,7 +9,7 @@
<div class="flex-1"></div>
<a-button @click="openUnveilingList" class="editable-add-btn">揭榜</a-button>
<a-button @click="showModal" class="ml-3 editable-add-btn">增加</a-button>
<a-button @click="showModal" class="ml-3 editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<challenge-add :visible="visible" @closeModal="closeModal" />
@ -17,10 +17,10 @@
</template>
<script>
import ChallengeAdd from "components/Challenge/ChallengeAdd.vue";
import ChallengeAdd from 'components/Challenge/ChallengeAdd.vue';
export default {
name: "ChallengeSearch",
name: 'ChallengeSearch',
components: {
ChallengeAdd,
},
@ -28,14 +28,14 @@ export default {
return {
visible: false,
source: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},
@ -45,7 +45,7 @@ export default {
},
//
openUnveilingList(){
openUnveilingList() {
const { query } = this.$route;
this.$router.push({ path: '/unveiling-list', query });
},

12
src/components/Course/CourseSearch.vue

@ -13,7 +13,7 @@
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<course-add :visible="visible" @closeModal="closeModal" />
@ -21,10 +21,10 @@
</template>
<script>
import CourseAdd from "components/Course/CourseAdd.vue";
import CourseAdd from 'components/Course/CourseAdd.vue';
export default {
name: "CourseSearch",
name: 'CourseSearch',
components: {
CourseAdd,
},
@ -32,14 +32,14 @@ export default {
return {
visible: false,
courseName: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

12
src/components/Development/DevelopmentSearch.vue

@ -13,7 +13,7 @@
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<development-add :visible="visible" @closeModal="closeModal" />
@ -21,10 +21,10 @@
</template>
<script>
import DevelopmentAdd from "components/Development/DevelopmentAdd.vue";
import DevelopmentAdd from 'components/Development/DevelopmentAdd.vue';
export default {
name: "DevelopmentSearch",
name: 'DevelopmentSearch',
components: {
DevelopmentAdd,
},
@ -32,14 +32,14 @@ export default {
return {
visible: false,
directory: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

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>

177
src/components/IndustryInfo/ActivityAdd.vue

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

166
src/components/IndustryInfo/ActivityDate.vue

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

181
src/components/IndustryInfo/ActivityEdit.vue

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

80
src/components/IndustryInfo/ActivitySearch.vue

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

6
src/components/Institute/InstituteSearch.vue

@ -27,7 +27,7 @@
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<institute-add :visible="visible" @closeModal="closeModal" />
@ -49,11 +49,11 @@ export default {
}
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

10
src/components/Manage/ManageSearch.vue

@ -28,7 +28,7 @@
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<manage-add :visible="visible" @closeModal="closeModal" />
@ -36,10 +36,10 @@
</template>
<script>
import ManageAdd from "components/Manage/ManageAdd.vue";
import ManageAdd from 'components/Manage/ManageAdd.vue';
export default {
name: "ManageSearch",
name: 'ManageSearch',
components: {
ManageAdd,
},
@ -54,11 +54,11 @@ export default {
}
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

12
src/components/Mentor/MentorSearch.vue

@ -13,7 +13,7 @@
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<mentor-add :visible="visible" @closeModal="closeModal" />
@ -21,10 +21,10 @@
</template>
<script>
import MentorAdd from "components/Mentor/MentorAdd.vue";
import MentorAdd from 'components/Mentor/MentorAdd.vue';
export default {
name: "MentorSearch",
name: 'MentorSearch',
components: {
MentorAdd,
},
@ -32,14 +32,14 @@ export default {
return {
visible: false,
tutorName: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

92
src/components/Page/PageDate.vue

@ -1,46 +1,55 @@
<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"
@expand="getDetail"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<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.id"
: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="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>
<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
class="d-flex flex-nowrap justify-space-between"
slot="expandedRowRender"
slot-scope="record"
style="margin: 0"
>
<div>
内容
<span v-dompurify-html="record.content"></span>
<div
class="d-flex flex-nowrap justify-space-between"
slot="expandedRowRender"
slot-scope="record"
style="margin: 0"
>
<div>
<a-spin :spinning="spinning" tip="详情加载中...">
内容
<span v-dompurify-html="record.content" v-if="record.content"></span>
<span v-else>暂无内容</span>
</a-spin>
</div>
</div>
</div>
</a-table>
</div>
<a-empty v-else />
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<page-edit :editItem="editItem" :editVisible="editVisible" @closeModal="closeModal" />
<!-- 编辑 -->
<page-edit :editItem="editItem" :editVisible="editVisible" @closeModal="closeModal" />
</a-spin>
</div>
</template>
@ -86,6 +95,8 @@ export default {
height: '',
editVisible: false,
editItem: {}, //
spinning: false,
showEdit: false,
};
},
@ -102,7 +113,10 @@ export default {
},
methods: {
showEditModal(record) {
async showEditModal(record) {
this.showEdit = true;
await this.getDetail(true, record);
this.showEdit = false;
this.editItem = record;
this.editVisible = true;
},
@ -139,9 +153,11 @@ export default {
async getDetail(expanded, record) {
if (!expanded) return;
try {
this.spinning = true;
const params = { param: { id: record.id } };
const res = await getPage(params);
const { data, msg, code } = res.data;
this.spinning = false;
if (code === 200) {
const item = this.lists.find(item => item.id === record.id);
item.content = data.content;

192
src/components/Policy/PolicyDate.vue

@ -2,7 +2,14 @@
<div class="main flex-1">
<div style="width:100%" v-if="lists && lists.length > 0">
<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">
<template v-if="hasSelected">{{ `选中 ${selectedRowKeys.length} ` }}</template>
</span>
@ -11,8 +18,11 @@
:columns="columns"
:data-source="lists"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:scroll="{ y: height }"
@change="handleTableChange"
bordered
class="white"
>
@ -20,27 +30,43 @@
<span>{{ index + 1 }}</span>
</template>
<template slot="tag" slot-scope="text, record">
<a-tag color="blue">{{ record.tag }}</a-tag>
<template slot="type" slot-scope="text, record">
<a-tag
color="blue"
>{{ record.type === 0 ? '申报通知' : record.type === 1 ? '公告公示' : record.type === 2 ? '政策动态' : record.type === 3 ? '申报指南' : '' }}</a-tag>
</template>
<template slot="auditStatus" slot-scope="text, record">
<a-tag :color="record.auditStatus === '通过' ? 'green' : 'red'">{{ record.auditStatus }}</a-tag>
<template slot="status" slot-scope="text, record">
<a-tag
:color="record.status === 2 ? 'green' : record.status === 1 ? 'red' : 'blue'"
>{{ record.status === 2 ? '已通过' : record.status === 1 ? '未通过' : '审核中' }}</a-tag>
</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 class="d-flex flex-nowrap mb-2">
<div>发布时间{{ record.releaseTime }}</div>
<div class="ml-8">截止时间{{ record.deadline }}</div>
<div
class="d-flex flex-column"
slot="expandedRowRender"
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>原文链接{{ record.content }}</div>
</div>
</a-table>
</div>
@ -52,8 +78,8 @@
</template>
<script>
import PolicyEdit from "components/Policy/PolicyEdit.vue";
// import { delTeam } from 'config/api';
import PolicyEdit from 'components/Policy/PolicyEdit.vue';
import { upPolicy } from 'config/api';
const columns = [
{
@ -61,6 +87,7 @@ const columns = [
align: 'center',
dataIndex: 'id',
key: 'id',
width: 80,
scopedSlots: { customRender: 'id' },
},
{
@ -72,80 +99,58 @@ const columns = [
{
title: '发布部门',
align: 'center',
dataIndex: 'department',
key: 'department',
dataIndex: 'publishDepartName',
key: 'publishDepartName',
},
{
title: '政策类型',
align: 'center',
dataIndex: 'policyType',
key: 'policyType',
dataIndex: 'type',
key: 'type',
width: 100,
scopedSlots: { customRender: 'type' },
},
{
title: '标签',
title: '状态',
align: 'center',
dataIndex: 'tag',
key: 'tag',
scopedSlots: { customRender: 'tag' },
dataIndex: 'status',
key: 'status',
width: 100,
scopedSlots: { customRender: 'status' },
},
{
title: '审核状态',
title: '发布时间',
align: 'center',
dataIndex: 'auditStatus',
key: 'auditStatus',
scopedSlots: { customRender: 'auditStatus' },
dataIndex: 'publishTime',
key: 'publishTime',
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 80,
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 {
name: "PolicyDate",
name: 'PolicyDate',
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
components: {
PolicyEdit,
},
data() {
this.cacheData = lists.map(item => ({ ...item }));
return {
columns,
lists,
loading: false,
selectedRowKeys: [],
editingKey: '',
height: '',
editVisible: false,
editItem: null, //
}
};
},
computed: {
@ -155,57 +160,68 @@ export default {
},
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: {
start() {
this.loading = true;
// ajax request after empty completing
setTimeout(() => {
this.loading = false;
this.selectedRowKeys = [];
}, 1000);
},
//
onSelectChange(selectedRowKeys) {
console.log('selectedRowKeys changed: ', 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);
this.editItem = record;
this.editVisible = true;
},
closeModal(){
closeModal() {
this.editVisible = false;
},
//
async onDelete(teamId) {
try {
// const params = { param: { teamId } };
// const res = await delTeam(params);
// const { data, msg, code } = res.data;
// if (code === 200) {
// this.$message.success('');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== teamId);
// // TODO:
// } else {
// throw msg;
// }
} catch (error) {
this.$message.error(error || '删除失败');
}
},
//
openSignUp(){
openSignUp() {
const { query } = this.$route;
this.$router.push({ path: '/sign-up', query });
}
},
},
};
</script>

131
src/components/Policy/PolicySearch.vue

@ -1,16 +1,47 @@
<template>
<div class="d-flex flex-wrap pb-3">
<div>
<!-- 标题 -->
<a-input @change="handleChangeTitle" placeholder="标题" style="width: 150px" v-model="title" />
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
</div>
<div>
<div class="d-flex flex-nowrap">
<!-- 输入框 -->
<a-select @change="changeType" class="mb-3" placeholder="类型" style="width: 80px">
<a-select-option
: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">增加</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" />
@ -18,49 +49,87 @@
</template>
<script>
import PolicyAdd from "components/Policy/PolicyAdd.vue";
import PolicyAdd from 'components/Policy/PolicyAdd.vue';
// import { selLikeTeam } from 'config/api';
export default {
name: "PolicySearch",
name: 'PolicySearch',
components: {
PolicyAdd,
},
data() {
return {
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: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},
//
handleChangeTitle(value) {
console.log('value: ', value);
this.title = value;
//
onChangeBw(e) {
if (e.target.checked) {
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() {
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 { options } = this;
await this.$emit('getSelectTeam', options);
},
},
};

16
src/components/RD/RDSearch.vue

@ -13,7 +13,7 @@
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<r-d-add :visible="visible" @closeModal="closeModal" />
@ -21,11 +21,11 @@
</template>
<script>
import RDAdd from "components/RD/RDAdd.vue";
import RDAdd from 'components/RD/RDAdd.vue';
import { selLikeTeam } from 'config/api';
export default {
name: "RDSearch",
name: 'RDSearch',
components: {
RDAdd,
},
@ -33,14 +33,14 @@ export default {
return {
visible: false,
teamName: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},
@ -50,11 +50,11 @@ export default {
async handleTableChange() {
try {
const params = { param: {teamName: this.teamName} };
const params = { param: { teamName: this.teamName } };
const res = await selLikeTeam(params);
const { data, msg, code } = res.data;
if (code === 200) {
console.log('搜索结果',data);
console.log('搜索结果', data);
// TODO:
} else {
throw msg;

59
src/components/RDMember/RDMemberSearch.vue

@ -0,0 +1,59 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 团队名称 -->
<div>
<a-input
@change="handleChangeName"
placeholder="团队名称"
style="width: 150px"
v-model="teamName"
/>
<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>
<!-- 添加 -->
<r-d-member-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import RDMemberAdd from 'components/RDMember/RDMemberAdd.vue';
export default {
name: 'RDMemberSearch',
components: {
RDMemberAdd,
},
data() {
return {
visible: false,
teamName: '',
};
},
methods: {
showModal() {
this.visible = true;
},
closeModal() {
this.visible = false;
},
handleChangeName(value) {
console.log('value: ', value);
this.teamName = value;
},
handleTableChange() {
console.log('搜索');
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus"></style>

35
src/components/SpinOff/SpinOffSearch.vue

@ -2,22 +2,14 @@
<div class="d-flex flex-wrap pb-3">
<!-- 企业名称 -->
<div>
<a-input
placeholder="单位名称"
style="width: 150px"
v-model="companyName"
/>
<a-input
placeholder="单位性质"
style="width: 150px"
v-model="companyType"
/>
<a-input placeholder="单位名称" style="width: 150px" v-model="companyName" />
<a-input placeholder="单位性质" style="width: 150px" v-model="companyType" />
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button>
</div>
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<spin-off-add :visible="visible" @closeModal="closeModal" />
@ -25,10 +17,10 @@
</template>
<script>
import SpinOffAdd from "components/SpinOff/SpinOffAdd.vue";
import SpinOffAdd from 'components/SpinOff/SpinOffAdd.vue';
export default {
name: "SpinOffSearch",
name: 'SpinOffSearch',
components: {
SpinOffAdd,
},
@ -37,14 +29,14 @@ export default {
visible: false,
companyName: '',
companyType: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},
@ -55,12 +47,13 @@ export default {
async handleTableChange() {
console.log('搜索');
const { companyName,companyType} = this;
//
const { companyName, companyType } = this;
//
const condition = {
companyName,companyType
}
await this.$emit('getSelectTeam',condition)
companyName,
companyType,
};
await this.$emit('getSelectTeam', condition);
this.activityType = [];
},
},

12
src/components/Transfer/TransferSearch.vue

@ -13,7 +13,7 @@
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<transfer-add :visible="visible" @closeModal="closeModal" />
@ -21,10 +21,10 @@
</template>
<script>
import TransferAdd from "components/Transfer/TransferAdd.vue";
import TransferAdd from 'components/Transfer/TransferAdd.vue';
export default {
name: "TransferSearch",
name: 'TransferSearch',
components: {
TransferAdd,
},
@ -32,14 +32,14 @@ export default {
return {
visible: false,
achievementName: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

35
src/config/api.js

@ -7,6 +7,7 @@ import axios from 'axios';
let { proxyUrl, msgUrl } = require('@/config/setting');
const greenvalley = `${proxyUrl}/greenvalley`;
const policy = `${proxyUrl}/policy`; // 创新政策接口
const researchTeam = `${greenvalley}/researchTeam`; // 创新平台相关操作
const page = `${greenvalley}/page`; // 页面管理相关操作
const industryInfo = `${greenvalley}/industryInfo`; // 行业资讯相关操作
@ -40,11 +41,41 @@ export const getBackendSearch = params => axios.post(`${industryInfo}/backendSea
// 行业资讯列表删除
export const deleteIndustryInfo = params => axios.post(`${industryInfo}/delete`, params);
// 行业资讯列表添加
export const addIndustryInfo = params => axios.post(`${industryInfo}/add`, params);
// 行业资讯列表修改
export const updateIndustryInfo = params => axios.post(`${industryInfo}/update`, params);
// 活动公告列表查询
export const getQueryBack = params => axios.post(`${activity}/query/back`, params);
// // 活动公告列表删除
// export const deleteIndustryInfo = params => axios.post(`${activity}/delete`, params);
// 活动公告详情查询
export const getQueryDetail = params => axios.post(`${activity}/query/detail`, params);
// 活动公告审核
export const auditApply = params => axios.post(`${activity}/audit`, params);
// 添加活动公告
export const saveActivity = params => axios.post(`${activity}/save`, 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 upPolicy = params => axios.post(`${policy}/policy/upPolicy`, params);
// 合作意向列表查询
export const getCreatingPlatformSearch = params => axios.post(`${creatingPlatform}/search`, params);

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

@ -20,7 +20,10 @@ import {
Switch,
Radio,
Cascader,
Checkbox
Checkbox,
Spin,
Tooltip,
Popover,
} from 'ant-design-vue';
import { ConfigProvider } from 'ant-design-vue';
Vue.component(ConfigProvider.name, ConfigProvider);
@ -43,6 +46,9 @@ Vue.use(Switch);
Vue.use(Radio);
Vue.use(Cascader);
Vue.use(Checkbox);
Vue.use(Spin);
Vue.use(Tooltip);
Vue.use(Popover);
Vue.prototype.$message = message;
Vue.prototype.$notification = notification;

8
src/router/index.js

@ -41,12 +41,18 @@ const routes = [
name: 'CommunicationCommunity',
component: () => import(/* webpackChunkName: "communication-community" */ 'views/CommunicationCommunity/CommunicationCommunity.vue'),
},
// 活动公告
// 活动公告--活动通知
{
path: '/event-announcement',
name: 'EventAnnouncement',
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',

54
src/views/EventAnnouncement/EventAnnouncement.vue

@ -1,17 +1,17 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<activity-search @getSelectTeam='getSelectTeam'/>
<activity-search @getSelectTeam="getSelectTeam" />
<activity-date :lists="lists" :pagination="pagination" @getSelectTeam="getSelectTeam" />
</div>
</template>
<script>
import ActivitySearch from "components/Activity/ActivitySearch.vue";
import ActivityDate from "components/Activity/ActivityDate.vue";
import ActivitySearch from 'components/Activity/ActivitySearch.vue';
import ActivityDate from 'components/Activity/ActivityDate.vue';
import { getQueryBack } from 'config/api';
export default {
name: "InnovationPolicy",
name: 'InnovationPolicy',
components: {
ActivitySearch,
ActivityDate,
@ -25,7 +25,7 @@ export default {
},
created() {
this.getSelectTeam()
this.getSelectTeam();
},
methods: {
@ -34,30 +34,38 @@ export default {
* @param { String } competeTimeId 第几届信息的id
*/
async getSelectTeam(condition) {
console.log(condition)
try {
const params = {
param:{
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if (condition) {
if (condition.activityType) {
params.param.activityType = condition.activityType;
}
if(condition){
if(condition.activityType){
params.param.activityType = condition.activityType
}
if(condition.titleKey){
params.param.titleKey = condition.titleKey
}
}
console.log(params.param)
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) {
this.lists = data.list;
let arr = data.list;
arr.forEach(item => {
item.remark = '';
});
this.lists = [...arr];
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;

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>

34
src/views/IndustryInfo/IndustryInfo.vue

@ -1,17 +1,17 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<activity-search @getBackendSearch="getBackendSearch" />
<activity-date :pagination="pagination" :lists="lists" @getBackendSearch="getBackendSearch" />
<activity-date :lists="lists" :pagination="pagination" @getBackendSearch="getBackendSearch" />
</div>
</template>
<script>
import ActivitySearch from "components/Activity/ActivitySearch.vue";
import ActivityDate from "components/Activity/ActivityDate.vue";
import ActivitySearch from 'components/IndustryInfo/ActivitySearch.vue';
import ActivityDate from 'components/IndustryInfo/ActivityDate.vue';
import { getBackendSearch } from 'config/api';
export default {
name: "ActivityBulletin",
name: 'ActivityBulletin',
components: {
ActivitySearch,
ActivityDate,
@ -25,7 +25,7 @@ export default {
},
created() {
this.getBackendSearch()
this.getBackendSearch();
},
methods: {
@ -41,28 +41,26 @@ export default {
pageSize: (condition && condition.pageSize) || 10,
},
};
if(condition){
if(condition.title){
params.param.title = condition.title
if (condition) {
if (condition.title) {
params.param.title = condition.title;
}
if(condition.spreadDepartment){
params.param.spreadDepartment = condition.spreadDepartment
if (condition.spreadDepartment) {
params.param.spreadDepartment = condition.spreadDepartment;
}
if(condition.startTime){
params.param.startTime = condition.startTime
if (condition.startTime) {
params.param.startTime = condition.startTime;
}
if(condition.endTime){
params.param.endTime = condition.endTime
if (condition.endTime) {
params.param.endTime = condition.endTime;
}
if(condition.site){
params.param.site = condition.site
if (condition.site) {
params.param.site = condition.site;
}
}
console.log('params',params)
const res = await getBackendSearch(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;

69
src/views/InnovationPolicy/InnovationPolicy.vue

@ -1,37 +1,84 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<policy-search />
<policy-date />
<policy-search @getSelectTeam="getSelectTeam" />
<policy-date :lists="lists" :pagination="pagination" @getSelectTeam="getSelectTeam" />
</div>
</template>
<script>
import PolicySearch from "components/Policy/PolicySearch.vue";
import PolicyDate from "components/Policy/PolicyDate.vue";
// import { getSelectTeam } from 'config/api';
import PolicySearch from 'components/Policy/PolicySearch.vue';
import PolicyDate from 'components/Policy/PolicyDate.vue';
import { selLikePolicyBack } from 'config/api';
export default {
name: "InnovationPolicy",
name: 'InnovationPolicy',
components: {
PolicySearch,
PolicyDate,
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() {
// this.getSelectTeam()
this.getSelectTeam();
},
methods: {
/**
* 根据团队id查看研发团队相关信息
* 查询创新政策
* @param { String } competeTimeId 第几届信息的id
*/
async getSelectTeam() {
async getSelectTeam(condition) {
try {
const params = {param:{}}
const res = await getSelectTeam(params);
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 { code, msg, data } = res.data;
if (code === 200) {
this.lists = data.list;
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}

2
src/views/TalentRecruitment/TalentRecruitment.vue

@ -1,5 +1,5 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">优先级低</div>
<div class="pa-3 white fill-height d-flex flex-column">开发中... ...</div>
</template>
<script>

15
src/views/UserManage/UserManage.vue

@ -1,20 +1,21 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<user-search />
<user-date />
<!-- <user-search />
<user-date />-->
开发中... ...
</div>
</template>
<script>
// @ is an alias to /src
import UserSearch from "components/User/UserSearch.vue";
import UserDate from "components/User/UserDate.vue";
import UserSearch from 'components/User/UserSearch.vue';
import UserDate from 'components/User/UserDate.vue';
export default {
name: "Home",
name: 'Home',
components: {
UserSearch,
UserDate
}
UserDate,
},
};
</script>

Loading…
Cancel
Save