Browse Source

志愿者管理、报名人员增加导出功能

feature/syp_points
zhangyongzhangyong 5 years ago
parent
commit
f819b1fbf8
  1. 19
      src/views/modules/heart/actuserrelation.vue
  2. 19
      src/views/modules/user/volunteerinfo.vue

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

@ -35,6 +35,7 @@
></el-date-picker>&nbsp; ></el-date-picker>&nbsp;
<el-form-item> <el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button> <el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button @click="exportList()">{{ $t('export') }}</el-button>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
@ -110,6 +111,8 @@
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './actuserrelation-add-or-update' import AddOrUpdate from './actuserrelation-add-or-update'
import ActuserrelationDetail from './actuserrelation-detail' import ActuserrelationDetail from './actuserrelation-detail'
import Cookies from 'js-cookie'
import qs from 'qs'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
name: 'ActUserRelation', name: 'ActUserRelation',
@ -120,7 +123,8 @@ export default {
getDataListURL: '/heart/actuserrelation/page', getDataListURL: '/heart/actuserrelation/page',
getDataListIsPage: true, getDataListIsPage: true,
deleteURL: '/heart/actuserrelation', deleteURL: '/heart/actuserrelation',
deleteIsBatch: true deleteIsBatch: true,
exportURL: '/heart/actuserrelation/export'
}, },
dataForm: { dataForm: {
@ -188,6 +192,19 @@ export default {
} else if (state === '1') { } else if (state === '1') {
return '男' return '男'
} }
},
//
exportList () {
var params = qs.stringify({
'token': Cookies.get('token'),
'actId': this.dataForm.actId,
'status': this.dataForm.status,
'realName': this.dataForm.realName,
'mobile': this.dataForm.mobile,
'startTime': this.dataForm.startTime,
'endTime': this.dataForm.endTime
})
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportURL}?${params}`
} }
}, },
components: { components: {

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

@ -28,6 +28,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button> <el-button @click="getDataList()">{{ $t('query') }}</el-button>
<el-button @click="exportList()">{{ $t('export') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="dataListLoading" <el-table v-loading="dataListLoading"
@ -154,6 +155,8 @@ 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 Cookies from 'js-cookie'
import qs from 'qs'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
data () { data () {
@ -162,7 +165,8 @@ export default {
getDataListURL: '/app-user/volunteerinfo/page', getDataListURL: '/app-user/volunteerinfo/page',
getDataListIsPage: true, getDataListIsPage: true,
deleteURL: '/app-user/volunteerinfo', deleteURL: '/app-user/volunteerinfo',
deleteIsBatch: true deleteIsBatch: true,
exportURL: '/app-user/volunteerinfo/export'
}, },
dataForm: { dataForm: {
id: '', id: '',
@ -295,6 +299,19 @@ export default {
} else if (state === '3') { } else if (state === '3') {
return '已拉入黑名单' return '已拉入黑名单'
} }
},
//
exportList () {
var params = qs.stringify({
'token': Cookies.get('token'),
'streetId': this.dataForm.streetId,
'communityId': this.dataForm.communityId,
'gridId': this.dataForm.gridId,
'realName': this.dataForm.realName,
'mobile': this.dataForm.mobile,
'volunteerNickname': this.dataForm.volunteerNickname
})
window.location.href = `${window.SITE_CONFIG['apiURL']}${this.mixinViewModuleOptions.exportURL}?${params}`
} }
}, },
components: { components: {

Loading…
Cancel
Save