|
@@ -59,6 +59,21 @@
|
|
|
v-model="searchForm.enable"
|
|
|
clearable
|
|
|
@clear="resetEnable"
|
|
|
+<<<<<<< Updated upstream
|
|
|
+=======
|
|
|
+ placeholder="是否启用"
|
|
|
+ >
|
|
|
+ <el-option label="是" :value="true"></el-option>
|
|
|
+ <el-option label="否" :value="false"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="status">
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ style="width: 180px !important"
|
|
|
+ v-model="searchForm.status"
|
|
|
+ clearable
|
|
|
+>>>>>>> Stashed changes
|
|
|
placeholder="活动状态"
|
|
|
>
|
|
|
<el-option label="开启" :value="true"></el-option>
|
|
@@ -231,7 +246,28 @@
|
|
|
type="text"
|
|
|
v-permission="'vipGroupActivity/update'"
|
|
|
@click="reset(scope.row)"
|
|
|
+<<<<<<< Updated upstream
|
|
|
>修改</el-button
|
|
|
+=======
|
|
|
+ v-if="!scope.row.enable|| scope.row.status == 'DRAFT'"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 0px"
|
|
|
+ v-if="!scope.row.enable&&scope.row.status == 'PROGRESS'"
|
|
|
+ type="text"
|
|
|
+ v-permission="'vipGroupActivity/enable'"
|
|
|
+ @click="resetStatus(scope.row)"
|
|
|
+ >启用</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.enable&&scope.row.status == 'PROGRESS'"
|
|
|
+ style="margin-left: 0px"
|
|
|
+ type="text"
|
|
|
+ v-permission="'vipGroupActivity/enable'"
|
|
|
+ @click="resetStatus(scope.row)"
|
|
|
+ >停用</el-button
|
|
|
+>>>>>>> Stashed changes
|
|
|
>
|
|
|
<!-- <el-button type='text'
|
|
|
@click="remove(scope.row)">删除</el-button>-->
|
|
@@ -240,6 +276,7 @@
|
|
|
width="160"
|
|
|
v-permission="'vipGroupActivity/delete'"
|
|
|
:ref="scope.$index"
|
|
|
+ v-if="scope.row.status != 'PROGRESS'&&!scope.row.enable"
|
|
|
>
|
|
|
<p>确定删除?</p>
|
|
|
<div style="text-align: right; margin: 0">
|
|
@@ -278,10 +315,8 @@ const MAX_NUMBER = 999;
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import {
|
|
|
vipGroupActivity,
|
|
|
- vipGroupCategory,
|
|
|
- addVipActive,
|
|
|
- resetVipActive,
|
|
|
removeVipActive,
|
|
|
+ enableVipGroupActivity
|
|
|
} from "@/api/vipSeting";
|
|
|
import qs from "qs";
|
|
|
import { Export } from "@/utils/downLoadFile";
|
|
@@ -665,6 +700,25 @@ export default {
|
|
|
}
|
|
|
return callback(new Error("输入值不得小于最小课时数"));
|
|
|
},
|
|
|
+ resetStatus(row) {
|
|
|
+ let tempString = row.enable ? "停用" : "启用";
|
|
|
+ this.$confirm(`是否${tempString}该活动?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ enableVipGroupActivity({id: row.id }).then(
|
|
|
+ (res) => {
|
|
|
+ if(res.code == 200){
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|