bibi 3 years ago
parent 6668c99dcc
commit a50096a106

@ -131,6 +131,23 @@ export const columns = [
scopedSlots: { customRender: "action" },
},
]
export const detailColumns = [
{
title: "报名人",
dataIndex: "name",
width: "22%",
},
{
title: "报名联系方式",
dataIndex: "tel",
width: "32%",
},
{
title: "报名时间",
dataIndex: "createDate",
width: "32%",
},
]
export const pagination = {
current: 1,
total: 0,
@ -139,3 +156,11 @@ export const pagination = {
showSizeChanger: true,
showQuickJumper: true,
}
export const detailpagination = {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
}

@ -0,0 +1,173 @@
<template>
<div>
<a-drawer
title="活动-详情"
:width="720"
:visible="show"
:body-style="{ paddingBottom: '80px' }"
@close="detailClose"
>
<div class="drawer-content">
<div class="content-title">
{{ detailData.title }}
</div>
<img v-for="item,index in detailData.imgList" :key='index' :src="$ImgUrl(item.url)" class="content-img">
<a-descriptions>
<a-descriptions-item label="创建时间">
{{ detailData.createDate }}
</a-descriptions-item>
<a-descriptions-item label="是否显示在app上">
{{ detailData.isShow ? "是" : "否" }}
</a-descriptions-item>
<a-descriptions-item label="活动对象">
{{ detailData.activityObject | activityObject }}
</a-descriptions-item>
<a-descriptions-item label="活动内容">
{{ detailData.content }}
</a-descriptions-item>
<a-descriptions-item label="活动主办方">
{{ detailData.organizerName }}
</a-descriptions-item>
</a-descriptions>
<a-descriptions title="报名设置">
<a-descriptions-item label="报名开始时间">
{{ detailData.registrationStartTime }}
</a-descriptions-item>
<a-descriptions-item label="报名结束时间">
{{ detailData.registrationEndTime }}
</a-descriptions-item>
<a-descriptions-item label="报名人数上限">
{{ detailData.registrationNumMax }}
</a-descriptions-item>
<a-descriptions-item label="活动地点">
{{ detailData.activityAddress }}
</a-descriptions-item>
</a-descriptions>
<a-descriptions title="活动设置">
<a-descriptions-item label="活动开始时间">
{{ detailData.activityStartTime }}
</a-descriptions-item>
<a-descriptions-item label="活动结束时间">
{{ detailData.activityEndTime }}
</a-descriptions-item>
<a-descriptions-item label="活动联系人">
{{ detailData.activityContact }}
</a-descriptions-item>
<a-descriptions-item label="活动联系方式">
{{ detailData.activityTel }}
</a-descriptions-item>
</a-descriptions>
报名记录
<a-divider></a-divider>
<a-table
:columns="detailColumns"
:data-source="tableData"
:pagination="pagination"
:scroll="{ x: 600 }"
@change="handleTableChange"
:row-key="
(record, index) => {
return record.id;
}
"
></a-table>
</div>
<div class="drawer-footer">
<a-button :style="{ marginRight: '8px' }" @click="detailClose">
关闭
</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
import { activityInfo, registrationList } from "@/api/operation/activity";
import { detailColumns, detailpagination } from "./config";
export default {
props: {
show: {
type: Boolean,
default: false,
},
detailId: Number,
},
data() {
return {
tableData: [],
detailData: {},
detailColumns,
pagination: detailpagination,
};
},
mounted() {},
filters: {
activityObject(value) {
switch (value) {
case 1:
return "全部";
break;
case 2:
return "住户";
break;
case 3:
return "业主";
break;
case 4:
return "租户";
break;
case 5:
return "管家";
break;
default:
break;
}
},
},
methods: {
detailClose() {
this.$emit("detailClose");
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
pager.pageSize = pagination.pageSize;
this.pagination = pager;
this.getData();
},
},
watch: {
detailId: {
handler(id) {
if (id !== null && id !== undefined) {
console.log(id);
Promise.all([
activityInfo({ activityId: id }),
registrationList({ activityId: id }),
]).then((res) => {
this.detailData = res[0].data;
this.tableData = res[1].data.rows;
this.pagination.total = res[1].data.total;
});
}
},
immediate: true,
},
},
};
</script>
<style lang="less" scoped>
.content-title {
color: #000000d9;
font-weight: 500;
font-size: 18px;
line-height: 25px;
}
.content-img{
width: 108px;
height: 86px;
}
</style>

@ -23,6 +23,7 @@
>
<span slot="action" slot-scope="text, row">
<a-space>
<a class="ant-dropdown-link" @click="detail(row.id)"></a>
<a class="ant-dropdown-link" @click="edit(row.id)"></a>
<a class="ant-dropdown-link" @click="del([row.id])"></a>
</a-space>
@ -62,6 +63,7 @@
@addClose="addClose"
:editId="editId"
></addForm>
<detailForm :detailId="detailId" :show="drawer.detail" @detailClose="detailClose"></detailForm>
</div>
</template>
@ -69,16 +71,20 @@
import { activityList, activityDel } from "@/api/operation/activity";
import { formItem, columns, pagination } from "./depend/config";
import addForm from "./depend/form.vue";
import detailForm from "./depend/detail.vue";
export default {
components: {
addForm,
detailForm
},
data() {
return {
drawer: {
show: false,
detail:false
},
editId: null,
detailId:null,
tableData: [],
searchForm: {
activityAddress: undefined,
@ -170,6 +176,14 @@ export default {
success() {
this.getData();
},
detail(id){
this.drawer.detail = true;
this.detailId = id;
},
detailClose(){
this.detailId = null;
this.drawer.detail = false;
}
},
computed: {
hasSelected() {

@ -1,23 +1,40 @@
export const formItem = [
{
type: 'input',
label:'话题标题',
prop:'title',
placeholder:'请输入标题'
label:'单位名称',
prop:'unit',
placeholder:'请输入'
},
{
type: 'select',
label:'状态',
prop:'status',
option:[{ id:1,name:'启用中'},{ id:2,name:'禁用中'}],
placeholder:'请选择状态'
type: 'input',
label:'联系人',
prop:'contact',
placeholder:'请输入'
},
{
type: 'input',
label:'联系方式',
prop:'tel',
placeholder:'请输入'
},
{
type: 'select',
label:'是否公开',
prop:'isPublic',
placeholder:'请选择',
option:[{ id:1,name:'是'},{ id:0,name:'否'}]
label:'举办次数类型',
prop:'holdNumType',
option:[{ id:1,name:'大于且包括'},{ id:2,name:'等于'},{ id:3,name:'小于且包括'}],
placeholder:'请选择'
},
{
type: 'input',
label:'举办次数',
prop:'holdNum',
placeholder:'请输入'
},
{
type: 'time',
label:'创建时间',
start: 'createStartDate',
end:'createEndDate'
},
]
export const columns = [

@ -0,0 +1,13 @@
<template>
<div></div>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -0,0 +1,13 @@
<template>
<div></div>
</template>
<script>
export default {
}
</script>
<style>
</style>
Loading…
Cancel
Save