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