PT PC端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
888 B

<template>
<SearchHistoryLog @search="getData" />
<TableHistoryLog :data="data" />
</template>
<script setup>
import { computed, ref } from 'vue';
import { useStore } from 'vuex';
import { getSendHistory } from 'apis';
import { ElMessage } from 'element-plus';
import SearchHistoryLog from 'components/history/search-history-log.vue';
import TableHistoryLog from 'components/history/history-log-table.vue';
const store = useStore();
const currentDeviceId = computed(() => store.state.device.currentDeviceId); // 正在操作的设备的id
const data = ref([]);
async function getData(
params = {
deviceId: currentDeviceId.value,
status: '',
type: '',
},
) {
try {
const resData = await getSendHistory(params);
data.value = resData ? [...resData] : [];
} catch (error) {
ElMessage.error(error.message || '查询失败');
}
}
getData();
</script>