Browse Source

活动页面修改

feature/syp_points
zhangyongzhangyong 5 years ago
parent
commit
ef05d56b96
  1. 31
      src/views/modules/heart/actinfo-add-or-update.vue
  2. 4
      src/views/modules/heart/actinfo-list.vue
  3. 18
      src/views/modules/heart/actuserclock-detail.vue

31
src/views/modules/heart/actinfo-add-or-update.vue

@ -59,7 +59,6 @@
type="datetime"
value-format="yyyy-MM-dd HH:mm"
format="yyyy-MM-dd HH:mm"
:picker-options="isSignupEndTime"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
@ -315,11 +314,6 @@ export default {
reward: '',
actUserDefaultState: '1'
},
isSignupEndTime: {
disabledDate (time) {
return time < Date.now() - 8.64e7 // 8.64e7=1000*60*60*24
}
},
isImgRequired: true,
mapSelectVisible: false,
signInIsAble: true,
@ -601,18 +595,6 @@ export default {
},
//
dataFormSubmitHandle: debounce(function () {
if (new Date() >= new Date(this.dataForm.signupEndTime)) {
return this.$message.error('报名截止时间必须大于当前时间')
}
if (this.dataForm.actStartTime >= this.dataForm.actEndTime) {
return this.$message.error('活动结束时间必须大于活动开始时间')
}
if (this.dataForm.actStartTime <= this.dataForm.signupEndTime) {
return this.$message.error('活动开始时间必须大于报名截止时间')
}
if (this.dataForm.actEndTime > this.dataForm.signinEndTime) {
return this.$message.error('打卡结束时间必须大于或等于活动结束时间')
}
if ((this.dataForm.actContent).length > 10000) {
return this.$message.error('您输入的的内容已超过字数')
}
@ -623,19 +605,6 @@ export default {
if (!valid) {
return false
}
var signUpEndTime = new Date(Date.parse(this.dataForm.signupEndTime))
var actStarTime = new Date(Date.parse(this.dataForm.actStartTime))
var actEndTime = new Date(Date.parse(this.dataForm.actEndTime))
var signinEndTime = new Date(Date.parse(this.dataForm.signinEndTime))
if (signUpEndTime > actStarTime) {
return this.$message.error('活动开始时间必须大于报名截止时间.')
}
if (actEndTime < actStarTime) {
return this.$message.error('活动结束时间必须大于活动开始时间.')
}
if (signinEndTime < actEndTime) {
return this.$message.error('签到结束时间必须大于活动结束时间.')
}
this.isAble = true
this.$http[!this.dataForm.id ? 'post' : 'put']('/heart/actinfo/', this.dataForm).then(({ data: res }) => {
this.isAble = false

4
src/views/modules/heart/actinfo-list.vue

@ -59,8 +59,8 @@
<el-button v-if="$hasPermission('heart:actinfo:clock')" type="text" :disabled="scope.row.actStatus ==='0'? true :false" size="small" @click="clockManage(scope.row.id)">打卡积分</el-button>
</div>
<div>
<el-button v-if="$hasPermission('heart:actinfo:pull')" type="text" size="small" @click="pullHandle(scope.row)">新闻发稿</el-button>
<el-button v-if="$hasPermission('heart:actinfo:update')" type="text" size="small" @click="updateHandle(scope.row)">活动编辑</el-button>
<el-button type="text" size="small" @click="updateHandle(scope.row)">编辑活动</el-button>
<el-button type="text" size="small" @click="pullHandle(scope.row)">新闻发稿</el-button>
</div>
</template>
</el-table-column>

18
src/views/modules/heart/actuserclock-detail.vue

@ -106,8 +106,7 @@
</el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button v-show="scope.row.shieldFlag != 1" type="text" size="small" @click="upShieldFlag(scope.row.id)">未屏蔽</el-button>
<el-button type="text" size="small" v-show="scope.row.shieldFlag == 1" :disabled="true">已屏蔽</el-button>
<el-button :disabled="scope.row.shieldFlag == 1" type="text" @click="upShieldFlag(scope.row.id)">屏蔽</el-button>
</template>
</el-table-column>
</el-table>
@ -155,11 +154,14 @@ export default {
shieldFlag: ''
},
previewImgList: [],
isAble: false
isAble: false,
isEdit: false,
actUseId: ''
}
},
mounted () {
this.dataForm.id = this.$route.query.id
this.dataForm.actUseId = this.$route.query.id
this.dataForm.actId = this.$route.query.actId
this.init()
},
@ -289,12 +291,6 @@ export default {
...this.dataForm,
...res.data
}
// if (res.data.status != '5' && res.data.status != '6') {
// this.dataForm.status = '5';
// this.dataForm.failureReason = '';
// } else {
// this.isAble = true;
// }
this.setMap(res.data)
this.getDataList()
@ -367,7 +363,7 @@ export default {
),
//
upShieldFlag (id) {
this.$confirm('此操作将永久屏蔽该文件, 是否继续?', '提示', {
this.$confirm('确定屏蔽打卡记录?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -383,6 +379,8 @@ export default {
type: 'success',
duration: 500,
onClose: () => {
// this.dataForm.id = this.actUseId
// this.getDataList()
this.$emit('refreshDataList')
this.$parent.selectComponent = 'ActUserClockLog'
this.$router.push({

Loading…
Cancel
Save