|
|
@ -34,6 +34,9 @@ |
|
|
|
|
|
|
|
<!-- 功能 --> |
|
|
|
<div class="history-function"> |
|
|
|
<el-button type="primary" plain @click="showActionConfirm('refresh')" |
|
|
|
>刷新</el-button |
|
|
|
> |
|
|
|
<el-button type="primary" plain @click="showActionConfirm('delete')" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
@ -155,6 +158,9 @@ import { eMessage } from './utils' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
import { useSettingTestTubeStore } from '@/store' |
|
|
|
|
|
|
|
defineOptions({ |
|
|
|
name: 'HistoryPage', |
|
|
|
}) |
|
|
|
const settingTubeStore = useSettingTestTubeStore() |
|
|
|
|
|
|
|
// 添加表格引用 |
|
|
@ -246,6 +252,10 @@ const formatDate = (date: string | number | Date) => { |
|
|
|
|
|
|
|
// 根据操作类型显示不同的确认弹框或通知 |
|
|
|
const showActionConfirm = (actionType: string) => { |
|
|
|
if (actionType === 'refresh') { |
|
|
|
getTableData(true) |
|
|
|
return |
|
|
|
} |
|
|
|
// 判断是否有选中的项目 |
|
|
|
if (selectedItems.value.length === 0) { |
|
|
|
// 如果没有选中项目,弹出通知框 |
|
|
@ -253,7 +263,6 @@ const showActionConfirm = (actionType: string) => { |
|
|
|
showWarn.value = true |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 如果是删除操作,确认删除的数量 |
|
|
|
if (actionType === 'delete') { |
|
|
|
currentAction.value = { |
|
|
|