Commit 28cbb247 by haowenbo

第六届长跑节,可配置活动时间,导出可搜索时间

parent 6f8241c3
......@@ -130,7 +130,12 @@ export default {
this.totalPage = res.count
let list = res.list
list.map(item => {
item.activityTitle = '第五届华夏幸福长跑节线上赛'
// item.activityTitle = '第五届华夏幸福长跑节线上赛'
if (item.exerciseActivityId == 1) {
item.activityTitle = "第五届华夏幸福长跑节线上赛";
} else if (item.exerciseActivityId == 2) {
item.activityTitle = "第六届华夏幸福长跑节线上赛";
}
})
this.photoList = list
}
......@@ -170,7 +175,12 @@ export default {
this.totalPage = res.count
let list = res.list
list.map(item => {
item.activityTitle = '第五届华夏幸福长跑节线上赛'
// item.activityTitle = '第五届华夏幸福长跑节线上赛'
if (item.exerciseActivityId == 1) {
item.activityTitle = "第五届华夏幸福长跑节线上赛";
} else if (item.exerciseActivityId == 2) {
item.activityTitle = "第六届华夏幸福长跑节线上赛";
}
})
this.photoList = list
}
......
<template>
<div>
<div class="btn-warp tr mb20">
<el-col :sm="3" class="pl12">
<el-date-picker
type="datetime"
:clearable="false"
placeholder="选择日期"
v-model="startTime"
:picker-options="pickerOptionsStart"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%; margin-bottom: 6px; margin-top: 5px">
</el-date-picker>
</el-col>
<el-col class="line tc" :sm="1" style="margin-bottom: 6px; margin-top: 5px"></el-col>
<el-col :sm="3">
<el-date-picker
type="datetime"
:clearable="false"
placeholder="选择日期"
v-model="endTime"
:picker-options="pickerOptionsEnd"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%;margin-bottom: 6px; margin-top: 5px">
</el-date-picker>
</el-col>
<el-button type="primary" size="small" @click="searchList">搜索</el-button>
<el-col :sm="4" class="pl12">
<el-date-picker
type="datetime"
:clearable="false"
placeholder="选择日期"
v-model="startTime"
:picker-options="pickerOptionsStart"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%; margin-bottom: 6px; margin-top: 5px"
>
</el-date-picker>
</el-col>
<el-col
class="line tc"
:sm="1"
style="margin-bottom: 6px; margin-top: 10px"
></el-col
>
<el-col :sm="4">
<el-date-picker
type="datetime"
:clearable="false"
placeholder="选择日期"
v-model="endTime"
:picker-options="pickerOptionsEnd"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%; margin-bottom: 6px; margin-top: 5px"
>
</el-date-picker>
</el-col>
<el-button type="primary" size="small" @click="searchList"
>搜索</el-button
>
<el-button type="primary" class="el-button-link">
<a :href="exportUrl">导出</a>
</el-button>
<el-button type="primary" class="el-button-link"><router-link to="/fitness/activityShenhe" style="color: #fff">活动审核</router-link></el-button>
<el-button type="primary" class="el-button-link"
><router-link to="/fitness/activityShenhe" style="color: #fff"
>活动审核</router-link
></el-button
>
</div>
<el-table
:data="photoList"
border
header-cell-class-name="table-header-row">
<el-table-column
prop="activityTitle"
label="活动标题">
header-cell-class-name="table-header-row"
>
<el-table-column prop="activityTitle" label="活动标题"> </el-table-column>
<el-table-column prop="activityTime" width="270" label="活动时间">
</el-table-column>
<el-table-column
prop="activityTime"
width="270"
label="活动时间">
<el-table-column prop="personIdMdm" width="180" label="账号">
</el-table-column>
<el-table-column
prop="personIdMdm"
width="180"
label="账号">
</el-table-column>
<el-table-column
prop="personName"
width="150"
label="姓名">
<el-table-column prop="personName" width="150" label="姓名">
</el-table-column>
<el-table-column
prop="createTime"
align="center"
width="160"
label="报名时间">
</el-table-column>
<el-table-column
prop="dept"
label="部门">
label="报名时间"
>
</el-table-column>
<el-table-column prop="dept" label="部门"> </el-table-column>
</el-table>
<div class="pagination" v-if="photoList && photoList.length">
<el-pagination
......@@ -73,7 +72,8 @@
:current-page="currentPage"
:page-size="pageSize"
layout="prev, pager, next"
:total="totalPage">
:total="totalPage"
>
</el-pagination>
</div>
</div>
......@@ -81,8 +81,8 @@
<script>
export default {
name: 'fitActivity',
data () {
name: "fitActivity",
data() {
return {
photoList: [
// {
......@@ -97,87 +97,88 @@ export default {
currentPage: 1,
pageSize: 10,
totalPage: null,
personIdMdm: '',
dept: '',
p: '',
c: '',
exportUrl:'',
personIdMdm: "",
dept: "",
p: "",
c: "",
exportUrl: this.exportUrl = this.$baseURL + "exercise/exerciseActivityApplyExport",
pickerOptionsStart: {
disabledDate: time => {
disabledDate: (time) => {
if (this.endTime) {
return time.getTime() > new Date(this.endTime).getTime()
return time.getTime() > new Date(this.endTime).getTime();
}
}
},
},
pickerOptionsEnd: {
disabledDate: time => {
disabledDate: (time) => {
if (this.startTime) {
return time.getTime() < new Date(this.startTime).getTime() - 86400000
return (
time.getTime() < new Date(this.startTime).getTime() - 86400000
);
}
}
},
},
startTime:"",
endTime:""
}
startTime: "",
endTime: "",
};
},
mounted () {
this.getActivityList()
mounted() {
this.getActivityList();
},
methods: {
searchList(){
this.exportUrl = this.$baseURL + 'exercise/exerciseActivityApplyExport?'
if(!!this.startTime){
this.exportUrl += 'activityStartTime='+this.startTime
searchList() {
this.exportUrl = this.$baseURL + "exercise/exerciseActivityApplyExport?";
if (!!this.startTime) {
this.exportUrl += "activityStartTime=" + this.startTime;
}
if(!!this.endTime){
this.exportUrl += '&activityEndTime='+this.endTime
if (!!this.endTime) {
this.exportUrl += "&activityEndTime=" + this.endTime;
}
console.log(this.exportUrl)
this.getActivityList()
console.log(this.exportUrl);
this.getActivityList();
},
handleSizeChange: function (size) {
this.pageSize = size
this.pageSize = size;
},
handleCurrentChange: function (currentPage) {
this.currentPage = currentPage
this.getActivityList()
this.currentPage = currentPage;
this.getActivityList();
},
getActivityList () {
getActivityList() {
let postObj = {
'p': this.currentPage,
'c': this.pageSize,
}
if(!!this.startTime){
this.$set(postObj,'activityStartTime',this.startTime)
p: this.currentPage,
c: this.pageSize,
};
if (!!this.startTime) {
this.$set(postObj, "activityStartTime", this.startTime);
}
if(!!this.endTime){
this.$set(postObj,'activityEndTime',this.endTime)
if (!!this.endTime) {
this.$set(postObj, "activityEndTime", this.endTime);
}
this.$axios.get('/exercise/exerciseActivityApplyList', {
params: postObj
}).then(res => {
if (res) {
this.totalPage = res.count
let list = res.list
list.map(item => {
if(item.exerciseActivityId ==1 ){
item.activityTitle = '第五届华夏幸福长跑节线上赛'
item.activityTime = '2020年4月30日 16:30 -- 5月5日 22:00'
} else if(item.exerciseActivityId ==2){
item.activityTitle = '第六届华夏幸福长跑节线上赛'
item.activityTime = '2022年4月29日 -- 5月22日 22:00'
}
})
this.photoList = list
}
})
}
}
}
this.$axios
.get("/exercise/exerciseActivityApplyList", {
params: postObj,
})
.then((res) => {
if (res) {
this.totalPage = res.count;
let list = res.list;
list.map((item) => {
if (item.exerciseActivityId == 1) {
item.activityTitle = "第五届华夏幸福长跑节线上赛";
item.activityTime = "2020年4月30日 16:30 -- 5月5日 22:00";
} else if (item.exerciseActivityId == 2) {
item.activityTitle = "第六届华夏幸福长跑节线上赛";
item.activityTime = "2022年4月29日 -- 5月22日 22:00";
}
});
this.photoList = list;
}
});
},
},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<el-form ref="form" style="margin-top: 3px">
<el-form-item label="活动标题" class="label_1">
<el-form-item label="长跑活动标题" class="label_1">
<el-col :sm="7" class="pl12">{{activityName}}</el-col>
</el-form-item>
<el-form-item label="报名期限" class="label_2">
<el-col :sm="3" class="pl12">
<el-form-item label="活动报名期限" class="label_2">
<el-col :sm="4" class="pl12">
<el-date-picker
type="datetime"
:clearable="false"
......@@ -17,7 +17,7 @@
</el-date-picker>
</el-col>
<el-col class="line tc" :sm="1" style="margin-bottom: 6px; margin-top: 5px"></el-col>
<el-col :sm="3">
<el-col :sm="4">
<el-date-picker
type="datetime"
:clearable="false"
......@@ -30,7 +30,7 @@
</el-col>
</el-form-item>
<el-form-item label="图片上传期限" class="label_2">
<el-col :sm="3" class="pl12">
<el-col :sm="4" class="pl12">
<el-date-picker
type="datetime"
:clearable="false"
......@@ -42,7 +42,7 @@
</el-date-picker>
</el-col>
<el-col class="line tc" :sm="1" style="margin-bottom: 6px; margin-top: 5px"></el-col>
<el-col :sm="3">
<el-col :sm="4">
<el-date-picker
type="datetime"
:clearable="false"
......@@ -167,6 +167,12 @@ export default {
</script>
<style scoped lang="scss">
.pl12{
.el-input__inner{
padding-right: 0;
}
}
.avatar {
width: 178px;
height: auto;
......
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 sign in to comment