活动管理

This commit is contained in:
yanran200730
2023-01-29 14:44:02 +08:00
parent a7072daf4a
commit 1abd4c49b0

View File

@@ -42,7 +42,7 @@
<div class="table-options">
<el-button type="text" @click="toAdd(row.id)">编辑</el-button>
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
<el-button type="text" :disabled="row.status !== '1'" @click="stop(row.id)">停止</el-button>
<el-button type="text" @click="stop(row.id, row.status)">{{ row.status === '1' ? '关闭' : '开启' }}</el-button>
<el-button type="text" @click="remove(row.id)">删除</el-button>
</div>
</template>
@@ -77,10 +77,6 @@
],
tableData: [],
statusList: [
{
dictValue: '0',
dictName: '未开始'
},
{
dictValue: '1',
dictName: '进行中'
@@ -111,11 +107,11 @@
})
},
stop (id) {
this.$confirm('确定停止该活动').then(() => {
stop (id, status) {
this.$confirm(status === '1' ? '确认关闭该活动?' : '确认开启该活动?').then(() => {
this.instance.post(`/app/appactivityinfo/stop?id=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('停止成功!')
this.$message.success('操作成功!')
this.getList()
}
})