Browse Source

轮播图相关

master
aBin 4 years ago
parent
commit
e0f7bc7459
  1. 16086
      package-lock.json
  2. 251
      src/components/Activity/ActivityAdd.vue
  3. 338
      src/components/Activity/ActivityDate.vue
  4. 304
      src/components/Activity/ActivityEdit.vue
  5. 180
      src/components/Activity/ActivitySearch.vue
  6. 2
      src/components/Banner/BannerSearch.vue
  7. 12
      src/components/CVideo/VideoSearch.vue
  8. 14
      src/components/Challenge/ChallengeSearch.vue
  9. 12
      src/components/Course/CourseSearch.vue
  10. 12
      src/components/Development/DevelopmentSearch.vue
  11. 179
      src/components/Enroll/EnrollDate.vue
  12. 163
      src/components/Enroll/EnrollSearch.vue
  13. 177
      src/components/IndustryInfo/ActivityAdd.vue
  14. 166
      src/components/IndustryInfo/ActivityDate.vue
  15. 181
      src/components/IndustryInfo/ActivityEdit.vue
  16. 80
      src/components/IndustryInfo/ActivitySearch.vue
  17. 0
      src/components/Institute/InstituteAdd.vue
  18. 263
      src/components/Institute/InstituteDate.vue
  19. 0
      src/components/Institute/InstituteEdit.vue
  20. 36
      src/components/Institute/InstituteSearch.vue
  21. 78
      src/components/Manage/ManageDate.vue
  22. 48
      src/components/Manage/ManageSearch.vue
  23. 12
      src/components/Mentor/MentorSearch.vue
  24. 120
      src/components/Page/PageDate.vue
  25. 1
      src/components/Page/PageEdit.vue
  26. 192
      src/components/Policy/PolicyDate.vue
  27. 131
      src/components/Policy/PolicySearch.vue
  28. 16
      src/components/RD/RDSearch.vue
  29. 12
      src/components/RDMember/RDMemberSearch.vue
  30. 204
      src/components/Sharing/SharingDate.vue
  31. 106
      src/components/SpinOff/SpinOffDate.vue
  32. 31
      src/components/SpinOff/SpinOffSearch.vue
  33. 12
      src/components/Transfer/TransferSearch.vue
  34. 0
      src/components/User/UserDate.vue
  35. 0
      src/components/User/UserSearch.vue
  36. 0
      src/components/innovativeService/innovativeServiceAdd.vue
  37. 94
      src/components/innovativeService/innovativeServiceDate.vue
  38. 0
      src/components/innovativeService/innovativeServiceEdit.vue
  39. 91
      src/components/innovativeService/innovativeServiceSearch.vue
  40. 73
      src/config/api.js
  41. 8
      src/plugins/ant-design-vue.js
  42. 8
      src/router/index.js
  43. 60
      src/views/CategoryManage/CategoryManage.vue
  44. 55
      src/views/CooperationIntention/CooperationIntention.vue
  45. 63
      src/views/EventAnnouncement/EventAnnouncement.vue
  46. 85
      src/views/EventRegistration/EventRegistration.vue
  47. 55
      src/views/IndustryInfo/IndustryInfo.vue
  48. 69
      src/views/InnovationPolicy/InnovationPolicy.vue
  49. 61
      src/views/InnovativeLab/InnovativeLab.vue
  50. 70
      src/views/InnovativeService/InnovativeService.vue
  51. 2
      src/views/TalentRecruitment/TalentRecruitment.vue
  52. 17
      src/views/UserManage/UserManage.vue
  53. 17361
      yarn.lock

16086
package-lock.json

