Commit 6f8241c3 by gaolei

添加长跑节管理页面,健身活动添加时间筛选

parent d0a91c7d

11.8 KB | W: | H:

61.3 KB | W: | H:

src/assets/img/logo1.png
src/assets/img/logo1.png
src/assets/img/logo1.png
src/assets/img/logo1.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -47,7 +47,8 @@ export default { ...@@ -47,7 +47,8 @@ export default {
.header { .header {
height: 70px!important; height: 70px!important;
padding: 0 20px; padding: 0 20px;
background: #314057; background: #fff;
border-bottom: 1px solid #666;
box-sizing: border-box; box-sizing: border-box;
position: fixed; position: fixed;
z-index: 99; z-index: 99;
...@@ -55,7 +56,7 @@ export default { ...@@ -55,7 +56,7 @@ export default {
left: 0; left: 0;
top: 0; top: 0;
.header_inner {display: flex; align-items: center; justify-content: space-between; height: 100%; color: #FEFEFE; .header_inner {display: flex; align-items: center; justify-content: space-between; height: 100%; color: #FEFEFE;
h2 {font-size: 22px; font-weight: normal; padding-left: 82px; color: #ddd; position: relative; h2 {font-size: 22px; font-weight: normal; padding-left: 82px; color: #666; position: relative;
&:before { &:before {
content: ""; content: "";
display: block; display: block;
...@@ -71,7 +72,7 @@ export default { ...@@ -71,7 +72,7 @@ export default {
} }
ul {float: right; ul {float: right;
li {display: inline-block; vertical-align: middle; font-size: 14px; position: relative; padding: 0 15px; li {display: inline-block; vertical-align: middle; font-size: 14px; position: relative; padding: 0 15px;
a { color: #ddd; a { color: #999;
} }
&.change_pwd { &.change_pwd {
&:after { &:after {
......
...@@ -25,7 +25,7 @@ Vue.prototype.$qs = QS ...@@ -25,7 +25,7 @@ Vue.prototype.$qs = QS
Vue.prototype.$previewAlert = previewAlert Vue.prototype.$previewAlert = previewAlert
// 开发环境 // 开发环境
const DEVDOMIN = 'http://10.2.98.32:8091/admin/' const DEVDOMIN = 'http://10.90.90.46:8081/admin/'
// 测试环境 // 测试环境
const ALPHADOMIN = 'http://happy.cfldpe.com/admin/' const ALPHADOMIN = 'http://happy.cfldpe.com/admin/'
// 生产环境 // 生产环境
......
...@@ -44,6 +44,7 @@ import Administrator from './views/administrator/index' ...@@ -44,6 +44,7 @@ import Administrator from './views/administrator/index'
import Shop from './views/shop/index.vue' import Shop from './views/shop/index.vue'
import FitActivity from './views/fitness/FitActivity.vue' import FitActivity from './views/fitness/FitActivity.vue'
import runningManager from './views/fitness/RunningManager.vue'
import ActivityShenhe from './views/fitness/ActivityShenhe.vue' import ActivityShenhe from './views/fitness/ActivityShenhe.vue'
// const NewArticle = require(['./views/home/NewArticle'], resolve) // const NewArticle = require(['./views/home/NewArticle'], resolve)
...@@ -330,7 +331,16 @@ export default new Router({ ...@@ -330,7 +331,16 @@ export default new Router({
meta: { meta: {
title: '活动审核' title: '活动审核'
} }
} },
{
path: '/fitness/runningManager',
name: 'runningManager',
component: runningManager,
meta: {
title: '长跑节管理',
menuTab: true
}
},
] ]
}, },
{ {
......
<template> <template>
<div> <div>
<div class="btn-warp tr mb20"> <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-button type="primary" class="el-button-link"> <el-button type="primary" class="el-button-link">
<a :href="$baseURL + 'exercise/exerciseActivityApplyExport'">导出</a> <a :href="exportUrl">导出</a>
</el-button> </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> </div>
...@@ -33,7 +59,7 @@ ...@@ -33,7 +59,7 @@
prop="createTime" prop="createTime"
align="center" align="center"
width="160" width="160"
label="时间"> label="报名时间">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="dept" prop="dept"
...@@ -74,13 +100,41 @@ export default { ...@@ -74,13 +100,41 @@ export default {
personIdMdm: '', personIdMdm: '',
dept: '', dept: '',
p: '', p: '',
c: '' c: '',
exportUrl:'',
pickerOptionsStart: {
disabledDate: time => {
if (this.endTime) {
return time.getTime() > new Date(this.endTime).getTime()
}
}
},
pickerOptionsEnd: {
disabledDate: time => {
if (this.startTime) {
return time.getTime() < new Date(this.startTime).getTime() - 86400000
}
}
},
startTime:"",
endTime:""
} }
}, },
mounted () { mounted () {
this.getActivityList() this.getActivityList()
}, },
methods: { methods: {
searchList(){
this.exportUrl = this.$baseURL + 'exercise/exerciseActivityApplyExport?'
if(!!this.startTime){
this.exportUrl += 'activityStartTime='+this.startTime
}
if(!!this.endTime){
this.exportUrl += '&activityEndTime='+this.endTime
}
console.log(this.exportUrl)
this.getActivityList()
},
handleSizeChange: function (size) { handleSizeChange: function (size) {
this.pageSize = size this.pageSize = size
}, },
...@@ -89,18 +143,32 @@ export default { ...@@ -89,18 +143,32 @@ export default {
this.getActivityList() this.getActivityList()
}, },
getActivityList () { getActivityList () {
let postObj = {
'p': this.currentPage,
'c': this.pageSize,
}
if(!!this.startTime){
this.$set(postObj,'activityStartTime',this.startTime)
}
if(!!this.endTime){
this.$set(postObj,'activityEndTime',this.endTime)
}
this.$axios.get('/exercise/exerciseActivityApplyList', { this.$axios.get('/exercise/exerciseActivityApplyList', {
params: { params: postObj
'p': this.currentPage,
'c': this.pageSize
}
}).then(res => { }).then(res => {
if (res) { if (res) {
this.totalPage = res.count this.totalPage = res.count
let list = res.list let list = res.list
list.map(item => { list.map(item => {
item.activityTitle = '第五届华夏幸福长跑节线上赛' if(item.exerciseActivityId ==1 ){
item.activityTime = '2020年4月30日 16:30 -- 5月5日 22:00' 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.photoList = list
} }
......
<template>
<div>
<el-form ref="form" style="margin-top: 3px">
<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-date-picker
type="datetime"
:clearable="false"
placeholder="选择日期"
v-model="activityStartTime"
: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="activityEndTime"
: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-form-item>
<el-form-item label="图片上传期限" class="label_2">
<el-col :sm="3" class="pl12">
<el-date-picker
type="datetime"
:clearable="false"
placeholder="选择日期"
v-model="activityUploadStartTime"
:picker-options="pickerOptionsStart2"
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="activityUploadEndTime"
:picker-options="pickerOptionsEnd2"
value-format="yyyy-MM-dd HH:mm:ss"
style="width: 100%;margin-bottom: 6px; margin-top: 5px">
</el-date-picker>
</el-col>
</el-form-item>
</el-form>
<el-row>
<el-col :span="5" class="tc" style="padding-top: 50px; padding-bottom: 30px">
<el-button type="danger" @click="saveData()">保 存</el-button>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
name: 'HappyRunning',
data () {
return {
classifyList: [], // 图集分类
classifyId: '', // 图集ID
currentPage: 1,
pageSize: 10,
totalPage: null,
photoList: [],
centerDialogVisible: false,
formLabelWidth: '120px',
form: {
pictureName: '',
pictureOriginalName: '',
imgFilePath: '',
pictureSize: '',
pictureOrder: '',
pictureMark: ''
},
activityStartTime: "",
activityEndTime: "",
activityName: "第六届华夏幸福长跑节--云开跑",
id:"",
activityUploadEndTime: "",
activityUploadStartTime: "",
pickerOptionsStart: {
disabledDate: time => {
if (this.activityEndTime) {
return time.getTime() > new Date(this.activityEndTime).getTime()
}
}
},
pickerOptionsEnd: {
disabledDate: time => {
if (this.activityStartTime) {
return time.getTime() < new Date(this.activityStartTime).getTime() - 86400000
}
}
},
pickerOptionsStart2: {
disabledDate: time => {
if (this.activityUploadEndTime) {
return time.getTime() > new Date(this.activityUploadEndTime).getTime()
}
}
},
pickerOptionsEnd2: {
disabledDate: time => {
if (this.activityUploadStartTime) {
return time.getTime() < new Date(this.activityUploadStartTime).getTime() - 86400000
}
}
},
}
},
mounted () {
this.getInfo()
},
methods: {
saveData(){
let _this = this
let params = {
activityEndTime: _this.activityEndTime,
activityStartTime: _this.activityStartTime,
activityUploadEndTime: _this.activityUploadEndTime,
activityUploadStartTime: _this.activityUploadStartTime,
id: _this.id
}
this.$axios.post('/exercise/exerciseActivityUpdate', params)
.then(function (res) {
if (res) {
_this.$message({
type: 'success',
message: '操作成功!'
})
}
})
},
getInfo(){
let _this = this
this.$axios.get('/exercise/exerciseActivityInfo', {}).then(function (res) {
console.log(res)
if(res){
_this.activityStartTime = res.activityStartTime
_this.activityEndTime = res.activityEndTime
_this.activityName =res.activityName
_this.activityUploadEndTime = res.activityUploadEndTime
_this.activityUploadStartTime = res.activityUploadStartTime
_this.id = res.id
}
})
}
}
}
</script>
<style scoped lang="scss">
.avatar {
width: 178px;
height: auto;
max-height: 100px;
overflow: hidden;
display: block;
margin: auto;
}
.upload_infor {
padding-left: 20px;
p {
em {color: #D0021B;}
}
}
</style>
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