From 25908f5bd4a2dae4625b49d325525849feb676a4 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期五, 28 二月 2025 09:32:21 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/2.0.1' into 2.0.1 --- admin/src/views/combo/index.vue | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/admin/src/views/combo/index.vue b/admin/src/views/combo/index.vue index d32263e..5951710 100644 --- a/admin/src/views/combo/index.vue +++ b/admin/src/views/combo/index.vue @@ -49,7 +49,7 @@ <div> <span v-if="row.status == 0" @click="handleEdit(row, 'copy')" class="primaryColor pointer">澶嶅埗</span> <span v-if="row.status == 1" @click="handleEdit(row)" class="primaryColor pointer mr10">缂栬緫</span> - <span v-if="row.status == 1" @click="handleDetail(row)" class="red pointer">鍒犻櫎</span> + <span v-if="row.status == 1" @click="handleDel(row)" class="red pointer">鍒犻櫎</span> </div> </template> </el-table-column> @@ -68,7 +68,7 @@ import TableLayout from '@/layouts/TableLayout' import Edit from './components/Edit' import ComboDetail from './components/ComboDetail.vue' -import { comboListPost, comboEditPost } from '@/api/business/combo.js' +import { comboListPost, comboUpdatePost, comboDelPost } from '@/api/business/combo.js' import { Message } from 'element-ui' export default { extends: BasePageTemp, @@ -130,12 +130,26 @@ }) }, changeStatus(row) { - comboEditPost({ ...row }).then(res => { + comboUpdatePost({ ...row }).then(res => { if (res.code == 200) { return Message.success('鏇存柊鎴愬姛') } }) }, + handleDel(row) { + this.$confirm('鎮ㄧ‘璁よ鍒犻櫎褰撳墠濂楅鍚楋紵', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning', + }).then(() => { + comboDelPost(row.id).then(res => { + if (res) { + Message.success('鍒犻櫎鎴愬姛') + this.getList() + } + }) + }) + }, handleEdit(row, type = 'edit') { this.isShowEdit = true this.$nextTick(() => { -- Gitblit v1.9.3