From e36eed2cdc9335fc4d1b84c8e4e306422638542f Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期三, 27 十一月 2024 08:53:51 +0800 Subject: [PATCH] ll --- admin/src/views/client/staffList.vue | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/admin/src/views/client/staffList.vue b/admin/src/views/client/staffList.vue index 6117255..e3be587 100644 --- a/admin/src/views/client/staffList.vue +++ b/admin/src/views/client/staffList.vue @@ -37,8 +37,12 @@ </template> </el-table-column> <el-table-column prop="status" label="鐘舵��" min-width="100px"> + <template slot-scope="{row}"> - <span :class="{ red: row.status == 1 }">{{ row.status == '0' ? '姝e父' : '绂佺敤' }}</span> + <el-switch v-model="row.status" @change="e => changeStatus(row)" :active-value="0" + :inactive-value="1"> + </el-switch> + <!-- <span :class="{ red: row.status == 1 }">{{ row.status == '0' ? '姝e父' : '绂佺敤' }}</span> --> </template> </el-table-column> <el-table-column v-if="containPermissions(['business:ywcustomer:update', 'business:ywcustomer:delete'])" @@ -65,6 +69,8 @@ import Pagination from '@/components/common/Pagination' import OperaYwCustomerWindow from './components/staffEdit.vue' import { fetchList } from '@/api/client/ywCustomer' +import { updateStatusById } from '@/api/business/member' +import { Message } from 'element-ui' export default { name: 'YwCustomer', extends: BaseTable, @@ -90,6 +96,14 @@ this.initData() }, methods: { + changeStatus(e) { + updateStatusById(e).then(res => { + this.search() + Message.success('鐘舵�佷慨鏀规垚鍔�') + }, () => { + this.search() + }) + }, initData() { fetchList({ capacity: 9000, -- Gitblit v1.9.3