| | |
| | | <el-table-column prop="createTime" label="创建时间" min-width="160px"></el-table-column> |
| | | <el-table-column label="状态" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.status === 0 ? '正常' : row.status === 1 ? '停用' : '已注销' }} |
| | | </template> |
| | | <el-switch |
| | | @change="handleStatusChange($event, row)" |
| | | v-model="row.status" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="0" |
| | | :inactive-value="1" |
| | | ></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="100" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | |
| | | }, |
| | | handleDetail (row) { |
| | | this.$refs.operaMemberDetailWindow.open('会员详情', row) |
| | | }, |
| | | handleStatusChange (val, row) { |
| | | this.api.updateStatus({ id: row.id, status: val }).then(res => { |
| | | this.$tip.apiSuccess(res || '修改成功') |
| | | }).catch(e => { |
| | | row.status = val === 1 ? 0 : 1 |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | } |
| | | } |
| | | } |