This commit is contained in:
make
2025-04-13 21:14:50 +08:00
parent 3c1df922e1
commit e98d43564b
7 changed files with 19 additions and 4 deletions

View File

@@ -11,6 +11,7 @@
<template #tableHeader="scope">
<el-button type="primary" :icon="CirclePlus" @click="openDrawer(true)">新增</el-button>
<el-button type="primary" :icon="Upload" @click="batchAdd"> 批量添加 </el-button>
<el-button type="primary" :icon="Upload" @click="clearCache"> 缓存清理 </el-button>
<el-button
type="danger"
:icon="Delete"
@@ -76,7 +77,7 @@ import { useHandleData } from "@/hooks/useHandleData";
import ProTable from "@/components/ProTable/index.vue";
import { Delete, EditPen, CirclePlus,Upload, Refresh } from "@element-plus/icons-vue";
import { ProTableInstance, ColumnProps } from "@/components/ProTable/interface";
import { getList, saveData, uploadExcel,deleteItem, buildItem, landingItem } from "@/api/modules/site/list";
import { getList, saveData, uploadExcel, cacheFlush ,deleteItem, buildItem, landingItem } from "@/api/modules/site/list";
import { getAllList } from "@/api/modules/site/template";
import Drawer from "./drawer.vue";
import { arrColorType } from "@/utils/serviceDict";
@@ -259,6 +260,12 @@ const deleteAccount = async (params: SiteList.ResList) => {
proTable.value?.getTableList();
};
// 清理缓存
const clearCache = async (params: SiteList.ResList) => {
await useHandleData(cacheFlush, {}, "清理缓存");
proTable.value?.getTableList();
};
// 批量删除站点信息
const batchDelete = async (id: any[]) => {
const ids = id.map((item: SiteList.ResList) => item.si_id);