Browse Source

行业资讯接口完

master
lucky 5 years ago
parent
commit
e17dd66f97
  1. 249
      src/components/Activity/ActivityAdd.vue
  2. 179
      src/components/Activity/ActivityDate.vue
  3. 22
      src/components/Activity/ActivityEdit.vue
  4. 99
      src/components/Activity/ActivitySearch.vue
  5. 14
      src/components/Banner/BannerSearch.vue
  6. 12
      src/components/CVideo/VideoSearch.vue
  7. 14
      src/components/Challenge/ChallengeSearch.vue
  8. 12
      src/components/Course/CourseSearch.vue
  9. 12
      src/components/Development/DevelopmentSearch.vue
  10. 177
      src/components/IndustryInfo/ActivityAdd.vue
  11. 166
      src/components/IndustryInfo/ActivityDate.vue
  12. 176
      src/components/IndustryInfo/ActivityEdit.vue
  13. 80
      src/components/IndustryInfo/ActivitySearch.vue
  14. 12
      src/components/Manage/ManageSearch.vue
  15. 12
      src/components/Mentor/MentorSearch.vue
  16. 10
      src/components/Page/PageDate.vue
  17. 12
      src/components/Policy/PolicySearch.vue
  18. 16
      src/components/RD/RDSearch.vue
  19. 12
      src/components/RDMember/RDMemberSearch.vue
  20. 17
      src/components/Sharing/SharingSearch.vue
  21. 12
      src/components/SpinOff/SpinOffSearch.vue
  22. 12
      src/components/Transfer/TransferSearch.vue
  23. 23
      src/config/api.js
  24. 6
      src/plugins/ant-design-vue.js
  25. 54
      src/views/EventAnnouncement/EventAnnouncement.vue
  26. 34
      src/views/IndustryInfo/IndustryInfo.vue
  27. 16
      src/views/InnovationPolicy/InnovationPolicy.vue
  28. 2
      src/views/TalentRecruitment/TalentRecruitment.vue
  29. 15
      src/views/UserManage/UserManage.vue