File diff suppressed because it is too large

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) {

338
src/components/Activity/ActivityDate.vue

@ -1,59 +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"
:row-key="record => record.id"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<template slot="type" slot-scope="text, record">
<a-tag color="blue">{{ record.type }}</a-tag>
</template>
<template slot="time" slot-scope="text, record">
<div v-if="record.realTime">{{ record.realTime }}</div>
<div v-else>{{ record.planTime }}</div>
</template>
<template slot="state" slot-scope="text, record">
<a-tag color="green">{{ record.state }}</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>
<a-button @click="openSignUp" class="ml-4" size="small" type="primary">报名</a-button>
</template>
<div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div class="d-flex flex-nowrap justify-space-between mb-2">
<div>计划时间{{ record.planTime }}</div>
<div class="ml-8">实际时间{{ record.realTime }}</div>
<div class="ml-8">组织人{{ record.organizer }}</div>
<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>
<div>活动内容{{ record.content }}</div>
</div>
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<activity-edit :editItem="editItem" :editVisible="editVisible" @closeModal="closeModal" />
</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 { delTeam } from 'config/api';
import ActivityEdit from 'components/Activity/ActivityEdit.vue';
import { getQueryDetail, auditApply } from 'config/api';
const columns = [
{
@ -61,142 +142,147 @@ const columns = [
align: 'center',
dataIndex: 'id',
key: 'id',
width: 80,
scopedSlots: { customRender: 'id' },
},
{
title: '发布平台',
title: '标题',
align: 'center',
dataIndex: 'plat',
key: 'plat',
dataIndex: 'title',
key: 'title',
},
{
title: '类型',
title: '地点',
align: 'center',
dataIndex: 'type',
key: 'type',
scopedSlots: { customRender: 'type' },
dataIndex: 'address',
key: 'address',
},
{
title: '举办时间',
title: '活动时间',
align: 'center',
dataIndex: 'time',
key: 'time',
scopedSlots: { customRender: 'time' },
},
{
title: '地点',
align: 'center',
dataIndex: 'place',
key: 'place',
scopedSlots: { customRender: 'place' },
},
{
title: '主讲人',
title: '审批状态',
align: 'center',
dataIndex: 'speaker',
key: 'speaker',
dataIndex: 'auditStatus',
key: 'auditStatus',
width: 100,
scopedSlots: { customRender: 'auditStatus' },
},
{
title: '发布状态',
title: '审核',
align: 'center',
dataIndex: 'state',
key: 'state',
scopedSlots: { customRender: 'state' },
dataIndex: 'examine',
key: 'examine',
scopedSlots: { customRender: 'examine' },
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 200,
scopedSlots: { customRender: 'edit' },
},
];
const lists = [
{
id:'001',
plat:'传控科技',
type: '路演',
planTime: '2020/11/17 08:00 - 2020/11/18 19:00',
realTime:'2020/11/17 08:00 - 2020/11/18 19:00',
place:'太原',
organizer: '张三',
speaker: '李四',
state: '发布',
content:'团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介'
},
{
id:'002',
plat:'中绿环保',
type: '路演',
planTime: '2020/11/17 08:00 - 2020/11/18 19:00',
realTime:'2020/11/17 08:00 - 2020/11/18 19:00',
place:'太原',
organizer: '张三',
speaker: '李四',
state: '不发布',
content:'团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介团队简介'
}
];
export default {
name: "ActivityDate",
name: 'ActivityDate',
components: {
ActivityEdit,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() {
this.cacheData = lists.map(item => ({ ...item }));
return {
columns,
lists,
loading: false,
editingKey: '',
height: '',
editVisible: false,
editItem: null, //
}
spinning: false,
showEdit: false,
};
},
mounted() {
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150;
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);
async showEditModal(record) {
this.showEdit = true;
await this.getDetail(true, record);
this.showEdit = false;
this.editItem = record;
this.editVisible = true;
},
closeModal(){
async closeModal() {
this.editVisible = false;
await this.$emit('getSelectTeam');
},
//
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
this.$emit('getSelectTeam', condition);
},
//
async onDelete(teamId) {
//
async getDetail(expanded, record) {
if (!expanded) return;
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;
// }
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 || '修改失败');
}

180
src/components/Activity/ActivitySearch.vue

@ -1,152 +1,106 @@
<template>
<div class="d-flex flex-wrap pb-3">
<div>
<!-- 发布平台 -->
<a-select @change="getPlatform" placeholder="发布平台" style="width: 100px">
<a-select-option :key="index" :value="plat" v-for="(plat, index) in platforms">{{ plat }}</a-select-option>
</a-select>
<!-- 类型 -->
<a-select @change="getCategory" class="ml-3" placeholder="类型" style="width: 100px">
<a-select-option
:key="index"
:value="category.name"
v-for="(category, index) in categories"
>{{ category.name }}</a-select-option>
</a-select>
<!-- 举办时间 -->
<a-range-picker
@change="onChange"
class="ml-3"
format="YYYY/MM/DD HH:mm:ss"
show-time
style="width: 200px"
/>
<!-- 地点 -->
<a-input
@change="handleChange('place',$event)"
class="ml-3"
placeholder="地点"
style="width: 100px"
v-model="place"
/>
<!-- 组织人 -->
<a-input
@change="handleChange('organizer',$event)"
class="ml-3"
placeholder="组织人"
style="width: 100px"
v-model="organizer"
/>
<!-- 主讲人 -->
<a-input
@change="handleChange('speaker',$event)"
class="ml-3"
placeholder="主讲人"
style="width: 100px"
v-model="speaker"
/>
<!-- 发布状态 -->
<a-select @change="getState" class="ml-3" placeholder="发布状态" style="width: 100px">
<a-select-option :key="index" :value="state" v-for="(state, index) in status">{{ state }}</a-select-option>
</a-select>
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
<div class="d-flex flex-wrap pb-3 align-center">
<!-- 活动类型 0路演 1讲座 2沙龙 不传参数则查询全部 -->
<div class="mb-3">
<span class="font-bold-14">活动类型</span>
<a-checkbox-group :options="items" @change="onChange" />
</div>
<!-- 发布平台 -->
<div class="mb-3">
<span class="font-bold-14 ml-8">发布平台</span>
<a-radio-group @change="getPlatform" v-model="publishPlatform">
<a-radio :value="0">绿谷</a-radio>
<a-radio :value="1">创时代</a-radio>
</a-radio-group>
</div>
<!-- 活动标题 -->
<a-input class="ml-3 mb-3" placeholder="标题" style="width: 150px" v-model="titleKey" />
<!-- 发布时间 -->
<a-range-picker
@change="onChangeTime"
class="ml-3 mb-3"
format="YYYY-MM-DD HH:mm:ss"
show-time
/>
<a-button @click="handleTableChange" class="ml-3 mb-3" type="primary">搜索</a-button>
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn mb-3" type="primary">增加</a-button>
<!-- 添加 -->
<activity-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import ActivityAdd from "components/Activity/ActivityAdd.vue";
import ActivityAdd from 'components/Activity/ActivityAdd.vue';
// import { selLikeTeam } from 'config/api';
export default {
name: "ActivitySearch",
name: 'ActivitySearch',
components: {
ActivityAdd,
},
data() {
return {
visible: false,
publishingPlatform: '',
categories: [
{id:1,name:'路演'},
{id:2,name:'沙龙'},
{id:3,name:'论坛'},
{id:4,name:'培训'},
{id:5,name:'讲座'},
{id:6,name:'创业活动'}
],
category: '',
place: '',
organizer: '',
speaker: '',
status: ['发布','不发布'],
state: '',
platforms: ['绿谷','维基'],
platform: ''
}
titleKey: '',
items: ['路演', '讲座', '沙龙'],
activityType: [],
checkedValues: [],
publishPlatform: '', //
startTime: '',
endTime: '',
};
},
methods: {
showModal(){
this.visible = true;
},
closeModal(){
this.visible = false;
},
handleChange(type, e) {
this.type = e.target.value;
},
methods: {
//
getPlatform(value) {
console.log('value: ', value);
this.platform = value;
this.publishPlatform = value;
},
//
getCategory(value) {
console.log('value: ', value);
this.category = value;
//
onChangeTime(dates, dateStrings) {
this.startTime = dateStrings[0];
this.endTime = dateStrings[1];
},
//
getState(value) {
console.log('value: ', value);
this.state = value;
showModal() {
this.visible = true;
},
closeModal() {
this.visible = false;
},
//
onChange(dates, dateStrings) {
console.log('From: ', dates[0], ', to: ', dates[1]);
console.log('From: ', dateStrings[0], ', to: ', dateStrings[1]);
onChange(checkedValues) {
this.checkedValues = checkedValues;
},
async handleTableChange() {
try {
// const params = { param: {publishingPlatform: this.publishingPlatform} };
// const res = await selLikeTeam(params);
// const { data, msg, code } = res.data;
// if (code === 200) {
// console.log('',data);
// // TODO:
// } else {
// throw msg;
// }
} catch (error) {
this.$message.error(error);
const { activityType, titleKey, checkedValues, publishPlatform, startTime, endTime } = this;
for (let i = 0; i < checkedValues.length; i++) {
const item = checkedValues[i];
const currentIndex = this.items.indexOf(item);
const a = this.items.findIndex(a => a === item);
const index = this.activityType.findIndex(c => c === a.label);
if (index === -1) {
this.activityType.push(currentIndex);
}
}
//
const condition = {
activityType,
titleKey,
publishPlatform,
startTime,
endTime,
};
await this.$emit('getSelectTeam', condition);
this.activityType = [];
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus"></style>

2
src/components/Banner/BannerSearch.vue

@ -20,7 +20,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" @handleTableChange="handleTableChange" />

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>

0
src/components/Sharing/SharingAdd.vue → src/components/Institute/InstituteAdd.vue

263
src/components/Institute/InstituteDate.vue

@ -0,0 +1,263 @@
<template>
<div class="main flex-1">
<div style="width:100%" v-if="lists && lists.length > 0">
<a-table
:columns="columns"
:data-source="lists"
:loading="loading"
:row-key="record => record.id"
@change="handleTableChange"
:scroll="{ y: height }"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<!-- 说明图片 -->
<template slot="researchDirection" slot-scope="text, record">
<img :src="record.researchDirection" class="img" />
<a-modal :imgVisible="imgVisible" @cancel="imgVisible = false" footer title="身份证明">
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" />
</a-modal>
</template>
<!-- 分类管理 -->
<!-- <template slot="categoryManage" slot-scope="text, record">
<a-button @click="openCategoryManage" size="small" type="primary">仪器分类管理</a-button>
</template> -->
<!-- 研究院类型 -->
<template slot="serviceType" slot-scope="text, record">
<span v-if=" record.serviceType === 1">创新平台</span>
<span v-if=" record.serviceType === 2">孵化平台</span>
<span v-if=" record.serviceType === 3">产业平台</span>
</template>
<template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm @confirm="() => onDelete(record.id)" title="确定要删除这一条?" v-if="lists.length">
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm>
</template>
<!-- <div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div>研究方向
<span v-dompurify-html="record.direction"></span></div>
</div>
<div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div>简介
<span v-dompurify-html="record.description"></span></div>
</div> -->
<div
class="d-flex flex-nowrap justify-space-between"
slot="expandedRowRender"
slot-scope="record"
style="margin: 0"
>
<div class="ml-3">分类<span v-dompurify-html="record.direction"></span></div>
<div class="ml-3">备注{{ record.description }}</div>
</div>
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<institute-edit :editVisible="editVisible" @closeModal="closeModal" />
</div>
</template>
<script>
import InstituteEdit from "components/Institute/InstituteEdit.vue";
import { deleteInstitute } from 'config/api';
const columns = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
width: '7%',
scopedSlots: { customRender: 'id' },
},
{
title: '姓名',
align: 'center',
dataIndex: 'name',
key: 'name',
},
{
title: '电话',
align: 'center',
dataIndex: 'phone',
key: 'phone',
},
// {
// title: '',
// align: 'center',
// dataIndex: 'description',
// key: 'description',
// },
// {
// title: '',
// align: 'center',
// dataIndex: 'direction',
// key: 'direction',
// },
{
title: '可做实验',
align: 'center',
dataIndex: 'experiments',
key: 'experiments',
},
{
title: '图片',
align: 'center',
dataIndex: 'picId',
key: 'picId',
},
{
title: '项目分类',
align: 'center',
dataIndex: 'projectKind',
key: 'projectKind',
},
{
title: '研究院类型',
align: 'center',
dataIndex: 'type',
key: 'type',
},
{
title: '校验',
align: 'center',
dataIndex: 'vertify',
key: 'vertify',
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
scopedSlots: { customRender: 'edit' },
},
];
// const lists = [
// {
// id:'001',
// chineseName:'',
// englishName: 'zhou',
// performance:'',
// researchDirection:'assets/logo.png',
// equipmentOwnership: '',
// category:'A',
// remark: ''
// },
// {
// id:'002',
// chineseName:'绿',
// englishName: 'lili',
// performance:'绿',
// researchDirection:'assets/logo.png',
// equipmentOwnership:'',
// category:'B',
// remark: ''
// }
// ];
export default {
name: "InstituteDate",
components: {
InstituteEdit,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() {
return {
columns,
loading: false,
editingKey: '',
height: '',
editVisible: false,
imgVisible: false,
}
},
mounted() {
let th = 250;
let wh = window.innerHeight;
this.height = wh - th;
window.onresize = () => {
return (() => {
wh = window.innerHeight;
this.height = wh - th;
})();
};
},
methods: {
showEditModal(){
this.editVisible = true;
},
async closeModal(){
this.editVisible = false;
await this.$emit('getInstituteSearchBack');
},
//
openTeamMember(){
const { query } = this.$route;
this.$router.push({ path: '/RD-team-member', query });
},
//
openCategoryManage(){
const { query } = this.$route;
this.$router.push({ path: '/category-manage', query });
},
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
this.$emit('getInstituteSearchBack', condition);
},
//
async onDelete(id) {
try {
const params = { param:{id}};
const res = await deleteInstitute(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('删除成功');
this.$emit('getInstituteSearchBack');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== id);
// TODO:
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '删除失败');
}
},
},
};
</script>
<style lang="stylus" scoped>
.main .img {
width: 100%;
}
.main .big_img {
width: 200px;
}
</style>

0
src/components/Sharing/SharingEdit.vue → src/components/Institute/InstituteEdit.vue

36
src/components/Sharing/SharingSearch.vue → src/components/Institute/InstituteSearch.vue

@ -4,11 +4,11 @@
<div>
<a-input
@change="handleChangeChineseName"
placeholder="中文名称"
placeholder="姓名"
style="width: 150px"
v-model="chineseName"
v-model="name"
/>
<a-input
<!-- <a-input
@change="handleChangeEnglishName"
class="ml-3"
placeholder="英文名称"
@ -21,43 +21,39 @@
:value="category.name"
v-for="(category, index) in categories"
>{{ category.name }}</a-select-option>
</a-select>
</a-select> -->
<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>
<!-- 添加 -->
<sharing-add :visible="visible" @closeModal="closeModal" />
<institute-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import SharingAdd from "components/Sharing/SharingAdd.vue";
import InstituteAdd from "components/Institute/InstituteAdd.vue";
export default {
name: "SharingSearch",
name: "InstituteSearch",
components: {
SharingAdd,
InstituteAdd,
},
data() {
return {
visible: false,
chineseName: '',
englishName: '',
performance: '',
category: '',
categories: [{id:1,name:'软件'},{id:2,name:'硬件'}]
name: "",
}
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},
@ -76,8 +72,14 @@ export default {
this.category = value;
},
handleTableChange() {
async handleTableChange() {
console.log('搜索');
const { name} = this;
//
const condition = {
name
}
await this.$emit('getInstituteSearchBack',condition)
},
},
};

78
src/components/Manage/ManageDate.vue

@ -5,7 +5,9 @@
:columns="columns"
:data-source="lists"
:loading="loading"
:pagination="pagination"
:row-key="record => record.id"
:scroll="{ y: height }"
bordered
class="white"
>
@ -13,6 +15,11 @@
<span>{{ index + 1 }}</span>
</template>
<template slot="model" slot-scope="text, record">
<span v-if=" record.model === 0">成果</span>
<span v-if=" record.model === 1">仪器</span>
</template>
<template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm @confirm="() => onDelete(record.id)" title="确定要删除这一条?" v-if="lists.length">
@ -30,6 +37,7 @@
<script>
import ManageEdit from "components/Manage/ManageEdit.vue";
import { selModelDelete } from 'config/api';
const columns = [
{
@ -43,14 +51,15 @@ const columns = [
{
title: '类型',
align: 'center',
dataIndex: 'type',
key: 'type',
dataIndex: 'model',
key: 'model',
scopedSlots: { customRender: 'model' },
},
{
title: '上级类型',
title: '分类名称',
align: 'center',
dataIndex: 'superiorType',
key: 'superiorType',
dataIndex: 'name',
key: 'name',
},
{
title: '编辑',
@ -61,29 +70,32 @@ const columns = [
},
];
const lists = [
{
id:'001',
type:'传控科技',
superiorType: '博士',
},
{
id:'002',
type:'中绿环保',
superiorType: '博士',
}
];
// const lists = [
// {
// id:'001',
// type:'',
// superiorType: '',
// },
// {
// id:'002',
// type:'绿',
// superiorType: '',
// }
// ];
export default {
name: "ManageDate",
components: {
ManageEdit,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() {
this.cacheData = lists.map(item => ({ ...item }));
return {
columns,
lists,
loading: false,
editingKey: '',
height: '',
@ -100,24 +112,26 @@ export default {
this.editVisible = true;
},
closeModal(){
async closeModal(){
this.editVisible = false;
await this.$emit('selModelSearch');
},
//
async onDelete(teamId) {
async onDelete(id) {
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;
// }
const params = { param: { id } };
const res = await selModelDelete(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('删除成功');
this.$emit('selModelSearch');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== id);
// TODO:
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '删除失败');
}

48
src/components/Manage/ManageSearch.vue

@ -4,16 +4,31 @@
<div>
<a-input
@change="handleChangeName"
placeholder="团队名称"
placeholder="分类名称"
style="width: 150px"
v-model="teamName"
v-model="name"
/>
类型:
<a-select
@change="handleChangeSelect('model',$event)"
class="ml-3"
style="width: 150px"
allow-clear
>
<a-select-option
:key="model.id"
:value="model.id"
v-for="model in models"
>{{ model.value }}</a-select-option>
</a-select>
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
</div>
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<manage-add :visible="visible" @closeModal="closeModal" />
@ -21,35 +36,50 @@
</template>
<script>
import ManageAdd from "components/Manage/ManageAdd.vue";
import ManageAdd from 'components/Manage/ManageAdd.vue';
export default {
name: "ManageSearch",
name: 'ManageSearch',
components: {
ManageAdd,
},
data() {
return {
visible: false,
teamName: '',
name: '',
models: [
{ id:0, value:'成果' },
{ id:1, value:'仪器' },
],
}
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},
handleChangeSelect(type, value) {
this[type] = value;
},
handleChangeName(value) {
console.log('value: ', value);
this.teamName = value;
},
handleTableChange() {
async handleTableChange() {
console.log('搜索');
const { name,model} = this;
//
const condition = {
name,model
}
console.log(condition)
await this.$emit('selModelSearch',condition)
},
},
};

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;
},

120
src/components/Page/PageDate.vue

@ -1,52 +1,61 @@
<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>
<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="content" slot-scope="text, record, index">
<span v-dompurify-html="text"></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 slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div class="d-flex flex-nowrap justify-space-between mb-2">
<div>计划时间{{ record.planTime }}</div>
<div class="ml-8">实际时间{{ record.realTime }}</div>
<div class="ml-8">组织人{{ record.organizer }}</div>
<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>活动内容{{ record.content }}</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>
<script>
import PageEdit from 'components/Page/PageEdit.vue';
import { deletePage } from 'config/api';
import { deletePage, getPage } from 'config/api';
const columns = [
{
@ -63,13 +72,6 @@ const columns = [
dataIndex: 'titleCode',
key: 'titleCode',
},
{
title: '内容',
align: 'center',
dataIndex: 'content',
key: 'content',
scopedSlots: { customRender: 'content' },
},
{
title: '编辑',
align: 'center',
@ -87,13 +89,14 @@ export default {
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() {
this.cacheData = this.lists.map(item => ({ ...item }));
return {
columns,
loading: false,
height: '',
editVisible: false,
editItem: {}, //
spinning: false,
showEdit: false,
};
},
@ -110,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;
},
@ -143,6 +149,26 @@ 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;
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '查询失败');
}
},
//
openSignUp() {
const { query } = this.$route;

1
src/components/Page/PageEdit.vue

@ -12,7 +12,6 @@
>
<a-cascader :options="titles" :placeholder="titleCode" @change="onChange" />
</a-form-item>
<a-cascader :options="titles" @change="onChange" placeholder="标题" />
<!-- 内容 -->
<a-form-item
:label-col="formItemLayout.labelCol"

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;

12
src/components/RDMember/RDMemberSearch.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-member-add :visible="visible" @closeModal="closeModal" />
@ -21,10 +21,10 @@
</template>
<script>
import RDMemberAdd from "components/RDMember/RDMemberAdd.vue";
import RDMemberAdd from 'components/RDMember/RDMemberAdd.vue';
export default {
name: "RDMemberSearch",
name: 'RDMemberSearch',
components: {
RDMemberAdd,
},
@ -32,14 +32,14 @@ export default {
return {
visible: false,
teamName: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

204
src/components/Sharing/SharingDate.vue

@ -1,204 +0,0 @@
<template>
<div class="main flex-1">
<div style="width:100%" v-if="lists && lists.length > 0">
<a-table
:columns="columns"
:data-source="lists"
:loading="loading"
:row-key="record => record.id"
bordered
class="white"
>
<template slot="id" slot-scope="text, record, index">
<span>{{ index + 1 }}</span>
</template>
<!-- 说明图片 -->
<template slot="researchDirection" slot-scope="text, record">
<img :src="record.researchDirection" class="img" />
<a-modal :imgVisible="imgVisible" @cancel="imgVisible = false" footer title="身份证明">
<img :src="record.idCardPromise" @click="imgVisible = true" style="width: 100%;" />
</a-modal>
</template>
<!-- 分类管理 -->
<template slot="categoryManage" slot-scope="text, record">
<a-button @click="openCategoryManage" size="small" type="primary">仪器分类管理</a-button>
</template>
<template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm @confirm="() => onDelete(record.id)" title="确定要删除这一条?" v-if="lists.length">
<a-icon class="ml-4 pointer" theme="twoTone" two-tone-color="#ff0000" type="delete" />
</a-popconfirm>
</template>
<div
class="d-flex flex-nowrap justify-space-between"
slot="expandedRowRender"
slot-scope="record"
style="margin: 0"
>
<div>设备所属{{ record.equipmentOwnership }}</div>
<div class="ml-3">分类{{ record.category }}</div>
<div class="ml-3">备注{{ record.remark }}</div>
</div>
</a-table>
</div>
<a-empty v-else />
<!-- 编辑 -->
<sharing-edit :editVisible="editVisible" @closeModal="closeModal" />
</div>
</template>
<script>
import SharingEdit from "components/Sharing/SharingEdit.vue";
const columns = [
{
title: '序号',
align: 'center',
dataIndex: 'id',
key: 'id',
width: '7%',
scopedSlots: { customRender: 'id' },
},
{
title: '中文名称',
align: 'center',
dataIndex: 'chineseName',
key: 'chineseName',
},
{
title: '英文名称',
align: 'center',
dataIndex: 'englishName',
key: 'englishName',
},
{
title: '主要性能指标及功能用途',
align: 'center',
dataIndex: 'performance',
key: 'performance',
},
{
title: '说明图片',
align: 'center',
dataIndex: 'researchDirection',
key: 'researchDirection',
scopedSlots: { customRender: 'researchDirection' },
},
{
title: '分类管理',
align: 'center',
dataIndex: 'categoryManage',
key: 'categoryManage',
scopedSlots: { customRender: 'categoryManage' },
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
scopedSlots: { customRender: 'edit' },
},
];
const lists = [
{
id:'001',
chineseName:'传控科技',
englishName: 'zhou',
performance:'传控科技',
researchDirection:'assets/logo.png',
equipmentOwnership: '软件',
category:'A',
remark: '无'
},
{
id:'002',
chineseName:'中绿环保',
englishName: 'lili',
performance:'中绿环保',
researchDirection:'assets/logo.png',
equipmentOwnership:'软件',
category:'B',
remark: '无'
}
];
export default {
name: "SharingDate",
components: {
SharingEdit,
},
data() {
this.cacheData = lists.map(item => ({ ...item }));
return {
columns,
lists,
loading: false,
editingKey: '',
height: '',
editVisible: false,
imgVisible: false,
}
},
mounted() {
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150;
},
methods: {
showEditModal(){
this.editVisible = true;
},
closeModal(){
this.editVisible = false;
},
//
openTeamMember(){
const { query } = this.$route;
this.$router.push({ path: '/RD-team-member', query });
},
//
openCategoryManage(){
const { query } = this.$route;
this.$router.push({ path: '/category-manage', query });
},
//
async onDelete(teamId) {
try {
const params = { param: { teamId } };
// const res = await delTeam(params);
// const { data, msg, code } = res.data;
// if (code === 200) {
// this.$message.success('');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== teamId);
// // TODO:
// } else {
// throw msg;
// }
} catch (error) {
this.$message.error(error || '删除失败');
}
},
},
};
</script>
<style lang="stylus" scoped>
.main .img {
width: 100%;
}
.main .big_img {
width: 200px;
}
</style>

106
src/components/SpinOff/SpinOffDate.vue

@ -13,6 +13,25 @@
<span>{{ index + 1 }}</span>
</template>
<template slot="position" slot-scope="text, record">
<span v-if=" record.position === 0">功能食品协同创新中心</span>
<span v-if=" record.position === 1">现代医药</span>
<span v-if=" record.position === 2">生物医学工程</span>
<span v-if=" record.position === 3">数字健康开发</span>
<span v-if=" record.position === 4">其他</span>
</template>
<template slot="dealStatus" slot-scope="text, record">
<!-- <a-tag
:color="record.dealStatus === 1 ? 'blue' : 'red'"
>{{ record.dealStatus === 0 ? '未审核' : '不通过' }}</a-tag> -->
<a-tag :color="record.dealStatus === 1 ? 'blue' : 'red'" v-if=" record.dealStatus === 0">未审核</a-tag>
<a-tag :color="record.dealStatus === 1 ? 'blue' : 'red'" v-if=" record.dealStatus === 1">通过</a-tag>
<a-tag :color="record.dealStatus === 1 ? 'blue' : 'red'" v-if=" record.dealStatus === 2">未通过</a-tag>
</template>
<!-- 说明图片 -->
<template slot="logo" slot-scope="text, record">
<img :src="record.logo" class="img" />
@ -38,6 +57,7 @@
<script>
import SpinOffEdit from "components/SpinOff/SpinOffEdit.vue";
import {getCreatingPlatformDelete} from "config/api"
const columns = [
{
@ -49,23 +69,60 @@ const columns = [
scopedSlots: { customRender: 'id' },
},
{
title: 'logo',
title: '单位名称',
align: 'center',
dataIndex: 'logo',
key: 'logo',
scopedSlots: { customRender: 'logo' },
dataIndex: 'companyName',
key: 'companyName',
},
{
title: '企业名',
title: '单位性质',
align: 'center',
dataIndex: 'companyName',
key: 'companyName',
dataIndex: 'companyType',
key: 'companyType',
},
{
title: '组织机构代码',
align: 'center',
dataIndex: 'code',
key: 'code',
},
{
title: '研究方向',
align: 'center',
dataIndex: 'position',
key: 'position',
scopedSlots: { customRender: 'position' },
},
{
title: '单位负责人',
align: 'center',
dataIndex: 'ower',
key: 'ower',
},
{
title: '英文名',
title: '单位邮箱',
align: 'center',
dataIndex: 'englishName',
key: 'englishName',
dataIndex: 'email',
key: 'email',
},
{
title: '联系人',
align: 'center',
dataIndex: 'contact',
key: 'contact',
},
{
title: '联系电话',
align: 'center',
dataIndex: 'phone',
key: 'phone',
},
{
title: '处理状态',
align: 'center',
dataIndex: 'dealStatus',
key: 'dealStatus',
scopedSlots: { customRender: 'dealStatus' },
},
{
title: '编辑',
@ -96,11 +153,13 @@ export default {
components: {
SpinOffEdit,
},
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() {
this.cacheData = lists.map(item => ({ ...item }));
return {
columns,
lists,
loading: false,
height: '',
editVisible: false,
@ -122,19 +181,20 @@ export default {
},
//
async onDelete(teamId) {
async onDelete(id) {
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;
// }
const params = { param: { id } };
const res = await getCreatingPlatformDelete(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('删除成功');
this.$emit('getCreatingPlatformSearch');
// const arr = [...this.lists];
// this.lists = arr.filter(item => item.id !== teamId);
// TODO:
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '删除失败');
}

31
src/components/SpinOff/SpinOffSearch.vue

@ -2,18 +2,14 @@
<div class="d-flex flex-wrap pb-3">
<!-- 企业名称 -->
<div>
<a-input
@change="handleChangeName"
placeholder="企业名称"
style="width: 150px"
v-model="companyName"
/>
<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" />
@ -21,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,
},
@ -32,14 +28,15 @@ export default {
return {
visible: false,
companyName: '',
}
companyType: '',
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},
@ -48,8 +45,16 @@ export default {
this.companyName = value;
},
handleTableChange() {
async handleTableChange() {
console.log('搜索');
const { companyName, companyType } = this;
//
const 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;
},

0
src/components/Enterprise/EnterpriseDate.vue → src/components/User/UserDate.vue

0
src/components/Enterprise/EnterpriseSearch.vue → src/components/User/UserSearch.vue

0
src/components/RDMember/RDMemberAdd.vue → src/components/innovativeService/innovativeServiceAdd.vue

94
src/components/RDMember/RDMemberDate.vue → src/components/innovativeService/innovativeServiceDate.vue

@ -6,6 +6,7 @@
:data-source="lists"
:loading="loading"
:row-key="record => record.id"
:scroll="{ y: height }"
bordered
class="white"
>
@ -13,6 +14,16 @@
<span>{{ index + 1 }}</span>
</template>
<template slot="picUrl" slot-scope="text, record">
<img :src="record.picUrl" width="50" height="50">
</template>
<template slot="serviceType" slot-scope="text, record">
<span v-if=" record.serviceType === 1">创新平台</span>
<span v-if=" record.serviceType === 2">孵化平台</span>
<span v-if=" record.serviceType === 3">产业平台</span>
</template>
<template slot="edit" slot-scope="text, record">
<a-icon @click="showEditModal" class="pointer" theme="twoTone" type="edit" />
<a-popconfirm @confirm="() => onDelete(record.id)" title="确定要删除这一条?" v-if="lists.length">
@ -29,7 +40,7 @@
</template>
<script>
import RDMemberEdit from "components/RDMember/RDMemberEdit.vue";
import RDMemberEdit from "components/innovativeService/innovativeServiceEdit.vue";
const columns = [
{
@ -41,54 +52,52 @@ const columns = [
scopedSlots: { customRender: 'id' },
},
{
title: '姓名',
title: '服务名称',
align: 'center',
dataIndex: 'name',
key: 'name',
scopedSlots: { customRender: 'name' },
},
{
title: '性别',
title: '服务简介',
align: 'center',
dataIndex: 'sex',
key: 'sex',
scopedSlots: { customRender: 'sex' },
dataIndex: 'orders',
key: 'orders',
},
{
title: '所在单位',
title: '服务图片',
align: 'center',
dataIndex: 'supportUnit',
key: 'supportUnit',
scopedSlots: { customRender: 'supportUnit' },
dataIndex: 'picUrl',
key: 'picUrl',
    scopedSlots: { customRender: 'picUrl' },
},
{
title: '出生年月',
title: '服务状态',
align: 'center',
dataIndex: 'birth',
key: 'birth',
scopedSlots: { customRender: 'birth' },
dataIndex: 'recStatus',
key: 'recStatus',
},
{
title: '学历/学位',
title: '服务类型',
align: 'center',
dataIndex: 'education',
key: 'education',
scopedSlots: { customRender: 'education' },
},
{
title: '职称/职务',
align: 'center',
dataIndex: 'jobTitle',
key: 'jobTitle',
scopedSlots: { customRender: 'jobTitle' },
},
{
title: '研究方向',
align: 'center',
dataIndex: 'researchDirection',
key: 'researchDirection',
scopedSlots: { customRender: 'researchDirection' },
dataIndex: 'serviceType',
key: 'serviceType',
scopedSlots: { customRender: 'serviceType' },
},
// {
// title: '/',
// align: 'center',
// dataIndex: 'jobTitle',
// key: 'jobTitle',
// scopedSlots: { customRender: 'jobTitle' },
// },
// {
// title: '',
// align: 'center',
// dataIndex: 'researchDirection',
// key: 'researchDirection',
// scopedSlots: { customRender: 'researchDirection' },
// },
{
title: '编辑',
align: 'center',
@ -98,7 +107,7 @@ const columns = [
},
];
// const lists = [
// const columns = [
// {
// id:'001',
// name:'',
@ -122,11 +131,13 @@ const columns = [
// ];
export default {
name: "RDMemberDate",
name: "innovativeServiceDate",
components: {
RDMemberEdit,
},
props: { lists: { type: Array, default: () => {} } },
// props: { lists: { type: Array, default: () => {} } },
props: { lists: { type: Array, default: () => [] }, pagination: { type: Object, default: () => {} } },
data() {
return {
columns,
@ -138,8 +149,15 @@ export default {
},
mounted() {
console.log('lists',this.lists);
this.height = document.getElementsByClassName('main')[0].offsetHeight - 150;
let th = 250;
let wh = window.innerHeight;
this.height = wh - th;
window.onresize = () => {
return (() => {
wh = window.innerHeight;
this.height = wh - th;
})();
};
},
methods: {

0
src/components/RDMember/RDMemberEdit.vue → src/components/innovativeService/innovativeServiceEdit.vue

91
src/components/innovativeService/innovativeServiceSearch.vue

@ -0,0 +1,91 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 团队名称 -->
<div>
<a-input
placeholder="服务名称"
style="width: 150px"
v-model="name"
/>
服务类型:
<a-select
@change="handleChangeSelect('serviceType',$event)"
class="ml-3"
style="width: 150px"
allow-clear
>
<a-select-option
:key="serviceType.id"
:value="serviceType.id"
v-for="serviceType in serviceTypes"
>{{ serviceType.value }}</a-select-option>
</a-select>
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
</div>
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<!-- 添加 -->
<r-d-member-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import RDMemberAdd from "components/innovativeService/innovativeServiceAdd.vue";
export default {
name: "innovativeServiceSearch",
components: {
RDMemberAdd,
},
data() {
return {
visible: false,
name: '',
serviceTypes: [
{ id:1, value:'创新平台' },
{ id:2, value:'孵化平台' },
{ id:3, value:'产业平台' },
],
}
},
methods: {
showModal(){
this.visible = true;
},
closeModal(){
this.visible = false;
},
handleChangeSelect(type, value) {
this[type] = value;
},
handleChangeName(value) {
console.log('value: ', value);
this.name = value;
},
async handleTableChange() {
console.log('搜索');
const { name,serviceType} = this;
console.log(name,serviceType)
//
const condition = {
name,serviceType
}
await this.$emit('getInnovativeServiceSearch',condition)
this.activityType = [];
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus"></style>

73
src/config/api.js

@ -7,12 +7,19 @@ 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 carousel = `${greenvalley}/carousel`; // 轮播图相关接口
// 上传附件
export const upload = `${greenvalley}/file/upload`;
const industryInfo = `${greenvalley}/industryInfo`; // 行业资讯相关操作
const activity = `${greenvalley}/activity`; // 活动公告相关操作
const creatingPlatform = `${greenvalley}/creatingPlatform`; // 合作意向相关操作
const serviceProject = `${greenvalley}/serviceProject`; // 创新部服务相关操作
const institute = `${greenvalley}/institute`; // 实验室(研究院)相关操作
const achInstr = `${greenvalley}/achInstr`; // 创新部类型相关操作
// websocket基础地址
export const WS_BASE_URL = msgUrl;
@ -29,6 +36,72 @@ export const deletePage = params => axios.post(`${page}/delete`, params);
// 页面配置修改
export const updatePage = params => axios.post(`${page}/update`, params);
// 页面详情查询
export const getPage = params => axios.post(`${page}/get`, params);
// 行业资讯列表查询
export const getBackendSearch = params => axios.post(`${industryInfo}/backendSearch`, params);
// 行业资讯列表删除
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 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);
// 合作意向删除
export const getCreatingPlatformDelete = params => axios.post(`${creatingPlatform}/delete`, params);
// 创新部服务列表查询
export const getInnovativeServiceSearch = params => axios.post(`${serviceProject}/selServiceH`, params);
// 实验室[研究院]列表查询
export const getInstituteSearchBack = params => axios.post(`${institute}/searchBack`, params);
// 实验室[研究院]删除
export const deleteInstitute = params => axios.post(`${institute}/instituteDelete`, params);
// 创新部类型列表查询
export const selModelSearch = params => axios.post(`${achInstr}/selModel`, params);
// 创新部类型列表查询
export const selModelDelete = params => axios.post(`${achInstr}/deleteModel`, params);
// 查询所有的研发团队相关信息
export const getAllTeam = () => axios.post(`${researchTeam}/selectAllTeam`);

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

@ -20,6 +20,10 @@ import {
Switch,
Radio,
Cascader,
Checkbox,
Spin,
Tooltip,
Popover,
} from 'ant-design-vue';
import { ConfigProvider } from 'ant-design-vue';
Vue.component(ConfigProvider.name, ConfigProvider);
@ -41,6 +45,10 @@ Vue.use(DatePicker);
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',

60
src/views/CategoryManage/CategoryManage.vue

@ -1,7 +1,7 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<manage-search />
<manage-date />
<manage-search @selModelSearch="selModelSearch" />
<manage-date :pagination="pagination" :lists="lists" @selModelSearch="selModelSearch" />
</div>
</template>
@ -9,12 +9,66 @@
// @ is an alias to /src
import ManageSearch from "components/Manage/ManageSearch.vue";
import ManageDate from "components/Manage/ManageDate.vue";
import {selModelSearch} from 'config/api';
export default {
name: "CategoryManage",
components: {
ManageSearch,
ManageDate,
}
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() {
this.selModelSearch()
},
methods: {
/**
* 根据团队id查看研发团队相关信息
* @param { String } competeTimeId 第几届信息的id
*/
async selModelSearch(condition) {
try {
const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if(condition){
if(condition.model !== ''){
params.param.model = condition.model
}
if(condition.name){
params.param.name = condition.name
}
}
console.log('params',params)
const res = await selModelSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
console.log(data)
this.lists = data;
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/CooperationIntention/CooperationIntention.vue

@ -1,19 +1,70 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<spin-off-search />
<spin-off-date />
<spin-off-search @getCreatingPlatformSearch="getCreatingPlatformSearch" />
<spin-off-date :pagination="pagination" :lists="lists" @getCreatingPlatformSearch="getCreatingPlatformSearch"/>
</div>
</template>
<script>
import SpinOffSearch from "components/SpinOff/SpinOffSearch.vue";
import SpinOffDate from "components/SpinOff/SpinOffDate.vue";
import { getCreatingPlatformSearch } from 'config/api';
export default {
name: "DerivativeSpinOffs",
components: {
SpinOffSearch,
SpinOffDate,
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() {
this.getCreatingPlatformSearch()
},
methods: {
async getCreatingPlatformSearch(condition){
try {
const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if(condition){
if(condition.companyName){
params.param.companyName = condition.companyName
}
if(condition.companyType){
params.param.companyType = condition.companyType
}
}
const res = await getCreatingPlatformSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
console.log(data)
this.lists = data.list;
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}
} catch (error) {
this.$message.error(error);
}
}
}
};
</script>

63
src/views/EventAnnouncement/EventAnnouncement.vue

@ -1,24 +1,31 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<policy-search />
<policy-date />
<activity-search @getSelectTeam="getSelectTeam" />
<activity-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 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: {
PolicySearch,
PolicyDate,
ActivitySearch,
ActivityDate,
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() {
// this.getSelectTeam()
this.getSelectTeam();
},
methods: {
@ -26,12 +33,44 @@ export default {
* 根据团队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.activityType) {
params.param.activityType = condition.activityType;
}
if (condition.titleKey) {
params.param.titleKey = condition.titleKey;
}
if (condition.platValue) {
params.param.platValue = condition.platValue;
}
if (condition.startTime) {
params.param.startTime = condition.startTime;
}
if (condition.endTime) {
params.param.endTime = condition.endTime;
}
}
const res = await getQueryBack(params);
const { code, msg, data } = res.data;
if (code === 200) {
let arr = data.list;
arr.forEach(item => {
item.remark = '';
});
this.lists = [...arr];
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}

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/IndustryInfo/IndustryInfo.vue

@ -1,24 +1,31 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<activity-search />
<activity-date />
<activity-search @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 { getSelectTeam } from 'config/api';
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,
},
data() {
return {
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() {
// this.getSelectTeam()
this.getBackendSearch();
},
methods: {
@ -26,12 +33,40 @@ export default {
* 根据团队id查看研发团队相关信息
* @param { String } competeTimeId 第几届信息的id
*/
async getSelectTeam() {
async getBackendSearch(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.title) {
params.param.title = condition.title;
}
if (condition.spreadDepartment) {
params.param.spreadDepartment = condition.spreadDepartment;
}
if (condition.startTime) {
params.param.startTime = condition.startTime;
}
if (condition.endTime) {
params.param.endTime = condition.endTime;
}
if (condition.site) {
params.param.site = condition.site;
}
}
const res = await getBackendSearch(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 || '获取失败';
}

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 || '获取失败';
}

61
src/views/InnovativeLab/InnovativeLab.vue

@ -1,19 +1,66 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<sharing-search />
<sharing-date />
<institute-search @getInstituteSearchBack="getInstituteSearchBack" />
<institute-date :pagination="pagination" :lists="lists" @getInstituteSearchBack="getInstituteSearchBack" />
</div>
</template>
<script>
import SharingSearch from "components/Sharing/SharingSearch.vue";
import SharingDate from "components/Sharing/SharingDate.vue";
import InstituteSearch from "components/Institute/InstituteSearch.vue";
import InstituteDate from "components/Institute/InstituteDate.vue";
import { getInstituteSearchBack } from "config/api";
export default {
name: "ResourceSharing",
components: {
SharingSearch,
SharingDate,
}
InstituteSearch,
InstituteDate,
},
data(){
return{
lists: [],
pagination: { current: 1, pageSize: 10 },
};
},
created() {
this.getInstituteSearchBack()
},
methods: {
async getInstituteSearchBack(condition) {
try {
const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if(condition){
if(condition.name){
params.param.name = condition.name
}
}
console.log('params',params)
const res = await getInstituteSearchBack(params);
const { code, msg, data } = res.data;
if (code === 200) {
console.log(data)
this.lists = data.list;
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}
} catch (error) {
this.$message.error(error);
}
},
},
};
</script>

70
src/views/InnovativeService/InnovativeService.vue

@ -1,20 +1,78 @@
<template>
<div class="pa-3 white fill-height d-flex flex-column">
<r-d-member-search />
<r-d-member-date />
<!-- <r-d-member-search />
<r-d-member-date /> -->
<innovative-service-search @getInnovativeServiceSearch="getInnovativeServiceSearch" />
<innovative-service-date :pagination="pagination" :lists="lists" @getInnovativeServiceSearch="getInnovativeServiceSearch" />
</div>
</template>
<script>
// @ is an alias to /src
import RDMemberSearch from "components/RDMember/RDMemberSearch.vue";
import RDMemberDate from "components/RDMember/RDMemberDate.vue";
import innovativeServiceSearch from "components/innovativeService/innovativeServiceSearch.vue";
import innovativeServiceDate from "components/innovativeService/innovativeServiceDate.vue";
import { getInnovativeServiceSearch } from 'config/api';
export default {
name: "RDTeamMember",
components: {
RDMemberSearch,
RDMemberDate,
innovativeServiceSearch,
innovativeServiceDate,
},
data(){
return{
lists: [],
pagination:{ current: 1,pageSize: 10},
};
},
created() {
this.getInnovativeServiceSearch()
},
methods: {
async getInnovativeServiceSearch(condition) {
try {
const params = {
param: {
pageNum: (condition && condition.current) || 1,
pageSize: (condition && condition.pageSize) || 10,
},
};
if(condition){
if(condition.id){
params.param.id = condition.id
}
if(condition.name){
params.param.name = condition.name
}
if(condition.recStatus){
params.param.recStatus = condition.recStatus
}
if(condition.serviceType){
params.param.serviceType = condition.serviceType
}
}
console.log('params',params)
const res = await getInnovativeServiceSearch(params);
const { code, msg, data } = res.data;
if (code === 200) {
this.lists = data;
console.log(this.lists);
const paper = { ...this.pagination };
paper.current = data.pageNum;
paper.total = +data.total;
paper.pageSize = data.pageSize;
this.pagination = paper;
} else {
throw msg || '获取失败';
}
} catch (error) {
this.$message.error(error);
}
},
}
};
</script>

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>

17
src/views/UserManage/UserManage.vue

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

17361
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save