Browse Source

参与活动记录

master
zhangyongzhangyong 4 years ago
parent
commit
cb723cc337
  1. 68
      src/views/modules/user/volunteer-act-record.vue
  2. 22
      src/views/modules/user/volunteerinfo.vue

68
src/views/modules/user/volunteer-act-record.vue

@ -0,0 +1,68 @@
<template>
<el-dialog
:visible.sync="visible"
title="参与活动记录"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<el-form :inline="true" :model="dataForm" ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '100px' : '80px'">
<el-form-item label="活动标题">
<el-input v-model.trim="dataForm.title"
placeholder="活动标题"
style="width:300px"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border style="width: 100%;">
<el-table-column type="index" width="50" label="序号"></el-table-column>
<el-table-column prop="title" label="活动标题" header-align="center" align="center"></el-table-column>
<el-table-column prop="actPeriodStartTime" label="开始时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="actPeriodEndTime" label="结束时间" width="160" header-align="center" align="center"></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>
</el-dialog>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/heart/actperioduser/getParticipatedActRecordByUserId',
getDataListIsPage: true
},
visible: false,
dataForm: {
userId: '',
title: ''
}
}
},
methods: {
init () {
this.visible = true
this.dataForm.title = ''
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.userId) {
this.getDataList()
}
})
}
}
}
</script>

22
src/views/modules/user/volunteerinfo.vue

@ -133,6 +133,11 @@
size="small" size="small"
@click="pointsLogs(scope.row.userId)">积分记录</el-button> @click="pointsLogs(scope.row.userId)">积分记录</el-button>
</div> </div>
<div>
<el-button type="text"
size="small"
@click="actRecordHandle(scope.row.userId)">参与活动记录</el-button>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -163,6 +168,10 @@
<volunteer-points-log v-if="volunteerPointsLogVisible" <volunteer-points-log v-if="volunteerPointsLogVisible"
ref="volunteerPointsLog" ref="volunteerPointsLog"
@refreshDataList="getDataList"></volunteer-points-log> @refreshDataList="getDataList"></volunteer-points-log>
<!-- 参与活动记录 -->
<volunteer-act-record v-if="volunteerActRecordVisible"
ref="volunteerActRecord"
@refreshDataList="getDataList"></volunteer-act-record>
</div> </div>
</el-card> </el-card>
</template> </template>
@ -174,6 +183,7 @@ import volunteerinfoDetail from './volunteerinfo-detail'
import volunteerinfoPointsAdjust from '../points/volunteerinfo-points-adjust' import volunteerinfoPointsAdjust from '../points/volunteerinfo-points-adjust'
import volunteerPointsLog from '../points/volunteer-points-log' import volunteerPointsLog from '../points/volunteer-points-log'
import volunteerinfoCheck from './volunteerinfo-check' import volunteerinfoCheck from './volunteerinfo-check'
import volunteerActRecord from './volunteer-act-record'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import qs from 'qs' import qs from 'qs'
export default { export default {
@ -218,6 +228,7 @@ export default {
volunteerinfoPointsAdjustVisible: false, volunteerinfoPointsAdjustVisible: false,
volunteerPointsLogVisible: false, volunteerPointsLogVisible: false,
volunteerinfoCheckVisible: false, volunteerinfoCheckVisible: false,
volunteerActRecordVisible: false,
volunteerDepts: [] volunteerDepts: []
} }
}, },
@ -303,6 +314,14 @@ export default {
this.$refs.volunteerPointsLog.init() this.$refs.volunteerPointsLog.init()
}) })
}, },
//
actRecordHandle (userId) {
this.volunteerActRecordVisible = true
this.$nextTick(() => {
this.$refs.volunteerActRecord.dataForm.userId = userId
this.$refs.volunteerActRecord.init()
})
},
// //
sexState: function (row, column) { sexState: function (row, column) {
let state = row.sex let state = row.sex
@ -353,7 +372,8 @@ export default {
volunteerinfoDetail, volunteerinfoDetail,
volunteerinfoPointsAdjust, volunteerinfoPointsAdjust,
volunteerinfoCheck, volunteerinfoCheck,
volunteerPointsLog volunteerPointsLog,
volunteerActRecord
} }
} }
</script> </script>

Loading…
Cancel
Save