回收站添加占位

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