| | |
| | | }) |
| | | } |
| | | |
| | | //批量删除活动 |
| | | export const delActivityBatch = (params) =>{ |
| | | return service({ |
| | | url: "/activity/batch", |
| | | method: "DELETE", |
| | | data:params |
| | | }) |
| | | } |
| | | |
| | | // 活动详情 |
| | | export const activityInfoById = (params) => { |
| | | return service({ |
| | |
| | | addActivity, |
| | | editActivity, |
| | | delActivityById, |
| | | delActivityBatch, |
| | | activityChangeStatus, |
| | | activityChangeRecommend, |
| | | activityMembersPage, |
| | |
| | | } |
| | | }, |
| | | { |
| | | title: '活动报名时间段', |
| | | key: 'activityReportTimeRange', |
| | | width: 300, |
| | | render: (h, params) => { |
| | | return h('div', [ |
| | | h('div', `开始: ${this.formatDate(params.row.reportStartTime)}`), |
| | | h('div', `结束: ${this.formatDate(params.row.reportEndTime)}`) |
| | | ]) |
| | | } |
| | | }, |
| | | { |
| | | title: '活动时间段', |
| | | key: 'activityTimeRange', |
| | | width: 300, |
| | |
| | | render: (h, params) => { |
| | | return h('Tag', { |
| | | props: { |
| | | color: params.row.disabled ? 'red' : 'green' |
| | | color: params.row.disabled ? 'green' : 'red' //true 正常 false被禁用 |
| | | } |
| | | }, params.row.disabled ? '禁用' : '正常') |
| | | }, params.row.disabled ? '正常' : '禁用') |
| | | } |
| | | } |
| | | ], |
| | |
| | | title: '确认删除', |
| | | content: `确定要删除活动 "${row.activityName}" 吗?`, |
| | | onOk: () => { |
| | | //TODO 先判断活动是否发布,发布则需要先下架 |
| | | |
| | | delActivityById(row.id).then(res => { |
| | | if (res.code === 200) { |
| | | this.$Message.success(res.msg) |
| | |
| | | |
| | | // 批量删除 |
| | | delBatch() { |
| | | //TODO 先判断活动是否发布,发布则需要先下架 |
| | | if (this.selectCount === 0) { |
| | | this.$Message.warning('请至少选择一条数据') |
| | | return |
| | |
| | | title: '确认删除', |
| | | content: `确定要删除选中的 ${this.selectCount} 条数据吗?`, |
| | | onOk: () => { |
| | | delActivityBatch({ids: this.selectList}).then(res => { |
| | | delActivityBatch(this.selectList).then(res => { |
| | | if (res.code === 200) { |
| | | this.$Message.success(res.msg) |
| | | this.selectList = [] |