回收站添加占位

This commit is contained in:
浅念
2025-07-25 15:48:49 +08:00
parent 382011d592
commit 48b95e252f
+16 -12
View File
@@ -2,7 +2,8 @@
<div class="recycle-page"> <div class="recycle-page">
<el-card class="recycle-card"> <el-card class="recycle-card">
<div class="recycle-title"> <div class="recycle-title">
<span class="title-dot"></span>回收站 <span class="title-dot"></span>
回收站
</div> </div>
<ArtTable <ArtTable
ref="tableRef" ref="tableRef"
@@ -22,7 +23,9 @@
<el-table-column prop="phone" label="联系方式" min-width="120"></el-table-column> <el-table-column prop="phone" label="联系方式" min-width="120"></el-table-column>
<el-table-column fixed="right" label="操作" width="160px"> <el-table-column fixed="right" label="操作" width="160px">
<template #default="scope"> <template #default="scope">
<el-button type="primary" @click="onDetail(scope.row)" size="small">恢复客户</el-button> <el-button type="primary" @click="onDetail(scope.row)" size="small"
>恢复客户
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
@@ -32,7 +35,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, onUnmounted } from 'vue' import { ref, onMounted } from 'vue'
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import { CrmService } from '@/api/crmApi' import { CrmService } from '@/api/crmApi'
const loading = ref(false) const loading = ref(false)
@@ -54,7 +57,7 @@ const gettableList = async () => {
recycle: 'recycle' recycle: 'recycle'
} }
const { data, current, size, total } = await CrmService.getcustomerList(params) const { data, current, size, total } = await CrmService.getcustomerList(params)
tableData.value = data.map((item: any, index: number) => ({ tableData.value = data.map((item: any) => ({
...item ...item
})) }))
Object.assign(pagination, { currentPage: current, pageSize: size, total }) Object.assign(pagination, { currentPage: current, pageSize: size, total })
@@ -84,20 +87,18 @@ onMounted(() => {
gettableList() gettableList()
}) })
const onDetail = async (row: any) => { const onDetail = async (row: any) => {
ElMessageBox.confirm( ElMessageBox.confirm('确定要恢复此客户吗?', '提示', {
'确定要恢复此客户吗?',
'提示',
{
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
} })
).then(async () => { .then(async () => {
const res = await CrmService.customerrestore({ id: row.id }) const res = await CrmService.customerrestore({ id: row.id })
ElMessage.success(res?.message || '提交成功!') ElMessage.success(res?.message || '提交成功!')
gettableList() gettableList()
// 你可以在这里调用接口或做后续处理 // 你可以在这里调用接口或做后续处理
}).catch(() => { })
.catch(() => {
// 用户点击了取消 // 用户点击了取消
}) })
} }
@@ -131,4 +132,7 @@ const onDetail = async (row: any) => {
.el-table .hide-header th { .el-table .hide-header th {
display: none; display: none;
} }
:deep(.el-table__empty-block) {
height: 300px !important;
}
</style> </style>