|
@@ -5,9 +5,8 @@
|
|
|
<div slot="moreSearch">
|
|
|
<el-radio-group v-model="type" size="mini" @change="changeType">
|
|
|
<el-radio-button label="">全部</el-radio-button>
|
|
|
- <el-radio-button :label="1">未开始</el-radio-button>
|
|
|
- <el-radio-button :label="2">进行中</el-radio-button>
|
|
|
- <el-radio-button :label="3">已结束</el-radio-button>
|
|
|
+ <el-radio-button :label="true">启用</el-radio-button>
|
|
|
+ <el-radio-button :label="false">禁用</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
<br><br>
|
|
|
</div>
|
|
@@ -17,7 +16,7 @@
|
|
|
<script>
|
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
|
-import { closeActivityStatus, openActivityStatus,secKillGoodsActivityListPageV2,secKillGoodsActivityListPageV2Export } from '@/api/seckill'
|
|
|
+import { closeActivityStatus, openActivityStatus, secKillGoodsActivityListPageV2, secKillGoodsActivityListPageV2Export } from '@/api/seckill'
|
|
|
|
|
|
export default {
|
|
|
components: { TemplatePage },
|
|
@@ -71,7 +70,7 @@ export default {
|
|
|
getList(p) {
|
|
|
try {
|
|
|
var pam = JSON.parse(JSON.stringify(p))
|
|
|
- if (this.type) {
|
|
|
+ if (this.type !== '') {
|
|
|
pam.status = this.type
|
|
|
pam.params.push({ "param": "a.status", "compare": "=", "value": this.type })
|
|
|
}
|
|
@@ -79,7 +78,7 @@ export default {
|
|
|
} catch (error) {
|
|
|
console.log(error)
|
|
|
} finally {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
// 列表导出函数
|
|
@@ -97,15 +96,15 @@ export default {
|
|
|
return (
|
|
|
<div class='operation-btns'>
|
|
|
<el-popconfirm
|
|
|
- title={`是否确定${Number(row.status) ? "关闭" : "开启"}?`}
|
|
|
+ title={`是否确定${row.status ? "关闭" : "开启"}?`}
|
|
|
onConfirm={() => {
|
|
|
- [openActivityStatus, closeActivityStatus][Number(row.status)]({ secKillId: row.secKillId }).then(res => {
|
|
|
- this.$message({ type: 'success', message: `${Number(row.status) ? "关闭" : "开启"}成功!` })
|
|
|
+ (row.status ? closeActivityStatus : openActivityStatus)({ secKillId: row.secKillId }).then(res => {
|
|
|
+ this.$message({ type: 'success', message: `${row.status ? "关闭" : "开启"}成功!` })
|
|
|
this.$refs.pageRef.refreshList()
|
|
|
})
|
|
|
}}
|
|
|
>
|
|
|
- <el-button type="text" slot="reference">{Number(row.status) ? "关闭" : "开启"}</el-button>
|
|
|
+ <el-button type="text" slot="reference">{row.status ? "关闭" : "开启"}</el-button>
|
|
|
</el-popconfirm>
|
|
|
<el-button type="text" onClick={() => {
|
|
|
this.$router.push({
|