249
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:'创业活动'}
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) {

179
src/components/Activity/ActivityDate.vue

@ -6,9 +6,10 @@
:data-source="lists"
:loading="loading"
:pagination="pagination"
@change="handleTableChange"
:row-key="record => record.id"
:row-key="record => record.activityId"
:scroll="{ y: height }"
@change="handleTableChange"
@expand="getDetail"
bordered
class="white"
>
@ -17,19 +18,95 @@
</template>
<template slot="time" slot-scope="text, record">
<span v-if="record.releaseTime">{{ record.releaseTime}}</span><span v-if="record.releaseTime">-{{record.releaseTime}}</span>
<span v-if="record.releaseTime">{{ record.releaseTime}}</span>
<span v-if="record.releaseTime">-{{record.releaseTime}}</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" 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-icon @click="showEditModal(record)" class="pointer mr-3" theme="twoTone" type="edit" />
</template>
<div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<div>详情
<span v-dompurify-html="record.content"></span></div>
<div
class="d-flex flex-column"
slot="expandedRowRender"
slot-scope="record"
style="margin: 0"
>
<a-spin :spinning="spinning" tip="详情加载中...">
<div class="d-flex flex-nowrap justify-space-between mb-3">
<div class="d-flex flex-row">
<span class="font-bold-14">主讲人</span>
<span v-if="record.info && record.info.name">{{ record.info.name }}</span>
<span v-else>暂无</span>
</div>
<div class="d-flex flex-row">
<span class="font-bold-14">
活动类型
<a-tag
color="blue"
v-if="record.info && record.info.activityType !== null"
>{{ record.info.activityType === 0 ? '路演' : record.info.activityType === 1 ? '讲座' : record.info.activityType === 2 ? '沙龙' : '' }}</a-tag>
</span>
</div>
<div class="d-flex flex-row">
<span class="font-bold-14">培训对象</span>
<span v-if="record.info && record.info.trainees">{{ record.info.trainees }}</span>
<span v-else>暂无</span>
</div>
</div>
<div class="d-flex flex-nowrap justify-space-between mb-3">
<div class="d-flex flex-row">
<span class="font-bold-14">组织单位</span>
<span v-if="record.info && record.info.organization">{{ record.info.organization }}</span>
<span v-else>暂无</span>
</div>
<div class="d-flex flex-row">
<span class="font-bold-14">
发布平台
<a-tag
color="green"
v-if="record.info && record.info.publishPlatform !== null"
>{{ record.info.publishPlatform === 0 ? '绿谷' : record.info.publishPlatform === 1 ? '创时代' : '' }}</a-tag>
</span>
</div>
</div>
<div class="mb-3">
<span class="font-bold-14">活动结束内容</span>
<br />
<span v-if="record.info && record.info.endContent">{{ record.info.endContent }}</span>
<span v-else>暂无内容</span>
</div>
<div class="mb-3">
<span class="font-bold-14">公告简介</span>
<br />
<span v-if="record.intro">{{ record.intro }}</span>
<span v-else>暂无内容</span>
</div>
<div v-if="record.info && record.intro">
<span class="font-bold-14">详情</span>
<span v-dompurify-html="record.info.content" v-if="record.info.content"></span>
<span v-else>暂无内容</span>
</div>
</a-spin>
</div>
</a-table>
</div>
@ -41,8 +118,8 @@
</template>
<script>
import ActivityEdit from "components/Activity/ActivityEdit.vue";
import { deleteIndustryInfo } from 'config/api';
import ActivityEdit from 'components/Activity/ActivityEdit.vue';
import { getQueryDetail, auditApply } from 'config/api';
const columns = [
{
@ -50,9 +127,10 @@ const columns = [
align: 'center',
dataIndex: 'id',
key: 'id',
width: 80,
scopedSlots: { customRender: 'id' },
},
{
{
title: '标题',
align: 'center',
dataIndex: 'title',
@ -72,23 +150,32 @@ const columns = [
scopedSlots: { customRender: 'time' },
},
{
title: '公告简介',
title: '审批状态',
align: 'center',
dataIndex: 'intro',
key: 'intro',
dataIndex: 'auditStatus',
key: 'auditStatus',
width: 100,
scopedSlots: { customRender: 'auditStatus' },
},
{
title: '审核',
align: 'center',
dataIndex: 'examine',
key: 'examine',
scopedSlots: { customRender: 'examine' },
},
{
title: '编辑',
align: 'center',
dataIndex: 'edit',
key: 'edit',
width: 200,
width: 80,
scopedSlots: { customRender: 'edit' },
},
];
export default {
name: "ActivityDate",
name: 'ActivityDate',
components: {
ActivityEdit,
},
@ -102,7 +189,8 @@ export default {
height: '',
editVisible: false,
editItem: null, //
}
spinning: false,
};
},
mounted() {
@ -118,45 +206,60 @@ export default {
},
methods: {
showEditModal(record){
showEditModal(record) {
console.log('record: ', record);
this.editItem = record;
this.editVisible = true;
},
async closeModal(){
async closeModal() {
this.editVisible = false;
await this.$emit('getBackendSearch');
await this.$emit('getSelectTeam');
},
//
handleTableChange(pagination) {
const { current, pageSize } = pagination;
const condition = { current, pageSize };
this.$emit('getBackendSearch', condition);
this.$emit('getSelectTeam', condition);
},
//
async onDelete(id) {
//
async getDetail(expanded, record) {
if (!expanded) return;
try {
const params = {param : {id}};
const res = await deleteIndustryInfo(params);
const {data,msg,code} = res.data;
if(code === 200){
this.$message.success('删除成功');
this.$emit('getBackendSearch');
}else{
this.spinning = true;
const params = { param: { activityId: record.activityId } };
const res = await getQueryDetail(params);
const { data, msg, code } = res.data;
this.spinning = false;
if (code === 200) {
const item = this.lists.find(item => item.activityId === record.activityId);
item.info = data;
} else {
throw msg;
}
} catch (error) {
this.$message.error(error || '删除失败');
this.$message.error(error || '查询失败');
}
},
//
openSignUp(){
const { query } = this.$route;
this.$router.push({ path: '/sign-up', query });
}
//
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 || '审核失败');
}
},
},
};
</script>

22
src/components/Activity/ActivityEdit.vue

@ -1,7 +1,7 @@
<template>
<div class="d-flex flex-wrap pb-3">
<!-- 编辑 -->
<a-modal :closable="false" footer title="修改研发团队" v-model="editVisible" width="700px">
<a-modal :closable="false" footer title="修改活动公告" v-model="editVisible" width="700px">
<a-form :form="form" @submit="handleSubmit">
<!-- 发布平台 -->
<a-form-item
@ -153,8 +153,8 @@ 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: () => {} } },
data() {
return {
formItemLayout,
@ -162,16 +162,16 @@ export default {
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:'创业活动'}
{ id: 1, name: '路演' },
{ id: 2, name: '沙龙' },
{ id: 3, name: '论坛' },
{ id: 4, name: '培训' },
{ id: 5, name: '讲座' },
{ id: 6, name: '创业活动' },
],
category: '',
stateValue: 1
}
stateValue: 1,
};
},
methods: {

99
src/components/Activity/ActivitySearch.vue

@ -1,36 +1,41 @@
<template>
<div class="d-flex flex-wrap pb-3">
<div>
<!-- 活动标题 -->
<a-input
class="ml-3"
placeholder="标题"
style="width: 150px"
v-model="titleKey"
/>
<!-- 活动类型 0路演 1讲座 2沙龙 不传参数则查询全部 -->
<span class="ml-8">活动类型</span>
<a-checkbox-group :options="items" @change="onChange"/>
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button>
<div class="d-flex flex-wrap pb-3 align-center">
<!-- 活动类型 0路演 1讲座 2沙龙 不传参数则查询全部 -->
<div class="mb-3">
<span class="font-bold-14">活动类型</span>
<a-checkbox-group :options="items" @change="onChange" />
</div>
<!-- 发布平台 -->
<div class="mb-3">
<span class="font-bold-14 ml-8">发布平台</span>
<a-radio-group @change="getPlatform" v-model="publishPlatform">
<a-radio :value="0">绿谷</a-radio>
<a-radio :value="1">创时代</a-radio>
</a-radio-group>
</div>
<!-- 活动标题 -->
<a-input class="ml-3 mb-3" placeholder="标题" style="width: 150px" v-model="titleKey" />
<!-- 发布时间 -->
<a-range-picker
@change="onChangeTime"
class="ml-3 mb-3"
format="YYYY-MM-DD HH:mm:ss"
show-time
/>
<a-button @click="handleTableChange" class="ml-3 mb-3" type="primary">搜索</a-button>
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn mb-3" type="primary">增加</a-button>
<!-- 添加 -->
<activity-add :visible="visible" @closeModal="closeModal" />
</div>
</template>
<script>
import ActivityAdd from "components/Activity/ActivityAdd.vue";
import ActivityAdd from 'components/Activity/ActivityAdd.vue';
// import { selLikeTeam } from 'config/api';
export default {
name: "ActivitySearch",
name: 'ActivitySearch',
components: {
ActivityAdd,
},
@ -38,46 +43,64 @@ export default {
return {
visible: false,
titleKey: '',
items: ['路演','讲座','沙龙'],
items: ['路演', '讲座', '沙龙'],
activityType: [],
checkedValues: []
}
checkedValues: [],
publishPlatform: '', //
startTime: '',
endTime: '',
};
},
methods: {
showModal(){
//
getPlatform(value) {
console.log('value: ', value);
this.publishPlatform = value;
},
//
onChangeTime(dates, dateStrings) {
this.startTime = dateStrings[0];
this.endTime = dateStrings[1];
},
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},
onChange(checkedValues) {
this.checkedValues = checkedValues
this.checkedValues = checkedValues;
},
async handleTableChange() {
const { activityType,titleKey,checkedValues} = this;
for (let i = 0;i < checkedValues.length;i++) {
const { activityType, titleKey, checkedValues, publishPlatform, startTime, endTime } = this;
for (let i = 0; i < checkedValues.length; i++) {
const item = checkedValues[i];
const currentIndex = this.items.indexOf(item)
const a = this.items.findIndex(a => a === item)
const index = this.activityType.findIndex(c=>c === a.label)
if(index === -1){
this.activityType.push(currentIndex)
const currentIndex = this.items.indexOf(item);
const a = this.items.findIndex(a => a === item);
const index = this.activityType.findIndex(c => c === a.label);
if (index === -1) {
this.activityType.push(currentIndex);
}
}
//
const condition = {
activityType,titleKey
}
await this.$emit('getSelectTeam',condition)
activityType,
titleKey,
publishPlatform,
startTime,
endTime,
};
await this.$emit('getSelectTeam', condition);
this.activityType = [];
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus"></style>

14
src/components/Banner/BannerSearch.vue

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

12
src/components/CVideo/VideoSearch.vue

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

14
src/components/Challenge/ChallengeSearch.vue

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

12
src/components/Course/CourseSearch.vue

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

12
src/components/Development/DevelopmentSearch.vue

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

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>

176
src/components/IndustryInfo/ActivityEdit.vue

@ -0,0 +1,176 @@
<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
:placeholder="editItem.time"
@change="onChange"
format="YYYY-MM-DD HH:mm:ss"
show-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>

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

12
src/components/Mentor/MentorSearch.vue

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

10
src/components/Page/PageDate.vue

@ -31,8 +31,11 @@
style="margin: 0"
>
<div>
内容
<span v-dompurify-html="record.content"></span>
<a-spin :spinning="spinning" tip="详情加载中...">
内容
<span v-dompurify-html="record.content" v-if="record.content"></span>
<span v-else>暂无内容</span>
</a-spin>
</div>
</div>
</a-table>
@ -86,6 +89,7 @@ export default {
height: '',
editVisible: false,
editItem: {}, //
spinning: false,
};
},
@ -139,9 +143,11 @@ export default {
async getDetail(expanded, record) {
if (!expanded) return;
try {
this.spinning = true;
const params = { param: { id: record.id } };
const res = await getPage(params);
const { data, msg, code } = res.data;
this.spinning = false;
if (code === 200) {
const item = this.lists.find(item => item.id === record.id);
item.content = data.content;

12
src/components/Policy/PolicySearch.vue

@ -10,7 +10,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>
<!-- 添加 -->
<policy-add :visible="visible" @closeModal="closeModal" />
@ -18,11 +18,11 @@
</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,
},
@ -30,14 +30,14 @@ export default {
return {
visible: false,
title: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

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

17
src/components/Sharing/SharingSearch.vue

@ -27,7 +27,7 @@
<div class="flex-1"></div>
<a-button @click="showModal" class="editable-add-btn">增加</a-button>
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
<!-- 添加 -->
<sharing-add :visible="visible" @closeModal="closeModal" />
@ -35,10 +35,10 @@
</template>
<script>
import SharingAdd from "components/Sharing/SharingAdd.vue";
import SharingAdd from 'components/Sharing/SharingAdd.vue';
export default {
name: "SharingSearch",
name: 'SharingSearch',
components: {
SharingAdd,
},
@ -49,15 +49,18 @@ export default {
englishName: '',
performance: '',
category: '',
categories: [{id:1,name:'软件'},{id:2,name:'硬件'}]
}
categories: [
{ id: 1, name: '软件' },
{ id: 2, name: '硬件' },
],
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

12
src/components/SpinOff/SpinOffSearch.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>
<!-- 添加 -->
<spin-off-add :visible="visible" @closeModal="closeModal" />
@ -21,10 +21,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 +32,14 @@ export default {
return {
visible: false,
companyName: '',
}
};
},
methods: {
showModal(){
showModal() {
this.visible = true;
},
closeModal(){
closeModal() {
this.visible = false;
},

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

23
src/config/api.js

@ -7,6 +7,7 @@ import axios from 'axios';
let { proxyUrl, msgUrl } = require('@/config/setting');
const greenvalley = `${proxyUrl}/greenvalley`;
const policy = `${proxyUrl}/policy`; // 创新政策接口
const researchTeam = `${greenvalley}/researchTeam`; // 创新平台相关操作
const page = `${greenvalley}/page`; // 页面管理相关操作
const industryInfo = `${greenvalley}/industryInfo`; // 行业资讯相关操作
@ -36,11 +37,29 @@ export const getBackendSearch = params => axios.post(`${industryInfo}/backendSea
// 行业资讯列表删除
export const deleteIndustryInfo = params => axios.post(`${industryInfo}/delete`, params);
// 行业资讯列表添加
export const addIndustryInfo = params => axios.post(`${industryInfo}/add`, params);
// 行业资讯列表修改
export const updateIndustryInfo = params => axios.post(`${industryInfo}/update`, params);
// 活动公告列表查询
export const getQueryBack = params => axios.post(`${activity}/query/back`, params);
// // 活动公告列表删除
// export const deleteIndustryInfo = params => axios.post(`${activity}/delete`, params);
// 活动公告详情查询
export const getQueryDetail = params => axios.post(`${activity}/query/detail`, params);
// 活动公告审核
export const auditApply = params => axios.post(`${activity}/audit`, params);
// 添加活动公告
export const saveActivity = params => axios.post(`${activity}/save`, params);
// 修改活动公告
export const updateActivity = params => axios.post(`${activity}/update`, params);
// 查询创新政策
export const selLikePolicyBack = params => axios.post(`${policy}/policy/selLikePolicyBack`, params);
// 查询所有的研发团队相关信息
export const getAllTeam = () => axios.post(`${researchTeam}/selectAllTeam`);

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

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

54
src/views/EventAnnouncement/EventAnnouncement.vue

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

34
src/views/IndustryInfo/IndustryInfo.vue

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

16
src/views/InnovationPolicy/InnovationPolicy.vue

@ -6,30 +6,30 @@
</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,
},
created() {
// this.getSelectTeam()
this.getSelectTeam();
},
methods: {
/**
* 根据团队id查看研发团队相关信息
* 查询创新政策
* @param { String } competeTimeId 第几届信息的id
*/
async getSelectTeam() {
try {
const params = {param:{}}
const res = await getSelectTeam(params);
const params = { param: {} };
const res = await selLikePolicyBack(params);
const { code, msg, data } = res.data;
if (code === 200) {
} else {

2
src/views/TalentRecruitment/TalentRecruitment.vue

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

15
src/views/UserManage/UserManage.vue

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

Loading…
Cancel
Save