|
@ -130,7 +130,6 @@ import { HistoryTable, HistoryWarn } from './components/index' |
|
|
import { |
|
|
import { |
|
|
getHistoryInfo, |
|
|
getHistoryInfo, |
|
|
deleteHistoryInfo, |
|
|
deleteHistoryInfo, |
|
|
searchHistoryInfo, |
|
|
|
|
|
printHistoryInfo, |
|
|
printHistoryInfo, |
|
|
} from '../../services/Index/index' |
|
|
} from '../../services/Index/index' |
|
|
import HistoryMessage from './components/History/HistoryMessage.vue' |
|
|
import HistoryMessage from './components/History/HistoryMessage.vue' |
|
@ -149,7 +148,7 @@ const handleClose = () => { |
|
|
isVisible.value = false |
|
|
isVisible.value = false |
|
|
} |
|
|
} |
|
|
// 绑定输入框的值 |
|
|
// 绑定输入框的值 |
|
|
const inputValue = ref<string>('') |
|
|
|
|
|
|
|
|
// const inputValue = ref<string>('') |
|
|
|
|
|
|
|
|
// 选中的项目 |
|
|
// 选中的项目 |
|
|
const selectedItems = ref<TableItem[]>([]) |
|
|
const selectedItems = ref<TableItem[]>([]) |
|
@ -227,14 +226,7 @@ const handleSelectRow = (item: TableItem) => { |
|
|
const formatDate = (date: string | number | Date) => { |
|
|
const formatDate = (date: string | number | Date) => { |
|
|
return dayjs(date).format('YYYY-MM-DD') |
|
|
return dayjs(date).format('YYYY-MM-DD') |
|
|
} |
|
|
} |
|
|
const jsonResult = (result: any) => { |
|
|
|
|
|
if (!result) return |
|
|
|
|
|
if (result.errorInfo != "") { |
|
|
|
|
|
return result.errorInfo |
|
|
|
|
|
} else { |
|
|
|
|
|
return result.result1 + " " + result.result2 + " " + result.result3 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 根据操作类型显示不同的确认弹框或通知 |
|
|
// 根据操作类型显示不同的确认弹框或通知 |
|
|
const showActionConfirm = (actionType: string) => { |
|
|
const showActionConfirm = (actionType: string) => { |
|
|
// 判断是否有选中的项目 |
|
|
// 判断是否有选中的项目 |
|
@ -322,27 +314,21 @@ const onScroll = (event: any) => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 搜索功能 |
|
|
|
|
|
const handleSearch = async () => { |
|
|
|
|
|
console.log('搜索内容:', inputValue.value) |
|
|
|
|
|
try { |
|
|
|
|
|
const res = await searchHistoryInfo(inputValue.value) |
|
|
|
|
|
console.log(res.data.list) |
|
|
|
|
|
// 直接替换数据,不进行累加 |
|
|
|
|
|
tableData.value = res.data.list as TableItem[] |
|
|
|
|
|
// 重置分页相关状态 |
|
|
|
|
|
currentPage.value = 1 |
|
|
|
|
|
hasMore.value = false |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.error('搜索失败', error) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 重置功能 |
|
|
|
|
|
const handleReset = () => { |
|
|
|
|
|
inputValue.value = '' |
|
|
|
|
|
getTableData(true) // 传入 true 表示需要重置 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 搜索功能 暂时注释 |
|
|
|
|
|
// const handleSearch = async () => { |
|
|
|
|
|
// console.log('搜索内容:', inputValue.value) |
|
|
|
|
|
// try { |
|
|
|
|
|
// const res = await searchHistoryInfo(inputValue.value) |
|
|
|
|
|
// console.log(res.data.list) |
|
|
|
|
|
// // 直接替换数据,不进行累加 |
|
|
|
|
|
// tableData.value = res.data.list as TableItem[] |
|
|
|
|
|
// // 重置分页相关状态 |
|
|
|
|
|
// currentPage.value = 1 |
|
|
|
|
|
// hasMore.value = false |
|
|
|
|
|
// } catch (error) { |
|
|
|
|
|
// console.error('搜索失败', error) |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
// 确认操作时的回调函数 |
|
|
// 确认操作时的回调函数 |
|
|
const handleConfirm = async () => { |
|
|
const handleConfirm = async () => { |
|
|