Browse Source

活动管理功能增加

master
李鹏飞 6 years ago
parent
commit
f5c8547ef1
  1. 1
      src/views/modules/heart/actbanner.vue
  2. 11
      src/views/modules/heart/actinfo-add-or-update.vue
  3. 18
      src/views/modules/heart/actinfo-detail-view.vue
  4. 12
      src/views/modules/heart/actinfo-list.vue
  5. 6
      src/views/modules/heart/actinfo.vue
  6. 389
      src/views/modules/heart/actuserclock-detail.vue
  7. 166
      src/views/modules/heart/actuserclocklog-add-or-update.vue
  8. 133
      src/views/modules/heart/actuserclocklog.vue
  9. 8
      src/views/modules/heart/actuserrelation.vue

1
src/views/modules/heart/actbanner.vue

@ -41,6 +41,7 @@
<el-table-column prop="browseNum" label="浏览数量" header-align="center" align="center"></el-table-column>
<el-table-column prop="createdTime" label="创建时间" header-align="center" align="center"></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-if="$hasPermission('heart:actbanner:grounding')" type="text" size="small" @click="changeGroundingHandle(scope.row)">{{ changeGroundingText(scope.row.status) }}</el-button>
</template>

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

@ -69,6 +69,16 @@
<el-radio v-model="dataForm.actQuotaCategory"
label="0">不限名额</el-radio>
</template>
<div>
<font color="gray">报名未审核人员</font>
<font color="gray">活动已开始未审核报名人员可设置默认状态是否通过</font>
</div>
<div>
<el-radio v-model="dataForm.actUserDefaultState"
label="1">通过</el-radio>
<el-radio v-model="dataForm.actUserDefaultState"
label="4">不通过</el-radio>
</div>
</el-form-item>
</el-row>
<el-row>
@ -305,6 +315,7 @@ export default {
punishmentPoints: '',
reward: '',
isBanner:"1",
actUserDefaultState: '1',
bannerUrl:""
},
mapSelectVisible:false,

18
src/views/modules/heart/actinfo-detail-view.vue

@ -36,12 +36,17 @@
prop="actQuota">
<template>
{{dataForm.actQuotaCategory != '0' ? dataForm.actQuota+'人':'不限名额'}}
<!-- <el-radio v-model="dataForm.isActQuota"-->
<!-- label="1">固定名额</el-radio>&emsp;&emsp;-->
<!-- <el-input-number v-enter-number type="number" :min="1" v-model="dataForm.actQuota" placeholder="固定名额"style="width:150px"></el-input-number>&emsp; &emsp;&emsp;-->
<!-- <el-radio v-model="dataForm.isActQuota"-->
<!-- label="0">不限名额</el-radio>-->
</template>
<div>
<font color="gray">报名未审核人员</font>
<font color="gray">活动已开始未审核报名人员可设置默认状态是否通过</font>
</div>
<div>
<el-radio v-model="dataForm.actUserDefaultState" disabled="true"
label="1">通过</el-radio>
<el-radio v-model="dataForm.actUserDefaultState" disabled="true"
label="4">不通过</el-radio>
</div>
</el-form-item>
</el-row>
<el-row>
@ -192,7 +197,8 @@ export default {
sponsor: '',
deptId: '',
punishmentPoints: '',
reward: '',
actUserDefaultState: '1',
reward: ''
}
}
},

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

