Commit 438d5aaf authored by 冷玲鹏's avatar 冷玲鹏

活动管理、公告管理:修改数据库字段

parent 888ed0d2
...@@ -75,7 +75,6 @@ ...@@ -75,7 +75,6 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="title" label="活动标题" min-width="230" show-overflow-tooltip /> <el-table-column align="center" prop="title" label="活动标题" min-width="230" show-overflow-tooltip />
<el-table-column align="center" prop="summary" label="活动摘要" min-width="230" show-overflow-tooltip />
<el-table-column align="center" label="封面" min-width="120" prop="pictureId"> <el-table-column align="center" label="封面" min-width="120" prop="pictureId">
<!-- <template slot-scope="scope"> <!-- <template slot-scope="scope">
<div :id="step(scope.$index)"> <div :id="step(scope.$index)">
...@@ -114,9 +113,9 @@ ...@@ -114,9 +113,9 @@
<el-tag v-if="scope.row.isRecommended === 1" type="warning" size="medium ">推荐</el-tag> <el-tag v-if="scope.row.isRecommended === 1" type="warning" size="medium ">推荐</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="participantCount" label="报名人数" min-width="80"> <el-table-column align="center" prop="applicationCount" label="报名人数" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" @click="handleClick(scope.row)">{{ scope.row.participantCount || 0 }}</el-link> <el-link type="primary" @click="handleClick(scope.row)">{{ scope.row.applicationCount || 0 }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="排序" prop="weight" :show-overflow-tooltip="true" min-width="55"> <el-table-column label="排序" prop="weight" :show-overflow-tooltip="true" min-width="55">
...@@ -135,12 +134,12 @@ ...@@ -135,12 +134,12 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="registrationFee" label="报名费用" show-overflow-tooltip> <el-table-column align="center" prop="applicationFee" label="报名费用" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ numberFormatter(scope.row.registrationFee, 2) || '-' }} {{ numberFormatter(scope.row.applicationFee, 2) || '-' }}
</template> </template>
<!-- <template slot-scope="scope"> <!-- <template slot-scope="scope">
<span>{{ scope.row.registrationFee }}</span> <span>{{ scope.row.applicationFee }}</span>
</template>--> </template>-->
</el-table-column> </el-table-column>
<!-- <el-table-column align="center" prop="createUser" label="提交人" show-overflow-tooltip> <!-- <el-table-column align="center" prop="createUser" label="提交人" show-overflow-tooltip>
...@@ -153,6 +152,16 @@ ...@@ -153,6 +152,16 @@
<span>{{ scope.row.publishDate }}</span> <span>{{ scope.row.publishDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="startTime" label="结束时间" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.startTime }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="endTime" label="发布日期" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.endTime }}</span>
</template>
</el-table-column>
<!-- <el-table-column align="left" prop="createDate" label="提交时间" show-overflow-tooltip> <!-- <el-table-column align="left" prop="createDate" label="提交时间" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createDate }}</span> <span>{{ scope.row.createDate }}</span>
...@@ -200,9 +209,9 @@ ...@@ -200,9 +209,9 @@
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="queryForm" style="margin: 0 0 0 -15px" :model="queryParams1" :inline="true"> <el-form ref="queryForm" style="margin: 0 0 0 -15px" :model="queryParams1" :inline="true">
<el-form-item> <el-form-item>
<el-select v-model="queryParams1.registration"> <el-select v-model="queryParams1.status">
<el-option <el-option
v-for="item in registrationOptions" v-for="item in statusOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
...@@ -237,7 +246,7 @@ ...@@ -237,7 +246,7 @@
>{{ commonField.resetName }}</el-button> >{{ commonField.resetName }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div v-if="queryParams1.registration ==='已报名'" class="app-container1"> <div v-if="queryParams1.status ==='1'" class="app-container1">
<el-table :data="gridData" height="300px"> <el-table :data="gridData" height="300px">
<el-table-column align="center" prop="id" label="序号" min-width="55px"> <el-table-column align="center" prop="id" label="序号" min-width="55px">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -273,7 +282,7 @@ ...@@ -273,7 +282,7 @@
@pagination="loadData1" @pagination="loadData1"
/> />
</div> </div>
<div v-if="queryParams1.registration ==='取消报名'" class="app-container1"> <div v-if="queryParams1.status ==='2'" class="app-container1">
<el-table :data="gridData1" height="300px"> <el-table :data="gridData1" height="300px">
<el-table-column align="center" prop="id" label="序号" min-width="55px"> <el-table-column align="center" prop="id" label="序号" min-width="55px">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -407,14 +416,14 @@ export default { ...@@ -407,14 +416,14 @@ export default {
} }
], ],
// 发布状态 // 发布状态
registrationOptions: [ statusOptions: [
{ {
label: '已报名', label: '已报名',
value: '已报名' value: '1'
}, },
{ {
label: '取消报名', label: '取消报名',
value: '取消报名' value: '2'
} }
], ],
// 上传提交 // 上传提交
...@@ -434,7 +443,7 @@ export default { ...@@ -434,7 +443,7 @@ export default {
page: 1, page: 1,
rows: 10, rows: 10,
flag: '', flag: '',
registration: '已报名' status: '1'
}, },
// pagination // pagination
total: 0, total: 0,
...@@ -530,7 +539,7 @@ export default { ...@@ -530,7 +539,7 @@ export default {
this.queryParams = { this.queryParams = {
page: 1, page: 1,
rows: 10, rows: 10,
registration: '已报名' status: '1'
} }
this.dateRange = [] this.dateRange = []
this.loadData() this.loadData()
...@@ -550,7 +559,7 @@ export default { ...@@ -550,7 +559,7 @@ export default {
// 过滤 gridData // 过滤 gridData
const filteredGridData = this.gridData.filter(item => { const filteredGridData = this.gridData.filter(item => {
return ( return (
(!this.queryParams1.registration || item.registration === this.queryParams1.registration) && (!this.queryParams1.status || item.status === this.queryParams1.status) &&
(!this.queryParams1.name || item.name.includes(this.queryParams1.name)) (!this.queryParams1.name || item.name.includes(this.queryParams1.name))
) )
}) })
...@@ -558,7 +567,7 @@ export default { ...@@ -558,7 +567,7 @@ export default {
// 过滤 gridData1 // 过滤 gridData1
const filteredGridData1 = this.gridData1.filter(item => { const filteredGridData1 = this.gridData1.filter(item => {
return ( return (
(!this.queryParams1.registration || item.registration === this.queryParams1.registration) && (!this.queryParams1.status || item.status === this.queryParams1.status) &&
(!this.queryParams1.name || item.name.includes(this.queryParams1.name)) (!this.queryParams1.name || item.name.includes(this.queryParams1.name))
) )
}) })
...@@ -576,7 +585,7 @@ export default { ...@@ -576,7 +585,7 @@ export default {
this.queryParams1 = { this.queryParams1 = {
page: 1, page: 1,
rows: 10, rows: 10,
registration: '已报名' status: '1'
} }
// 重置表单 // 重置表单
this.$refs.queryForm.resetFields() this.$refs.queryForm.resetFields()
...@@ -608,22 +617,22 @@ export default { ...@@ -608,22 +617,22 @@ export default {
this.queryParams1 = { this.queryParams1 = {
page: 1, page: 1,
rows: 10, rows: 10,
registration: '已报名' status: '1'
} }
this.title = '报名人数' this.title = '报名人数'
const activityId = row.businessId const activityId = row.businessId
const participantCount = row.participantCount || 0 const applicationCount = row.applicationCount || 0
// 调用后端接口查询与该活动对应的子表数据 // 调用后端接口查询与该活动对应的子表数据
this.fetchSubTableData(activityId) this.fetchSubTableData(activityId)
// 显示报名人数 // 显示报名人数
this.participantCount = participantCount this.applicationCount = applicationCount
}, },
/** 查询子表数据 */ /** 查询子表数据 */
fetchSubTableData(activityId) { fetchSubTableData(activityId) {
// 将 activityId 传递给后端,查询子表数据 // 将 activityId 传递给后端,查询子表数据
listCmsApplication({ activityId: activityId }) listCmsApplication({ activityId: activityId })
.then(response => { .then(response => {
const data = response.rows || [] const data = response.data || []
// 清空原始数据(如果有需要的话) // 清空原始数据(如果有需要的话)
this.gridData = [] this.gridData = []
this.gridData1 = [] this.gridData1 = []
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item <el-form-item
label="活动摘要:" label="活动摘要:"
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>-->
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item <el-form-item
...@@ -196,6 +196,42 @@ ...@@ -196,6 +196,42 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="开始时间:"
prop="startTime"
:rules="{ required: !(controls.isOperation === '3'), message: '请选择开始时间', trigger: 'blur' }"
>
<el-date-picker
v-model="form.releaseDate"
type="date"
placeholder="选择发布日期"
:disabled="secondFromDisabled"
size="small"
class="normalInput"
value-format="yyyy-MM-dd"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结束时间:"
prop="endTime"
:rules="{ required: !(controls.isOperation === '3'), message: '请选择结束时间', trigger: 'blur' }"
>
<el-date-picker
v-model="form.releaseDate"
type="date"
placeholder="选择发布日期"
:disabled="secondFromDisabled"
size="small"
class="normalInput"
value-format="yyyy-MM-dd"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="图片" prop="bannerPicture" min-width="120"> <el-table-column align="center" label="图片" prop="pictureId" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<div :id="step(scope.$index)"> <div :id="step(scope.$index)">
<el-image <el-image
......
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="title" label="公告标题" min-width="200" show-overflow-tooltip /> <el-table-column align="center" prop="title" label="公告标题" min-width="200" show-overflow-tooltip />
<el-table-column align="center" prop="summary" label="公告摘要" min-width="200" show-overflow-tooltip />
<el-table-column align="center" label="封面" min-width="120" prop="pictureId"> <el-table-column align="center" label="封面" min-width="120" prop="pictureId">
<!-- <template slot-scope="scope"> <!-- <template slot-scope="scope">
<div :id="step(scope.$index)"> <div :id="step(scope.$index)">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment