福利项目开启关闭按钮
This commit is contained in:
@@ -51,6 +51,14 @@ layout("/layouts/platform.html"){
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='isUnseal'">
|
||||
<el-switch
|
||||
@change="(val)=>{welfareStatusChange(row.id,row.isUnseal)}"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isUnseal">
|
||||
</el-switch>
|
||||
</template>
|
||||
<!-- <template scope="{row}" v-if="column.prop=='gift'">-->
|
||||
<!-- <span v-if="row.flexible">福利套餐</span>-->
|
||||
<!-- <span v-else>{{row.gift}}</span>-->
|
||||
@@ -261,7 +269,8 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "year", label: "年度" },
|
||||
{ prop: "name", label: "项目名称" },
|
||||
{ prop: "choiceTimeStart", label: "开始选择时间" },
|
||||
{ prop: "choiceTimeEnd", label: "结束选择时间" }
|
||||
{ prop: "choiceTimeEnd", label: "结束选择时间" },
|
||||
{prop: "isUnseal", label: "是否开启"},
|
||||
|
||||
// { prop: "gift", label: "福利礼品" },
|
||||
// { prop: "provideTimeStart", label: "发放时间" }
|
||||
@@ -296,6 +305,19 @@ layout("/layouts/platform.html"){
|
||||
this.sendMsg(data)
|
||||
}
|
||||
},
|
||||
async welfareStatusChange(id, isUnseal) {
|
||||
|
||||
const resp = await this.$axios.post("/platform/welfare/project/mange/welfareStatusChange", {
|
||||
id: id,
|
||||
isUnseal: isUnseal
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.error(resp.msg)
|
||||
}
|
||||
},
|
||||
async save() {
|
||||
const formValid = await this.$refs["form"].validate()
|
||||
if (formValid) {
|
||||
|
||||
Reference in New Issue
Block a user