@ -56,7 +56,7 @@
</div>
<div>
<el-button v-if="$hasPermission('heart:actinfo:join')" type="text" size="small" @click="joinManage(scope.row.id)">报名管理</el-button>
<el-button v-if="$hasPermission('heart:actinfo:clock')" type="text" size="small" @click="clockManage(scope.row.id)">打卡积分</el-button>
<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>
</template>
@ -76,6 +76,7 @@
<actinfo-detail-view v-if="actInfoDetailVisible" ref="actinfoDetail" @refreshDataList="getDataList"></actinfo-detail-view>
<actuserrelation v-if="actUserRelationVisible" ref="actUserRelation" @refreshDataList="getDataList"></actuserrelation>
<actinfo-cancel v-if="actInfoCancelVisible" ref="actinfoCancel" @refreshDataList="getDataList"></actinfo-cancel>
<actuserclocklog v-if="actUserClockLogVisible" ref="actUserClockLog" @refreshDataList="getDataList"></actuserclocklog>
</div>
</el-card>
@ -87,6 +88,7 @@ import AddOrUpdate from './actinfo-add-or-update'
import ActinfoDetailView from './actinfo-detail-view'
import ActUserRelation from './actuserrelation'
import ActinfoCancel from './actinfo-cancel'
import ActUserClockLog from './actuserclocklog'
export default {
mixins: [mixinViewModule],
name: 'ActInfoList',
@ -105,6 +107,7 @@ export default {
actInfoDetailVisible: false,
actUserRelationVisible: false,
actInfoCancelVisible: false,
actUserClockLogVisible: false,
pickerBeginDateBefore: {
disabledDate: (time) => {
let beginDateVal = this.dataForm.startTime
@ -127,7 +130,8 @@ export default {
AddOrUpdate,
ActinfoDetailView,
ActUserRelation,
ActinfoCancel
ActinfoCancel,
ActUserClockLog
},
created: function () {
this.getDataList();
@ -145,6 +149,10 @@ export default {
this.$parent.selectComponent = 'ActUserRelation'
this.$router.push({ path: '/heart-actinfo', query: { id: id } })
},
clockManage (id) {
this.$parent.selectComponent = 'ActUserClockLog'
this.$router.push({ path: '/heart-actinfo', query: { id: id } })
},
formatState: function (row, column) {
let state = row.actStatus
if (state === '1') {

6
src/views/modules/heart/actinfo.vue

@ -8,6 +8,8 @@ import ActInfoList from './actinfo-list'
import ActInfoDetailView from './actinfo-detail-view'
import ActInfoAdd from './actinfo-add-or-update'
import ActUserRelation from './actuserrelation'
import ActUserClockLog from './actuserclocklog'
import ActUserClockDetail from './actuserclock-detail'
export default {
data () {
return {
@ -18,7 +20,9 @@ export default {
ActInfoList,
ActInfoDetailView,
ActInfoAdd,
ActUserRelation
ActUserRelation,
ActUserClockLog,
ActUserClockDetail
},
methods: {
init () {

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

@ -0,0 +1,389 @@
<template>
<div class="project-handle">
<div class="project-detail">
<div class="project-detail-tip">处理操作</div>
<el-form ref="dataForm" label-width="120px" label-position="right" style="width: 720px;" :model="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()">
<el-form-item label="是否加积分" prop="status">
<el-radio v-model="dataForm.status" :disabled="isAble" label="5">确认加积分</el-radio>
<el-radio v-model="dataForm.status" :disabled="isAble" label="6">拒绝加积分</el-radio>
</el-form-item>
<el-form-item label="处理意见:" prop="failureReason">
<el-input :rows="4" v-model="dataForm.failureReason" :disabled="isAble" type="textarea" placeholder="请写明理由,100字以内"></el-input>
</el-form-item>
<el-form-item style="float: right;">
<el-button size="small" style="width: 95px" type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
<el-button size="small" style="width: 95px" @click="backToActClockList">{{ '返回' }}</el-button>
</el-form-item>
</el-form>
<div class="container">
<div class="location"><span style="font-weight: bold;color: #606266">打卡位置:</span> {{dataForm.address}}</div>
<div id="mapContainer" style="width:450px;height:220px;"></div>
</div>
</div>
<div class="handle-operation">
<div class="handle-operation-tip">打卡详情</div>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column>
<el-table-column prop="realName" label="报名人" header-align="center" align="center"></el-table-column>
<el-table-column prop="sex" label="性别" :formatter="formatSex" header-align="center" align="center"></el-table-column>
<el-table-column prop="age" label="年龄" header-align="center" align="center"></el-table-column>
<el-table-column prop="mobile" label="联系电话" header-align="center" align="center"></el-table-column>
<el-table-column prop="clockAddress" label="打卡地点" header-align="center" align="center"></el-table-column>
<el-table-column prop="clockDesc" label="打卡描述" header-align="center" align="center"></el-table-column>
<el-table-column label="图片" fixed="right" header-align="center" align="center" width="200">
<template slot-scope="scope">
<img v-if="scope.row.clockPic"
:src="scope.row.clockPic"
class="avatar">
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
var map;
var markerList =[];
var radiusList =[];
var clockList =[];
import mixinViewModule from '@/mixins/view-module'
import debounce from 'lodash/debounce'
import 'element-ui/lib/theme-chalk/timeline.css'
import 'element-ui/lib/theme-chalk/timeline-item.css'
import 'element-ui/lib/theme-chalk/image.css'
export default {
mixins: [mixinViewModule],
name: 'ActUserClockDetail',
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/heart/actuserclocklog/page',
getDataListIsPage: true
},
dataForm: {
id: '',
actId: '',
status: '',
failureReason: '',
address: '',
latitude: '',
longitude: '',
radius: 200
},
isAble: false
}
},
mounted () {
this.dataForm.id = this.$route.query.id
this.dataForm.actId = this.$route.query.actId
this.init()
console.log(this.dataForm);
},
computed: {
dataRule () {
return {
status: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
failureReason: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
backToActClockList () {
this.$emit('refreshDataList')
this.$parent.selectComponent = 'ActUserClockLog'
this.$router.push({ path: '/heart-actinfo', query: { id: this.dataForm.actId}})
},
setMap(data) {
//map qq.maps.Map()
//
var myLatlng = new qq.maps.LatLng(data.latitude,data.longitude);
//
var zoom = this.capacity(data);
var myOptions = {
zoom: zoom, //
center: myLatlng, //
mapTypeId: qq.maps.MapTypeId.ROADMAP //MapType
}
// //dom
map = new qq.maps.Map(document.getElementById("mapContainer"), myOptions);
//
var radius = new qq.maps.Circle({
center:new qq.maps.LatLng(data.latitude,data.longitude),
radius: this.dataForm.radius,
map: map
});
radiusList.push(radius);
var marker = new qq.maps.Marker({
position:myLatlng,
map:map
});
markerList.push(marker)
},
init () {
this.$nextTick(() => {
if (this.dataForm.id) {
this.getInfo();
}
})
},
getDataList () {
this.dataListLoading = true
this.$http.get(
this.mixinViewModuleOptions.getDataListURL,
{
params: {
order: this.order,
orderField: this.orderField,
page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null,
limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null,
...this.dataForm
}
}
).then(({ data: res }) => {
this.dataListLoading = false
if (res.code !== 0) {
this.dataList = []
this.total = 0
return this.$message.error(res.msg)
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
this.dataList.forEach((item) => {
var LogLatlng = new qq.maps.LatLng(item.clockLatitude,item.clockLongitude);
var LogMarker = new qq.maps.Marker({
position:LogLatlng,
map:map
});
markerList.push(LogMarker)
});
console.log(markerList)
}).catch(() => {
this.dataListLoading = false
})
},
//
getInfo () {
this.$http.get(`/heart/actuserclocklog/clockDetail/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...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();
}).catch(() => {})
},
capacity(data) {
if(0 < data.radius && data.radius <= 25){
return 18
} else if (25 < data.radius && data.radius <= 50){
return 17
} else if (50 < data.radius && data.radius <= 100){
return 16
} else if (100 < data.radius && data.radius <= 200){
return 15
} else if (200 < data.radius && data.radius <= 500){
return 14
} else if (500 < data.radius && data.radius <= 1000){
return 13
} else if (1000 < data.radius && data.radius <= 2000){
return 12
} else if (2000 < data.radius && data.radius <= 5000){
return 11
}
},
formatSex: function (row, column) {
let state = row.sex
if (state === '0') {
return '女'
} else if (state === '1') {
return '男'
}
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
if (this.dataForm.failureReason.length > 100) {
return this.$message.error('处理意见不超过100字')
}
this.isAble = true
this.$http['post']('/heart/actuserclocklog/pointCheck', this.dataForm).then(({ data: res }) => {
this.isAble = false
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.$emit('refreshDataList')
this.$parent.selectComponent = 'ActUserClockLog'
this.$router.push({ path: '/heart-actinfo', query: { id: this.dataForm.actId}})
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style lang="scss">
.project-handle {
.el-timeline {
padding-left: 9px;
font-size: 13px;
}
.el-textarea {
width: 600px !important;
}
.el-input {
width: 600px !important;
}
}
.el-form-item__label {
font-weight: bold;
}
</style>
<style lang="scss" scoped>
.project-handle {
width: 100%;
height: calc(100vh - 120px);
background: #ffffff;
box-sizing: border-box;
padding: 10px;
.project-detail {
width: 100%;
height: 49%;
border: 2px solid #ccc;
box-sizing: border-box;
padding: 10px;
padding-top: 20px;
float:left;
margin-bottom: 1%;
position:relative;
.project-detail-tip {
position: absolute;
top: 0;
left:0;
width: 80px;
height: 30px;
line-height: 30px;
color: #ffffff;
background: #4ac38b;
text-align:center;
}
.el-form {
width: 58%;
height: 100%;
float:left;
overflow-y:auto;
&::-webkit-scrollbar {
width: 5px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
border-radius: 5px;
background: #ccc;
}
&::-webkit-scrollbar-track {
border-radius: 10px;
background: #fff;
}
}
.container {
width: 40%;
height: 100%;
float: right;
.location {
height: 30px;
line-height: 30px;
}
#map {
width: 100%;
height: calc(100% - 30px);
}
}
}
.project-progress {
width: 20%;
height: 100%;
float: right;
border: 2px solid #ccc;
box-sizing: border-box;
margin-left: 1%;
padding-top: 20px;
overflow-y:auto;
&::-webkit-scrollbar {
width: 5px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
border-radius: 5px;
background: #aaa;
}
&::-webkit-scrollbar-track {
border-radius: 10px;
background: #ccc;
}
}
.handle-operation {
padding-top: 30px;
box-sizing: border-box;
width: 100%;
height: 49%;
box-sizing: border-box;
border: 2px solid #ccc;
float:left;
position: relative;
overflow-y:auto;
&::-webkit-scrollbar {
width: 5px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
border-radius: 5px;
background: #aaa;
}
&::-webkit-scrollbar-track {
border-radius: 10px;
background: #ccc;
}
.handle-operation-tip {
position: absolute;
top: 0;
left:0;
width: 80px;
height: 30px;
line-height: 30px;
color: #ffffff;
background: #ff7600;
text-align:center;
}
}
}
</style>

166
src/views/modules/heart/actuserclocklog-add-or-update.vue

@ -0,0 +1,166 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
<el-form-item label="用户活动关系表ID" prop="actUserId">
<el-input v-model="dataForm.actUserId" placeholder="用户活动关系表ID"></el-input>
</el-form-item>
<el-form-item label="打卡类型(0-打卡,1-更新打卡)" prop="clockType">
<el-input v-model="dataForm.clockType" placeholder="打卡类型(0-打卡,1-更新打卡)"></el-input>
</el-form-item>
<el-form-item label="打卡时间" prop="clockTime">
<el-input v-model="dataForm.clockTime" placeholder="打卡时间"></el-input>
</el-form-item>
<el-form-item label="打卡位置经度" prop="clockLongitude">
<el-input v-model="dataForm.clockLongitude" placeholder="打卡位置经度"></el-input>
</el-form-item>
<el-form-item label="打卡位置纬度" prop="clockLatitude">
<el-input v-model="dataForm.clockLatitude" placeholder="打卡位置纬度"></el-input>
</el-form-item>
<el-form-item label="打卡地址" prop="clockAddress">
<el-input v-model="dataForm.clockAddress" placeholder="打卡地址"></el-input>
</el-form-item>
<el-form-item label="打卡描述" prop="clockDesc">
<el-input v-model="dataForm.clockDesc" placeholder="打卡描述"></el-input>
</el-form-item>
<el-form-item label="乐观锁" prop="revision">
<el-input v-model="dataForm.revision" placeholder="乐观锁"></el-input>
</el-form-item>
<el-form-item label="创建人" prop="createdBy">
<el-input v-model="dataForm.createdBy" placeholder="创建人"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="createdTime">
<el-input v-model="dataForm.createdTime" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label="更新人" prop="updatedBy">
<el-input v-model="dataForm.updatedBy" placeholder="更新人"></el-input>
</el-form-item>
<el-form-item label="更新时间" prop="updatedTime">
<el-input v-model="dataForm.updatedTime" placeholder="更新时间"></el-input>
</el-form-item>
<el-form-item label="删除标记" prop="delFlag">
<el-input v-model="dataForm.delFlag" placeholder="删除标记"></el-input>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
actUserId: '',
clockType: '',
clockTime: '',
clockLongitude: '',
clockLatitude: '',
clockAddress: '',
clockDesc: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
delFlag: ''
}
}
},
computed: {
dataRule () {
return {
actUserId: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
clockType: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
clockTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
clockLongitude: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
clockLatitude: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
clockAddress: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
clockDesc: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
revision: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
createdBy: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
createdTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updatedBy: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
updatedTime: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
delFlag: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
//
getInfo () {
this.$http.get(`/heart/actuserclocklog/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function () {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/heart/actuserclocklog/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

133
src/views/modules/heart/actuserclocklog.vue

@ -0,0 +1,133 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-heart__actuserclocklog}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-button type="primary" @click="backToActList">返回</el-button>
</el-form-item>
<div>
<el-form-item label="状态">
<el-select v-model="dataForm.status" placeholder="状态" clearable>
<el-option label="审核通过" :value="1"></el-option>
<el-option label="打卡" :value="2"></el-option>
<el-option label="确认加积分" :value="5"></el-option>
<el-option label="拒绝加积分" :value="6"></el-option>
</el-select>
</el-form-item>
<el-form-item label="姓名"><el-input v-model="dataForm.realName" placeholder="请输入" clearable></el-input></el-form-item>
<el-form-item label="手机号"><el-input v-model="dataForm.mobile" placeholder="请输入" clearable></el-input></el-form-item>
</div>
<div class="block">
<span class="demonstration">注册时间</span>&nbsp;&nbsp;
<el-date-picker @change='setRegistTime' v-model="time" value-format="yyyy-MM-dd" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>&nbsp;
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
</div>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column>
<el-table-column prop="realName" label="报名人" header-align="center" align="center"></el-table-column>
<el-table-column prop="sex" label="性别" :formatter="formatSex" header-align="center" align="center"></el-table-column>
<el-table-column prop="age" label="年龄" header-align="center" align="center"></el-table-column>
<el-table-column prop="mobile" label="联系电话" header-align="center" align="center"></el-table-column>
<el-table-column prop="clockAddress" label="打卡地点" header-align="center" align="center"></el-table-column>
<el-table-column prop="clockCount" label="打卡次数" header-align="center" align="center"></el-table-column>
<el-table-column prop="status" label="打卡状态" :formatter="formatState" header-align="center" align="center"></el-table-column>
<el-table-column prop="checkPoint" label="是否发放积分" header-align="center" align="center"></el-table-column>
<el-table-column prop="point" label="积分" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<!-- <el-button type="text" size="small" :disabled="scope.row.status ==='0'? false :true" @click="addOrUpdateHandle(scope.row.id)">审核</el-button>-->
<el-button v-if="$hasPermission('heart:actinfo:look')" type="text" size="small" @click="detailHandle(scope.row.id)">查看</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<actuserclock-detai v-if="detailVisible" ref="actuserrelationDetail" @refreshDataList="getDataList"></actuserclock-detai>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import ActUserClockDetail from './actuserclock-detail'
export default {
name: 'ActUserClockLog',
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/heart/actuserclocklog/clockPage',
getDataListIsPage: true
},
dataForm: {
id: '',
actId: '',
startTime: '',
endTime: ''
},
detailVisible: false,
time: ''
}
},
mounted () {
this.dataForm.actId = this.$route.query.id
this.getDataList()
},
methods: {
backToActList () {
this.$emit('refreshDataList')
this.$parent.selectComponent = 'ActInfoList'
this.$router.push({ path: '/heart-actinfo'})
},
detailHandle (id) {
this.$parent.selectComponent = 'ActUserClockDetail'
this.$router.push({ path: '/heart-actinfo', query: { id: id,actId: this.dataForm.actId} })
},
setRegistTime () {
this.dataForm.startTime = this.time[0]
this.dataForm.endTime = this.time[1]
},
formatState: function (row, column) {
let state = row.status
if (state === '0') {
return '报名'
} else if (state === '1') {
return '审核通过'
} else if (state === '2') {
return '打卡'
} else if (state === '3') {
return '取消报名'
} else if (state === '4') {
return '审核不通过'
} else if (state === '5') {
return '确认加积分'
} else if (state === '6') {
return '拒绝加积分'
}
},
formatSex: function (row, column) {
let state = row.sex
if (state === '0') {
return '女'
} else if (state === '1') {
return '男'
}
},
},
components: {
ActUserClockDetail
}
}
</script>

8
src/views/modules/heart/actuserrelation.vue

@ -80,7 +80,9 @@ export default {
id: '',
actId: '',
startTime: '',
endTime: ''
endTime: '',
realName: '',
mobile: ''
},
addOrUpdateVisible: false,
detailVisible: false
@ -120,6 +122,10 @@ export default {
return '取消报名'
} else if (state === '4') {
return '审核不通过'
} else if (state === '5') {
return '确认加积分'
} else if (state === '6') {
return '拒绝加积分'
}
},
formatSex: function (row, column) {

Loading…
Cancel
Save