34 changed files with 2192 additions and 603 deletions
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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,0 +1,59 @@ |
|||
<template> |
|||
<div class="d-flex flex-wrap pb-3"> |
|||
<!-- 团队名称 --> |
|||
<div> |
|||
<a-input |
|||
@change="handleChangeName" |
|||
placeholder="团队名称" |
|||
style="width: 150px" |
|||
v-model="teamName" |
|||
/> |
|||
<a-button @click="handleTableChange" class="mx-2" type="primary">搜索</a-button> |
|||
</div> |
|||
|
|||
<div class="flex-1"></div> |
|||
|
|||
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button> |
|||
|
|||
<!-- 添加 --> |
|||
<r-d-member-add :visible="visible" @closeModal="closeModal" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import RDMemberAdd from 'components/RDMember/RDMemberAdd.vue'; |
|||
|
|||
export default { |
|||
name: 'RDMemberSearch', |
|||
components: { |
|||
RDMemberAdd, |
|||
}, |
|||
data() { |
|||
return { |
|||
visible: false, |
|||
teamName: '', |
|||
}; |
|||
}, |
|||
methods: { |
|||
showModal() { |
|||
this.visible = true; |
|||
}, |
|||
|
|||
closeModal() { |
|||
this.visible = false; |
|||
}, |
|||
|
|||
handleChangeName(value) { |
|||
console.log('value: ', value); |
|||
this.teamName = value; |
|||
}, |
|||
|
|||
handleTableChange() { |
|||
console.log('搜索'); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<!-- Add "scoped" attribute to limit CSS to this component only --> |
|||
<style scoped lang="stylus"></style> |
@ -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> |
@ -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…
Reference in new issue